diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f6f2482f5..c89939db8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,6 +9,13 @@ updates: labels: - "dependencies" - "ruby" + groups: + minor-and-patch: + update-types: + - "minor" + - "patch" + exclude-patterns: + - "rails" - package-ecosystem: "github-actions" directory: "/" schedule: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe4b939f5..a6f1248ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,12 +10,14 @@ jobs: runs-on: ubuntu-latest name: Linters steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: "3.1" + ruby-version: "3.3" bundler-cache: true + rubygems: 'latest' + bundler: 'latest' - name: Run type check run: bin/typecheck - name: Lint Ruby files @@ -34,31 +36,32 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "head"] - gemfile: - - Gemfile - - gemfiles/Gemfile-rails-6-1 - - gemfiles/Gemfile-rails-main + ruby: ["3.0", "3.1", "3.2", "3.3", "head"] + rails: ["7.0", "current", "main"] include: - - gemfile: gemfiles/Gemfile-rails-main + - rails: "main" experimental: true - ruby: "head" experimental: true - name: Ruby ${{ matrix.ruby }} - ${{ matrix.gemfile }} + exclude: + - ruby: "3.0" + rails: "main" + name: Ruby ${{ matrix.ruby }} - Rails ${{ matrix.rails }} env: - BUNDLE_GEMFILE: ${{ matrix.gemfile }} + RAILS_VERSION: ${{ matrix.rails }} steps: - - uses: actions/checkout@v3 - - if: ${{ matrix.ruby == 'head' }} - run: "rm -f ${{ matrix.gemfile }}.lock" + - uses: actions/checkout@v4 + - name: Remove Gemfile.lock + # Remove Gemfile.lock for Ruby head builds and non-Rails current builds + if: ${{ matrix.ruby == 'head' || matrix.rails != 'current' }} + run: "rm -f Gemfile.lock" - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true rubygems: 'latest' - - name: Install latest Bundler version - run: gem install bundler + bundler: 'latest' - name: Run tests run: bin/test continue-on-error: ${{ !!matrix.experimental }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3efe7b0d1..e81345a75 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,11 +10,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.2 + - uses: actions/checkout@v4 name: Checkout - name: Create release - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: "${{ secrets.GITHUB_TOKEN }}" script: | diff --git a/.github/workflows/require_label.yml b/.github/workflows/require_label.yml new file mode 100644 index 000000000..90baebaf1 --- /dev/null +++ b/.github/workflows/require_label.yml @@ -0,0 +1,17 @@ +name: Pull Request Labels + +on: + pull_request: + types: [opened, synchronize, reopened, labeled, unlabeled] + +jobs: + check-labels: + runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ github.token }} + steps: + - uses: actions/checkout@v4 + - name: Check for Pull Request Labels + shell: bash + run: | + bin/check_pr_labels "$(gh pr view --json labels ${{ github.event.pull_request.number }})" diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 000000000..15a279981 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.3.0 diff --git a/.vscode/settings.json b/.vscode/settings.json index 45572d846..2bc7e08ff 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,5 +12,6 @@ "[ruby]": { "editor.defaultFormatter": "Shopify.ruby-lsp", "editor.formatOnSave": true - } + }, + "sorbet.highlightUntyped": "everywhere-but-tests" } diff --git a/Gemfile b/Gemfile index 6f5643fe0..8a7dad8ac 100644 --- a/Gemfile +++ b/Gemfile @@ -4,50 +4,54 @@ source "https://rubygems.org" gemspec +CURRENT_RAILS_VERSION = "7.1" +rails_version = ENV.fetch("RAILS_VERSION", CURRENT_RAILS_VERSION) + gem "minitest" gem "minitest-hooks" gem "minitest-reporters" -gem "debug", require: false -gem "pry" -gem "pry-byebug" -gem "rubocop-shopify", require: false +gem "debug" +gem "irb" +gem "rubocop-shopify" gem "rubocop-sorbet", ">= 0.4.1" -gem "rubocop-rspec", require: false +gem "rubocop-rspec" group :deployment, :development do gem "rake" end group :development, :test do - gem "smart_properties", require: false - gem "json_api_client", require: false - gem "frozen_record", require: false - gem "sprockets", require: false - gem "rails", require: false - gem "state_machines", require: false - gem "activerecord-typedstore", require: false + if rails_version == "main" + gem "rails", github: "rails/rails", branch: "main" + else + rails_version = CURRENT_RAILS_VERSION if rails_version == "current" + gem "rails", "~> #{rails_version}.0" + end + + gem "mutex_m" + gem "smart_properties" + gem "json_api_client" + gem "frozen_record" + gem "sprockets" + gem "state_machines" + gem "activerecord-typedstore" gem "sqlite3" - gem "identity_cache", require: false + gem "identity_cache" gem "cityhash", git: "https://github.com/csfrancis/cityhash.git", ref: "3cfc7d01f333c01811d5e834f1495eaa29f87c36", require: false - gem "activeresource", require: false - gem "google-protobuf", require: false - gem "graphql", require: false - gem "shopify-money", require: false - gem "sidekiq", require: false - gem "nokogiri", require: false - gem "config", require: false - gem "aasm", require: false - gem "bcrypt", require: false - gem "xpath", require: false - gem "kredis", require: false - - # net-smtp was removed from default gems in Ruby 3.1, but is used by the `mail` gem. - # So we need to add it as a dependency until `mail` is fixed: - # https://github.com/rails/rails/blob/0919aa97260ab8240150278d3b07a1547489e3fd/Gemfile#L178-L191 - gem "net-smtp", "0.3.3", require: false + gem "activeresource" + gem "google-protobuf" + gem "graphql" + gem "shopify-money" + gem "sidekiq" + gem "nokogiri" + gem "config" + gem "aasm" + gem "bcrypt" + gem "xpath" + gem "kredis" end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index 07331032e..526eeb767 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,13 +8,13 @@ GIT PATH remote: . specs: - tapioca (0.11.8) + tapioca (0.13.0) bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) - rbi (~> 0.0.0, >= 0.0.16) - sorbet-static-and-runtime (>= 0.5.10187) - spoom (~> 1.2.0, >= 1.2.0) + rbi (>= 0.1.4, < 0.2) + sorbet-static-and-runtime (>= 0.5.11087) + spoom (>= 1.2.0) thor (>= 1.2.0) yard-sorbet @@ -23,138 +23,114 @@ GEM specs: aasm (5.5.0) concurrent-ruby (~> 1.0) - actioncable (7.0.6) - actionpack (= 7.0.6) - activesupport (= 7.0.6) + actioncable (7.1.3.2) + actionpack (= 7.1.3.2) + activesupport (= 7.1.3.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.6) - actionpack (= 7.0.6) - activejob (= 7.0.6) - activerecord (= 7.0.6) - activestorage (= 7.0.6) - activesupport (= 7.0.6) + zeitwerk (~> 2.6) + actionmailbox (7.1.3.2) + actionpack (= 7.1.3.2) + activejob (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.6) - actionpack (= 7.0.6) - actionview (= 7.0.6) - activejob (= 7.0.6) - activesupport (= 7.0.6) + actionmailer (7.1.3.2) + actionpack (= 7.1.3.2) + actionview (= 7.1.3.2) + activejob (= 7.1.3.2) + activesupport (= 7.1.3.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.6) - actionview (= 7.0.6) - activesupport (= 7.0.6) - rack (~> 2.0, >= 2.2.4) + rails-dom-testing (~> 2.2) + actionpack (7.1.3.2) + actionview (= 7.1.3.2) + activesupport (= 7.1.3.2) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.6) - actionpack (= 7.0.6) - activerecord (= 7.0.6) - activestorage (= 7.0.6) - activesupport (= 7.0.6) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.3.2) + actionpack (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.6) - activesupport (= 7.0.6) + actionview (7.1.3.2) + activesupport (= 7.1.3.2) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.6) - activesupport (= 7.0.6) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.1.3.2) + activesupport (= 7.1.3.2) globalid (>= 0.3.6) - activemodel (7.0.6) - activesupport (= 7.0.6) + activemodel (7.1.3.2) + activesupport (= 7.1.3.2) activemodel-serializers-xml (1.0.2) activemodel (> 5.x) activesupport (> 5.x) builder (~> 3.1) - activerecord (7.0.6) - activemodel (= 7.0.6) - activesupport (= 7.0.6) - activerecord-typedstore (1.5.1) + activerecord (7.1.3.2) + activemodel (= 7.1.3.2) + activesupport (= 7.1.3.2) + timeout (>= 0.4.0) + activerecord-typedstore (1.6.0) activerecord (>= 6.1) - activeresource (6.0.0) + activeresource (6.1.0) activemodel (>= 6.0) activemodel-serializers-xml (~> 1.0) activesupport (>= 6.0) - activestorage (7.0.6) - actionpack (= 7.0.6) - activejob (= 7.0.6) - activerecord (= 7.0.6) - activesupport (= 7.0.6) + activestorage (7.1.3.2) + actionpack (= 7.1.3.2) + activejob (= 7.1.3.2) + activerecord (= 7.1.3.2) + activesupport (= 7.1.3.2) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (7.0.6) + activesupport (7.1.3.2) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) - addressable (2.8.5) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) ansi (1.5.0) ar_transaction_changes (1.1.9) activerecord (>= 5.2.0) ast (2.4.2) - base64 (0.1.1) - bcrypt (3.1.19) + base64 (0.2.0) + bcrypt (3.1.20) + bigdecimal (3.1.6) builder (3.2.4) - byebug (11.1.3) - coderay (1.1.3) - concurrent-ruby (1.2.2) - config (4.2.1) + concurrent-ruby (1.2.3) + config (5.3.0) deep_merge (~> 1.2, >= 1.2.1) - dry-validation (~> 1.0, >= 1.0.0) connection_pool (2.4.1) - crack (0.4.5) + crack (1.0.0) + bigdecimal rexml crass (1.0.6) - date (3.3.3) - debug (1.8.0) - irb (>= 1.5.0) - reline (>= 0.3.1) + date (3.3.4) + debug (1.9.1) + irb (~> 1.10) + reline (>= 0.3.8) deep_merge (1.2.2) - diff-lcs (1.5.0) - dry-configurable (1.0.1) - dry-core (~> 1.0, < 2) - zeitwerk (~> 2.6) - dry-core (1.0.0) - concurrent-ruby (~> 1.0) - zeitwerk (~> 2.6) - dry-inflector (1.0.0) - dry-initializer (3.1.1) - dry-logic (1.5.0) - concurrent-ruby (~> 1.0) - dry-core (~> 1.0, < 2) - zeitwerk (~> 2.6) - dry-schema (1.13.2) - concurrent-ruby (~> 1.0) - dry-configurable (~> 1.0, >= 1.0.1) - dry-core (~> 1.0, < 2) - dry-initializer (~> 3.0) - dry-logic (>= 1.4, < 2) - dry-types (>= 1.7, < 2) - zeitwerk (~> 2.6) - dry-types (1.7.1) - concurrent-ruby (~> 1.0) - dry-core (~> 1.0) - dry-inflector (~> 1.0) - dry-logic (~> 1.4) - zeitwerk (~> 2.6) - dry-validation (1.10.0) - concurrent-ruby (~> 1.0) - dry-core (~> 1.0, < 2) - dry-initializer (~> 3.0) - dry-schema (>= 1.12, < 2) - zeitwerk (~> 2.6) + drb (2.2.1) erubi (1.12.0) faraday (1.10.3) faraday-em_http (~> 1.0) @@ -181,25 +157,27 @@ GEM faraday-retry (1.0.3) faraday_middleware (1.2.0) faraday (~> 1.0) - frozen_record (0.27.0) + frozen_record (0.27.1) activemodel - globalid (1.1.0) - activesupport (>= 5.0) - google-protobuf (3.24.1-arm64-darwin) - google-protobuf (3.24.1-x86_64-darwin) - google-protobuf (3.24.1-x86_64-linux) - graphql (2.0.26) - hashdiff (1.0.1) + globalid (1.2.1) + activesupport (>= 6.1) + google-protobuf (3.25.3-arm64-darwin) + google-protobuf (3.25.3-x86_64-darwin) + google-protobuf (3.25.3-x86_64-linux) + graphql (2.2.13) + base64 + hashdiff (1.1.0) i18n (1.14.1) concurrent-ruby (~> 1.0) - identity_cache (1.4.1) - activerecord (>= 5.2) + identity_cache (1.5.5) + activerecord (>= 7.0) ar_transaction_changes (~> 1.1) - io-console (0.6.0) - irb (1.6.4) - reline (>= 0.3.0) - json (2.6.3) - json_api_client (1.21.1) + io-console (0.7.2) + irb (1.12.0) + rdoc + reline (>= 0.4.2) + json (2.7.1) + json_api_client (1.22.0) activemodel (>= 3.2.0) activesupport (>= 3.2.0) addressable (~> 2.2) @@ -208,12 +186,12 @@ GEM rack (>= 0.2) kramdown (2.4.0) rexml - kredis (1.5.0) + kredis (1.7.0) activemodel (>= 6.0.0) activesupport (>= 6.0.0) redis (>= 4.2, < 6) language_server-protocol (3.17.0.3) - loofah (2.21.3) + loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -222,9 +200,8 @@ GEM net-pop net-smtp marcel (1.0.2) - method_source (1.0.0) - mini_mime (1.1.2) - minitest (5.19.0) + mini_mime (1.1.5) + minitest (5.22.2) minitest-hooks (1.5.1) minitest (> 5.3) minitest-reporters (1.6.1) @@ -233,171 +210,163 @@ GEM minitest (>= 5.0) ruby-progressbar multipart-post (2.3.0) - net-imap (0.3.6) + mutex_m (0.2.0) + net-imap (0.4.10) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout - net-smtp (0.3.3) + net-smtp (0.4.0.1) net-protocol netrc (0.11.0) - nio4r (2.5.9) - nokogiri (1.15.4-arm64-darwin) + nio4r (2.7.0) + nokogiri (1.16.2-arm64-darwin) racc (~> 1.4) - nokogiri (1.15.4-x86_64-darwin) + nokogiri (1.16.2-x86_64-darwin) racc (~> 1.4) - nokogiri (1.15.4-x86_64-linux) + nokogiri (1.16.2-x86_64-linux) racc (~> 1.4) - parallel (1.23.0) - parser (3.2.2.3) + parallel (1.24.0) + parser (3.3.0.5) ast (~> 2.4.1) racc prettier_print (1.2.1) - pry (0.14.2) - coderay (~> 1.1) - method_source (~> 1.0) - pry-byebug (3.10.1) - byebug (~> 11.0) - pry (>= 0.13, < 0.15) - public_suffix (5.0.3) - racc (1.7.1) - rack (2.2.7) + prism (0.24.0) + psych (5.1.2) + stringio + public_suffix (5.0.4) + racc (1.7.3) + rack (3.0.9.1) + rack-session (2.0.0) + rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.6) - actioncable (= 7.0.6) - actionmailbox (= 7.0.6) - actionmailer (= 7.0.6) - actionpack (= 7.0.6) - actiontext (= 7.0.6) - actionview (= 7.0.6) - activejob (= 7.0.6) - activemodel (= 7.0.6) - activerecord (= 7.0.6) - activestorage (= 7.0.6) - activesupport (= 7.0.6) + rackup (2.0.0) + rack (>= 3) + webrick + rails (7.1.3.2) + actioncable (= 7.1.3.2) + actionmailbox (= 7.1.3.2) + actionmailer (= 7.1.3.2) + actionpack (= 7.1.3.2) + actiontext (= 7.1.3.2) + actionview (= 7.1.3.2) + activejob (= 7.1.3.2) + activemodel (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) bundler (>= 1.15.0) - railties (= 7.0.6) - rails-dom-testing (2.1.1) + railties (= 7.1.3.2) + rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.0.6) - actionpack (= 7.0.6) - activesupport (= 7.0.6) - method_source + railties (7.1.3.2) + actionpack (= 7.1.3.2) + activesupport (= 7.1.3.2) + irb + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) - zeitwerk (~> 2.5) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.0.6) - rbi (0.0.17) - ast - parser (>= 3.0.0) + rake (13.1.0) + rbi (0.1.9) + prism (>= 0.18.0, < 0.25) sorbet-runtime (>= 0.5.9204) - unparser (>= 0.5.6) - redis (5.0.6) - redis-client (>= 0.9.0) - redis-client (0.14.1) + rdoc (6.6.2) + psych (>= 4.0.0) + redis (5.0.8) + redis-client (>= 0.17.0) + redis-client (0.20.0) connection_pool - regexp_parser (2.8.1) - reline (0.3.3) + regexp_parser (2.9.0) + reline (0.4.3) io-console (~> 0.5) rexml (3.2.6) - rubocop (1.56.1) - base64 (~> 0.1.1) + rubocop (1.62.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.3) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.1, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.29.0) - parser (>= 3.2.1.0) - rubocop-capybara (2.18.0) + rubocop-ast (1.31.2) + parser (>= 3.3.0.4) + rubocop-capybara (2.20.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.25.1) rubocop (~> 1.41) - rubocop-factory_bot (2.23.1) - rubocop (~> 1.33) - rubocop-rspec (2.23.1) - rubocop (~> 1.33) + rubocop-rspec (2.27.1) + rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) - rubocop-shopify (2.14.0) + rubocop-shopify (2.15.1) rubocop (~> 1.51) - rubocop-sorbet (0.7.3) + rubocop-sorbet (0.7.8) rubocop (>= 0.90.0) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - shopify-money (1.3.0) - sidekiq (7.1.2) + shopify-money (2.0.0) + sidekiq (7.2.2) concurrent-ruby (< 2) connection_pool (>= 2.3.0) rack (>= 2.2.4) - redis-client (>= 0.14.0) + redis-client (>= 0.19.0) smart_properties (1.17.0) - sorbet (0.5.10978) - sorbet-static (= 0.5.10978) - sorbet-runtime (0.5.10978) - sorbet-static (0.5.10978-universal-darwin-14) - sorbet-static (0.5.10978-universal-darwin-15) - sorbet-static (0.5.10978-universal-darwin-16) - sorbet-static (0.5.10978-universal-darwin-17) - sorbet-static (0.5.10978-universal-darwin-18) - sorbet-static (0.5.10978-universal-darwin-19) - sorbet-static (0.5.10978-universal-darwin-20) - sorbet-static (0.5.10978-universal-darwin-21) - sorbet-static (0.5.10978-universal-darwin-22) - sorbet-static (0.5.10978-x86_64-linux) - sorbet-static-and-runtime (0.5.10978) - sorbet (= 0.5.10978) - sorbet-runtime (= 0.5.10978) - spoom (1.2.3) + sorbet (0.5.11287) + sorbet-static (= 0.5.11287) + sorbet-runtime (0.5.11287) + sorbet-static (0.5.11287-universal-darwin) + sorbet-static (0.5.11287-x86_64-linux) + sorbet-static-and-runtime (0.5.11287) + sorbet (= 0.5.11287) + sorbet-runtime (= 0.5.11287) + spoom (1.2.4) erubi (>= 1.10.0) sorbet-static-and-runtime (>= 0.5.10187) syntax_tree (>= 6.1.1) thor (>= 0.19.2) - sprockets (4.2.0) + sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) - sqlite3 (1.6.4-arm64-darwin) - sqlite3 (1.6.4-x86_64-darwin) - sqlite3 (1.6.4-x86_64-linux) + sqlite3 (1.7.2-arm64-darwin) + sqlite3 (1.7.2-x86_64-darwin) + sqlite3 (1.7.2-x86_64-linux) state_machines (0.6.0) + stringio (3.1.0) syntax_tree (6.1.1) prettier_print (>= 1.2.0) - thor (1.2.2) - timeout (0.4.0) + thor (1.3.1) + timeout (0.4.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.4.2) - unparser (0.6.8) - diff-lcs (~> 1.3) - parser (>= 3.2.0) - webmock (3.19.0) + unicode-display_width (2.5.0) + webmock (3.23.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.7.0) - websocket-driver (0.7.5) + webrick (1.8.1) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.28) - webrick (~> 1.7.0) + yard (0.9.36) yard-sorbet (0.8.1) sorbet-runtime (>= 0.5) yard (>= 0.9) - zeitwerk (2.6.8) + zeitwerk (2.6.13) PLATFORMS arm64-darwin @@ -416,17 +385,16 @@ DEPENDENCIES google-protobuf graphql identity_cache + irb json_api_client kramdown (~> 2.4) kredis minitest minitest-hooks minitest-reporters - net-smtp (= 0.3.3) + mutex_m nokogiri - pry - pry-byebug - rails + rails (~> 7.1.0) rake rubocop-rspec rubocop-shopify @@ -442,4 +410,4 @@ DEPENDENCIES xpath BUNDLED WITH - 2.4.9 + 2.5.0 diff --git a/README.md b/README.md index a44883658..631b0e9ef 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ Tapioca makes it easy to work with [Sorbet](https://sorbet.org) in your codebase * [Excluding a gem from RBI generation](#excluding-a-gem-from-rbi-generation) * [Changing the strictness level of the RBI for a gem](#changing-the-strictness-level-of-the-rbi-for-a-gem) * [Keeping RBI files for gems up-to-date](#keeping-rbi-files-for-gems-up-to-date) + * [Importing hand written signatures from gem's `rbi/` folder](#importing-hand-written-signatures-from-gems-rbi-folder) * [Pulling RBI annotations from remote sources](#pulling-rbi-annotations-from-remote-sources) * [Basic authentication](#basic-authentication) * [Using a .netrc file](#using-a-netrc-file) @@ -83,9 +84,10 @@ Commands: tapioca todo # Generate the list of unresolved constants Options: - -c, [--config=] # Path to the Tapioca configuration file - # Default: sorbet/tapioca/config.yml - -V, [--verbose], [--no-verbose] # Verbose output for debugging purposes + -c, [--config=] # Path to the Tapioca configuration file + # Default: sorbet/tapioca/config.yml + -V, [--verbose], [--no-verbose], [--skip-verbose] # Verbose output for debugging purposes + # Default: false ``` @@ -116,9 +118,10 @@ Usage: tapioca init Options: - -c, [--config=] # Path to the Tapioca configuration file - # Default: sorbet/tapioca/config.yml - -V, [--verbose], [--no-verbose] # Verbose output for debugging purposes + -c, [--config=] # Path to the Tapioca configuration file + # Default: sorbet/tapioca/config.yml + -V, [--verbose], [--no-verbose], [--skip-verbose] # Verbose output for debugging purposes + # Default: false Get project ready for type checking ``` @@ -162,39 +165,43 @@ Usage: tapioca gem [gem...] Options: - --out, -o, [--outdir=directory] # The output directory for generated gem RBI files - # Default: sorbet/rbi/gems - [--file-header], [--no-file-header] # Add a "This file is generated" header on top of each generated RBI file - # Default: true - [--all], [--no-all] # Regenerate RBI files for all gems - --pre, -b, [--prerequire=file] # A file to be required before Bundler.require is called - --post, -a, [--postrequire=file] # A file to be required after Bundler.require is called - # Default: sorbet/tapioca/require.rb - -x, [--exclude=gem [gem ...]] # Exclude the given gem(s) from RBI generation - [--include-dependencies], [--no-include-dependencies] # Generate RBI files for dependencies of the given gem(s) - --typed, -t, [--typed-overrides=gem:level [gem:level ...]] # Override for typed sigils for generated gem RBIs - # Default: {"activesupport"=>"false"} - [--verify], [--no-verify] # Verify RBIs are up-to-date - [--doc], [--no-doc] # Include YARD documentation from sources when generating RBIs. Warning: this might be slow - # Default: true - [--loc], [--no-loc] # Include comments with source location when generating RBIs - # Default: true - [--exported-gem-rbis], [--no-exported-gem-rbis] # Include RBIs found in the `rbi/` directory of the gem - # Default: true - -w, [--workers=N] # Number of parallel workers to use when generating RBIs (default: auto) - [--auto-strictness], [--no-auto-strictness] # Autocorrect strictness in gem RBIs in case of conflict with the DSL RBIs - # Default: true - --dsl-dir, [--dsl-dir=directory] # The DSL directory used to correct gems strictnesses - # Default: sorbet/rbi/dsl - [--rbi-max-line-length=N] # Set the max line length of generated RBIs. Signatures longer than the max line length will be wrapped - # Default: 120 - -e, [--environment=ENVIRONMENT] # The Rack/Rails environment to use when generating RBIs - # Default: development - [--halt-upon-load-error], [--no-halt-upon-load-error] # Halt upon a load error while loading the Rails application - # Default: true - -c, [--config=] # Path to the Tapioca configuration file - # Default: sorbet/tapioca/config.yml - -V, [--verbose], [--no-verbose] # Verbose output for debugging purposes + --out, -o, [--outdir=directory] # The output directory for generated gem RBI files + # Default: sorbet/rbi/gems + [--file-header], [--no-file-header], [--skip-file-header] # Add a "This file is generated" header on top of each generated RBI file + # Default: true + [--all], [--no-all], [--skip-all] # Regenerate RBI files for all gems + # Default: false + --pre, -b, [--prerequire=file] # A file to be required before Bundler.require is called + --post, -a, [--postrequire=file] # A file to be required after Bundler.require is called + # Default: sorbet/tapioca/require.rb + -x, [--exclude=gem [gem ...]] # Exclude the given gem(s) from RBI generation + [--include-dependencies], [--no-include-dependencies], [--skip-include-dependencies] # Generate RBI files for dependencies of the given gem(s) + # Default: false + --typed, -t, [--typed-overrides=gem:level [gem:level ...]] # Override for typed sigils for generated gem RBIs + # Default: {"activesupport"=>"false"} + [--verify], [--no-verify], [--skip-verify] # Verify RBIs are up-to-date + # Default: false + [--doc], [--no-doc], [--skip-doc] # Include YARD documentation from sources when generating RBIs. Warning: this might be slow + # Default: true + [--loc], [--no-loc], [--skip-loc] # Include comments with source location when generating RBIs + # Default: true + [--exported-gem-rbis], [--no-exported-gem-rbis], [--skip-exported-gem-rbis] # Include RBIs found in the `rbi/` directory of the gem + # Default: true + -w, [--workers=N] # Number of parallel workers to use when generating RBIs (default: auto) + [--auto-strictness], [--no-auto-strictness], [--skip-auto-strictness] # Autocorrect strictness in gem RBIs in case of conflict with the DSL RBIs + # Default: true + --dsl-dir, [--dsl-dir=directory] # The DSL directory used to correct gems strictnesses + # Default: sorbet/rbi/dsl + [--rbi-max-line-length=N] # Set the max line length of generated RBIs. Signatures longer than the max line length will be wrapped + # Default: 120 + -e, [--environment=ENVIRONMENT] # The Rack/Rails environment to use when generating RBIs + # Default: development + [--halt-upon-load-error], [--no-halt-upon-load-error], [--skip-halt-upon-load-error] # Halt upon a load error while loading the Rails application + # Default: true + -c, [--config=] # Path to the Tapioca configuration file + # Default: sorbet/tapioca/config.yml + -V, [--verbose], [--no-verbose], [--skip-verbose] # Verbose output for debugging purposes + # Default: false Generate RBIs from gems ``` @@ -217,18 +224,18 @@ For gems that have a normal default `require` and that load all of their constan For example, suppose you are using the class `BetterHtml::Parser` exported from the `better_html` gem. Just doing a `require "better_html"` (which is the default require) does not load that type: ```shell -$ bundle exec pry +$ bundle exec irb -[1] pry(main)> require 'better_html' +irb(main):001> require 'better_html' => true -[2] pry(main)> BetterHtml +irb(main):002> BetterHtml => BetterHtml -[3] pry(main)> BetterHtml::Parser -NameError: uninitialized constant BetterHtml::Parser -from (pry):3:in `__pry__` -[4] pry(main)> require 'better_html/parser' +irb(main):003> BetterHtml::Parser +(irb):3:in '
': uninitialized constant BetterHtml::Parser (NameError) +Did you mean? BetterHtml::ParserError +irb(main):004> require 'better_html/parser' => true -[5] pry(main)> BetterHtml::Parser +irb(main):005> BetterHtml::Parser => BetterHtml::Parser ``` @@ -309,7 +316,7 @@ gem: #### Keeping RBI files for gems up-to-date -To ensure all RBI files for gems are up-to-date with the latest changes in your `Gemfile.lock`, Tapioca provides a `--verify` option: +To ensure all RBI files for gems are present and have the correct version based on your `Gemfile.lock`, Tapioca provides a `--verify` option: ```shell $ bin/tapioca gems --verify @@ -319,7 +326,16 @@ Checking for out-of-date RBIs... Nothing to do, all RBIs are up-to-date. ``` -This option can be used on CI to make sure the RBI files are always up-to-date and ensure accurate type checking. **Warning**: doing so will break your normal Dependabot workflow as every pull-request opened to bump a gem version will fail CI since the RBI will be out-of-date and will require you to manually run `bin/tapioca gems` to update them. +This option can be used in CI to make sure the RBI files are *up-to-date* and ensure accurate type checking. + +**Warning**: doing so will break your normal automated dependency update workflow as every pull request opened to bump a gem version will fail CI since the RBI will be out-of-date. You will need to either set up additional automation (eg [Dependabot](https://github.com/dependabot/dependabot-core/issues/5962#issuecomment-1303781931)), or manually run `bin/tapioca gems` and commit the results. + +**Warning**: Verification ONLY ensures the RBI files are present, used and have the correct version based on the gem version in your `Gemfile.lock`. It's possible for your RBIs to be out-of-date if RBIs were not regenerated following an update to tapioca itself or if a another gem that injects functionality (e.g. `turbo-rails`) was installed/updated/removed. To ensure RBIs are completely up-to-date, you must run `bin/tapioca gems --all` but it's not recommended to do this in CI as it's an expensive operation. + + +#### Importing hand written signatures from gem's `rbi/` folder + +Tapioca will import any signatures found in the `rbi/` folder of a given gem and combine them with the RBIs it generates. This is useful when a gem doesn't want to depend on `sorbet-runtime` but still wants to provide type safety to users during static checks. Note that the `rbi/` folder needs to be included in the gem release using the `.gemspec` file. Applications can choose not to import these signatures using the `--no-exported-gem-rbis` flag. ### Pulling RBI annotations from remote sources @@ -350,15 +366,16 @@ Usage: Options: [--sources=one two three] # URIs of the sources to pull gem RBI annotations from - # Default: ["https://raw.githubusercontent.com/Shopify/rbi-central/main"] - [--netrc], [--no-netrc] # Use .netrc to authenticate to private sources + # Default: "https://raw.githubusercontent.com/Shopify/rbi-central/main" + [--netrc], [--no-netrc], [--skip-netrc] # Use .netrc to authenticate to private sources # Default: true [--netrc-file=NETRC_FILE] # Path to .netrc file [--auth=AUTH] # HTTP authorization header for private sources --typed, -t, [--typed-overrides=gem:level [gem:level ...]] # Override for typed sigils for pulled annotations -c, [--config=] # Path to the Tapioca configuration file # Default: sorbet/tapioca/config.yml - -V, [--verbose], [--no-verbose] # Verbose output for debugging purposes + -V, [--verbose], [--no-verbose], [--skip-verbose] # Verbose output for debugging purposes + # Default: false Pull gem RBI annotations from remote sources ``` @@ -460,28 +477,32 @@ Usage: tapioca dsl [constant...] Options: - --out, -o, [--outdir=directory] # The output directory for generated DSL RBI files - # Default: sorbet/rbi/dsl - [--file-header], [--no-file-header] # Add a "This file is generated" header on top of each generated RBI file - # Default: true - [--only=compiler [compiler ...]] # Only run supplied DSL compiler(s) - [--exclude=compiler [compiler ...]] # Exclude supplied DSL compiler(s) - [--verify], [--no-verify] # Verifies RBIs are up-to-date - -q, [--quiet], [--no-quiet] # Suppresses file creation output - -w, [--workers=N] # Number of parallel workers to use when generating RBIs (default: 2) - # Default: 2 - [--rbi-max-line-length=N] # Set the max line length of generated RBIs. Signatures longer than the max line length will be wrapped - # Default: 120 - -e, [--environment=ENVIRONMENT] # The Rack/Rails environment to use when generating RBIs - # Default: development - -l, [--list-compilers], [--no-list-compilers] # List all loaded compilers - [--app-root=APP_ROOT] # The path to the Rails application - # Default: . - [--halt-upon-load-error], [--no-halt-upon-load-error] # Halt upon a load error while loading the Rails application - # Default: true - -c, [--config=] # Path to the Tapioca configuration file - # Default: sorbet/tapioca/config.yml - -V, [--verbose], [--no-verbose] # Verbose output for debugging purposes + --out, -o, [--outdir=directory] # The output directory for generated DSL RBI files + # Default: sorbet/rbi/dsl + [--file-header], [--no-file-header], [--skip-file-header] # Add a "This file is generated" header on top of each generated RBI file + # Default: true + [--only=compiler [compiler ...]] # Only run supplied DSL compiler(s) + [--exclude=compiler [compiler ...]] # Exclude supplied DSL compiler(s) + [--verify], [--no-verify], [--skip-verify] # Verifies RBIs are up-to-date + # Default: false + -q, [--quiet], [--no-quiet], [--skip-quiet] # Suppresses file creation output + # Default: false + -w, [--workers=N] # Number of parallel workers to use when generating RBIs (default: 2) + # Default: 2 + [--rbi-max-line-length=N] # Set the max line length of generated RBIs. Signatures longer than the max line length will be wrapped + # Default: 120 + -e, [--environment=ENVIRONMENT] # The Rack/Rails environment to use when generating RBIs + # Default: development + -l, [--list-compilers], [--no-list-compilers], [--skip-list-compilers] # List all loaded compilers + # Default: false + [--app-root=APP_ROOT] # The path to the Rails application + # Default: . + [--halt-upon-load-error], [--no-halt-upon-load-error], [--skip-halt-upon-load-error] # Halt upon a load error while loading the Rails application + # Default: true + -c, [--config=] # Path to the Tapioca configuration file + # Default: sorbet/tapioca/config.yml + -V, [--verbose], [--no-verbose], [--skip-verbose] # Verbose output for debugging purposes + # Default: false Generate RBIs for dynamic methods ``` @@ -510,6 +531,18 @@ Reason: This option can be used on CI to make sure the RBI files are always up-to-date and ensure accurate type checking. +If you are using Rails, you can configure `tapioca dsl` to run after each migration: + +```ruby +# Rakefile +if Rails.env.development? + namespace :db do + task :migrate do # Appends to the existing `db:migrate` task + system("bundle exec tapioca dsl", exception: true) + end + end +``` + #### Writing custom DSL compilers It is possible to create your own compilers for DSLs not supported by Tapioca out of the box. @@ -829,22 +862,23 @@ Usage: tapioca check-shims Options: - [--gem-rbi-dir=GEM_RBI_DIR] # Path to gem RBIs - # Default: sorbet/rbi/gems - [--dsl-rbi-dir=DSL_RBI_DIR] # Path to DSL RBIs - # Default: sorbet/rbi/dsl - [--shim-rbi-dir=SHIM_RBI_DIR] # Path to shim RBIs - # Default: sorbet/rbi/shims - [--annotations-rbi-dir=ANNOTATIONS_RBI_DIR] # Path to annotations RBIs - # Default: sorbet/rbi/annotations - [--todo-rbi-file=TODO_RBI_FILE] # Path to the generated todo RBI file - # Default: sorbet/rbi/todo.rbi - [--payload], [--no-payload] # Check shims against Sorbet's payload - # Default: true - -w, [--workers=N] # Number of parallel workers (default: auto) - -c, [--config=] # Path to the Tapioca configuration file - # Default: sorbet/tapioca/config.yml - -V, [--verbose], [--no-verbose] # Verbose output for debugging purposes + [--gem-rbi-dir=GEM_RBI_DIR] # Path to gem RBIs + # Default: sorbet/rbi/gems + [--dsl-rbi-dir=DSL_RBI_DIR] # Path to DSL RBIs + # Default: sorbet/rbi/dsl + [--shim-rbi-dir=SHIM_RBI_DIR] # Path to shim RBIs + # Default: sorbet/rbi/shims + [--annotations-rbi-dir=ANNOTATIONS_RBI_DIR] # Path to annotations RBIs + # Default: sorbet/rbi/annotations + [--todo-rbi-file=TODO_RBI_FILE] # Path to the generated todo RBI file + # Default: sorbet/rbi/todo.rbi + [--payload], [--no-payload], [--skip-payload] # Check shims against Sorbet's payload + # Default: true + -w, [--workers=N] # Number of parallel workers (default: auto) + -c, [--config=] # Path to the Tapioca configuration file + # Default: sorbet/tapioca/config.yml + -V, [--verbose], [--no-verbose], [--skip-verbose] # Verbose output for debugging purposes + # Default: false Check duplicated definitions in shim RBIs ``` diff --git a/bin/check_pr_labels b/bin/check_pr_labels new file mode 100755 index 000000000..b518a0a38 --- /dev/null +++ b/bin/check_pr_labels @@ -0,0 +1,34 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +require "json" + +REQUIRED_LABELS = [ + "documentation", + "bugfix", + "chore", + "enhancement", + "ignore-for-release", + "security", + "sorbet", + "dependencies", +].freeze + +arg = ARGV.first + +unless arg + warn("Missing argument for bin/check_pr_labels") + exit(1) +end + +labels = JSON.parse(arg)["labels"].map { |label| label["name"] } + +matching_labels = labels & REQUIRED_LABELS + +if matching_labels.empty? + warn("PR is missing at least one of the following labels: #{REQUIRED_LABELS.join(", ")}") + exit(1) +end + +warn("PR is correctly labelled: #{matching_labels.join(", ")}") +exit(0) diff --git a/bin/console b/bin/console index 18022d91c..5fbd5ce2d 100755 --- a/bin/console +++ b/bin/console @@ -7,5 +7,7 @@ require "tapioca" # You can add fixtures and/or initialization code here to make experimenting # with your gem easier. You can also use a different console, if you like. -require "pry" -Pry.start +require "irb" +IRB.setup(__FILE__) +IRB.conf[:IRB_NAME] = "tapioca" +IRB::Irb.new.run diff --git a/bin/readme b/bin/readme index d80053135..820bd25cd 100755 --- a/bin/readme +++ b/bin/readme @@ -1,2 +1,2 @@ #!/usr/bin/env bash -bundle exec rake readme +THOR_COLUMNS=120 bundle exec rake readme diff --git a/bin/test b/bin/test index 397728055..58f2bbb62 100755 --- a/bin/test +++ b/bin/test @@ -5,6 +5,7 @@ $LOAD_PATH << File.expand_path("../spec", __dir__) ENV["DEFAULT_TEST"] = "spec/**/*_spec.rb" require "bundler/setup" +require "debug/prelude" require "active_support" # Remove this when we drop support to Rails 6. require "rails/test_unit/runner" diff --git a/dev.yml b/dev.yml index 518fb56bf..1268a8b15 100644 --- a/dev.yml +++ b/dev.yml @@ -3,7 +3,7 @@ name: tapioca type: ruby up: - - ruby: '3.2.0' + - ruby - bundler env: diff --git a/gemfiles/Gemfile-rails-6-1 b/gemfiles/Gemfile-rails-6-1 deleted file mode 100644 index e36a7e9cd..000000000 --- a/gemfiles/Gemfile-rails-6-1 +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -source("https://rubygems.org") - -gemspec path: ".." - -gem("minitest") -gem("minitest-hooks") -gem("minitest-reporters") -gem("pry-byebug") -gem("rubocop-shopify", require: false) -gem("rubocop-sorbet", ">= 0.4.1") -gem("rubocop-rspec", require: false) -gem("ruby-lsp", require: false) - -group(:deployment, :development) do - gem("rake") -end - -group(:development, :test) do - gem("smart_properties", require: false) - gem("json_api_client", require: false) - gem("frozen_record", require: false) - gem("sprockets", require: false) - gem("rails", "~> 6.1.0", require: false) - gem("state_machines", require: false) - gem("activerecord-typedstore", require: false) - gem("sqlite3") - gem("identity_cache", require: false) - gem( - "cityhash", - git: "https://github.com/csfrancis/cityhash.git", - ref: "3cfc7d01f333c01811d5e834f1495eaa29f87c36", - require: false - ) - gem("activeresource", require: false) - gem("google-protobuf", require: false) - gem("graphql", require: false) - gem("shopify-money", require: false) - gem("sidekiq", require: false) - gem("nokogiri", require: false) - gem("config", github: "rubyconfig/config", branch: "master", require: false) - gem("aasm", require: false) - gem("bcrypt", require: false) - gem("xpath", require: false) - gem("kredis", require: false) - - # net-smtp was removed from default gems in Ruby 3.1, but is used by the `mail` gem. - # So we need to add it as a dependency until `mail` is fixed: - # https://github.com/rails/rails/blob/0919aa97260ab8240150278d3b07a1547489e3fd/Gemfile#L178-L191 - gem("net-smtp", "0.3.1", require: false) -end - -group :test do - gem("webmock") -end - -gem "kramdown", "~> 2.4" diff --git a/gemfiles/Gemfile-rails-main b/gemfiles/Gemfile-rails-main deleted file mode 100644 index 986414028..000000000 --- a/gemfiles/Gemfile-rails-main +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -source("https://rubygems.org") - -gemspec path: ".." - -gem("minitest") -gem("minitest-hooks") -gem("minitest-reporters") -gem("pry-byebug") -gem("rubocop-shopify", require: false) -gem("rubocop-sorbet", ">= 0.4.1") -gem("rubocop-rspec", require: false) -gem("ruby-lsp", require: false) - -group(:deployment, :development) do - gem("rake") -end - -group(:development, :test) do - gem("smart_properties", require: false) - gem("json_api_client", require: false) - gem("frozen_record", require: false) - gem("sprockets", require: false) - gem("rails", github: "rails/rails", branch: "main", require: false) - gem("state_machines", require: false) - gem("activerecord-typedstore", require: false) - gem("sqlite3") - gem("identity_cache", require: false) - gem( - "cityhash", - git: "https://github.com/csfrancis/cityhash.git", - ref: "3cfc7d01f333c01811d5e834f1495eaa29f87c36", - require: false - ) - gem("activeresource", require: false) - gem("google-protobuf", require: false) - gem("graphql", require: false) - gem("shopify-money", require: false) - gem("sidekiq", require: false) - gem("nokogiri", require: false) - gem("config", github: "rubyconfig/config", branch: "master", require: false) - gem("aasm", require: false) - gem("bcrypt", require: false) - gem("xpath", require: false) - gem("kredis", require: false) - - # net-smtp was removed from default gems in Ruby 3.1, but is used by the `mail` gem. - # So we need to add it as a dependency until `mail` is fixed: - # https://github.com/rails/rails/blob/0919aa97260ab8240150278d3b07a1547489e3fd/Gemfile#L178-L191 - gem("net-smtp", "0.3.1", require: false) -end - -group :test do - gem("webmock") -end - -gem "kramdown", "~> 2.4" diff --git a/lib/tapioca/commands/abstract_dsl.rb b/lib/tapioca/commands/abstract_dsl.rb index 18055248d..e5ad59c86 100644 --- a/lib/tapioca/commands/abstract_dsl.rb +++ b/lib/tapioca/commands/abstract_dsl.rb @@ -175,10 +175,11 @@ def constantize_compilers(compiler_names) unless unprocessable_compilers.empty? message = unprocessable_compilers.map do |name, _| - set_color("Error: Cannot find compiler '#{name}'", :red) + set_color("Warning: Cannot find compiler '#{name}'", :yellow) end.join("\n") - raise Thor::Error, message + say(message) + say("") end T.cast(compiler_map.values, T::Array[T.class_of(Tapioca::Dsl::Compiler)]) diff --git a/lib/tapioca/commands/abstract_gem.rb b/lib/tapioca/commands/abstract_gem.rb index 5eed5eb82..c4b66916b 100644 --- a/lib/tapioca/commands/abstract_gem.rb +++ b/lib/tapioca/commands/abstract_gem.rb @@ -118,7 +118,9 @@ def compile_gem_rbi(gem) reason: "types exported from the `#{gem.name}` gem", ) if @file_header - rbi.root = Tapioca::Gem::Pipeline.new(gem, include_doc: @include_doc, include_loc: @include_loc).compile + rbi.root = Runtime::Trackers::Autoload.with_disabled_exits do + Tapioca::Gem::Pipeline.new(gem, include_doc: @include_doc, include_loc: @include_loc).compile + end merge_with_exported_rbi(gem, rbi) if @include_exported_rbis diff --git a/lib/tapioca/commands/annotations.rb b/lib/tapioca/commands/annotations.rb index fe2ba892d..fdaef9723 100644 --- a/lib/tapioca/commands/annotations.rb +++ b/lib/tapioca/commands/annotations.rb @@ -23,6 +23,7 @@ def initialize( typed_overrides: {} ) super() + @outpath = T.let(Pathname.new(DEFAULT_ANNOTATIONS_DIR), Pathname) @central_repo_root_uris = central_repo_root_uris @auth = auth @netrc_file = netrc_file @@ -38,8 +39,11 @@ def initialize( def execute @indexes = fetch_indexes project_gems = list_gemfile_gems + remove_expired_annotations(project_gems) fetch_annotations(project_gems) + ensure + GitAttributes.create_vendored_attribute_file(@outpath) end sig { returns(T::Array[String]) } @@ -56,7 +60,7 @@ def list_gemfile_gems def remove_expired_annotations(project_gems) say("Removing annotations for gems that have been removed... ", [:blue, :bold]) - annotations = Pathname.glob("#{DEFAULT_ANNOTATIONS_DIR}/*.rbi").map { |f| f.basename(".*").to_s } + annotations = Pathname.glob(@outpath.join("*.rbi")).map { |f| f.basename(".*").to_s } expired = annotations - project_gems if expired.empty? @@ -67,7 +71,7 @@ def remove_expired_annotations(project_gems) say("\n") expired.each do |gem_name| say("\n") - path = "#{DEFAULT_ANNOTATIONS_DIR}/#{gem_name}.rbi" + path = @outpath.join("#{gem_name}.rbi") remove_file(path) end say("\nDone\n\n", :green) @@ -140,10 +144,8 @@ def fetch_annotation(repo_uris, gem_name) content = apply_typed_override(gem_name, content) content = add_header(gem_name, content) - dir = DEFAULT_ANNOTATIONS_DIR - FileUtils.mkdir_p(dir) say("\n Fetched #{set_color(gem_name, :yellow, :bold)}", :green) - create_file("#{dir}/#{gem_name}.rbi", content) + create_file(@outpath.join("#{gem_name}.rbi"), content) end sig { params(repo_uri: String, path: String).returns(T.nilable(String)) } diff --git a/lib/tapioca/commands/dsl_generate.rb b/lib/tapioca/commands/dsl_generate.rb index 551c1c26e..ef1762666 100644 --- a/lib/tapioca/commands/dsl_generate.rb +++ b/lib/tapioca/commands/dsl_generate.rb @@ -32,6 +32,8 @@ def execute say("All operations performed in working directory.", [:green, :bold]) say("Please review changes and commit them.", [:green, :bold]) + ensure + GitAttributes.create_generated_attribute_file(@outpath) end end end diff --git a/lib/tapioca/commands/gem_generate.rb b/lib/tapioca/commands/gem_generate.rb index 181255eaf..bd1c740a7 100644 --- a/lib/tapioca/commands/gem_generate.rb +++ b/lib/tapioca/commands/gem_generate.rb @@ -43,6 +43,8 @@ def execute else say("No operations performed, all RBIs are up-to-date.", [:green, :bold]) end + ensure + GitAttributes.create_generated_attribute_file(@outpath) end end end diff --git a/lib/tapioca/commands/gem_sync.rb b/lib/tapioca/commands/gem_sync.rb index 5ecf47b23..81392effa 100644 --- a/lib/tapioca/commands/gem_sync.rb +++ b/lib/tapioca/commands/gem_sync.rb @@ -29,6 +29,8 @@ def execute end puts + ensure + GitAttributes.create_generated_attribute_file(@outpath) end end end diff --git a/lib/tapioca/dsl/compiler.rb b/lib/tapioca/dsl/compiler.rb index bee90166a..0eeed02e6 100644 --- a/lib/tapioca/dsl/compiler.rb +++ b/lib/tapioca/dsl/compiler.rb @@ -36,7 +36,7 @@ def gather_constants; end sig { returns(T::Set[Module]) } def processable_constants @processable_constants ||= T.let( - T::Set[Module].new(gather_constants).compare_by_identity, + T::Set[Module].new.compare_by_identity.merge(gather_constants), T.nilable(T::Set[Module]), ) end diff --git a/lib/tapioca/dsl/compilers/aasm.rb b/lib/tapioca/dsl/compilers/aasm.rb index 22d460732..23fcced5f 100644 --- a/lib/tapioca/dsl/compilers/aasm.rb +++ b/lib/tapioca/dsl/compilers/aasm.rb @@ -1,12 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "active_record" - require "aasm" -rescue LoadError - return -end +return unless defined?(AASM) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/action_controller_helpers.rb b/lib/tapioca/dsl/compilers/action_controller_helpers.rb index 952b3d985..03f91049a 100644 --- a/lib/tapioca/dsl/compilers/action_controller_helpers.rb +++ b/lib/tapioca/dsl/compilers/action_controller_helpers.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "action_controller" -rescue LoadError - return -end +return unless defined?(ActionController::Base) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/action_mailer.rb b/lib/tapioca/dsl/compilers/action_mailer.rb index 3f4f9c6e7..18ceda4e6 100644 --- a/lib/tapioca/dsl/compilers/action_mailer.rb +++ b/lib/tapioca/dsl/compilers/action_mailer.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "action_mailer" -rescue LoadError - return -end +return unless defined?(ActionMailer::Base) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/action_text.rb b/lib/tapioca/dsl/compilers/action_text.rb new file mode 100644 index 000000000..b27f5c017 --- /dev/null +++ b/lib/tapioca/dsl/compilers/action_text.rb @@ -0,0 +1,96 @@ +# typed: strict +# frozen_string_literal: true + +return unless defined?(ActiveRecord::Base) + +module Tapioca + module Dsl + module Compilers + # `Tapioca::Dsl::Compilers::ActionText` decorates RBI files for subclasses of + # `ActiveRecord::Base` that declare [has_rich_text](https://edgeguides.rubyonrails.org/action_text_overview.html#creating-rich-text-content) + # + # For example, with the following `ActiveRecord::Base` subclass: + # + # ~~~rb + # class Post < ApplicationRecord + # has_rich_text :body + # has_rich_text :title, encrypted: true + # end + # ~~~ + # + # this compiler will produce the RBI file `post.rbi` with the following content: + # + # ~~~rbi + # # typed: strong + # + # class Post + # sig { returns(ActionText::RichText) } + # def body; end + # + # sig { params(value: T.nilable(T.any(ActionText::RichText, String))).returns(T.untyped) } + # def body=(value); end + # + # sig { returns(T::Boolean) } + # def body?; end + # + # sig { returns(ActionText::EncryptedRichText) } + # def title; end + # + # sig { params(value: T.nilable(T.any(ActionText::EncryptedRichText, String))).returns(T.untyped) } + # def title=(value); end + # + # sig { returns(T::Boolean) } + # def title?; end + # end + # ~~~ + class ActionText < Compiler + extend T::Sig + + ConstantType = type_member { { fixed: T.class_of(::ActiveRecord::Base) } } + + sig { override.void } + def decorate + root.create_path(constant) do |scope| + self.class.action_text_associations(constant).each do |name| + reflection = constant.reflections.fetch(name) + type = reflection.options.fetch(:class_name) + name = reflection.name.to_s.sub("rich_text_", "") + scope.create_method( + name, + return_type: type, + ) + scope.create_method( + "#{name}?", + return_type: "T::Boolean", + ) + scope.create_method( + "#{name}=", + parameters: [create_param("value", type: "T.nilable(T.any(#{type}, String))")], + return_type: "T.untyped", + ) + end + end + end + + class << self + extend T::Sig + + sig { params(constant: T.class_of(::ActiveRecord::Base)).returns(T::Array[String]) } + def action_text_associations(constant) + # Implementation copied from https://github.com/rails/rails/blob/31052d0e518b9da103eea2f79d250242ed1e3705/actiontext/lib/action_text/attribute.rb#L66 + constant.reflect_on_all_associations(:has_one) + .map(&:name).map(&:to_s) + .select { |n| n.start_with?("rich_text_") } + end + + sig { override.returns(T::Enumerable[Module]) } + def gather_constants + descendants_of(::ActiveRecord::Base) + .reject(&:abstract_class?) + .select { |c| action_text_associations(c).any? } + end + end + end + end + end +end diff --git a/lib/tapioca/dsl/compilers/active_job.rb b/lib/tapioca/dsl/compilers/active_job.rb index 483484ac2..93ec970cc 100644 --- a/lib/tapioca/dsl/compilers/active_job.rb +++ b/lib/tapioca/dsl/compilers/active_job.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "active_job" -rescue LoadError - return -end +return unless defined?(ActiveJob::Base) module Tapioca module Dsl @@ -30,8 +26,13 @@ module Compilers # # notify_user_job.rbi # # typed: true # class NotifyUserJob - # sig { params(user: User).returns(T.any(NotifyUserJob, FalseClass)) } - # def self.perform_later(user); end + # sig do + # params( + # user: User, + # block: T.nilable(T.proc.params(job: NotifyUserJob).void), + # ).returns(T.any(NotifyUserJob, FalseClass)) + # end + # def self.perform_later(user, &block); end # # sig { params(user: User).returns(Mail) } # def self.perform_now(user); end @@ -48,13 +49,14 @@ def decorate root.create_path(constant) do |job| method = constant.instance_method(:perform) + constant_name = name_of(constant) parameters = compile_method_parameters_to_rbi(method) return_type = compile_method_return_type_to_rbi(method) job.create_method( "perform_later", - parameters: parameters, - return_type: "T.any(#{name_of(constant)}, FalseClass)", + parameters: perform_later_parameters(parameters, constant_name), + return_type: "T.any(#{constant_name}, FalseClass)", class_method: true, ) @@ -67,6 +69,26 @@ def decorate end end + private + + sig do + params( + parameters: T::Array[RBI::TypedParam], + constant_name: T.nilable(String), + ).returns(T::Array[RBI::TypedParam]) + end + def perform_later_parameters(parameters, constant_name) + if ::Gem::Requirement.new(">= 7.0").satisfied_by?(::ActiveJob.gem_version) + parameters.reject! { |typed_param| RBI::BlockParam === typed_param.param } + parameters + [create_block_param( + "block", + type: "T.nilable(T.proc.params(job: #{constant_name}).void)", + )] + else + parameters + end + end + class << self extend T::Sig diff --git a/lib/tapioca/dsl/compilers/active_model_attributes.rb b/lib/tapioca/dsl/compilers/active_model_attributes.rb index b7df992df..58582507c 100644 --- a/lib/tapioca/dsl/compilers/active_model_attributes.rb +++ b/lib/tapioca/dsl/compilers/active_model_attributes.rb @@ -1,11 +1,9 @@ # typed: strict # frozen_string_literal: true -begin - require "active_model" -rescue LoadError - return -end +return unless defined?(ActiveModel::Attributes) + +require "tapioca/dsl/helpers/active_model_type_helper" module Tapioca module Dsl @@ -72,9 +70,9 @@ def gather_constants def attribute_methods_for_constant patterns = if constant.respond_to?(:attribute_method_patterns) # https://github.com/rails/rails/pull/44367 - T.unsafe(constant).attribute_method_patterns + constant.attribute_method_patterns else - constant.attribute_method_matchers + T.unsafe(constant).attribute_method_matchers end patterns.flat_map do |pattern| constant.attribute_types.filter_map do |name, value| @@ -101,7 +99,7 @@ def handle_method_pattern?(pattern) HANDLED_METHOD_TARGETS.include?(target.to_s) end - sig { params(attribute_type_value: ::ActiveModel::Type::Value).returns(::String) } + sig { params(attribute_type_value: T.untyped).returns(::String) } def type_for(attribute_type_value) type = case attribute_type_value when ActiveModel::Type::Boolean @@ -119,8 +117,7 @@ def type_for(attribute_type_value) when ActiveModel::Type::String "::String" else - # we don't want untyped to be wrapped by T.nilable, so just return early - return "T.untyped" + Helpers::ActiveModelTypeHelper.type_for(attribute_type_value) end as_nilable_type(type) diff --git a/lib/tapioca/dsl/compilers/active_model_secure_password.rb b/lib/tapioca/dsl/compilers/active_model_secure_password.rb index 75cf3d372..d7618e07d 100644 --- a/lib/tapioca/dsl/compilers/active_model_secure_password.rb +++ b/lib/tapioca/dsl/compilers/active_model_secure_password.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "active_model" -rescue LoadError - return -end +return unless defined?(ActiveModel::SecurePassword) module Tapioca module Dsl @@ -82,7 +78,15 @@ def decorate root.create_path(constant) do |klass| methods.each do |method| - create_method_from_def(klass, constant.instance_method(method)) + if method == :authenticate || method.start_with?("authenticate_") + klass.create_method( + method.to_s, + parameters: [create_param("unencrypted_password", type: "T.untyped")], + return_type: "T.any(#{constant}, FalseClass)", + ) + else + create_method_from_def(klass, constant.instance_method(method)) + end end end end diff --git a/lib/tapioca/dsl/compilers/active_model_validations_confirmation.rb b/lib/tapioca/dsl/compilers/active_model_validations_confirmation.rb new file mode 100644 index 000000000..5b58dfaad --- /dev/null +++ b/lib/tapioca/dsl/compilers/active_model_validations_confirmation.rb @@ -0,0 +1,90 @@ +# typed: strict +# frozen_string_literal: true + +return unless defined?(ActiveModel::Validations) + +module Tapioca + module Dsl + module Compilers + # `Tapioca::Dsl::Compilers::ActiveModelValidationsConfirmation` decorates RBI files for all + # classes that use [`ActiveModel::Validates::Confirmation`](https://api.rubyonrails.org/classes/ActiveModel/Validations/HelperMethods.html#method-i-validates_confirmation_of). + # + # For example, with the following class: + # + # ~~~rb + # class User + # include ActiveModel::Validations + # + # validates_confirmation_of :password + # + # validates :email, confirmation: true + # end + # ~~~ + # + # this compiler will produce an RBI file with the following content: + # ~~~rbi + # # typed: true + # + # class User + # + # sig { returns(T.untyped) } + # def email_confirmation; end + # + # sig { params(email_confirmation=: T.untyped).returns(T.untyped) } + # def email_confirmation=(email_confirmation); end + # + # sig { returns(T.untyped) } + # def password_confirmation; end + # + # sig { params(password_confirmation=: T.untyped).returns(T.untyped) } + # def password_confirmation=(password_confirmation); end + # end + # ~~~ + class ActiveModelValidationsConfirmation < Compiler + extend T::Sig + + ConstantType = type_member do + { + fixed: T.all( + T::Class[ActiveModel::Validations], + ActiveModel::Validations::HelperMethods, + ActiveModel::Validations::ClassMethods, + ), + } + end + + class << self + sig { override.returns(T::Enumerable[Module]) } + def gather_constants + # Collect all the classes that include ActiveModel::Validations + all_classes.select do |c| + c < ActiveModel::Validations + end + end + end + + sig { override.void } + def decorate + confirmation_validators = constant.validators.grep(ActiveModel::Validations::ConfirmationValidator) + + return if confirmation_validators.empty? + + # Create a RBI definition for each class that includes Active::Model::Validations + root.create_path(constant) do |klass| + # Create RBI definitions for all the attributes that use confirmation validation + confirmation_validators.each do |validator| + validator.attributes.each do |attr_name| + klass.create_method("#{attr_name}_confirmation", return_type: "T.untyped") + klass.create_method( + "#{attr_name}_confirmation=", + parameters: [create_param("#{attr_name}_confirmation", type: "T.untyped")], + return_type: "T.untyped", + ) + end + end + end + end + end + end + end +end diff --git a/lib/tapioca/dsl/compilers/active_record_associations.rb b/lib/tapioca/dsl/compilers/active_record_associations.rb index d401d4d2f..9cf1b9a98 100644 --- a/lib/tapioca/dsl/compilers/active_record_associations.rb +++ b/lib/tapioca/dsl/compilers/active_record_associations.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "active_record" -rescue LoadError - return -end +return unless defined?(ActiveRecord::Base) require "tapioca/dsl/helpers/active_record_constants_helper" diff --git a/lib/tapioca/dsl/compilers/active_record_columns.rb b/lib/tapioca/dsl/compilers/active_record_columns.rb index 5cd373e3a..084cb25d3 100644 --- a/lib/tapioca/dsl/compilers/active_record_columns.rb +++ b/lib/tapioca/dsl/compilers/active_record_columns.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "active_record" -rescue LoadError - return -end +return unless defined?(ActiveRecord::Base) require "tapioca/dsl/helpers/active_record_column_type_helper" require "tapioca/dsl/helpers/active_record_constants_helper" @@ -108,10 +104,15 @@ class ActiveRecordColumns < Compiler def decorate return unless constant.table_exists? + # We need to call this to ensure that some attribute aliases are defined, e.g. + # `id_value` as an alias for `id`. + # I think this is a regression on Rails 7.1, but we are where we are. + constant.define_attribute_methods + root.create_path(constant) do |model| model.create_module(AttributeMethodsModuleName) do |mod| - constant.attribute_names.each do |column_name| - add_methods_for_attribute(mod, column_name) + (constant.attribute_names + ["id"]).uniq.each do |attribute_name| + add_methods_for_attribute(mod, attribute_name) end constant.attribute_aliases.each do |attribute_name, column_name| @@ -119,15 +120,15 @@ def decorate column_name = column_name.to_s patterns = if constant.respond_to?(:attribute_method_patterns) # https://github.com/rails/rails/pull/44367 - T.unsafe(constant).attribute_method_patterns + constant.attribute_method_patterns else - constant.attribute_method_matchers + T.unsafe(constant).attribute_method_matchers end new_method_names = patterns.map { |m| m.method_name(attribute_name) } old_method_names = patterns.map { |m| m.method_name(column_name) } methods_to_add = new_method_names - old_method_names - add_methods_for_attribute(mod, column_name, attribute_name, methods_to_add) + add_methods_for_attribute(mod, attribute_name, column_name, methods_to_add) end end @@ -166,13 +167,15 @@ def add_method(klass, name, methods_to_add, return_type: "void", parameters: []) sig do params( klass: RBI::Scope, - column_name: String, attribute_name: String, + column_name: String, methods_to_add: T.nilable(T::Array[String]), ).void end - def add_methods_for_attribute(klass, column_name, attribute_name = column_name, methods_to_add = nil) - getter_type, setter_type = Helpers::ActiveRecordColumnTypeHelper.new(constant).type_for(column_name) + def add_methods_for_attribute(klass, attribute_name, column_name = attribute_name, methods_to_add = nil) + getter_type, setter_type = Helpers::ActiveRecordColumnTypeHelper + .new(constant) + .type_for(attribute_name, column_name) # Added by ActiveRecord::AttributeMethods::Read # diff --git a/lib/tapioca/dsl/compilers/active_record_delegated_types.rb b/lib/tapioca/dsl/compilers/active_record_delegated_types.rb index a48e5b2d7..37e578037 100644 --- a/lib/tapioca/dsl/compilers/active_record_delegated_types.rb +++ b/lib/tapioca/dsl/compilers/active_record_delegated_types.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "active_record" -rescue LoadError - return -end +return unless defined?(ActiveRecord::Base) require "tapioca/dsl/helpers/active_record_column_type_helper" require "tapioca/dsl/helpers/active_record_constants_helper" @@ -110,11 +106,10 @@ def populate_role_accessors(mod, role, types) return_type: "ActiveSupport::StringInquirer", ) - return_type = sorbet_supports?(:generic_class) ? "T::Class[T.anything]" : "Class" mod.create_method( "#{role}_class", parameters: [], - return_type: return_type, + return_type: "T::Class[T.anything]", ) mod.create_method( diff --git a/lib/tapioca/dsl/compilers/active_record_enum.rb b/lib/tapioca/dsl/compilers/active_record_enum.rb index 841427816..cf800f70f 100644 --- a/lib/tapioca/dsl/compilers/active_record_enum.rb +++ b/lib/tapioca/dsl/compilers/active_record_enum.rb @@ -1,13 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "active_record" -rescue LoadError - # means ActiveRecord is not installed, - # so let's not even define the compiler. - return -end +return unless defined?(ActiveRecord::Base) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/active_record_fixtures.rb b/lib/tapioca/dsl/compilers/active_record_fixtures.rb index 7fd03b005..82407ce70 100644 --- a/lib/tapioca/dsl/compilers/active_record_fixtures.rb +++ b/lib/tapioca/dsl/compilers/active_record_fixtures.rb @@ -1,14 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "rails" - require "active_record" - require "active_record/fixtures" - require "active_support/test_case" -rescue LoadError - return -end +return unless defined?(Rails) && defined?(ActiveSupport::TestCase) && defined?(ActiveRecord::TestFixtures) module Tapioca module Dsl @@ -62,7 +55,7 @@ class << self sig { override.returns(T::Enumerable[Module]) } def gather_constants - return [] unless Rails.application + return [] unless defined?(Rails.application) && Rails.application [ActiveSupport::TestCase] end @@ -73,20 +66,22 @@ def gather_constants sig { returns(T::Class[ActiveRecord::TestFixtures]) } def fixture_loader @fixture_loader ||= T.let( - T.cast( - Class.new do - T.unsafe(self).include(ActiveRecord::TestFixtures) + Class.new do + T.unsafe(self).include(ActiveRecord::TestFixtures) + if respond_to?(:fixture_paths=) + T.unsafe(self).fixture_paths = [Rails.root.join("test", "fixtures")] + else T.unsafe(self).fixture_path = Rails.root.join("test", "fixtures") - # https://github.com/rails/rails/blob/7c70791470fc517deb7c640bead9f1b47efb5539/activerecord/lib/active_record/test_fixtures.rb#L46 - singleton_class.define_method(:file_fixture_path) do - Rails.root.join("test", "fixtures", "files") - end - - T.unsafe(self).fixtures(:all) - end, - T::Class[ActiveRecord::TestFixtures], - ), + end + + # https://github.com/rails/rails/blob/7c70791470fc517deb7c640bead9f1b47efb5539/activerecord/lib/active_record/test_fixtures.rb#L46 + singleton_class.define_method(:file_fixture_path) do + Rails.root.join("test", "fixtures", "files") + end + + T.unsafe(self).fixtures(:all) + end, T.nilable(T::Class[ActiveRecord::TestFixtures]), ) end diff --git a/lib/tapioca/dsl/compilers/active_record_relations.rb b/lib/tapioca/dsl/compilers/active_record_relations.rb index a7d273508..eedec3a88 100644 --- a/lib/tapioca/dsl/compilers/active_record_relations.rb +++ b/lib/tapioca/dsl/compilers/active_record_relations.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "active_record" -rescue LoadError - return -end +return unless defined?(ActiveRecord::Base) require "tapioca/dsl/helpers/active_record_constants_helper" @@ -62,16 +58,6 @@ module Compilers # `Model::PrivateRelation` modules, so that, for example, `find_by` and `all` can be chained off of the # `Model` class. # - # **A note on find**: `find` is typed as `T.untyped` by default. - # - # While it is often used in the manner of `Model.find(id)`, Rails does support pasing in an array to find, which - # would then return a `T::Enumerable[Model]`. This would force a static cast everywhere find is used to avoid type - # errors. This is not ideal considering very few users of find use the array syntax over a where. With untyped, - # this cast is optional and so it was decided to avoid typing it. If you need runtime guarentees when using `find` - # the best method of doing so is by casting the return value to the model: `T.cast(Model.find(id), Model)`. - # `find_by` does guarentee a return value of `Model`, so find can can be refactored accordingly: - # `Model.find_by!(id: id)`. This will avoid the cast requirement at runtime. - # # **CAUTION**: The generated relation classes are named `PrivateXXX` intentionally to reflect the fact # that they represent private subconstants of the Active Record model. As such, these types do not # exist at runtime, and their counterparts that do exist at runtime are marked `private_constant` anyway. @@ -126,6 +112,9 @@ module Compilers # include GeneratedAssociationRelationMethods # # sig { returns(T::Array[::Post]) } + # def to_a; end + # + # sig { returns(T::Array[::Post]) } # def to_ary; end # # Elem = type_member { { fixed: ::Post } } @@ -149,6 +138,9 @@ module Compilers # include GeneratedRelationMethods # # sig { returns(T::Array[::Post]) } + # def to_a; end + # + # sig { returns(T::Array[::Post]) } # def to_ary; end # # Elem = type_member { { fixed: ::Post } } @@ -198,6 +190,8 @@ def gather_constants query_methods |= ActiveRecord::SpawnMethods.instance_methods(false) # Remove the ones we know are private API query_methods -= [:arel, :build_subquery, :construct_join_dependency, :extensions, :spawn] + # Remove "group" which needs a custom return type for GroupChains + query_methods -= [:group] # Remove "where" which needs a custom return type for WhereChains query_methods -= [:where] # Remove the methods that ... @@ -226,6 +220,7 @@ def gather_constants T::Array[Symbol], ) BUILDER_METHODS = T.let([:new, :build, :create, :create!], T::Array[Symbol]) + TO_ARRAY_METHODS = T.let([:to_ary, :to_a], T::Array[Symbol]) private @@ -296,9 +291,12 @@ def create_relation_class klass.create_include(RelationMethodsModuleName) klass.create_type_variable("Elem", type: "type_member", fixed: constant_name) - klass.create_method("to_ary", return_type: "T::Array[#{constant_name}]") + TO_ARRAY_METHODS.each do |method_name| + klass.create_method(method_name.to_s, return_type: "T::Array[#{constant_name}]") + end end + create_relation_group_chain_class create_relation_where_chain_class end @@ -312,12 +310,92 @@ def create_association_relation_class klass.create_include(AssociationRelationMethodsModuleName) klass.create_type_variable("Elem", type: "type_member", fixed: constant_name) - klass.create_method("to_ary", return_type: "T::Array[#{constant_name}]") + TO_ARRAY_METHODS.each do |method_name| + klass.create_method(method_name.to_s, return_type: "T::Array[#{constant_name}]") + end end + create_association_relation_group_chain_class create_association_relation_where_chain_class end + sig { void } + def create_relation_group_chain_class + model.create_class(RelationGroupChainClassName, superclass_name: RelationClassName) do |klass| + create_group_chain_methods(klass) + klass.create_type_variable("Elem", type: "type_member", fixed: constant_name) + end + end + + sig { void } + def create_association_relation_group_chain_class + model.create_class( + AssociationRelationGroupChainClassName, + superclass_name: AssociationRelationClassName, + ) do |klass| + create_group_chain_methods(klass) + klass.create_type_variable("Elem", type: "type_member", fixed: constant_name) + end + end + + sig { params(klass: RBI::Scope).void } + def create_group_chain_methods(klass) + # Calculation methods used with `group` return a hash where the keys cannot be typed + # but the values can. Technically a `group` anywhere in the query chain produces + # this behavior but to avoid needing to re-type every query method inside this module + # we make a simplifying assumption that the calculation method is called immediately + # after the group (e.g. `group().count` and not `group().where().count`). The one + # exception is `group().having().count` which is fairly idiomatic so that gets handled + # without breaking the chain. + klass.create_method( + "having", + parameters: [ + create_rest_param("args", type: "T.untyped"), + create_block_param("blk", type: "T.untyped"), + ], + return_type: "T.self_type", + ) + + CALCULATION_METHODS.each do |method_name| + case method_name + when :average, :maximum, :minimum + klass.create_method( + method_name.to_s, + parameters: [ + create_param("column_name", type: "T.any(String, Symbol)"), + ], + return_type: "T::Hash[T.untyped, #{method_name == :average ? "Numeric" : "T.untyped"}]", + ) + when :calculate + klass.create_method( + "calculate", + parameters: [ + create_param("operation", type: "Symbol"), + create_param("column_name", type: "T.any(String, Symbol)"), + ], + return_type: "T::Hash[T.untyped, Numeric]", + ) + when :count + klass.create_method( + "count", + parameters: [ + create_opt_param("column_name", type: "T.untyped", default: "nil"), + ], + return_type: "T::Hash[T.untyped, Integer]", + ) + when :sum + klass.create_method( + "sum", + parameters: [ + create_opt_param("column_name", type: "T.nilable(T.any(String, Symbol))", default: "nil"), + create_block_param("block", type: "T.nilable(T.proc.params(record: T.untyped).returns(T.untyped))"), + ], + return_type: "T::Hash[T.untyped, Numeric]", + ) + end + end + end + sig { void } def create_relation_where_chain_class model.create_class(RelationWhereChainClassName, superclass_name: RelationClassName) do |klass| @@ -372,7 +450,9 @@ def create_collection_proxy_class klass.create_include(AssociationRelationMethodsModuleName) klass.create_type_variable("Elem", type: "type_member", fixed: constant_name) - klass.create_method("to_ary", return_type: "T::Array[#{constant_name}]") + TO_ARRAY_METHODS.each do |method_name| + klass.create_method(method_name.to_s, return_type: "T::Array[#{constant_name}]") + end create_collection_proxy_methods(klass) end end @@ -459,6 +539,15 @@ def create_collection_proxy_methods(klass) sig { void } def create_relation_methods create_relation_method("all") + create_relation_method( + "group", + parameters: [ + create_rest_param("args", type: "T.untyped"), + create_block_param("blk", type: "T.untyped"), + ], + relation_return_type: RelationGroupChainClassName, + association_return_type: AssociationRelationGroupChainClassName, + ) create_relation_method( "where", parameters: [ @@ -554,12 +643,29 @@ def create_common_methods return_type: "T::Boolean", ) when :find - create_common_method( + # From ActiveRecord::ConnectionAdapter::Quoting#quote, minus nil + id_types = "T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, " \ + "::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, " \ + "::ActiveSupport::Duration, T::Class[T.anything])" + array_type = if constant.try(:composite_primary_key?) + "T::Array[T::Array[#{id_types}]" + else + "T::Array[#{id_types}]" + end + sigs = [ + common_relation_methods_module.create_sig( + parameters: [create_param("args", type: id_types)], + return_type: constant_name, + ), + common_relation_methods_module.create_sig( + parameters: [create_param("args", type: array_type)], + return_type: "T::Enumerable[#{constant_name}]", + ), + ] + common_relation_methods_module.create_method_with_sigs( "find", - parameters: [ - create_rest_param("args", type: "T.untyped"), - ], - return_type: "T.untyped", + sigs: sigs, + parameters: [RBI::ReqParam.new("args")], ) when :find_by create_common_method( @@ -593,13 +699,22 @@ def create_common_methods return_type: constant_name, ) when :first, :last, :take - # skip - # create_common_method( + sigs = [ + common_relation_methods_module.create_sig( # method_name, - # parameters: [ + parameters: [create_opt_param("limit", type: "NilClass", default: "nil")], + return_type: as_nilable_type(constant_name), + ), + common_relation_methods_module.create_sig( + parameters: [create_param("limit", type: "Integer")], # create_opt_param("limit", type: "T.untyped", default: "nil"), - # ], - # return_type: "T.untyped", + return_type: "T::Array[#{constant_name}]", + ), + ] + common_relation_methods_module.create_method_with_sigs( + method_name.to_s, + sigs: sigs, + parameters: [RBI::OptParam.new("limit", "nil")], # ) when :raise_record_not_found_exception! # skip @@ -648,7 +763,7 @@ def create_common_methods parameters: [ create_param("column_name", type: "T.any(String, Symbol)"), ], - return_type: "T.untyped", + return_type: method_name == :average ? "Numeric" : "T.untyped", ) when :calculate create_common_method( @@ -657,7 +772,7 @@ def create_common_methods create_param("operation", type: "Symbol"), create_param("column_name", type: "T.any(String, Symbol)"), ], - return_type: "T.untyped", + return_type: "Numeric", ) when :count create_common_method( @@ -665,7 +780,7 @@ def create_common_methods parameters: [ create_opt_param("column_name", type: "T.untyped", default: "nil"), ], - return_type: "T.untyped", + return_type: "Integer", ) when :ids create_common_method("ids", return_type: "Array") @@ -684,7 +799,7 @@ def create_common_methods create_opt_param("column_name", type: "T.nilable(T.any(String, Symbol))", default: "nil"), create_block_param("block", type: "T.nilable(T.proc.params(record: T.untyped).returns(T.untyped))"), ], - return_type: "T.untyped", + return_type: "Numeric", ) end end @@ -693,51 +808,121 @@ def create_common_methods case method_name when :find_each order = ActiveRecord::Batches.instance_method(:find_each).parameters.include?([:key, :order]) - create_common_method( + sigs = [ + common_relation_methods_module.create_sig( + parameters: [ + create_kw_opt_param("start", type: "T.untyped", default: "nil"), + create_kw_opt_param("finish", type: "T.untyped", default: "nil"), + create_kw_opt_param("batch_size", type: "Integer", default: "1000"), + create_kw_opt_param("error_on_ignore", type: "T.untyped", default: "nil"), + *(create_kw_opt_param("order", type: "Symbol", default: ":asc") if order), + create_block_param("block", type: "T.proc.params(object: #{constant_name}).void"), + ], + return_type: "void", + ), + common_relation_methods_module.create_sig( + parameters: [ + create_kw_opt_param("start", type: "T.untyped", default: "nil"), + create_kw_opt_param("finish", type: "T.untyped", default: "nil"), + create_kw_opt_param("batch_size", type: "Integer", default: "1000"), + create_kw_opt_param("error_on_ignore", type: "T.untyped", default: "nil"), + *(create_kw_opt_param("order", type: "Symbol", default: ":asc") if order), + ], + return_type: "T::Enumerator[#{constant_name}]", + ), + ] + common_relation_methods_module.create_method_with_sigs( "find_each", + sigs: sigs, parameters: [ - create_kw_opt_param("start", type: "T.untyped", default: "nil"), - create_kw_opt_param("finish", type: "T.untyped", default: "nil"), - create_kw_opt_param("batch_size", type: "Integer", default: "1000"), - create_kw_opt_param("error_on_ignore", type: "T.untyped", default: "nil"), - *(create_kw_opt_param("order", type: "Symbol", default: ":asc") if order), - create_block_param("block", type: "T.nilable(T.proc.params(object: #{constant_name}).void)"), + RBI::KwOptParam.new("start", "nil"), + RBI::KwOptParam.new("finish", "nil"), + RBI::KwOptParam.new("batch_size", "1000"), + RBI::KwOptParam.new("error_on_ignore", "nil"), + *(RBI::KwOptParam.new("order", ":asc") if order), + RBI::BlockParam.new("block"), ], - return_type: "T.nilable(T::Enumerator[#{constant_name}])", ) when :find_in_batches order = ActiveRecord::Batches.instance_method(:find_in_batches).parameters.include?([:key, :order]) - create_common_method( + sigs = [ + common_relation_methods_module.create_sig( + parameters: [ + create_kw_opt_param("start", type: "T.untyped", default: "nil"), + create_kw_opt_param("finish", type: "T.untyped", default: "nil"), + create_kw_opt_param("batch_size", type: "Integer", default: "1000"), + create_kw_opt_param("error_on_ignore", type: "T.untyped", default: "nil"), + *(create_kw_opt_param("order", type: "Symbol", default: ":asc") if order), + create_block_param("block", type: "T.proc.params(object: T::Array[#{constant_name}]).void"), + ], + return_type: "void", + ), + common_relation_methods_module.create_sig( + parameters: [ + create_kw_opt_param("start", type: "T.untyped", default: "nil"), + create_kw_opt_param("finish", type: "T.untyped", default: "nil"), + create_kw_opt_param("batch_size", type: "Integer", default: "1000"), + create_kw_opt_param("error_on_ignore", type: "T.untyped", default: "nil"), + *(create_kw_opt_param("order", type: "Symbol", default: ":asc") if order), + ], + return_type: "T::Enumerator[T::Enumerator[#{constant_name}]]", + ), + ] + common_relation_methods_module.create_method_with_sigs( "find_in_batches", + sigs: sigs, parameters: [ - create_kw_opt_param("start", type: "T.untyped", default: "nil"), - create_kw_opt_param("finish", type: "T.untyped", default: "nil"), - create_kw_opt_param("batch_size", type: "Integer", default: "1000"), - create_kw_opt_param("error_on_ignore", type: "T.untyped", default: "nil"), - *(create_kw_opt_param("order", type: "Symbol", default: ":asc") if order), - create_block_param( - "block", - type: "T.nilable(T.proc.params(object: T::Array[#{constant_name}]).void)", - ), + RBI::KwOptParam.new("start", "nil"), + RBI::KwOptParam.new("finish", "nil"), + RBI::KwOptParam.new("batch_size", "1000"), + RBI::KwOptParam.new("error_on_ignore", "nil"), + *(RBI::KwOptParam.new("order", ":asc") if order), + RBI::BlockParam.new("block"), ], - return_type: "T.nilable(T::Enumerator[T::Enumerator[#{constant_name}]])", ) when :in_batches order = ActiveRecord::Batches.instance_method(:in_batches).parameters.include?([:key, :order]) use_ranges = ActiveRecord::Batches.instance_method(:in_batches).parameters.include?([:key, :use_ranges]) - create_common_method( + sigs = [ + common_relation_methods_module.create_sig( + parameters: [ + create_kw_opt_param("of", type: "Integer", default: "1000"), + create_kw_opt_param("start", type: "T.untyped", default: "nil"), + create_kw_opt_param("finish", type: "T.untyped", default: "nil"), + create_kw_opt_param("load", type: "T.untyped", default: "false"), + create_kw_opt_param("error_on_ignore", type: "T.untyped", default: "nil"), + *(create_kw_opt_param("order", type: "Symbol", default: ":asc") if order), + *(create_kw_opt_param("use_ranges", type: "T.untyped", default: "nil") if use_ranges), + create_block_param("block", type: "T.proc.params(object: #{RelationClassName}).void"), + ], + return_type: "void", + ), + common_relation_methods_module.create_sig( + parameters: [ + create_kw_opt_param("of", type: "Integer", default: "1000"), + create_kw_opt_param("start", type: "T.untyped", default: "nil"), + create_kw_opt_param("finish", type: "T.untyped", default: "nil"), + create_kw_opt_param("load", type: "T.untyped", default: "false"), + create_kw_opt_param("error_on_ignore", type: "T.untyped", default: "nil"), + *(create_kw_opt_param("order", type: "Symbol", default: ":asc") if order), + *(create_kw_opt_param("use_ranges", type: "T.untyped", default: "nil") if use_ranges), + ], + return_type: "::ActiveRecord::Batches::BatchEnumerator", + ), + ] + common_relation_methods_module.create_method_with_sigs( "in_batches", + sigs: sigs, parameters: [ - create_kw_opt_param("of", type: "Integer", default: "1000"), - create_kw_opt_param("start", type: "T.untyped", default: "nil"), - create_kw_opt_param("finish", type: "T.untyped", default: "nil"), - create_kw_opt_param("load", type: "T.untyped", default: "false"), - create_kw_opt_param("error_on_ignore", type: "T.untyped", default: "nil"), - *(create_kw_opt_param("order", type: "Symbol", default: ":asc") if order), - *(create_kw_opt_param("use_ranges", type: "T.untyped", default: "nil") if use_ranges), - create_block_param("block", type: "T.nilable(T.proc.params(object: #{RelationClassName}).void)"), + RBI::KwOptParam.new("of", "1000"), + RBI::KwOptParam.new("start", "nil"), + RBI::KwOptParam.new("finish", "nil"), + RBI::KwOptParam.new("load", "false"), + RBI::KwOptParam.new("error_on_ignore", "nil"), + *(RBI::KwOptParam.new("order", ":asc") if order), + *(RBI::KwOptParam.new("use_ranges", "nil") if use_ranges), + RBI::BlockParam.new("block"), ], - return_type: "T.nilable(::ActiveRecord::Batches::BatchEnumerator)", ) end end diff --git a/lib/tapioca/dsl/compilers/active_record_scope.rb b/lib/tapioca/dsl/compilers/active_record_scope.rb index 0b834699a..3319dc254 100644 --- a/lib/tapioca/dsl/compilers/active_record_scope.rb +++ b/lib/tapioca/dsl/compilers/active_record_scope.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "active_record" -rescue LoadError - return -end +return unless defined?(ActiveRecord::Base) require "tapioca/dsl/helpers/active_record_constants_helper" diff --git a/lib/tapioca/dsl/compilers/active_record_secure_token.rb b/lib/tapioca/dsl/compilers/active_record_secure_token.rb index 14c27c589..5d50e4e23 100644 --- a/lib/tapioca/dsl/compilers/active_record_secure_token.rb +++ b/lib/tapioca/dsl/compilers/active_record_secure_token.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "active_record" -rescue LoadError - return -end +return unless defined?(ActiveRecord::Base) require "tapioca/dsl/helpers/active_record_constants_helper" diff --git a/lib/tapioca/dsl/compilers/active_record_store.rb b/lib/tapioca/dsl/compilers/active_record_store.rb new file mode 100644 index 000000000..7a0edf109 --- /dev/null +++ b/lib/tapioca/dsl/compilers/active_record_store.rb @@ -0,0 +1,145 @@ +# typed: strict +# frozen_string_literal: true + +return unless defined?(ActiveRecord::Base) + +require "tapioca/dsl/helpers/active_record_constants_helper" + +module Tapioca + module Dsl + module Compilers + # `Tapioca::Dsl::Compilers::ActiveRecordStore` decorates RBI files for all + # classes that use [`ActiveRecord::Store`](https://api.rubyonrails.org/classes/ActiveRecord/Store.html). + # + # For example, with the following class: + # + # ~~~rb + # class User < ActiveRecord::Base + # store :settings, accessors: :theme + # store_accessor :settings, :power_source, prefix: :prefs + # end + # ~~~ + # + # this compiler will produce an RBI file with the following content: + # ~~~rbi + # # typed: true + # + # class User + # include GeneratedStoredAttributesMethods + # + # module GeneratedStoredAttributesMethods + # sig { returns(T.untyped) } + # def prefs_power_source; end + # + # sig { params(value: T.untyped).returns(T.untyped) } + # def prefs_power_source=(value); end + # + # sig { returns(T.untyped) } + # def prefs_power_source_before_last_save; end + # + # sig { returns(T.untyped) } + # def prefs_power_source_change; end + # + # sig { returns(T::Boolean) } + # def prefs_power_source_changed?; end + # + # sig { returns(T.untyped) } + # def prefs_power_source_was; end + # + # sig { returns(T.untyped) } + # def saved_change_to_prefs_power_source; end + # + # sig { returns(T::Boolean) } + # def saved_change_to_prefs_power_source?; end + # + # sig { returns(T.untyped) } + # def saved_change_to_theme; end + # + # sig { returns(T::Boolean) } + # def saved_change_to_theme?; end + # + # sig { returns(T.untyped) } + # def theme; end + # + # sig { params(value: T.untyped).returns(T.untyped) } + # def theme=(value); end + # + # sig { returns(T.untyped) } + # def theme_before_last_save; end + # + # sig { returns(T.untyped) } + # def theme_change; end + # + # sig { returns(T::Boolean) } + # def theme_changed?; end + # + # sig { returns(T.untyped) } + # def theme_was; end + # end + # end + # ~~~ + class ActiveRecordStore < Compiler + extend T::Sig + include Helpers::ActiveRecordConstantsHelper + + ConstantType = type_member { { fixed: T.all(T.class_of(ActiveRecord::Base), Extensions::ActiveRecord) } } + + sig { override.void } + def decorate + return if constant.__tapioca_stored_attributes.nil? + + root.create_path(constant) do |klass| + klass.create_module(StoredAttributesModuleName) do |mod| + constant.__tapioca_stored_attributes.each do |store_attribute, keys, prefix, suffix| + accessor_prefix = + case prefix + when String, Symbol + "#{prefix}_" + when TrueClass + "#{store_attribute}_" + else + "" + end + accessor_suffix = + case suffix + when String, Symbol + "_#{suffix}" + when TrueClass + "_#{store_attribute}" + else + "" + end + + keys.flatten.map { |key| "#{accessor_prefix}#{key}#{accessor_suffix}" }.each do |accessor_key| + mod.create_method( + "#{accessor_key}=", + parameters: [create_param("value", type: "T.untyped")], + return_type: "T.untyped", + ) + mod.create_method(accessor_key, return_type: "T.untyped") + mod.create_method("#{accessor_key}_changed?", return_type: "T::Boolean") + mod.create_method("#{accessor_key}_change", return_type: "T.untyped") + mod.create_method("#{accessor_key}_was", return_type: "T.untyped") + mod.create_method("saved_change_to_#{accessor_key}?", return_type: "T::Boolean") + mod.create_method("saved_change_to_#{accessor_key}", return_type: "T.untyped") + mod.create_method("#{accessor_key}_before_last_save", return_type: "T.untyped") + end + end + end + + klass.create_include(StoredAttributesModuleName) + end + end + + class << self + extend T::Sig + + sig { override.returns(T::Enumerable[Module]) } + def gather_constants + descendants_of(::ActiveRecord::Base).reject(&:abstract_class?) + end + end + end + end + end +end diff --git a/lib/tapioca/dsl/compilers/active_record_typed_store.rb b/lib/tapioca/dsl/compilers/active_record_typed_store.rb index 42bb03411..f98e440b0 100644 --- a/lib/tapioca/dsl/compilers/active_record_typed_store.rb +++ b/lib/tapioca/dsl/compilers/active_record_typed_store.rb @@ -1,13 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "activerecord-typedstore" -rescue LoadError - # means ActiveRecord::TypedStore is not installed, - # so let's not even define the compiler. - return -end +return unless defined?(ActiveRecord::Base) && defined?(ActiveRecord::TypedStore) module Tapioca module Dsl @@ -98,6 +92,9 @@ def decorate return if stores.values.all? { |store| store.accessors.empty? } root.create_path(constant) do |model| + store_accessors_module = model.create_module("StoreAccessors") + model.create_include("StoreAccessors") + stores.values.each do |store_data| store_data.accessors.each do |accessor, name| field = store_data.fields.fetch(accessor) @@ -105,9 +102,7 @@ def decorate type = as_nilable_type(type) if field.null name ||= field.name # support < 1.5.0 - store_accessors_module = model.create_module("StoreAccessors") generate_methods(store_accessors_module, name.to_s, type) - model.create_include("StoreAccessors") end end end diff --git a/lib/tapioca/dsl/compilers/active_resource.rb b/lib/tapioca/dsl/compilers/active_resource.rb index 060d01443..ffda0ab9b 100644 --- a/lib/tapioca/dsl/compilers/active_resource.rb +++ b/lib/tapioca/dsl/compilers/active_resource.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "active_resource" -rescue LoadError - return -end +return unless defined?(ActiveResource::Base) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/active_storage.rb b/lib/tapioca/dsl/compilers/active_storage.rb index 0119aa1d0..fb4e7fa5a 100644 --- a/lib/tapioca/dsl/compilers/active_storage.rb +++ b/lib/tapioca/dsl/compilers/active_storage.rb @@ -1,12 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "active_storage" - require "active_storage/reflection" -rescue LoadError - return -end +return unless defined?(ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/active_support_concern.rb b/lib/tapioca/dsl/compilers/active_support_concern.rb index 03fdf85bb..7f42ba6e5 100644 --- a/lib/tapioca/dsl/compilers/active_support_concern.rb +++ b/lib/tapioca/dsl/compilers/active_support_concern.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "active_support" -rescue LoadError - return -end +return unless defined?(ActiveSupport::Concern) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/active_support_current_attributes.rb b/lib/tapioca/dsl/compilers/active_support_current_attributes.rb index 419a464a8..a2519f553 100644 --- a/lib/tapioca/dsl/compilers/active_support_current_attributes.rb +++ b/lib/tapioca/dsl/compilers/active_support_current_attributes.rb @@ -1,13 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "active_support" - # The following is needed due to https://github.com/rails/rails/pull/41610 - require "active_support/core_ext/module/delegation" -rescue LoadError - return -end +return unless defined?(ActiveSupport::CurrentAttributes) module Tapioca module Dsl @@ -40,23 +34,29 @@ module Compilers # # typed: true # # class Current - # sig { returns(T.untyped) } - # def self.account; end + # include GeneratedAttributeMethods # - # sig { returns(T.untyped) } - # def account; end + # class << self + # sig { returns(T.untyped) } + # def account; end # - # sig { params(account: T.untyped).returns(T.untyped) } - # def self.account=(account); end + # sig { params(account: T.untyped).returns(T.untyped) } + # def account=(account); end # - # sig { params(account: T.untyped).returns(T.untyped) } - # def account=(account); end + # sig { params(user_id: Integer).void } + # def authenticate(user_id); end # - # sig { params(user_id: Integer).void } - # def self.authenticate(user_id); end + # sig { returns(T.untyped) } + # def helper; end + # end + # + # module GeneratedAttributeMethods + # sig { returns(T.untyped) } + # def account; end # - # sig { returns(T.untyped) } - # def self.helper; end + # sig { params(account: T.untyped).returns(T.untyped) } + # def account=(account); end + # end # end # ~~~ class ActiveSupportCurrentAttributes < Compiler @@ -71,20 +71,25 @@ def decorate return if dynamic_methods.empty? && instance_methods.empty? root.create_path(constant) do |current_attributes| - dynamic_methods.each do |method| - method = method.to_s - # We want to generate each method both on the class - generate_method(current_attributes, method, class_method: true) - # and on the instance - generate_method(current_attributes, method, class_method: false) - end + current_attributes_methods_name = "GeneratedAttributeMethods" + current_attributes.create_module(current_attributes_methods_name) do |generated_attribute_methods| + dynamic_methods.each do |method| + method = method.to_s + # We want to generate each method both on the class + generate_method(current_attributes, method, class_method: true) + # and on the instance + generate_method(generated_attribute_methods, method, class_method: false) + end - instance_methods.each do |method| - # instance methods are only elevated to class methods - # no need to add separate instance methods for them - method = constant.instance_method(method) - create_method_from_def(current_attributes, method, class_method: true) + instance_methods.each do |method| + # instance methods are only elevated to class methods + # no need to add separate instance methods for them + method = constant.instance_method(method) + create_method_from_def(current_attributes, method, class_method: true) + end end + + current_attributes.create_include(current_attributes_methods_name) end end @@ -111,17 +116,13 @@ def instance_methods_of_constant sig { params(klass: RBI::Scope, method: String, class_method: T::Boolean).void } def generate_method(klass, method, class_method:) - if method.end_with?("=") - parameter = create_param("value", type: "T.untyped") - klass.create_method( - method, - class_method: class_method, - parameters: [parameter], - return_type: "T.untyped", - ) + method_def = if class_method + constant.method(method) else - klass.create_method(method, class_method: class_method, return_type: "T.untyped") + constant.instance_method(method) end + + create_method_from_def(klass, method_def, class_method: class_method) end end end diff --git a/lib/tapioca/dsl/compilers/config.rb b/lib/tapioca/dsl/compilers/config.rb index 2f406fb11..17481f017 100644 --- a/lib/tapioca/dsl/compilers/config.rb +++ b/lib/tapioca/dsl/compilers/config.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "config" -rescue LoadError - return -end +return unless defined?(Config) && defined?(Config::VERSION) && defined?(Config.const_name) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/frozen_record.rb b/lib/tapioca/dsl/compilers/frozen_record.rb index 7f4585b24..57a7930d8 100644 --- a/lib/tapioca/dsl/compilers/frozen_record.rb +++ b/lib/tapioca/dsl/compilers/frozen_record.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "frozen_record" -rescue LoadError - return -end +return unless defined?(FrozenRecord::Base) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/graphql_input_object.rb b/lib/tapioca/dsl/compilers/graphql_input_object.rb index ad46ee8ba..a15a950b3 100644 --- a/lib/tapioca/dsl/compilers/graphql_input_object.rb +++ b/lib/tapioca/dsl/compilers/graphql_input_object.rb @@ -1,12 +1,8 @@ # typed: strict # frozen_string_literal: true -begin - gem("graphql", ">= 1.13") - require "graphql" -rescue LoadError - return -end +return unless defined?(GraphQL::Schema::InputObject) +return unless Gem::Requirement.new(">= 1.13").satisfied_by?(Gem::Version.new(GraphQL::VERSION)) require "tapioca/dsl/helpers/graphql_type_helper" @@ -55,7 +51,10 @@ def decorate root.create_path(constant) do |input_object| arguments.each do |argument| name = argument.keyword.to_s - input_object.create_method(name, return_type: Helpers::GraphqlTypeHelper.type_for(argument)) + input_object.create_method( + name, + return_type: Helpers::GraphqlTypeHelper.type_for_argument(argument, constant), + ) end end end diff --git a/lib/tapioca/dsl/compilers/graphql_mutation.rb b/lib/tapioca/dsl/compilers/graphql_mutation.rb index 2c6cb8344..f6b644fd2 100644 --- a/lib/tapioca/dsl/compilers/graphql_mutation.rb +++ b/lib/tapioca/dsl/compilers/graphql_mutation.rb @@ -1,12 +1,8 @@ # typed: strict # frozen_string_literal: true -begin - gem("graphql", ">= 1.13") - require "graphql" -rescue LoadError - return -end +return unless defined?(GraphQL::Schema::InputObject) +return unless Gem::Requirement.new(">= 1.13").satisfied_by?(Gem::Version.new(GraphQL::VERSION)) require "tapioca/dsl/helpers/graphql_type_helper" @@ -59,7 +55,7 @@ def decorate params = compile_method_parameters_to_rbi(method_def).map do |param| name = param.param.name argument = arguments_by_name.fetch(name, nil) - create_typed_param(param.param, argument_type(argument)) + create_typed_param(param.param, argument_type(argument, constant)) end root.create_path(constant) do |mutation| @@ -67,11 +63,16 @@ def decorate end end - sig { params(argument: T.nilable(GraphQL::Schema::Argument)).returns(String) } - def argument_type(argument) + sig do + params( + argument: T.nilable(GraphQL::Schema::Argument), + constant: T.class_of(GraphQL::Schema::Mutation), + ).returns(String) + end + def argument_type(argument, constant) return "T.untyped" unless argument - Helpers::GraphqlTypeHelper.type_for(argument) + Helpers::GraphqlTypeHelper.type_for_argument(argument, constant) end class << self diff --git a/lib/tapioca/dsl/compilers/identity_cache.rb b/lib/tapioca/dsl/compilers/identity_cache.rb index 3b04f9543..6b613f7a4 100644 --- a/lib/tapioca/dsl/compilers/identity_cache.rb +++ b/lib/tapioca/dsl/compilers/identity_cache.rb @@ -1,13 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "identity_cache" -rescue LoadError - # means IdentityCache is not installed, - # so let's not even define the compiler. - return -end +return unless defined?(ActiveRecord::Base) && defined?(IdentityCache::WithoutPrimaryIndex) require "tapioca/dsl/helpers/active_record_column_type_helper" @@ -224,7 +218,6 @@ def create_index_fetch_by_methods(field, klass) def create_aliased_fetch_by_methods(field, klass) type, _ = Helpers::ActiveRecordColumnTypeHelper.new(constant).type_for(field.alias_name.to_s) multi_type = type.delete_prefix("T.nilable(").delete_suffix(")").delete_prefix("::") - length = field.key_fields.length suffix = field.send(:fetch_method_suffix) parameters = field.key_fields.map do |arg| @@ -238,14 +231,12 @@ def create_aliased_fetch_by_methods(field, klass) return_type: type, ) - if length == 1 - klass.create_method( - "fetch_multi_#{suffix}", - class_method: true, - parameters: [create_param("keys", type: "T::Enumerable[T.untyped]")], - return_type: COLLECTION_TYPE.call(multi_type), - ) - end + klass.create_method( + "fetch_multi_#{suffix}", + class_method: true, + parameters: [create_param("keys", type: "T::Enumerable[T.untyped]")], + return_type: COLLECTION_TYPE.call(multi_type), + ) end end end diff --git a/lib/tapioca/dsl/compilers/json_api_client_resource.rb b/lib/tapioca/dsl/compilers/json_api_client_resource.rb index 8d9a3288a..321765d2b 100644 --- a/lib/tapioca/dsl/compilers/json_api_client_resource.rb +++ b/lib/tapioca/dsl/compilers/json_api_client_resource.rb @@ -1,13 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "json_api_client" -rescue LoadError - # means JsonApiClient is not installed, - # so let's not even define the compiler. - return -end +return unless defined?(JsonApiClient::Resource) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/kredis.rb b/lib/tapioca/dsl/compilers/kredis.rb index c2c829de0..15deccbe1 100644 --- a/lib/tapioca/dsl/compilers/kredis.rb +++ b/lib/tapioca/dsl/compilers/kredis.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "kredis" -rescue LoadError - return -end +return unless defined?(Kredis::Attributes) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/mixed_in_class_attributes.rb b/lib/tapioca/dsl/compilers/mixed_in_class_attributes.rb index e327ec43f..684dbb6fd 100644 --- a/lib/tapioca/dsl/compilers/mixed_in_class_attributes.rb +++ b/lib/tapioca/dsl/compilers/mixed_in_class_attributes.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "active_support/core_ext/class/attribute" -rescue LoadError - return -end +return unless defined?(ActiveSupport) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/protobuf.rb b/lib/tapioca/dsl/compilers/protobuf.rb index ccc7381ad..fd7faa7e8 100644 --- a/lib/tapioca/dsl/compilers/protobuf.rb +++ b/lib/tapioca/dsl/compilers/protobuf.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "google/protobuf" -rescue LoadError - return -end +return unless defined?(Google::Protobuf) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/rails_generators.rb b/lib/tapioca/dsl/compilers/rails_generators.rb index d4d684d49..6598444a6 100644 --- a/lib/tapioca/dsl/compilers/rails_generators.rb +++ b/lib/tapioca/dsl/compilers/rails_generators.rb @@ -1,12 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "rails/generators" - require "rails/generators/app_base" -rescue LoadError - return -end +return unless defined?(Rails::Generators::Base) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/sidekiq_worker.rb b/lib/tapioca/dsl/compilers/sidekiq_worker.rb index 70db53f26..62168da67 100644 --- a/lib/tapioca/dsl/compilers/sidekiq_worker.rb +++ b/lib/tapioca/dsl/compilers/sidekiq_worker.rb @@ -1,11 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "sidekiq" -rescue LoadError - return -end +return unless defined?(Sidekiq::Worker) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/smart_properties.rb b/lib/tapioca/dsl/compilers/smart_properties.rb index ff61637a2..f3c5d14a3 100644 --- a/lib/tapioca/dsl/compilers/smart_properties.rb +++ b/lib/tapioca/dsl/compilers/smart_properties.rb @@ -1,13 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "smart_properties" -rescue LoadError - # means SmartProperties is not installed, - # so let's not even define the compiler. - return -end +return unless defined?(SmartProperties) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/state_machines.rb b/lib/tapioca/dsl/compilers/state_machines.rb index 154d71949..c397d585c 100644 --- a/lib/tapioca/dsl/compilers/state_machines.rb +++ b/lib/tapioca/dsl/compilers/state_machines.rb @@ -1,13 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "state_machines" -rescue LoadError - # means StateMachines is not installed, - # so let's not even define the compiler. - return -end +return unless defined?(StateMachines) module Tapioca module Dsl diff --git a/lib/tapioca/dsl/compilers/url_helpers.rb b/lib/tapioca/dsl/compilers/url_helpers.rb index 9ed6b7c86..197315a77 100644 --- a/lib/tapioca/dsl/compilers/url_helpers.rb +++ b/lib/tapioca/dsl/compilers/url_helpers.rb @@ -1,13 +1,7 @@ # typed: strict # frozen_string_literal: true -begin - require "rails" - require "action_controller" - require "action_view" -rescue LoadError - return -end +return unless defined?(Rails) && defined?(ActionDispatch::Routing) module Tapioca module Dsl @@ -102,19 +96,11 @@ def decorate end end - NON_DISCOVERABLE_INCLUDERS = T.let( - [ - ActionDispatch::IntegrationTest, - ActionView::Helpers, - ], - T::Array[Module], - ) - class << self extend T::Sig sig { override.returns(T::Enumerable[Module]) } def gather_constants - return [] unless Rails.application + return [] unless defined?(Rails.application) && Rails.application Object.const_set(:GeneratedUrlHelpersModule, Rails.application.routes.named_routes.url_helpers_module) Object.const_set(:GeneratedPathHelpersModule, Rails.application.routes.named_routes.path_helpers_module) @@ -131,6 +117,19 @@ def gather_constants constants.concat(NON_DISCOVERABLE_INCLUDERS) end + sig { returns(T::Array[Module]) } + def gather_non_discoverable_includers + [].tap do |includers| + if defined?(ActionController::TemplateAssertions) && defined?(ActionDispatch::IntegrationTest) + includers << ActionDispatch::IntegrationTest + end + + if defined?(ActionView::Helpers) + includers << ActionView::Helpers + end + end.freeze + end + sig { params(mod: Module, helper: Module).returns(T::Boolean) } private def includes_helper?(mod, helper) superclass_ancestors = [] @@ -145,6 +144,8 @@ def gather_constants end end + NON_DISCOVERABLE_INCLUDERS = T.let(gather_non_discoverable_includers, T::Array[Module]) + private sig { params(root: RBI::Tree, constant: Module).void } diff --git a/lib/tapioca/dsl/extensions/active_record.rb b/lib/tapioca/dsl/extensions/active_record.rb index 0a8f0107e..168f5af56 100644 --- a/lib/tapioca/dsl/extensions/active_record.rb +++ b/lib/tapioca/dsl/extensions/active_record.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true begin - require "active_record" + require "active_support" rescue LoadError return end @@ -30,7 +30,18 @@ def has_secure_token(attribute = :token, **) super end - ::ActiveRecord::Base.singleton_class.prepend(self) + attr_reader :__tapioca_stored_attributes + + def store_accessor(store_attribute, *keys, prefix: nil, suffix: nil) + @__tapioca_stored_attributes ||= [] + @__tapioca_stored_attributes << [store_attribute, keys, prefix, suffix] + + super + end + + ::ActiveSupport.on_load(:active_record) do + ::ActiveRecord::Base.singleton_class.prepend(::Tapioca::Dsl::Compilers::Extensions::ActiveRecord) + end end end end diff --git a/lib/tapioca/dsl/extensions/frozen_record.rb b/lib/tapioca/dsl/extensions/frozen_record.rb index 0cc01fd32..2898cf2b1 100644 --- a/lib/tapioca/dsl/extensions/frozen_record.rb +++ b/lib/tapioca/dsl/extensions/frozen_record.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true begin - require "frozen_record" + require "active_support" rescue LoadError return end @@ -21,7 +21,11 @@ def scope(name, body) super end - ::FrozenRecord::Base.singleton_class.prepend(self) + ::ActiveSupport.on_load(:before_configuration) do + next unless defined?(::FrozenRecord::Base) + + ::FrozenRecord::Base.singleton_class.prepend(::Tapioca::Dsl::Compilers::Extensions::FrozenRecord) + end end end end diff --git a/lib/tapioca/dsl/extensions/kredis.rb b/lib/tapioca/dsl/extensions/kredis.rb index 47bae286c..5bebc1723 100644 --- a/lib/tapioca/dsl/extensions/kredis.rb +++ b/lib/tapioca/dsl/extensions/kredis.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true begin - require "kredis" + require "active_support" rescue LoadError return end @@ -106,7 +106,11 @@ def collect_kredis_type(method, type, values: nil) @__tapioca_kredis_types[method.to_s] = { type: type, values: values } end - ::Kredis::Attributes::ClassMethods.prepend(self) + ::ActiveSupport.on_load(:before_configuration) do + next unless defined?(::Kredis::Attributes::ClassMethods) + + ::Kredis::Attributes::ClassMethods.prepend(::Tapioca::Dsl::Compilers::Extensions::Kredis) + end end end end diff --git a/lib/tapioca/dsl/helpers/active_model_type_helper.rb b/lib/tapioca/dsl/helpers/active_model_type_helper.rb new file mode 100644 index 000000000..d9dd90051 --- /dev/null +++ b/lib/tapioca/dsl/helpers/active_model_type_helper.rb @@ -0,0 +1,70 @@ +# typed: strict +# frozen_string_literal: true + +module Tapioca + module Dsl + module Helpers + module ActiveModelTypeHelper + class << self + extend T::Sig + + # Returns the type indicated by the custom ActiveModel::Type::Value. + # Accepts subclasses of ActiveModel::Type::Value as well as classes that implement similar methods. + sig { params(type_value: T.untyped).returns(String) } + def type_for(type_value) + return "T.untyped" if Runtime::GenericTypeRegistry.generic_type_instance?(type_value) + + type = lookup_return_type_of_method(type_value, :deserialize) || + lookup_return_type_of_method(type_value, :cast) || + lookup_return_type_of_method(type_value, :cast_value) || + lookup_arg_type_of_method(type_value, :serialize) || + T.untyped + type.to_s + end + + private + + MEANINGLESS_TYPES = T.let( + [ + T.untyped, + T.noreturn, + T::Private::Types::Void, + T::Private::Types::NotTyped, + ].freeze, + T::Array[Object], + ) + + sig { params(type: T.untyped).returns(T::Boolean) } + def meaningful_type?(type) + !MEANINGLESS_TYPES.include?(type) + end + + sig { params(obj: T.untyped, method: Symbol).returns(T.nilable(T::Types::Base)) } + def lookup_return_type_of_method(obj, method) + return_type = lookup_signature_of_method(obj, method)&.return_type + return unless return_type && meaningful_type?(return_type) + + return_type + end + + sig { params(obj: T.untyped, method: Symbol).returns(T.nilable(T::Types::Base)) } + def lookup_arg_type_of_method(obj, method) + # Arg types is an array of [name, type] entries, so we dig into first entry (index 0) + # and then into the type which is the last element (index 1) + first_arg_type = lookup_signature_of_method(obj, method)&.arg_types&.dig(0, 1) + return unless first_arg_type && meaningful_type?(first_arg_type) + + first_arg_type + end + + sig { params(obj: T.untyped, method: Symbol).returns(T.untyped) } + def lookup_signature_of_method(obj, method) + Runtime::Reflection.signature_of(obj.method(method)) + rescue NameError + nil + end + end + end + end + end +end diff --git a/lib/tapioca/dsl/helpers/active_record_column_type_helper.rb b/lib/tapioca/dsl/helpers/active_record_column_type_helper.rb index 9b97dace5..8a73ed85b 100644 --- a/lib/tapioca/dsl/helpers/active_record_column_type_helper.rb +++ b/lib/tapioca/dsl/helpers/active_record_column_type_helper.rb @@ -1,6 +1,8 @@ # typed: strict # frozen_string_literal: true +require "tapioca/dsl/helpers/active_model_type_helper" + module Tapioca module Dsl module Helpers @@ -13,8 +15,26 @@ def initialize(constant) @constant = constant end + sig { params(attribute_name: String, column_name: String).returns([String, String]) } + def type_for(attribute_name, column_name = attribute_name) + return id_type if attribute_name == "id" + + column_type_for(column_name) + end + + private + + sig { returns([String, String]) } + def id_type + if @constant.respond_to?(:composite_primary_key?) && T.unsafe(@constant).composite_primary_key? + @constant.primary_key.map(&method(:column_type_for)).map { |tuple| "[#{tuple.join(", ")}]" } + else + column_type_for(@constant.primary_key) + end + end + sig { params(column_name: String).returns([String, String]) } - def type_for(column_name) + def column_type_for(column_name) return ["T.untyped", "T.untyped"] if do_not_generate_strong_types?(@constant) column = @constant.columns_hash[column_name] @@ -33,7 +53,7 @@ def type_for(column_name) return [getter_type, as_nilable_type(setter_type)] end - if column_name == @constant.primary_key || + if Array(@constant.primary_key).include?(column_name) || column_name == "created_at" || column_name == "updated_at" getter_type = as_nilable_type(getter_type) @@ -42,8 +62,6 @@ def type_for(column_name) [getter_type, setter_type] end - private - sig { params(column_type: T.untyped).returns(String) } def type_for_activerecord_value(column_type) case column_type @@ -69,6 +87,12 @@ def type_for_activerecord_value(column_type) "::String" when ActiveRecord::Type::Serialized serialized_column_type(column_type) + when defined?(ActiveRecord::Normalization::NormalizedValueType) && + ActiveRecord::Normalization::NormalizedValueType + type_for_activerecord_value(column_type.cast_type) + when defined?(ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Uuid) && + ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Uuid + "::String" when defined?(ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Hstore) && ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Hstore "T::Hash[::String, ::String]" @@ -76,7 +100,7 @@ def type_for_activerecord_value(column_type) ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Array "T::Array[#{type_for_activerecord_value(column_type.subtype)}]" else - handle_unknown_type(column_type) + ActiveModelTypeHelper.type_for(column_type) end end @@ -86,40 +110,6 @@ def do_not_generate_strong_types?(constant) !(constant.singleton_class < Object.const_get(:StrongTypeGeneration)) end - sig { params(column_type: BasicObject).returns(String) } - def handle_unknown_type(column_type) - return "T.untyped" unless ActiveModel::Type::Value === column_type - return "T.untyped" if Runtime::GenericTypeRegistry.generic_type_instance?(column_type) - - lookup_return_type_of_method(column_type, :deserialize) || - lookup_return_type_of_method(column_type, :cast) || - lookup_arg_type_of_method(column_type, :serialize) || - "T.untyped" - end - - sig { params(column_type: ActiveModel::Type::Value, method: Symbol).returns(T.nilable(String)) } - def lookup_return_type_of_method(column_type, method) - signature = Runtime::Reflection.signature_of(column_type.method(method)) - return unless signature - - return_type = signature.return_type - return if return_type == T::Private::Types::Void || return_type == T::Private::Types::NotTyped - - return_type.to_s - end - - sig { params(column_type: ActiveModel::Type::Value, method: Symbol).returns(T.nilable(String)) } - def lookup_arg_type_of_method(column_type, method) - signature = Runtime::Reflection.signature_of(column_type.method(method)) - return unless signature - - # Arg types is an array [name, type] entries, so we desctructure the type of - # first argument to get the first argument type - _, first_argument_type = signature.arg_types.first - - first_argument_type.to_s - end - sig { params(column_type: ActiveRecord::Enum::EnumType).returns(String) } def enum_setter_type(column_type) # In Rails < 7 this method is private. When support for that is dropped we can call the method directly diff --git a/lib/tapioca/dsl/helpers/active_record_constants_helper.rb b/lib/tapioca/dsl/helpers/active_record_constants_helper.rb index c04b63d72..7f2bc3667 100644 --- a/lib/tapioca/dsl/helpers/active_record_constants_helper.rb +++ b/lib/tapioca/dsl/helpers/active_record_constants_helper.rb @@ -15,14 +15,17 @@ module ActiveRecordConstantsHelper AssociationMethodsModuleName = T.let("GeneratedAssociationMethods", String) DelegatedTypesModuleName = T.let("GeneratedDelegatedTypeMethods", String) SecureTokensModuleName = T.let("GeneratedSecureTokenMethods", String) + StoredAttributesModuleName = T.let("GeneratedStoredAttributesMethods", String) RelationMethodsModuleName = T.let("GeneratedRelationMethods", String) AssociationRelationMethodsModuleName = T.let("GeneratedAssociationRelationMethods", String) CommonRelationMethodsModuleName = T.let("CommonRelationMethods", String) RelationClassName = T.let("PrivateRelation", String) + RelationGroupChainClassName = T.let("PrivateRelationGroupChain", String) RelationWhereChainClassName = T.let("PrivateRelationWhereChain", String) AssociationRelationClassName = T.let("PrivateAssociationRelation", String) + AssociationRelationGroupChainClassName = T.let("PrivateAssociationRelationGroupChain", String) AssociationRelationWhereChainClassName = T.let("PrivateAssociationRelationWhereChain", String) AssociationsCollectionProxyClassName = T.let("PrivateCollectionProxy", String) end diff --git a/lib/tapioca/dsl/helpers/graphql_type_helper.rb b/lib/tapioca/dsl/helpers/graphql_type_helper.rb index fd7dac1cf..bf9973ef3 100644 --- a/lib/tapioca/dsl/helpers/graphql_type_helper.rb +++ b/lib/tapioca/dsl/helpers/graphql_type_helper.rb @@ -9,8 +9,13 @@ module GraphqlTypeHelper extend T::Sig - sig { params(argument: GraphQL::Schema::Argument).returns(String) } - def type_for(argument) + sig do + params( + argument: GraphQL::Schema::Argument, + constant: T.any(T.class_of(GraphQL::Schema::Mutation), T.class_of(GraphQL::Schema::InputObject)), + ).returns(String) + end + def type_for_argument(argument, constant) type = if argument.loads loads_type = ::GraphQL::Schema::Wrapper.new(argument.loads) loads_type = loads_type.to_list_type if argument.type.list? @@ -19,6 +24,37 @@ def type_for(argument) else argument.type end + + prepare = argument.prepare + prepare_method = if prepare.is_a?(Symbol) || prepare.is_a?(String) + if constant.respond_to?(prepare) + constant.method(prepare.to_sym) + end + end + + type_for( + type, + ignore_nilable_wrapper: has_replaceable_default?(argument), + prepare_method: prepare_method, + ) + end + + sig do + params( + type: T.any( + GraphQL::Schema::Wrapper, + T.class_of(GraphQL::Schema::Scalar), + T.class_of(GraphQL::Schema::Enum), + T.class_of(GraphQL::Schema::Union), + T.class_of(GraphQL::Schema::Object), + T.class_of(GraphQL::Schema::Interface), + T.class_of(GraphQL::Schema::InputObject), + ), + ignore_nilable_wrapper: T::Boolean, + prepare_method: T.nilable(Method), + ).returns(String) + end + def type_for(type, ignore_nilable_wrapper: false, prepare_method: nil) unwrapped_type = type.unwrap parsed_type = case unwrapped_type @@ -28,7 +64,7 @@ def type_for(argument) type_for_constant(Float) when GraphQL::Types::ID.singleton_class, GraphQL::Types::String.singleton_class type_for_constant(String) - when GraphQL::Types::Int.singleton_class + when GraphQL::Types::Int.singleton_class, GraphQL::Types::BigInt.singleton_class type_for_constant(Integer) when GraphQL::Types::ISO8601Date.singleton_class type_for_constant(Date) @@ -45,21 +81,33 @@ def type_for(argument) else "T.any(#{value_types.join(", ")})" end + when GraphQL::Schema::Scalar.singleton_class + method = Runtime::Reflection.method_of(unwrapped_type, :coerce_input) + signature = Runtime::Reflection.signature_of(method) + return_type = signature&.return_type + + valid_return_type?(return_type) ? return_type.to_s : "T.untyped" when GraphQL::Schema::InputObject.singleton_class type_for_constant(unwrapped_type) - when GraphQL::Schema::NonNull.singleton_class - type_for(unwrapped_type.of_type) when Module Runtime::Reflection.qualified_name_of(unwrapped_type) || "T.untyped" else "T.untyped" end + if prepare_method + prepare_signature = Runtime::Reflection.signature_of(prepare_method) + prepare_return_type = prepare_signature&.return_type + if valid_return_type?(prepare_return_type) + parsed_type = prepare_return_type&.to_s + end + end + if type.list? parsed_type = "T::Array[#{parsed_type}]" end - unless type.non_null? || has_replaceable_default?(argument) + unless type.non_null? || ignore_nilable_wrapper parsed_type = RBIHelper.as_nilable_type(parsed_type) end @@ -70,6 +118,14 @@ def type_for(argument) sig { params(constant: Module).returns(String) } def type_for_constant(constant) + if constant.instance_methods.include?(:prepare) + prepare_method = constant.instance_method(:prepare) + + prepare_signature = Runtime::Reflection.signature_of(prepare_method) + + return prepare_signature.return_type&.to_s if valid_return_type?(prepare_signature&.return_type) + end + Runtime::Reflection.qualified_name_of(constant) || "T.untyped" end @@ -77,6 +133,11 @@ def type_for_constant(constant) def has_replaceable_default?(argument) !!argument.replace_null_with_default? && !argument.default_value.nil? end + + sig { params(return_type: T.nilable(T::Types::Base)).returns(T::Boolean) } + def valid_return_type?(return_type) + !!return_type && !(T::Private::Types::Void === return_type || T::Private::Types::NotTyped === return_type) + end end end end diff --git a/lib/tapioca/dsl/pipeline.rb b/lib/tapioca/dsl/pipeline.rb index 6cf52c851..9dec39933 100644 --- a/lib/tapioca/dsl/pipeline.rb +++ b/lib/tapioca/dsl/pipeline.rb @@ -61,7 +61,7 @@ def run(&blk) .sort_by! { |c| T.must(Runtime::Reflection.name_of(c)) } # It's OK if there are no constants to process if we received a valid file/path. - if constants_to_process.empty? && requested_paths.select { |p| File.exist?(p) }.empty? + if constants_to_process.empty? && requested_paths.none? { |p| File.exist?(p) } report_error(<<~ERROR) No classes/modules can be matched for RBI generation. Please check that the requested classes/modules include processable DSL methods. @@ -130,7 +130,10 @@ def gather_active_compilers(requested_compilers, excluded_compilers) sig { params(requested_constants: T::Array[Module], requested_paths: T::Array[Pathname]).returns(T::Set[Module]) } def gather_constants(requested_constants, requested_paths) - constants = active_compilers.map(&:processable_constants).reduce(Set.new, :union) + constants = Set.new.compare_by_identity + active_compilers.each do |compiler| + constants.merge(compiler.processable_constants) + end constants = filter_anonymous_and_reloaded_constants(constants) constants &= requested_constants unless requested_constants.empty? && requested_paths.empty? @@ -158,11 +161,12 @@ def filter_anonymous_and_reloaded_constants(constants) # Look up all the constants back from their names. The resulting constant set will be the # set of constants that are actually in memory with those names. - constants_by_name + filtered_constants = constants_by_name .keys .map { |name| T.cast(Runtime::Reflection.constantize(name), Module) } .select { |mod| Runtime::Reflection.constant_defined?(mod) } - .to_set + + Set.new.compare_by_identity.merge(filtered_constants) end sig { params(constant: Module).returns(T.nilable(RBI::File)) } diff --git a/lib/tapioca/gem/listeners/methods.rb b/lib/tapioca/gem/listeners/methods.rb index 0abce3ac3..e30dac189 100644 --- a/lib/tapioca/gem/listeners/methods.rb +++ b/lib/tapioca/gem/listeners/methods.rb @@ -97,12 +97,11 @@ def compile_method(tree, symbol_name, constant, method, visibility = RBI::Public # method and the parameter is required and there is a single # parameter and the signature also defines a single parameter and # the name of the method ends with a = character. - writer_method_with_sig = ( + writer_method_with_sig = signature && type == :req && parameters.size == 1 && signature.arg_types.size == 1 && method_name[-1] == "=" - ) if writer_method_with_sig method_name.delete_suffix("=") diff --git a/lib/tapioca/gem/listeners/sorbet_props.rb b/lib/tapioca/gem/listeners/sorbet_props.rb index 07a26734e..e2a7bc8f9 100644 --- a/lib/tapioca/gem/listeners/sorbet_props.rb +++ b/lib/tapioca/gem/listeners/sorbet_props.rb @@ -6,6 +6,7 @@ module Gem module Listeners class SorbetProps < Base extend T::Sig + include RBIHelper private @@ -17,7 +18,7 @@ def on_scope(event) return unless T::Props::ClassMethods === constant constant.props.map do |name, prop| - type = prop.fetch(:type_object, "T.untyped").to_s.gsub(".returns()", ".void") + type = sanitize_signature_types(prop.fetch(:type_object, "T.untyped").to_s) default = prop.key?(:default) || prop.key?(:factory) ? "T.unsafe(nil)" : nil node << if prop.fetch(:immutable, false) diff --git a/lib/tapioca/gem/listeners/sorbet_signatures.rb b/lib/tapioca/gem/listeners/sorbet_signatures.rb index 3dca1470b..1ba0a4fe1 100644 --- a/lib/tapioca/gem/listeners/sorbet_signatures.rb +++ b/lib/tapioca/gem/listeners/sorbet_signatures.rb @@ -67,8 +67,9 @@ def compile_signature(signature, parameters) sig { params(signature: T.untyped).returns(T::Boolean) } def signature_final?(signature) modules_with_final = T::Private::Methods.instance_variable_get(:@modules_with_final) - final_methods = modules_with_final[signature.owner.object_id] - + # In https://github.com/sorbet/sorbet/pull/7531, Sorbet changed internal hashes to be compared by identity, + # starting on version 0.5.11155 + final_methods = modules_with_final[signature.owner] || modules_with_final[signature.owner.object_id] return false unless final_methods final_methods.include?(signature.method_name) diff --git a/lib/tapioca/gem/pipeline.rb b/lib/tapioca/gem/pipeline.rb index bd7d962da..61013e533 100644 --- a/lib/tapioca/gem/pipeline.rb +++ b/lib/tapioca/gem/pipeline.rb @@ -271,9 +271,7 @@ def compile_object(name, value) klass = class_of(value) - klass_name = if klass == ObjectSpace::WeakMap - sorbet_supports?(:non_generic_weak_map) ? "ObjectSpace::WeakMap" : "ObjectSpace::WeakMap[T.untyped]" - elsif T::Generic === klass + klass_name = if T::Generic === klass generic_name_of(klass) else name_of(klass) @@ -393,6 +391,7 @@ def skip_constant?(name, constant) def skip_alias?(name, constant) return true if symbol_in_payload?(name) return true unless constant_in_gem?(name) + return true if has_aliased_namespace?(name) false end diff --git a/lib/tapioca/gemfile.rb b/lib/tapioca/gemfile.rb index ecfd9fb43..dc7b0bfb3 100644 --- a/lib/tapioca/gemfile.rb +++ b/lib/tapioca/gemfile.rb @@ -120,6 +120,7 @@ def spec_lookup_by_file_path "sorbet-runtime", "sorbet-static-and-runtime", "debug", + "irb", "fakefs", ].freeze, T::Array[String], @@ -177,7 +178,18 @@ def contains_path?(path) sig { void } def parse_yard_docs - files.each { |path| YARD.parse(path.to_s, [], Logger::Severity::FATAL) } + files.each do |path| + YARD.parse(path.to_s, [], Logger::Severity::FATAL) + rescue RangeError + # In some circumstances, YARD will raise an error when parsing a file + # that is actually valid Ruby. We don't want tapioca to halt in these + # cases, so we'll rescue the error, pretend like there was no + # documentation, and move on. + # + # This can be removed when https://github.com/lsegal/yard/issues/1536 + # is resolved and released. + [] + end end sig { returns(T::Array[String]) } diff --git a/lib/tapioca/helpers/env_helper.rb b/lib/tapioca/helpers/env_helper.rb index 933d7860f..1127ed005 100644 --- a/lib/tapioca/helpers/env_helper.rb +++ b/lib/tapioca/helpers/env_helper.rb @@ -11,7 +11,7 @@ module EnvHelper sig { params(options: T::Hash[Symbol, T.untyped]).void } def set_environment(options) # rubocop:disable Naming/AccessorMethodName ENV["RAILS_ENV"] = ENV["RACK_ENV"] = options[:environment] - ENV["RUBY_DEBUG_ENABLE"] = "0" + ENV["RUBY_DEBUG_LAZY"] = "1" end end end diff --git a/lib/tapioca/helpers/git_attributes.rb b/lib/tapioca/helpers/git_attributes.rb new file mode 100644 index 000000000..e0b24d3ce --- /dev/null +++ b/lib/tapioca/helpers/git_attributes.rb @@ -0,0 +1,34 @@ +# typed: strict +# frozen_string_literal: true + +class GitAttributes + class << self + extend T::Sig + + sig { params(path: Pathname).void } + def create_generated_attribute_file(path) + create_gitattributes_file(path, <<~CONTENT) + **/*.rbi linguist-generated=true + CONTENT + end + + sig { params(path: Pathname).void } + def create_vendored_attribute_file(path) + create_gitattributes_file(path, <<~CONTENT) + **/*.rbi linguist-vendored=true + CONTENT + end + + private + + sig { params(path: Pathname, content: String).void } + def create_gitattributes_file(path, content) + # We don't want to start creating folders, just to write + # the `.gitattributes` file. So, if the folder doesn't + # exist, we just return. + return unless path.exist? + + File.write(path.join(".gitattributes"), content) + end + end +end diff --git a/lib/tapioca/helpers/sorbet_helper.rb b/lib/tapioca/helpers/sorbet_helper.rb index f66a1b1f2..86ff31220 100644 --- a/lib/tapioca/helpers/sorbet_helper.rb +++ b/lib/tapioca/helpers/sorbet_helper.rb @@ -24,8 +24,6 @@ module SorbetHelper FEATURE_REQUIREMENTS = T.let( { # feature_name: ::Gem::Requirement.new(">= ___"), # https://github.com/sorbet/sorbet/pull/___ - non_generic_weak_map: ::Gem::Requirement.new(">= 0.5.10587"), # https://github.com/sorbet/sorbet/pull/6610 - generic_class: ::Gem::Requirement.new(">= 0.5.10820"), # https://github.com/sorbet/sorbet/pull/6781 }.freeze, T::Hash[Symbol, ::Gem::Requirement], ) diff --git a/lib/tapioca/helpers/test/template.rb b/lib/tapioca/helpers/test/template.rb index b8905171a..a439b0471 100644 --- a/lib/tapioca/helpers/test/template.rb +++ b/lib/tapioca/helpers/test/template.rb @@ -24,12 +24,12 @@ def rails_version(selector) ::Gem::Requirement.new(selector).satisfied_by?(ActiveSupport.gem_version) end - sig { params(src: String).returns(String) } - def template(src) + sig { params(src: String, trim_mode: String).returns(String) } + def template(src, trim_mode: ">") erb = if ERB_SUPPORTS_KVARGS - ::ERB.new(src, trim_mode: ">") + ::ERB.new(src, trim_mode: trim_mode) else - ::ERB.new(src, nil, ">") + ::ERB.new(src, nil, trim_mode) end erb.result(binding) diff --git a/lib/tapioca/internal.rb b/lib/tapioca/internal.rb index 719247bc5..c6e8930e1 100644 --- a/lib/tapioca/internal.rb +++ b/lib/tapioca/internal.rb @@ -28,10 +28,10 @@ require "tapioca/runtime/dynamic_mixin_compiler" require "tapioca/helpers/gem_helper" +require "tapioca/helpers/git_attributes" require "tapioca/helpers/sorbet_helper" require "tapioca/helpers/rbi_helper" require "tapioca/sorbet_ext/backcompat_patches" -require "tapioca/sorbet_ext/fixed_hash_patch" require "tapioca/sorbet_ext/name_patch" require "tapioca/sorbet_ext/generic_name_patch" require "tapioca/sorbet_ext/proc_bind_patch" diff --git a/lib/tapioca/loaders/loader.rb b/lib/tapioca/loaders/loader.rb index a44dbe224..b94fef393 100644 --- a/lib/tapioca/loaders/loader.rb +++ b/lib/tapioca/loaders/loader.rb @@ -110,7 +110,7 @@ def load_engines_in_zeitwerk_mode autoloader = Zeitwerk::Loader.new engines.each do |engine| - engine.config.eager_load_paths.each do |path| + eager_load_paths(engine).each do |path| # Zeitwerk only accepts existing directories in `push_dir`. next unless File.directory?(path) # We should not add directories that are already managed by a Zeitwerk loader. @@ -131,7 +131,7 @@ def load_engines_in_classic_mode # We can't use `Rails::Engine#eager_load!` directly because it will raise as soon as it encounters # an error, which is not what we want. We want to try to load as much as we can. engines.each do |engine| - engine.config.eager_load_paths.each do |load_path| + eager_load_paths(engine).each do |load_path| Dir.glob("#{load_path}/**/*.rb").sort.each do |file| require_dependency file end @@ -224,6 +224,17 @@ def require_helper(file) require(file) end + + # Rails 7.2 renamed `eager_load_paths` to `all_eager_load_paths`, which maintains the same original functionality. + # The `eager_load_paths` method still exists, but doesn't return all paths anymore and causes Tapioca to miss some + # engine paths. The following commit is the change: + # https://github.com/rails/rails/commit/ebfca905db14020589c22e6937382e6f8f687664 + sig { params(engine: T.class_of(Rails::Engine)).returns(T::Array[String]) } + def eager_load_paths(engine) + config = engine.config + + (config.respond_to?(:all_eager_load_paths) && config.all_eager_load_paths) || config.eager_load_paths + end end end end diff --git a/lib/tapioca/rbi_ext/model.rb b/lib/tapioca/rbi_ext/model.rb index a85bb1d6c..5254b9740 100644 --- a/lib/tapioca/rbi_ext/model.rb +++ b/lib/tapioca/rbi_ext/model.rb @@ -87,24 +87,56 @@ def create_type_variable(name, type:, variance: :invariant, fixed: nil, upper: n ).void end def create_method(name, parameters: [], return_type: "T.untyped", class_method: false, visibility: RBI::Public.new, + comments: []) + sig = create_sig(parameters: parameters, return_type: return_type) + create_method_with_sigs( + name, + sigs: [sig], + parameters: parameters.map(&:param), + class_method: class_method, + visibility: visibility, + comments: comments, + ) + end + + sig do + params( + name: String, + sigs: T::Array[RBI::Sig], + parameters: T::Array[RBI::Param], + class_method: T::Boolean, + visibility: RBI::Visibility, + comments: T::Array[RBI::Comment], + ).void + end + def create_method_with_sigs(name, sigs:, parameters: [], class_method: false, visibility: RBI::Public.new, comments: []) return unless Tapioca::RBIHelper.valid_method_name?(name) - sig = RBI::Sig.new(return_type: return_type) method = RBI::Method.new( name, - sigs: [sig], + sigs: sigs, + params: parameters, is_singleton: class_method, visibility: visibility, comments: comments, ) - parameters.each do |param| - method << param.param - sig << RBI::SigParam.new(param.param.name, param.type) - end self << method end + sig do + params( + parameters: T::Array[RBI::TypedParam], + return_type: String, + ).returns(RBI::Sig) + end + def create_sig(parameters: [], return_type: "T.untyped") + params = parameters.map do |param| + RBI::SigParam.new(param.param.name, param.type) + end + RBI::Sig.new(params: params, return_type: return_type) + end + private sig { returns(T::Hash[String, RBI::Node]) } diff --git a/lib/tapioca/runtime/reflection.rb b/lib/tapioca/runtime/reflection.rb index 52faad976..966cd1ebb 100644 --- a/lib/tapioca/runtime/reflection.rb +++ b/lib/tapioca/runtime/reflection.rb @@ -255,6 +255,23 @@ def child_module_for_parent_with_name(parent, name) def method_defined_by_forwardable_module?(method) method.source_location&.first == Object.const_source_location(:Forwardable)&.first end + + sig { params(name: String).returns(T::Boolean) } + def has_aliased_namespace?(name) + name_parts = name.split("::") + name_parts.pop # drop the constant name, leaving just the namespace + + name_parts.each_with_object([]) do |name_part, namespaces| + namespaces << "#{namespaces.last}::#{name_part}".delete_prefix("::") + end.any? do |namespace| + constant = constantize(namespace) + next unless Module === constant + + # If the constant name doesn't match the namespace, + # the namespace must contain an alias + name_of(constant) != namespace + end + end end end end diff --git a/lib/tapioca/sorbet_ext/backcompat_patches.rb b/lib/tapioca/sorbet_ext/backcompat_patches.rb index b79be52fe..97598bed3 100644 --- a/lib/tapioca/sorbet_ext/backcompat_patches.rb +++ b/lib/tapioca/sorbet_ext/backcompat_patches.rb @@ -1,24 +1,6 @@ # typed: true # frozen_string_literal: true -unless defined?(T.anything) - module T - class << self - def anything - T.untyped - end - end - end -end +# This file contains patches to make Tapioca work with older versions of Sorbet. -unless defined?(T::Class) - module T - module Class - class << self - def [](type) - T.untyped - end - end - end - end -end +# NOTE: If there is currently no need for any patches, this file will be empty. diff --git a/lib/tapioca/sorbet_ext/fixed_hash_patch.rb b/lib/tapioca/sorbet_ext/fixed_hash_patch.rb deleted file mode 100644 index c833b9959..000000000 --- a/lib/tapioca/sorbet_ext/fixed_hash_patch.rb +++ /dev/null @@ -1,20 +0,0 @@ -# typed: true -# frozen_string_literal: true - -module T - module Types - class FixedHash - def name - entries = @types.map do |(k, v)| - if Symbol === k && ":#{k}" == k.inspect - "#{k}: #{v}" - else - "#{k.inspect} => #{v}" - end - end - - "{#{entries.join(", ")}}" - end - end - end -end diff --git a/lib/tapioca/sorbet_ext/generic_name_patch.rb b/lib/tapioca/sorbet_ext/generic_name_patch.rb index 4d8adf9ae..82ee17f46 100644 --- a/lib/tapioca/sorbet_ext/generic_name_patch.rb +++ b/lib/tapioca/sorbet_ext/generic_name_patch.rb @@ -18,32 +18,26 @@ def [](*types) Tapioca::Runtime::GenericTypeRegistry.register_type(constant, types) end - def type_member(variance = :invariant, fixed: nil, lower: nil, upper: nil, &bounds_proc) + def type_member(variance = :invariant, &bounds_proc) # `T::Generic#type_member` just instantiates a `T::Type::TypeMember` instance and returns it. # We use that when registering the type member and then later return it from this method. Tapioca::TypeVariableModule.new( T.cast(self, Module), Tapioca::TypeVariableModule::Type::Member, variance, - fixed, - lower, - upper, bounds_proc, ).tap do |type_variable| Tapioca::Runtime::GenericTypeRegistry.register_type_variable(self, type_variable) end end - def type_template(variance = :invariant, fixed: nil, lower: nil, upper: nil, &bounds_proc) + def type_template(variance = :invariant, &bounds_proc) # `T::Generic#type_template` just instantiates a `T::Type::TypeTemplate` instance and returns it. # We use that when registering the type template and then later return it from this method. Tapioca::TypeVariableModule.new( T.cast(self, Module), Tapioca::TypeVariableModule::Type::Template, variance, - fixed, - lower, - upper, bounds_proc, ).tap do |type_variable| Tapioca::Runtime::GenericTypeRegistry.register_type_variable(self, type_variable) @@ -57,9 +51,6 @@ def has_attached_class!(variance = :invariant, &bounds_proc) T.cast(self, Module), Tapioca::TypeVariableModule::Type::HasAttachedClass, variance, - nil, - nil, - nil, bounds_proc, ), ) @@ -93,29 +84,9 @@ def name end module Utils - # This duplication is required to preserve backwards compatibility with sorbet-runtime versions prior to the - # introduction of the `Private` module in https://github.com/sorbet/sorbet/pull/6559. - if defined?(T::Utils::Private) - module Private - module PrivateCoercePatch - def coerce_and_check_module_types(val, check_val, check_module_type) - if val.is_a?(Tapioca::TypeVariableModule) - val.coerce_to_type_variable - elsif val.respond_to?(:__tapioca_override_type) - val.__tapioca_override_type - else - super - end - end - end - - class << self - prepend(PrivateCoercePatch) - end - end - else - module CoercePatch - def coerce(val) + module Private + module PrivateCoercePatch + def coerce_and_check_module_types(val, check_val, check_module_type) if val.is_a?(Tapioca::TypeVariableModule) val.coerce_to_type_variable elsif val.respond_to?(:__tapioca_override_type) @@ -127,7 +98,7 @@ def coerce(val) end class << self - prepend(CoercePatch) + prepend(PrivateCoercePatch) end end end @@ -159,35 +130,27 @@ class Type < T::Enum end end + DEFAULT_BOUNDS_PROC = T.let(-> { {} }, T.proc.returns(T::Hash[Symbol, T.untyped])) + sig { returns(Type) } attr_reader :type - # rubocop:disable Metrics/ParameterLists sig do params( context: Module, type: Type, variance: Symbol, - fixed: T.untyped, - lower: T.untyped, - upper: T.untyped, bounds_proc: T.nilable(T.proc.returns(T::Hash[Symbol, T.untyped])), ).void end - def initialize(context, type, variance, fixed, lower, upper, bounds_proc) + def initialize(context, type, variance, bounds_proc) @context = context @type = type @variance = variance - @bounds_proc = if bounds_proc - bounds_proc - else - build_bounds_proc(fixed, lower, upper) - end + @bounds_proc = bounds_proc || DEFAULT_BOUNDS_PROC super() end - # rubocop:enable Metrics/ParameterLists - sig { returns(T.nilable(String)) } def name constant_name = super @@ -221,19 +184,6 @@ def coerce_to_type_variable private - sig do - params(fixed: T.untyped, lower: T.untyped, upper: T.untyped) - .returns(T.proc.returns(T::Hash[Symbol, T.untyped])) - end - def build_bounds_proc(fixed, lower, upper) - bounds = {} - bounds[:fixed] = fixed unless fixed.nil? - bounds[:lower] = lower unless lower.nil? - bounds[:upper] = upper unless upper.nil? - - -> { bounds } - end - sig { returns(T::Hash[Symbol, T.untyped]) } def bounds @bounds ||= @bounds_proc.call diff --git a/lib/tapioca/static/symbol_loader.rb b/lib/tapioca/static/symbol_loader.rb index ea0fa004e..ff41f610a 100644 --- a/lib/tapioca/static/symbol_loader.rb +++ b/lib/tapioca/static/symbol_loader.rb @@ -27,7 +27,15 @@ def engine_symbols(gem) return Set.new unless gem_engine - paths = gem_engine.config.eager_load_paths.flat_map do |load_path| + # https://github.com/rails/rails/commit/ebfca905db14020589c22e6937382e6f8f687664 + config = gem_engine.config + eager_load_paths = if config.respond_to?(:all_eager_load_paths) + config.all_eager_load_paths + else + config.eager_load_paths + end + + paths = eager_load_paths.flat_map do |load_path| Pathname.glob("#{load_path}/**/*.rb") end diff --git a/lib/tapioca/version.rb b/lib/tapioca/version.rb index e6cf3dd1d..d0992849f 100644 --- a/lib/tapioca/version.rb +++ b/lib/tapioca/version.rb @@ -2,5 +2,5 @@ # frozen_string_literal: true module Tapioca - VERSION = "0.11.8" + VERSION = "0.13.0" end diff --git a/manual/compiler_actiontext.md b/manual/compiler_actiontext.md new file mode 100644 index 000000000..49c3c2238 --- /dev/null +++ b/manual/compiler_actiontext.md @@ -0,0 +1,39 @@ +## ActionText + +`Tapioca::Dsl::Compilers::ActionText` decorates RBI files for subclasses of +`ActiveRecord::Base` that declare [has_rich_text](https://edgeguides.rubyonrails.org/action_text_overview.html#creating-rich-text-content) + +For example, with the following `ActiveRecord::Base` subclass: + +~~~rb +class Post < ApplicationRecord + has_rich_text :body + has_rich_text :title, encrypted: true +end +~~~ + +this compiler will produce the RBI file `post.rbi` with the following content: + +~~~rbi +# typed: strong + +class Post + sig { returns(ActionText::RichText) } + def body; end + + sig { params(value: T.nilable(T.any(ActionText::RichText, String))).returns(T.untyped) } + def body=(value); end + + sig { returns(T::Boolean) } + def body?; end + + sig { returns(ActionText::EncryptedRichText) } + def title; end + + sig { params(value: T.nilable(T.any(ActionText::EncryptedRichText, String))).returns(T.untyped) } + def title=(value); end + + sig { returns(T::Boolean) } + def title?; end +end +~~~ diff --git a/manual/compiler_activejob.md b/manual/compiler_activejob.md index 04dd5f43f..67f529ff1 100644 --- a/manual/compiler_activejob.md +++ b/manual/compiler_activejob.md @@ -20,8 +20,13 @@ this compiler will produce the RBI file `notify_user_job.rbi` with the following # notify_user_job.rbi # typed: true class NotifyUserJob - sig { params(user: User).returns(T.any(NotifyUserJob, FalseClass)) } - def self.perform_later(user); end + sig do + params( + user: User, + block: T.nilable(T.proc.params(job: NotifyUserJob).void), + ).returns(T.any(NotifyUserJob, FalseClass)) + end + def self.perform_later(user, &block); end sig { params(user: User).returns(Mail) } def self.perform_now(user); end diff --git a/manual/compiler_activemodelvalidationsconfirmation.md b/manual/compiler_activemodelvalidationsconfirmation.md new file mode 100644 index 000000000..ceb1ae04c --- /dev/null +++ b/manual/compiler_activemodelvalidationsconfirmation.md @@ -0,0 +1,36 @@ +## ActiveModelValidationsConfirmation + +`Tapioca::Dsl::Compilers::ActiveModelValidationsConfirmation` decorates RBI files for all +classes that use [`ActiveModel::Validates::Confirmation`](https://api.rubyonrails.org/classes/ActiveModel/Validations/HelperMethods.html#method-i-validates_confirmation_of). + +For example, with the following class: + +~~~rb +class User + include ActiveModel::Validations + + validates_confirmation_of :password + + validates :email, confirmation: true +end +~~~ + +this compiler will produce an RBI file with the following content: +~~~rbi +# typed: true + +class User + + sig { returns(T.untyped) } + def email_confirmation; end + + sig { params(email_confirmation=: T.untyped).returns(T.untyped) } + def email_confirmation=(email_confirmation); end + + sig { returns(T.untyped) } + def password_confirmation; end + + sig { params(password_confirmation=: T.untyped).returns(T.untyped) } + def password_confirmation=(password_confirmation); end +end +~~~ diff --git a/manual/compiler_activerecordrelations.md b/manual/compiler_activerecordrelations.md index 73c43860a..be28e2209 100644 --- a/manual/compiler_activerecordrelations.md +++ b/manual/compiler_activerecordrelations.md @@ -50,16 +50,6 @@ Additionally, the actual `Model` class extends both `Model::CommonRelationMethod `Model::PrivateRelation` modules, so that, for example, `find_by` and `all` can be chained off of the `Model` class. -**A note on find**: `find` is typed as `T.untyped` by default. - -While it is often used in the manner of `Model.find(id)`, Rails does support pasing in an array to find, which -would then return a `T::Enumerable[Model]`. This would force a static cast everywhere find is used to avoid type -errors. This is not ideal considering very few users of find use the array syntax over a where. With untyped, -this cast is optional and so it was decided to avoid typing it. If you need runtime guarentees when using `find` -the best method of doing so is by casting the return value to the model: `T.cast(Model.find(id), Model)`. -`find_by` does guarentee a return value of `Model`, so find can can be refactored accordingly: -`Model.find_by!(id: id)`. This will avoid the cast requirement at runtime. - **CAUTION**: The generated relation classes are named `PrivateXXX` intentionally to reflect the fact that they represent private subconstants of the Active Record model. As such, these types do not exist at runtime, and their counterparts that do exist at runtime are marked `private_constant` anyway. @@ -113,6 +103,9 @@ class Post include CommonRelationMethods include GeneratedAssociationRelationMethods + sig { returns(T::Array[::Post]) } + def to_a; end + sig { returns(T::Array[::Post]) } def to_ary; end @@ -136,6 +129,9 @@ class Post include CommonRelationMethods include GeneratedRelationMethods + sig { returns(T::Array[::Post]) } + def to_a; end + sig { returns(T::Array[::Post]) } def to_ary; end diff --git a/manual/compiler_activerecordstore.md b/manual/compiler_activerecordstore.md new file mode 100644 index 000000000..c350ec22c --- /dev/null +++ b/manual/compiler_activerecordstore.md @@ -0,0 +1,72 @@ +## ActiveRecordStore + +`Tapioca::Dsl::Compilers::ActiveRecordStore` decorates RBI files for all +classes that use [`ActiveRecord::Store`](https://api.rubyonrails.org/classes/ActiveRecord/Store.html). + +For example, with the following class: + +~~~rb +class User < ActiveRecord::Base + store :settings, accessors: :theme + store_accessor :settings, :power_source, prefix: :prefs +end +~~~ + +this compiler will produce an RBI file with the following content: +~~~rbi +# typed: true + +class User + include GeneratedStoredAttributesMethods + + module GeneratedStoredAttributesMethods + sig { returns(T.untyped) } + def prefs_power_source; end + + sig { params(value: T.untyped).returns(T.untyped) } + def prefs_power_source=(value); end + + sig { returns(T.untyped) } + def prefs_power_source_before_last_save; end + + sig { returns(T.untyped) } + def prefs_power_source_change; end + + sig { returns(T::Boolean) } + def prefs_power_source_changed?; end + + sig { returns(T.untyped) } + def prefs_power_source_was; end + + sig { returns(T.untyped) } + def saved_change_to_prefs_power_source; end + + sig { returns(T::Boolean) } + def saved_change_to_prefs_power_source?; end + + sig { returns(T.untyped) } + def saved_change_to_theme; end + + sig { returns(T::Boolean) } + def saved_change_to_theme?; end + + sig { returns(T.untyped) } + def theme; end + + sig { params(value: T.untyped).returns(T.untyped) } + def theme=(value); end + + sig { returns(T.untyped) } + def theme_before_last_save; end + + sig { returns(T.untyped) } + def theme_change; end + + sig { returns(T::Boolean) } + def theme_changed?; end + + sig { returns(T.untyped) } + def theme_was; end + end +end +~~~ diff --git a/manual/compiler_activesupportcurrentattributes.md b/manual/compiler_activesupportcurrentattributes.md index c8c4a9239..c3bb8c24e 100644 --- a/manual/compiler_activesupportcurrentattributes.md +++ b/manual/compiler_activesupportcurrentattributes.md @@ -28,22 +28,28 @@ this compiler will produce an RBI file with the following content: # typed: true class Current - sig { returns(T.untyped) } - def self.account; end + include GeneratedAttributeMethods - sig { returns(T.untyped) } - def account; end + class << self + sig { returns(T.untyped) } + def account; end - sig { params(account: T.untyped).returns(T.untyped) } - def self.account=(account); end + sig { params(account: T.untyped).returns(T.untyped) } + def account=(account); end - sig { params(account: T.untyped).returns(T.untyped) } - def account=(account); end + sig { params(user_id: Integer).void } + def authenticate(user_id); end - sig { params(user_id: Integer).void } - def self.authenticate(user_id); end + sig { returns(T.untyped) } + def helper; end + end - sig { returns(T.untyped) } - def self.helper; end + module GeneratedAttributeMethods + sig { returns(T.untyped) } + def account; end + + sig { params(account: T.untyped).returns(T.untyped) } + def account=(account); end + end end ~~~ diff --git a/manual/compilers.md b/manual/compilers.md index 9ae482a9c..44e8f976d 100644 --- a/manual/compilers.md +++ b/manual/compilers.md @@ -6,9 +6,11 @@ In the following section you will find all available DSL compilers: * [AASM](compiler_aasm.md) * [ActionControllerHelpers](compiler_actioncontrollerhelpers.md) * [ActionMailer](compiler_actionmailer.md) +* [ActionText](compiler_actiontext.md) * [ActiveJob](compiler_activejob.md) * [ActiveModelAttributes](compiler_activemodelattributes.md) * [ActiveModelSecurePassword](compiler_activemodelsecurepassword.md) +* [ActiveModelValidationsConfirmation](compiler_activemodelvalidationsconfirmation.md) * [ActiveRecordAssociations](compiler_activerecordassociations.md) * [ActiveRecordColumns](compiler_activerecordcolumns.md) * [ActiveRecordDelegatedTypes](compiler_activerecorddelegatedtypes.md) @@ -17,6 +19,7 @@ In the following section you will find all available DSL compilers: * [ActiveRecordRelations](compiler_activerecordrelations.md) * [ActiveRecordScope](compiler_activerecordscope.md) * [ActiveRecordSecureToken](compiler_activerecordsecuretoken.md) +* [ActiveRecordStore](compiler_activerecordstore.md) * [ActiveRecordTypedStore](compiler_activerecordtypedstore.md) * [ActiveResource](compiler_activeresource.md) * [ActiveStorage](compiler_activestorage.md) diff --git a/sorbet/rbi/dsl/.gitattributes b/sorbet/rbi/dsl/.gitattributes new file mode 100644 index 000000000..d9bb82a4d --- /dev/null +++ b/sorbet/rbi/dsl/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-generated=true diff --git a/sorbet/rbi/dsl/active_support/callbacks.rbi b/sorbet/rbi/dsl/active_support/callbacks.rbi new file mode 100644 index 000000000..646f9950b --- /dev/null +++ b/sorbet/rbi/dsl/active_support/callbacks.rbi @@ -0,0 +1,22 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveSupport::Callbacks`. +# Please instead update this file by running `bin/tapioca dsl ActiveSupport::Callbacks`. + +module ActiveSupport::Callbacks + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def __callbacks?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def __callbacks?; end + end +end diff --git a/sorbet/rbi/gems/.gitattributes b/sorbet/rbi/gems/.gitattributes new file mode 100644 index 000000000..d9bb82a4d --- /dev/null +++ b/sorbet/rbi/gems/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-generated=true diff --git a/sorbet/rbi/gems/actioncable@7.0.6.rbi b/sorbet/rbi/gems/actioncable@7.1.3.2.rbi similarity index 78% rename from sorbet/rbi/gems/actioncable@7.0.6.rbi rename to sorbet/rbi/gems/actioncable@7.1.3.2.rbi index 87051014b..15c6e1a0f 100644 --- a/sorbet/rbi/gems/actioncable@7.0.6.rbi +++ b/sorbet/rbi/gems/actioncable@7.1.3.2.rbi @@ -4,40 +4,44 @@ # This is an autogenerated file for types exported from the `actioncable` gem. # Please instead update this file by running `bin/tapioca gem actioncable`. -# source://actioncable//lib/action_cable/gem_version.rb#3 +# :markup: markdown +# :include: actioncable/README.md +# +# source://actioncable//lib/action_cable.rb#48 module ActionCable - extend ::ActiveSupport::Autoload - private # Singleton instance of the server # - # source://actioncable//lib/action_cable.rb#51 + # source://actioncable//lib/action_cable.rb#71 def server; end class << self - # Returns the currently loaded version of Action Cable as a Gem::Version. + # source://actioncable//lib/action_cable/deprecator.rb#4 + def deprecator; end + + # Returns the currently loaded version of Action Cable as a +Gem::Version+. # # source://actioncable//lib/action_cable/gem_version.rb#5 def gem_version; end # Singleton instance of the server # - # source://actioncable//lib/action_cable.rb#51 + # source://actioncable//lib/action_cable.rb#71 def server; end - # Returns the currently loaded version of Action Cable as a Gem::Version. + # Returns the currently loaded version of Action Cable as a +Gem::Version+. # # source://actioncable//lib/action_cable/version.rb#7 def version; end end end -# source://actioncable//lib/action_cable/channel.rb#4 -module ActionCable::Channel - extend ::ActiveSupport::Autoload -end +# source://actioncable//lib/action_cable/channel/base.rb#8 +module ActionCable::Channel; end +# = Action Cable \Channel \Base +# # The channel provides the basic structure of grouping behavior into logical units when communicating over the WebSocket connection. # You can think of a channel like a form of controller, but one that's capable of pushing content to the subscriber in addition to simply # responding to the subscriber's direct requests. @@ -128,7 +132,7 @@ end # client-side, the Channel#rejected callback will get invoked when # the server rejects the subscription request. # -# source://actioncable//lib/action_cable/channel/base.rb#97 +# source://actioncable//lib/action_cable/channel/base.rb#100 class ActionCable::Channel::Base include ::ActiveSupport::Callbacks include ::ActionCable::Channel::Callbacks @@ -147,166 +151,178 @@ class ActionCable::Channel::Base # @return [Base] a new instance of Base # - # source://actioncable//lib/action_cable/channel/base.rb#144 + # source://actioncable//lib/action_cable/channel/base.rb#147 def initialize(connection, identifier, params = T.unsafe(nil)); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_subscribe_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_unsubscribe_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _subscribe_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _unsubscribe_callbacks; end + # source://actioncable//lib/action_cable/channel/broadcasting.rb#11 + def broadcast_to(model, message, &block); end + + # source://actioncable//lib/action_cable/channel/broadcasting.rb#11 + def broadcasting_for(model, &block); end + + # source://actioncable//lib/action_cable/channel/naming.rb#23 + def channel_name(&block); end + # Returns the value of attribute connection. # - # source://actioncable//lib/action_cable/channel/base.rb#105 + # source://actioncable//lib/action_cable/channel/base.rb#108 def connection; end # Returns the value of attribute identifier. # - # source://actioncable//lib/action_cable/channel/base.rb#105 + # source://actioncable//lib/action_cable/channel/base.rb#108 def identifier; end - # source://actioncable//lib/action_cable/channel/base.rb#106 + # source://actioncable//lib/action_cable/channel/base.rb#109 def logger(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute params. # - # source://actioncable//lib/action_cable/channel/base.rb#105 + # source://actioncable//lib/action_cable/channel/base.rb#108 def params; end # Extract the action name from the passed data and process it via the channel. The process will ensure # that the action requested is a public method on the channel declared by the user (so not one of the callbacks # like #subscribed). # - # source://actioncable//lib/action_cable/channel/base.rb#164 + # source://actioncable//lib/action_cable/channel/base.rb#167 def perform_action(data); end # source://actioncable//lib/action_cable/channel/periodic_timers.rb#9 def periodic_timers=(_arg0); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # This method is called after subscription has been added to the connection # and confirms or rejects the subscription. # - # source://actioncable//lib/action_cable/channel/base.rb#179 + # source://actioncable//lib/action_cable/channel/base.rb#182 def subscribe_to_channel; end # Called by the cable connection when it's cut, so the channel has a chance to cleanup with callbacks. # This method is not intended to be called directly by the user. Instead, override the #unsubscribed callback. # - # source://actioncable//lib/action_cable/channel/base.rb#190 + # source://actioncable//lib/action_cable/channel/base.rb#193 def unsubscribe_from_channel; end private - # source://actioncable//lib/action_cable/channel/base.rb#276 + # source://actioncable//lib/action_cable/channel/base.rb#281 def action_signature(action, data); end - # source://actioncable//lib/action_cable/channel/base.rb#228 + # source://actioncable//lib/action_cable/channel/base.rb#233 def defer_subscription_confirmation!; end # @return [Boolean] # - # source://actioncable//lib/action_cable/channel/base.rb#232 + # source://actioncable//lib/action_cable/channel/base.rb#237 def defer_subscription_confirmation?; end - # source://actioncable//lib/action_cable/channel/base.rb#248 + # source://actioncable//lib/action_cable/channel/base.rb#253 def delegate_connection_identifiers; end - # source://actioncable//lib/action_cable/channel/base.rb#264 + # source://actioncable//lib/action_cable/channel/base.rb#269 def dispatch_action(action, data); end - # source://actioncable//lib/action_cable/channel/base.rb#222 + # source://actioncable//lib/action_cable/channel/base.rb#227 def ensure_confirmation_sent; end - # source://actioncable//lib/action_cable/channel/base.rb#256 + # source://actioncable//lib/action_cable/channel/base.rb#261 def extract_action(data); end + # source://actioncable//lib/action_cable/channel/base.rb#292 + def parameter_filter; end + # @return [Boolean] # - # source://actioncable//lib/action_cable/channel/base.rb#260 + # source://actioncable//lib/action_cable/channel/base.rb#265 def processable_action?(action); end - # source://actioncable//lib/action_cable/channel/base.rb#240 + # source://actioncable//lib/action_cable/channel/base.rb#245 def reject; end - # source://actioncable//lib/action_cable/channel/base.rb#295 + # source://actioncable//lib/action_cable/channel/base.rb#307 def reject_subscription; end # Called once a consumer has become a subscriber of the channel. Usually the place to set up any streams # you want this channel to be sending to the subscriber. # - # source://actioncable//lib/action_cable/channel/base.rb#199 + # source://actioncable//lib/action_cable/channel/base.rb#202 def subscribed; end # @return [Boolean] # - # source://actioncable//lib/action_cable/channel/base.rb#236 + # source://actioncable//lib/action_cable/channel/base.rb#241 def subscription_confirmation_sent?; end # @return [Boolean] # - # source://actioncable//lib/action_cable/channel/base.rb#244 + # source://actioncable//lib/action_cable/channel/base.rb#249 def subscription_rejected?; end # Transmit a hash of data to the subscriber. The hash will automatically be wrapped in a JSON envelope with # the proper channel identifier marked as the recipient. # - # source://actioncable//lib/action_cable/channel/base.rb#211 + # source://actioncable//lib/action_cable/channel/base.rb#214 def transmit(data, via: T.unsafe(nil)); end - # source://actioncable//lib/action_cable/channel/base.rb#284 + # source://actioncable//lib/action_cable/channel/base.rb#296 def transmit_subscription_confirmation; end - # source://actioncable//lib/action_cable/channel/base.rb#300 + # source://actioncable//lib/action_cable/channel/base.rb#312 def transmit_subscription_rejection; end # Called once a consumer has cut its cable connection. Can be used for cleaning up connections or marking # users as offline or the like. # - # source://actioncable//lib/action_cable/channel/base.rb#205 + # source://actioncable//lib/action_cable/channel/base.rb#208 def unsubscribed; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _subscribe_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _subscribe_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _unsubscribe_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _unsubscribe_callbacks=(value); end # A list of method names that should be considered actions. This @@ -318,7 +334,7 @@ class ActionCable::Channel::Base # ==== Returns # * Set - A set of all methods that should be considered actions. # - # source://actioncable//lib/action_cable/channel/base.rb#117 + # source://actioncable//lib/action_cable/channel/base.rb#120 def action_methods; end # source://actioncable//lib/action_cable/channel/periodic_timers.rb#9 @@ -330,13 +346,13 @@ class ActionCable::Channel::Base # source://actioncable//lib/action_cable/channel/periodic_timers.rb#9 def periodic_timers?; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end private @@ -345,12 +361,12 @@ class ActionCable::Channel::Base # them. ::clear_action_methods! allows you to do that, so next time # you run action_methods, they will be recalculated. # - # source://actioncable//lib/action_cable/channel/base.rb#133 + # source://actioncable//lib/action_cable/channel/base.rb#136 def clear_action_methods!; end # Refresh the cached action_methods when a new action_method is added. # - # source://actioncable//lib/action_cable/channel/base.rb#138 + # source://actioncable//lib/action_cable/channel/base.rb#141 def method_added(name); end end end @@ -360,19 +376,13 @@ module ActionCable::Channel::Broadcasting extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionCable::Channel::Broadcasting::ClassMethods - - # source://actioncable//lib/action_cable/channel/broadcasting.rb#10 - def broadcast_to(*_arg0, **_arg1, &_arg2); end - - # source://actioncable//lib/action_cable/channel/broadcasting.rb#10 - def broadcasting_for(*_arg0, **_arg1, &_arg2); end end -# source://actioncable//lib/action_cable/channel/broadcasting.rb#12 +# source://actioncable//lib/action_cable/channel/broadcasting.rb#14 module ActionCable::Channel::Broadcasting::ClassMethods # Broadcast a hash to a unique broadcasting for this model in this channel. # - # source://actioncable//lib/action_cable/channel/broadcasting.rb#14 + # source://actioncable//lib/action_cable/channel/broadcasting.rb#16 def broadcast_to(model, message); end # Returns a unique broadcasting identifier for this model in this channel: @@ -382,14 +392,42 @@ module ActionCable::Channel::Broadcasting::ClassMethods # You can pass any object as a target (e.g. Active Record model), and it # would be serialized into a string under the hood. # - # source://actioncable//lib/action_cable/channel/broadcasting.rb#24 + # source://actioncable//lib/action_cable/channel/broadcasting.rb#26 def broadcasting_for(model); end - # source://actioncable//lib/action_cable/channel/broadcasting.rb#28 + # source://actioncable//lib/action_cable/channel/broadcasting.rb#30 def serialize_broadcasting(object); end end -# source://actioncable//lib/action_cable/channel/callbacks.rb#7 +# = Action Cable \Channel \Callbacks +# +# Action Cable Channel provides callback hooks that are invoked during the +# life cycle of a channel: +# +# * {before_subscribe}[rdoc-ref:ClassMethods#before_subscribe] +# * {after_subscribe}[rdoc-ref:ClassMethods#after_subscribe] (aliased as +# {on_subscribe}[rdoc-ref:ClassMethods#on_subscribe]) +# * {before_unsubscribe}[rdoc-ref:ClassMethods#before_unsubscribe] +# * {after_unsubscribe}[rdoc-ref:ClassMethods#after_unsubscribe] (aliased as +# {on_unsubscribe}[rdoc-ref:ClassMethods#on_unsubscribe]) +# +# ==== Example +# +# class ChatChannel < ApplicationCable::Channel +# after_subscribe :send_welcome_message, unless: :subscription_rejected? +# after_subscribe :track_subscription +# +# private +# def send_welcome_message +# broadcast_to(...) +# end +# +# def track_subscription +# # ... +# end +# end +# +# source://actioncable//lib/action_cable/channel/callbacks.rb#35 module ActionCable::Channel::Callbacks extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -412,99 +450,130 @@ module ActionCable::Channel::Callbacks end end -# source://actioncable//lib/action_cable/channel/callbacks.rb#16 +# source://actioncable//lib/action_cable/channel/callbacks.rb#44 module ActionCable::Channel::Callbacks::ClassMethods - # source://actioncable//lib/action_cable/channel/callbacks.rb#21 + # This callback will be triggered after the Base#subscribed method is + # called, even if the subscription was rejected with the Base#reject + # method. + # + # To trigger the callback only on successful subscriptions, use the + # Base#subscription_rejected? method: + # + # after_subscribe :my_method, unless: :subscription_rejected? + # + # source://actioncable//lib/action_cable/channel/callbacks.rb#58 def after_subscribe(*methods, &block); end - # source://actioncable//lib/action_cable/channel/callbacks.rb#30 + # source://actioncable//lib/action_cable/channel/callbacks.rb#67 def after_unsubscribe(*methods, &block); end - # source://actioncable//lib/action_cable/channel/callbacks.rb#17 + # source://actioncable//lib/action_cable/channel/callbacks.rb#45 def before_subscribe(*methods, &block); end - # source://actioncable//lib/action_cable/channel/callbacks.rb#26 + # source://actioncable//lib/action_cable/channel/callbacks.rb#63 def before_unsubscribe(*methods, &block); end - # source://actioncable//lib/action_cable/channel/callbacks.rb#21 + # This callback will be triggered after the Base#subscribed method is + # called, even if the subscription was rejected with the Base#reject + # method. + # + # To trigger the callback only on successful subscriptions, use the + # Base#subscription_rejected? method: + # + # after_subscribe :my_method, unless: :subscription_rejected? + # + # source://actioncable//lib/action_cable/channel/callbacks.rb#58 def on_subscribe(*methods, &block); end - # source://actioncable//lib/action_cable/channel/callbacks.rb#30 + # source://actioncable//lib/action_cable/channel/callbacks.rb#67 def on_unsubscribe(*methods, &block); end end +# = Action Cable \Channel Stub +# # Stub +stream_from+ to track streams for the channel. # Add public aliases for +subscription_confirmation_sent?+ and # +subscription_rejected?+. # -# source://actioncable//lib/action_cable/channel/test_case.rb#21 +# source://actioncable//lib/action_cable/channel/test_case.rb#23 module ActionCable::Channel::ChannelStub # @return [Boolean] # - # source://actioncable//lib/action_cable/channel/test_case.rb#22 + # source://actioncable//lib/action_cable/channel/test_case.rb#24 def confirmed?; end # @return [Boolean] # - # source://actioncable//lib/action_cable/channel/test_case.rb#26 + # source://actioncable//lib/action_cable/channel/test_case.rb#28 def rejected?; end # Make periodic timers no-op # - # source://actioncable//lib/action_cable/channel/test_case.rb#43 + # source://actioncable//lib/action_cable/channel/test_case.rb#45 def start_periodic_timers; end - # source://actioncable//lib/action_cable/channel/test_case.rb#34 + # source://actioncable//lib/action_cable/channel/test_case.rb#36 def stop_all_streams; end # Make periodic timers no-op # - # source://actioncable//lib/action_cable/channel/test_case.rb#43 + # source://actioncable//lib/action_cable/channel/test_case.rb#45 def stop_periodic_timers; end - # source://actioncable//lib/action_cable/channel/test_case.rb#30 + # source://actioncable//lib/action_cable/channel/test_case.rb#32 def stream_from(broadcasting, *_arg1); end - # source://actioncable//lib/action_cable/channel/test_case.rb#38 + # source://actioncable//lib/action_cable/channel/test_case.rb#40 def streams; end end -# source://actioncable//lib/action_cable/channel/test_case.rb#47 +# source://actioncable//lib/action_cable/channel/test_case.rb#49 class ActionCable::Channel::ConnectionStub # @return [ConnectionStub] a new instance of ConnectionStub # - # source://actioncable//lib/action_cable/channel/test_case.rb#50 + # source://actioncable//lib/action_cable/channel/test_case.rb#54 def initialize(identifiers = T.unsafe(nil)); end - # source://actioncable//lib/action_cable/channel/test_case.rb#66 + # source://actioncable//lib/action_cable/channel/test_case.rb#52 + def config(*_arg0, **_arg1, &_arg2); end + + # source://actioncable//lib/action_cable/channel/test_case.rb#71 def connection_identifier; end # Returns the value of attribute identifiers. # - # source://actioncable//lib/action_cable/channel/test_case.rb#48 + # source://actioncable//lib/action_cable/channel/test_case.rb#50 def identifiers; end # Returns the value of attribute logger. # - # source://actioncable//lib/action_cable/channel/test_case.rb#48 + # source://actioncable//lib/action_cable/channel/test_case.rb#50 def logger; end + # source://actioncable//lib/action_cable/channel/test_case.rb#52 + def pubsub(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute server. + # + # source://actioncable//lib/action_cable/channel/test_case.rb#50 + def server; end + # Returns the value of attribute subscriptions. # - # source://actioncable//lib/action_cable/channel/test_case.rb#48 + # source://actioncable//lib/action_cable/channel/test_case.rb#50 def subscriptions; end # Returns the value of attribute transmissions. # - # source://actioncable//lib/action_cable/channel/test_case.rb#48 + # source://actioncable//lib/action_cable/channel/test_case.rb#50 def transmissions; end - # source://actioncable//lib/action_cable/channel/test_case.rb#62 + # source://actioncable//lib/action_cable/channel/test_case.rb#67 def transmit(cable_message); end private - # source://actioncable//lib/action_cable/channel/test_case.rb#71 + # source://actioncable//lib/action_cable/channel/test_case.rb#76 def connection_gid(ids); end end @@ -513,9 +582,6 @@ module ActionCable::Channel::Naming extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionCable::Channel::Naming::ClassMethods - - # source://actioncable//lib/action_cable/channel/naming.rb#22 - def channel_name(*_arg0, **_arg1, &_arg2); end end # source://actioncable//lib/action_cable/channel/naming.rb#8 @@ -594,6 +660,8 @@ module ActionCable::Channel::PeriodicTimers::ClassMethods def periodically(callback_or_method_name = T.unsafe(nil), every:, &block); end end +# = Action Cable \Channel \Streams +# # Streams allow channels to route broadcastings to the subscriber. A broadcasting is, as discussed elsewhere, a pubsub queue where any data # placed into it is automatically sent to the clients that are connected at that time. It's purely an online queue, though. If you're not # streaming a broadcasting at the very moment it sends out an update, you will not get that update, even if you connect after it has been sent. @@ -655,26 +723,26 @@ end # # You can stop streaming from all broadcasts by calling #stop_all_streams. # -# source://actioncable//lib/action_cable/channel/streams.rb#65 +# source://actioncable//lib/action_cable/channel/streams.rb#67 module ActionCable::Channel::Streams extend ::ActiveSupport::Concern - # source://actioncable//lib/action_cable/channel/streams.rb#138 + # source://actioncable//lib/action_cable/channel/streams.rb#140 def pubsub(*_arg0, **_arg1, &_arg2); end # Unsubscribes all streams associated with this channel from the pubsub queue. # - # source://actioncable//lib/action_cable/channel/streams.rb#120 + # source://actioncable//lib/action_cable/channel/streams.rb#122 def stop_all_streams; end # Unsubscribes streams for the model. # - # source://actioncable//lib/action_cable/channel/streams.rb#115 + # source://actioncable//lib/action_cable/channel/streams.rb#117 def stop_stream_for(model); end # Unsubscribes streams from the named broadcasting. # - # source://actioncable//lib/action_cable/channel/streams.rb#106 + # source://actioncable//lib/action_cable/channel/streams.rb#108 def stop_stream_from(broadcasting); end # Start streaming the pubsub queue for the model in this channel. Optionally, you can pass a @@ -684,7 +752,7 @@ module ActionCable::Channel::Streams # Pass coder: ActiveSupport::JSON to decode messages as JSON before passing to the callback. # Defaults to coder: nil which does no decoding, passes raw messages. # - # source://actioncable//lib/action_cable/channel/streams.rb#101 + # source://actioncable//lib/action_cable/channel/streams.rb#103 def stream_for(model, callback = T.unsafe(nil), coder: T.unsafe(nil), &block); end # Start streaming from the named broadcasting pubsub queue. Optionally, you can pass a callback that'll be used @@ -692,13 +760,13 @@ module ActionCable::Channel::Streams # Pass coder: ActiveSupport::JSON to decode messages as JSON before passing to the callback. # Defaults to coder: nil which does no decoding, passes raw messages. # - # source://actioncable//lib/action_cable/channel/streams.rb#76 + # source://actioncable//lib/action_cable/channel/streams.rb#78 def stream_from(broadcasting, callback = T.unsafe(nil), coder: T.unsafe(nil), &block); end # Calls stream_for with the given model if it's present to start streaming, # otherwise rejects the subscription. # - # source://actioncable//lib/action_cable/channel/streams.rb#129 + # source://actioncable//lib/action_cable/channel/streams.rb#131 def stream_or_reject_for(model); end private @@ -712,13 +780,13 @@ module ActionCable::Channel::Streams # so we can no-op when pubsub and connection are both JSON-encoded. # Then we can skip decode+encode if we're just proxying messages. # - # source://actioncable//lib/action_cable/channel/streams.rb#174 + # source://actioncable//lib/action_cable/channel/streams.rb#176 def default_stream_handler(broadcasting, coder:); end - # source://actioncable//lib/action_cable/channel/streams.rb#195 + # source://actioncable//lib/action_cable/channel/streams.rb#197 def identity_handler; end - # source://actioncable//lib/action_cable/channel/streams.rb#179 + # source://actioncable//lib/action_cable/channel/streams.rb#181 def stream_decoder(handler = T.unsafe(nil), coder:); end # May be overridden to add instrumentation, logging, specialized error @@ -726,19 +794,19 @@ module ActionCable::Channel::Streams # # TODO: Tests demonstrating this. # - # source://actioncable//lib/action_cable/channel/streams.rb#158 + # source://actioncable//lib/action_cable/channel/streams.rb#160 def stream_handler(broadcasting, user_handler, coder: T.unsafe(nil)); end - # source://actioncable//lib/action_cable/channel/streams.rb#187 + # source://actioncable//lib/action_cable/channel/streams.rb#189 def stream_transmitter(handler = T.unsafe(nil), broadcasting:); end - # source://actioncable//lib/action_cable/channel/streams.rb#140 + # source://actioncable//lib/action_cable/channel/streams.rb#142 def streams; end # Always wrap the outermost handler to invoke the user handler on the # worker pool rather than blocking the event loop. # - # source://actioncable//lib/action_cable/channel/streams.rb#146 + # source://actioncable//lib/action_cable/channel/streams.rb#148 def worker_pool_stream_handler(broadcasting, user_handler, coder: T.unsafe(nil)); end end @@ -842,7 +910,7 @@ end # end # end # -# source://actioncable//lib/action_cable/channel/test_case.rb#181 +# source://actioncable//lib/action_cable/channel/test_case.rb#186 class ActionCable::Channel::TestCase < ::ActiveSupport::TestCase include ::ActiveSupport::Testing::ConstantLookup include ::ActionCable::TestHelper @@ -850,34 +918,34 @@ class ActionCable::Channel::TestCase < ::ActiveSupport::TestCase extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods extend ::ActionCable::Channel::TestCase::Behavior::ClassMethods - # source://actioncable//lib/action_cable/channel/test_case.rb#191 + # source://actioncable//lib/action_cable/channel/test_case.rb#196 def _channel_class; end - # source://actioncable//lib/action_cable/channel/test_case.rb#191 + # source://actioncable//lib/action_cable/channel/test_case.rb#196 def _channel_class=(_arg0); end - # source://actioncable//lib/action_cable/channel/test_case.rb#191 + # source://actioncable//lib/action_cable/channel/test_case.rb#196 def _channel_class?; end - # source://actioncable//lib/action_cable/channel/test_case.rb#193 + # source://actioncable//lib/action_cable/channel/test_case.rb#198 def connection; end - # source://actioncable//lib/action_cable/channel/test_case.rb#193 + # source://actioncable//lib/action_cable/channel/test_case.rb#198 def subscription; end class << self - # source://actioncable//lib/action_cable/channel/test_case.rb#191 + # source://actioncable//lib/action_cable/channel/test_case.rb#196 def _channel_class; end - # source://actioncable//lib/action_cable/channel/test_case.rb#191 + # source://actioncable//lib/action_cable/channel/test_case.rb#196 def _channel_class=(value); end - # source://actioncable//lib/action_cable/channel/test_case.rb#191 + # source://actioncable//lib/action_cable/channel/test_case.rb#196 def _channel_class?; end end end -# source://actioncable//lib/action_cable/channel/test_case.rb#182 +# source://actioncable//lib/action_cable/channel/test_case.rb#187 module ActionCable::Channel::TestCase::Behavior include ::ActionCable::TestHelper extend ::ActiveSupport::Concern @@ -888,13 +956,13 @@ module ActionCable::Channel::TestCase::Behavior mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods mixes_in_class_methods ::ActionCable::Channel::TestCase::Behavior::ClassMethods - # source://actioncable//lib/action_cable/channel/test_case.rb#273 + # source://actioncable//lib/action_cable/channel/test_case.rb#278 def assert_broadcast_on(stream_or_object, *args); end # Enhance TestHelper assertions to handle non-String # broadcastings # - # source://actioncable//lib/action_cable/channel/test_case.rb#269 + # source://actioncable//lib/action_cable/channel/test_case.rb#274 def assert_broadcasts(stream_or_object, *args); end # Asserts that the specified stream has been started. @@ -904,7 +972,7 @@ module ActionCable::Channel::TestCase::Behavior # assert_has_stream 'messages' # end # - # source://actioncable//lib/action_cable/channel/test_case.rb#295 + # source://actioncable//lib/action_cable/channel/test_case.rb#300 def assert_has_stream(stream); end # Asserts that the specified stream for a model has started. @@ -914,7 +982,7 @@ module ActionCable::Channel::TestCase::Behavior # assert_has_stream_for User.find(42) # end # - # source://actioncable//lib/action_cable/channel/test_case.rb#306 + # source://actioncable//lib/action_cable/channel/test_case.rb#311 def assert_has_stream_for(object); end # Asserts that no streams have been started. @@ -924,14 +992,14 @@ module ActionCable::Channel::TestCase::Behavior # assert_no_streams # end # - # source://actioncable//lib/action_cable/channel/test_case.rb#284 + # source://actioncable//lib/action_cable/channel/test_case.rb#289 def assert_no_streams; end # Perform action on a channel. # # NOTE: Must be subscribed. # - # source://actioncable//lib/action_cable/channel/test_case.rb#256 + # source://actioncable//lib/action_cable/channel/test_case.rb#261 def perform(action, data = T.unsafe(nil)); end # Set up test connection with the specified identifiers: @@ -942,30 +1010,30 @@ module ActionCable::Channel::TestCase::Behavior # # stub_connection(user: users[:john], token: 'my-secret-token') # - # source://actioncable//lib/action_cable/channel/test_case.rb#234 + # source://actioncable//lib/action_cable/channel/test_case.rb#239 def stub_connection(identifiers = T.unsafe(nil)); end # Subscribe to the channel under test. Optionally pass subscription parameters as a Hash. # - # source://actioncable//lib/action_cable/channel/test_case.rb#239 + # source://actioncable//lib/action_cable/channel/test_case.rb#244 def subscribe(params = T.unsafe(nil)); end # Returns messages transmitted into channel # - # source://actioncable//lib/action_cable/channel/test_case.rb#262 + # source://actioncable//lib/action_cable/channel/test_case.rb#267 def transmissions; end # Unsubscribe the subscription under test. # - # source://actioncable//lib/action_cable/channel/test_case.rb#248 + # source://actioncable//lib/action_cable/channel/test_case.rb#253 def unsubscribe; end private - # source://actioncable//lib/action_cable/channel/test_case.rb#315 + # source://actioncable//lib/action_cable/channel/test_case.rb#320 def broadcasting_for(stream_or_object); end - # source://actioncable//lib/action_cable/channel/test_case.rb#311 + # source://actioncable//lib/action_cable/channel/test_case.rb#316 def check_subscribed!; end module GeneratedClassMethods @@ -981,27 +1049,25 @@ module ActionCable::Channel::TestCase::Behavior end end -# source://actioncable//lib/action_cable/channel/test_case.rb#188 +# source://actioncable//lib/action_cable/channel/test_case.rb#193 ActionCable::Channel::TestCase::Behavior::CHANNEL_IDENTIFIER = T.let(T.unsafe(nil), String) -# source://actioncable//lib/action_cable/channel/test_case.rb#198 +# source://actioncable//lib/action_cable/channel/test_case.rb#203 module ActionCable::Channel::TestCase::Behavior::ClassMethods - # source://actioncable//lib/action_cable/channel/test_case.rb#210 + # source://actioncable//lib/action_cable/channel/test_case.rb#215 def channel_class; end # @raise [NonInferrableChannelError] # - # source://actioncable//lib/action_cable/channel/test_case.rb#218 + # source://actioncable//lib/action_cable/channel/test_case.rb#223 def determine_default_channel(name); end - # source://actioncable//lib/action_cable/channel/test_case.rb#199 + # source://actioncable//lib/action_cable/channel/test_case.rb#204 def tests(channel); end end -# source://actioncable//lib/action_cable/connection.rb#4 -module ActionCable::Connection - extend ::ActiveSupport::Autoload -end +# source://actioncable//lib/action_cable/connection/identification.rb#6 +module ActionCable::Connection; end # source://actioncable//lib/action_cable/connection/test_case.rb#20 module ActionCable::Connection::Assertions @@ -1016,7 +1082,7 @@ end # source://actioncable//lib/action_cable/connection/authorization.rb#5 module ActionCable::Connection::Authorization - # Closes the WebSocket connection if it is open and returns a 404 "File not Found" response. + # Closes the WebSocket connection if it is open and returns an "unauthorized" reason. # # @raise [UnauthorizedError] # @@ -1027,6 +1093,8 @@ end # source://actioncable//lib/action_cable/connection/authorization.rb#6 class ActionCable::Connection::Authorization::UnauthorizedError < ::StandardError; end +# = Action Cable \Connection \Base +# # For every WebSocket connection the Action Cable server accepts, a Connection object will be instantiated. This instance becomes the parent # of all of the channel subscriptions that are created from there on. Incoming messages are then routed to these channel subscriptions # based on an identifier sent by the Action Cable consumer. The Connection itself does not deal with any specific application logic beyond @@ -1066,39 +1134,62 @@ class ActionCable::Connection::Authorization::UnauthorizedError < ::StandardErro # # Pretty simple, eh? # -# source://actioncable//lib/action_cable/connection/base.rb#46 +# source://actioncable//lib/action_cable/connection/base.rb#48 class ActionCable::Connection::Base include ::ActionCable::Connection::Identification include ::ActionCable::Connection::InternalChannel include ::ActionCable::Connection::Authorization + include ::ActiveSupport::Callbacks + include ::ActionCable::Connection::Callbacks include ::ActiveSupport::Rescuable extend ::ActionCable::Connection::Identification::ClassMethods + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::ActiveSupport::DescendantsTracker + extend ::ActionCable::Connection::Callbacks::ClassMethods extend ::ActiveSupport::Rescuable::ClassMethods # @return [Base] a new instance of Base # - # source://actioncable//lib/action_cable/connection/base.rb#55 + # source://actioncable//lib/action_cable/connection/base.rb#58 def initialize(server, env, coder: T.unsafe(nil)); end - # source://actioncable//lib/action_cable/connection/base.rb#125 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 + def __callbacks; end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 + def __callbacks?; end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 + def _command_callbacks; end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 + def _run_command_callbacks(&block); end + + # source://actioncable//lib/action_cable/connection/base.rb#134 def beat; end # Close the WebSocket connection. # - # source://actioncable//lib/action_cable/connection/base.rb#100 + # source://actioncable//lib/action_cable/connection/base.rb#109 def close(reason: T.unsafe(nil), reconnect: T.unsafe(nil)); end - # source://actioncable//lib/action_cable/connection/base.rb#87 + # source://actioncable//lib/action_cable/connection/base.rb#56 + def config(*_arg0, **_arg1, &_arg2); end + + # source://actioncable//lib/action_cable/connection/base.rb#90 def dispatch_websocket_message(websocket_message); end # Returns the value of attribute env. # - # source://actioncable//lib/action_cable/connection/base.rb#52 + # source://actioncable//lib/action_cable/connection/base.rb#55 def env; end - # source://actioncable//lib/action_cable/connection/base.rb#53 + # source://actioncable//lib/action_cable/connection/base.rb#56 def event_loop(*_arg0, **_arg1, &_arg2); end + # source://actioncable//lib/action_cable/connection/base.rb#98 + def handle_channel_command(payload); end + # source://actioncable//lib/action_cable/connection/identification.rb#11 def identifiers; end @@ -1108,147 +1199,165 @@ class ActionCable::Connection::Base # source://actioncable//lib/action_cable/connection/identification.rb#11 def identifiers?; end + # source://actioncable//lib/action_cable/connection/base.rb#155 + def inspect; end + # Returns the value of attribute logger. # - # source://actioncable//lib/action_cable/connection/base.rb#52 + # source://actioncable//lib/action_cable/connection/base.rb#55 def logger; end - # source://actioncable//lib/action_cable/connection/base.rb#142 + # source://actioncable//lib/action_cable/connection/base.rb#151 def on_close(reason, code); end - # source://actioncable//lib/action_cable/connection/base.rb#137 + # source://actioncable//lib/action_cable/connection/base.rb#146 def on_error(message); end - # source://actioncable//lib/action_cable/connection/base.rb#133 + # source://actioncable//lib/action_cable/connection/base.rb#142 def on_message(message); end - # source://actioncable//lib/action_cable/connection/base.rb#129 + # source://actioncable//lib/action_cable/connection/base.rb#138 def on_open; end # Called by the server when a new WebSocket connection is established. This configures the callbacks intended for overwriting by the user. # This method should not be called directly -- instead rely upon on the #connect (and #disconnect) callbacks. # - # source://actioncable//lib/action_cable/connection/base.rb#71 + # source://actioncable//lib/action_cable/connection/base.rb#74 def process; end # Returns the value of attribute protocol. # - # source://actioncable//lib/action_cable/connection/base.rb#52 + # source://actioncable//lib/action_cable/connection/base.rb#55 def protocol; end - # source://actioncable//lib/action_cable/connection/base.rb#53 + # source://actioncable//lib/action_cable/connection/base.rb#56 def pubsub(*_arg0, **_arg1, &_arg2); end # Decodes WebSocket messages and dispatches them to subscribed channels. # WebSocket message transfer encoding is always JSON. # - # source://actioncable//lib/action_cable/connection/base.rb#83 + # source://actioncable//lib/action_cable/connection/base.rb#86 def receive(websocket_message); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # Invoke a method on the connection asynchronously through the pool of thread workers. # - # source://actioncable//lib/action_cable/connection/base.rb#110 + # source://actioncable//lib/action_cable/connection/base.rb#119 def send_async(method, *arguments); end # Returns the value of attribute server. # - # source://actioncable//lib/action_cable/connection/base.rb#52 + # source://actioncable//lib/action_cable/connection/base.rb#55 def server; end # Return a basic hash of statistics for the connection keyed with identifier, started_at, subscriptions, and request_id. # This can be returned by a health check against the connection. # - # source://actioncable//lib/action_cable/connection/base.rb#116 + # source://actioncable//lib/action_cable/connection/base.rb#125 def statistics; end # Returns the value of attribute subscriptions. # - # source://actioncable//lib/action_cable/connection/base.rb#52 + # source://actioncable//lib/action_cable/connection/base.rb#55 def subscriptions; end - # source://actioncable//lib/action_cable/connection/base.rb#95 + # source://actioncable//lib/action_cable/connection/base.rb#104 def transmit(cable_message); end # Returns the value of attribute worker_pool. # - # source://actioncable//lib/action_cable/connection/base.rb#52 + # source://actioncable//lib/action_cable/connection/base.rb#55 def worker_pool; end private # @return [Boolean] # - # source://actioncable//lib/action_cable/connection/base.rb#201 + # source://actioncable//lib/action_cable/connection/base.rb#214 def allow_request_origin?; end # The cookies of the request that initiated the WebSocket connection. Useful for performing authorization checks. # - # source://actioncable//lib/action_cable/connection/base.rb#159 + # source://actioncable//lib/action_cable/connection/base.rb#172 def cookies; end - # source://actioncable//lib/action_cable/connection/base.rb#167 + # source://actioncable//lib/action_cable/connection/base.rb#180 def decode(websocket_message); end - # source://actioncable//lib/action_cable/connection/base.rb#163 + # source://actioncable//lib/action_cable/connection/base.rb#176 def encode(cable_message); end - # source://actioncable//lib/action_cable/connection/base.rb#243 + # source://actioncable//lib/action_cable/connection/base.rb#256 def finished_request_message; end - # source://actioncable//lib/action_cable/connection/base.rb#183 + # source://actioncable//lib/action_cable/connection/base.rb#196 def handle_close; end - # source://actioncable//lib/action_cable/connection/base.rb#171 + # source://actioncable//lib/action_cable/connection/base.rb#184 def handle_open; end - # source://actioncable//lib/action_cable/connection/base.rb#251 + # source://actioncable//lib/action_cable/connection/base.rb#264 def invalid_request_message; end # Returns the value of attribute message_buffer. # - # source://actioncable//lib/action_cable/connection/base.rb#148 + # source://actioncable//lib/action_cable/connection/base.rb#161 def message_buffer; end # Tags are declared in the server but computed in the connection. This allows us per-connection tailored tags. # - # source://actioncable//lib/action_cable/connection/base.rb#229 + # source://actioncable//lib/action_cable/connection/base.rb#242 def new_tagged_logger; end # The request that initiated the WebSocket connection is available here. This gives access to the environment, cookies, etc. # - # source://actioncable//lib/action_cable/connection/base.rb#151 + # source://actioncable//lib/action_cable/connection/base.rb#164 def request; end - # source://actioncable//lib/action_cable/connection/base.rb#220 + # source://actioncable//lib/action_cable/connection/base.rb#233 def respond_to_invalid_request; end - # source://actioncable//lib/action_cable/connection/base.rb#215 + # source://actioncable//lib/action_cable/connection/base.rb#228 def respond_to_successful_request; end - # source://actioncable//lib/action_cable/connection/base.rb#194 + # source://actioncable//lib/action_cable/connection/base.rb#207 def send_welcome_message; end - # source://actioncable//lib/action_cable/connection/base.rb#234 + # source://actioncable//lib/action_cable/connection/base.rb#247 def started_request_message; end - # source://actioncable//lib/action_cable/connection/base.rb#257 + # source://actioncable//lib/action_cable/connection/base.rb#270 def successful_request_message; end # Returns the value of attribute websocket. # - # source://actioncable//lib/action_cable/connection/base.rb#147 + # source://actioncable//lib/action_cable/connection/base.rb#160 def websocket; end class << self + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 + def __callbacks; end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 + def __callbacks=(value); end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 + def __callbacks?; end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 + def _command_callbacks; end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 + def _command_callbacks=(value); end + # source://actioncable//lib/action_cable/connection/identification.rb#11 def identifiers; end @@ -1258,17 +1367,77 @@ class ActionCable::Connection::Base # source://actioncable//lib/action_cable/connection/identification.rb#11 def identifiers?; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end end end +# = Action Cable \Connection \Callbacks +# +# The {before_command}[rdoc-ref:ClassMethods#before_command], +# {after_command}[rdoc-ref:ClassMethods#after_command], and +# {around_command}[rdoc-ref:ClassMethods#around_command] callbacks are +# invoked when sending commands to the client, such as when subscribing, +# unsubscribing, or performing an action. +# +# ==== Example +# +# module ApplicationCable +# class Connection < ActionCable::Connection::Base +# identified_by :user +# +# around_command :set_current_account +# +# private +# +# def set_current_account +# # Now all channels could use Current.account +# Current.set(account: user.account) { yield } +# end +# end +# end +# +# source://actioncable//lib/action_cable/connection/callbacks.rb#32 +module ActionCable::Connection::Callbacks + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActiveSupport::Callbacks + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods + mixes_in_class_methods ::ActiveSupport::DescendantsTracker + mixes_in_class_methods ::ActionCable::Connection::Callbacks::ClassMethods + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def __callbacks?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def __callbacks?; end + end +end + +# source://actioncable//lib/action_cable/connection/callbacks.rb#40 +module ActionCable::Connection::Callbacks::ClassMethods + # source://actioncable//lib/action_cable/connection/callbacks.rb#45 + def after_command(*methods, &block); end + + # source://actioncable//lib/action_cable/connection/callbacks.rb#49 + def around_command(*methods, &block); end + + # source://actioncable//lib/action_cable/connection/callbacks.rb#41 + def before_command(*methods, &block); end +end + # source://actioncable//lib/action_cable/connection/client_socket.rb#11 class ActionCable::Connection::ClientSocket # @return [ClientSocket] a new instance of ClientSocket @@ -1398,24 +1567,26 @@ module ActionCable::Connection::Identification::ClassMethods def identified_by(*identifiers); end end +# = Action Cable \InternalChannel +# # Makes it possible for the RemoteConnection to disconnect a specific connection. # -# source://actioncable//lib/action_cable/connection/internal_channel.rb#6 +# source://actioncable//lib/action_cable/connection/internal_channel.rb#8 module ActionCable::Connection::InternalChannel extend ::ActiveSupport::Concern private - # source://actioncable//lib/action_cable/connection/internal_channel.rb#10 + # source://actioncable//lib/action_cable/connection/internal_channel.rb#12 def internal_channel; end - # source://actioncable//lib/action_cable/connection/internal_channel.rb#31 + # source://actioncable//lib/action_cable/connection/internal_channel.rb#33 def process_internal_message(message); end - # source://actioncable//lib/action_cable/connection/internal_channel.rb#14 + # source://actioncable//lib/action_cable/connection/internal_channel.rb#16 def subscribe_to_internal_channel; end - # source://actioncable//lib/action_cable/connection/internal_channel.rb#25 + # source://actioncable//lib/action_cable/connection/internal_channel.rb#27 def unsubscribe_from_internal_channel; end end @@ -1474,173 +1645,179 @@ class ActionCable::Connection::NonInferrableConnectionError < ::StandardError def initialize(name); end end -# source://actioncable//lib/action_cable/connection/stream.rb#11 +# source://actioncable//lib/action_cable/connection/stream.rb#9 class ActionCable::Connection::Stream # @return [Stream] a new instance of Stream # - # source://actioncable//lib/action_cable/connection/stream.rb#12 + # source://actioncable//lib/action_cable/connection/stream.rb#10 def initialize(event_loop, socket); end - # source://actioncable//lib/action_cable/connection/stream.rb#28 + # source://actioncable//lib/action_cable/connection/stream.rb#26 def close; end - # source://actioncable//lib/action_cable/connection/stream.rb#24 + # source://actioncable//lib/action_cable/connection/stream.rb#22 def each(&callback); end - # source://actioncable//lib/action_cable/connection/stream.rb#72 + # source://actioncable//lib/action_cable/connection/stream.rb#70 def flush_write_buffer; end - # source://actioncable//lib/action_cable/connection/stream.rb#98 + # source://actioncable//lib/action_cable/connection/stream.rb#96 def hijack_rack_socket; end - # source://actioncable//lib/action_cable/connection/stream.rb#94 + # source://actioncable//lib/action_cable/connection/stream.rb#92 def receive(data); end - # source://actioncable//lib/action_cable/connection/stream.rb#33 + # source://actioncable//lib/action_cable/connection/stream.rb#31 def shutdown; end - # source://actioncable//lib/action_cable/connection/stream.rb#37 + # source://actioncable//lib/action_cable/connection/stream.rb#35 def write(data); end private - # source://actioncable//lib/action_cable/connection/stream.rb#110 + # source://actioncable//lib/action_cable/connection/stream.rb#108 def clean_rack_hijack; end end -# source://actioncable//lib/action_cable/connection/stream_event_loop.rb#8 +# source://actioncable//lib/action_cable/connection/stream_event_loop.rb#7 class ActionCable::Connection::StreamEventLoop # @return [StreamEventLoop] a new instance of StreamEventLoop # - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#9 + # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#8 def initialize; end - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#29 + # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#28 def attach(io, stream); end - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#37 + # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#36 def detach(io, stream); end - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#22 + # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#21 def post(task = T.unsafe(nil), &block); end - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#55 + # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#54 def stop; end - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#18 + # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#17 def timer(interval, &block); end - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#46 + # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#45 def writes_pending(io); end private - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#85 + # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#84 def run; end - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#61 + # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#60 def spawn; end - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#81 + # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#80 def wakeup; end end +# = Action Cable \Connection \Subscriptions +# # Collection class for all the channel subscriptions established on a given connection. Responsible for routing incoming commands that arrive on # the connection to the proper channel. # -# source://actioncable//lib/action_cable/connection/subscriptions.rb#9 +# source://actioncable//lib/action_cable/connection/subscriptions.rb#11 class ActionCable::Connection::Subscriptions # @return [Subscriptions] a new instance of Subscriptions # - # source://actioncable//lib/action_cable/connection/subscriptions.rb#10 + # source://actioncable//lib/action_cable/connection/subscriptions.rb#12 def initialize(connection); end - # source://actioncable//lib/action_cable/connection/subscriptions.rb#28 + # source://actioncable//lib/action_cable/connection/subscriptions.rb#30 def add(data); end - # source://actioncable//lib/action_cable/connection/subscriptions.rb#15 + # source://actioncable//lib/action_cable/connection/subscriptions.rb#17 def execute_command(data); end - # source://actioncable//lib/action_cable/connection/subscriptions.rb#59 + # source://actioncable//lib/action_cable/connection/subscriptions.rb#61 def identifiers; end - # source://actioncable//lib/action_cable/connection/subscriptions.rb#69 + # source://actioncable//lib/action_cable/connection/subscriptions.rb#71 def logger(*_arg0, **_arg1, &_arg2); end - # source://actioncable//lib/action_cable/connection/subscriptions.rb#55 + # source://actioncable//lib/action_cable/connection/subscriptions.rb#57 def perform_action(data); end - # source://actioncable//lib/action_cable/connection/subscriptions.rb#45 + # source://actioncable//lib/action_cable/connection/subscriptions.rb#47 def remove(data); end - # source://actioncable//lib/action_cable/connection/subscriptions.rb#50 + # source://actioncable//lib/action_cable/connection/subscriptions.rb#52 def remove_subscription(subscription); end - # source://actioncable//lib/action_cable/connection/subscriptions.rb#63 + # source://actioncable//lib/action_cable/connection/subscriptions.rb#65 def unsubscribe_from_all; end private # Returns the value of attribute connection. # - # source://actioncable//lib/action_cable/connection/subscriptions.rb#68 + # source://actioncable//lib/action_cable/connection/subscriptions.rb#70 def connection; end - # source://actioncable//lib/action_cable/connection/subscriptions.rb#71 + # source://actioncable//lib/action_cable/connection/subscriptions.rb#73 def find(data); end # Returns the value of attribute subscriptions. # - # source://actioncable//lib/action_cable/connection/subscriptions.rb#68 + # source://actioncable//lib/action_cable/connection/subscriptions.rb#70 def subscriptions; end end +# = Action Cable \Connection \TaggedLoggerProxy +# # Allows the use of per-connection tags against the server logger. This wouldn't work using the traditional # ActiveSupport::TaggedLogging enhanced Rails.logger, as that logger will reset the tags between requests. # The connection is long-lived, so it needs its own set of tags for its independent duration. # -# source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#8 +# source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#10 class ActionCable::Connection::TaggedLoggerProxy # @return [TaggedLoggerProxy] a new instance of TaggedLoggerProxy # - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#11 + # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#13 def initialize(logger, tags:); end - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#16 + # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#18 def add_tags(*tags); end - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#31 - def debug(message); end + # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#33 + def debug(message = T.unsafe(nil), &block); end - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#31 - def error(message); end + # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#33 + def error(message = T.unsafe(nil), &block); end - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#31 - def fatal(message); end + # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#33 + def fatal(message = T.unsafe(nil), &block); end - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#31 - def info(message); end + # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#33 + def info(message = T.unsafe(nil), &block); end - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#21 + # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#23 def tag(logger, &block); end # Returns the value of attribute tags. # - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#9 + # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#11 def tags; end - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#31 - def unknown(message); end + # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#33 + def unknown(message = T.unsafe(nil), &block); end - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#31 - def warn(message); end + # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#33 + def warn(message = T.unsafe(nil), &block); end private - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#37 - def log(type, message); end + # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#39 + def log(type, message, &block); end end +# = Action Cable \Connection \TestCase +# # Unit test Action Cable connections. # # Useful to check whether a connection's +identified_by+ gets assigned properly @@ -1701,7 +1878,7 @@ end # assert_equal "1", connection.user_id # end # -# == Connection is automatically inferred +# == \Connection is automatically inferred # # ActionCable::Connection::TestCase will automatically infer the connection under test # from the test class name. If the channel cannot be inferred from the test @@ -1711,7 +1888,7 @@ end # tests ApplicationCable::Connection # end # -# source://actioncable//lib/action_cable/connection/test_case.rb#129 +# source://actioncable//lib/action_cable/connection/test_case.rb#131 class ActionCable::Connection::TestCase < ::ActiveSupport::TestCase include ::ActiveSupport::Testing::ConstantLookup include ::ActionCable::Connection::Assertions @@ -1719,31 +1896,31 @@ class ActionCable::Connection::TestCase < ::ActiveSupport::TestCase extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods extend ::ActionCable::Connection::TestCase::Behavior::ClassMethods - # source://actioncable//lib/action_cable/connection/test_case.rb#139 + # source://actioncable//lib/action_cable/connection/test_case.rb#141 def _connection_class; end - # source://actioncable//lib/action_cable/connection/test_case.rb#139 + # source://actioncable//lib/action_cable/connection/test_case.rb#141 def _connection_class=(_arg0); end - # source://actioncable//lib/action_cable/connection/test_case.rb#139 + # source://actioncable//lib/action_cable/connection/test_case.rb#141 def _connection_class?; end - # source://actioncable//lib/action_cable/connection/test_case.rb#141 + # source://actioncable//lib/action_cable/connection/test_case.rb#143 def connection; end class << self - # source://actioncable//lib/action_cable/connection/test_case.rb#139 + # source://actioncable//lib/action_cable/connection/test_case.rb#141 def _connection_class; end - # source://actioncable//lib/action_cable/connection/test_case.rb#139 + # source://actioncable//lib/action_cable/connection/test_case.rb#141 def _connection_class=(value); end - # source://actioncable//lib/action_cable/connection/test_case.rb#139 + # source://actioncable//lib/action_cable/connection/test_case.rb#141 def _connection_class?; end end end -# source://actioncable//lib/action_cable/connection/test_case.rb#130 +# source://actioncable//lib/action_cable/connection/test_case.rb#132 module ActionCable::Connection::TestCase::Behavior include ::ActionCable::Connection::Assertions extend ::ActiveSupport::Concern @@ -1763,20 +1940,20 @@ module ActionCable::Connection::TestCase::Behavior # - session – session data (Hash) # - env – additional Rack env configuration (Hash) # - # source://actioncable//lib/action_cable/connection/test_case.rb#183 + # source://actioncable//lib/action_cable/connection/test_case.rb#185 def connect(path = T.unsafe(nil), **request_params); end - # source://actioncable//lib/action_cable/connection/test_case.rb#203 + # source://actioncable//lib/action_cable/connection/test_case.rb#205 def cookies; end # Exert #disconnect on the connection under test. # - # source://actioncable//lib/action_cable/connection/test_case.rb#196 + # source://actioncable//lib/action_cable/connection/test_case.rb#198 def disconnect; end private - # source://actioncable//lib/action_cable/connection/test_case.rb#208 + # source://actioncable//lib/action_cable/connection/test_case.rb#210 def build_test_request(path, params: T.unsafe(nil), headers: T.unsafe(nil), session: T.unsafe(nil), env: T.unsafe(nil)); end module GeneratedClassMethods @@ -1792,21 +1969,21 @@ module ActionCable::Connection::TestCase::Behavior end end -# source://actioncable//lib/action_cable/connection/test_case.rb#146 +# source://actioncable//lib/action_cable/connection/test_case.rb#148 module ActionCable::Connection::TestCase::Behavior::ClassMethods - # source://actioncable//lib/action_cable/connection/test_case.rb#158 + # source://actioncable//lib/action_cable/connection/test_case.rb#160 def connection_class; end # @raise [NonInferrableConnectionError] # - # source://actioncable//lib/action_cable/connection/test_case.rb#166 + # source://actioncable//lib/action_cable/connection/test_case.rb#168 def determine_default_connection(name); end - # source://actioncable//lib/action_cable/connection/test_case.rb#147 + # source://actioncable//lib/action_cable/connection/test_case.rb#149 def tests(connection); end end -# source://actioncable//lib/action_cable/connection/test_case.rb#133 +# source://actioncable//lib/action_cable/connection/test_case.rb#135 ActionCable::Connection::TestCase::Behavior::DEFAULT_PATH = T.let(T.unsafe(nil), String) # source://actioncable//lib/action_cable/connection/test_case.rb#47 @@ -1865,49 +2042,51 @@ class ActionCable::Connection::TestRequest < ::ActionDispatch::TestRequest def session=(_arg0); end end +# = Action Cable \Connection \WebSocket +# # Wrap the real socket to minimize the externally-presented API # -# source://actioncable//lib/action_cable/connection/web_socket.rb#8 +# source://actioncable//lib/action_cable/connection/web_socket.rb#10 class ActionCable::Connection::WebSocket # @return [WebSocket] a new instance of WebSocket # - # source://actioncable//lib/action_cable/connection/web_socket.rb#9 + # source://actioncable//lib/action_cable/connection/web_socket.rb#11 def initialize(env, event_target, event_loop, protocols: T.unsafe(nil)); end # @return [Boolean] # - # source://actioncable//lib/action_cable/connection/web_socket.rb#17 + # source://actioncable//lib/action_cable/connection/web_socket.rb#19 def alive?; end - # source://actioncable//lib/action_cable/connection/web_socket.rb#25 + # source://actioncable//lib/action_cable/connection/web_socket.rb#27 def close; end # @return [Boolean] # - # source://actioncable//lib/action_cable/connection/web_socket.rb#13 + # source://actioncable//lib/action_cable/connection/web_socket.rb#15 def possible?; end - # source://actioncable//lib/action_cable/connection/web_socket.rb#29 + # source://actioncable//lib/action_cable/connection/web_socket.rb#31 def protocol; end - # source://actioncable//lib/action_cable/connection/web_socket.rb#33 + # source://actioncable//lib/action_cable/connection/web_socket.rb#35 def rack_response; end - # source://actioncable//lib/action_cable/connection/web_socket.rb#21 + # source://actioncable//lib/action_cable/connection/web_socket.rb#23 def transmit(data); end private # Returns the value of attribute websocket. # - # source://actioncable//lib/action_cable/connection/web_socket.rb#38 + # source://actioncable//lib/action_cable/connection/web_socket.rb#40 def websocket; end end -# source://actioncable//lib/action_cable/engine.rb#9 +# source://actioncable//lib/action_cable/engine.rb#8 class ActionCable::Engine < ::Rails::Engine class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end end end @@ -1949,9 +2128,11 @@ module ActionCable::Helpers::ActionCableHelper def action_cable_meta_tag; end end -# source://actioncable//lib/action_cable.rb#33 +# source://actioncable//lib/action_cable.rb#52 ActionCable::INTERNAL = T.let(T.unsafe(nil), Hash) +# = Action Cable Remote Connections +# # If you need to disconnect a given connection, you can go through the # RemoteConnections. You can find the connections you're looking for by # searching for the identifier declared on the connection. For example: @@ -1969,26 +2150,33 @@ ActionCable::INTERNAL = T.let(T.unsafe(nil), Hash) # User.find(1), across all servers running on all machines, because # it uses the internal channel that all of these servers are subscribed to. # -# source://actioncable//lib/action_cable/remote_connections.rb#22 +# By default, server sends a "disconnect" message with "reconnect" flag set to true. +# You can override it by specifying the +reconnect+ option: +# +# ActionCable.server.remote_connections.where(current_user: User.find(1)).disconnect(reconnect: false) +# +# source://actioncable//lib/action_cable/remote_connections.rb#29 class ActionCable::RemoteConnections # @return [RemoteConnections] a new instance of RemoteConnections # - # source://actioncable//lib/action_cable/remote_connections.rb#25 + # source://actioncable//lib/action_cable/remote_connections.rb#32 def initialize(server); end # Returns the value of attribute server. # - # source://actioncable//lib/action_cable/remote_connections.rb#23 + # source://actioncable//lib/action_cable/remote_connections.rb#30 def server; end - # source://actioncable//lib/action_cable/remote_connections.rb#29 + # source://actioncable//lib/action_cable/remote_connections.rb#36 def where(identifier); end end +# = Action Cable Remote \Connection +# # Represents a single remote connection found via ActionCable.server.remote_connections.where(*). # Exists solely for the purpose of calling #disconnect on that connection. # -# source://actioncable//lib/action_cable/remote_connections.rb#36 +# source://actioncable//lib/action_cable/remote_connections.rb#45 class ActionCable::RemoteConnections::RemoteConnection include ::ActionCable::Connection::InternalChannel include ::ActionCable::Connection::Identification @@ -1996,15 +2184,15 @@ class ActionCable::RemoteConnections::RemoteConnection # @return [RemoteConnection] a new instance of RemoteConnection # - # source://actioncable//lib/action_cable/remote_connections.rb#41 + # source://actioncable//lib/action_cable/remote_connections.rb#50 def initialize(server, ids); end # Uses the internal channel to disconnect the connection. # - # source://actioncable//lib/action_cable/remote_connections.rb#47 - def disconnect; end + # source://actioncable//lib/action_cable/remote_connections.rb#56 + def disconnect(reconnect: T.unsafe(nil)); end - # source://actioncable//lib/action_cable/remote_connections.rb#52 + # source://actioncable//lib/action_cable/remote_connections.rb#61 def identifiers; end # source://actioncable//lib/action_cable/connection/identification.rb#11 @@ -2017,19 +2205,19 @@ class ActionCable::RemoteConnections::RemoteConnection # Returns the value of attribute server. # - # source://actioncable//lib/action_cable/remote_connections.rb#57 + # source://actioncable//lib/action_cable/remote_connections.rb#66 def server; end private # @raise [InvalidIdentifiersError] # - # source://actioncable//lib/action_cable/remote_connections.rb#60 + # source://actioncable//lib/action_cable/remote_connections.rb#69 def set_identifier_instance_vars(ids); end # @return [Boolean] # - # source://actioncable//lib/action_cable/remote_connections.rb#65 + # source://actioncable//lib/action_cable/remote_connections.rb#74 def valid_identifiers?(ids); end class << self @@ -2044,71 +2232,71 @@ class ActionCable::RemoteConnections::RemoteConnection end end -# source://actioncable//lib/action_cable/remote_connections.rb#37 +# source://actioncable//lib/action_cable/remote_connections.rb#46 class ActionCable::RemoteConnections::RemoteConnection::InvalidIdentifiersError < ::StandardError; end -# source://actioncable//lib/action_cable/server.rb#4 -module ActionCable::Server - extend ::ActiveSupport::Autoload -end +# source://actioncable//lib/action_cable/server/base.rb#6 +module ActionCable::Server; end +# = Action Cable \Server \Base +# # A singleton ActionCable::Server instance is available via ActionCable.server. It's used by the Rack process that starts the Action Cable server, but # is also used by the user to reach the RemoteConnections object, which is used for finding and disconnecting connections across all servers. # # Also, this is the server instance used for broadcasting. See Broadcasting for more information. # -# source://actioncable//lib/action_cable/server/base.rb#11 +# source://actioncable//lib/action_cable/server/base.rb#13 class ActionCable::Server::Base include ::ActionCable::Server::Broadcasting include ::ActionCable::Server::Connections # @return [Base] a new instance of Base # - # source://actioncable//lib/action_cable/server/base.rb#24 + # source://actioncable//lib/action_cable/server/base.rb#26 def initialize(config: T.unsafe(nil)); end # Called by Rack to set up the server. # - # source://actioncable//lib/action_cable/server/base.rb#31 + # source://actioncable//lib/action_cable/server/base.rb#33 def call(env); end # Returns the value of attribute config. # - # source://actioncable//lib/action_cable/server/base.rb#17 + # source://actioncable//lib/action_cable/server/base.rb#19 def config; end # All of the identifiers applied to the connection class associated with this server. # - # source://actioncable//lib/action_cable/server/base.rb#87 + # source://actioncable//lib/action_cable/server/base.rb#90 def connection_identifiers; end # Disconnect all the connections identified by +identifiers+ on this server or any others via RemoteConnections. # - # source://actioncable//lib/action_cable/server/base.rb#37 + # source://actioncable//lib/action_cable/server/base.rb#40 def disconnect(identifiers); end - # source://actioncable//lib/action_cable/server/base.rb#62 + # source://actioncable//lib/action_cable/server/base.rb#65 def event_loop; end - # source://actioncable//lib/action_cable/server/base.rb#20 + # source://actioncable//lib/action_cable/server/base.rb#22 def logger(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute mutex. # - # source://actioncable//lib/action_cable/server/base.rb#22 + # source://actioncable//lib/action_cable/server/base.rb#24 def mutex; end # Adapter used for all streams/broadcasting. # - # source://actioncable//lib/action_cable/server/base.rb#82 + # source://actioncable//lib/action_cable/server/base.rb#85 def pubsub; end # Gateway to RemoteConnections. See that class for details. # - # source://actioncable//lib/action_cable/server/base.rb#58 + # source://actioncable//lib/action_cable/server/base.rb#61 def remote_connections; end - # source://actioncable//lib/action_cable/server/base.rb#41 + # source://actioncable//lib/action_cable/server/base.rb#44 def restart; end # The worker pool is where we run connection callbacks and channel actions. We do as little as possible on the server's main thread. @@ -2123,21 +2311,23 @@ class ActionCable::Server::Base # the database connection pool and block while they wait for other workers to release their connections. Use a smaller worker pool or a larger # database connection pool instead. # - # source://actioncable//lib/action_cable/server/base.rb#77 + # source://actioncable//lib/action_cable/server/base.rb#80 def worker_pool; end class << self - # source://actioncable//lib/action_cable/server/base.rb#15 + # source://actioncable//lib/action_cable/server/base.rb#17 def config; end - # source://actioncable//lib/action_cable/server/base.rb#15 + # source://actioncable//lib/action_cable/server/base.rb#17 def config=(val); end - # source://actioncable//lib/action_cable/server/base.rb#19 + # source://actioncable//lib/action_cable/server/base.rb#21 def logger; end end end +# = Action Cable \Server \Broadcasting +# # Broadcasting is how other parts of your application can send messages to a channel's subscribers. As explained in Channel, most of the time, these # broadcastings are streamed directly to the clients subscribed to the named broadcasting. Let's explain with a full-stack example: # @@ -2156,227 +2346,267 @@ end # received: (data) -> # new Notification data['title'], body: data['body'] # -# source://actioncable//lib/action_cable/server/broadcasting.rb#22 +# source://actioncable//lib/action_cable/server/broadcasting.rb#24 module ActionCable::Server::Broadcasting # Broadcast a hash directly to a named broadcasting. This will later be JSON encoded. # - # source://actioncable//lib/action_cable/server/broadcasting.rb#24 + # source://actioncable//lib/action_cable/server/broadcasting.rb#26 def broadcast(broadcasting, message, coder: T.unsafe(nil)); end # Returns a broadcaster for a named broadcasting that can be reused. Useful when you have an object that # may need multiple spots to transmit to a specific broadcasting over and over. # - # source://actioncable//lib/action_cable/server/broadcasting.rb#30 + # source://actioncable//lib/action_cable/server/broadcasting.rb#32 def broadcaster_for(broadcasting, coder: T.unsafe(nil)); end end -# source://actioncable//lib/action_cable/server/broadcasting.rb#35 +# source://actioncable//lib/action_cable/server/broadcasting.rb#37 class ActionCable::Server::Broadcasting::Broadcaster # @return [Broadcaster] a new instance of Broadcaster # - # source://actioncable//lib/action_cable/server/broadcasting.rb#38 + # source://actioncable//lib/action_cable/server/broadcasting.rb#40 def initialize(server, broadcasting, coder:); end - # source://actioncable//lib/action_cable/server/broadcasting.rb#42 + # source://actioncable//lib/action_cable/server/broadcasting.rb#44 def broadcast(message); end # Returns the value of attribute broadcasting. # - # source://actioncable//lib/action_cable/server/broadcasting.rb#36 + # source://actioncable//lib/action_cable/server/broadcasting.rb#38 def broadcasting; end # Returns the value of attribute coder. # - # source://actioncable//lib/action_cable/server/broadcasting.rb#36 + # source://actioncable//lib/action_cable/server/broadcasting.rb#38 def coder; end # Returns the value of attribute server. # - # source://actioncable//lib/action_cable/server/broadcasting.rb#36 + # source://actioncable//lib/action_cable/server/broadcasting.rb#38 def server; end end +# = Action Cable \Server \Configuration +# # An instance of this configuration object is available via ActionCable.server.config, which allows you to tweak Action Cable configuration -# in a Rails config initializer. +# in a \Rails config initializer. # -# source://actioncable//lib/action_cable/server/configuration.rb#7 +# source://actioncable//lib/action_cable/server/configuration.rb#11 class ActionCable::Server::Configuration # @return [Configuration] a new instance of Configuration # - # source://actioncable//lib/action_cable/server/configuration.rb#14 + # source://actioncable//lib/action_cable/server/configuration.rb#19 def initialize; end # Returns the value of attribute allow_same_origin_as_host. # - # source://actioncable//lib/action_cable/server/configuration.rb#10 + # source://actioncable//lib/action_cable/server/configuration.rb#14 def allow_same_origin_as_host; end # Sets the attribute allow_same_origin_as_host # # @param value the value to set the attribute allow_same_origin_as_host to. # - # source://actioncable//lib/action_cable/server/configuration.rb#10 + # source://actioncable//lib/action_cable/server/configuration.rb#14 def allow_same_origin_as_host=(_arg0); end # Returns the value of attribute allowed_request_origins. # - # source://actioncable//lib/action_cable/server/configuration.rb#10 + # source://actioncable//lib/action_cable/server/configuration.rb#14 def allowed_request_origins; end # Sets the attribute allowed_request_origins # # @param value the value to set the attribute allowed_request_origins to. # - # source://actioncable//lib/action_cable/server/configuration.rb#10 + # source://actioncable//lib/action_cable/server/configuration.rb#14 def allowed_request_origins=(_arg0); end # Returns the value of attribute cable. # - # source://actioncable//lib/action_cable/server/configuration.rb#11 + # source://actioncable//lib/action_cable/server/configuration.rb#15 def cable; end # Sets the attribute cable # # @param value the value to set the attribute cable to. # - # source://actioncable//lib/action_cable/server/configuration.rb#11 + # source://actioncable//lib/action_cable/server/configuration.rb#15 def cable=(_arg0); end # Returns the value of attribute connection_class. # - # source://actioncable//lib/action_cable/server/configuration.rb#9 + # source://actioncable//lib/action_cable/server/configuration.rb#13 def connection_class; end # Sets the attribute connection_class # # @param value the value to set the attribute connection_class to. # - # source://actioncable//lib/action_cable/server/configuration.rb#9 + # source://actioncable//lib/action_cable/server/configuration.rb#13 def connection_class=(_arg0); end # Returns the value of attribute disable_request_forgery_protection. # - # source://actioncable//lib/action_cable/server/configuration.rb#10 + # source://actioncable//lib/action_cable/server/configuration.rb#14 def disable_request_forgery_protection; end # Sets the attribute disable_request_forgery_protection # # @param value the value to set the attribute disable_request_forgery_protection to. # - # source://actioncable//lib/action_cable/server/configuration.rb#10 + # source://actioncable//lib/action_cable/server/configuration.rb#14 def disable_request_forgery_protection=(_arg0); end + # Returns the value of attribute filter_parameters. + # + # source://actioncable//lib/action_cable/server/configuration.rb#14 + def filter_parameters; end + + # Sets the attribute filter_parameters + # + # @param value the value to set the attribute filter_parameters to. + # + # source://actioncable//lib/action_cable/server/configuration.rb#14 + def filter_parameters=(_arg0); end + + # Returns the value of attribute health_check_application. + # + # source://actioncable//lib/action_cable/server/configuration.rb#17 + def health_check_application; end + + # Sets the attribute health_check_application + # + # @param value the value to set the attribute health_check_application to. + # + # source://actioncable//lib/action_cable/server/configuration.rb#17 + def health_check_application=(_arg0); end + + # Returns the value of attribute health_check_path. + # + # source://actioncable//lib/action_cable/server/configuration.rb#17 + def health_check_path; end + + # Sets the attribute health_check_path + # + # @param value the value to set the attribute health_check_path to. + # + # source://actioncable//lib/action_cable/server/configuration.rb#17 + def health_check_path=(_arg0); end + # Returns the value of attribute log_tags. # - # source://actioncable//lib/action_cable/server/configuration.rb#8 + # source://actioncable//lib/action_cable/server/configuration.rb#12 def log_tags; end # Sets the attribute log_tags # # @param value the value to set the attribute log_tags to. # - # source://actioncable//lib/action_cable/server/configuration.rb#8 + # source://actioncable//lib/action_cable/server/configuration.rb#12 def log_tags=(_arg0); end # Returns the value of attribute logger. # - # source://actioncable//lib/action_cable/server/configuration.rb#8 + # source://actioncable//lib/action_cable/server/configuration.rb#12 def logger; end # Sets the attribute logger # # @param value the value to set the attribute logger to. # - # source://actioncable//lib/action_cable/server/configuration.rb#8 + # source://actioncable//lib/action_cable/server/configuration.rb#12 def logger=(_arg0); end # Returns the value of attribute mount_path. # - # source://actioncable//lib/action_cable/server/configuration.rb#11 + # source://actioncable//lib/action_cable/server/configuration.rb#15 def mount_path; end # Sets the attribute mount_path # # @param value the value to set the attribute mount_path to. # - # source://actioncable//lib/action_cable/server/configuration.rb#11 + # source://actioncable//lib/action_cable/server/configuration.rb#15 def mount_path=(_arg0); end # Returns the value of attribute precompile_assets. # - # source://actioncable//lib/action_cable/server/configuration.rb#12 + # source://actioncable//lib/action_cable/server/configuration.rb#16 def precompile_assets; end # Sets the attribute precompile_assets # # @param value the value to set the attribute precompile_assets to. # - # source://actioncable//lib/action_cable/server/configuration.rb#12 + # source://actioncable//lib/action_cable/server/configuration.rb#16 def precompile_assets=(_arg0); end # Returns constant of subscription adapter specified in config/cable.yml. # If the adapter cannot be found, this will default to the Redis adapter. # Also makes sure proper dependencies are required. # - # source://actioncable//lib/action_cable/server/configuration.rb#27 + # source://actioncable//lib/action_cable/server/configuration.rb#37 def pubsub_adapter; end # Returns the value of attribute url. # - # source://actioncable//lib/action_cable/server/configuration.rb#11 + # source://actioncable//lib/action_cable/server/configuration.rb#15 def url; end # Sets the attribute url # # @param value the value to set the attribute url to. # - # source://actioncable//lib/action_cable/server/configuration.rb#11 + # source://actioncable//lib/action_cable/server/configuration.rb#15 def url=(_arg0); end # Returns the value of attribute worker_pool_size. # - # source://actioncable//lib/action_cable/server/configuration.rb#9 + # source://actioncable//lib/action_cable/server/configuration.rb#13 def worker_pool_size; end # Sets the attribute worker_pool_size # # @param value the value to set the attribute worker_pool_size to. # - # source://actioncable//lib/action_cable/server/configuration.rb#9 + # source://actioncable//lib/action_cable/server/configuration.rb#13 def worker_pool_size=(_arg0); end end +# = Action Cable \Server \Connections +# # Collection class for all the connections that have been established on this specific server. Remember, usually you'll run many Action Cable servers, so # you can't use this collection as a full list of all of the connections established against your application. Instead, use RemoteConnections for that. # -# source://actioncable//lib/action_cable/server/connections.rb#7 +# source://actioncable//lib/action_cable/server/connections.rb#9 module ActionCable::Server::Connections - # source://actioncable//lib/action_cable/server/connections.rb#14 + # source://actioncable//lib/action_cable/server/connections.rb#16 def add_connection(connection); end - # source://actioncable//lib/action_cable/server/connections.rb#10 + # source://actioncable//lib/action_cable/server/connections.rb#12 def connections; end - # source://actioncable//lib/action_cable/server/connections.rb#31 + # source://actioncable//lib/action_cable/server/connections.rb#33 def open_connections_statistics; end - # source://actioncable//lib/action_cable/server/connections.rb#18 + # source://actioncable//lib/action_cable/server/connections.rb#20 def remove_connection(connection); end # WebSocket connection implementations differ on when they'll mark a connection as stale. We basically never want a connection to go stale, as you # then can't rely on being able to communicate with the connection. To solve this, a 3 second heartbeat runs on all connections. If the beat fails, we automatically # disconnect. # - # source://actioncable//lib/action_cable/server/connections.rb#25 + # source://actioncable//lib/action_cable/server/connections.rb#27 def setup_heartbeat_timer; end end -# source://actioncable//lib/action_cable/server/connections.rb#8 +# source://actioncable//lib/action_cable/server/connections.rb#10 ActionCable::Server::Connections::BEAT_INTERVAL = T.let(T.unsafe(nil), Integer) # Worker used by Server.send_async to do connection work in threads. # -# source://actioncable//lib/action_cable/server/worker/active_record_connection_management.rb#5 +# source://actioncable//lib/action_cable/server/worker.rb#10 class ActionCable::Server::Worker include ::ActiveSupport::Callbacks include ::ActionCable::Server::Worker::ActiveRecordConnectionManagement @@ -2385,80 +2615,80 @@ class ActionCable::Server::Worker # @return [Worker] a new instance of Worker # - # source://actioncable//lib/action_cable/server/worker.rb#20 + # source://actioncable//lib/action_cable/server/worker.rb#19 def initialize(max_size: T.unsafe(nil)); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_work_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _work_callbacks; end - # source://actioncable//lib/action_cable/server/worker.rb#47 + # source://actioncable//lib/action_cable/server/worker.rb#46 def async_exec(receiver, *args, connection:, &block); end - # source://actioncable//lib/action_cable/server/worker.rb#51 + # source://actioncable//lib/action_cable/server/worker.rb#50 def async_invoke(receiver, method, *args, connection: T.unsafe(nil), &block); end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#56 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#74 def connection; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#100 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#116 def connection=(obj); end # Returns the value of attribute executor. # - # source://actioncable//lib/action_cable/server/worker.rb#18 + # source://actioncable//lib/action_cable/server/worker.rb#17 def executor; end # Stop processing work: any work that has not already started # running will be discarded from the queue # - # source://actioncable//lib/action_cable/server/worker.rb#31 + # source://actioncable//lib/action_cable/server/worker.rb#30 def halt; end - # source://actioncable//lib/action_cable/server/worker.rb#57 + # source://actioncable//lib/action_cable/server/worker.rb#56 def invoke(receiver, method, *args, connection:, &block); end # @return [Boolean] # - # source://actioncable//lib/action_cable/server/worker.rb#35 + # source://actioncable//lib/action_cable/server/worker.rb#34 def stopping?; end - # source://actioncable//lib/action_cable/server/worker.rb#39 + # source://actioncable//lib/action_cable/server/worker.rb#38 def work(connection, &block); end private - # source://actioncable//lib/action_cable/server/worker.rb#69 + # source://actioncable//lib/action_cable/server/worker.rb#68 def logger; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _work_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _work_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#48 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 def connection; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#92 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 def connection=(obj); end end end @@ -2471,30 +2701,28 @@ module ActionCable::Server::Worker::ActiveRecordConnectionManagement def with_database_connections(&block); end end -# source://actioncable//lib/action_cable/subscription_adapter.rb#4 -module ActionCable::SubscriptionAdapter - extend ::ActiveSupport::Autoload -end +# source://actioncable//lib/action_cable/subscription_adapter/async.rb#4 +module ActionCable::SubscriptionAdapter; end -# source://actioncable//lib/action_cable/subscription_adapter/async.rb#7 +# source://actioncable//lib/action_cable/subscription_adapter/async.rb#5 class ActionCable::SubscriptionAdapter::Async < ::ActionCable::SubscriptionAdapter::Inline private - # source://actioncable//lib/action_cable/subscription_adapter/async.rb#9 + # source://actioncable//lib/action_cable/subscription_adapter/async.rb#7 def new_subscriber_map; end end -# source://actioncable//lib/action_cable/subscription_adapter/async.rb#13 +# source://actioncable//lib/action_cable/subscription_adapter/async.rb#11 class ActionCable::SubscriptionAdapter::Async::AsyncSubscriberMap < ::ActionCable::SubscriptionAdapter::SubscriberMap # @return [AsyncSubscriberMap] a new instance of AsyncSubscriberMap # - # source://actioncable//lib/action_cable/subscription_adapter/async.rb#14 + # source://actioncable//lib/action_cable/subscription_adapter/async.rb#12 def initialize(event_loop); end - # source://actioncable//lib/action_cable/subscription_adapter/async.rb#19 + # source://actioncable//lib/action_cable/subscription_adapter/async.rb#17 def add_subscriber(*_arg0); end - # source://actioncable//lib/action_cable/subscription_adapter/async.rb#23 + # source://actioncable//lib/action_cable/subscription_adapter/async.rb#21 def invoke_callback(*_arg0); end end @@ -2586,6 +2814,107 @@ class ActionCable::SubscriptionAdapter::Inline < ::ActionCable::SubscriptionAdap def subscriber_map; end end +# source://actioncable//lib/action_cable/subscription_adapter/redis.rb#10 +class ActionCable::SubscriptionAdapter::Redis < ::ActionCable::SubscriptionAdapter::Base + include ::ActionCable::SubscriptionAdapter::ChannelPrefix + + # @return [Redis] a new instance of Redis + # + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#19 + def initialize(*_arg0); end + + # source://actioncable//lib/action_cable/subscription_adapter/channel_prefix.rb#6 + def broadcast(channel, payload); end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#41 + def redis_connection_for_subscriptions; end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#15 + def redis_connector; end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#15 + def redis_connector=(val); end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#37 + def shutdown; end + + # source://actioncable//lib/action_cable/subscription_adapter/channel_prefix.rb#11 + def subscribe(channel, callback, success_callback = T.unsafe(nil)); end + + # source://actioncable//lib/action_cable/subscription_adapter/channel_prefix.rb#16 + def unsubscribe(channel, callback); end + + private + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#60 + def config_options; end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#46 + def listener; end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#56 + def redis_connection; end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#50 + def redis_connection_for_broadcasts; end + + class << self + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#15 + def redis_connector; end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#15 + def redis_connector=(val); end + end +end + +# source://actioncable//lib/action_cable/subscription_adapter/redis.rb#64 +class ActionCable::SubscriptionAdapter::Redis::Listener < ::ActionCable::SubscriptionAdapter::SubscriberMap + # @return [Listener] a new instance of Listener + # + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#65 + def initialize(adapter, config_options, event_loop); end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#138 + def add_channel(channel, on_success); end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#152 + def invoke_callback(*_arg0); end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#86 + def listen(conn); end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#146 + def remove_channel(channel); end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#125 + def shutdown; end + + private + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#157 + def ensure_listener_running; end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#246 + def extract_subscribed_client(conn); end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#201 + def reset; end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#194 + def resubscribe; end + + # @return [Boolean] + # + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#182 + def retry_connecting?; end + + # source://actioncable//lib/action_cable/subscription_adapter/redis.rb#174 + def when_connected(&block); end +end + +# source://actioncable//lib/action_cable/subscription_adapter/redis.rb#244 +ActionCable::SubscriptionAdapter::Redis::Listener::ConnectionError = RedisClient::ConnectionError + # source://actioncable//lib/action_cable/subscription_adapter/subscriber_map.rb#5 class ActionCable::SubscriptionAdapter::SubscriberMap # @return [SubscriberMap] a new instance of SubscriberMap @@ -2612,33 +2941,33 @@ class ActionCable::SubscriptionAdapter::SubscriberMap def remove_subscriber(channel, subscriber); end end -# == Test adapter for Action Cable +# == \Test adapter for Action Cable # # The test adapter should be used only in testing. Along with -# ActionCable::TestHelper it makes a great tool to test your Rails application. +# ActionCable::TestHelper it makes a great tool to test your \Rails application. # # To use the test adapter set +adapter+ value to +test+ in your +config/cable.yml+ file. # -# NOTE: Test adapter extends the ActionCable::SubscriptionsAdapter::Async adapter, +# NOTE: +Test+ adapter extends the +ActionCable::SubscriptionAdapter::Async+ adapter, # so it could be used in system tests too. # -# source://actioncable//lib/action_cable/subscription_adapter/test.rb#16 +# source://actioncable//lib/action_cable/subscription_adapter/test.rb#14 class ActionCable::SubscriptionAdapter::Test < ::ActionCable::SubscriptionAdapter::Async - # source://actioncable//lib/action_cable/subscription_adapter/test.rb#17 + # source://actioncable//lib/action_cable/subscription_adapter/test.rb#15 def broadcast(channel, payload); end - # source://actioncable//lib/action_cable/subscription_adapter/test.rb#22 + # source://actioncable//lib/action_cable/subscription_adapter/test.rb#20 def broadcasts(channel); end - # source://actioncable//lib/action_cable/subscription_adapter/test.rb#30 + # source://actioncable//lib/action_cable/subscription_adapter/test.rb#28 def clear; end - # source://actioncable//lib/action_cable/subscription_adapter/test.rb#26 + # source://actioncable//lib/action_cable/subscription_adapter/test.rb#24 def clear_messages(channel); end private - # source://actioncable//lib/action_cable/subscription_adapter/test.rb#35 + # source://actioncable//lib/action_cable/subscription_adapter/test.rb#33 def channels_data; end end @@ -2669,7 +2998,7 @@ module ActionCable::TestHelper # end # end # - # source://actioncable//lib/action_cable/test_helper.rb#97 + # source://actioncable//lib/action_cable/test_helper.rb#116 def assert_broadcast_on(stream, data, &block); end # Asserts that the number of broadcasted messages to the stream matches the given number. @@ -2683,20 +3012,24 @@ module ActionCable::TestHelper # end # # If a block is passed, that block should cause the specified number of - # messages to be broadcasted. + # messages to be broadcasted. It returns the messages that were broadcasted. # # def test_broadcasts_again - # assert_broadcasts('messages', 1) do + # message = assert_broadcasts('messages', 1) do # ActionCable.server.broadcast 'messages', { text: 'hello' } # end + # assert_equal({ text: 'hello' }, message) # - # assert_broadcasts('messages', 2) do + # messages = assert_broadcasts('messages', 2) do # ActionCable.server.broadcast 'messages', { text: 'hi' } # ActionCable.server.broadcast 'messages', { text: 'how are you?' } # end + # assert_equal 2, messages.length + # assert_equal({ text: 'hi' }, messages.first) + # assert_equal({ text: 'how are you?' }, messages.last) # end # - # source://actioncable//lib/action_cable/test_helper.rb#45 + # source://actioncable//lib/action_cable/test_helper.rb#49 def assert_broadcasts(stream, number, &block); end # Asserts that no messages have been sent to the stream. @@ -2719,25 +3052,40 @@ module ActionCable::TestHelper # # assert_broadcasts 'messages', 0, &block # - # source://actioncable//lib/action_cable/test_helper.rb#78 + # source://actioncable//lib/action_cable/test_helper.rb#81 def assert_no_broadcasts(stream, &block); end # source://actioncable//lib/action_cable/test_helper.rb#6 def before_setup; end - # source://actioncable//lib/action_cable/test_helper.rb#126 + # source://actioncable//lib/action_cable/test_helper.rb#147 def broadcasts(*_arg0, **_arg1, &_arg2); end - # source://actioncable//lib/action_cable/test_helper.rb#126 + # Returns the messages that are broadcasted in the block. + # + # def test_broadcasts + # messages = capture_broadcasts('messages') do + # ActionCable.server.broadcast 'messages', { text: 'hi' } + # ActionCable.server.broadcast 'messages', { text: 'how are you?' } + # end + # assert_equal 2, messages.length + # assert_equal({ text: 'hi' }, messages.first) + # assert_equal({ text: 'how are you?' }, messages.last) + # end + # + # source://actioncable//lib/action_cable/test_helper.rb#97 + def capture_broadcasts(stream, &block); end + + # source://actioncable//lib/action_cable/test_helper.rb#147 def clear_messages(*_arg0, **_arg1, &_arg2); end - # source://actioncable//lib/action_cable/test_helper.rb#122 + # source://actioncable//lib/action_cable/test_helper.rb#143 def pubsub_adapter; end private - # source://actioncable//lib/action_cable/test_helper.rb#129 - def broadcasts_size(channel); end + # source://actioncable//lib/action_cable/test_helper.rb#150 + def new_broadcasts_from(current_messages, stream, assertion, &block); end end # source://actioncable//lib/action_cable/gem_version.rb#9 @@ -2750,7 +3098,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.0.6.rbi b/sorbet/rbi/gems/actionmailbox@7.1.3.2.rbi similarity index 76% rename from sorbet/rbi/gems/actionmailbox@7.0.6.rbi rename to sorbet/rbi/gems/actionmailbox@7.1.3.2.rbi index 3330434ab..059ce7224 100644 --- a/sorbet/rbi/gems/actionmailbox@7.0.6.rbi +++ b/sorbet/rbi/gems/actionmailbox@7.1.3.2.rbi @@ -4,100 +4,118 @@ # This is an autogenerated file for types exported from the `actionmailbox` gem. # Please instead update this file by running `bin/tapioca gem actionmailbox`. -# source://actionmailbox//lib/action_mailbox.rb#5 +# :markup: markdown +# :include: actionmailbox/README.md +# +# source://actionmailbox//lib/action_mailbox/gem_version.rb#3 module ActionMailbox extend ::ActiveSupport::Autoload - # source://actionmailbox//lib/action_mailbox.rb#14 + # source://actionmailbox//lib/action_mailbox.rb#22 def incinerate; end - # source://actionmailbox//lib/action_mailbox.rb#14 + # source://actionmailbox//lib/action_mailbox.rb#22 def incinerate=(val); end - # source://actionmailbox//lib/action_mailbox.rb#15 + # source://actionmailbox//lib/action_mailbox.rb#23 def incinerate_after; end - # source://actionmailbox//lib/action_mailbox.rb#15 + # source://actionmailbox//lib/action_mailbox.rb#23 def incinerate_after=(val); end - # source://actionmailbox//lib/action_mailbox.rb#12 + # source://actionmailbox//lib/action_mailbox.rb#20 def ingress; end - # source://actionmailbox//lib/action_mailbox.rb#12 + # source://actionmailbox//lib/action_mailbox.rb#20 def ingress=(val); end - # source://actionmailbox//lib/action_mailbox.rb#13 + # source://actionmailbox//lib/action_mailbox.rb#21 def logger; end - # source://actionmailbox//lib/action_mailbox.rb#13 + # source://actionmailbox//lib/action_mailbox.rb#21 def logger=(val); end - # source://actionmailbox//lib/action_mailbox.rb#16 + # source://actionmailbox//lib/action_mailbox.rb#24 def queues; end - # source://actionmailbox//lib/action_mailbox.rb#16 + # source://actionmailbox//lib/action_mailbox.rb#24 def queues=(val); end - # source://actionmailbox//lib/action_mailbox.rb#17 + # source://actionmailbox//lib/action_mailbox.rb#25 def storage_service; end - # source://actionmailbox//lib/action_mailbox.rb#17 + # source://actionmailbox//lib/action_mailbox.rb#25 def storage_service=(val); end class << self - # source://actionmailbox//lib/action_mailbox.rb#14 + # source://actionmailbox//lib/action_mailbox/deprecator.rb#4 + def deprecator; end + + # Returns the currently loaded version of Action Mailbox as a +Gem::Version+. + # + # source://actionmailbox//lib/action_mailbox/gem_version.rb#5 + def gem_version; end + + # source://actionmailbox//lib/action_mailbox.rb#22 def incinerate; end - # source://actionmailbox//lib/action_mailbox.rb#14 + # source://actionmailbox//lib/action_mailbox.rb#22 def incinerate=(val); end - # source://actionmailbox//lib/action_mailbox.rb#15 + # source://actionmailbox//lib/action_mailbox.rb#23 def incinerate_after; end - # source://actionmailbox//lib/action_mailbox.rb#15 + # source://actionmailbox//lib/action_mailbox.rb#23 def incinerate_after=(val); end - # source://actionmailbox//lib/action_mailbox.rb#12 + # source://actionmailbox//lib/action_mailbox.rb#20 def ingress; end - # source://actionmailbox//lib/action_mailbox.rb#12 + # source://actionmailbox//lib/action_mailbox.rb#20 def ingress=(val); end - # source://actionmailbox//lib/action_mailbox.rb#13 + # source://actionmailbox//lib/action_mailbox.rb#21 def logger; end - # source://actionmailbox//lib/action_mailbox.rb#13 + # source://actionmailbox//lib/action_mailbox.rb#21 def logger=(val); end - # source://actionmailbox//lib/action_mailbox.rb#16 + # source://actionmailbox//lib/action_mailbox.rb#24 def queues; end - # source://actionmailbox//lib/action_mailbox.rb#16 + # source://actionmailbox//lib/action_mailbox.rb#24 def queues=(val); end - # source://railties/7.0.6/lib/rails/engine.rb#405 + # source://railties/7.1.3.2/lib/rails/engine.rb#412 def railtie_helpers_paths; end - # source://railties/7.0.6/lib/rails/engine.rb#394 + # source://railties/7.1.3.2/lib/rails/engine.rb#395 def railtie_namespace; end - # source://railties/7.0.6/lib/rails/engine.rb#409 + # source://railties/7.1.3.2/lib/rails/engine.rb#416 def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end - # source://actionmailbox//lib/action_mailbox.rb#17 + # source://actionmailbox//lib/action_mailbox.rb#25 def storage_service; end - # source://actionmailbox//lib/action_mailbox.rb#17 + # source://actionmailbox//lib/action_mailbox.rb#25 def storage_service=(val); end - # source://railties/7.0.6/lib/rails/engine.rb#397 + # source://railties/7.1.3.2/lib/rails/engine.rb#401 def table_name_prefix; end - # source://railties/7.0.6/lib/rails/engine.rb#401 + # source://railties/7.1.3.2/lib/rails/engine.rb#408 def use_relative_model_naming?; end + + # Returns the currently loaded version of Action Mailbox as a +Gem::Version+. + # + # source://actionmailbox//lib/action_mailbox/version.rb#7 + def version; end end end +# = Action Mailbox \Base +# # The base class for all application mailboxes. Not intended to be inherited from directly. Inherit from # +ApplicationMailbox+ instead, as that's where the app-specific routing is configured. This routing # is specified in the following ways: @@ -121,7 +139,7 @@ end # # Application mailboxes need to override the #process method, which is invoked by the framework after # callbacks have been run. The callbacks available are: +before_processing+, +after_processing+, and -# +around_processing+. The primary use case is ensure certain preconditions to processing are fulfilled +# +around_processing+. The primary use case is to ensure that certain preconditions to processing are fulfilled # using +before_processing+ callbacks. # # If a precondition fails to be met, you can halt the processing using the +#bounced!+ method, @@ -154,7 +172,7 @@ end # rescue_from(ApplicationSpecificVerificationError) { bounced! } # end # -# source://actionmailbox//lib/action_mailbox/base.rb#64 +# source://actionmailbox//lib/action_mailbox/base.rb#66 class ActionMailbox::Base include ::ActiveSupport::Rescuable include ::ActionMailbox::Routing @@ -168,61 +186,66 @@ class ActionMailbox::Base # @return [Base] a new instance of Base # - # source://actionmailbox//lib/action_mailbox/base.rb#77 + # source://actionmailbox//lib/action_mailbox/base.rb#79 def initialize(inbound_email); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _process_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/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+. + # + # source://actionmailbox//lib/action_mailbox/base.rb#111 + def bounce_now_with(message); end + # Enqueues the given +message+ for delivery and changes the inbound email's status to +:bounced+. # - # source://actionmailbox//lib/action_mailbox/base.rb#102 + # source://actionmailbox//lib/action_mailbox/base.rb#105 def bounce_with(message); end - # source://actionmailbox//lib/action_mailbox/base.rb#69 + # source://actionmailbox//lib/action_mailbox/base.rb#71 def bounced!(*_arg0, **_arg1, &_arg2); end - # source://actionmailbox//lib/action_mailbox/base.rb#69 + # source://actionmailbox//lib/action_mailbox/base.rb#71 def delivered!(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://actionmailbox//lib/action_mailbox/base.rb#96 + # source://actionmailbox//lib/action_mailbox/base.rb#100 def finished_processing?; end # Returns the value of attribute inbound_email. # - # source://actionmailbox//lib/action_mailbox/base.rb#68 + # source://actionmailbox//lib/action_mailbox/base.rb#70 def inbound_email; end - # source://actionmailbox//lib/action_mailbox/base.rb#71 - def logger(*_arg0, **_arg1, &_arg2); end + # source://actionmailbox//lib/action_mailbox/base.rb#73 + def logger(&block); end - # source://actionmailbox//lib/action_mailbox/base.rb#69 + # source://actionmailbox//lib/action_mailbox/base.rb#71 def mail(*_arg0, **_arg1, &_arg2); end - # source://actionmailbox//lib/action_mailbox/base.rb#81 + # source://actionmailbox//lib/action_mailbox/base.rb#83 def perform_processing; end - # source://actionmailbox//lib/action_mailbox/base.rb#92 + # source://actionmailbox//lib/action_mailbox/base.rb#96 def process; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # source://actionmailbox//lib/action_mailbox/routing.rb#9 @@ -233,35 +256,38 @@ class ActionMailbox::Base private - # source://actionmailbox//lib/action_mailbox/base.rb#108 + # source://actionmailbox//lib/action_mailbox/base.rb#117 + def instrumentation_payload; end + + # source://actionmailbox//lib/action_mailbox/base.rb#124 def track_status_of_inbound_email; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _process_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _process_callbacks=(value); end - # source://actionmailbox//lib/action_mailbox/base.rb#73 + # source://actionmailbox//lib/action_mailbox/base.rb#75 def receive(inbound_email); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # source://actionmailbox//lib/action_mailbox/routing.rb#9 @@ -275,7 +301,7 @@ end class ActionMailbox::BaseController < ::ActionController::Base private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def authenticate_by_password; end @@ -284,17 +310,19 @@ class ActionMailbox::BaseController < ::ActionController::Base def password; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end +# = Action Mailbox \Callbacks +# # Defines the callbacks related to processing. # -# source://actionmailbox//lib/action_mailbox/callbacks.rb#7 +# source://actionmailbox//lib/action_mailbox/callbacks.rb#9 module ActionMailbox::Callbacks extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -319,23 +347,23 @@ end # source://actionmailbox//lib/action_mailbox/callbacks.rb#0 module ActionMailbox::Callbacks::ClassMethods - # source://actionmailbox//lib/action_mailbox/callbacks.rb#25 + # source://actionmailbox//lib/action_mailbox/callbacks.rb#27 def after_processing(*methods, &block); end - # source://actionmailbox//lib/action_mailbox/callbacks.rb#29 + # source://actionmailbox//lib/action_mailbox/callbacks.rb#31 def around_processing(*methods, &block); end - # source://actionmailbox//lib/action_mailbox/callbacks.rb#21 + # source://actionmailbox//lib/action_mailbox/callbacks.rb#23 def before_processing(*methods, &block); end end -# source://actionmailbox//lib/action_mailbox/callbacks.rb#11 +# source://actionmailbox//lib/action_mailbox/callbacks.rb#13 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.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end end end @@ -348,115 +376,122 @@ class ActionMailbox::InboundEmail < ::ActionMailbox::Record include ::ActionMailbox::InboundEmail::Incineratable extend ::ActionMailbox::InboundEmail::MessageId::ClassMethods - # source://activerecord/7.0.6/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_raw_email_attachment(*args); end - # source://activerecord/7.0.6/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_raw_email_blob(*args); end + def instrumentation_payload; end def mail; end def processed?; end def source; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#11 def _reflections; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end - # source://activestorage/7.0.6/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.3.2/lib/active_storage/reflection.rb#53 def attachment_reflections; end - # source://activerecord/7.0.6/lib/active_record/attributes.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/attributes.rb#11 def attributes_to_define_after_schema_loads; end - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.2/lib/active_record/scoping/named.rb#174 def bounced(*args, **_arg1); end - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 + # source://activerecord/7.1.3.2/lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.2/lib/active_record/scoping/named.rb#174 def delivered(*args, **_arg1); end - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.2/lib/active_record/scoping/named.rb#174 def failed(*args, **_arg1); end - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.2/lib/active_record/scoping/named.rb#174 def not_bounced(*args, **_arg1); end - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.2/lib/active_record/scoping/named.rb#174 def not_delivered(*args, **_arg1); end - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.2/lib/active_record/scoping/named.rb#174 def not_failed(*args, **_arg1); end - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.2/lib/active_record/scoping/named.rb#174 def not_pending(*args, **_arg1); end - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.2/lib/active_record/scoping/named.rb#174 def not_processing(*args, **_arg1); end - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.2/lib/active_record/scoping/named.rb#174 def pending(*args, **_arg1); end - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.2/lib/active_record/scoping/named.rb#174 def processing(*args, **_arg1); end - # source://activerecord/7.0.6/lib/active_record/enum.rb#188 + # source://activerecord/7.1.3.2/lib/active_record/enum.rb#242 def statuses; end - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.2/lib/active_record/scoping/named.rb#174 def with_attached_raw_email(*args, **_arg1); end end end module ActionMailbox::InboundEmail::GeneratedAssociationMethods - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#28 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#32 def build_raw_email_attachment(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#28 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#32 def build_raw_email_blob(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#36 def create_raw_email_attachment(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#40 def create_raw_email_attachment!(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#36 def create_raw_email_blob(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#40 def create_raw_email_blob!(*args, &block); end - # source://activestorage/7.0.6/lib/active_storage/attached/model.rb#55 + # source://activestorage/7.1.3.2/lib/active_storage/attached/model.rb#99 def raw_email; end - # source://activestorage/7.0.6/lib/active_storage/attached/model.rb#60 + # source://activestorage/7.1.3.2/lib/active_storage/attached/model.rb#104 def raw_email=(attachable); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#103 def raw_email_attachment; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#111 def raw_email_attachment=(value); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#103 def raw_email_blob; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#111 def raw_email_blob=(value); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#19 def reload_raw_email_attachment; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#19 def reload_raw_email_blob; end + + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#23 + def reset_raw_email_attachment; end + + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#23 + def reset_raw_email_blob; end end module ActionMailbox::InboundEmail::GeneratedAttributeMethods; end @@ -506,10 +541,10 @@ class ActionMailbox::IncinerationJob < ::ActiveJob::Base def perform(inbound_email); end class << self - # source://activejob/7.0.6/lib/active_job/queue_name.rb#55 + # source://activejob/7.1.3.2/lib/active_job/queue_name.rb#55 def queue_name; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end def schedule(inbound_email); end @@ -524,7 +559,7 @@ class ActionMailbox::Ingresses::Mailgun::InboundEmailsController < ::ActionMailb private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def authenticate; end @@ -533,10 +568,10 @@ class ActionMailbox::Ingresses::Mailgun::InboundEmailsController < ::ActionMailb def mail; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -565,7 +600,7 @@ class ActionMailbox::Ingresses::Mandrill::InboundEmailsController < ::ActionMail private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def authenticate; end @@ -575,10 +610,10 @@ class ActionMailbox::Ingresses::Mandrill::InboundEmailsController < ::ActionMail def raw_emails; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -604,14 +639,14 @@ class ActionMailbox::Ingresses::Postmark::InboundEmailsController < ::ActionMail private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -623,16 +658,16 @@ class ActionMailbox::Ingresses::Relay::InboundEmailsController < ::ActionMailbox private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def require_valid_rfc822_message; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -644,17 +679,17 @@ class ActionMailbox::Ingresses::Sendgrid::InboundEmailsController < ::ActionMail private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def envelope; end def mail; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -664,10 +699,10 @@ class ActionMailbox::Record < ::ActiveRecord::Base include ::ActionMailbox::Record::GeneratedAssociationMethods class << self - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 + # source://activerecord/7.1.3.2/lib/active_record/enum.rb#167 def defined_enums; end end end @@ -675,33 +710,35 @@ end module ActionMailbox::Record::GeneratedAssociationMethods; end module ActionMailbox::Record::GeneratedAttributeMethods; end +# = Action Mailbox \Router +# # Encapsulates the routes that live on the ApplicationMailbox and performs the actual routing when # an inbound_email is received. # -# source://actionmailbox//lib/action_mailbox/router.rb#6 +# source://actionmailbox//lib/action_mailbox/router.rb#8 class ActionMailbox::Router # @return [Router] a new instance of Router # - # source://actionmailbox//lib/action_mailbox/router.rb#9 + # source://actionmailbox//lib/action_mailbox/router.rb#11 def initialize; end - # source://actionmailbox//lib/action_mailbox/router.rb#19 + # source://actionmailbox//lib/action_mailbox/router.rb#21 def add_route(address, to:); end - # source://actionmailbox//lib/action_mailbox/router.rb#13 + # source://actionmailbox//lib/action_mailbox/router.rb#15 def add_routes(routes); end - # source://actionmailbox//lib/action_mailbox/router.rb#33 + # source://actionmailbox//lib/action_mailbox/router.rb#35 def mailbox_for(inbound_email); end - # source://actionmailbox//lib/action_mailbox/router.rb#23 + # source://actionmailbox//lib/action_mailbox/router.rb#25 def route(inbound_email); end private # Returns the value of attribute routes. # - # source://actionmailbox//lib/action_mailbox/router.rb#38 + # source://actionmailbox//lib/action_mailbox/router.rb#40 def routes; end end @@ -728,7 +765,7 @@ class ActionMailbox::Router::Route def ensure_valid_address; end end -# source://actionmailbox//lib/action_mailbox/router.rb#7 +# source://actionmailbox//lib/action_mailbox/router.rb#9 class ActionMailbox::Router::RoutingError < ::StandardError; end # See ActionMailbox::Base for how to specify routing. @@ -756,7 +793,7 @@ class ActionMailbox::RoutingJob < ::ActiveJob::Base def perform(inbound_email); end class << self - # source://activejob/7.0.6/lib/active_job/queue_name.rb#55 + # source://activejob/7.1.3.2/lib/active_job/queue_name.rb#55 def queue_name; end end end @@ -852,6 +889,24 @@ module ActionMailbox::TestHelper def receive_inbound_email_from_source(*args); end end +# source://actionmailbox//lib/action_mailbox/gem_version.rb#9 +module ActionMailbox::VERSION; end + +# source://actionmailbox//lib/action_mailbox/gem_version.rb#10 +ActionMailbox::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://actionmailbox//lib/action_mailbox/gem_version.rb#11 +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), String) + +# source://actionmailbox//lib/action_mailbox/gem_version.rb#15 +ActionMailbox::VERSION::STRING = T.let(T.unsafe(nil), String) + +# source://actionmailbox//lib/action_mailbox/gem_version.rb#12 +ActionMailbox::VERSION::TINY = T.let(T.unsafe(nil), Integer) + # source://actionmailbox//lib/action_mailbox/mail_ext/address_equality.rb#3 module Mail class << self @@ -1529,6 +1584,9 @@ class Mail::Message # source://mail/2.8.1/lib/mail/message.rb#1811 def without_attachments!; end + # source://actionmailbox//lib/action_mailbox/mail_ext/addresses.rb#29 + def x_forwarded_to_addresses; end + # source://actionmailbox//lib/action_mailbox/mail_ext/addresses.rb#25 def x_original_to_addresses; end @@ -1552,7 +1610,7 @@ class Mail::Message # source://mail/2.8.1/lib/mail/message.rb#2056 def add_required_message_fields; end - # source://actionmailbox//lib/action_mailbox/mail_ext/addresses.rb#30 + # source://actionmailbox//lib/action_mailbox/mail_ext/addresses.rb#34 def address_list(obj); end # source://mail/2.8.1/lib/mail/message.rb#2025 @@ -1614,67 +1672,70 @@ end module Rails class << self - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.3.2/lib/rails.rb#42 def app_class; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.3.2/lib/rails.rb#42 def app_class=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#39 + # source://railties/7.1.3.2/lib/rails.rb#43 def application; end - # source://railties/7.0.6/lib/rails.rb#37 + # source://railties/7.1.3.2/lib/rails.rb#41 def application=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#123 + # source://railties/7.1.3.2/lib/rails.rb#123 def autoloaders; end - # source://railties/7.0.6/lib/rails.rb#50 + # source://railties/7.1.3.2/lib/rails.rb#54 def backtrace_cleaner; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.3.2/lib/rails.rb#42 def cache; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.3.2/lib/rails.rb#42 def cache=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#46 + # source://railties/7.1.3.2/lib/rails.rb#50 def configuration; end - # source://railties/7.0.6/lib/rails.rb#72 + # source://railties/7.1.3.2/lib/rails/deprecator.rb#4 + def deprecator; end + + # source://railties/7.1.3.2/lib/rails.rb#72 def env; end - # source://railties/7.0.6/lib/rails.rb#79 + # source://railties/7.1.3.2/lib/rails.rb#79 def env=(environment); end - # source://railties/7.0.6/lib/rails.rb#90 + # source://railties/7.1.3.2/lib/rails.rb#90 def error; end - # source://railties/7.0.6/lib/rails/gem_version.rb#5 + # source://railties/7.1.3.2/lib/rails/gem_version.rb#5 def gem_version; end - # source://railties/7.0.6/lib/rails.rb#103 + # source://railties/7.1.3.2/lib/rails.rb#103 def groups(*groups); end - # source://railties/7.0.6/lib/rails.rb#43 + # source://railties/7.1.3.2/lib/rails.rb#47 def initialize!(*_arg0, **_arg1, &_arg2); end - # source://railties/7.0.6/lib/rails.rb#43 + # source://railties/7.1.3.2/lib/rails.rb#47 def initialized?(*_arg0, **_arg1, &_arg2); end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.3.2/lib/rails.rb#42 def logger; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.3.2/lib/rails.rb#42 def logger=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#119 + # source://railties/7.1.3.2/lib/rails.rb#119 def public_path; end - # source://railties/7.0.6/lib/rails.rb#63 + # source://railties/7.1.3.2/lib/rails.rb#63 def root; end - # source://railties/7.0.6/lib/rails/version.rb#7 + # source://railties/7.1.3.2/lib/rails/version.rb#7 def version; end end end @@ -1689,11 +1750,11 @@ class Rails::Conductor::ActionMailbox::InboundEmails::SourcesController < ::Rail private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -1706,7 +1767,7 @@ class Rails::Conductor::ActionMailbox::InboundEmailsController < ::Rails::Conduc private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def create_inbound_email(mail); end @@ -1714,7 +1775,7 @@ class Rails::Conductor::ActionMailbox::InboundEmailsController < ::Rails::Conduc def new_mail; end class << self - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -1724,11 +1785,11 @@ class Rails::Conductor::ActionMailbox::IncineratesController < ::Rails::Conducto private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -1738,13 +1799,13 @@ class Rails::Conductor::ActionMailbox::ReroutesController < ::Rails::Conductor:: private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def reroute(inbound_email); end class << self - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -1752,22 +1813,22 @@ end class Rails::Conductor::BaseController < ::ActionController::Base private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def ensure_development_env; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#212 def _layout_conditions; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end diff --git a/sorbet/rbi/gems/actionmailer@7.0.6.rbi b/sorbet/rbi/gems/actionmailer@7.1.3.2.rbi similarity index 70% rename from sorbet/rbi/gems/actionmailer@7.0.6.rbi rename to sorbet/rbi/gems/actionmailer@7.1.3.2.rbi index 1e7a2eac7..949941cda 100644 --- a/sorbet/rbi/gems/actionmailer@7.0.6.rbi +++ b/sorbet/rbi/gems/actionmailer@7.1.3.2.rbi @@ -4,37 +4,44 @@ # 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 module ActionMailer extend ::ActiveSupport::Autoload class << self - # source://actionmailer//lib/action_mailer.rb#56 + # source://actionmailer//lib/action_mailer/deprecator.rb#4 + def deprecator; end + + # source://actionmailer//lib/action_mailer.rb#61 def eager_load!; end - # Returns the currently loaded version of Action Mailer as a Gem::Version. + # Returns the currently loaded version of Action Mailer as a +Gem::Version+. # # source://actionmailer//lib/action_mailer/gem_version.rb#5 def gem_version; end # Returns the currently loaded version of Action Mailer as a - # Gem::Version. + # +Gem::Version+. # # source://actionmailer//lib/action_mailer/version.rb#8 def version; end end end +# = Action Mailer \Base +# # Action Mailer allows you to send email from your application using a mailer model and views. # -# = Mailer Models +# == Mailer Models # # To use Action Mailer, you need to create a mailer model. # # $ bin/rails generate mailer Notifier # # The generated model inherits from ApplicationMailer which in turn -# inherits from ActionMailer::Base. A mailer model defines methods +# inherits from +ActionMailer::Base+. A mailer model defines methods # used to generate an email message. In these methods, you can set up variables to be used in # the mailer views, options on the mail itself such as the :from address, and attachments. # @@ -71,7 +78,7 @@ end # # * mail - Allows you to specify email to be sent. # -# The hash passed to the mail method allows you to specify any header that a Mail::Message +# The hash passed to the mail method allows you to specify any header that a +Mail::Message+ # will accept (any valid email header including optional fields). # # The +mail+ method, if not passed a block, will inspect your views and send all the views with @@ -98,7 +105,7 @@ end # format.html { render "some_other_template" } # end # -# = Mailer views +# == Mailer views # # Like Action Controller, each mailer class has a corresponding view directory in which each # method of the class looks for a template with its name. @@ -126,7 +133,7 @@ end # <%= truncate(@note.body, length: 25) %> # # -# = Generating URLs +# == Generating URLs # # URLs can be generated in mailer views using url_for or named routes. Unlike controllers from # Action Pack, the mailer instance doesn't have any context about the incoming request, so you'll need @@ -154,7 +161,7 @@ end # # By default when config.force_ssl is +true+, URLs generated for hosts will use the HTTPS protocol. # -# = Sending mail +# == Sending mail # # Once a mailer action and template are defined, you can deliver your message or defer its creation and # delivery for later: @@ -164,7 +171,7 @@ end # mail.deliver_now # generates and sends the email now # # The ActionMailer::MessageDelivery class is a wrapper around a delegate that will call -# your method to generate the mail. If you want direct access to the delegator, or Mail::Message, +# your method to generate the mail. If you want direct access to the delegator, or +Mail::Message+, # you can call the message method on the ActionMailer::MessageDelivery object. # # NotifierMailer.welcome(User.first).message # => a Mail::Message object @@ -179,7 +186,7 @@ end # You never instantiate your mailer class. Rather, you just call the method you defined on the class itself. # All instance methods are expected to return a message object to be sent. # -# = Multipart Emails +# == Multipart Emails # # Multipart messages can also be used implicitly because Action Mailer will automatically detect and use # multipart templates, where each template is named after the name of the action, followed by the content @@ -200,7 +207,7 @@ end # This means that you'll have to manually add each part to the email and set the content type of the email # to multipart/alternative. # -# = Attachments +# == Attachments # # Sending attachment in emails is easy: # @@ -227,7 +234,7 @@ end # end # end # -# You can also send attachments with html template, in this case you need to add body, attachments, +# You can also send attachments with HTML template, in this case you need to add body, attachments, # and custom content type like this: # # class NotifierMailer < ApplicationMailer @@ -240,7 +247,7 @@ end # end # end # -# = Inline Attachments +# == Inline Attachments # # You can also specify that a file should be displayed inline with other HTML. This is useful # if you want to display a corporate logo or a photo. @@ -266,7 +273,7 @@ end # # <%= image_tag attachments['photo.png'].url, alt: 'Our Photo', class: 'photo' -%> # -# = Observing and Intercepting Mails +# == Observing and Intercepting Mails # # Action Mailer provides hooks into the Mail observer and interceptor methods. These allow you to # register classes that are called during the mail delivery life cycle. @@ -277,9 +284,9 @@ end # An interceptor class must implement the :delivering_email(message) method which will be # called before the email is sent, allowing you to make modifications to the email before it hits # the delivery agents. Your class should make any needed modifications directly to the passed -# in Mail::Message instance. +# in +Mail::Message+ instance. # -# = Default Hash +# == Default \Hash # # Action Mailer provides some intelligent defaults for your emails, these are usually specified in a # default method inside the class definition: @@ -288,15 +295,15 @@ end # default sender: 'system@example.com' # end # -# You can pass in any header value that a Mail::Message accepts. Out of the box, -# ActionMailer::Base sets the following: +# You can pass in any header value that a +Mail::Message+ accepts. Out of the box, +# +ActionMailer::Base+ sets the following: # # * mime_version: "1.0" # * charset: "UTF-8" # * content_type: "text/plain" # * parts_order: [ "text/plain", "text/enriched", "text/html" ] # -# parts_order and charset are not actually valid Mail::Message header fields, +# parts_order and charset are not actually valid +Mail::Message+ header fields, # but Action Mailer translates them appropriately and sets the correct values. # # As you can pass in any header, you need to either quote the header as a string, or pass it in as @@ -328,14 +335,16 @@ end # # config.action_mailer.default_options = { from: "no-reply@example.org" } # -# = Callbacks +# == \Callbacks # -# You can specify callbacks using before_action and after_action for configuring your messages. -# This may be useful, for example, when you want to add default inline attachments for all -# messages sent out by a certain mailer class: +# You can specify callbacks using before_action and after_action for configuring your messages, +# and using before_deliver and after_deliver for wrapping the delivery process. +# For example, when you want to add default inline attachments and log delivery for all messages +# sent out by a certain mailer class: # # class NotifierMailer < ApplicationMailer # before_action :add_inline_attachment! +# after_deliver :log_delivery # # def welcome # mail @@ -345,9 +354,13 @@ end # def add_inline_attachment! # attachments.inline["footer.jpg"] = File.read('/path/to/filename.jpg') # end +# +# def log_delivery +# Rails.logger.info "Sent email with message id '#{message.message_id}' at #{Time.current}." +# end # end # -# Callbacks in Action Mailer are implemented using +# Action callbacks in Action Mailer are implemented using # AbstractController::Callbacks, so you can define and configure # callbacks in the same manner that you would use callbacks in classes that # inherit from ActionController::Base. @@ -356,7 +369,7 @@ end # using before_action rather than after_action in your # Action Mailer classes so that headers are parsed properly. # -# = Rescuing Errors +# == Rescuing Errors # # +rescue+ blocks inside of a mailer method cannot rescue errors that occur # outside of rendering -- for example, record deserialization errors in a @@ -379,10 +392,10 @@ end # end # end # -# = Previewing emails +# == Previewing emails # # You can preview your email templates visually by adding a mailer preview file to the -# ActionMailer::Base.preview_path. Since most emails do something interesting +# ActionMailer::Base.preview_paths. Since most emails do something interesting # with database data, you'll need to write some scenarios to load messages with fake data: # # class NotifierMailerPreview < ActionMailer::Preview @@ -391,12 +404,12 @@ end # end # end # -# Methods must return a Mail::Message object which can be generated by calling the mailer +# Methods must return a +Mail::Message+ object which can be generated by calling the mailer # method without the additional deliver_now / deliver_later. The location of the -# mailer previews directory can be configured using the preview_path option which has a default +# mailer preview directories can be configured using the preview_paths option which has a default # of test/mailers/previews: # -# config.action_mailer.preview_path = "#{Rails.root}/lib/mailer_previews" +# config.action_mailer.preview_paths << "#{Rails.root}/lib/mailer_previews" # # An overview of all previews is accessible at http://localhost:3000/rails/mailers # on a running development server instance. @@ -416,7 +429,7 @@ end # and register_preview_interceptor if they should operate on both sending and # previewing emails. # -# = Configuration options +# == Configuration options # # These options are specified on the class level, like # ActionMailer::Base.raise_delivery_errors = true @@ -439,20 +452,21 @@ end # This is a symbol and one of :plain (will send the password Base64 encoded), :login (will # send the password Base64 encoded) or :cram_md5 (combines a Challenge/Response mechanism to exchange # information and a cryptographic Message Digest 5 algorithm to hash important information) -# * :enable_starttls - Use STARTTLS when connecting to your SMTP server and fail if unsupported. Defaults to false. +# * :enable_starttls - Use STARTTLS when connecting to your SMTP server and fail if unsupported. Defaults +# to false. Requires at least version 2.7 of the Mail gem. # * :enable_starttls_auto - Detects if STARTTLS is enabled in your SMTP server and starts # to use it. Defaults to true. # * :openssl_verify_mode - When using TLS, you can set how OpenSSL checks the certificate. This is # really useful if you need to validate a self-signed and/or a wildcard certificate. You can use the name # of an OpenSSL verify constant ('none' or 'peer') or directly the constant -# (OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER). +# (+OpenSSL::SSL::VERIFY_NONE+ or +OpenSSL::SSL::VERIFY_PEER+). # * :ssl/:tls Enables the SMTP connection to use SMTP/TLS (SMTPS: SMTP over direct TLS connection) # * :open_timeout Number of seconds to wait while attempting to open a connection. # * :read_timeout Number of seconds to wait until timing-out a read(2) call. # # * sendmail_settings - Allows you to override options for the :sendmail delivery method. # * :location - The location of the sendmail executable. Defaults to /usr/sbin/sendmail. -# * :arguments - The command line arguments. Defaults to -i with -f sender@address +# * :arguments - The command line arguments. Defaults to %w[ -i ] with -f sender@address # added automatically before the message is sent. # # * file_settings - Allows you to override options for the :file delivery method. @@ -473,42 +487,50 @@ end # * deliveries - Keeps an array of all the emails sent out through the Action Mailer with # delivery_method :test. Most useful for unit and functional testing. # -# * delivery_job - The job class used with deliver_later. Defaults to -# +ActionMailer::MailDeliveryJob+. +# * delivery_job - The job class used with deliver_later. Mailers can set this to use a +# custom delivery job. Defaults to +ActionMailer::MailDeliveryJob+. # -# * deliver_later_queue_name - The name of the queue used with deliver_later. +# * deliver_later_queue_name - The queue name used by deliver_later with the default +# delivery_job. Mailers can set this to use a custom queue name. # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://actionmailer//lib/action_mailer/base.rb#466 +# source://actionmailer//lib/action_mailer/base.rb#476 class ActionMailer::Base < ::AbstractController::Base + include ::ActionMailer::Callbacks + include ::ActiveSupport::Callbacks include ::ActionMailer::DeliveryMethods + include ::ActionMailer::QueuedDelivery include ::ActiveSupport::Rescuable include ::ActionMailer::Rescuable include ::ActionMailer::Parameterized include ::ActionMailer::Previews + include ::ActionMailer::FormBuilder include ::ActionView::ViewPaths include ::AbstractController::Rendering include ::AbstractController::Logger include ::ActiveSupport::Benchmarkable + include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor include ::AbstractController::Helpers include ::AbstractController::Translation include ::AbstractController::AssetPaths - include ::ActiveSupport::Callbacks include ::AbstractController::Callbacks include ::AbstractController::Caching::Fragments include ::AbstractController::Caching::ConfigMethods include ::AbstractController::Caching include ::ActionView::Rendering include ::ActionView::Layouts + extend ::ActionMailer::Callbacks::ClassMethods + extend ::ActiveSupport::Callbacks::ClassMethods extend ::ActionMailer::DeliveryMethods::ClassMethods extend ::ActiveSupport::Rescuable::ClassMethods extend ::ActionMailer::Rescuable::ClassMethods extend ::ActionMailer::Parameterized::ClassMethods extend ::ActionMailer::Previews::ClassMethods + extend ::ActionMailer::FormBuilder::ClassMethods extend ::ActionView::ViewPaths::ClassMethods + extend ::AbstractController::Helpers::Resolution extend ::AbstractController::Helpers::ClassMethods - extend ::ActiveSupport::Callbacks::ClassMethods extend ::AbstractController::Callbacks::ClassMethods extend ::AbstractController::Caching::Fragments::ClassMethods extend ::AbstractController::Caching::ClassMethods @@ -518,49 +540,58 @@ class ActionMailer::Base < ::AbstractController::Base # @return [Base] a new instance of Base # - # source://actionmailer//lib/action_mailer/base.rb#632 + # source://actionmailer//lib/action_mailer/base.rb#644 def initialize; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 + def _deliver_callbacks; end + + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods=(_arg0); end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#216 + def _layout_conditions(&block); end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _process_action_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 + def _run_deliver_callbacks(&block); end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_process_action_callbacks(&block); end - # source://actionpack/7.0.6/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies; end - # source://actionpack/7.0.6/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies=(_arg0); end - # source://actionpack/7.0.6/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def assets_dir=(value); end # Allows you to add attachments to an email, like so: @@ -592,106 +623,109 @@ class ActionMailer::Base < ::AbstractController::Base # # or by index # mail.attachments[0] # => Mail::Part (first attachment) # - # source://actionmailer//lib/action_mailer/base.rb#749 + # source://actionmailer//lib/action_mailer/base.rb#761 def attachments; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end - # source://actionmailer//lib/action_mailer/base.rb#490 + # source://actionmailer//lib/action_mailer/base.rb#502 def default_params; end - # source://actionmailer//lib/action_mailer/base.rb#490 + # source://actionmailer//lib/action_mailer/base.rb#502 def default_params=(_arg0); end - # source://actionmailer//lib/action_mailer/base.rb#490 + # source://actionmailer//lib/action_mailer/base.rb#502 def default_params?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_static_extension=(value); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 + # source://actionmailer//lib/action_mailer/queued_delivery.rb#9 def deliver_later_queue_name; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 - def deliver_later_queue_name=(val); end + # source://actionmailer//lib/action_mailer/queued_delivery.rb#9 + def deliver_later_queue_name=(_arg0); end + + # source://actionmailer//lib/action_mailer/queued_delivery.rb#9 + def deliver_later_queue_name?; end - # source://actionmailer//lib/action_mailer/base.rb#489 + # source://actionmailer//lib/action_mailer/queued_delivery.rb#8 def delivery_job; end - # source://actionmailer//lib/action_mailer/base.rb#489 + # source://actionmailer//lib/action_mailer/queued_delivery.rb#8 def delivery_job=(_arg0); end - # source://actionmailer//lib/action_mailer/base.rb#489 + # source://actionmailer//lib/action_mailer/queued_delivery.rb#8 def delivery_job?; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#19 def delivery_method; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#19 def delivery_method=(_arg0); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#19 def delivery_method?; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#17 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 def delivery_methods; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#17 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 def delivery_methods=(_arg0); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#17 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 def delivery_methods?; end # Returns an email in the format "Name ". # # If the name is a blank string, it returns just the address. # - # source://actionmailer//lib/action_mailer/base.rb#673 + # source://actionmailer//lib/action_mailer/base.rb#685 def email_address_with_name(address, name); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def file_settings; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def file_settings=(_arg0); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def file_settings?; end - # source://actionpack/7.0.6/lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys; end - # source://actionpack/7.0.6/lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys=(_arg0); end - # source://actionpack/7.0.6/lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack/7.1.3.2/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 + # Allows you to pass random and unusual headers to the new +Mail::Message+ # object which will add them to itself. # # headers['X-Special-Domain-Specific-Header'] = "SecretValue" # # You can also pass a hash into headers of header field names and values, - # which will then be set on the Mail::Message object: + # which will then be set on the +Mail::Message+ object: # # headers 'X-Special-Domain-Specific-Header' => "SecretValue", # 'In-Reply-To' => incoming.message_id # - # The resulting Mail::Message will have the following in its header: + # The resulting +Mail::Message+ will have the following in its header: # # X-Special-Domain-Specific-Header: SecretValue # @@ -715,19 +749,19 @@ class ActionMailer::Base < ::AbstractController::Base # +nil+ in order to reset the value otherwise another field will be added # for the same header. # - # source://actionmailer//lib/action_mailer/base.rb#711 + # source://actionmailer//lib/action_mailer/base.rb#723 def headers(args = T.unsafe(nil)); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def logger=(value); end # The main method that creates the message and renders the email templates. There are @@ -737,7 +771,7 @@ class ActionMailer::Base < ::AbstractController::Base # the most used headers in an email message, these are: # # * +:subject+ - The subject of the message, if this is omitted, Action Mailer will - # ask the Rails I18n class for a translated +:subject+ in the scope of + # ask the \Rails I18n class for a translated +:subject+ in the scope of # [mailer_scope, action_name] or if this is missing, will translate the # humanized version of the +action_name+ # * +:to+ - Who the message is destined for, can be a string of addresses, or an array @@ -774,7 +808,7 @@ class ActionMailer::Base < ::AbstractController::Base # templates in the view paths using by default the mailer name and the # method name that it is being called from, it will then create parts for # each of these templates intelligently, making educated guesses on correct - # content type and sequence, and return a fully prepared Mail::Message + # content type and sequence, and return a fully prepared +Mail::Message+ # ready to call :deliver on to send. # # For example: @@ -819,158 +853,164 @@ class ActionMailer::Base < ::AbstractController::Base # format.html # end # - # source://actionmailer//lib/action_mailer/base.rb#858 + # source://actionmailer//lib/action_mailer/base.rb#870 def mail(headers = T.unsafe(nil), &block); end # Returns the name of the mailer object. # - # source://actionmailer//lib/action_mailer/base.rb#666 + # source://actionmailer//lib/action_mailer/base.rb#678 def mailer_name; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attr_internal.rb#33 def message; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attr_internal.rb#33 def message=(_arg0); end - # source://actionmailer//lib/action_mailer/parameterized.rb#91 + # source://actionmailer//lib/action_mailer/parameterized.rb#95 def params; end - # source://actionmailer//lib/action_mailer/parameterized.rb#91 + # source://actionmailer//lib/action_mailer/parameterized.rb#93 def params=(_arg0); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def perform_caching=(value); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#14 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#16 def perform_deliveries; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#14 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#16 def perform_deliveries=(val); end # source://actionmailer//lib/action_mailer/preview.rb#25 def preview_interceptors; end # source://actionmailer//lib/action_mailer/preview.rb#14 - def preview_path; end + def preview_paths; end - # source://actionmailer//lib/action_mailer/base.rb#638 + # source://actionmailer//lib/action_mailer/base.rb#650 def process(method_name, *args, **_arg2); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#13 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 def raise_delivery_errors; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#13 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 def raise_delivery_errors=(val); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://actionpack/7.1.3.2/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack/7.1.3.2/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def sendmail_settings; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def sendmail_settings=(_arg0); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def sendmail_settings?; end # source://actionmailer//lib/action_mailer/preview.rb#22 def show_previews; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def smtp_settings; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def smtp_settings=(_arg0); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def smtp_settings?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def test_settings; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def test_settings=(_arg0); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def test_settings?; end private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end - # source://actionmailer//lib/action_mailer/base.rb#1059 + # source://actionmailer//lib/action_mailer/base.rb#1071 def _protected_ivars; end - # source://actionmailer//lib/action_mailer/base.rb#935 + # source://actionmailer//lib/action_mailer/base.rb#947 def apply_defaults(headers); end - # source://actionmailer//lib/action_mailer/base.rb#955 + # source://actionmailer//lib/action_mailer/base.rb#967 def assign_headers_to_message(message, headers); end - # source://actionmailer//lib/action_mailer/base.rb#961 + # source://actionmailer//lib/action_mailer/base.rb#973 def collect_responses(headers, &block); end # @yield [collector] # - # source://actionmailer//lib/action_mailer/base.rb#971 + # source://actionmailer//lib/action_mailer/base.rb#983 def collect_responses_from_block(headers); end - # source://actionmailer//lib/action_mailer/base.rb#985 + # source://actionmailer//lib/action_mailer/base.rb#997 def collect_responses_from_templates(headers); end - # source://actionmailer//lib/action_mailer/base.rb#978 + # source://actionmailer//lib/action_mailer/base.rb#990 def collect_responses_from_text(headers); end - # source://actionmailer//lib/action_mailer/base.rb#945 + # source://actionmailer//lib/action_mailer/base.rb#957 def compute_default(value); end - # source://actionmailer//lib/action_mailer/base.rb#1028 + # source://actionmailer//lib/action_mailer/base.rb#1040 def create_parts_from_responses(m, responses); end - # Translates the +subject+ using Rails I18n class under [mailer_scope, action_name] scope. + # Translates the +subject+ using \Rails I18n class under [mailer_scope, action_name] scope. # If it does not find a translation for the +subject+ under the specified scope it will default to a # humanized version of the action_name. # If the subject has interpolations, you can pass them through the +interpolations+ parameter. # - # source://actionmailer//lib/action_mailer/base.rb#925 + # source://actionmailer//lib/action_mailer/base.rb#937 def default_i18n_subject(interpolations = T.unsafe(nil)); end - # source://actionmailer//lib/action_mailer/base.rb#998 + # source://actionmailer//lib/action_mailer/base.rb#1010 def each_template(paths, name, &block); end - # source://actionmailer//lib/action_mailer/base.rb#1041 + # source://actionmailer//lib/action_mailer/base.rb#1053 def insert_part(container, response, charset); end - # source://actionmailer//lib/action_mailer/base.rb#1055 + # source://actionmailer//lib/action_mailer/base.rb#1067 def instrument_name; end # This and #instrument_name is for caching instrument # - # source://actionmailer//lib/action_mailer/base.rb#1048 + # source://actionmailer//lib/action_mailer/base.rb#1060 def instrument_payload(key); end # Used by #mail to set the content type of the message. @@ -983,83 +1023,98 @@ class ActionMailer::Base < ::AbstractController::Base # attachments, or the message is multipart, then the default content type is # used. # - # source://actionmailer//lib/action_mailer/base.rb#903 + # source://actionmailer//lib/action_mailer/base.rb#915 def set_content_type(m, user_content_type, class_default); end - # source://actionmailer//lib/action_mailer/base.rb#1007 + # source://actionmailer//lib/action_mailer/base.rb#1019 def wrap_inline_attachments(message); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionmailer//lib/action_mailer/form_builder.rb#18 + def _default_form_builder; end + + # source://actionmailer//lib/action_mailer/form_builder.rb#18 + def _default_form_builder=(value); end + + # source://actionmailer//lib/action_mailer/form_builder.rb#18 + def _default_form_builder?; end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 + def _deliver_callbacks; end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 + def _deliver_callbacks=(value); end + + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods=(value); end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods?; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#15 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#16 def _helpers; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#211 def _layout=(value); end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#211 def _layout?; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#212 def _layout_conditions; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#212 def _layout_conditions=(value); end - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#212 def _layout_conditions?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _process_action_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _process_action_callbacks=(value); end - # source://actionpack/7.0.6/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies; end - # source://actionpack/7.0.6/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies=(value); end - # source://actionpack/7.0.6/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/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. # If this is an anonymous mailer, this method will return +anonymous+ instead. # - # source://actionmailer//lib/action_mailer/base.rb#558 + # source://actionmailer//lib/action_mailer/base.rb#570 def controller_path; end # Sets the defaults through app configuration: @@ -1068,13 +1123,13 @@ class ActionMailer::Base < ::AbstractController::Base # # Aliased by ::default_options= # - # source://actionmailer//lib/action_mailer/base.rb#570 + # source://actionmailer//lib/action_mailer/base.rb#582 def default(value = T.unsafe(nil)); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end # Sets the defaults through app configuration: @@ -1086,131 +1141,134 @@ class ActionMailer::Base < ::AbstractController::Base # # config.action_mailer.default_options = { from: "no-reply@example.org" } # - # source://actionmailer//lib/action_mailer/base.rb#570 + # source://actionmailer//lib/action_mailer/base.rb#582 def default_options=(value = T.unsafe(nil)); end - # source://actionmailer//lib/action_mailer/base.rb#490 + # source://actionmailer//lib/action_mailer/base.rb#502 def default_params; end - # source://actionmailer//lib/action_mailer/base.rb#490 + # source://actionmailer//lib/action_mailer/base.rb#502 def default_params=(value); end - # source://actionmailer//lib/action_mailer/base.rb#490 + # source://actionmailer//lib/action_mailer/base.rb#502 def default_params?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_static_extension=(value); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 + # source://actionmailer//lib/action_mailer/queued_delivery.rb#9 def deliver_later_queue_name; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 - def deliver_later_queue_name=(val); end + # source://actionmailer//lib/action_mailer/queued_delivery.rb#9 + def deliver_later_queue_name=(value); end + + # source://actionmailer//lib/action_mailer/queued_delivery.rb#9 + def deliver_later_queue_name?; end - # Wraps an email delivery inside of ActiveSupport::Notifications instrumentation. + # Wraps an email delivery inside of ActiveSupport::Notifications instrumentation. # - # This method is actually called by the Mail::Message object itself - # through a callback when you call :deliver on the Mail::Message, - # calling +deliver_mail+ directly and passing a Mail::Message will do + # This method is actually called by the +Mail::Message+ object itself + # through a callback when you call :deliver on the +Mail::Message+, + # calling +deliver_mail+ directly and passing a +Mail::Message+ will do # nothing except tell the logger you sent the email. # - # source://actionmailer//lib/action_mailer/base.rb#585 + # source://actionmailer//lib/action_mailer/base.rb#597 def deliver_mail(mail); end - # source://actionmailer//lib/action_mailer/base.rb#489 + # source://actionmailer//lib/action_mailer/queued_delivery.rb#8 def delivery_job; end - # source://actionmailer//lib/action_mailer/base.rb#489 + # source://actionmailer//lib/action_mailer/queued_delivery.rb#8 def delivery_job=(value); end - # source://actionmailer//lib/action_mailer/base.rb#489 + # source://actionmailer//lib/action_mailer/queued_delivery.rb#8 def delivery_job?; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#19 def delivery_method; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#19 def delivery_method=(value); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#19 def delivery_method?; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#17 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 def delivery_methods; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#17 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 def delivery_methods=(value); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#17 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 def delivery_methods?; end # Returns an email in the format "Name ". # # If the name is a blank string, it returns just the address. # - # source://actionmailer//lib/action_mailer/base.rb#595 + # source://actionmailer//lib/action_mailer/base.rb#607 def email_address_with_name(address, name); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def file_settings; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def file_settings=(value); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def file_settings?; end - # source://actionpack/7.0.6/lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys; end - # source://actionpack/7.0.6/lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys=(value); end - # source://actionpack/7.0.6/lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/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. # If this is an anonymous mailer, this method will return +anonymous+ instead. # - # source://actionmailer//lib/action_mailer/base.rb#558 + # source://actionmailer//lib/action_mailer/base.rb#570 def mailer_name; end # Allows to set the name of current mailer. # - # source://actionmailer//lib/action_mailer/base.rb#562 + # source://actionmailer//lib/action_mailer/base.rb#574 def mailer_name=(_arg0); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def perform_caching=(value); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#14 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#16 def perform_deliveries; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#14 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#16 def perform_deliveries=(val); end # source://actionmailer//lib/action_mailer/preview.rb#25 @@ -1220,63 +1278,69 @@ class ActionMailer::Base < ::AbstractController::Base def preview_interceptors=(val); end # source://actionmailer//lib/action_mailer/preview.rb#14 - def preview_path; end + def preview_paths; end # source://actionmailer//lib/action_mailer/preview.rb#14 - def preview_path=(val); end + def preview_paths=(val); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#13 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 def raise_delivery_errors; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#13 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 def raise_delivery_errors=(val); end + # source://actionpack/7.1.3.2/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack/7.1.3.2/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. # Either a class, string, or symbol can be passed in as the Interceptor. # If a string or symbol is passed in it will be camelized and constantized. # - # source://actionmailer//lib/action_mailer/base.rb#535 + # source://actionmailer//lib/action_mailer/base.rb#547 def register_interceptor(interceptor); end # Register one or more Interceptors which will be called before mail is sent. # - # source://actionmailer//lib/action_mailer/base.rb#509 + # source://actionmailer//lib/action_mailer/base.rb#521 def register_interceptors(*interceptors); end # Register an Observer which will be notified when mail is delivered. # Either a class, string, or symbol can be passed in as the Observer. # If a string or symbol is passed in it will be camelized and constantized. # - # source://actionmailer//lib/action_mailer/base.rb#521 + # source://actionmailer//lib/action_mailer/base.rb#533 def register_observer(observer); end # Register one or more Observers which will be notified when mail is delivered. # - # source://actionmailer//lib/action_mailer/base.rb#499 + # source://actionmailer//lib/action_mailer/base.rb#511 def register_observers(*observers); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def sendmail_settings; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def sendmail_settings=(value); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def sendmail_settings?; end # source://actionmailer//lib/action_mailer/preview.rb#22 @@ -1285,75 +1349,75 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/preview.rb#22 def show_previews=(val); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def smtp_settings; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def smtp_settings=(value); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def smtp_settings?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end # Emails do not support relative path links. # # @return [Boolean] # - # source://actionmailer//lib/action_mailer/base.rb#931 + # source://actionmailer//lib/action_mailer/base.rb#943 def supports_path?; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def test_settings; end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def test_settings=(value); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def test_settings?; end # Unregister a previously registered Interceptor. # Either a class, string, or symbol can be passed in as the Interceptor. # If a string or symbol is passed in it will be camelized and constantized. # - # source://actionmailer//lib/action_mailer/base.rb#542 + # source://actionmailer//lib/action_mailer/base.rb#554 def unregister_interceptor(interceptor); end # Unregister one or more previously registered Interceptors. # - # source://actionmailer//lib/action_mailer/base.rb#514 + # source://actionmailer//lib/action_mailer/base.rb#526 def unregister_interceptors(*interceptors); end # Unregister a previously registered Observer. # Either a class, string, or symbol can be passed in as the Observer. # If a string or symbol is passed in it will be camelized and constantized. # - # source://actionmailer//lib/action_mailer/base.rb#528 + # source://actionmailer//lib/action_mailer/base.rb#540 def unregister_observer(observer); end # Unregister one or more previously registered Observers. # - # source://actionmailer//lib/action_mailer/base.rb#504 + # source://actionmailer//lib/action_mailer/base.rb#516 def unregister_observers(*observers); end private - # source://actionmailer//lib/action_mailer/base.rb#616 + # source://actionmailer//lib/action_mailer/base.rb#628 def method_missing(method_name, *args, **_arg2); end - # source://actionmailer//lib/action_mailer/base.rb#546 + # source://actionmailer//lib/action_mailer/base.rb#558 def observer_class_for(value); end # @return [Boolean] # - # source://actionmailer//lib/action_mailer/base.rb#625 + # source://actionmailer//lib/action_mailer/base.rb#637 def respond_to_missing?(method, include_all = T.unsafe(nil)); end - # source://actionmailer//lib/action_mailer/base.rb#603 + # source://actionmailer//lib/action_mailer/base.rb#615 def set_payload_for_mail(payload, mail); end end end @@ -1364,49 +1428,92 @@ module ActionMailer::Base::HelperMethods include ::ActionText::ContentHelper include ::ActionText::TagHelper - # source://actionpack/7.0.6/lib/abstract_controller/caching/fragments.rb#31 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching/fragments.rb#33 def combined_fragment_cache_key(*args, **_arg1, &block); end - # source://actionpack/7.0.6/lib/abstract_controller/caching.rb#43 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching.rb#43 def view_cache_dependencies(*args, **_arg1, &block); end end -# source://actionmailer//lib/action_mailer/base.rb#757 +# source://actionmailer//lib/action_mailer/base.rb#769 class ActionMailer::Base::LateAttachmentsProxy < ::SimpleDelegator - # source://actionmailer//lib/action_mailer/base.rb#759 + # source://actionmailer//lib/action_mailer/base.rb#771 def []=(_name, _content); end - # source://actionmailer//lib/action_mailer/base.rb#758 + # source://actionmailer//lib/action_mailer/base.rb#770 def inline; end private # @raise [RuntimeError] # - # source://actionmailer//lib/action_mailer/base.rb#762 + # source://actionmailer//lib/action_mailer/base.rb#774 def _raise_error; end end -# source://actionmailer//lib/action_mailer/base.rb#652 +# source://actionmailer//lib/action_mailer/base.rb#664 class ActionMailer::Base::NullMail - # source://actionmailer//lib/action_mailer/base.rb#653 + # source://actionmailer//lib/action_mailer/base.rb#665 def body; end - # source://actionmailer//lib/action_mailer/base.rb#654 + # source://actionmailer//lib/action_mailer/base.rb#666 def header; end - # source://actionmailer//lib/action_mailer/base.rb#660 + # source://actionmailer//lib/action_mailer/base.rb#672 def method_missing(*args); end # @return [Boolean] # - # source://actionmailer//lib/action_mailer/base.rb#656 + # source://actionmailer//lib/action_mailer/base.rb#668 def respond_to?(string, include_all = T.unsafe(nil)); end end -# source://actionmailer//lib/action_mailer/base.rb#485 +# source://actionmailer//lib/action_mailer/base.rb#498 ActionMailer::Base::PROTECTED_IVARS = T.let(T.unsafe(nil), Array) +# source://actionmailer//lib/action_mailer/callbacks.rb#4 +module ActionMailer::Callbacks + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActiveSupport::Callbacks + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionMailer::Callbacks::ClassMethods + mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods + mixes_in_class_methods ::ActiveSupport::DescendantsTracker + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def __callbacks?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def __callbacks?; end + end +end + +# source://actionmailer//lib/action_mailer/callbacks.rb#12 +module ActionMailer::Callbacks::ClassMethods + # Defines a callback that will get called right after the + # message's delivery method is finished. + # + # source://actionmailer//lib/action_mailer/callbacks.rb#21 + def after_deliver(*filters, &blk); end + + # Defines a callback that will get called around the message's deliver method. + # + # source://actionmailer//lib/action_mailer/callbacks.rb#26 + def around_deliver(*filters, &blk); end + + # Defines a callback that will get called right before the + # message is sent to the delivery method. + # + # source://actionmailer//lib/action_mailer/callbacks.rb#15 + def before_deliver(*filters, &blk); end +end + # source://actionmailer//lib/action_mailer/collector.rb#8 class ActionMailer::Collector include ::AbstractController::Collector @@ -1435,10 +1542,12 @@ class ActionMailer::Collector def responses; end end +# = Action Mailer \DeliveryMethods +# # This module handles everything related to mail delivery, from registering # new delivery methods to configuring the mail object to be sent. # -# source://actionmailer//lib/action_mailer/delivery_methods.rb#8 +# source://actionmailer//lib/action_mailer/delivery_methods.rb#10 module ActionMailer::DeliveryMethods extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -1446,7 +1555,7 @@ module ActionMailer::DeliveryMethods mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActionMailer::DeliveryMethods::ClassMethods - # source://actionmailer//lib/action_mailer/delivery_methods.rb#78 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#80 def wrap_delivery_behavior!(*args); end module GeneratedClassMethods @@ -1494,28 +1603,75 @@ end # Helpers for creating and wrapping delivery behavior, used by DeliveryMethods. # -# source://actionmailer//lib/action_mailer/delivery_methods.rb#40 +# source://actionmailer//lib/action_mailer/delivery_methods.rb#42 module ActionMailer::DeliveryMethods::ClassMethods # Adds a new delivery method through the given class using the given # symbol as alias and the default options supplied. # # add_delivery_method :sendmail, Mail::Sendmail, # location: '/usr/sbin/sendmail', - # arguments: '-i' + # arguments: %w[ -i ] # - # source://actionmailer//lib/action_mailer/delivery_methods.rb#50 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 def add_delivery_method(symbol, klass, default_options = T.unsafe(nil)); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#42 - def deliveries(*_arg0, **_arg1, &_arg2); end + # source://actionmailer//lib/action_mailer/delivery_methods.rb#44 + def deliveries(&block); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#42 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#44 def deliveries=(arg); end - # source://actionmailer//lib/action_mailer/delivery_methods.rb#56 + # source://actionmailer//lib/action_mailer/delivery_methods.rb#58 def wrap_delivery_behavior(mail, method = T.unsafe(nil), options = T.unsafe(nil)); end end +# = Action Mailer Form Builder +# +# Override the default form builder for all views rendered by this +# mailer and any of its descendants. Accepts a subclass of +# ActionView::Helpers::FormBuilder. +# +# While emails typically will not include forms, this can be used +# by views that are shared between controllers and mailers. +# +# For more information, see +ActionController::FormBuilder+. +# +# source://actionmailer//lib/action_mailer/form_builder.rb#14 +module ActionMailer::FormBuilder + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionMailer::FormBuilder::ClassMethods + + # Default form builder for the mailer + # + # source://actionmailer//lib/action_mailer/form_builder.rb#33 + def default_form_builder; end + + module GeneratedClassMethods + def _default_form_builder; end + def _default_form_builder=(value); end + def _default_form_builder?; end + end + + module GeneratedInstanceMethods; end +end + +# source://actionmailer//lib/action_mailer/form_builder.rb#21 +module ActionMailer::FormBuilder::ClassMethods + # Set the form builder to be used as the default for all forms + # in the views rendered by this mailer and its subclasses. + # + # ==== Parameters + # * builder - Default form builder, an instance of ActionView::Helpers::FormBuilder + # + # source://actionmailer//lib/action_mailer/form_builder.rb#27 + def default_form_builder(builder); end +end + +# = Action Mailer \InlinePreviewInterceptor +# # Implements a mailer preview interceptor that converts image tag src attributes # that use inline cid: style URLs to data: style URLs so that they are visible # when previewing an HTML email in a web browser. @@ -1525,104 +1681,115 @@ end # # ActionMailer::Base.preview_interceptors.delete(ActionMailer::InlinePreviewInterceptor) # -# source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#15 +# source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#17 class ActionMailer::InlinePreviewInterceptor include ::Base64 # @return [InlinePreviewInterceptor] a new instance of InlinePreviewInterceptor # - # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#24 + # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#26 def initialize(message); end - # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#28 + # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#30 def transform!; end private - # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#49 + # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#51 def data_url(part); end - # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#53 + # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#55 def find_part(cid); end - # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#45 + # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#47 def html_part; end # Returns the value of attribute message. # - # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#43 + # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#45 def message; end class << self - # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#20 + # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#22 def previewing_email(message); end end end -# source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#16 +# source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#18 ActionMailer::InlinePreviewInterceptor::PATTERN = T.let(T.unsafe(nil), Regexp) +# = Action Mailer \LogSubscriber +# # Implements the ActiveSupport::LogSubscriber for logging notifications when # email is delivered or received. # -# source://actionmailer//lib/action_mailer/log_subscriber.rb#8 +# source://actionmailer//lib/action_mailer/log_subscriber.rb#10 class ActionMailer::LogSubscriber < ::ActiveSupport::LogSubscriber # An email was delivered. # - # source://actionmailer//lib/action_mailer/log_subscriber.rb#10 + # source://actionmailer//lib/action_mailer/log_subscriber.rb#12 def deliver(event); end # Use the logger configured for ActionMailer::Base. # - # source://actionmailer//lib/action_mailer/log_subscriber.rb#33 + # source://actionmailer//lib/action_mailer/log_subscriber.rb#38 def logger; end # An email was generated. # - # source://actionmailer//lib/action_mailer/log_subscriber.rb#24 + # source://actionmailer//lib/action_mailer/log_subscriber.rb#28 def process(event); end + + class << self + # source://activesupport/7.1.3.2/lib/active_support/log_subscriber.rb#87 + def log_levels; end + end end -# The ActionMailer::MailDeliveryJob class is used when you +# = Action Mailer \MailDeliveryJob +# +# The +ActionMailer::MailDeliveryJob+ class is used when you # want to send emails outside of the request-response cycle. It supports # sending either parameterized or normal mail. # # Exceptions are rescued and handled by the mailer class. # -# source://actionmailer//lib/action_mailer/mail_delivery_job.rb#11 +# source://actionmailer//lib/action_mailer/mail_delivery_job.rb#13 class ActionMailer::MailDeliveryJob < ::ActiveJob::Base - # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#16 + # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#21 def perform(mailer, mail_method, delivery_method, args:, kwargs: T.unsafe(nil), params: T.unsafe(nil)); end private - # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#35 + # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#40 def handle_exception_with_mailer_class(exception); end # "Deserialize" the mailer class name by hand in case another argument # (like a Global ID reference) raised DeserializationError. # - # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#29 + # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#34 def mailer_class; end class << self - # source://activejob/7.0.6/lib/active_job/queue_name.rb#55 + # source://activejob/7.1.3.2/lib/active_job/queue_name.rb#55 def queue_name; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end end end +# = Action Mailer \MailHelper +# # Provides helper methods for ActionMailer::Base that can be used for easily # formatting messages, accessing mailer or message instances, and the # attachments list. # -# source://actionmailer//lib/action_mailer/mail_helper.rb#7 +# source://actionmailer//lib/action_mailer/mail_helper.rb#9 module ActionMailer::MailHelper # Access the message attachments list. # - # source://actionmailer//lib/action_mailer/mail_helper.rb#43 + # source://actionmailer//lib/action_mailer/mail_helper.rb#45 def attachments; end # Take the text and format it, indented two spaces for each line, and @@ -1638,7 +1805,7 @@ module ActionMailer::MailHelper # block_format text # # => " This is the paragraph.\n\n * item1\n * item2\n" # - # source://actionmailer//lib/action_mailer/mail_helper.rb#20 + # source://actionmailer//lib/action_mailer/mail_helper.rb#22 def block_format(text); end # Returns +text+ wrapped at +len+ columns and indented +indent+ spaces. @@ -1650,25 +1817,27 @@ module ActionMailer::MailHelper # format_paragraph(my_text, 25, 4) # # => " Here is a sample text with\n more than 40 characters" # - # source://actionmailer//lib/action_mailer/mail_helper.rb#55 + # source://actionmailer//lib/action_mailer/mail_helper.rb#57 def format_paragraph(text, len = T.unsafe(nil), indent = T.unsafe(nil)); end # Access the mailer instance. # - # source://actionmailer//lib/action_mailer/mail_helper.rb#33 + # source://actionmailer//lib/action_mailer/mail_helper.rb#35 def mailer; end # Access the message instance. # - # source://actionmailer//lib/action_mailer/mail_helper.rb#38 + # source://actionmailer//lib/action_mailer/mail_helper.rb#40 def message; end end -# The ActionMailer::MessageDelivery class is used by +# = Action Mailer \MessageDelivery +# +# The +ActionMailer::MessageDelivery+ class is used by # ActionMailer::Base when creating a new mailer. # MessageDelivery is a wrapper (+Delegator+ subclass) around a lazy -# created Mail::Message. You can get direct access to the -# Mail::Message, deliver the email or schedule the email to be sent +# created +Mail::Message+. You can get direct access to the +# +Mail::Message+, deliver the email or schedule the email to be sent # through Active Job. # # Notifier.welcome(User.first) # an ActionMailer::MessageDelivery object @@ -1676,21 +1845,21 @@ end # Notifier.welcome(User.first).deliver_later # enqueue email delivery as a job through Active Job # Notifier.welcome(User.first).message # a Mail::Message object # -# source://actionmailer//lib/action_mailer/message_delivery.rb#17 +# source://actionmailer//lib/action_mailer/message_delivery.rb#19 class ActionMailer::MessageDelivery # @return [MessageDelivery] a new instance of MessageDelivery # - # source://actionmailer//lib/action_mailer/message_delivery.rb#18 + # source://actionmailer//lib/action_mailer/message_delivery.rb#20 def initialize(mailer_class, action, *args, **_arg3); end # Method calls are delegated to the Mail::Message that's ready to deliver. # - # source://actionmailer//lib/action_mailer/message_delivery.rb#29 + # source://actionmailer//lib/action_mailer/message_delivery.rb#31 def __getobj__; end # Unused except for delegator internals (dup, marshalling). # - # source://actionmailer//lib/action_mailer/message_delivery.rb#34 + # source://actionmailer//lib/action_mailer/message_delivery.rb#36 def __setobj__(mail_message); end # Enqueues the email to be delivered through Active Job. When the @@ -1708,15 +1877,16 @@ class ActionMailer::MessageDelivery # * :queue - Enqueue the email on the specified queue. # * :priority - Enqueues the email with the specified priority # - # By default, the email will be enqueued using ActionMailer::MailDeliveryJob. Each - # ActionMailer::Base class can specify the job to use by setting the class variable - # +delivery_job+. + # By default, the email will be enqueued using ActionMailer::MailDeliveryJob on + # the default queue. Mailer classes can customize the queue name used for the default + # job by assigning a +deliver_later_queue_name+ class variable, or provide a custom job + # by assigning a +delivery_job+. When a custom job is used, it controls the queue name. # # class AccountRegistrationMailer < ApplicationMailer # self.delivery_job = RegistrationDeliveryJob # end # - # source://actionmailer//lib/action_mailer/message_delivery.rb#98 + # source://actionmailer//lib/action_mailer/message_delivery.rb#102 def deliver_later(options = T.unsafe(nil)); end # Enqueues the email to be delivered through Active Job. When the @@ -1736,22 +1906,23 @@ class ActionMailer::MessageDelivery # * :queue - Enqueue the email on the specified queue # * :priority - Enqueues the email with the specified priority # - # By default, the email will be enqueued using ActionMailer::MailDeliveryJob. Each - # ActionMailer::Base class can specify the job to use by setting the class variable - # +delivery_job+. + # By default, the email will be enqueued using ActionMailer::MailDeliveryJob on + # the default queue. Mailer classes can customize the queue name used for the default + # job by assigning a +deliver_later_queue_name+ class variable, or provide a custom job + # by assigning a +delivery_job+. When a custom job is used, it controls the queue name. # # class AccountRegistrationMailer < ApplicationMailer # self.delivery_job = RegistrationDeliveryJob # end # - # source://actionmailer//lib/action_mailer/message_delivery.rb#72 + # source://actionmailer//lib/action_mailer/message_delivery.rb#75 def deliver_later!(options = T.unsafe(nil)); end # Delivers an email: # # Notifier.welcome(User.first).deliver_now # - # source://actionmailer//lib/action_mailer/message_delivery.rb#117 + # source://actionmailer//lib/action_mailer/message_delivery.rb#123 def deliver_now; end # Delivers an email without checking +perform_deliveries+ and +raise_delivery_errors+, @@ -1759,30 +1930,30 @@ class ActionMailer::MessageDelivery # # Notifier.welcome(User.first).deliver_now! # - # source://actionmailer//lib/action_mailer/message_delivery.rb#107 + # source://actionmailer//lib/action_mailer/message_delivery.rb#111 def deliver_now!; end # Returns the resulting Mail::Message # - # source://actionmailer//lib/action_mailer/message_delivery.rb#39 + # source://actionmailer//lib/action_mailer/message_delivery.rb#41 def message; end # Was the delegate loaded, causing the mailer action to be processed? # # @return [Boolean] # - # source://actionmailer//lib/action_mailer/message_delivery.rb#44 + # source://actionmailer//lib/action_mailer/message_delivery.rb#46 def processed?; end private - # source://actionmailer//lib/action_mailer/message_delivery.rb#132 + # source://actionmailer//lib/action_mailer/message_delivery.rb#140 def enqueue_delivery(delivery_method, options = T.unsafe(nil)); end # Returns the processed Mailer instance. We keep this instance - # on hand so we can delegate exception handling to it. + # on hand so we can run callbacks and delegate exception handling to it. # - # source://actionmailer//lib/action_mailer/message_delivery.rb#126 + # source://actionmailer//lib/action_mailer/message_delivery.rb#134 def processed_mailer; end end @@ -1794,6 +1965,8 @@ class ActionMailer::NonInferrableMailerError < ::StandardError def initialize(name); end end +# = Action Mailer \Parameterized +# # Provides the option to parameterize mailers in order to share instance variable # setup, processing, and common headers. # @@ -1878,14 +2051,14 @@ end # # InvitationsMailer.with(inviter: person_a, invitee: person_b).account_invitation.deliver_later # -# source://actionmailer//lib/action_mailer/parameterized.rb#87 +# source://actionmailer//lib/action_mailer/parameterized.rb#89 module ActionMailer::Parameterized extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionMailer::Parameterized::ClassMethods end -# source://actionmailer//lib/action_mailer/parameterized.rb#94 +# source://actionmailer//lib/action_mailer/parameterized.rb#100 module ActionMailer::Parameterized::ClassMethods # Provide the parameters to the mailer in order to use them in the instance methods and callbacks. # @@ -1893,112 +2066,112 @@ module ActionMailer::Parameterized::ClassMethods # # See Parameterized documentation for full example. # - # source://actionmailer//lib/action_mailer/parameterized.rb#100 + # source://actionmailer//lib/action_mailer/parameterized.rb#106 def with(params); end end -# source://actionmailer//lib/action_mailer/parameterized.rb#105 +# source://actionmailer//lib/action_mailer/parameterized.rb#111 class ActionMailer::Parameterized::Mailer # @return [Mailer] a new instance of Mailer # - # source://actionmailer//lib/action_mailer/parameterized.rb#106 + # source://actionmailer//lib/action_mailer/parameterized.rb#112 def initialize(mailer, params); end private - # source://actionmailer//lib/action_mailer/parameterized.rb#111 + # source://actionmailer//lib/action_mailer/parameterized.rb#117 def method_missing(method_name, *args, **_arg2); end # @return [Boolean] # - # source://actionmailer//lib/action_mailer/parameterized.rb#120 + # source://actionmailer//lib/action_mailer/parameterized.rb#126 def respond_to_missing?(method, include_all = T.unsafe(nil)); end end -# source://actionmailer//lib/action_mailer/parameterized.rb#125 +# source://actionmailer//lib/action_mailer/parameterized.rb#131 class ActionMailer::Parameterized::MessageDelivery < ::ActionMailer::MessageDelivery # @return [MessageDelivery] a new instance of MessageDelivery # - # source://actionmailer//lib/action_mailer/parameterized.rb#126 + # source://actionmailer//lib/action_mailer/parameterized.rb#132 def initialize(mailer_class, action, params, *args, **_arg4); end private - # source://actionmailer//lib/action_mailer/parameterized.rb#140 + # source://actionmailer//lib/action_mailer/parameterized.rb#146 def enqueue_delivery(delivery_method, options = T.unsafe(nil)); end - # source://actionmailer//lib/action_mailer/parameterized.rb#133 + # source://actionmailer//lib/action_mailer/parameterized.rb#139 def processed_mailer; end end -# source://actionmailer//lib/action_mailer/preview.rb#69 +# source://actionmailer//lib/action_mailer/preview.rb#93 class ActionMailer::Preview extend ::ActiveSupport::DescendantsTracker # @return [Preview] a new instance of Preview # - # source://actionmailer//lib/action_mailer/preview.rb#74 + # source://actionmailer//lib/action_mailer/preview.rb#98 def initialize(params = T.unsafe(nil)); end # Returns the value of attribute params. # - # source://actionmailer//lib/action_mailer/preview.rb#72 + # source://actionmailer//lib/action_mailer/preview.rb#96 def params; end class << self # Returns all mailer preview classes. # - # source://actionmailer//lib/action_mailer/preview.rb#80 + # source://actionmailer//lib/action_mailer/preview.rb#104 def all; end # Returns the mail object for the given email name. The registered preview # interceptors will be informed so that they can transform the message # as they would if the mail was actually being delivered. # - # source://actionmailer//lib/action_mailer/preview.rb#88 + # source://actionmailer//lib/action_mailer/preview.rb#112 def call(email, params = T.unsafe(nil)); end # Returns +true+ if the email exists. # # @return [Boolean] # - # source://actionmailer//lib/action_mailer/preview.rb#101 + # source://actionmailer//lib/action_mailer/preview.rb#125 def email_exists?(email); end # Returns all of the available email previews. # - # source://actionmailer//lib/action_mailer/preview.rb#96 + # source://actionmailer//lib/action_mailer/preview.rb#120 def emails; end # Returns +true+ if the preview exists. # # @return [Boolean] # - # source://actionmailer//lib/action_mailer/preview.rb#106 + # source://actionmailer//lib/action_mailer/preview.rb#130 def exists?(preview); end # Find a mailer preview by its underscored class name. # - # source://actionmailer//lib/action_mailer/preview.rb#111 + # source://actionmailer//lib/action_mailer/preview.rb#135 def find(preview); end # Returns the underscored name of the mailer preview without the suffix. # - # source://actionmailer//lib/action_mailer/preview.rb#116 + # source://actionmailer//lib/action_mailer/preview.rb#140 def preview_name; end private - # source://actionmailer//lib/action_mailer/preview.rb#135 + # source://actionmailer//lib/action_mailer/preview.rb#159 def inform_preview_interceptors(message); end - # source://actionmailer//lib/action_mailer/preview.rb#121 + # source://actionmailer//lib/action_mailer/preview.rb#145 def load_previews; end - # source://actionmailer//lib/action_mailer/preview.rb#127 - def preview_path; end + # source://actionmailer//lib/action_mailer/preview.rb#151 + def preview_paths; end - # source://actionmailer//lib/action_mailer/preview.rb#131 + # source://actionmailer//lib/action_mailer/preview.rb#155 def show_previews; end end end @@ -2008,49 +2181,86 @@ module ActionMailer::Previews extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionMailer::Previews::ClassMethods + + # source://actionmailer//lib/action_mailer/preview.rb#28 + def preview_path; end end -# source://actionmailer//lib/action_mailer/preview.rb#28 +# source://actionmailer//lib/action_mailer/preview.rb#36 module ActionMailer::Previews::ClassMethods + # source://actionmailer//lib/action_mailer/preview.rb#45 + def preview_path; end + + # source://actionmailer//lib/action_mailer/preview.rb#37 + def preview_path=(value); end + # Register an Interceptor which will be called before mail is previewed. # Either a class or a string can be passed in as the Interceptor. If a # string is passed in it will be constantized. # - # source://actionmailer//lib/action_mailer/preview.rb#42 + # source://actionmailer//lib/action_mailer/preview.rb#66 def register_preview_interceptor(interceptor); end # Register one or more Interceptors which will be called before mail is previewed. # - # source://actionmailer//lib/action_mailer/preview.rb#30 + # source://actionmailer//lib/action_mailer/preview.rb#54 def register_preview_interceptors(*interceptors); end # Unregister a previously registered Interceptor. # Either a class or a string can be passed in as the Interceptor. If a # string is passed in it will be constantized. # - # source://actionmailer//lib/action_mailer/preview.rb#53 + # source://actionmailer//lib/action_mailer/preview.rb#77 def unregister_preview_interceptor(interceptor); end # Unregister one or more previously registered Interceptors. # - # source://actionmailer//lib/action_mailer/preview.rb#35 + # source://actionmailer//lib/action_mailer/preview.rb#59 def unregister_preview_interceptors(*interceptors); end private - # source://actionmailer//lib/action_mailer/preview.rb#58 + # source://actionmailer//lib/action_mailer/preview.rb#82 def interceptor_class_for(interceptor); end end +# source://actionmailer//lib/action_mailer/queued_delivery.rb#4 +module ActionMailer::QueuedDelivery + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def deliver_later_queue_name; end + def deliver_later_queue_name=(value); end + def deliver_later_queue_name?; end + def delivery_job; end + def delivery_job=(value); end + def delivery_job?; end + end + + module GeneratedInstanceMethods + def deliver_later_queue_name; end + def deliver_later_queue_name=(value); end + def deliver_later_queue_name?; end + def delivery_job; end + def delivery_job=(value); end + def delivery_job?; end + end +end + # source://actionmailer//lib/action_mailer/railtie.rb#9 class ActionMailer::Railtie < ::Rails::Railtie; end +# = Action Mailer \Rescuable +# # Provides # {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from] # for mailers. Wraps mailer action processing, mail job processing, and mail # delivery to handle configured errors. # -# source://actionmailer//lib/action_mailer/rescuable.rb#8 +# source://actionmailer//lib/action_mailer/rescuable.rb#10 module ActionMailer::Rescuable extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -2060,12 +2270,12 @@ module ActionMailer::Rescuable mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods mixes_in_class_methods ::ActionMailer::Rescuable::ClassMethods - # source://actionmailer//lib/action_mailer/rescuable.rb#18 + # source://actionmailer//lib/action_mailer/rescuable.rb#20 def handle_exceptions; end private - # source://actionmailer//lib/action_mailer/rescuable.rb#25 + # source://actionmailer//lib/action_mailer/rescuable.rb#27 def process(*_arg0, **_arg1, &_arg2); end module GeneratedClassMethods @@ -2083,7 +2293,7 @@ end # source://actionmailer//lib/action_mailer/rescuable.rb#0 module ActionMailer::Rescuable::ClassMethods - # source://actionmailer//lib/action_mailer/rescuable.rb#13 + # source://actionmailer//lib/action_mailer/rescuable.rb#15 def handle_exception(exception); end end @@ -2092,7 +2302,6 @@ class ActionMailer::TestCase < ::ActiveSupport::TestCase include ::ActiveSupport::Testing::ConstantLookup include ::ActiveJob::TestHelper include ::ActionMailer::TestHelper - include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable include ::Rails::Dom::Testing::Assertions::SelectorAssertions include ::Rails::Dom::Testing::Assertions::DomAssertions include ::ActionMailer::TestCase::Behavior @@ -2109,7 +2318,7 @@ class ActionMailer::TestCase < ::ActiveSupport::TestCase def _mailer_class?; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end # source://actionmailer//lib/action_mailer/test_case.rb#41 @@ -2128,7 +2337,6 @@ module ActionMailer::TestCase::Behavior include ::ActiveSupport::Testing::Assertions include ::ActiveJob::TestHelper include ::ActionMailer::TestHelper - include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable include ::Rails::Dom::Testing::Assertions::SelectorAssertions include ::Rails::Dom::Testing::Assertions::DomAssertions extend ::ActiveSupport::Concern @@ -2139,30 +2347,36 @@ module ActionMailer::TestCase::Behavior mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods mixes_in_class_methods ::ActionMailer::TestCase::Behavior::ClassMethods + # Reads the fixture file for the given mailer. + # + # This is useful when testing mailers by being able to write the body of + # an email inside a fixture. See the testing guide for a concrete example: + # https://guides.rubyonrails.org/testing.html#revenge-of-the-fixtures + # + # source://actionmailer//lib/action_mailer/test_case.rb#82 + def read_fixture(action); end + private - # source://actionmailer//lib/action_mailer/test_case.rb#106 + # source://actionmailer//lib/action_mailer/test_case.rb#115 def charset; end - # source://actionmailer//lib/action_mailer/test_case.rb#110 + # source://actionmailer//lib/action_mailer/test_case.rb#119 def encode(subject); end - # source://actionmailer//lib/action_mailer/test_case.rb#78 + # source://actionmailer//lib/action_mailer/test_case.rb#87 def initialize_test_deliveries; end - # source://actionmailer//lib/action_mailer/test_case.rb#114 - def read_fixture(action); end - - # source://actionmailer//lib/action_mailer/test_case.rb#95 + # source://actionmailer//lib/action_mailer/test_case.rb#104 def restore_delivery_method; end - # source://actionmailer//lib/action_mailer/test_case.rb#85 + # source://actionmailer//lib/action_mailer/test_case.rb#94 def restore_test_deliveries; end - # source://actionmailer//lib/action_mailer/test_case.rb#90 + # source://actionmailer//lib/action_mailer/test_case.rb#99 def set_delivery_method(method); end - # source://actionmailer//lib/action_mailer/test_case.rb#100 + # source://actionmailer//lib/action_mailer/test_case.rb#109 def set_expected_mail; end module GeneratedClassMethods @@ -2205,7 +2419,7 @@ end # Provides helper methods for testing Action Mailer, including #assert_emails # and #assert_no_emails. # -# source://actionmailer//lib/action_mailer/test_helper.rb#8 +# source://actionmailer//lib/action_mailer/test_helper.rb#9 module ActionMailer::TestHelper include ::ActiveSupport::Testing::Assertions include ::ActiveJob::TestHelper @@ -2234,22 +2448,54 @@ module ActionMailer::TestHelper # end # end # - # source://actionmailer//lib/action_mailer/test_helper.rb#34 + # source://actionmailer//lib/action_mailer/test_helper.rb#35 def assert_emails(number, &block); end # Asserts that a specific email has been enqueued, optionally - # matching arguments. + # matching arguments and/or params. # # def test_email # ContactMailer.welcome.deliver_later # assert_enqueued_email_with ContactMailer, :welcome # end # + # def test_email_with_parameters + # ContactMailer.with(greeting: "Hello").welcome.deliver_later + # assert_enqueued_email_with ContactMailer, :welcome, args: { greeting: "Hello" } + # end + # # def test_email_with_arguments # ContactMailer.welcome("Hello", "Goodbye").deliver_later # assert_enqueued_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"] # end # + # def test_email_with_named_arguments + # ContactMailer.welcome(greeting: "Hello", farewell: "Goodbye").deliver_later + # assert_enqueued_email_with ContactMailer, :welcome, args: [{ greeting: "Hello", farewell: "Goodbye" }] + # end + # + # def test_email_with_parameters_and_arguments + # ContactMailer.with(greeting: "Hello").welcome("Cheers", "Goodbye").deliver_later + # assert_enqueued_email_with ContactMailer, :welcome, params: { greeting: "Hello" }, args: ["Cheers", "Goodbye"] + # end + # + # def test_email_with_parameters_and_named_arguments + # ContactMailer.with(greeting: "Hello").welcome(farewell: "Goodbye").deliver_later + # assert_enqueued_email_with ContactMailer, :welcome, params: { greeting: "Hello" }, args: [{farewell: "Goodbye"}] + # end + # + # def test_email_with_parameterized_mailer + # ContactMailer.with(greeting: "Hello").welcome.deliver_later + # assert_enqueued_email_with ContactMailer.with(greeting: "Hello"), :welcome + # end + # + # def test_email_with_matchers + # ContactMailer.with(greeting: "Hello").welcome("Cheers", "Goodbye").deliver_later + # assert_enqueued_email_with ContactMailer, :welcome, + # params: ->(params) { /hello/i.match?(params[:greeting]) }, + # args: ->(args) { /cheers/i.match?(args[0]) } + # end + # # If a block is passed, that block should cause the specified email # to be enqueued. # @@ -2268,8 +2514,8 @@ module ActionMailer::TestHelper # end # end # - # source://actionmailer//lib/action_mailer/test_helper.rb#126 - def assert_enqueued_email_with(mailer, method, args: T.unsafe(nil), queue: T.unsafe(nil), &block); end + # source://actionmailer//lib/action_mailer/test_helper.rb#157 + def assert_enqueued_email_with(mailer, method, params: T.unsafe(nil), args: T.unsafe(nil), queue: T.unsafe(nil), &block); end # Asserts that the number of emails enqueued for later delivery matches # the given number. @@ -2296,7 +2542,7 @@ module ActionMailer::TestHelper # end # end # - # source://actionmailer//lib/action_mailer/test_helper.rb#92 + # source://actionmailer//lib/action_mailer/test_helper.rb#91 def assert_enqueued_emails(number, &block); end # Asserts that no emails have been sent. @@ -2319,7 +2565,7 @@ module ActionMailer::TestHelper # # assert_emails 0, &block # - # source://actionmailer//lib/action_mailer/test_helper.rb#64 + # source://actionmailer//lib/action_mailer/test_helper.rb#63 def assert_no_emails(&block); end # Asserts that no emails are enqueued for later delivery. @@ -2338,12 +2584,70 @@ module ActionMailer::TestHelper # end # end # - # source://actionmailer//lib/action_mailer/test_helper.rb#150 + # source://actionmailer//lib/action_mailer/test_helper.rb#211 def assert_no_enqueued_emails(&block); end + # Returns any emails that are sent in the block. + # + # def test_emails + # emails = capture_emails do + # ContactMailer.welcome.deliver_now + # end + # assert_equal "Hi there", emails.first.subject + # + # emails = capture_emails do + # ContactMailer.welcome.deliver_now + # ContactMailer.welcome.deliver_later + # end + # assert_equal "Hi there", emails.first.subject + # end + # + # source://actionmailer//lib/action_mailer/test_helper.rb#269 + def capture_emails(&block); end + + # Delivers all enqueued emails. If a block is given, delivers all of the emails + # that were enqueued throughout the duration of the block. If a block is + # not given, delivers all the enqueued emails up to this point in the test. + # + # def test_deliver_enqueued_emails + # deliver_enqueued_emails do + # ContactMailer.welcome.deliver_later + # end + # + # assert_emails 1 + # end + # + # def test_deliver_enqueued_emails_without_block + # ContactMailer.welcome.deliver_later + # + # deliver_enqueued_emails + # + # assert_emails 1 + # end + # + # If the +:queue+ option is specified, + # then only the emails(s) enqueued to a specific queue will be performed. + # + # def test_deliver_enqueued_emails_with_queue + # deliver_enqueued_emails queue: :external_mailers do + # CustomerMailer.deliver_later_queue_name = :external_mailers + # CustomerMailer.welcome.deliver_later # will be performed + # EmployeeMailer.deliver_later_queue_name = :internal_mailers + # EmployeeMailer.welcome.deliver_later # will not be performed + # end + # + # assert_emails 1 + # end + # + # If the +:at+ option is specified, then only delivers emails enqueued to deliver + # immediately or before the given time. + # + # source://actionmailer//lib/action_mailer/test_helper.rb#251 + def deliver_enqueued_emails(queue: T.unsafe(nil), at: T.unsafe(nil), &block); end + private - # source://actionmailer//lib/action_mailer/test_helper.rb#155 + # source://actionmailer//lib/action_mailer/test_helper.rb#278 def delivery_job_filter(job); end end @@ -2357,7 +2661,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.0.6.rbi b/sorbet/rbi/gems/actionpack@7.1.3.2.rbi similarity index 87% rename from sorbet/rbi/gems/actionpack@7.0.6.rbi rename to sorbet/rbi/gems/actionpack@7.1.3.2.rbi index a4b37182b..f2123c01c 100644 --- a/sorbet/rbi/gems/actionpack@7.0.6.rbi +++ b/sorbet/rbi/gems/actionpack@7.1.3.2.rbi @@ -4,12 +4,15 @@ # 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.rb#8 +# source://actionpack//lib/abstract_controller/deprecator.rb#3 module AbstractController extend ::ActiveSupport::Autoload class << self - # source://actionpack//lib/abstract_controller.rb#24 + # source://actionpack//lib/abstract_controller/deprecator.rb#4 + def deprecator; end + + # source://actionpack//lib/abstract_controller.rb#25 def eager_load!; end end end @@ -40,6 +43,8 @@ module AbstractController::AssetPaths extend ::ActiveSupport::Concern end +# = Abstract Controller \Base +# # AbstractController::Base is a low-level API. Nobody should be # using it directly, and subclasses (like ActionController::Base) are # expected to provide their own +render+ method, since rendering means @@ -47,7 +52,7 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://actionpack//lib/abstract_controller/base.rb#33 +# source://actionpack//lib/abstract_controller/base.rb#35 class AbstractController::Base include ::ActiveSupport::Configurable extend ::ActiveSupport::Configurable::ClassMethods @@ -55,15 +60,15 @@ class AbstractController::Base # Delegates to the class's ::action_methods. # - # source://actionpack//lib/abstract_controller/base.rb#161 + # source://actionpack//lib/abstract_controller/base.rb#170 def action_methods; end # Returns the name of the action this controller is processing. # - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attr_internal.rb#33 def action_name; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.2/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 @@ -79,23 +84,23 @@ class AbstractController::Base # # @return [Boolean] # - # source://actionpack//lib/abstract_controller/base.rb#175 + # source://actionpack//lib/abstract_controller/base.rb#184 def available_action?(action_name); end # Delegates to the class's ::controller_path. # - # source://actionpack//lib/abstract_controller/base.rb#156 + # source://actionpack//lib/abstract_controller/base.rb#165 def controller_path; end # Returns the formats that can be processed by the controller. # - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attr_internal.rb#33 def formats; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attr_internal.rb#33 def formats=(_arg0); end - # source://actionpack//lib/abstract_controller/base.rb#194 + # source://actionpack//lib/abstract_controller/base.rb#203 def inspect; end # Tests if a response body is set. Used to determine if the @@ -104,10 +109,10 @@ class AbstractController::Base # # @return [Boolean] # - # source://actionpack//lib/abstract_controller/base.rb#182 + # source://actionpack//lib/abstract_controller/base.rb#191 def performed?; end - # Calls the action going through the entire action dispatch stack. + # Calls the action going through the entire Action Dispatch stack. # # The actual method that is called is determined by calling # #method_for_action. If no method can handle the action, then an @@ -116,15 +121,15 @@ class AbstractController::Base # ==== Returns # * self # - # source://actionpack//lib/abstract_controller/base.rb#142 + # source://actionpack//lib/abstract_controller/base.rb#151 def process(action, *args, **_arg2); end # Returns the body of the HTTP response sent by the controller. # - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attr_internal.rb#33 def response_body; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attr_internal.rb#33 def response_body=(_arg0); end # Actually call the method associated with the action. Override @@ -151,21 +156,21 @@ class AbstractController::Base # * false - No valid method name could be found. # Raise +AbstractController::ActionNotFound+. # - # source://actionpack//lib/abstract_controller/base.rb#246 + # source://actionpack//lib/abstract_controller/base.rb#255 def _find_action_name(action_name); end # If the action name was not found, but a method called "action_missing" # was found, #method_for_action will return "_handle_action_missing". # This method calls #action_missing with the current action name. # - # source://actionpack//lib/abstract_controller/base.rb#228 + # source://actionpack//lib/abstract_controller/base.rb#237 def _handle_action_missing(*args); end # Checks if the action name is valid and returns false otherwise. # # @return [Boolean] # - # source://actionpack//lib/abstract_controller/base.rb#282 + # source://actionpack//lib/abstract_controller/base.rb#291 def _valid_action_name?(action_name); end # Returns true if the name can be considered an action because @@ -176,7 +181,7 @@ class AbstractController::Base # # @return [Boolean] # - # source://actionpack//lib/abstract_controller/base.rb#204 + # source://actionpack//lib/abstract_controller/base.rb#213 def action_method?(name); end # Takes an action name and returns the name of the method that will @@ -203,7 +208,7 @@ class AbstractController::Base # * string - The name of the method that handles the action # * nil - No method name could be found. # - # source://actionpack//lib/abstract_controller/base.rb#273 + # source://actionpack//lib/abstract_controller/base.rb#282 def method_for_action(action_name); end # Call the action. Override this in a subclass to modify the @@ -213,24 +218,24 @@ class AbstractController::Base # Notice that the first argument is the method to be dispatched # which is *not* necessarily the same as the action name. # - # source://actionpack//lib/abstract_controller/base.rb#214 + # source://actionpack//lib/abstract_controller/base.rb#223 def process_action(*_arg0, **_arg1, &_arg2); end class << self # Returns the value of attribute abstract. # - # source://actionpack//lib/abstract_controller/base.rb#50 + # source://actionpack//lib/abstract_controller/base.rb#52 def abstract; end # Define a controller as abstract. See internal_methods for more # details. # - # source://actionpack//lib/abstract_controller/base.rb#55 + # source://actionpack//lib/abstract_controller/base.rb#57 def abstract!; end # Returns the value of attribute abstract. # - # source://actionpack//lib/abstract_controller/base.rb#50 + # source://actionpack//lib/abstract_controller/base.rb#52 def abstract?; end # A list of method names that should be considered actions. This @@ -242,14 +247,14 @@ class AbstractController::Base # ==== Returns # * Set - A set of all methods that should be considered actions. # - # source://actionpack//lib/abstract_controller/base.rb#89 + # source://actionpack//lib/abstract_controller/base.rb#96 def action_methods; end # action_methods are cached and there is sometimes a need to refresh # them. ::clear_action_methods! allows you to do that, so next time # you run action_methods, they will be recalculated. # - # source://actionpack//lib/abstract_controller/base.rb#107 + # source://actionpack//lib/abstract_controller/base.rb#111 def clear_action_methods!; end # Returns the full controller name, underscored, without the ending Controller. @@ -263,10 +268,13 @@ class AbstractController::Base # ==== Returns # * String # - # source://actionpack//lib/abstract_controller/base.rb#121 + # source://actionpack//lib/abstract_controller/base.rb#125 def controller_path; end - # source://actionpack//lib/abstract_controller/base.rb#59 + # source://actionpack//lib/abstract_controller/base.rb#135 + def eager_load!; end + + # source://actionpack//lib/abstract_controller/base.rb#61 def inherited(klass); end # A list of all internal methods for a controller. This finds the first @@ -274,14 +282,14 @@ class AbstractController::Base # instance methods on that abstract class. Public instance methods of # a controller would normally be considered action methods, so methods # declared on abstract classes are being removed. - # (ActionController::Metal and ActionController::Base are defined as abstract) + # (ActionController::Metal and ActionController::Base are defined as abstract) # - # source://actionpack//lib/abstract_controller/base.rb#74 + # source://actionpack//lib/abstract_controller/base.rb#76 def internal_methods; end # Refresh the cached action_methods when a new action_method is added. # - # source://actionpack//lib/abstract_controller/base.rb#126 + # source://actionpack//lib/abstract_controller/base.rb#130 def method_added(name); end # Returns true if the given controller is capable of rendering @@ -291,7 +299,7 @@ class AbstractController::Base # # @return [Boolean] # - # source://actionpack//lib/abstract_controller/base.rb#190 + # source://actionpack//lib/abstract_controller/base.rb#199 def supports_path?; end end end @@ -360,6 +368,8 @@ module AbstractController::Caching::ConfigMethods def cache_configured?; end end +# = Abstract Controller Caching \Fragments +# # Fragment caching is used for caching various blocks within # views without caching the entire action as a whole. This is # useful when certain elements of an action change frequently or @@ -374,7 +384,7 @@ end # # expire_fragment('name_of_cache') # -# source://actionpack//lib/abstract_controller/caching/fragments.rb#18 +# source://actionpack//lib/abstract_controller/caching/fragments.rb#20 module AbstractController::Caching::Fragments extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -389,7 +399,7 @@ module AbstractController::Caching::Fragments # followed by any controller-wide key prefix values, ending # with the specified +key+ value. # - # source://actionpack//lib/abstract_controller/caching/fragments.rb#68 + # source://actionpack//lib/abstract_controller/caching/fragments.rb#70 def combined_fragment_cache_key(key); end # Removes fragments from the cache. @@ -411,7 +421,7 @@ module AbstractController::Caching::Fragments # +options+ is passed through to the cache store's +delete+ # method (or delete_matched, for Regexp keys). # - # source://actionpack//lib/abstract_controller/caching/fragments.rb#132 + # source://actionpack//lib/abstract_controller/caching/fragments.rb#134 def expire_fragment(key, options = T.unsafe(nil)); end # Check if a cached fragment from the location signified by @@ -419,22 +429,22 @@ module AbstractController::Caching::Fragments # # @return [Boolean] # - # source://actionpack//lib/abstract_controller/caching/fragments.rb#105 + # source://actionpack//lib/abstract_controller/caching/fragments.rb#107 def fragment_exist?(key, options = T.unsafe(nil)); end - # source://actionpack//lib/abstract_controller/caching/fragments.rb#145 + # source://actionpack//lib/abstract_controller/caching/fragments.rb#147 def instrument_fragment_cache(name, key, &block); end # Reads a cached fragment from the location signified by +key+ # (see +expire_fragment+ for acceptable formats). # - # source://actionpack//lib/abstract_controller/caching/fragments.rb#93 + # source://actionpack//lib/abstract_controller/caching/fragments.rb#95 def read_fragment(key, options = T.unsafe(nil)); end # Writes +content+ to the location signified by # +key+ (see +expire_fragment+ for acceptable formats). # - # source://actionpack//lib/abstract_controller/caching/fragments.rb#80 + # source://actionpack//lib/abstract_controller/caching/fragments.rb#82 def write_fragment(key, content, options = T.unsafe(nil)); end module GeneratedClassMethods @@ -450,7 +460,7 @@ module AbstractController::Caching::Fragments end end -# source://actionpack//lib/abstract_controller/caching/fragments.rb#35 +# source://actionpack//lib/abstract_controller/caching/fragments.rb#37 module AbstractController::Caching::Fragments::ClassMethods # Allows you to specify controller-wide key prefixes for # cache fragments. Pass either a constant +value+, or a block @@ -474,11 +484,11 @@ module AbstractController::Caching::Fragments::ClassMethods # end # end # - # source://actionpack//lib/abstract_controller/caching/fragments.rb#57 + # source://actionpack//lib/abstract_controller/caching/fragments.rb#59 def fragment_cache_key(value = T.unsafe(nil), &key); end end -# = Abstract Controller Callbacks +# = Abstract Controller \Callbacks # # Abstract Controller provides hooks during the life cycle of a controller action. # Callbacks allow you to trigger logic during this cycle. Available callbacks are: @@ -514,7 +524,7 @@ module AbstractController::Callbacks # Override AbstractController::Base#process_action to run the # process_action callbacks around the normal behavior. # - # source://actionpack//lib/abstract_controller/callbacks.rb#232 + # source://actionpack//lib/abstract_controller/callbacks.rb#257 def process_action(*_arg0, **_arg1, &_arg2); end module GeneratedClassMethods @@ -529,35 +539,35 @@ module AbstractController::Callbacks end end -# source://actionpack//lib/abstract_controller/callbacks.rb#38 +# source://actionpack//lib/abstract_controller/callbacks.rb#39 class AbstractController::Callbacks::ActionFilter # @return [ActionFilter] a new instance of ActionFilter # - # source://actionpack//lib/abstract_controller/callbacks.rb#39 - def initialize(actions); end + # source://actionpack//lib/abstract_controller/callbacks.rb#40 + def initialize(filters, conditional_key, actions); end # @return [Boolean] # - # source://actionpack//lib/abstract_controller/callbacks.rb#43 + # source://actionpack//lib/abstract_controller/callbacks.rb#46 def after(controller); end # @return [Boolean] # - # source://actionpack//lib/abstract_controller/callbacks.rb#43 + # source://actionpack//lib/abstract_controller/callbacks.rb#46 def around(controller); end # @return [Boolean] # - # source://actionpack//lib/abstract_controller/callbacks.rb#43 + # source://actionpack//lib/abstract_controller/callbacks.rb#46 def before(controller); end # @return [Boolean] # - # source://actionpack//lib/abstract_controller/callbacks.rb#43 + # source://actionpack//lib/abstract_controller/callbacks.rb#46 def match?(controller); end end -# source://actionpack//lib/abstract_controller/callbacks.rb#52 +# source://actionpack//lib/abstract_controller/callbacks.rb#74 module AbstractController::Callbacks::ClassMethods # Take callback names and an optional callback proc, normalize them, # then call the block with each callback. This allows us to abstract @@ -572,10 +582,10 @@ module AbstractController::Callbacks::ClassMethods # * name - The callback to be added. # * options - A hash of options to be used when adding the callback. # - # source://actionpack//lib/abstract_controller/callbacks.rb#96 + # source://actionpack//lib/abstract_controller/callbacks.rb#119 def _insert_callbacks(callbacks, block = T.unsafe(nil)); end - # source://actionpack//lib/abstract_controller/callbacks.rb#77 + # source://actionpack//lib/abstract_controller/callbacks.rb#99 def _normalize_callback_option(options, from, to); end # If +:only+ or +:except+ are used, convert the options into the @@ -598,43 +608,43 @@ module AbstractController::Callbacks::ClassMethods # * only - The callback should be run only for this action. # * except - The callback should be run for all actions except this action. # - # source://actionpack//lib/abstract_controller/callbacks.rb#72 + # source://actionpack//lib/abstract_controller/callbacks.rb#94 def _normalize_callback_options(options); end - # source://actionpack//lib/abstract_controller/callbacks.rb#204 + # source://actionpack//lib/abstract_controller/callbacks.rb#229 def after_action(*names, &blk); end - # source://actionpack//lib/abstract_controller/callbacks.rb#204 + # source://actionpack//lib/abstract_controller/callbacks.rb#229 def append_after_action(*names, &blk); end - # source://actionpack//lib/abstract_controller/callbacks.rb#204 + # source://actionpack//lib/abstract_controller/callbacks.rb#229 def append_around_action(*names, &blk); end - # source://actionpack//lib/abstract_controller/callbacks.rb#204 + # source://actionpack//lib/abstract_controller/callbacks.rb#229 def append_before_action(*names, &blk); end - # source://actionpack//lib/abstract_controller/callbacks.rb#204 + # source://actionpack//lib/abstract_controller/callbacks.rb#229 def around_action(*names, &blk); end - # source://actionpack//lib/abstract_controller/callbacks.rb#204 + # source://actionpack//lib/abstract_controller/callbacks.rb#229 def before_action(*names, &blk); end - # source://actionpack//lib/abstract_controller/callbacks.rb#210 + # source://actionpack//lib/abstract_controller/callbacks.rb#235 def prepend_after_action(*names, &blk); end - # source://actionpack//lib/abstract_controller/callbacks.rb#210 + # source://actionpack//lib/abstract_controller/callbacks.rb#235 def prepend_around_action(*names, &blk); end - # source://actionpack//lib/abstract_controller/callbacks.rb#210 + # source://actionpack//lib/abstract_controller/callbacks.rb#235 def prepend_before_action(*names, &blk); end - # source://actionpack//lib/abstract_controller/callbacks.rb#218 + # source://actionpack//lib/abstract_controller/callbacks.rb#243 def skip_after_action(*names); end - # source://actionpack//lib/abstract_controller/callbacks.rb#218 + # source://actionpack//lib/abstract_controller/callbacks.rb#243 def skip_around_action(*names); end - # source://actionpack//lib/abstract_controller/callbacks.rb#218 + # source://actionpack//lib/abstract_controller/callbacks.rb#243 def skip_before_action(*names); end end @@ -727,6 +737,9 @@ module AbstractController::Collector # source://actionpack//lib/abstract_controller/collector.rb#10 def webm(*args, **_arg1, &block); end + # source://actionpack//lib/abstract_controller/collector.rb#10 + def webp(*args, **_arg1, &block); end + # source://actionpack//lib/abstract_controller/collector.rb#10 def woff(*args, **_arg1, &block); end @@ -769,13 +782,15 @@ class AbstractController::Error < ::StandardError; end # source://actionpack//lib/abstract_controller/helpers.rb#7 module AbstractController::Helpers + include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor extend ::ActiveSupport::Concern + extend ::AbstractController::Helpers::Resolution include GeneratedInstanceMethods mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::AbstractController::Helpers::ClassMethods - # source://actionpack//lib/abstract_controller/helpers.rb#40 + # source://actionpack//lib/abstract_controller/helpers.rb#44 def _helpers; end module GeneratedClassMethods @@ -791,22 +806,24 @@ module AbstractController::Helpers end end -# source://actionpack//lib/abstract_controller/helpers.rb#44 +# source://actionpack//lib/abstract_controller/helpers.rb#80 module AbstractController::Helpers::ClassMethods + include ::AbstractController::Helpers::Resolution + # Sets the attribute _helpers # # @param value the value to set the attribute _helpers to. # - # source://actionpack//lib/abstract_controller/helpers.rb#56 + # source://actionpack//lib/abstract_controller/helpers.rb#92 def _helpers=(_arg0); end - # source://actionpack//lib/abstract_controller/helpers.rb#185 + # source://actionpack//lib/abstract_controller/helpers.rb#231 def _helpers_for_modification; end # Clears up all existing helpers in this class, only keeping the helper # with the same name as this class. # - # source://actionpack//lib/abstract_controller/helpers.rb#159 + # source://actionpack//lib/abstract_controller/helpers.rb#222 def clear_helpers; end # Includes the given modules in the template class. @@ -860,7 +877,7 @@ module AbstractController::Helpers::ClassMethods # end # end # - # source://actionpack//lib/abstract_controller/helpers.rb#148 + # source://actionpack//lib/abstract_controller/helpers.rb#211 def helper(*args, &block); end # Declare a controller method as a helper. For example, the following @@ -886,39 +903,45 @@ module AbstractController::Helpers::ClassMethods # * method[, method] - A name or names of a method on the controller # to be made available on the view. # - # source://actionpack//lib/abstract_controller/helpers.rb#80 + # source://actionpack//lib/abstract_controller/helpers.rb#140 def helper_method(*methods); end # When a class is inherited, wrap its helper module in a new module. # This ensures that the parent class's module can be changed # independently of the child class's. # - # source://actionpack//lib/abstract_controller/helpers.rb#48 + # source://actionpack//lib/abstract_controller/helpers.rb#84 def inherited(klass); end - # Given an array of values like the ones accepted by +helper+, this method - # returns an array with the corresponding modules, in the same order. - # - # source://actionpack//lib/abstract_controller/helpers.rb#170 - def modules_for_helpers(modules_or_helper_prefixes); end - private - # source://actionpack//lib/abstract_controller/helpers.rb#204 + # source://actionpack//lib/abstract_controller/helpers.rb#250 def default_helper_module!; end - # source://actionpack//lib/abstract_controller/helpers.rb#193 + # source://actionpack//lib/abstract_controller/helpers.rb#239 def define_helpers_module(klass, helpers = T.unsafe(nil)); end end -# source://actionpack//lib/abstract_controller/helpers.rb#26 -class AbstractController::Helpers::MissingHelperError < ::LoadError - # @return [MissingHelperError] a new instance of MissingHelperError +# source://actionpack//lib/abstract_controller/helpers.rb#27 +class AbstractController::Helpers::DeprecatedMissingHelperError < ::LoadError + # @return [DeprecatedMissingHelperError] a new instance of DeprecatedMissingHelperError # - # source://actionpack//lib/abstract_controller/helpers.rb#27 + # source://actionpack//lib/abstract_controller/helpers.rb#28 def initialize(error, path); end end +# source://actionpack//lib/abstract_controller/helpers.rb#48 +module AbstractController::Helpers::Resolution + # source://actionpack//lib/abstract_controller/helpers.rb#64 + def all_helpers_from_path(path); end + + # source://actionpack//lib/abstract_controller/helpers.rb#73 + def helper_modules_from_paths(paths); end + + # source://actionpack//lib/abstract_controller/helpers.rb#49 + def modules_for_helpers(modules_or_helper_prefixes); end +end + # source://actionpack//lib/abstract_controller/logger.rb#6 module AbstractController::Logger extend ::ActiveSupport::Concern @@ -980,8 +1003,8 @@ module AbstractController::Rendering private # Normalize args by converting render "foo" to - # render :action => "foo" and render "foo/bar" to - # render :file => "foo/bar". + # render action: "foo" and render "foo/bar" to + # render file: "foo/bar". # # source://actionpack//lib/abstract_controller/rendering.rb#73 def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil)); end @@ -1029,20 +1052,14 @@ AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES = T.let(T.un module AbstractController::Translation # Delegates to I18n.localize. # - # source://actionpack//lib/abstract_controller/translation.rb#33 + # source://actionpack//lib/abstract_controller/translation.rb#36 def l(object, **options); end # Delegates to I18n.localize. # - # source://actionpack//lib/abstract_controller/translation.rb#33 + # source://actionpack//lib/abstract_controller/translation.rb#36 def localize(object, **options); end - # source://actionpack//lib/abstract_controller/translation.rb#7 - def raise_on_missing_translations; end - - # source://actionpack//lib/abstract_controller/translation.rb#7 - def raise_on_missing_translations=(val); end - # Delegates to I18n.translate. # # When the given key starts with a period, it will be scoped by the current @@ -1052,7 +1069,7 @@ module AbstractController::Translation # to translate many keys within the same controller / action and gives you a # simple framework for scoping them consistently. # - # source://actionpack//lib/abstract_controller/translation.rb#17 + # source://actionpack//lib/abstract_controller/translation.rb#15 def t(key, **options); end # Delegates to I18n.translate. @@ -1064,18 +1081,12 @@ module AbstractController::Translation # to translate many keys within the same controller / action and gives you a # simple framework for scoping them consistently. # - # source://actionpack//lib/abstract_controller/translation.rb#17 + # source://actionpack//lib/abstract_controller/translation.rb#15 def translate(key, **options); end - - class << self - # source://actionpack//lib/abstract_controller/translation.rb#7 - def raise_on_missing_translations; end - - # source://actionpack//lib/abstract_controller/translation.rb#7 - def raise_on_missing_translations=(val); end - end end +# = URL For +# # Includes +url_for+ into the host class (e.g. an abstract controller or mailer). The class # has to provide a +RouteSet+ by implementing the _routes methods. Otherwise, an # exception will be raised. @@ -1083,7 +1094,7 @@ end # Note that this module is completely decoupled from HTTP - the only requirement is a valid # _routes implementation. # -# source://actionpack//lib/abstract_controller/url_for.rb#10 +# source://actionpack//lib/abstract_controller/url_for.rb#12 module AbstractController::UrlFor extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -1092,7 +1103,7 @@ module AbstractController::UrlFor mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods - # source://actionpack//lib/abstract_controller/url_for.rb#14 + # source://actionpack//lib/abstract_controller/url_for.rb#16 def _routes; end module GeneratedClassMethods @@ -1108,16 +1119,24 @@ module AbstractController::UrlFor end end -# source://actionpack//lib/abstract_controller/url_for.rb#19 +# source://actionpack//lib/abstract_controller/url_for.rb#21 module AbstractController::UrlFor::ClassMethods - # source://actionpack//lib/abstract_controller/url_for.rb#20 + # source://actionpack//lib/abstract_controller/url_for.rb#22 def _routes; end - # source://actionpack//lib/abstract_controller/url_for.rb#24 + # source://actionpack//lib/abstract_controller/url_for.rb#26 def action_methods; end end -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#13 +# = Action Controller +# +# Action Controller is a module of Action Pack. +# +# Action Controller provides a base controller class that can be subclassed to +# implement filters and actions to handle requests. The result of an action is +# typically content generated from views. +# +# source://actionpack//lib/action_controller/deprecator.rb#3 module ActionController extend ::ActiveSupport::Autoload @@ -1127,6 +1146,9 @@ module ActionController # source://actionpack//lib/action_controller/metal/renderers.rb#7 def add_renderer(key, &block); end + # source://actionpack//lib/action_controller/deprecator.rb#4 + def deprecator; end + # See Renderers.remove # # source://actionpack//lib/action_controller/metal/renderers.rb#12 @@ -1134,6 +1156,8 @@ module ActionController end end +# = Action Controller \API +# # API Controller is a lightweight version of ActionController::Base, # created for applications that don't require all functionalities that a complete # \Rails controller provides, allowing you to create controllers with just the @@ -1148,7 +1172,7 @@ end # your application, they're just not part of the default API controller stack. # # Normally, +ApplicationController+ is the only controller that inherits from -# ActionController::API. All other controllers in turn inherit from +# +ActionController::API+. All other controllers in turn inherit from # +ApplicationController+. # # A sample controller could look like this: @@ -1191,7 +1215,7 @@ end # # In some scenarios you may want to add back some functionality provided by # ActionController::Base that is not present by default in -# ActionController::API, for instance MimeResponds. This +# +ActionController::API+, for instance MimeResponds. This # module gives you the respond_to method. Adding it is quite simple, # you just need to include the module in a specific controller or in # +ApplicationController+ in case you want it available in your entire @@ -1214,11 +1238,11 @@ end # # Make sure to check the modules included in ActionController::Base # if you want to use any other functionality that is not provided -# by ActionController::API out of the box. +# by +ActionController::API+ out of the box. # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://actionpack//lib/action_controller/api.rb#89 +# source://actionpack//lib/action_controller/api.rb#91 class ActionController::API < ::ActionController::Metal include ::ActionView::ViewPaths include ::AbstractController::Rendering @@ -1259,13 +1283,13 @@ class ActionController::API < ::ActionController::Metal extend ::ActionController::Instrumentation::ClassMethods extend ::ActionController::ParamsWrapper::ClassMethods - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _process_action_callbacks; end # source://actionpack//lib/action_controller/metal/renderers.rb#31 @@ -1277,25 +1301,25 @@ class ActionController::API < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/renderers.rb#31 def _renderers?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_process_action_callbacks(&block); end - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options; end - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options=(_arg0); end - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options?; end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options; end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options=(_arg0); end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options?; end # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 @@ -1307,41 +1331,47 @@ class ActionController::API < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 def etaggers?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def logger=(value); end + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + # source://actionpack//lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects; end # source://actionpack//lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects=(val); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _process_action_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _process_action_callbacks=(value); end # source://actionpack//lib/action_controller/metal/renderers.rb#31 @@ -1353,22 +1383,22 @@ class ActionController::API < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/renderers.rb#31 def _renderers?; end - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options; end - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options=(value); end - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options?; end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options; end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options=(value); end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options?; end # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 @@ -1380,28 +1410,34 @@ class ActionController::API < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 def etaggers?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def logger=(value); end - # source://actionpack//lib/action_controller/metal.rb#210 + # source://actionpack//lib/action_controller/metal.rb#262 def middleware_stack; end + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + # source://actionpack//lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects; end # source://actionpack//lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects=(val); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # Shortcut helper that returns all the ActionController::API modules except @@ -1417,12 +1453,12 @@ class ActionController::API < ::ActionController::Metal # to create an API controller class, instead of listing the modules required # manually. # - # source://actionpack//lib/action_controller/api.rb#104 + # source://actionpack//lib/action_controller/api.rb#106 def without_modules(*modules); end end end -# source://actionpack//lib/action_controller/api.rb#112 +# source://actionpack//lib/action_controller/api.rb#114 ActionController::API::MODULES = T.let(T.unsafe(nil), Array) # source://actionpack//lib/action_controller/metal/exceptions.rb#4 @@ -1447,11 +1483,13 @@ class ActionController::BadRequest < ::ActionController::ActionControllerError def initialize(msg = T.unsafe(nil)); end end +# = Action Controller \Base +# # Action Controllers are the core of a web request in \Rails. They are made up of one or more actions that are executed # on request and then either it renders a template or redirects to another action. An action is defined as a public method # on the controller, which will automatically be made accessible to the web-server through \Rails Routes. # -# By default, only the ApplicationController in a \Rails application inherits from ActionController::Base. All other +# By default, only the ApplicationController in a \Rails application inherits from +ActionController::Base+. All other # controllers inherit from ApplicationController. This gives you one class to configure things such as # request forgery protection and filtering of sensitive request parameters. # @@ -1608,12 +1646,13 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://actionpack//lib/action_controller/base.rb#167 +# source://actionpack//lib/action_controller/base.rb#169 class ActionController::Base < ::ActionController::Metal include ::ActionView::ViewPaths include ::AbstractController::Rendering include ::AbstractController::Translation include ::AbstractController::AssetPaths + include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor include ::AbstractController::Helpers include ::ActionController::Helpers include ::ActionDispatch::Routing::PolymorphicRoutes @@ -1661,6 +1700,7 @@ class ActionController::Base < ::ActionController::Metal include ::ActionController::Instrumentation include ::ActionController::ParamsWrapper extend ::ActionView::ViewPaths::ClassMethods + extend ::AbstractController::Helpers::Resolution extend ::AbstractController::Helpers::ClassMethods extend ::ActionController::Helpers::ClassMethods extend ::AbstractController::UrlFor::ClassMethods @@ -1687,22 +1727,25 @@ class ActionController::Base < ::ActionController::Metal extend ::ActionController::Instrumentation::ClassMethods extend ::ActionController::ParamsWrapper::ClassMethods - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://actionpack//lib/abstract_controller/helpers.rb#11 + # source://actionpack//lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack//lib/abstract_controller/helpers.rb#11 + # source://actionpack//lib/abstract_controller/helpers.rb#12 def _helper_methods=(_arg0); end - # source://actionpack//lib/abstract_controller/helpers.rb#11 + # source://actionpack//lib/abstract_controller/helpers.rb#12 def _helper_methods?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#216 + def _layout_conditions(&block); end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _process_action_callbacks; end # source://actionpack//lib/action_controller/metal/renderers.rb#31 @@ -1714,7 +1757,7 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/renderers.rb#31 def _renderers?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_process_action_callbacks(&block); end # source://actionpack//lib/abstract_controller/caching.rb#42 @@ -1726,76 +1769,82 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/abstract_controller/caching.rb#42 def _view_cache_dependencies?; end - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options; end - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options=(_arg0); end - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options?; end # source://actionpack//lib/action_controller/metal/flash.rb#36 def alert; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def allow_forgery_protection; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def allow_forgery_protection=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def assets_dir=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 + def csrf_token_storage_strategy; end + + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 + def csrf_token_storage_strategy=(value); end + + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_protect_from_forgery; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_protect_from_forgery=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_static_extension=(value); end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options; end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options=(_arg0); end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest; end - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest=(_arg0); end - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest?; end # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 @@ -1810,139 +1859,142 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/flash.rb#10 def flash(*_arg0, **_arg1, &_arg2); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def forgery_protection_origin_check; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def forgery_protection_origin_check=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def forgery_protection_strategy; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def forgery_protection_strategy=(value); end - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack//lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys; end - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack//lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys=(_arg0); end - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack//lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys?; end - # source://actionpack//lib/action_controller/metal/helpers.rb#63 + # source://actionpack//lib/action_controller/metal/helpers.rb#65 def helpers_path; end - # source://actionpack//lib/action_controller/metal/helpers.rb#63 + # source://actionpack//lib/action_controller/metal/helpers.rb#65 def helpers_path=(_arg0); end - # source://actionpack//lib/action_controller/metal/helpers.rb#63 + # source://actionpack//lib/action_controller/metal/helpers.rb#65 def helpers_path?; end - # source://actionpack//lib/action_controller/metal/helpers.rb#64 + # source://actionpack//lib/action_controller/metal/helpers.rb#66 def include_all_helpers; end - # source://actionpack//lib/action_controller/metal/helpers.rb#64 + # source://actionpack//lib/action_controller/metal/helpers.rb#66 def include_all_helpers=(_arg0); end - # source://actionpack//lib/action_controller/metal/helpers.rb#64 + # source://actionpack//lib/action_controller/metal/helpers.rb#66 def include_all_helpers?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def log_warning_on_csrf_failure; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def log_warning_on_csrf_failure=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/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.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def per_form_csrf_tokens; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def per_form_csrf_tokens=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def perform_caching=(value); end + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + # source://actionpack//lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects; end # source://actionpack//lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects=(val); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def request_forgery_protection_token; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def request_forgery_protection_token=(value); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 - def urlsafe_csrf_tokens; end - private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end - # source://actionpack//lib/action_controller/base.rb#266 + # source://actionpack//lib/action_controller/base.rb#252 def _protected_ivars; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://actionpack//lib/action_controller/form_builder.rb#31 + # source://actionpack//lib/action_controller/form_builder.rb#33 def _default_form_builder; end - # source://actionpack//lib/action_controller/form_builder.rb#31 + # source://actionpack//lib/action_controller/form_builder.rb#33 def _default_form_builder=(value); end - # source://actionpack//lib/action_controller/form_builder.rb#31 + # source://actionpack//lib/action_controller/form_builder.rb#33 def _default_form_builder?; end # source://actionpack//lib/action_controller/metal/flash.rb#8 @@ -1954,40 +2006,40 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/flash.rb#8 def _flash_types?; end - # source://actionpack//lib/abstract_controller/helpers.rb#11 + # source://actionpack//lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack//lib/abstract_controller/helpers.rb#11 + # source://actionpack//lib/abstract_controller/helpers.rb#12 def _helper_methods=(value); end - # source://actionpack//lib/abstract_controller/helpers.rb#11 + # source://actionpack//lib/abstract_controller/helpers.rb#12 def _helper_methods?; end - # source://actionpack//lib/abstract_controller/helpers.rb#15 + # source://actionpack//lib/abstract_controller/helpers.rb#16 def _helpers; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#211 def _layout=(value); end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#211 def _layout?; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#212 def _layout_conditions; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#212 def _layout_conditions=(value); end - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#212 def _layout_conditions?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _process_action_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _process_action_callbacks=(value); end # source://actionpack//lib/action_controller/metal/renderers.rb#31 @@ -2008,73 +2060,79 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/abstract_controller/caching.rb#42 def _view_cache_dependencies?; end - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options; end - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options=(value); end - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def allow_forgery_protection; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def allow_forgery_protection=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def assets_dir=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 + def csrf_token_storage_strategy; end + + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 + def csrf_token_storage_strategy=(value); end + + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_protect_from_forgery; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_protect_from_forgery=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_static_extension=(value); end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options; end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options=(value); end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest; end - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest=(value); end - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest?; end # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 @@ -2086,117 +2144,117 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 def etaggers?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def forgery_protection_origin_check; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def forgery_protection_origin_check=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def forgery_protection_strategy; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def forgery_protection_strategy=(value); end - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack//lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys; end - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack//lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys=(value); end - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack//lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys?; end - # source://actionpack//lib/action_controller/metal/helpers.rb#63 + # source://actionpack//lib/action_controller/metal/helpers.rb#65 def helpers_path; end - # source://actionpack//lib/action_controller/metal/helpers.rb#63 + # source://actionpack//lib/action_controller/metal/helpers.rb#65 def helpers_path=(value); end - # source://actionpack//lib/action_controller/metal/helpers.rb#63 + # source://actionpack//lib/action_controller/metal/helpers.rb#65 def helpers_path?; end - # source://actionpack//lib/action_controller/metal/helpers.rb#64 + # source://actionpack//lib/action_controller/metal/helpers.rb#66 def include_all_helpers; end - # source://actionpack//lib/action_controller/metal/helpers.rb#64 + # source://actionpack//lib/action_controller/metal/helpers.rb#66 def include_all_helpers=(value); end - # source://actionpack//lib/action_controller/metal/helpers.rb#64 + # source://actionpack//lib/action_controller/metal/helpers.rb#66 def include_all_helpers?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def log_warning_on_csrf_failure; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def log_warning_on_csrf_failure=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def logger=(value); end - # source://actionpack//lib/action_controller/metal.rb#210 + # source://actionpack//lib/action_controller/metal.rb#262 def middleware_stack; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def per_form_csrf_tokens; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def per_form_csrf_tokens=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def perform_caching=(value); end + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + # source://actionpack//lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects; end # source://actionpack//lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects=(val); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def request_forgery_protection_token; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def request_forgery_protection_token=(value); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 - def urlsafe_csrf_tokens; end - - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#97 - def urlsafe_csrf_tokens=(urlsafe_csrf_tokens); end - # Shortcut helper that returns all the modules included in # ActionController::Base except the ones passed as arguments: # @@ -2210,7 +2268,7 @@ class ActionController::Base < ::ActionController::Metal # easier to create a bare controller class, instead of listing the modules # required manually. # - # source://actionpack//lib/action_controller/base.rb#198 + # source://actionpack//lib/action_controller/base.rb#184 def without_modules(*modules); end end end @@ -2223,7 +2281,7 @@ module ActionController::Base::HelperMethods # source://actionpack//lib/action_controller/metal/flash.rb#39 def alert(*args, **_arg1, &block); end - # source://actionpack//lib/abstract_controller/caching/fragments.rb#31 + # source://actionpack//lib/abstract_controller/caching/fragments.rb#33 def combined_fragment_cache_key(*args, **_arg1, &block); end # source://actionpack//lib/action_controller/metal/content_security_policy.rb#11 @@ -2235,25 +2293,25 @@ module ActionController::Base::HelperMethods # source://actionpack//lib/action_controller/metal/cookies.rb#8 def cookies(*args, **_arg1, &block); end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#106 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#101 def form_authenticity_token(*args, **_arg1, &block); end # source://actionpack//lib/action_controller/metal/flash.rb#39 def notice(*args, **_arg1, &block); end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#107 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#102 def protect_against_forgery?(*args, **_arg1, &block); end # source://actionpack//lib/abstract_controller/caching.rb#43 def view_cache_dependencies(*args, **_arg1, &block); end end -# source://actionpack//lib/action_controller/base.rb#206 +# source://actionpack//lib/action_controller/base.rb#192 ActionController::Base::MODULES = T.let(T.unsafe(nil), Array) # Define some internal variables that should not be propagated to the view. # -# source://actionpack//lib/action_controller/base.rb#261 +# source://actionpack//lib/action_controller/base.rb#247 ActionController::Base::PROTECTED_IVARS = T.let(T.unsafe(nil), Array) # source://actionpack//lib/action_controller/metal/basic_implicit_render.rb#4 @@ -2265,6 +2323,8 @@ module ActionController::BasicImplicitRender def send_action(method, *args); end end +# = Action Controller \Caching +# # \Caching is a cheap way of speeding up slow applications by keeping the result of # calculations, renderings, and database calls around for subsequent requests. # @@ -2286,7 +2346,7 @@ end # config.action_controller.cache_store = :mem_cache_store, Memcached::Rails.new('localhost:11211') # config.action_controller.cache_store = MyOwnStore.new('parameter') # -# source://actionpack//lib/action_controller/caching.rb#24 +# source://actionpack//lib/action_controller/caching.rb#26 module ActionController::Caching extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -2300,10 +2360,10 @@ module ActionController::Caching private - # source://actionpack//lib/action_controller/caching.rb#40 + # source://actionpack//lib/action_controller/caching.rb#42 def instrument_name; end - # source://actionpack//lib/action_controller/caching.rb#32 + # source://actionpack//lib/action_controller/caching.rb#34 def instrument_payload(key); end module GeneratedClassMethods @@ -2727,10 +2787,12 @@ module ActionController::Cookies def cookies; end end +# = Action Controller Data \Streaming +# # Methods for sending arbitrary data and for streaming files to the browser, # instead of rendering. # -# source://actionpack//lib/action_controller/metal/data_streaming.rb#9 +# source://actionpack//lib/action_controller/metal/data_streaming.rb#11 module ActionController::DataStreaming extend ::ActiveSupport::Concern include ::ActionController::Rendering @@ -2769,7 +2831,7 @@ module ActionController::DataStreaming # # See +send_file+ for more information on HTTP Content-* headers and caching. # - # source://actionpack//lib/action_controller/metal/data_streaming.rb#109 + # source://actionpack//lib/action_controller/metal/data_streaming.rb#111 def send_data(data, options = T.unsafe(nil)); end # Sends the file. This uses a server-appropriate method (such as +X-Sendfile+) @@ -2826,44 +2888,48 @@ module ActionController::DataStreaming # # @raise [MissingFile] # - # source://actionpack//lib/action_controller/metal/data_streaming.rb#69 + # source://actionpack//lib/action_controller/metal/data_streaming.rb#71 def send_file(path, options = T.unsafe(nil)); end # @raise [ArgumentError] # - # source://actionpack//lib/action_controller/metal/data_streaming.rb#114 + # source://actionpack//lib/action_controller/metal/data_streaming.rb#116 def send_file_headers!(options); end end -# source://actionpack//lib/action_controller/metal/data_streaming.rb#15 +# source://actionpack//lib/action_controller/metal/data_streaming.rb#17 ActionController::DataStreaming::DEFAULT_SEND_FILE_DISPOSITION = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_controller/metal/data_streaming.rb#14 +# source://actionpack//lib/action_controller/metal/data_streaming.rb#16 ActionController::DataStreaming::DEFAULT_SEND_FILE_TYPE = T.let(T.unsafe(nil), String) +# = Action Controller Default Headers +# # Allows configuring default headers that will be automatically merged into # each response. # -# source://actionpack//lib/action_controller/metal/default_headers.rb#6 +# source://actionpack//lib/action_controller/metal/default_headers.rb#8 module ActionController::DefaultHeaders extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionController::DefaultHeaders::ClassMethods end -# source://actionpack//lib/action_controller/metal/default_headers.rb#9 +# source://actionpack//lib/action_controller/metal/default_headers.rb#11 module ActionController::DefaultHeaders::ClassMethods - # source://actionpack//lib/action_controller/metal/default_headers.rb#10 + # source://actionpack//lib/action_controller/metal/default_headers.rb#12 def make_response!(request); end end +# = Action Controller Etag With \Flash +# # When you're using the flash, it's generally used as a conditional on the view. # This means the content of the view depends on the flash. Which in turn means # that the ETag for a response should be computed with the content of the flash # in mind. This does that by including the content of the flash as a component # in the ETag that's generated for a response. # -# source://actionpack//lib/action_controller/metal/etag_with_flash.rb#9 +# source://actionpack//lib/action_controller/metal/etag_with_flash.rb#11 module ActionController::EtagWithFlash extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -2885,6 +2951,8 @@ module ActionController::EtagWithFlash end end +# = Action Controller Etag With Template \Digest +# # When our views change, they should bubble up into HTTP cache freshness # and bust browser caches. So the template digest for the current action # is automatically included in the ETag. @@ -2902,7 +2970,7 @@ end # # We're not going to render a template, so omit it from the ETag. # fresh_when @post, template: false # -# source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#21 +# source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#23 module ActionController::EtagWithTemplateDigest extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -2913,10 +2981,10 @@ module ActionController::EtagWithTemplateDigest private - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#35 + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#37 def determine_template_etag(options); end - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#51 + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#53 def lookup_and_digest_template(template); end # Pick the template digest to include in the ETag. If the +:template+ option @@ -2924,7 +2992,7 @@ module ActionController::EtagWithTemplateDigest # the default controller/action template. If +:template+ is false, omit the # template digest from the ETag. # - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#45 + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#47 def pick_template_for_etag(options); end module GeneratedClassMethods @@ -2995,6 +3063,8 @@ module ActionController::Flash::ClassMethods def add_flash_types(*types); end end +# = Action Controller Form Builder +# # Override the default form builder for all views rendered by this # controller and any of its descendants. Accepts a subclass of # ActionView::Helpers::FormBuilder. @@ -3019,7 +3089,7 @@ end # <%= builder.special_field(:name) %> # <% end %> # -# source://actionpack//lib/action_controller/form_builder.rb#27 +# source://actionpack//lib/action_controller/form_builder.rb#29 module ActionController::FormBuilder extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -3029,7 +3099,7 @@ module ActionController::FormBuilder # Default form builder for the controller # - # source://actionpack//lib/action_controller/form_builder.rb#46 + # source://actionpack//lib/action_controller/form_builder.rb#48 def default_form_builder; end module GeneratedClassMethods @@ -3041,7 +3111,7 @@ module ActionController::FormBuilder module GeneratedInstanceMethods; end end -# source://actionpack//lib/action_controller/form_builder.rb#34 +# source://actionpack//lib/action_controller/form_builder.rb#36 module ActionController::FormBuilder::ClassMethods # Set the form builder to be used as the default for all forms # in the views rendered by this controller and its subclasses. @@ -3049,7 +3119,7 @@ module ActionController::FormBuilder::ClassMethods # ==== Parameters # * builder - Default form builder, an instance of ActionView::Helpers::FormBuilder # - # source://actionpack//lib/action_controller/form_builder.rb#40 + # source://actionpack//lib/action_controller/form_builder.rb#42 def default_form_builder(builder); end end @@ -3079,10 +3149,12 @@ module ActionController::Head # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/head.rb#52 + # source://actionpack//lib/action_controller/metal/head.rb#54 def include_content?(status); end end +# = Action Controller \Helpers +# # The \Rails framework provides a large number of helpers for working with assets, dates, forms, # numbers and model objects, to name a few. These helpers are available to all templates # by default. @@ -3135,7 +3207,7 @@ end # 23 Aug 11:30 | Carolina Railhawks Soccer Match # N/A | Carolina Railhawks Training Workshop # -# source://actionpack//lib/action_controller/metal/helpers.rb#56 +# source://actionpack//lib/action_controller/metal/helpers.rb#58 module ActionController::Helpers extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -3147,20 +3219,20 @@ module ActionController::Helpers # Provides a proxy to access helper methods from outside the view. # - # source://actionpack//lib/action_controller/metal/helpers.rb#128 + # source://actionpack//lib/action_controller/metal/helpers.rb#117 def helpers; end class << self # Returns the value of attribute helpers_path. # - # source://actionpack//lib/action_controller/metal/helpers.rb#59 + # source://actionpack//lib/action_controller/metal/helpers.rb#61 def helpers_path; end # Sets the attribute helpers_path # # @param value the value to set the attribute helpers_path to. # - # source://actionpack//lib/action_controller/metal/helpers.rb#59 + # source://actionpack//lib/action_controller/metal/helpers.rb#61 def helpers_path=(_arg0); end end @@ -3189,16 +3261,8 @@ module ActionController::Helpers end end -# source://actionpack//lib/action_controller/metal/helpers.rb#67 +# source://actionpack//lib/action_controller/metal/helpers.rb#69 module ActionController::Helpers::ClassMethods - # Returns a list of helper names in a given path. - # - # ActionController::Base.all_helpers_from_path 'app/helpers' - # # => ["application", "chart", "rubygems"] - # - # source://actionpack//lib/action_controller/metal/helpers.rb#111 - def all_helpers_from_path(path); end - # Declares helper accessors for controller attributes. For example, the # following adds new +name+ and name= instance methods to a # controller and makes them available to the view: @@ -3208,17 +3272,17 @@ module ActionController::Helpers::ClassMethods # ==== Parameters # * attrs - Names of attributes to be converted into helpers. # - # source://actionpack//lib/action_controller/metal/helpers.rb#76 + # source://actionpack//lib/action_controller/metal/helpers.rb#78 def helper_attr(*attrs); end # Provides a proxy to access helper methods from outside the view. # # Note that the proxy is rendered under a different view context. - # This may cause incorrect behaviour with capture methods. Consider + # This may cause incorrect behavior with capture methods. Consider # using {helper}[rdoc-ref:AbstractController::Helpers::ClassMethods#helper] # instead when using +capture+. # - # source://actionpack//lib/action_controller/metal/helpers.rb#86 + # source://actionpack//lib/action_controller/metal/helpers.rb#88 def helpers; end # Override modules_for_helpers to accept +:all+ as argument, which loads @@ -3230,14 +3294,14 @@ module ActionController::Helpers::ClassMethods # ==== Returns # * array - A normalized list of modules for the list of helpers provided. # - # source://actionpack//lib/action_controller/metal/helpers.rb#102 + # source://actionpack//lib/action_controller/metal/helpers.rb#104 def modules_for_helpers(args); end private # Extract helper names from files in app/helpers/**/*_helper.rb # - # source://actionpack//lib/action_controller/metal/helpers.rb#122 + # source://actionpack//lib/action_controller/metal/helpers.rb#111 def all_application_helpers; end end @@ -3260,7 +3324,7 @@ module ActionController::HttpAuthentication; end # def edit # render plain: "I'm only accessible if you know the password" # end -# end +# end # # === Advanced \Basic example # @@ -3472,7 +3536,7 @@ module ActionController::HttpAuthentication::Digest # of this document. # # The nonce is opaque to the client. Composed of Time, and hash of Time with secret - # key from the Rails session secret generated upon creation of project. Ensures + # key from the \Rails session secret generated upon creation of project. Ensures # the time cannot be modified by client. # # source://actionpack//lib/action_controller/metal/http_authentication.rb#321 @@ -3608,8 +3672,8 @@ module ActionController::HttpAuthentication::Token # If token Authorization header is present, call the login # procedure with the present token and options. # - # Returns the return value of login_procedure if a - # token is found. Returns nil if no token is found. + # Returns the return value of +login_procedure+ if a + # token is found. Returns +nil+ if no token is found. # # ==== Parameters # @@ -3619,7 +3683,7 @@ module ActionController::HttpAuthentication::Token # # authenticate(controller) { |token, options| ... } # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#461 + # source://actionpack//lib/action_controller/metal/http_authentication.rb#466 def authenticate(controller, &login_procedure); end # Sets a WWW-Authenticate header to let the client know a token is desired. @@ -3631,7 +3695,7 @@ module ActionController::HttpAuthentication::Token # * +controller+ - ActionController::Base instance for the outgoing response. # * +realm+ - String realm to use in the header. # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#541 + # source://actionpack//lib/action_controller/metal/http_authentication.rb#550 def authentication_request(controller, realm, message = T.unsafe(nil)); end # Encodes the given token and options into an Authorization header value. @@ -3643,24 +3707,24 @@ module ActionController::HttpAuthentication::Token # * +token+ - String token. # * +options+ - Optional Hash of the options. # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#526 + # source://actionpack//lib/action_controller/metal/http_authentication.rb#535 def encode_credentials(token, options = T.unsafe(nil)); end # Takes +raw_params+ and turns it into an array of parameters. # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#496 + # source://actionpack//lib/action_controller/metal/http_authentication.rb#501 def params_array_from(raw_params); end # This method takes an authorization body and splits up the key-value # pairs by the standardized :, ;, or \t # delimiters defined in +AUTHN_PAIR_DELIMITERS+. # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#508 + # source://actionpack//lib/action_controller/metal/http_authentication.rb#516 def raw_params(auth); end # This removes the " characters wrapping the value. # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#501 + # source://actionpack//lib/action_controller/metal/http_authentication.rb#506 def rewrite_param_values(array_params); end # Parses the token and options out of the token Authorization header. @@ -3679,10 +3743,10 @@ module ActionController::HttpAuthentication::Token # # * +request+ - ActionDispatch::Request instance with the current headers. # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#483 + # source://actionpack//lib/action_controller/metal/http_authentication.rb#488 def token_and_options(request); end - # source://actionpack//lib/action_controller/metal/http_authentication.rb#491 + # source://actionpack//lib/action_controller/metal/http_authentication.rb#496 def token_params_from(auth); end end @@ -3692,23 +3756,28 @@ ActionController::HttpAuthentication::Token::AUTHN_PAIR_DELIMITERS = T.let(T.uns # source://actionpack//lib/action_controller/metal/http_authentication.rb#425 module ActionController::HttpAuthentication::Token::ControllerMethods # Authenticate using an HTTP Bearer token, or otherwise render an HTTP - # header requesting the client to send a Bearer token. + # header requesting the client to send a Bearer token. For the authentication + # to be considered successful, +login_procedure+ should return a non-nil + # value. Typically, the authenticated user is returned. # # See ActionController::HttpAuthentication::Token for example usage. # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#430 + # source://actionpack//lib/action_controller/metal/http_authentication.rb#432 def authenticate_or_request_with_http_token(realm = T.unsafe(nil), message = T.unsafe(nil), &login_procedure); end - # Authenticate using an HTTP Bearer token. Returns true if - # authentication is successful, false otherwise. + # Authenticate using an HTTP Bearer token. + # Returns the return value of +login_procedure+ if a + # token is found. Returns +nil+ if no token is found. + # + # See ActionController::HttpAuthentication::Token for example usage. # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#436 + # source://actionpack//lib/action_controller/metal/http_authentication.rb#441 def authenticate_with_http_token(&login_procedure); end # Render an HTTP header requesting the client to send a Bearer token for # authentication. # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#442 + # source://actionpack//lib/action_controller/metal/http_authentication.rb#447 def request_http_token_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end end @@ -3718,6 +3787,11 @@ ActionController::HttpAuthentication::Token::TOKEN_KEY = T.let(T.unsafe(nil), St # source://actionpack//lib/action_controller/metal/http_authentication.rb#421 ActionController::HttpAuthentication::Token::TOKEN_REGEX = T.let(T.unsafe(nil), Regexp) +# source://actionpack//lib/action_controller/metal/http_authentication.rb#510 +ActionController::HttpAuthentication::Token::WHITESPACED_AUTHN_PAIR_DELIMITERS = T.let(T.unsafe(nil), Regexp) + +# = Action Controller Implicit Render +# # Handles implicit rendering for a controller action that does not # explicitly respond with +render+, +respond_to+, +redirect+, or +head+. # @@ -3734,41 +3808,43 @@ ActionController::HttpAuthentication::Token::TOKEN_REGEX = T.let(T.unsafe(nil), # Second, if we DON'T find a template but the controller action does have # templates for other formats, variants, etc., then we trust that you meant # to provide a template for this response, too, and we raise -# ActionController::UnknownFormat with an explanation. +# ActionController::UnknownFormat with an explanation. # # Third, if we DON'T find a template AND the request is a page load in a web # browser (technically, a non-XHR GET request for an HTML response) where # you reasonably expect to have rendered a template, then we raise -# ActionController::MissingExactTemplate with an explanation. +# ActionController::MissingExactTemplate with an explanation. # # Finally, if we DON'T find a template AND the request isn't a browser page # load, then we implicitly respond with 204 No Content. # -# source://actionpack//lib/action_controller/metal/implicit_render.rb#29 +# source://actionpack//lib/action_controller/metal/implicit_render.rb#31 module ActionController::ImplicitRender include ::ActionController::BasicImplicitRender - # source://actionpack//lib/action_controller/metal/implicit_render.rb#33 + # source://actionpack//lib/action_controller/metal/implicit_render.rb#35 def default_render; end - # source://actionpack//lib/action_controller/metal/implicit_render.rb#52 + # source://actionpack//lib/action_controller/metal/implicit_render.rb#54 def method_for_action(action_name); end private # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/implicit_render.rb#59 + # source://actionpack//lib/action_controller/metal/implicit_render.rb#61 def interactive_browser_request?; end end +# = Action Controller \Instrumentation +# # Adds instrumentation to several ends in ActionController::Base. It also provides # some hooks related with process_action. This allows an ORM like Active Record # and/or DataMapper to plug in ActionController and show related information. # # Check ActiveRecord::Railties::ControllerRuntime for an example. # -# source://actionpack//lib/action_controller/metal/instrumentation.rb#12 +# source://actionpack//lib/action_controller/metal/instrumentation.rb#14 module ActionController::Instrumentation extend ::ActiveSupport::Concern include ::ActiveSupport::Benchmarkable @@ -3776,16 +3852,19 @@ module ActionController::Instrumentation mixes_in_class_methods ::ActionController::Instrumentation::ClassMethods - # source://actionpack//lib/action_controller/metal/instrumentation.rb#40 + # source://actionpack//lib/action_controller/metal/instrumentation.rb#21 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/instrumentation.rb#47 def redirect_to(*_arg0); end - # source://actionpack//lib/action_controller/metal/instrumentation.rb#19 + # source://actionpack//lib/action_controller/metal/instrumentation.rb#26 def render(*_arg0); end - # source://actionpack//lib/action_controller/metal/instrumentation.rb#34 + # source://actionpack//lib/action_controller/metal/instrumentation.rb#41 def send_data(data, options = T.unsafe(nil)); end - # source://actionpack//lib/action_controller/metal/instrumentation.rb#27 + # source://actionpack//lib/action_controller/metal/instrumentation.rb#34 def send_file(path, options = T.unsafe(nil)); end def view_runtime; end @@ -3796,7 +3875,7 @@ module ActionController::Instrumentation # Every time after an action is processed, this method is invoked # with the payload, so you can add more information. # - # source://actionpack//lib/action_controller/metal/instrumentation.rb#96 + # source://actionpack//lib/action_controller/metal/instrumentation.rb#103 def append_info_to_payload(payload); end # A hook which allows you to clean up any time, wrongly taken into account in @@ -3806,25 +3885,25 @@ module ActionController::Instrumentation # super - time_taken_in_something_expensive # end # - # source://actionpack//lib/action_controller/metal/instrumentation.rb#90 + # source://actionpack//lib/action_controller/metal/instrumentation.rb#97 def cleanup_view_runtime; end # A hook invoked every time a before callback is halted. # - # source://actionpack//lib/action_controller/metal/instrumentation.rb#80 + # source://actionpack//lib/action_controller/metal/instrumentation.rb#87 def halted_callback_hook(filter, _); end - # source://actionpack//lib/action_controller/metal/instrumentation.rb#50 + # source://actionpack//lib/action_controller/metal/instrumentation.rb#57 def process_action(*_arg0); end end -# source://actionpack//lib/action_controller/metal/instrumentation.rb#100 +# source://actionpack//lib/action_controller/metal/instrumentation.rb#107 module ActionController::Instrumentation::ClassMethods # A hook which allows other frameworks to log what happened during # controller process action. This method should return an array # with the messages to be added. # - # source://actionpack//lib/action_controller/metal/instrumentation.rb#104 + # source://actionpack//lib/action_controller/metal/instrumentation.rb#111 def log_process_action(payload); end end @@ -3834,6 +3913,16 @@ class ActionController::InvalidAuthenticityToken < ::ActionController::ActionCon # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#11 class ActionController::InvalidCrossOriginRequest < ::ActionController::ActionControllerError; end +# Raised when initializing Parameters with keys that aren't strings or symbols. +# +# ActionController::Parameters.new(123 => 456) +# # => ActionController::InvalidParameterKey: all keys must be Strings or Symbols, got: Integer +# +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#72 +class ActionController::InvalidParameterKey < ::ArgumentError; end + +# = Action Controller \Live +# # Mix this module into your controller, and all actions in that controller # will be able to stream data to the client as it's written. # @@ -3864,7 +3953,22 @@ class ActionController::InvalidCrossOriginRequest < ::ActionController::ActionCo # the main thread. Make sure your actions are thread safe, and this shouldn't # be a problem (don't share state across threads, etc). # -# source://actionpack//lib/action_controller/metal/live.rb#37 +# Note that \Rails includes +Rack::ETag+ by default, which will buffer your +# response. As a result, streaming responses may not work properly with Rack +# 2.2.x, and you may need to implement workarounds in your application. +# You can either set the +ETag+ or +Last-Modified+ response headers or remove +# +Rack::ETag+ from the middleware stack to address this issue. +# +# Here's an example of how you can set the +Last-Modified+ header if your Rack +# version is 2.2.x: +# +# def stream +# response.headers["Content-Type"] = "text/event-stream" +# response.headers["Last-Modified"] = Time.now.httpdate # Add this line if your Rack version is 2.2.x +# ... +# end +# +# source://actionpack//lib/action_controller/metal/live.rb#54 module ActionController::Live extend ::ActiveSupport::Concern @@ -3873,10 +3977,10 @@ module ActionController::Live # source://actionpack//lib/action_controller/test_case.rb#24 def new_controller_thread; end - # source://actionpack//lib/action_controller/metal/live.rb#249 + # source://actionpack//lib/action_controller/metal/live.rb#273 def process(name); end - # source://actionpack//lib/action_controller/metal/live.rb#295 + # source://actionpack//lib/action_controller/metal/live.rb#319 def response_body=(body); end # Sends a stream to the browser, which is helpful when you're generating exports or other running data where you @@ -3901,22 +4005,22 @@ module ActionController::Live # end # end # - # source://actionpack//lib/action_controller/metal/live.rb#321 + # source://actionpack//lib/action_controller/metal/live.rb#345 def send_stream(filename:, disposition: T.unsafe(nil), type: T.unsafe(nil)); end private - # source://actionpack//lib/action_controller/metal/live.rb#348 + # source://actionpack//lib/action_controller/metal/live.rb#372 def log_error(exception); end end -# source://actionpack//lib/action_controller/metal/live.rb#127 +# source://actionpack//lib/action_controller/metal/live.rb#146 class ActionController::Live::Buffer < ::ActionDispatch::Response::Buffer include ::MonitorMixin # @return [Buffer] a new instance of Buffer # - # source://actionpack//lib/action_controller/metal/live.rb#143 + # source://actionpack//lib/action_controller/metal/live.rb#162 def initialize(response); end # Inform the producer/writing thread that the client has @@ -3925,10 +4029,10 @@ class ActionController::Live::Buffer < ::ActionDispatch::Response::Buffer # # See also #close. # - # source://actionpack//lib/action_controller/metal/live.rb#193 + # source://actionpack//lib/action_controller/metal/live.rb#217 def abort; end - # source://actionpack//lib/action_controller/metal/live.rb#212 + # source://actionpack//lib/action_controller/metal/live.rb#236 def call_on_error; end # Write a 'close' event to the buffer; the producer/writing thread @@ -3936,7 +4040,7 @@ class ActionController::Live::Buffer < ::ActionDispatch::Response::Buffer # # See also #abort. # - # source://actionpack//lib/action_controller/metal/live.rb#180 + # source://actionpack//lib/action_controller/metal/live.rb#204 def close; end # Is the client still connected and waiting for content? @@ -3946,7 +4050,7 @@ class ActionController::Live::Buffer < ::ActionDispatch::Response::Buffer # # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/live.rb#204 + # source://actionpack//lib/action_controller/metal/live.rb#228 def connected?; end # Ignore that the client has disconnected. @@ -3956,7 +4060,7 @@ class ActionController::Live::Buffer < ::ActionDispatch::Response::Buffer # discarded. If this value is `false` (the default), a # ClientDisconnected exception will be raised. # - # source://actionpack//lib/action_controller/metal/live.rb#141 + # source://actionpack//lib/action_controller/metal/live.rb#160 def ignore_disconnect; end # Ignore that the client has disconnected. @@ -3966,63 +4070,65 @@ class ActionController::Live::Buffer < ::ActionDispatch::Response::Buffer # discarded. If this value is `false` (the default), a # ClientDisconnected exception will be raised. # - # source://actionpack//lib/action_controller/metal/live.rb#141 + # source://actionpack//lib/action_controller/metal/live.rb#160 def ignore_disconnect=(_arg0); end - # source://actionpack//lib/action_controller/metal/live.rb#208 + # source://actionpack//lib/action_controller/metal/live.rb#232 def on_error(&block); end - # source://actionpack//lib/action_controller/metal/live.rb#151 + # source://actionpack//lib/action_controller/metal/live.rb#175 def write(string); end # Same as +write+ but automatically include a newline at the end of the string. # - # source://actionpack//lib/action_controller/metal/live.rb#172 + # source://actionpack//lib/action_controller/metal/live.rb#196 def writeln(string); end private - # source://actionpack//lib/action_controller/metal/live.rb#228 + # source://actionpack//lib/action_controller/metal/live.rb#252 def build_queue(queue_size); end - # source://actionpack//lib/action_controller/metal/live.rb#217 + # source://actionpack//lib/action_controller/metal/live.rb#241 def each_chunk(&block); end class << self # Returns the value of attribute queue_size. # - # source://actionpack//lib/action_controller/metal/live.rb#131 + # source://actionpack//lib/action_controller/metal/live.rb#150 def queue_size; end # Sets the attribute queue_size # # @param value the value to set the attribute queue_size to. # - # source://actionpack//lib/action_controller/metal/live.rb#131 + # source://actionpack//lib/action_controller/metal/live.rb#150 def queue_size=(_arg0); end end end -# source://actionpack//lib/action_controller/metal/live.rb#40 +# source://actionpack//lib/action_controller/metal/live.rb#57 module ActionController::Live::ClassMethods - # source://actionpack//lib/action_controller/metal/live.rb#41 + # source://actionpack//lib/action_controller/metal/live.rb#58 def make_response!(request); end end -# source://actionpack//lib/action_controller/metal/live.rb#124 +# source://actionpack//lib/action_controller/metal/live.rb#143 class ActionController::Live::ClientDisconnected < ::RuntimeError; end -# source://actionpack//lib/action_controller/metal/live.rb#233 +# source://actionpack//lib/action_controller/metal/live.rb#257 class ActionController::Live::Response < ::ActionDispatch::Response private - # source://actionpack//lib/action_controller/metal/live.rb#235 + # source://actionpack//lib/action_controller/metal/live.rb#259 def before_committed; end - # source://actionpack//lib/action_controller/metal/live.rb#242 + # source://actionpack//lib/action_controller/metal/live.rb#266 def build_buffer(response, body); end end +# = Action Controller \Live Server Sent Events +# # This class provides the ability to write an SSE (Server Sent Event) # to an IO stream. The class is initialized with a stream and can be used # to either write a JSON string or an object which can be converted to JSON. @@ -4060,83 +4166,88 @@ end # Note: SSEs are not currently supported by IE. However, they are supported # by Chrome, Firefox, Opera, and Safari. # -# source://actionpack//lib/action_controller/metal/live.rb#88 +# source://actionpack//lib/action_controller/metal/live.rb#107 class ActionController::Live::SSE # @return [SSE] a new instance of SSE # - # source://actionpack//lib/action_controller/metal/live.rb#91 + # source://actionpack//lib/action_controller/metal/live.rb#110 def initialize(stream, options = T.unsafe(nil)); end - # source://actionpack//lib/action_controller/metal/live.rb#96 + # source://actionpack//lib/action_controller/metal/live.rb#115 def close; end - # source://actionpack//lib/action_controller/metal/live.rb#100 + # source://actionpack//lib/action_controller/metal/live.rb#119 def write(object, options = T.unsafe(nil)); end private - # source://actionpack//lib/action_controller/metal/live.rb#110 + # source://actionpack//lib/action_controller/metal/live.rb#129 def perform_write(json, options); end end -# source://actionpack//lib/action_controller/metal/live.rb#89 +# source://actionpack//lib/action_controller/metal/live.rb#108 ActionController::Live::SSE::PERMITTED_OPTIONS = T.let(T.unsafe(nil), Array) -# source://actionpack//lib/action_controller/test_case.rb#169 +# source://actionpack//lib/action_controller/test_case.rb#172 class ActionController::LiveTestResponse < ::ActionController::Live::Response # Was there a server-side error? # - # source://rack/2.2.7/lib/rack/response.rb#141 + # source://rack/3.0.9.1/lib/rack/response.rb#186 def error?; end # Was the URL not found? # - # source://rack/2.2.7/lib/rack/response.rb#151 + # source://rack/3.0.9.1/lib/rack/response.rb#196 def missing?; end # Was the response successful? # - # source://rack/2.2.7/lib/rack/response.rb#138 + # source://rack/3.0.9.1/lib/rack/response.rb#183 def success?; end end # source://actionpack//lib/action_controller/log_subscriber.rb#4 class ActionController::LogSubscriber < ::ActiveSupport::LogSubscriber - # source://actionpack//lib/action_controller/log_subscriber.rb#67 + # source://actionpack//lib/action_controller/log_subscriber.rb#78 def exist_fragment?(event); end - # source://actionpack//lib/action_controller/log_subscriber.rb#67 + # source://actionpack//lib/action_controller/log_subscriber.rb#78 def expire_fragment(event); end - # source://actionpack//lib/action_controller/log_subscriber.rb#40 + # source://actionpack//lib/action_controller/log_subscriber.rb#45 def halted_callback(event); end - # source://actionpack//lib/action_controller/log_subscriber.rb#76 + # source://actionpack//lib/action_controller/log_subscriber.rb#88 def logger; end - # source://actionpack//lib/action_controller/log_subscriber.rb#20 + # source://actionpack//lib/action_controller/log_subscriber.rb#24 def process_action(event); end - # source://actionpack//lib/action_controller/log_subscriber.rb#67 + # source://actionpack//lib/action_controller/log_subscriber.rb#78 def read_fragment(event); end - # source://actionpack//lib/action_controller/log_subscriber.rb#48 + # source://actionpack//lib/action_controller/log_subscriber.rb#55 def redirect_to(event); end - # source://actionpack//lib/action_controller/log_subscriber.rb#52 + # source://actionpack//lib/action_controller/log_subscriber.rb#60 def send_data(event); end - # source://actionpack//lib/action_controller/log_subscriber.rb#44 + # source://actionpack//lib/action_controller/log_subscriber.rb#50 def send_file(event); end # source://actionpack//lib/action_controller/log_subscriber.rb#7 def start_processing(event); end - # source://actionpack//lib/action_controller/log_subscriber.rb#56 + # source://actionpack//lib/action_controller/log_subscriber.rb#65 def unpermitted_parameters(event); end - # source://actionpack//lib/action_controller/log_subscriber.rb#67 + # source://actionpack//lib/action_controller/log_subscriber.rb#78 def write_fragment(event); end + + class << self + # source://activesupport/7.1.3.2/lib/active_support/log_subscriber.rb#87 + def log_levels; end + end end # source://actionpack//lib/action_controller/log_subscriber.rb#5 @@ -4162,7 +4273,9 @@ module ActionController::Logging::ClassMethods def log_at(level, **options); end end -# ActionController::Metal is the simplest possible controller, providing a +# = Action Controller \Metal +# +# +ActionController::Metal+ is the simplest possible controller, providing a # valid Rack interface without the additional niceties provided by # ActionController::Base. # @@ -4182,9 +4295,9 @@ end # The +action+ method returns a valid Rack application for the \Rails # router to dispatch to. # -# == Rendering Helpers +# == \Rendering \Helpers # -# ActionController::Metal by default provides no utilities for rendering +# +ActionController::Metal+ by default provides no utilities for rendering # views, partials, or other responses aside from explicitly calling of # response_body=, content_type=, and status=. To # add the render helpers you're used to having in a normal controller, you @@ -4200,7 +4313,7 @@ end # end # end # -# == Redirection Helpers +# == Redirection \Helpers # # To add redirection helpers to your metal controller, do the following: # @@ -4213,164 +4326,195 @@ end # end # end # -# == Other Helpers +# == Other \Helpers # # You can refer to the modules included in ActionController::Base to see # other features you can bring into your metal controller. # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://actionpack//lib/action_controller/metal.rb#117 +# source://actionpack//lib/action_controller/metal.rb#121 class ActionController::Metal < ::AbstractController::Base include ::ActionController::Testing::Functional # @return [Metal] a new instance of Metal # - # source://actionpack//lib/action_controller/metal.rb#150 + # source://actionpack//lib/action_controller/metal.rb#185 def initialize; end - # source://actionpack//lib/action_controller/metal.rb#147 + # source://actionpack//lib/action_controller/metal.rb#182 def content_type(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_controller/metal.rb#147 + # source://actionpack//lib/action_controller/metal.rb#182 def content_type=(arg); end # Delegates to the class's ::controller_name. # - # source://actionpack//lib/action_controller/metal.rb#141 + # source://actionpack//lib/action_controller/metal.rb#156 def controller_name; end - # source://actionpack//lib/action_controller/metal.rb#185 + # source://actionpack//lib/action_controller/metal.rb#224 def dispatch(name, request, response); end - # source://actionpack//lib/action_controller/metal.rb#147 + # Delegates to ActionDispatch::Response#headers. + # + # source://actionpack//lib/action_controller/metal.rb#180 def headers(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_controller/metal.rb#147 + # source://actionpack//lib/action_controller/metal.rb#182 def location(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_controller/metal.rb#147 + # source://actionpack//lib/action_controller/metal.rb#182 def location=(arg); end - # source://actionpack//lib/action_controller/metal.rb#147 + # source://actionpack//lib/action_controller/metal.rb#182 def media_type(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_controller/metal.rb#210 + # source://actionpack//lib/action_controller/metal.rb#262 def middleware_stack; end - # source://actionpack//lib/action_controller/metal.rb#210 + # source://actionpack//lib/action_controller/metal.rb#262 def middleware_stack=(_arg0); end - # source://actionpack//lib/action_controller/metal.rb#210 + # source://actionpack//lib/action_controller/metal.rb#262 def middleware_stack?; end - # source://actionpack//lib/action_controller/metal.rb#157 + # source://actionpack//lib/action_controller/metal.rb#194 def params; end - # source://actionpack//lib/action_controller/metal.rb#161 + # source://actionpack//lib/action_controller/metal.rb#198 def params=(val); end # Tests if render or redirect has already happened. # # @return [Boolean] # - # source://actionpack//lib/action_controller/metal.rb#181 + # source://actionpack//lib/action_controller/metal.rb#220 def performed?; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 + # :attr_reader: request + # + # The ActionDispatch::Request instance for the current request. + # + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attr_internal.rb#33 def request; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attr_internal.rb#33 def request=(_arg0); end - # source://actionpack//lib/action_controller/metal.rb#206 + # source://actionpack//lib/action_controller/metal.rb#258 def reset_session; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 + # :attr_reader: response + # + # The ActionDispatch::Response instance for the current response. + # + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attr_internal.rb#33 def response; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 - def response=(_arg0); end + # Assign the response and mark it as committed. No further processing will occur. + # + # source://actionpack//lib/action_controller/metal.rb#242 + def response=(response); end - # source://actionpack//lib/action_controller/metal.rb#172 + # source://actionpack//lib/action_controller/metal.rb#209 def response_body=(body); end - # source://actionpack//lib/action_controller/metal.rb#147 + # source://actionpack//lib/action_controller/metal.rb#182 def response_code(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_controller/metal.rb#146 + # The ActionDispatch::Request::Session instance for the current request. + # See further details in the + # {Active Controller Session guide}[https://guides.rubyonrails.org/action_controller_overview.html#session]. + # + # source://actionpack//lib/action_controller/metal.rb#176 def session(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_controller/metal.rb#197 + # source://actionpack//lib/action_controller/metal.rb#249 def set_request!(request); end - # source://actionpack//lib/action_controller/metal.rb#193 + # source://actionpack//lib/action_controller/metal.rb#232 def set_response!(response); end - # source://actionpack//lib/action_controller/metal.rb#147 + # source://actionpack//lib/action_controller/metal.rb#182 def status(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_controller/metal.rb#147 + # source://actionpack//lib/action_controller/metal.rb#182 def status=(arg); end - # source://actionpack//lib/action_controller/metal.rb#202 + # source://actionpack//lib/action_controller/metal.rb#254 def to_a; end - # Basic url_for that can be overridden for more robust functionality. + # Basic \url_for that can be overridden for more robust functionality. # - # source://actionpack//lib/action_controller/metal.rb#168 + # source://actionpack//lib/action_controller/metal.rb#205 def url_for(string); end class << self # Returns a Rack endpoint for the given action name. # - # source://actionpack//lib/action_controller/metal.rb#231 + # source://actionpack//lib/action_controller/metal.rb#289 def action(name); end - # source://actionpack//lib/action_controller/metal.rb#136 + # source://actionpack//lib/action_controller/metal.rb#140 def action_encoding_template(action); end # Returns the last part of the controller's name, underscored, without the ending - # Controller. For instance, PostsController returns posts. - # Namespaces are left out, so Admin::PostsController returns posts as well. + # Controller. For instance, +PostsController+ returns posts. + # Namespaces are left out, so +Admin::PostsController+ returns posts as well. # # ==== Returns # * string # - # source://actionpack//lib/action_controller/metal.rb#126 + # source://actionpack//lib/action_controller/metal.rb#130 def controller_name; end # Direct dispatch to the controller. Instantiates the controller, then # executes the action named +name+. # - # source://actionpack//lib/action_controller/metal.rb#247 + # source://actionpack//lib/action_controller/metal.rb#305 def dispatch(name, req, res); end - # source://actionpack//lib/action_controller/metal.rb#212 - def inherited(base); end - - # source://actionpack//lib/action_controller/metal.rb#130 + # source://actionpack//lib/action_controller/metal.rb#134 def make_response!(request); end - # Alias for +middleware_stack+. + # The middleware stack used by this controller. + # + # By default uses a variation of ActionDispatch::MiddlewareStack which + # allows for the following syntax: + # + # class PostsController < ApplicationController + # use AuthenticationMiddleware, except: [:index, :show] + # end + # + # Read more about {Rails middleware + # stack}[https://guides.rubyonrails.org/rails_on_rack.html#action-dispatcher-middleware-stack] + # in the guides. # - # source://actionpack//lib/action_controller/metal.rb#226 + # source://actionpack//lib/action_controller/metal.rb#284 def middleware; end - # source://actionpack//lib/action_controller/metal.rb#210 + # source://actionpack//lib/action_controller/metal.rb#262 def middleware_stack; end - # source://actionpack//lib/action_controller/metal.rb#210 + # source://actionpack//lib/action_controller/metal.rb#262 def middleware_stack=(value); end - # source://actionpack//lib/action_controller/metal.rb#210 + # source://actionpack//lib/action_controller/metal.rb#262 def middleware_stack?; end # Pushes the given Rack middleware and its arguments to the bottom of the # middleware stack. # - # source://actionpack//lib/action_controller/metal.rb#220 + # source://actionpack//lib/action_controller/metal.rb#267 def use(*_arg0, **_arg1, &_arg2); end + + private + + # @private + # + # source://actionpack//lib/action_controller/metal.rb#146 + def inherited(subclass); end end end @@ -4382,6 +4526,8 @@ class ActionController::MethodNotAllowed < ::ActionController::ActionControllerE def initialize(*allowed_methods); end end +# = Action Controller \MiddlewareStack +# # Extend ActionDispatch middleware stack to make it aware of options # allowing the following syntax in controllers: # @@ -4389,37 +4535,37 @@ end # use AuthenticationMiddleware, except: [:index, :show] # end # -# source://actionpack//lib/action_controller/metal.rb#14 +# source://actionpack//lib/action_controller/metal.rb#16 class ActionController::MiddlewareStack < ::ActionDispatch::MiddlewareStack - # source://actionpack//lib/action_controller/metal.rb#27 + # source://actionpack//lib/action_controller/metal.rb#29 def build(action, app = T.unsafe(nil), &block); end private - # source://actionpack//lib/action_controller/metal.rb#40 + # source://actionpack//lib/action_controller/metal.rb#42 def build_middleware(klass, args, block); end end -# source://actionpack//lib/action_controller/metal.rb#37 +# source://actionpack//lib/action_controller/metal.rb#39 ActionController::MiddlewareStack::EXCLUDE = T.let(T.unsafe(nil), Proc) -# source://actionpack//lib/action_controller/metal.rb#36 +# source://actionpack//lib/action_controller/metal.rb#38 ActionController::MiddlewareStack::INCLUDE = T.let(T.unsafe(nil), Proc) -# source://actionpack//lib/action_controller/metal.rb#15 +# source://actionpack//lib/action_controller/metal.rb#17 class ActionController::MiddlewareStack::Middleware < ::ActionDispatch::MiddlewareStack::Middleware # @return [Middleware] a new instance of Middleware # - # source://actionpack//lib/action_controller/metal.rb#16 + # source://actionpack//lib/action_controller/metal.rb#18 def initialize(klass, args, actions, strategy, block); end # @return [Boolean] # - # source://actionpack//lib/action_controller/metal.rb#22 + # source://actionpack//lib/action_controller/metal.rb#24 def valid?(action); end end -# source://actionpack//lib/action_controller/metal.rb#38 +# source://actionpack//lib/action_controller/metal.rb#40 ActionController::MiddlewareStack::NULL = T.let(T.unsafe(nil), Proc) # source://actionpack//lib/action_controller/metal/mime_responds.rb#6 @@ -4452,7 +4598,7 @@ module ActionController::MimeResponds # # What that says is, "if the client wants HTML or JS in response to this action, just respond as we # would have before, but if the client wants XML, return them the list of people in XML format." - # (Rails determines the desired response format from the HTTP Accept header submitted by the client.) + # (\Rails determines the desired response format from the HTTP Accept header submitted by the client.) # # Supposing you have an action that adds a new person, optionally creating their company # (by name) if it does not already exist, without web-services, it might look like this: @@ -4518,7 +4664,7 @@ module ActionController::MimeResponds # # Note that you can define your own XML parameter parser which would allow you to describe multiple entities # in a single request (i.e., by wrapping them all in a single root node), but if you just go with the flow - # and accept Rails' defaults, life will be much easier. + # and accept \Rails' defaults, life will be much easier. # # If you need to use a MIME type which isn't supported by default, you can register your own handlers in # +config/initializers/mime_types.rb+ as follows. @@ -4717,7 +4863,22 @@ class ActionController::MimeResponds::Collector::VariantCollector end # source://actionpack//lib/action_controller/metal/exceptions.rb#94 -class ActionController::MissingExactTemplate < ::ActionController::UnknownFormat; end +class ActionController::MissingExactTemplate < ::ActionController::UnknownFormat + # @return [MissingExactTemplate] a new instance of MissingExactTemplate + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#97 + def initialize(message, controller, action_name); end + + # Returns the value of attribute action_name. + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#95 + def action_name; end + + # Returns the value of attribute controller. + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#95 + def controller; end +end # source://actionpack//lib/action_controller/metal/exceptions.rb#59 class ActionController::MissingFile < ::ActionController::ActionControllerError; end @@ -4821,24 +4982,24 @@ end # params.require(:a) # # => ActionController::ParameterMissing: param is missing or the value is empty: a # -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#21 +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#22 class ActionController::ParameterMissing < ::KeyError # @return [ParameterMissing] a new instance of ParameterMissing # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#24 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#25 def initialize(param, keys = T.unsafe(nil)); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#33 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#34 def corrections; end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#22 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#23 def keys; end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#22 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#23 def param; end end -# == Action Controller \Parameters +# = Action Controller \Parameters # # Allows you to choose which attributes should be permitted for mass updating # and thus prevent accidentally exposing that which shouldn't be exposed. @@ -4866,8 +5027,8 @@ end # * +permit_all_parameters+ - If it's +true+, all the parameters will be # permitted by default. The default is +false+. # * +action_on_unpermitted_parameters+ - Controls behavior when parameters that are not explicitly -# permitted are found. The default value is :log in test and development environments, -# +false+ otherwise. The values can be: +# permitted are found. The default value is :log in test and development environments, +# +false+ otherwise. The values can be: # * +false+ to take no action. # * :log to emit an ActiveSupport::Notifications.instrument event on the # unpermitted_parameters.action_controller topic and log at the DEBUG level. @@ -4897,16 +5058,18 @@ end # environment they should only be set once at boot-time and never mutated at # runtime. # -# You can fetch values of ActionController::Parameters using either +# You can fetch values of +ActionController::Parameters+ using either # :key or "key". # # params = ActionController::Parameters.new(key: "value") # params[:key] # => "value" # params["key"] # => "value" # -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#132 +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#140 class ActionController::Parameters - # Returns a new ActionController::Parameters instance. + include ::ActiveSupport::DeepMergeable + + # Returns a new +ActionController::Parameters+ instance. # Also, sets the +permitted+ attribute to the default value of # ActionController::Parameters.permit_all_parameters. # @@ -4925,13 +5088,13 @@ class ActionController::Parameters # # @return [Parameters] a new instance of Parameters # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#247 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#269 def initialize(parameters = T.unsafe(nil), logging_context = T.unsafe(nil)); end # Returns true if another +Parameters+ object contains the same content and # permitted flag. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#255 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#283 def ==(other); end # Returns a parameter for the given +key+. If not found, @@ -4941,44 +5104,44 @@ class ActionController::Parameters # params[:person] # => #"Francesco"} permitted: false> # params[:none] # => nil # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#619 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#665 def [](key); end # Assigns a value to a given +key+. The given key may still get filtered out # when #permit is called. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#625 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#671 def []=(key, value); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#223 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#243 def always_permitted_parameters; end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#223 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#243 def always_permitted_parameters=(val); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#229 def as_json(*_arg0, **_arg1, &_arg2); end - # Returns a new ActionController::Parameters instance with +nil+ values removed. + # Returns a new +ActionController::Parameters+ instance with +nil+ values removed. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#795 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#842 def compact; end # Removes all +nil+ values in place and returns +self+, or +nil+ if no changes were made. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#800 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#847 def compact!; end - # Returns a new ActionController::Parameters instance without the blank values. + # Returns a new +ActionController::Parameters+ instance without the blank values. # Uses Object#blank? for determining if a value is blank. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#806 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#853 def compact_blank; end # Removes all blank values in place and returns self. # Uses Object#blank? for determining if a value is blank. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#812 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#859 def compact_blank!; end # Attribute that keeps track of converted arrays, if any, to avoid double @@ -4989,26 +5152,31 @@ class ActionController::Parameters # loop that converts values. Also, we are not going to build a new array # object per fetch. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#384 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#430 def converted_arrays; end # Returns a duplicate +ActionController::Parameters+ instance with the same permitted parameters. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#897 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#958 def deep_dup; end - # Returns a new ActionController::Parameters instance with the + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#894 + def deep_merge?(other_hash); end + + # Returns a new +ActionController::Parameters+ instance with the # results of running +block+ once for every key. This includes the keys # from the root hash and from all nested hashes and arrays. The values are unchanged. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#746 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#793 def deep_transform_keys(&block); end - # Returns the same ActionController::Parameters instance with + # Returns the same +ActionController::Parameters+ instance with # changed keys. This includes the keys from the root hash and from all # nested hashes and arrays. The values are unchanged. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#755 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#802 def deep_transform_keys!(&block); end # Deletes a key-value pair from +Parameters+ and returns the value. If @@ -5016,12 +5184,12 @@ class ActionController::Parameters # +key+ and returns the result). This method is similar to #extract!, which # returns the corresponding +ActionController::Parameters+ object. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#764 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#811 def delete(key, &block); end # Removes items that the block evaluates to true and returns self. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#788 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#835 def delete_if(&block); end # Extracts the nested parameter from the given +keys+ by calling +dig+ @@ -5034,60 +5202,79 @@ class ActionController::Parameters # params2 = ActionController::Parameters.new(foo: [10, 11, 12]) # params2.dig(:foo, 1) # => 11 # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#663 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#709 def dig(*keys); end # Convert all hashes in values into parameters, then yield each pair in # the same way as Hash#each_pair. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#356 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#397 def each(&block); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#229 def each_key(*_arg0, **_arg1, &_arg2); end # Convert all hashes in values into parameters, then yield each pair in # the same way as Hash#each_pair. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#356 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#397 def each_pair(&block); end # Convert all hashes in values into parameters, then yield each value in # the same way as Hash#each_value. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#368 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#409 def each_value(&block); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#229 def empty?(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#892 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#953 def encode_with(coder); end # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#263 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#304 def eql?(other); end - # Returns a new ActionController::Parameters instance that + # Returns a new +ActionController::Parameters+ instance that # filters out the given +keys+. # # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) # params.except(:a, :b) # => #3} permitted: false> # params.except(:d) # => #1, "b"=>2, "c"=>3} permitted: false> # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#692 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#738 def except(*keys); end + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#229 + def exclude?(*_arg0, **_arg1, &_arg2); end + # Removes and returns the key/value pairs matching the given keys. # # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) # params.extract!(:a, :b) # => #1, "b"=>2} permitted: false> # params # => #3} permitted: false> # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#701 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#748 def extract!(*keys); end + # Returns parameter value for the given +key+ separated by +delimiter+. + # + # params = ActionController::Parameters.new(id: "1_123", tags: "ruby,rails") + # params.extract_value(:id) # => ["1", "123"] + # params.extract_value(:tags, delimiter: ",") # => ["ruby", "rails"] + # params.extract_value(:non_existent_key) # => nil + # + # Note that if the given +key+'s value contains blank elements, then + # the returned array will include empty strings. + # + # params = ActionController::Parameters.new(tags: "ruby,rails,,web") + # params.extract_value(:tags) # => ["ruby", "rails", "", "web"] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#976 + def extract_value(key, delimiter: T.unsafe(nil)); end + # Returns a parameter for the given +key+. If the +key+ # can't be found, there are several options: With no other arguments, # it will raise an ActionController::ParameterMissing error; @@ -5102,61 +5289,67 @@ class ActionController::Parameters # params.fetch(:none, "Francesco") # => "Francesco" # params.fetch(:none) { "Francesco" } # => "Francesco" # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#642 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#688 def fetch(key, *args); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#229 def has_key?(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 - def has_value?(*_arg0, **_arg1, &_arg2); end + # Returns true if the given value is present for some key in the parameters. + # + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#864 + def has_value?(value); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#269 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#310 def hash; end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#229 def include?(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#874 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#935 def init_with(coder); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#861 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#922 def inspect; end # Equivalent to Hash#keep_if, but returns +nil+ if no changes were made. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#775 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#822 def keep_if(&block); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#229 def key?(*_arg0, **_arg1, &_arg2); end - # :method: values + # :method: to_s # # :call-seq: - # values() + # to_s() # - # Returns a new array of the values of the parameters. + # Returns the content of the parameters as a string. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#229 def keys(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#229 def member?(*_arg0, **_arg1, &_arg2); end - # Returns a new ActionController::Parameters instance with all keys from + # Returns a new +ActionController::Parameters+ instance with all keys from # +other_hash+ merged into current hash. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#824 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#878 def merge(other_hash); end - # Returns the current ActionController::Parameters instance with + # :call-seq: merge!(other_hash) + # + # Returns the current +ActionController::Parameters+ instance with # +other_hash+ merged into current hash. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#832 - def merge!(other_hash); end + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#889 + def merge!(other_hash, &block); end - # Returns a new ActionController::Parameters instance that + # Returns a new +ActionController::Parameters+ instance that # includes only the given +filters+ and sets the +permitted+ attribute # for the object to +true+. This is useful for limiting which attributes # should be allowed for mass updating. @@ -5270,7 +5463,7 @@ class ActionController::Parameters # params.permit(person: { '0': [:email], '1': [:phone]}).to_h # # => {"person"=>{"0"=>{"email"=>"none@test.com"}, "1"=>{"phone"=>"555-6789"}}} # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#596 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#642 def permit(*filters); end # Sets the +permitted+ attribute to +true+. This can be used to pass @@ -5286,7 +5479,7 @@ class ActionController::Parameters # params.permitted? # => true # Person.new(params) # => # # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#410 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#456 def permit!; end # Returns +true+ if the parameter is permitted, +false+ otherwise. @@ -5298,18 +5491,18 @@ class ActionController::Parameters # # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#394 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#440 def permitted?; end - # Returns a new ActionController::Parameters instance with items + # Returns a new +ActionController::Parameters+ instance with items # that the block evaluates to true removed. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#783 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#830 def reject(&block); end # Removes items that the block evaluates to true and returns self. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#788 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#835 def reject!(&block); end # This method accepts both a single key and an array of keys. @@ -5363,7 +5556,7 @@ class ActionController::Parameters # # for example. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#471 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#517 def require(key); end # This method accepts both a single key and an array of keys. @@ -5417,33 +5610,33 @@ class ActionController::Parameters # # for example. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#471 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#517 def required(key); end - # Returns a new ActionController::Parameters instance with all keys + # Returns a new +ActionController::Parameters+ instance with all keys # from current hash merged into +other_hash+. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#839 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#900 def reverse_merge(other_hash); end - # Returns the current ActionController::Parameters instance with + # Returns the current +ActionController::Parameters+ instance with # current hash merged into +other_hash+. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#848 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#909 def reverse_merge!(other_hash); end - # Returns a new ActionController::Parameters instance with only + # Returns a new +ActionController::Parameters+ instance with only # items that the block evaluates to true. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#770 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#817 def select(&block); end # Equivalent to Hash#keep_if, but returns +nil+ if no changes were made. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#775 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#822 def select!(&block); end - # Returns a new ActionController::Parameters instance that + # Returns a new +ActionController::Parameters+ instance that # includes only the given +keys+. If the given +keys+ # don't exist, returns an empty hash. # @@ -5451,20 +5644,20 @@ class ActionController::Parameters # params.slice(:a, :b) # => #1, "b"=>2} permitted: false> # params.slice(:d) # => # # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#675 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#721 def slice(*keys); end - # Returns the current ActionController::Parameters instance which + # Returns the current +ActionController::Parameters+ instance which # contains only the given +keys+. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#681 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#727 def slice!(*keys); end # This is required by ActiveModel attribute assignment, so that user can # pass +Parameters+ to a mass assignment methods in a model. It should not # matter as we are using +HashWithIndifferentAccess+ internally. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#857 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#918 def stringify_keys; end # Returns a safe ActiveSupport::HashWithIndifferentAccess @@ -5480,8 +5673,8 @@ class ActionController::Parameters # safe_params = params.permit(:name) # safe_params.to_h # => {"name"=>"Senjougahara Hitagi"} # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#285 - def to_h; end + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#326 + def to_h(&block); end # Returns a safe Hash representation of the parameters # with all unpermitted keys removed. @@ -5496,7 +5689,7 @@ class ActionController::Parameters # safe_params = params.permit(:name) # safe_params.to_hash # => {"name"=>"Senjougahara Hitagi"} # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#305 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#346 def to_hash; end # Returns a string representation of the receiver suitable for use as a URL @@ -5526,7 +5719,7 @@ class ActionController::Parameters # The string pairs "key=value" that conform the query string # are sorted lexicographically in ascending order. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#335 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#376 def to_param(*args); end # Returns a string representation of the receiver suitable for use as a URL @@ -5556,10 +5749,10 @@ class ActionController::Parameters # The string pairs "key=value" that conform the query string # are sorted lexicographically in ascending order. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#335 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#376 def to_query(*args); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#229 def to_s(*_arg0, **_arg1, &_arg2); end # Returns an unsafe, unfiltered ActiveSupport::HashWithIndifferentAccess @@ -5572,7 +5765,7 @@ class ActionController::Parameters # params.to_unsafe_h # # => {"name"=>"Senjougahara Hitagi", "oddity" => "Heavy stone crab"} # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#349 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#390 def to_unsafe_h; end # Returns an unsafe, unfiltered ActiveSupport::HashWithIndifferentAccess @@ -5585,125 +5778,141 @@ class ActionController::Parameters # params.to_unsafe_h # # => {"name"=>"Senjougahara Hitagi", "oddity" => "Heavy stone crab"} # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#349 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#390 def to_unsafe_hash; end - # Returns a new ActionController::Parameters instance with the + # Returns a new +ActionController::Parameters+ instance with the # results of running +block+ once for every key. The values are unchanged. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#728 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#775 def transform_keys(&block); end # Performs keys transformation and returns the altered - # ActionController::Parameters instance. + # +ActionController::Parameters+ instance. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#737 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#784 def transform_keys!(&block); end - # Returns a new ActionController::Parameters instance with the results of + # Returns a new +ActionController::Parameters+ instance with the results of # running +block+ once for every value. The keys are unchanged. # # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) # params.transform_values { |x| x * 2 } # # => #2, "b"=>4, "c"=>6} permitted: false> # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#711 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#758 def transform_values; end # Performs values transformation and returns the altered - # ActionController::Parameters instance. + # +ActionController::Parameters+ instance. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#720 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#767 def transform_values!; end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 - def value?(*_arg0, **_arg1, &_arg2); end + # Returns true if the given value is present for some key in the parameters. + # + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#864 + def value?(value); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 - def values(*_arg0, **_arg1, &_arg2); end + # Returns a new array of the values of the parameters. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#419 + def values; end # Returns values that were assigned to the given +keys+. Note that all the - # +Hash+ objects will be converted to ActionController::Parameters. + # +Hash+ objects will be converted to +ActionController::Parameters+. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#818 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#872 def values_at(*keys); end - # Returns a new ActionController::Parameters instance with all keys + # Returns a new +ActionController::Parameters+ instance with all keys # from current hash merged into +other_hash+. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#839 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#900 def with_defaults(other_hash); end - # Returns the current ActionController::Parameters instance with + # Returns the current +ActionController::Parameters+ instance with # current hash merged into +other_hash+. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#848 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#909 def with_defaults!(other_hash); end + # Returns a new +ActionController::Parameters+ instance that + # filters out the given +keys+. + # + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.except(:a, :b) # => #3} permitted: false> + # params.except(:d) # => #1, "b"=>2, "c"=>3} permitted: false> + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#738 + def without(*keys); end + protected - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#912 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#989 def each_nested_attribute; end # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#908 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#985 def nested_attributes?; end # Returns the value of attribute parameters. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#904 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#981 def parameters; end # Sets the attribute permitted # # @param value the value to set the attribute permitted to. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#906 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#983 def permitted=(_arg0); end private # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1053 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1131 def array_of_permitted_scalars?(value); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#940 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1018 def convert_hashes_to_parameters(key, value); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#925 - def convert_parameters_to_hashes(value, using); end + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1002 + def convert_parameters_to_hashes(value, using, &block); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#946 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1024 def convert_value_to_parameters(value); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#966 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1044 def each_element(object, filter, &block); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1065 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1143 def hash_filter(params, filter); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1124 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1204 def initialize_copy(source); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#919 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#996 def new_instance_with_inherited_permitted_status(hash); end # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1059 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1137 def non_scalar?(value); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1109 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1187 def permit_any_in_array(array); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1092 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1170 def permit_any_in_parameters(params); end # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1024 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1102 def permitted_scalar?(value); end # Adds existing keys to the params if their values are scalar. @@ -5717,53 +5926,59 @@ class ActionController::Parameters # # puts params.keys # => ["zipcode"] # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1038 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1116 def permitted_scalar_filter(params, permitted_key); end # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#960 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1038 def specify_numeric_keys?(filter); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#992 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1070 def unpermitted_keys(params); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#979 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1057 def unpermitted_parameters!(params); end class << self - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#135 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#145 def action_on_unpermitted_parameters; end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#135 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#145 def action_on_unpermitted_parameters=(val); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#223 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#245 + def allow_deprecated_parameters_hash_equality; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#245 + def allow_deprecated_parameters_hash_equality=(val); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#243 def always_permitted_parameters; end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#223 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#243 def always_permitted_parameters=(val); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#865 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#926 def hook_into_yaml_loading; end # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#226 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#248 def nested_attribute?(key, value); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#133 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#143 def permit_all_parameters; end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#133 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#143 def permit_all_parameters=(val); end end end -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1063 +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1141 ActionController::Parameters::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1064 +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1142 ActionController::Parameters::EMPTY_HASH = T.let(T.unsafe(nil), Hash) # This is a list of permitted scalar types that includes the ones @@ -5775,9 +5990,11 @@ ActionController::Parameters::EMPTY_HASH = T.let(T.unsafe(nil), Hash) # If you modify this collection please update the one in the #permit doc # as well. # -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1008 +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1086 ActionController::Parameters::PERMITTED_SCALAR_TYPES = T.let(T.unsafe(nil), Array) +# = Action Controller Params Wrapper +# # Wraps the parameters hash into a nested hash. This will allow clients to # submit requests without having to specify any root elements. # @@ -5840,9 +6057,9 @@ ActionController::Parameters::PERMITTED_SCALAR_TYPES = T.let(T.unsafe(nil), Arra # class Admin::UsersController < ApplicationController # end # -# will try to check if Admin::User or +User+ model exists, and use it to +# will try to check if +Admin::User+ or +User+ model exists, and use it to # determine the wrapper key respectively. If both models don't exist, -# it will then fallback to use +user+ as the key. +# it will then fall back to use +user+ as the key. # # To disable this functionality for a controller: # @@ -5850,7 +6067,7 @@ ActionController::Parameters::PERMITTED_SCALAR_TYPES = T.let(T.unsafe(nil), Arra # wrap_parameters false # end # -# source://actionpack//lib/action_controller/metal/params_wrapper.rb#80 +# source://actionpack//lib/action_controller/metal/params_wrapper.rb#82 module ActionController::ParamsWrapper extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -5860,38 +6077,38 @@ module ActionController::ParamsWrapper private - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#277 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#279 def _extract_parameters(parameters); end - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#299 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#301 def _perform_parameter_wrapping; end # Returns the list of parameters which will be selected for wrapped. # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#273 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#275 def _wrap_parameters(parameters); end # Checks if we should perform parameters wrapping. # # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#289 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#291 def _wrapper_enabled?; end # Returns the list of enabled formats. # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#268 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#270 def _wrapper_formats; end # Returns the wrapper key which will be used to store wrapped parameters. # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#263 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#265 def _wrapper_key; end # Performs parameters wrapping upon the request. Called automatically # by the metal call stack. # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#257 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#259 def process_action(*_arg0); end module GeneratedClassMethods @@ -5907,16 +6124,16 @@ module ActionController::ParamsWrapper end end -# source://actionpack//lib/action_controller/metal/params_wrapper.rb#188 +# source://actionpack//lib/action_controller/metal/params_wrapper.rb#190 module ActionController::ParamsWrapper::ClassMethods - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#189 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#191 def _set_wrapper_options(options); end # Sets the default wrapper key or model which will be used to determine # wrapper key and attribute names. Called automatically when the # module is inherited. # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#244 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#246 def inherited(klass); end # Sets the name of the wrapper key, or the model which +ParamsWrapper+ @@ -5947,56 +6164,56 @@ module ActionController::ParamsWrapper::ClassMethods # * :exclude - The list of attribute names which parameters wrapper # will exclude from a nested hash. # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#220 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#222 def wrap_parameters(name_or_model_or_options, options = T.unsafe(nil)); end end -# source://actionpack//lib/action_controller/metal/params_wrapper.rb#83 +# source://actionpack//lib/action_controller/metal/params_wrapper.rb#85 ActionController::ParamsWrapper::EXCLUDE_PARAMETERS = T.let(T.unsafe(nil), Array) -# source://actionpack//lib/action_controller/metal/params_wrapper.rb#87 +# source://actionpack//lib/action_controller/metal/params_wrapper.rb#89 class ActionController::ParamsWrapper::Options < ::Struct include ::Mutex_m # @return [Options] a new instance of Options # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#98 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#100 def initialize(name, format, include, exclude, klass, model); end # Returns the value of attribute include # # @return [Object] the current value of include # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#108 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#110 def include; end - # source://mutex_m/0.1.2/mutex_m.rb#93 + # source://mutex_m/0.2.0/lib/mutex_m.rb#91 def lock; end - # source://mutex_m/0.1.2/mutex_m.rb#83 + # source://mutex_m/0.2.0/lib/mutex_m.rb#81 def locked?; end # Returns the value of attribute model # # @return [Object] the current value of model # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#104 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#106 def model; end # Returns the value of attribute name # # @return [Object] the current value of name # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#141 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#143 def name; end - # source://mutex_m/0.1.2/mutex_m.rb#78 + # source://mutex_m/0.2.0/lib/mutex_m.rb#76 def synchronize(&block); end - # source://mutex_m/0.1.2/mutex_m.rb#88 + # source://mutex_m/0.2.0/lib/mutex_m.rb#86 def try_lock; end - # source://mutex_m/0.1.2/mutex_m.rb#98 + # source://mutex_m/0.2.0/lib/mutex_m.rb#96 def unlock; end private @@ -6009,11 +6226,11 @@ class ActionController::ParamsWrapper::Options < ::Struct # This method also does namespace lookup. Foo::Bar::UsersController will # try to find Foo::Bar::User, Foo::User and finally User. # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#165 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#167 def _default_wrap_model; end class << self - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#90 + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#92 def from_hash(hash); end end end @@ -6117,7 +6334,7 @@ module ActionController::Redirecting # * String not containing a protocol - The current protocol and host is prepended to the string. # * Proc - A block that will be executed in the controller's context. Should return any option accepted by +redirect_to+. # - # === Examples: + # === Examples # # redirect_to action: "show", id: 5 # redirect_to @post @@ -6161,8 +6378,8 @@ module ActionController::Redirecting # # === Open Redirect protection # - # By default, Rails protects against redirecting to external hosts for your app's safety, so called open redirects. - # Note: this was a new default in Rails 7.0, after upgrading opt-in by uncommenting the line with +raise_on_open_redirects+ in config/initializers/new_framework_defaults_7_0.rb + # By default, \Rails protects against redirecting to external hosts for your app's safety, so called open redirects. + # Note: this was a new default in \Rails 7.0, after upgrading opt-in by uncommenting the line with +raise_on_open_redirects+ in config/initializers/new_framework_defaults_7_0.rb # # Here #redirect_to automatically validates the potentially-unsafe URL: # @@ -6182,7 +6399,7 @@ module ActionController::Redirecting def redirect_to(options = T.unsafe(nil), response_options = T.unsafe(nil)); end # Verifies the passed +location+ is an internal URL that's safe to redirect to and returns it, or nil if not. - # Useful to wrap a params provided redirect URL and fallback to an alternate URL to redirect to: + # Useful to wrap a params provided redirect URL and fall back to an alternate URL to redirect to: # # redirect_to url_from(params[:redirect_url]) || root_url # @@ -6241,111 +6458,127 @@ module ActionController::Redirecting end end -# source://actionpack//lib/action_controller/metal/redirecting.rb#7 +# source://actionpack//lib/action_controller/metal/redirecting.rb#12 ActionController::Redirecting::ILLEGAL_HEADER_VALUE_REGEX = T.let(T.unsafe(nil), Regexp) -# source://actionpack//lib/action_controller/metal/redirecting.rb#12 +# source://actionpack//lib/action_controller/metal/redirecting.rb#10 class ActionController::Redirecting::UnsafeRedirectError < ::StandardError; end # source://actionpack//lib/action_controller/metal/exceptions.rb#14 class ActionController::RenderError < ::ActionController::ActionControllerError; end -# ActionController::Renderer allows you to render arbitrary templates -# without requirement of being in controller actions. +# = Action Controller \Renderer # -# You get a concrete renderer class by invoking ActionController::Base#renderer. -# For example: -# -# ApplicationController.renderer -# -# It allows you to call method #render directly. -# -# ApplicationController.renderer.render template: '...' -# -# You can use this shortcut in a controller, instead of the previous example: -# -# ApplicationController.render template: '...' -# -# #render allows you to use the same options that you can use when rendering in a controller. -# For example: +# ActionController::Renderer allows you to render arbitrary templates without +# being inside a controller action. # -# FooController.render :action, locals: { ... }, assigns: { ... } +# You can get a renderer instance by calling +renderer+ on a controller class: # -# The template will be rendered in a Rack environment which is accessible through -# ActionController::Renderer#env. You can set it up in two ways: +# ApplicationController.renderer +# PostsController.renderer # -# * by changing renderer defaults, like +# and render a template by calling the #render method: # -# ApplicationController.renderer.defaults # => hash with default Rack environment +# ApplicationController.renderer.render template: "posts/show", assigns: { post: Post.first } +# PostsController.renderer.render :show, assigns: { post: Post.first } # -# * by initializing an instance of renderer by passing it a custom environment. +# As a shortcut, you can also call +render+ directly on the controller class itself: # -# ApplicationController.renderer.new(method: 'post', https: true) +# ApplicationController.render template: "posts/show", assigns: { post: Post.first } +# PostsController.render :show, assigns: { post: Post.first } # -# source://actionpack//lib/action_controller/renderer.rb#36 +# source://actionpack//lib/action_controller/renderer.rb#24 class ActionController::Renderer - # Accepts a custom Rack environment to render templates in. - # It will be merged with the default Rack environment defined by - # +ActionController::Renderer::DEFAULTS+. + # Initializes a new Renderer. + # + # ==== Parameters + # + # * +controller+ - The controller class to instantiate for rendering. + # * +env+ - The Rack env to use for mocking a request when rendering. + # Entries can be typical Rack env keys and values, or they can be any of + # the following, which will be converted appropriately: + # * +:http_host+ - The HTTP host for the incoming request. Converts to + # Rack's +HTTP_HOST+. + # * +:https+ - Boolean indicating whether the incoming request uses HTTPS. + # Converts to Rack's +HTTPS+. + # * +:method+ - The HTTP method for the incoming request, case-insensitive. + # Converts to Rack's +REQUEST_METHOD+. + # * +:script_name+ - The portion of the incoming request's URL path that + # corresponds to the application. Converts to Rack's +SCRIPT_NAME+. + # * +:input+ - The input stream. Converts to Rack's +rack.input+. + # * +defaults+ - Default values for the Rack env. Entries are specified in + # the same format as +env+. +env+ will be merged on top of these values. + # +defaults+ will be retained when calling #new on a renderer instance. + # + # If no +http_host+ is specified, the env HTTP host will be derived from the + # routes' +default_url_options+. In this case, the +https+ boolean and the + # +script_name+ will also be derived from +default_url_options+ if they were + # not specified. Additionally, the +https+ boolean will fall back to + # +Rails.application.config.force_ssl+ if +default_url_options+ does not + # specify a +protocol+. # # @return [Renderer] a new instance of Renderer # - # source://actionpack//lib/action_controller/renderer.rb#65 + # source://actionpack//lib/action_controller/renderer.rb#106 def initialize(controller, env, defaults); end # Returns the value of attribute controller. # - # source://actionpack//lib/action_controller/renderer.rb#37 + # source://actionpack//lib/action_controller/renderer.rb#25 def controller; end - # Returns the value of attribute defaults. - # - # source://actionpack//lib/action_controller/renderer.rb#37 + # source://actionpack//lib/action_controller/renderer.rb#117 def defaults; end - # Create a new renderer for the same controller but with a new env. + # Creates a new renderer using the same controller, but with a new Rack env. + # + # ApplicationController.renderer.new(method: "post") # - # source://actionpack//lib/action_controller/renderer.rb#53 + # source://actionpack//lib/action_controller/renderer.rb#69 def new(env = T.unsafe(nil)); end + # source://actionpack//lib/action_controller/renderer.rb#145 + def normalize_env(env, &block); end + # Renders a template to a string, just like ActionController::Rendering#render_to_string. # - # source://actionpack//lib/action_controller/renderer.rb#72 + # source://actionpack//lib/action_controller/renderer.rb#123 def render(*args); end # Renders a template to a string, just like ActionController::Rendering#render_to_string. # - # source://actionpack//lib/action_controller/renderer.rb#72 + # source://actionpack//lib/action_controller/renderer.rb#123 def render_to_string(*args); end - # Create a new renderer for the same controller but with new defaults. + # Creates a new renderer using the same controller, but with the given + # defaults merged on top of the previous defaults. # - # source://actionpack//lib/action_controller/renderer.rb#58 + # source://actionpack//lib/action_controller/renderer.rb#75 def with_defaults(defaults); end private - # source://actionpack//lib/action_controller/renderer.rb#86 - def normalize_keys(defaults, env); end - - # source://actionpack//lib/action_controller/renderer.rb#107 - def rack_key_for(key); end - - # source://actionpack//lib/action_controller/renderer.rb#111 - def rack_value_for(key, value); end + # source://actionpack//lib/action_controller/renderer.rb#147 + def env_for_request; end class << self - # Create a new renderer instance for a specific controller class. + # Creates a new renderer using the given controller class. See ::new. # - # source://actionpack//lib/action_controller/renderer.rb#48 + # source://actionpack//lib/action_controller/renderer.rb#61 def for(controller, env = T.unsafe(nil), defaults = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/renderer.rb#32 + def normalize_env(env); end end end -# source://actionpack//lib/action_controller/renderer.rb#39 +# source://actionpack//lib/action_controller/renderer.rb#27 ActionController::Renderer::DEFAULTS = T.let(T.unsafe(nil), Hash) -# source://actionpack//lib/action_controller/renderer.rb#99 +# source://actionpack//lib/action_controller/renderer.rb#143 +ActionController::Renderer::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_controller/renderer.rb#135 ActionController::Renderer::RACK_KEY_TRANSLATION = T.let(T.unsafe(nil), Hash) # source://actionpack//lib/action_controller/metal/renderers.rb#23 @@ -6397,7 +6630,7 @@ module ActionController::Renderers # disposition: "attachment; filename=#{filename}.csv" # end # - # Note that we used Mime[:csv] for the csv mime type as it comes with Rails. + # Note that we used Mime[:csv] for the csv mime type as it comes with \Rails. # For a custom renderer, you'll need to register a mime type with # Mime::Type.register. # @@ -6472,7 +6705,7 @@ module ActionController::Renderers::ClassMethods # # Both ActionController::Base and ActionController::API # include ActionController::Renderers::All, making all renderers - # available in the controller. See Renderers::RENDERERS and Renderers.add. + # available in the controller. See Renderers::RENDERERS and Renderers.add. # # Since ActionController::Metal controllers cannot render, the controller # must include AbstractController::Rendering, ActionController::Rendering, @@ -6509,7 +6742,7 @@ module ActionController::Renderers::ClassMethods # # Both ActionController::Base and ActionController::API # include ActionController::Renderers::All, making all renderers - # available in the controller. See Renderers::RENDERERS and Renderers.add. + # available in the controller. See Renderers::RENDERERS and Renderers.add. # # Since ActionController::Metal controllers cannot render, the controller # must include AbstractController::Rendering, ActionController::Rendering, @@ -6680,22 +6913,17 @@ module ActionController::Rendering private - # Normalize arguments by catching blocks and setting them on :update. - # - # source://actionpack//lib/action_controller/metal/rendering.rb#199 - def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil), &blk); end - # Normalize both text and status options. # - # source://actionpack//lib/action_controller/metal/rendering.rb#206 + # source://actionpack//lib/action_controller/metal/rendering.rb#199 def _normalize_options(options); end - # source://actionpack//lib/action_controller/metal/rendering.rb#220 + # source://actionpack//lib/action_controller/metal/rendering.rb#213 def _normalize_text(options); end # Process controller specific options, as status, content-type and location. # - # source://actionpack//lib/action_controller/metal/rendering.rb#229 + # source://actionpack//lib/action_controller/metal/rendering.rb#222 def _process_options(options); end # source://actionpack//lib/action_controller/metal/rendering.rb#168 @@ -6740,6 +6968,8 @@ end # source://actionpack//lib/action_controller/metal/rendering.rb#7 ActionController::Rendering::RENDER_FORMATS_IN_PRIORITY = T.let(T.unsafe(nil), Array) +# = Action Controller Request Forgery Protection +# # Controller actions are protected from Cross-Site Request Forgery (CSRF) attacks # by including a token in the rendered HTML for your application. This token is # stored as a random string in the session, to which an attacker does not have @@ -6763,10 +6993,10 @@ ActionController::Rendering::RENDER_FORMATS_IN_PRIORITY = T.let(T.unsafe(nil), A # # Subclasses of ActionController::Base are protected by default with the # :exception strategy, which raises an -# ActionController::InvalidAuthenticityToken error on unverified requests. +# ActionController::InvalidAuthenticityToken error on unverified requests. # # APIs may want to disable this behavior since they are typically designed to be -# state-less: that is, the request API client handles the session instead of Rails. +# state-less: that is, the request API client handles the session instead of \Rails. # One way to achieve this is to use the :null_session strategy instead, # which allows unverified requests to be handled, but with an empty session: # @@ -6784,7 +7014,7 @@ ActionController::Rendering::RENDER_FORMATS_IN_PRIORITY = T.let(T.unsafe(nil), A # Learn more about CSRF attacks and securing your application in the # {Ruby on Rails Security Guide}[https://guides.rubyonrails.org/security.html]. # -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#57 +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#59 module ActionController::RequestForgeryProtection extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -6799,52 +7029,61 @@ module ActionController::RequestForgeryProtection mixes_in_class_methods ::AbstractController::Callbacks::ClassMethods mixes_in_class_methods ::ActionController::RequestForgeryProtection::ClassMethods + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#345 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#355 + def commit_csrf_token(request); end + + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#350 + def reset_csrf_token(request); end + private # Checks if any of the authenticity tokens from the request are valid. # # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#346 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#448 def any_authenticity_token_valid?; end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#432 - def compare_with_global_token(token, session); end + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#534 + def compare_with_global_token(token, session = T.unsafe(nil)); end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#428 - def compare_with_real_token(token, session); end + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#530 + def compare_with_real_token(token, session = T.unsafe(nil)); end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#466 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#571 def csrf_token_hmac(session, identifier); end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#537 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#634 def decode_csrf_token(encoded_csrf_token); end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#529 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#630 def encode_csrf_token(csrf_token); end # The form's authenticity parameter. Override to provide your own. # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#486 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#591 def form_authenticity_param; end # Creates the authenticity token for the current request. # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#358 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#460 def form_authenticity_token(form_options: T.unsafe(nil)); end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#521 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#626 def generate_csrf_token; end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#462 - def global_csrf_token(session); end + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#567 + def global_csrf_token(session = T.unsafe(nil)); end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#279 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#381 def handle_unverified_request; end # GET requests are checked for cross-origin JavaScript after rendering. # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#318 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#420 def mark_for_same_origin_verification!; end # If the +verify_authenticity_token+ before_action ran, verify that @@ -6852,51 +7091,51 @@ module ActionController::RequestForgeryProtection # # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#324 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#426 def marked_for_same_origin_verification?; end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#421 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#523 def mask_token(raw_token); end # Creates a masked version of the authenticity token that varies # on each request. The masking is used to mitigate SSL attacks # like BREACH. # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#365 - def masked_authenticity_token(session, form_options: T.unsafe(nil)); end + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#467 + def masked_authenticity_token(form_options: T.unsafe(nil)); end # Check for cross-origin JavaScript responses. # # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#329 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#431 def non_xhr_javascript_response?; end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#516 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#621 def normalize_action_path(action_path); end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#455 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#560 def per_form_csrf_token(session, action_path, method); end # Checks if the controller allows forgery protection. # # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#491 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#596 def protect_against_forgery?; end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#450 - def real_csrf_token(session); end + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#552 + def real_csrf_token(_session = T.unsafe(nil)); end # Possible authenticity tokens sent in the request. # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#353 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#455 def request_authenticity_tokens; end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#413 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#515 def unmask_token(masked_token); end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#289 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#391 def unverified_request_warning_message; end # Checks the client's masked token to see if it matches the @@ -6905,20 +7144,20 @@ module ActionController::RequestForgeryProtection # # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#381 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#483 def valid_authenticity_token?(session, encoded_masked_token); end # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#436 - def valid_per_form_csrf_token?(token, session); end + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#538 + def valid_per_form_csrf_token?(token, session = T.unsafe(nil)); end # Checks if the request originated from the same origin by looking at the # Origin header. # # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#506 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#611 def valid_request_origin?; end # Returns true or false if a request is verified. Checks: @@ -6929,7 +7168,7 @@ module ActionController::RequestForgeryProtection # # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#340 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#442 def verified_request?; end # The actual before_action that is used to verify the CSRF token. @@ -6943,17 +7182,17 @@ module ActionController::RequestForgeryProtection # verify that JavaScript responses are for XHR requests, ensuring they # follow the browser's same-origin policy. # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#269 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#371 def verify_authenticity_token; end # If +verify_authenticity_token+ was run (indicating that we have # forgery protection enabled for this request) then also verify that # we aren't serving an unauthorized cross-origin response. # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#308 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#410 def verify_same_origin_request; end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#474 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#579 def xor_byte_strings(s1, s2); end module GeneratedClassMethods @@ -6974,13 +7213,16 @@ module ActionController::RequestForgeryProtection end end -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#333 +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#435 ActionController::RequestForgeryProtection::AUTHENTICITY_TOKEN_LENGTH = T.let(T.unsafe(nil), Integer) -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#298 +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#400 ActionController::RequestForgeryProtection::CROSS_ORIGIN_JAVASCRIPT_WARNING = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#110 +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#60 +ActionController::RequestForgeryProtection::CSRF_TOKEN = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#105 module ActionController::RequestForgeryProtection::ClassMethods # Turn on request forgery protection. Bear in mind that GET and HEAD requests are not checked. # @@ -7008,6 +7250,7 @@ module ActionController::RequestForgeryProtection::ClassMethods # # If you need to add verification to the beginning of the callback chain, use prepend: true. # * :with - Set the method to handle unverified request. + # Note if default_protect_from_forgery is true, Rails call protect_from_forgery with with :exception. # # Built-in unverified request handling methods are: # * :exception - Raises ActionController::InvalidAuthenticityToken exception. @@ -7022,15 +7265,40 @@ module ActionController::RequestForgeryProtection::ClassMethods # end # # def handle_unverified_request - # # Custom behaviour for unverfied request + # # Custom behavior for unverfied request # end # end # - # class ApplicationController < ActionController:x:Base + # class ApplicationController < ActionController::Base # protect_from_forgery with: CustomStrategy # end + # * :store - Set the strategy to store and retrieve CSRF tokens. + # + # Built-in session token strategies are: + # * :session - Store the CSRF token in the session. Used as default if :store option is not specified. + # * :cookie - Store the CSRF token in an encrypted cookie. + # + # You can also implement custom strategy classes for CSRF token storage: + # + # class CustomStore + # def fetch(request) + # # Return the token from a custom location + # end + # + # def store(request, csrf_token) + # # Store the token in a custom location + # end + # + # def reset(request) + # # Delete the stored session token + # end + # end # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#158 + # class ApplicationController < ActionController::Base + # protect_from_forgery store: CustomStore.new + # end + # + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#179 def protect_from_forgery(options = T.unsafe(nil)); end # Turn off request forgery protection. This is a wrapper for: @@ -7039,108 +7307,147 @@ module ActionController::RequestForgeryProtection::ClassMethods # # See +skip_before_action+ for allowed options. # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#172 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#196 def skip_forgery_protection(options = T.unsafe(nil)); end private - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#177 + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#228 + def is_storage_strategy?(object); end + + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#201 def protection_method_class(name); end + + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#216 + def storage_strategy(name); end +end + +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#312 +class ActionController::RequestForgeryProtection::CookieStore + # @return [CookieStore] a new instance of CookieStore + # + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#313 + def initialize(cookie = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#317 + def fetch(request); end + + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#340 + def reset(request); end + + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#329 + def store(request, csrf_token); end end -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#459 +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#564 ActionController::RequestForgeryProtection::GLOBAL_CSRF_TOKEN_IDENTIFIER = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#495 +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#600 ActionController::RequestForgeryProtection::NULL_ORIGIN_MESSAGE = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#193 +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#233 module ActionController::RequestForgeryProtection::ProtectionMethods; end -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#245 +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#285 class ActionController::RequestForgeryProtection::ProtectionMethods::Exception # @return [Exception] a new instance of Exception # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#248 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#288 def initialize(controller); end # @raise [ActionController::InvalidAuthenticityToken] # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#252 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#292 def handle_unverified_request; end # Returns the value of attribute warning_message. # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#246 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#286 def warning_message; end # Sets the attribute warning_message # # @param value the value to set the attribute warning_message to. # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#246 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#286 def warning_message=(_arg0); end end -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#194 +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#234 class ActionController::RequestForgeryProtection::ProtectionMethods::NullSession # @return [NullSession] a new instance of NullSession # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#195 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#235 def initialize(controller); end # This is the method that defines the application behavior when a request is found to be unverified. # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#200 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#240 def handle_unverified_request; end end -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#228 +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#268 class ActionController::RequestForgeryProtection::ProtectionMethods::NullSession::NullCookieJar < ::ActionDispatch::Cookies::CookieJar - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#229 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#269 def write(*_arg0); end end -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#209 +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#249 class ActionController::RequestForgeryProtection::ProtectionMethods::NullSession::NullSessionHash < ::Rack::Session::Abstract::SessionHash # @return [NullSessionHash] a new instance of NullSessionHash # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#210 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#250 def initialize(req); end # no-op # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#217 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#257 def destroy; end # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#223 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#263 def enabled?; end # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#219 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#259 def exists?; end end -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#235 +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#275 class ActionController::RequestForgeryProtection::ProtectionMethods::ResetSession # @return [ResetSession] a new instance of ResetSession # - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#236 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#276 def initialize(controller); end - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#240 + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#280 def handle_unverified_request; end end +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#298 +class ActionController::RequestForgeryProtection::SessionStore + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#299 + def fetch(request); end + + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#307 + def reset(request); end + + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#303 + def store(request, csrf_token); end +end + +# = Action Controller \Rescue +# # This module is responsible for providing # {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from] # to controllers, wrapping actions to handle configured errors, and # configuring when detailed exceptions must be shown. # -# source://actionpack//lib/action_controller/metal/rescue.rb#8 +# source://actionpack//lib/action_controller/metal/rescue.rb#10 module ActionController::Rescue extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -7157,12 +7464,12 @@ module ActionController::Rescue # # @return [Boolean] # - # source://actionpack//lib/action_controller/metal/rescue.rb#17 + # source://actionpack//lib/action_controller/metal/rescue.rb#19 def show_detailed_exceptions?; end private - # source://actionpack//lib/action_controller/metal/rescue.rb#22 + # source://actionpack//lib/action_controller/metal/rescue.rb#24 def process_action(*_arg0); end module GeneratedClassMethods @@ -7224,28 +7531,25 @@ end # source://actionpack//lib/action_controller/metal/exceptions.rb#63 ActionController::SessionOverflowError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), String) +# = Action Controller \Streaming +# # Allows views to be streamed back to the client as they are rendered. # -# By default, Rails renders views by first rendering the template +# By default, \Rails renders views by first rendering the template # and then the layout. The response is sent to the client after the whole # template is rendered, all queries are made, and the layout is processed. # -# Streaming inverts the rendering flow by rendering the layout first and -# streaming each part of the layout as they are processed. This allows the +# \Streaming inverts the rendering flow by rendering the layout first and +# subsequently each part of the layout as they are processed. This allows the # header of the HTML (which is usually in the layout) to be streamed back -# to client very quickly, allowing JavaScripts and stylesheets to be loaded +# to client very quickly, enabling JavaScripts and stylesheets to be loaded # earlier than usual. # -# This approach was introduced in Rails 3.1 and is still improving. Several -# Rack middlewares may not work and you need to be careful when streaming. -# Those points are going to be addressed soon. +# Several Rack middlewares may not work and you need to be careful when streaming. +# This is covered in more detail below, see the Streaming@Middlewares section. # -# In order to use streaming, you will need to use a Ruby version that -# supports fibers (fibers are supported since version 1.9.2 of the main -# Ruby implementation). -# -# Streaming can be added to a given template easily, all you need to do is -# to pass the +:stream+ option. +# \Streaming can be added to a given template easily, all you need to do is +# to pass the +:stream+ option to +render+. # # class PostsController # def index @@ -7256,7 +7560,7 @@ ActionController::SessionOverflowError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), S # # == When to use streaming # -# Streaming may be considered to be overkill for lightweight actions like +# \Streaming may be considered to be overkill for lightweight actions like # +new+ or +edit+. The real benefit of streaming is on expensive actions # that, for example, do a lot of queries on the database. # @@ -7280,13 +7584,13 @@ ActionController::SessionOverflowError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), S # render stream: true # end # -# Notice that +:stream+ only works with templates. Rendering +:json+ +# Notice that +:stream+ only works with templates. \Rendering +:json+ # or +:xml+ with +:stream+ won't work. # # == Communication between layout and template # # When streaming, rendering happens top-down instead of inside-out. -# Rails starts with the layout, and the template is rendered later, +# \Rails starts with the layout, and the template is rendered later, # when its +yield+ is reached. # # This means that, if your application currently relies on instance @@ -7333,7 +7637,7 @@ ActionController::SessionOverflowError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), S # This means that, if you have yield :title in your layout # and you want to use streaming, you would have to render the whole template # (and eventually trigger all queries) before streaming the title and all -# assets, which kills the purpose of streaming. For this purpose, you can use +# assets, which defeats the purpose of streaming. Alternatively, you can use # a helper called +provide+ that does the same as +content_for+ but tells the # layout to stop searching for other entries and continue rendering. # @@ -7343,7 +7647,7 @@ ActionController::SessionOverflowError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), S # Hello # <%= content_for :title, " page" %> # -# Giving: +# Resulting in: # # # Main @@ -7353,6 +7657,8 @@ ActionController::SessionOverflowError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), S # That said, when streaming, you need to properly check your templates # and choose when to use +provide+ and +content_for+. # +# See also ActionView::Helpers::CaptureHelper for more information. +# # == Headers, cookies, session, and flash # # When streaming, the HTTP headers are sent to the client right before @@ -7364,10 +7670,10 @@ ActionController::SessionOverflowError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), S # # Middlewares that need to manipulate the body won't work with streaming. # You should disable those middlewares whenever streaming in development -# or production. For instance, Rack::Bug won't work when streaming as it +# or production. For instance, +Rack::Bug+ won't work when streaming as it # needs to inject contents in the HTML body. # -# Also Rack::Cache won't work with streaming as it does not support +# Also +Rack::Cache+ won't work with streaming as it does not support # streaming bodies yet. Whenever streaming +Cache-Control+ is automatically # set to "no-cache". # @@ -7377,14 +7683,14 @@ ActionController::SessionOverflowError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), S # happens because part of the template was already rendered and streamed to # the client, making it impossible to render a whole exception page. # -# Currently, when an exception happens in development or production, Rails +# Currently, when an exception happens in development or production, \Rails # will automatically stream to the client: # # "> # -# The first two characters (">) are required in case the exception happens -# while rendering attributes for a given tag. You can check the real cause -# for the exception in your logger. +# The first two characters (">) are required in case the exception +# happens while rendering attributes for a given tag. You can check the real +# cause for the exception in your logger. # # == Web server support # @@ -7404,31 +7710,74 @@ ActionController::SessionOverflowError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), S # unicorn_rails --config-file unicorn.config.rb # # You may also want to configure other parameters like :tcp_nodelay. -# Please check its documentation for more information: https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-listen +# +# For more information, please check the +# {documentation}[https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-listen]. # # If you are using Unicorn with NGINX, you may need to tweak NGINX. -# Streaming should work out of the box on Rainbows. +# \Streaming should work out of the box on Rainbows. # # ==== Passenger # -# To be described. +# Phusion Passenger with NGINX, offers two streaming mechanisms out of the box. +# +# 1. NGINX response buffering mechanism which is dependent on the value of +# +passenger_buffer_response+ option (default is "off"). +# 2. Passenger buffering system which is always 'on' irrespective of the value +# of +passenger_buffer_response+. +# +# When +passenger_buffer_response+ is turned "on", then streaming would be +# done at the NGINX level which waits until the application is done sending +# the response back to the client. +# +# For more information, please check the +# {documentation}[https://www.phusionpassenger.com/docs/references/config_reference/nginx/#passenger_buffer_response]. # -# source://actionpack//lib/action_controller/metal/streaming.rb#195 +# source://actionpack//lib/action_controller/metal/streaming.rb#206 module ActionController::Streaming private # Set proper cache control and transfer encoding when streaming # - # source://actionpack//lib/action_controller/metal/streaming.rb#198 + # source://actionpack//lib/action_controller/metal/streaming.rb#238 def _process_options(options); end # Call render_body if we are streaming instead of usual +render+. # - # source://actionpack//lib/action_controller/metal/streaming.rb#212 + # source://actionpack//lib/action_controller/metal/streaming.rb#252 def _render_template(options); end end -# == Strong \Parameters +# source://actionpack//lib/action_controller/metal/streaming.rb#207 +class ActionController::Streaming::Body + # Store the response body to be chunked. + # + # @return [Body] a new instance of Body + # + # source://actionpack//lib/action_controller/metal/streaming.rb#212 + def initialize(body); end + + # Close the response body if the response body supports it. + # + # source://actionpack//lib/action_controller/metal/streaming.rb#231 + def close; end + + # For each element yielded by the response body, yield + # the element in chunked encoding. + # + # @yield [TAIL] + # + # source://actionpack//lib/action_controller/metal/streaming.rb#218 + def each(&block); end +end + +# source://actionpack//lib/action_controller/metal/streaming.rb#209 +ActionController::Streaming::Body::TAIL = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_controller/metal/streaming.rb#208 +ActionController::Streaming::Body::TERM = T.let(T.unsafe(nil), String) + +# = Strong \Parameters # # It provides an interface for protecting attributes from end-user # assignment. This makes Action Controller parameters forbidden @@ -7497,19 +7846,19 @@ end # See ActionController::Parameters.require and ActionController::Parameters.permit # for more information. # -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1198 +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1278 module ActionController::StrongParameters # Returns a new ActionController::Parameters object that # has been instantiated with the request.parameters. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1201 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1281 def params; end # Assigns the given +value+ to the +params+ hash. If +value+ # is a Hash, this will create an ActionController::Parameters # object that has been instantiated with the given +value+ hash. # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1216 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1296 def params=(value); end end @@ -7521,15 +7870,17 @@ module ActionController::TemplateAssertions def assert_template(options = T.unsafe(nil), message = T.unsafe(nil)); end end +# = Action Controller Test Case +# # Superclass for ActionController functional tests. Functional tests allow you to # test a single controller action per test method. # # == Use integration style controller tests over functional style controller tests. # -# Rails discourages the use of functional tests in favor of integration tests +# \Rails discourages the use of functional tests in favor of integration tests # (use ActionDispatch::IntegrationTest). # -# New Rails applications no longer generate functional style controller tests and they should +# New \Rails applications no longer generate functional style controller tests and they should # only be used for backward compatibility. Integration style controller tests perform actual # requests, whereas functional style controller tests merely simulate a request. Besides, # integration tests are as fast as functional tests and provide lot of helpers such as +as+, @@ -7630,84 +7981,85 @@ end # # assert_redirected_to page_url(title: 'foo') # -# source://actionpack//lib/action_controller/test_case.rb#335 +# source://actionpack//lib/action_controller/test_case.rb#345 class ActionController::TestCase < ::ActiveSupport::TestCase include ::ActiveSupport::Testing::ConstantLookup include ::ActionDispatch::TestProcess::FixtureFile include ::ActionDispatch::TestProcess include ::ActionDispatch::Assertions::ResponseAssertions - include ::ActionDispatch::Assertions::RoutingAssertions include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable include ::Rails::Dom::Testing::Assertions::SelectorAssertions include ::Rails::Dom::Testing::Assertions include ::ActionController::TestCase::Behavior include ::ActionController::TemplateAssertions + include ::ActionDispatch::Assertions::RoutingAssertions include ::ActionDispatch::Assertions extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods extend ::ActionController::TestCase::Behavior::ClassMethods + extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods - # source://actionpack//lib/action_controller/test_case.rb#561 + # source://actionpack//lib/action_controller/test_case.rb#571 def _controller_class; end - # source://actionpack//lib/action_controller/test_case.rb#561 + # source://actionpack//lib/action_controller/test_case.rb#571 def _controller_class=(_arg0); end - # source://actionpack//lib/action_controller/test_case.rb#561 + # source://actionpack//lib/action_controller/test_case.rb#571 def _controller_class?; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack//lib/action_controller/test_case.rb#561 + # source://actionpack//lib/action_controller/test_case.rb#571 def _controller_class; end - # source://actionpack//lib/action_controller/test_case.rb#561 + # source://actionpack//lib/action_controller/test_case.rb#571 def _controller_class=(value); end - # source://actionpack//lib/action_controller/test_case.rb#561 + # source://actionpack//lib/action_controller/test_case.rb#571 def _controller_class?; end - # source://actionpack//lib/action_controller/test_case.rb#336 + # source://actionpack//lib/action_controller/test_case.rb#346 def executor_around_each_request; end - # source://actionpack//lib/action_controller/test_case.rb#336 + # source://actionpack//lib/action_controller/test_case.rb#346 def executor_around_each_request=(_arg0); end end end -# source://actionpack//lib/action_controller/test_case.rb#338 +# source://actionpack//lib/action_controller/test_case.rb#348 module ActionController::TestCase::Behavior include ::ActionDispatch::TestProcess::FixtureFile include ::ActionDispatch::TestProcess include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable include ::Rails::Dom::Testing::Assertions::SelectorAssertions include ::Rails::Dom::Testing::Assertions extend ::ActiveSupport::Concern include GeneratedInstanceMethods include ::ActiveSupport::Testing::ConstantLookup include ::ActionController::TemplateAssertions + include ::ActionDispatch::Assertions::RoutingAssertions include ::ActionDispatch::Assertions mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods mixes_in_class_methods ::ActionController::TestCase::Behavior::ClassMethods + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods - # source://actionpack//lib/action_controller/test_case.rb#554 + # source://actionpack//lib/action_controller/test_case.rb#564 def build_response(klass); end - # source://actionpack//lib/action_controller/test_case.rb#514 + # source://actionpack//lib/action_controller/test_case.rb#524 def controller_class_name; end # Simulate a DELETE request with the given parameters and set/volley the response. # See +get+ for more details. # - # source://actionpack//lib/action_controller/test_case.rb#429 + # source://actionpack//lib/action_controller/test_case.rb#439 def delete(action, **args); end - # source://actionpack//lib/action_controller/test_case.rb#518 + # source://actionpack//lib/action_controller/test_case.rb#528 def generated_path(generated_extras); end # Simulate a GET request with the given parameters. @@ -7731,25 +8083,25 @@ module ActionController::TestCase::Behavior # Note that the request method is not verified. The different methods are # available to make the tests more expressive. # - # source://actionpack//lib/action_controller/test_case.rb#403 + # source://actionpack//lib/action_controller/test_case.rb#413 def get(action, **args); end # Simulate a HEAD request with the given parameters and set/volley the response. # See +get+ for more details. # - # source://actionpack//lib/action_controller/test_case.rb#435 + # source://actionpack//lib/action_controller/test_case.rb#445 def head(action, **args); end # Simulate a PATCH request with the given parameters and set/volley the response. # See +get+ for more details. # - # source://actionpack//lib/action_controller/test_case.rb#417 + # source://actionpack//lib/action_controller/test_case.rb#427 def patch(action, **args); end # Simulate a POST request with the given parameters and set/volley the response. # See +get+ for more details. # - # source://actionpack//lib/action_controller/test_case.rb#411 + # source://actionpack//lib/action_controller/test_case.rb#421 def post(action, **args); end # Simulate an HTTP request to +action+ by specifying request method, @@ -7783,54 +8135,54 @@ module ActionController::TestCase::Behavior # # It's not recommended to make more than one request in the same test. Instance # variables that are set in one request will not persist to the next request, - # but it's not guaranteed that all Rails internal state will be reset. Prefer + # but it's not guaranteed that all \Rails internal state will be reset. Prefer # ActionDispatch::IntegrationTest for making multiple requests in the same test. # # Note that the request method is not verified. # - # source://actionpack//lib/action_controller/test_case.rb#474 + # source://actionpack//lib/action_controller/test_case.rb#484 def process(action, method: T.unsafe(nil), params: T.unsafe(nil), session: T.unsafe(nil), body: T.unsafe(nil), flash: T.unsafe(nil), format: T.unsafe(nil), xhr: T.unsafe(nil), as: T.unsafe(nil)); end # Simulate a PUT request with the given parameters and set/volley the response. # See +get+ for more details. # - # source://actionpack//lib/action_controller/test_case.rb#423 + # source://actionpack//lib/action_controller/test_case.rb#433 def put(action, **args); end - # source://actionpack//lib/action_controller/test_case.rb#522 + # source://actionpack//lib/action_controller/test_case.rb#532 def query_parameter_names(generated_extras); end # Returns the value of attribute request. # - # source://actionpack//lib/action_controller/test_case.rb#344 + # source://actionpack//lib/action_controller/test_case.rb#354 def request; end # Returns the value of attribute response. # - # source://actionpack//lib/action_controller/test_case.rb#344 + # source://actionpack//lib/action_controller/test_case.rb#354 def response; end - # source://actionpack//lib/action_controller/test_case.rb#526 + # source://actionpack//lib/action_controller/test_case.rb#536 def setup_controller_request_and_response; end private - # source://actionpack//lib/action_controller/test_case.rb#646 + # source://actionpack//lib/action_controller/test_case.rb#656 def check_required_ivars; end - # source://actionpack//lib/action_controller/test_case.rb#642 + # source://actionpack//lib/action_controller/test_case.rb#652 def document_root_element; end - # source://actionpack//lib/action_controller/test_case.rb#597 + # source://actionpack//lib/action_controller/test_case.rb#607 def process_controller_response(action, cookies, xhr); end - # source://actionpack//lib/action_controller/test_case.rb#632 + # source://actionpack//lib/action_controller/test_case.rb#642 def scrub_env!(env); end - # source://actionpack//lib/action_controller/test_case.rb#567 + # source://actionpack//lib/action_controller/test_case.rb#577 def setup_request(controller_class_name, action, parameters, session, flash, xhr); end - # source://actionpack//lib/action_controller/test_case.rb#589 + # source://actionpack//lib/action_controller/test_case.rb#599 def wrap_execution(&block); end module GeneratedClassMethods @@ -7846,15 +8198,15 @@ module ActionController::TestCase::Behavior end end -# source://actionpack//lib/action_controller/test_case.rb#346 +# source://actionpack//lib/action_controller/test_case.rb#356 module ActionController::TestCase::Behavior::ClassMethods - # source://actionpack//lib/action_controller/test_case.rb#368 + # source://actionpack//lib/action_controller/test_case.rb#378 def controller_class; end - # source://actionpack//lib/action_controller/test_case.rb#364 + # source://actionpack//lib/action_controller/test_case.rb#374 def controller_class=(new_class); end - # source://actionpack//lib/action_controller/test_case.rb#376 + # source://actionpack//lib/action_controller/test_case.rb#386 def determine_default_controller_class(name); end # Sets the controller class name. Useful if the name can't be inferred from test class. @@ -7864,7 +8216,7 @@ module ActionController::TestCase::Behavior::ClassMethods # tests :widget # tests 'widget' # - # source://actionpack//lib/action_controller/test_case.rb#353 + # source://actionpack//lib/action_controller/test_case.rb#363 def tests(controller_class); end end @@ -7894,7 +8246,7 @@ class ActionController::TestRequest < ::ActionDispatch::TestRequest private - # source://actionpack//lib/action_controller/test_case.rb#164 + # source://actionpack//lib/action_controller/test_case.rb#167 def params_parsers; end class << self @@ -7916,50 +8268,53 @@ end # source://actionpack//lib/action_controller/test_case.rb#35 ActionController::TestRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) -# source://actionpack//lib/action_controller/test_case.rb#136 +# source://actionpack//lib/action_controller/test_case.rb#139 ActionController::TestRequest::ENCODER = T.let(T.unsafe(nil), T.untyped) # Methods #destroy and #load! are overridden to avoid calling methods on the # -# source://actionpack//lib/action_controller/test_case.rb#182 +# source://actionpack//lib/action_controller/test_case.rb#185 class ActionController::TestSession < ::Rack::Session::Abstract::PersistedSecure::SecureSessionHash # @return [TestSession] a new instance of TestSession # - # source://actionpack//lib/action_controller/test_case.rb#185 - def initialize(session = T.unsafe(nil)); end + # source://actionpack//lib/action_controller/test_case.rb#188 + def initialize(session = T.unsafe(nil), id = T.unsafe(nil)); end - # source://actionpack//lib/action_controller/test_case.rb#204 + # source://actionpack//lib/action_controller/test_case.rb#208 def destroy; end - # source://actionpack//lib/action_controller/test_case.rb#208 + # source://actionpack//lib/action_controller/test_case.rb#212 def dig(*keys); end # @return [Boolean] # - # source://actionpack//lib/action_controller/test_case.rb#217 + # source://actionpack//lib/action_controller/test_case.rb#221 def enabled?; end # @return [Boolean] # - # source://actionpack//lib/action_controller/test_case.rb#192 + # source://actionpack//lib/action_controller/test_case.rb#196 def exists?; end - # source://actionpack//lib/action_controller/test_case.rb#213 + # source://actionpack//lib/action_controller/test_case.rb#217 def fetch(key, *args, &block); end - # source://actionpack//lib/action_controller/test_case.rb#196 - def keys; end + # source://actionpack//lib/action_controller/test_case.rb#225 + def id_was; end # source://actionpack//lib/action_controller/test_case.rb#200 + def keys; end + + # source://actionpack//lib/action_controller/test_case.rb#204 def values; end private - # source://actionpack//lib/action_controller/test_case.rb#222 + # source://actionpack//lib/action_controller/test_case.rb#230 def load!; end end -# source://actionpack//lib/action_controller/test_case.rb#183 +# source://actionpack//lib/action_controller/test_case.rb#186 ActionController::TestSession::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) # source://actionpack//lib/action_controller/metal/testing.rb#4 @@ -7983,11 +8338,11 @@ end # params.to_h # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash # -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#61 +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#62 class ActionController::UnfilteredParameters < ::ArgumentError # @return [UnfilteredParameters] a new instance of UnfilteredParameters # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#62 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#63 def initialize; end end @@ -8005,17 +8360,19 @@ class ActionController::UnknownHttpMethod < ::ActionController::ActionController # params.permit(:c) # # => ActionController::UnpermittedParameters: found unpermitted parameters: :a, :b # -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#46 +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#47 class ActionController::UnpermittedParameters < ::IndexError # @return [UnpermittedParameters] a new instance of UnpermittedParameters # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#49 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#50 def initialize(params); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#47 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#48 def params; end end +# = Action Controller \UrlFor +# # Includes +url_for+ into the host class. The class has to provide a +RouteSet+ by implementing # the _routes method. Otherwise, an exception will be raised. # @@ -8036,7 +8393,7 @@ end # end # end # -# source://actionpack//lib/action_controller/metal/url_for.rb#23 +# source://actionpack//lib/action_controller/metal/url_for.rb#25 module ActionController::UrlFor extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -8046,7 +8403,10 @@ module ActionController::UrlFor mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods - # source://actionpack//lib/action_controller/metal/url_for.rb#28 + # source://actionpack//lib/action_controller/metal/url_for.rb#30 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/url_for.rb#35 def url_options; end module GeneratedClassMethods @@ -8090,56 +8450,72 @@ class ActionController::UrlGenerationError < ::ActionController::ActionControlle def routes; end end -# source://actionpack//lib/action_dispatch.rb#37 +# = Action Dispatch +# +# Action Dispatch is a module of Action Pack. +# +# Action Dispatch parses information about the web request, handles +# routing as defined by the user, and does advanced processing related to HTTP +# such as MIME-type negotiation, decoding parameters in POST, PATCH, or PUT +# bodies, handling HTTP caching logic, cookies and sessions. +# +# source://actionpack//lib/action_dispatch/deprecator.rb#3 module ActionDispatch + include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor extend ::ActiveSupport::Autoload - # source://actionpack//lib/action_dispatch.rb#99 + # source://actionpack//lib/action_dispatch.rb#141 + def eager_load!; end + + # source://actionpack//lib/action_dispatch.rb#127 def test_app; end - # source://actionpack//lib/action_dispatch.rb#99 + # source://actionpack//lib/action_dispatch.rb#127 def test_app=(val); end class << self - # source://actionpack//lib/action_dispatch.rb#99 + # source://actionpack//lib/action_dispatch/deprecator.rb#4 + def deprecator; end + + # source://actionpack//lib/action_dispatch.rb#127 def test_app; end - # source://actionpack//lib/action_dispatch.rb#99 + # source://actionpack//lib/action_dispatch.rb#127 def test_app=(val); end end end -# source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#8 +# source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#7 class ActionDispatch::ActionableExceptions # @return [ActionableExceptions] a new instance of ActionableExceptions # - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#11 + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#10 def initialize(app); end - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#15 + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#14 def call(env); end - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#8 def endpoint; end - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#8 def endpoint=(val); end private # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#25 + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#24 def actionable_request?(request); end - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#29 + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#28 def redirect_to(location); end class << self - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#8 def endpoint; end - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#8 def endpoint=(val); end end end @@ -8188,13 +8564,15 @@ ActionDispatch::AssertionResponse::GENERIC_RESPONSE_CODES = T.let(T.unsafe(nil), # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#4 module ActionDispatch::Assertions include ::ActionDispatch::Assertions::ResponseAssertions - include ::ActionDispatch::Assertions::RoutingAssertions include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable include ::Rails::Dom::Testing::Assertions::SelectorAssertions include ::Rails::Dom::Testing::Assertions + extend ::ActiveSupport::Concern + include ::ActionDispatch::Assertions::RoutingAssertions + + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods - # source://actionpack//lib/action_dispatch/testing/assertions.rb#13 + # source://actionpack//lib/action_dispatch/testing/assertions.rb#15 def html_document; end end @@ -8216,8 +8594,12 @@ module ActionDispatch::Assertions::ResponseAssertions # # Asserts that the redirection matches the regular expression # assert_redirected_to %r(\Ahttp://example.org) # - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#53 - def assert_redirected_to(options = T.unsafe(nil), message = T.unsafe(nil)); end + # # Asserts that the redirection has the HTTP status code 301 (Moved + # # Permanently). + # assert_redirected_to "/some/path", status: :moved_permanently + # + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#57 + def assert_redirected_to(url_options = T.unsafe(nil), options = T.unsafe(nil), message = T.unsafe(nil)); end # Asserts that the response is one of the following types: # @@ -8241,24 +8623,24 @@ module ActionDispatch::Assertions::ResponseAssertions private - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#95 + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#102 def code_with_name(code_or_name); end - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#79 + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#86 def generate_response_message(expected, actual = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#89 + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#96 def location_if_redirected; end - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#70 + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#77 def normalize_argument_to_redirection(fragment); end # Proxy to to_param if the object will respond to it. # - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#66 + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#73 def parameterize(value); end - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#84 + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#91 def response_body_if_short; end end @@ -8269,6 +8651,10 @@ ActionDispatch::Assertions::ResponseAssertions::RESPONSE_PREDICATES = T.let(T.un # # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#11 module ActionDispatch::Assertions::RoutingAssertions + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + # Asserts that the provided options can be used to generate the provided path. This is the inverse of +assert_recognizes+. # The +extras+ parameter is used to tell the request the names and values of additional request parameters that would be in # a query string. The +message+ parameter allows you to specify a custom error message for assertion failures. @@ -8287,7 +8673,7 @@ module ActionDispatch::Assertions::RoutingAssertions # # Asserts that the generated route gives us our custom route # assert_generates "changesets/12", { controller: 'scm', action: 'show_diff', revision: "12" } # - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#85 + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#115 def assert_generates(expected_path, options, defaults = T.unsafe(nil), extras = T.unsafe(nil), message = T.unsafe(nil)); end # Asserts that the routing of the given +path+ was handled correctly and that the parsed options (given in the +expected_options+ hash) @@ -8321,7 +8707,7 @@ module ActionDispatch::Assertions::RoutingAssertions # # Test a custom route # assert_recognizes({controller: 'items', action: 'show', id: '1'}, 'view/item1') # - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#47 + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#77 def assert_recognizes(expected_options, path, extras = T.unsafe(nil), msg = T.unsafe(nil)); end # Asserts that path and options match both ways; in other words, it verifies that path generates @@ -8346,15 +8732,15 @@ module ActionDispatch::Assertions::RoutingAssertions # # Tests a route with an HTTP method # assert_routing({ method: 'put', path: '/product/321' }, { controller: "product", action: "update", id: "321" }) # - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#128 + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#158 def assert_routing(path, options, defaults = T.unsafe(nil), extras = T.unsafe(nil), message = T.unsafe(nil)); end # ROUTES TODO: These assertions should really work in an integration context # - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#183 + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#191 def method_missing(selector, *args, **_arg2, &block); end - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#12 + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#42 def setup; end # A helper to make it easier to test different route configurations. @@ -8370,23 +8756,70 @@ module ActionDispatch::Assertions::RoutingAssertions # assert_equal "/users", users_path # end # - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#153 - def with_routing; end + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#183 + def with_routing(&block); end private - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#228 + # @yield [@routes] + # + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#201 + def create_routes; end + + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#267 def fail_on(exception_class, message); end # Recognizes the route for a given path. # - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#194 + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#233 def recognized_request_for(path, extras = T.unsafe(nil), msg); end + + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#225 + def reset_routes(old_routes, old_controller); end end +# source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#14 +module ActionDispatch::Assertions::RoutingAssertions::ClassMethods + # A helper to make it easier to test different route configurations. + # This method temporarily replaces @routes with a new RouteSet instance + # before each test. + # + # The new instance is yielded to the passed block. Typically the block + # will create some routes using set.draw { match ... }: + # + # with_routing do |set| + # set.draw do + # resources :users + # end + # end + # + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#28 + def with_routing(&block); end +end + +# = Action Dispatch \AssumeSSL +# +# When proxying through a load balancer that terminates SSL, the forwarded request will appear +# as though it's HTTP instead of HTTPS to the application. This makes redirects and cookie +# security target HTTP instead of HTTPS. This middleware makes the server assume that the +# proxy already terminated SSL, and that the request really is HTTPS. +# +# source://actionpack//lib/action_dispatch/middleware/assume_ssl.rb#10 +class ActionDispatch::AssumeSSL + # @return [AssumeSSL] a new instance of AssumeSSL + # + # source://actionpack//lib/action_dispatch/middleware/assume_ssl.rb#11 + def initialize(app); end + + # source://actionpack//lib/action_dispatch/middleware/assume_ssl.rb#15 + def call(env); end +end + +# = Action Dispatch \Callbacks +# # Provides callbacks to be executed before and after dispatching the request. # -# source://actionpack//lib/action_dispatch/middleware/callbacks.rb#5 +# source://actionpack//lib/action_dispatch/middleware/callbacks.rb#7 class ActionDispatch::Callbacks include ::ActiveSupport::Callbacks extend ::ActiveSupport::Callbacks::ClassMethods @@ -8394,48 +8827,83 @@ class ActionDispatch::Callbacks # @return [Callbacks] a new instance of Callbacks # - # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#20 + # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#22 def initialize(app); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _call_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_call_callbacks(&block); end - # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#24 + # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#26 def call(env); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _call_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _call_callbacks=(value); end - # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#15 + # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#17 def after(*args, &block); end - # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#11 + # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#13 def before(*args, &block); end end end +# source://actionpack//lib/action_dispatch/constants.rb#6 +module ActionDispatch::Constants; end + +# source://actionpack//lib/action_dispatch/constants.rb#21 +ActionDispatch::Constants::CONTENT_ENCODING = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#22 +ActionDispatch::Constants::CONTENT_SECURITY_POLICY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#23 +ActionDispatch::Constants::CONTENT_SECURITY_POLICY_REPORT_ONLY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#25 +ActionDispatch::Constants::FEATURE_POLICY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#24 +ActionDispatch::Constants::LOCATION = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#28 +ActionDispatch::Constants::SERVER_TIMING = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#29 +ActionDispatch::Constants::STRICT_TRANSPORT_SECURITY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#20 +ActionDispatch::Constants::VARY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#27 +ActionDispatch::Constants::X_CASCADE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#26 +ActionDispatch::Constants::X_REQUEST_ID = T.let(T.unsafe(nil), String) + +# = Action Dispatch Content Security Policy +# # Configures the HTTP # {Content-Security-Policy}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy] # response header to help protect against XSS and injection attacks. @@ -8454,16 +8922,16 @@ end # policy.report_uri "/csp-violation-report-endpoint" # end # -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#24 +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#26 class ActionDispatch::ContentSecurityPolicy # @return [ContentSecurityPolicy] a new instance of ContentSecurityPolicy # @yield [_self] # @yieldparam _self [ActionDispatch::ContentSecurityPolicy] the object that the method was called on # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#173 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#174 def initialize; end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def base_uri(*sources); end # Specify whether to prevent the user agent from loading any assets over @@ -8475,48 +8943,48 @@ class ActionDispatch::ContentSecurityPolicy # # policy.block_all_mixed_content false # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#201 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#202 def block_all_mixed_content(enabled = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#290 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#291 def build(context = T.unsafe(nil), nonce = T.unsafe(nil), nonce_directives = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def child_src(*sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def connect_src(*sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def default_src(*sources); end # Returns the value of attribute directives. # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#171 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#172 def directives; end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def font_src(*sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def form_action(*sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def frame_ancestors(*sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def frame_src(*sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def img_src(*sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def manifest_src(*sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def media_src(*sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def object_src(*sources); end # Restricts the set of plugins that can be embedded: @@ -8527,10 +8995,10 @@ class ActionDispatch::ContentSecurityPolicy # # policy.plugin_types # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#217 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#218 def plugin_types(*types); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def prefetch_src(*sources); end # Enable the {report-uri}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-uri] @@ -8538,7 +9006,7 @@ class ActionDispatch::ContentSecurityPolicy # # policy.report_uri "/csp-violation-report-endpoint" # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#230 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#231 def report_uri(uri); end # Specify asset types for which {Subresource Integrity}[https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity] @@ -8550,10 +9018,10 @@ class ActionDispatch::ContentSecurityPolicy # # policy.require_sri_for # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#243 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#244 def require_sri_for(*types); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def require_trusted_types_for(*sources); end # Specify whether a {sandbox}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/sandbox] @@ -8569,28 +9037,28 @@ class ActionDispatch::ContentSecurityPolicy # # policy.sandbox false # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#264 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#265 def sandbox(*values); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def script_src(*sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def script_src_attr(*sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def script_src_elem(*sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def style_src(*sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def style_src_attr(*sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def style_src_elem(*sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def trusted_types(*sources); end # Specify whether user agents should treat any assets over HTTP as HTTPS: @@ -8601,77 +9069,68 @@ class ActionDispatch::ContentSecurityPolicy # # policy.upgrade_insecure_requests false # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#282 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#283 def upgrade_insecure_requests(enabled = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#184 def worker_src(*sources); end private - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#309 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#310 def apply_mapping(source); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#296 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#297 def apply_mappings(sources); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#331 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#332 def build_directive(sources, context); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#315 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#316 def build_directives(context, nonce, nonce_directives); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#178 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 def initialize_copy(other); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#353 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#354 def nonce_directive?(directive, nonce_directives); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#335 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#336 def resolve_source(source, context); end end -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#167 +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#168 ActionDispatch::ContentSecurityPolicy::DEFAULT_NONCE_DIRECTIVES = T.let(T.unsafe(nil), Array) -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#142 +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#143 ActionDispatch::ContentSecurityPolicy::DIRECTIVES = T.let(T.unsafe(nil), Hash) # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#123 ActionDispatch::ContentSecurityPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#25 +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#27 class ActionDispatch::ContentSecurityPolicy::Middleware # @return [Middleware] a new instance of Middleware # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#30 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#28 def initialize(app); end - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#34 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#32 def call(env); end private - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#55 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#54 def header_name(request); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#63 + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#62 def policy_present?(headers); end end -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#26 -ActionDispatch::ContentSecurityPolicy::Middleware::CONTENT_TYPE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#27 -ActionDispatch::ContentSecurityPolicy::Middleware::POLICY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#28 -ActionDispatch::ContentSecurityPolicy::Middleware::POLICY_REPORT_ONLY = T.let(T.unsafe(nil), String) - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#68 module ActionDispatch::ContentSecurityPolicy::Request # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#75 @@ -8722,7 +9181,7 @@ ActionDispatch::ContentSecurityPolicy::Request::POLICY = T.let(T.unsafe(nil), St # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#70 ActionDispatch::ContentSecurityPolicy::Request::POLICY_REPORT_ONLY = T.let(T.unsafe(nil), String) -# Read and write data to cookies through ActionController::Base#cookies. +# Read and write data to cookies through ActionController::Cookies#cookies. # # When reading cookie data, the data is read from the HTTP request header, Cookie. # When writing cookie data, the data is sent out in the HTTP response header, +Set-Cookie+. @@ -8790,13 +9249,18 @@ ActionDispatch::ContentSecurityPolicy::Request::POLICY_REPORT_ONLY = T.let(T.uns # to :all. To support multiple domains, provide an array, and # the first domain matching request.host will be used. Make # sure to specify the :domain option with :all or -# Array again when deleting cookies. +# Array again when deleting cookies. For more flexibility you +# can set the domain on a per-request basis by specifying :domain +# with a proc. # # domain: nil # Does not set cookie domain. (default) # domain: :all # Allow the cookie for the top most level # # domain and subdomains. # domain: %w(.example.com .example.org) # Allow the cookie # # for concrete domain names. +# domain: proc { Tenant.current.cookie_domain } # Set cookie domain dynamically +# domain: proc { |req| ".sub.#{req.host}" } # Set cookie domain dynamically based on request +# # # * :tld_length - When using :domain => :all, this option can be used to explicitly # set the TLD length when using a short (<= 3 character) domain that is being interpreted as part of a TLD. @@ -8808,72 +9272,73 @@ ActionDispatch::ContentSecurityPolicy::Request::POLICY_REPORT_ONLY = T.let(T.uns # only HTTP. Defaults to +false+. # * :same_site - The value of the +SameSite+ cookie attribute, which # determines how this cookie should be restricted in cross-site contexts. -# Possible values are +:none+, +:lax+, and +:strict+. Defaults to +:lax+. +# Possible values are +nil+, +:none+, +:lax+, and +:strict+. Defaults to +# +:lax+. # -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#182 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#188 class ActionDispatch::Cookies # @return [Cookies] a new instance of Cookies # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#697 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#683 def initialize(app); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#701 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#687 def call(env); end end -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#188 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#194 ActionDispatch::Cookies::AUTHENTICATED_ENCRYPTED_COOKIE_SALT = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#485 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#489 class ActionDispatch::Cookies::AbstractCookieJar include ::ActionDispatch::Cookies::ChainedCookieJars # @return [AbstractCookieJar] a new instance of AbstractCookieJar # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#488 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#492 def initialize(parent_jar); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#492 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#496 def [](name); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#504 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#508 def []=(name, options); end protected - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#516 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#520 def request; end private - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#534 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#538 def commit(name, options); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#527 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#531 def cookie_metadata(name, options); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#519 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#523 def expiry_options(options); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#533 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#537 def parse(name, data, purpose: T.unsafe(nil)); end end -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#194 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#200 ActionDispatch::Cookies::COOKIES_DIGEST = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#195 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#201 ActionDispatch::Cookies::COOKIES_ROTATIONS = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#196 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#202 ActionDispatch::Cookies::COOKIES_SAME_SITE_PROTECTION = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#193 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#199 ActionDispatch::Cookies::COOKIES_SERIALIZER = T.let(T.unsafe(nil), String) # Include in a cookie jar to allow chaining, e.g. +cookies.permanent.signed+. # -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#206 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#212 module ActionDispatch::Cookies::ChainedCookieJars # Returns a jar that'll automatically encrypt cookie values before sending them to the client and will decrypt them for read. # If the cookie was tampered with by the user (or a 3rd party), +nil+ will be returned. @@ -8890,7 +9355,7 @@ module ActionDispatch::Cookies::ChainedCookieJars # # cookies.encrypted[:discount] # => 45 # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#252 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#258 def encrypted; end # Returns a jar that'll automatically set the assigned cookies to have an expiration date 20 years from now. Example: @@ -8905,7 +9370,7 @@ module ActionDispatch::Cookies::ChainedCookieJars # cookies.permanent.signed[:remember_me] = current_user.id # # => Set-Cookie: remember_me=BAhU--848956038e692d7046deab32b7131856ab20e14e; path=/; expires=Sun, 16-Dec-2029 03:24:16 GMT # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#218 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#224 def permanent; end # Returns a jar that'll automatically generate a signed representation of cookie value and verify it when reading from @@ -8921,79 +9386,81 @@ module ActionDispatch::Cookies::ChainedCookieJars # # cookies.signed[:discount] # => 45 # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#234 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#240 def signed; end # Returns the +signed+ or +encrypted+ jar, preferring +encrypted+ if +secret_key_base+ is set. # Used by ActionDispatch::Session::CookieStore to avoid the need to introduce new cookie stores. # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#258 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#264 def signed_or_encrypted; end private - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#281 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#287 def encrypted_cookie_cipher; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#275 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#281 def prepare_upgrade_legacy_hmac_aes_cbc_cookies?; end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#285 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#291 def signed_cookie_digest; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#268 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#274 def upgrade_legacy_hmac_aes_cbc_cookies?; end end -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#290 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#296 class ActionDispatch::Cookies::CookieJar include ::ActionDispatch::Cookies::ChainedCookieJars include ::Enumerable # @return [CookieJar] a new instance of CookieJar # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#301 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#307 def initialize(request); end # Returns the value of the cookie by +name+, or +nil+ if no such cookie exists. # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#322 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#328 def [](name); end # Sets the cookie named +name+. The second argument may be the cookie's # value or a hash of options as documented above. # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#356 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#362 def []=(name, options); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#424 def always_write_cookie; end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#424 def always_write_cookie=(val); end # Removes all cookies on the client machine by calling delete for each cookie. # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#400 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#408 def clear(options = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#311 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#317 def commit!; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#309 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#315 def committed?; end # Removes the cookie on the client machine by setting the value to an empty string # and the expiration date in the past. Like []=, you can pass in # an options hash to delete cookies with extra data such as a :path. # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#379 + # Returns the value of the cookie, or +nil+ if the cookie does not exist. + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#387 def delete(name, options = T.unsafe(nil)); end # Whether the given cookie is to be deleted by this CookieJar. @@ -9002,256 +9469,231 @@ class ActionDispatch::Cookies::CookieJar # # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#393 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#401 def deleted?(name, options = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#317 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#323 def each(&block); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#326 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#332 def fetch(name, *args, &block); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#330 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#336 def has_key?(name); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#330 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#336 def key?(name); end # Returns the value of attribute request. # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#299 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#305 def request; end # Returns the cookies as Hash. def to_hash(*_arg0); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#350 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#356 def to_header; end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#338 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#344 def update(other_hash); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#343 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#349 def update_cookies_from_jar; end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#404 - def write(headers); end + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#412 + def write(response); end private - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#413 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#427 def escape(string); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#434 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#435 def handle_options(options); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#417 - def make_set_cookie_header(header); end - # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#430 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#431 def write_cookie?(cookie); end class << self - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#424 def always_write_cookie; end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#424 def always_write_cookie=(val); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#293 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#299 def build(req, cookies); end end end # Raised when storing more than 4K of session data. # -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#203 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#209 class ActionDispatch::Cookies::CookieOverflow < ::StandardError; end -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#190 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#196 ActionDispatch::Cookies::ENCRYPTED_COOKIE_CIPHER = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#186 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#192 ActionDispatch::Cookies::ENCRYPTED_COOKIE_SALT = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#187 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#193 ActionDispatch::Cookies::ENCRYPTED_SIGNED_COOKIE_SALT = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#645 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#631 class ActionDispatch::Cookies::EncryptedKeyRotatingCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar include ::ActionDispatch::Cookies::SerializedCookieJars # @return [EncryptedKeyRotatingCookieJar] a new instance of EncryptedKeyRotatingCookieJar # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#648 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#634 def initialize(parent_jar); end private - # @raise [CookieOverflow] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#690 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#676 def commit(name, options); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#682 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#668 def parse(name, encrypted_message, purpose: T.unsafe(nil)); end end -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#184 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#190 ActionDispatch::Cookies::GENERATOR_KEY = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#183 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#189 ActionDispatch::Cookies::HTTP_HEADER = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#556 -class ActionDispatch::Cookies::JsonSerializer - class << self - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#561 - def dump(value); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#557 - def load(value); end - end -end - # Cookies can typically store 4096 bytes. # -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#200 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#206 ActionDispatch::Cookies::MAX_COOKIE_SIZE = T.let(T.unsafe(nil), Integer) -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#544 -class ActionDispatch::Cookies::MarshalWithJsonFallback - class << self - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#551 - def dump(value); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#545 - def load(value); end - end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#537 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#541 class ActionDispatch::Cookies::PermanentCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar private - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#539 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#543 def commit(name, options); end end -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#192 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#198 ActionDispatch::Cookies::SECRET_KEY_BASE = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#191 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#197 ActionDispatch::Cookies::SIGNED_COOKIE_DIGEST = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#185 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#191 ActionDispatch::Cookies::SIGNED_COOKIE_SALT = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#566 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#548 module ActionDispatch::Cookies::SerializedCookieJars protected - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#579 - def deserialize(name); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#611 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#552 def digest; end + private + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#595 + def check_for_overflow!(name, options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#591 + def commit(name, options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#577 + def parse(name, dumped, force_reserialize: T.unsafe(nil), **_arg3); end + # @return [Boolean] # # source://actionpack//lib/action_dispatch/middleware/cookies.rb#571 - def needs_migration?(value); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#575 - def serialize(value); end + def reserialize?(dumped); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#599 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#557 def serializer; end end -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#567 -ActionDispatch::Cookies::SerializedCookieJars::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#568 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#549 ActionDispatch::Cookies::SerializedCookieJars::SERIALIZER = ActiveSupport::MessageEncryptor::NullSerializer -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#616 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#602 class ActionDispatch::Cookies::SignedKeyRotatingCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar include ::ActionDispatch::Cookies::SerializedCookieJars # @return [SignedKeyRotatingCookieJar] a new instance of SignedKeyRotatingCookieJar # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#619 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#605 def initialize(parent_jar); end private - # @raise [CookieOverflow] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#638 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#624 def commit(name, options); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#632 + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#618 def parse(name, signed_message, purpose: T.unsafe(nil)); end end -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#189 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#195 ActionDispatch::Cookies::USE_AUTHENTICATED_COOKIE_ENCRYPTION = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#197 +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#203 ActionDispatch::Cookies::USE_COOKIES_WITH_METADATA = T.let(T.unsafe(nil), String) +# = Action Dispatch \DebugExceptions +# # This middleware is responsible for logging exceptions and # showing a debugging page in case the request is local. # -# source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#11 +# source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#13 class ActionDispatch::DebugExceptions # @return [DebugExceptions] a new instance of DebugExceptions # - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#19 + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#21 def initialize(app, routes_app = T.unsafe(nil), response_format = T.unsafe(nil), interceptors = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#26 + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#28 def call(env); end private # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#176 + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#177 def api_request?(content_type); end # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#114 def create_template(request, wrapper); end - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#43 - def invoke_interceptors(request, exception); end + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#48 + def invoke_interceptors(request, exception, wrapper); end - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#152 - def log_array(logger, lines); end + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#151 + def log_array(logger, lines, request); end # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#133 def log_error(request, wrapper); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#180 + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#181 def log_rescued_responses?(request); end - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#162 + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#163 def logger(request); end # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#129 def render(status, body, format); end - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#54 - def render_exception(request, exception); end + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#56 + def render_exception(request, exception, wrapper); end # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#90 def render_for_api_request(content_type, wrapper); end @@ -9259,21 +9701,23 @@ class ActionDispatch::DebugExceptions # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#76 def render_for_browser_request(request, wrapper); end - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#170 + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#171 def routes_inspector(exception); end - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#166 + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#167 def stderr_logger; end class << self - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#12 + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#14 def interceptors; end - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#14 + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#16 def register_interceptor(object = T.unsafe(nil), &block); end end end +# = Action Dispatch \DebugLocks +# # This middleware can be used to diagnose deadlocks in the autoload interlock. # # To use it, insert it near the top of the middleware stack, using @@ -9296,24 +9740,24 @@ end # This middleware exposes operational details of the server, with no access # control. It should only be enabled when in use, and removed thereafter. # -# source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#25 +# source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#27 class ActionDispatch::DebugLocks # @return [DebugLocks] a new instance of DebugLocks # - # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#26 + # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#28 def initialize(app, path = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#31 + # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#33 def call(env); end private # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#103 + # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#106 def blocked_by?(victim, blocker, all_threads); end - # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#45 + # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#47 def render_details(req); end end @@ -9324,182 +9768,270 @@ class ActionDispatch::DebugView < ::ActionView::Base # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#12 def initialize(assigns); end - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#18 + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#19 def compiled_method_container; end - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#42 + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#47 def debug_hash(object); end - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#34 + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#39 def debug_headers(headers); end - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#22 + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#27 def debug_params(params); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#60 + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#23 + def error_highlight_available?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#65 def params_valid?; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#56 + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#61 def protect_against_forgery?; end - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#46 + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#51 def render(*_arg0); end end # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#10 -ActionDispatch::DebugView::RESCUES_TEMPLATE_PATH = T.let(T.unsafe(nil), String) +ActionDispatch::DebugView::RESCUES_TEMPLATE_PATHS = T.let(T.unsafe(nil), Array) -# source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#7 +# source://actionpack//lib/action_dispatch.rb#50 +class ActionDispatch::DeprecatedIllegalStateError < ::StandardError; end + +# source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#9 class ActionDispatch::ExceptionWrapper # @return [ExceptionWrapper] a new instance of ExceptionWrapper # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#46 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#48 def initialize(backtrace_cleaner, exception); end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#77 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#99 + def actions; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#111 + def annotated_source_code; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#133 def application_trace; end # Returns the value of attribute backtrace_cleaner. # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#46 def backtrace_cleaner; end + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#87 + def corrections; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#210 + def error_highlight_available?; end + # Returns the value of attribute exception. # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#46 def exception; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#71 + # Returns the value of attribute exception_class_name. + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#46 + def exception_class_name; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#239 + def exception_id; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#235 + def exception_inspect; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#227 + def exception_name; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#127 def exception_trace; end - # Returns the value of attribute file. - # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 - def file; end + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#75 + def failures; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#81 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#91 + def file_name; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#137 def framework_trace; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#85 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#141 def full_trace; end - # Returns the value of attribute line_number. + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#71 + def has_cause?; end + + # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#79 + def has_corrections?; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#95 def line_number; end + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#231 + def message; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#83 + def original_message; end + # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#121 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#200 def rescue_response?; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#10 def rescue_responses; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#10 def rescue_responses=(val); end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#63 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#119 def rescue_template; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#28 def rescue_templates; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#28 def rescue_templates=(val); end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#59 + def routing_error?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#177 + def show?(request); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#41 def silent_exceptions; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#41 def silent_exceptions=(val); end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#125 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#204 def source_extracts; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#144 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#223 def source_to_show_id; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#67 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#123 def status_code; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#136 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#67 + def sub_template_message; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#63 + def template_error?; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#215 def trace_to_show; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#89 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#145 def traces; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#55 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#103 def unwrapped_exception; end # Returns the value of attribute wrapped_causes. # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#46 def wrapped_causes; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#37 def wrapper_exceptions; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#37 def wrapper_exceptions=(val); end private - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#149 + # Returns the value of attribute backtrace. + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#263 def backtrace; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#153 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#265 + def build_backtrace; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#288 def causes_for(exception); end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#163 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#298 def clean_backtrace(*args); end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#190 - def expand_backtrace; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#183 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#351 def extract_file_and_line_number(trace); end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#171 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#306 + def extract_source(trace); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#335 + def extract_source_fragment_lines(source_lines, line); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#341 def source_fragment(path, line); end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#159 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#294 def wrapped_causes_for(exception, backtrace_cleaner); end class << self - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#10 def rescue_responses; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#10 def rescue_responses=(val); end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#28 def rescue_templates; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#28 def rescue_templates=(val); end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#41 def silent_exceptions; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#41 def silent_exceptions=(val); end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#117 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#173 def status_code_for_exception(class_name); end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#37 def wrapper_exceptions; end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#37 def wrapper_exceptions=(val); end end end +# source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#244 +class ActionDispatch::ExceptionWrapper::SourceMapLocation + # @return [SourceMapLocation] a new instance of SourceMapLocation + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#245 + def initialize(location, template); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#250 + def spot(exc); end +end + # source://actionpack//lib/action_dispatch/middleware/executor.rb#6 class ActionDispatch::Executor # @return [Executor] a new instance of Executor @@ -9511,14 +10043,15 @@ class ActionDispatch::Executor def call(env); end end -# This endpoint serves static files from disk using +Rack::File+. +# = Action Dispatch \FileHandler +# +# This endpoint serves static files from disk using +Rack::Files+. # # URL paths are matched with static files according to expected # conventions: +path+, +path+.html, +path+/index.html. # # Precompressed versions of these files are checked first. Brotli (.br) # and gzip (.gz) files are supported. If +path+.br exists, this -# endpoint returns that file with a Content-Encoding: br header. # # If no matching file is found, this endpoint responds 404 Not Found. # @@ -9526,40 +10059,40 @@ end # index: "index" to change the default +path+/index.html, and optional # additional response headers. # -# source://actionpack//lib/action_dispatch/middleware/static.rb#41 +# source://actionpack//lib/action_dispatch/middleware/static.rb#45 class ActionDispatch::FileHandler # @return [FileHandler] a new instance of FileHandler # - # source://actionpack//lib/action_dispatch/middleware/static.rb#49 + # source://actionpack//lib/action_dispatch/middleware/static.rb#53 def initialize(root, index: T.unsafe(nil), headers: T.unsafe(nil), precompressed: T.unsafe(nil), compressible_content_types: T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/middleware/static.rb#63 + # source://actionpack//lib/action_dispatch/middleware/static.rb#67 def attempt(env); end - # source://actionpack//lib/action_dispatch/middleware/static.rb#59 + # source://actionpack//lib/action_dispatch/middleware/static.rb#63 def call(env); end private - # source://actionpack//lib/action_dispatch/middleware/static.rb#179 + # source://actionpack//lib/action_dispatch/middleware/static.rb#183 def clean_path(path_info); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/static.rb#143 + # source://actionpack//lib/action_dispatch/middleware/static.rb#147 def compressible?(content_type); end # @yield [path, content_type || "text/plain"] # - # source://actionpack//lib/action_dispatch/middleware/static.rb#156 + # source://actionpack//lib/action_dispatch/middleware/static.rb#160 def each_candidate_filepath(path_info); end - # source://actionpack//lib/action_dispatch/middleware/static.rb#147 + # source://actionpack//lib/action_dispatch/middleware/static.rb#151 def each_precompressed_filepath(filepath); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/static.rb#138 + # source://actionpack//lib/action_dispatch/middleware/static.rb#142 def file_readable?(path); end # Match a URI path to a static file to be served. @@ -9573,24 +10106,26 @@ class ActionDispatch::FileHandler # If a matching file is found, the path and necessary response headers # (Content-Type, Content-Encoding) are returned. # - # source://actionpack//lib/action_dispatch/middleware/static.rb#98 + # source://actionpack//lib/action_dispatch/middleware/static.rb#102 def find_file(path_info, accept_encoding:); end - # source://actionpack//lib/action_dispatch/middleware/static.rb#74 + # source://actionpack//lib/action_dispatch/middleware/static.rb#78 def serve(request, filepath, content_headers); end - # source://actionpack//lib/action_dispatch/middleware/static.rb#106 + # source://actionpack//lib/action_dispatch/middleware/static.rb#110 def try_files(filepath, content_type, accept_encoding:); end - # source://actionpack//lib/action_dispatch/middleware/static.rb#116 + # source://actionpack//lib/action_dispatch/middleware/static.rb#120 def try_precompressed_files(filepath, headers, accept_encoding:); end end # +Accept-Encoding+ value -> file extension # -# source://actionpack//lib/action_dispatch/middleware/static.rb#43 +# source://actionpack//lib/action_dispatch/middleware/static.rb#47 ActionDispatch::FileHandler::PRECOMPRESSED = T.let(T.unsafe(nil), Hash) +# = Action Dispatch \Flash +# # The flash provides a way to pass temporary primitive-types (String, Array, Hash) between actions. Anything you place in the flash will be exposed # to the very next action and then cleared out. This is a great way of doing notices and alerts, such as a create # action that sets flash[:notice] = "Post successfully created" before redirecting to a display action that can @@ -9627,43 +10162,46 @@ ActionDispatch::FileHandler::PRECOMPRESSED = T.let(T.unsafe(nil), Hash) # # See docs on the FlashHash class for more details about the flash. # -# source://actionpack//lib/action_dispatch/middleware/flash.rb#41 +# source://actionpack//lib/action_dispatch/middleware/flash.rb#43 class ActionDispatch::Flash class << self - # source://actionpack//lib/action_dispatch/middleware/flash.rb#293 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#300 def new(app); end end end -# source://actionpack//lib/action_dispatch/middleware/flash.rb#110 +# source://actionpack//lib/action_dispatch/middleware/flash.rb#112 class ActionDispatch::Flash::FlashHash include ::Enumerable # @return [FlashHash] a new instance of FlashHash # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#140 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#142 def initialize(flashes = T.unsafe(nil), discard = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#160 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#162 def [](k); end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#154 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#156 def []=(k, v); end # Convenience accessor for flash[:alert]. # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#261 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#268 def alert; end # Convenience accessor for flash[:alert]=. # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#266 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#273 def alert=(message); end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#193 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#197 def clear; end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#178 + # Immediately deletes the single flash entry. Use this method when you + # want remove the message within the current action. See also #discard. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#182 def delete(key); end # Marks the entire flash or a single flash entry to be discarded by the end of the current action: @@ -9671,15 +10209,18 @@ class ActionDispatch::Flash::FlashHash # flash.discard # discard the entire flash at the end of the current action # flash.discard(:warning) # discard only the "warning" entry at the end of the current action # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#246 + # Use this method when you want to display the message in the current + # action but not in the next one. See also #delete. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#253 def discard(k = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#198 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#202 def each(&block); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#189 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#193 def empty?; end # Keeps either the entire current flash or a specific flash entry available for the next action: @@ -9687,28 +10228,28 @@ class ActionDispatch::Flash::FlashHash # flash.keep # keeps the entire flash # flash.keep(:notice) # keeps only the "notice" entry, the rest of the flash is discarded # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#236 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#240 def keep(k = T.unsafe(nil)); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#174 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#176 def key?(name); end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#170 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#172 def keys; end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#164 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#166 def merge!(h); end # Convenience accessor for flash[:notice]. # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#271 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#278 def notice; end # Convenience accessor for flash[:notice]=. # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#276 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#283 def notice=(message); end # Sets a flash that will not be available to the next action, only to the current. @@ -9730,113 +10271,115 @@ class ActionDispatch::Flash::FlashHash # flash.now.notice = "Good luck now!" # # Equivalent to flash.now[:notice] = "Good luck now!" # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#228 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#232 def now; end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#204 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#208 def replace(h); end # Mark for removal entries that were kept, and delete unkept ones. # # This method is called automatically by filters, so you generally don't need to care about it. # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#255 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#262 def sweep; end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#185 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#189 def to_hash; end # Builds a hash containing the flashes to keep for the next request. # If there are none to keep, returns +nil+. # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#134 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#136 def to_session_value; end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#164 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#166 def update(h); end protected # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#281 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#288 def now_is_loaded?; end private - # source://actionpack//lib/action_dispatch/middleware/flash.rb#146 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#148 def initialize_copy(other); end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#286 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#293 def stringify_array(array); end class << self - # source://actionpack//lib/action_dispatch/middleware/flash.rb#113 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#115 def from_session_value(value); end end end -# source://actionpack//lib/action_dispatch/middleware/flash.rb#81 +# source://actionpack//lib/action_dispatch/middleware/flash.rb#83 class ActionDispatch::Flash::FlashNow # @return [FlashNow] a new instance of FlashNow # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#84 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#86 def initialize(flash); end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#95 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#97 def [](k); end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#88 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#90 def []=(k, v); end # Convenience accessor for flash.now[:alert]=. # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#100 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#102 def alert=(message); end # Returns the value of attribute flash. # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#82 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#84 def flash; end # Sets the attribute flash # # @param value the value to set the attribute flash to. # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#82 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#84 def flash=(_arg0); end # Convenience accessor for flash.now[:notice]=. # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#105 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#107 def notice=(message); end end -# source://actionpack//lib/action_dispatch/middleware/flash.rb#42 +# source://actionpack//lib/action_dispatch/middleware/flash.rb#44 ActionDispatch::Flash::KEY = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/middleware/flash.rb#44 +# source://actionpack//lib/action_dispatch/middleware/flash.rb#46 module ActionDispatch::Flash::RequestMethods - # source://actionpack//lib/action_dispatch/middleware/flash.rb#62 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#64 def commit_flash; end # Access the contents of the flash. Returns a ActionDispatch::Flash::FlashHash. # # See ActionDispatch::Flash for example usage. # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#48 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#50 def flash; end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#54 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#56 def flash=(flash); end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#58 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#60 def flash_hash; end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#75 + # source://actionpack//lib/action_dispatch/middleware/flash.rb#77 def reset_session; end end +# = Action Dispatch \HostAuthorization +# # This middleware guards from DNS rebinding attacks by explicitly permitting # the hosts a request can be sent to, and is passed the options set in # +config.host_authorization+. @@ -9852,106 +10395,107 @@ end # responds with 403 Forbidden. The body of the response contains debug info # if +config.consider_all_requests_local+ is set to true, otherwise the body is empty. # -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#18 +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#20 class ActionDispatch::HostAuthorization # @return [HostAuthorization] a new instance of HostAuthorization # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#122 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#125 def initialize(app, hosts, exclude: T.unsafe(nil), response_app: T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#130 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#133 def call(env); end private - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#144 - def authorized?(request); end + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#149 + def blocked_hosts(request); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#151 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#161 def excluded?(request); end - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#155 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#165 def mark_as_authorized(request); end end -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#19 +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#21 ActionDispatch::HostAuthorization::ALLOWED_HOSTS_IN_DEVELOPMENT = T.let(T.unsafe(nil), Array) -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#83 +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#86 class ActionDispatch::HostAuthorization::DefaultResponseApp - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#86 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#89 def call(env); end private - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#117 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#120 def available_logger(request); end - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#109 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#112 def log_error(request); end - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#102 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#105 def response(format, body); end - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#95 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#98 def response_body(request); end end -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#84 +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#87 ActionDispatch::HostAuthorization::DefaultResponseApp::RESPONSE_STATUS = T.let(T.unsafe(nil), Integer) -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#21 +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#24 ActionDispatch::HostAuthorization::IPV4_HOSTNAME = T.let(T.unsafe(nil), Regexp) -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#22 +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#25 ActionDispatch::HostAuthorization::IPV6_HOSTNAME = T.let(T.unsafe(nil), Regexp) -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#23 +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#26 ActionDispatch::HostAuthorization::IPV6_HOSTNAME_WITH_PORT = T.let(T.unsafe(nil), Regexp) -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#20 +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#22 ActionDispatch::HostAuthorization::PORT_REGEX = T.let(T.unsafe(nil), Regexp) -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#30 +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#33 class ActionDispatch::HostAuthorization::Permissions # @return [Permissions] a new instance of Permissions # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#31 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#34 def initialize(hosts); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#39 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#42 def allows?(host); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#35 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#38 def empty?; end private - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#78 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#81 def extract_hostname(host); end - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#56 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#59 def sanitize_hosts(hosts); end - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#66 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#69 def sanitize_regexp(host); end - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#70 + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#73 def sanitize_string(host); end end -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#24 +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#23 +ActionDispatch::HostAuthorization::SUBDOMAIN_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#27 ActionDispatch::HostAuthorization::VALID_IP_HOSTNAME = T.let(T.unsafe(nil), Regexp) -# source://actionpack//lib/action_dispatch.rb#80 +# source://actionpack//lib/action_dispatch.rb#95 module ActionDispatch::Http extend ::ActiveSupport::Autoload end @@ -10075,7 +10619,7 @@ module ActionDispatch::Http::Cache::Response private - # source://actionpack//lib/action_dispatch/http/cache.rb#146 + # source://actionpack//lib/action_dispatch/http/cache.rb#144 def cache_control_headers; end # source://actionpack//lib/action_dispatch/http/cache.rb#138 @@ -10087,38 +10631,38 @@ module ActionDispatch::Http::Cache::Response # source://actionpack//lib/action_dispatch/http/cache.rb#130 def generate_weak_etag(validators); end - # source://actionpack//lib/action_dispatch/http/cache.rb#175 + # source://actionpack//lib/action_dispatch/http/cache.rb#173 def handle_conditional_get!; end - # source://actionpack//lib/action_dispatch/http/cache.rb#185 + # source://actionpack//lib/action_dispatch/http/cache.rb#183 def merge_and_normalize_cache_control!(cache_control); end - # source://actionpack//lib/action_dispatch/http/cache.rb#164 + # source://actionpack//lib/action_dispatch/http/cache.rb#162 def prepare_cache_control!; end end # source://actionpack//lib/action_dispatch/http/cache.rb#126 ActionDispatch::Http::Cache::Response::DATE = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/http/cache.rb#168 +# source://actionpack//lib/action_dispatch/http/cache.rb#166 ActionDispatch::Http::Cache::Response::DEFAULT_CACHE_CONTROL = T.let(T.unsafe(nil), String) # source://actionpack//lib/action_dispatch/http/cache.rb#127 ActionDispatch::Http::Cache::Response::LAST_MODIFIED = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/http/cache.rb#173 +# source://actionpack//lib/action_dispatch/http/cache.rb#171 ActionDispatch::Http::Cache::Response::MUST_REVALIDATE = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/http/cache.rb#170 +# source://actionpack//lib/action_dispatch/http/cache.rb#168 ActionDispatch::Http::Cache::Response::NO_CACHE = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/http/cache.rb#169 +# source://actionpack//lib/action_dispatch/http/cache.rb#167 ActionDispatch::Http::Cache::Response::NO_STORE = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/http/cache.rb#172 +# source://actionpack//lib/action_dispatch/http/cache.rb#170 ActionDispatch::Http::Cache::Response::PRIVATE = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/http/cache.rb#171 +# source://actionpack//lib/action_dispatch/http/cache.rb#169 ActionDispatch::Http::Cache::Response::PUBLIC = T.let(T.unsafe(nil), String) # source://actionpack//lib/action_dispatch/http/cache.rb#128 @@ -10167,6 +10711,8 @@ ActionDispatch::Http::ContentDisposition::RFC_5987_ESCAPED_CHAR = T.let(T.unsafe # source://actionpack//lib/action_dispatch/http/content_disposition.rb#17 ActionDispatch::Http::ContentDisposition::TRADITIONAL_ESCAPED_CHAR = T.let(T.unsafe(nil), Regexp) +# = Action Dispatch HTTP Filter Parameters +# # Allows you to specify sensitive query string and POST parameters to filter # from the request log. # @@ -10175,54 +10721,56 @@ ActionDispatch::Http::ContentDisposition::TRADITIONAL_ESCAPED_CHAR = T.let(T.uns # # For more information about filter behavior, see ActiveSupport::ParameterFilter. # -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#14 +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#16 module ActionDispatch::Http::FilterParameters - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#19 + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#21 def initialize; end # Returns a hash of request.env with all sensitive data replaced. # - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#34 + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#37 def filtered_env; end # Returns a hash of parameters with all sensitive data replaced. # - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#27 + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#30 def filtered_parameters; end # Reconstructs a path with all sensitive GET parameters replaced. # - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#39 + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#42 def filtered_path; end + # Returns the +ActiveSupport::ParameterFilter+ object used to filter in this request. + # + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#47 + def parameter_filter; end + private - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#50 + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#56 def env_filter; end - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#63 + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#69 def filtered_query_string; end - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#44 - def parameter_filter; end - - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#57 + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#63 def parameter_filter_for(filters); end end -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#15 +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#17 ActionDispatch::Http::FilterParameters::ENV_MATCH = T.let(T.unsafe(nil), Array) -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#61 +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#67 ActionDispatch::Http::FilterParameters::KV_RE = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#17 +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#19 ActionDispatch::Http::FilterParameters::NULL_ENV_FILTER = T.let(T.unsafe(nil), ActiveSupport::ParameterFilter) -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#16 +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#18 ActionDispatch::Http::FilterParameters::NULL_PARAM_FILTER = T.let(T.unsafe(nil), ActiveSupport::ParameterFilter) -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#62 +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#68 ActionDispatch::Http::FilterParameters::PAIR_RE = T.let(T.unsafe(nil), Regexp) # source://actionpack//lib/action_dispatch/http/filter_redirect.rb#5 @@ -10244,6 +10792,8 @@ end # source://actionpack//lib/action_dispatch/http/filter_redirect.rb#6 ActionDispatch::Http::FilterRedirect::FILTERED = T.let(T.unsafe(nil), String) +# = Action Dispatch HTTP \Headers +# # Provides access to the request's HTTP headers from the environment. # # env = { "CONTENT_TYPE" => "text/plain", "HTTP_USER_AGENT" => "curl/7.43.0" } @@ -10264,34 +10814,34 @@ ActionDispatch::Http::FilterRedirect::FILTERED = T.let(T.unsafe(nil), String) # headers["X_Custom_Header"] # => nil # headers["X-Custom-Header"] # => "token" # -# source://actionpack//lib/action_dispatch/http/headers.rb#24 +# source://actionpack//lib/action_dispatch/http/headers.rb#26 class ActionDispatch::Http::Headers include ::Enumerable # @return [Headers] a new instance of Headers # - # source://actionpack//lib/action_dispatch/http/headers.rb#54 + # source://actionpack//lib/action_dispatch/http/headers.rb#56 def initialize(request); end # Returns the value for the given key mapped to @env. # - # source://actionpack//lib/action_dispatch/http/headers.rb#59 + # source://actionpack//lib/action_dispatch/http/headers.rb#61 def [](key); end # Sets the given value for the key mapped to @env. # - # source://actionpack//lib/action_dispatch/http/headers.rb#64 + # source://actionpack//lib/action_dispatch/http/headers.rb#66 def []=(key, value); end # Add a value to a multivalued header like +Vary+ or +Accept-Encoding+. # - # source://actionpack//lib/action_dispatch/http/headers.rb#69 + # source://actionpack//lib/action_dispatch/http/headers.rb#71 def add(key, value); end - # source://actionpack//lib/action_dispatch/http/headers.rb#95 + # source://actionpack//lib/action_dispatch/http/headers.rb#97 def each(&block); end - # source://actionpack//lib/action_dispatch/http/headers.rb#116 + # source://actionpack//lib/action_dispatch/http/headers.rb#118 def env; end # Returns the value for the given key mapped to @env. @@ -10302,30 +10852,30 @@ class ActionDispatch::Http::Headers # If the code block is provided, then it will be run and # its result returned. # - # source://actionpack//lib/action_dispatch/http/headers.rb#87 + # source://actionpack//lib/action_dispatch/http/headers.rb#89 def fetch(key, default = T.unsafe(nil)); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/headers.rb#73 + # source://actionpack//lib/action_dispatch/http/headers.rb#75 def include?(key); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/headers.rb#73 + # source://actionpack//lib/action_dispatch/http/headers.rb#75 def key?(key); end # Returns a new Http::Headers instance containing the contents of # headers_or_env and the original instance. # - # source://actionpack//lib/action_dispatch/http/headers.rb#101 + # source://actionpack//lib/action_dispatch/http/headers.rb#103 def merge(headers_or_env); end # Adds the contents of headers_or_env to original instance # entries; duplicate keys are overwritten with the values from # headers_or_env. # - # source://actionpack//lib/action_dispatch/http/headers.rb#110 + # source://actionpack//lib/action_dispatch/http/headers.rb#112 def merge!(headers_or_env); end private @@ -10333,22 +10883,22 @@ class ActionDispatch::Http::Headers # Converts an HTTP header name to an environment variable name if it is # not contained within the headers hash. # - # source://actionpack//lib/action_dispatch/http/headers.rb#121 + # source://actionpack//lib/action_dispatch/http/headers.rb#123 def env_name(key); end class << self - # source://actionpack//lib/action_dispatch/http/headers.rb#50 + # source://actionpack//lib/action_dispatch/http/headers.rb#52 def from_hash(hash); end end end -# source://actionpack//lib/action_dispatch/http/headers.rb#25 +# source://actionpack//lib/action_dispatch/http/headers.rb#27 ActionDispatch::Http::Headers::CGI_VARIABLES = T.let(T.unsafe(nil), Set) -# source://actionpack//lib/action_dispatch/http/headers.rb#78 +# source://actionpack//lib/action_dispatch/http/headers.rb#80 ActionDispatch::Http::Headers::DEFAULT = T.let(T.unsafe(nil), Object) -# source://actionpack//lib/action_dispatch/http/headers.rb#46 +# source://actionpack//lib/action_dispatch/http/headers.rb#48 ActionDispatch::Http::Headers::HTTP_HEADER = T.let(T.unsafe(nil), Regexp) # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#7 @@ -10362,11 +10912,8 @@ module ActionDispatch::Http::MimeNegotiation # The MIME type of the HTTP request, such as Mime[:xml]. # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#23 - def content_mime_type; end - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#36 - def content_type; end + def content_mime_type; end # Returns the MIME type for the \format used in the request. # @@ -10375,7 +10922,7 @@ module ActionDispatch::Http::MimeNegotiation # GET /posts/5 | request.format => Mime[:html] or Mime[:js], or request.accepts.first # # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#75 - def format(view_path = T.unsafe(nil)); end + def format(_view_path = T.unsafe(nil)); end # Sets the \format by string extension, which can be used to force custom formats # that are not controlled by the extension. @@ -10398,7 +10945,7 @@ module ActionDispatch::Http::MimeNegotiation # Sets the \formats by string extensions. This differs from #format= by allowing you # to set multiple, ordered formats, which is useful when you want to have a fallback. # - # In this example, the +:iphone+ format will be used if it's available, otherwise it'll fallback + # In this example, the +:iphone+ format will be used if it's available, otherwise it'll fall back # to the +:html+ format. # # class ApplicationController < ActionController::Base @@ -10482,7 +11029,7 @@ module ActionDispatch::Http::Parameters def params; end # Returns a hash with the \parameters used to form the \path of the request. - # Returned hash keys are strings: + # Returned hash keys are symbols: # # { action: "my_action", controller: "my_controller" } # @@ -10794,6 +11341,8 @@ ActionDispatch::Http::URL::IP_HOST_REGEXP = T.let(T.unsafe(nil), Regexp) # source://actionpack//lib/action_dispatch/http/url.rb#10 ActionDispatch::Http::URL::PROTOCOL_REGEXP = T.let(T.unsafe(nil), Regexp) +# = Action Dispatch HTTP \UploadedFile +# # Models uploaded files. # # The actual file is accessible via the +tempfile+ accessor, though some @@ -10803,105 +11352,102 @@ ActionDispatch::Http::URL::PROTOCOL_REGEXP = T.let(T.unsafe(nil), Regexp) # the object is finalized Ruby unlinks the file, so there is no need to # clean them with a separate maintenance task. # -# source://actionpack//lib/action_dispatch/http/upload.rb#13 +# source://actionpack//lib/action_dispatch/http/upload.rb#15 class ActionDispatch::Http::UploadedFile # @raise [ArgumentError] # @return [UploadedFile] a new instance of UploadedFile # - # source://actionpack//lib/action_dispatch/http/upload.rb#27 + # source://actionpack//lib/action_dispatch/http/upload.rb#29 def initialize(hash); end # Shortcut for +tempfile.close+. # - # source://actionpack//lib/action_dispatch/http/upload.rb#69 + # source://actionpack//lib/action_dispatch/http/upload.rb#71 def close(unlink_now = T.unsafe(nil)); end # A string with the MIME type of the file. # - # source://actionpack//lib/action_dispatch/http/upload.rb#18 + # source://actionpack//lib/action_dispatch/http/upload.rb#20 def content_type; end # A string with the MIME type of the file. # - # source://actionpack//lib/action_dispatch/http/upload.rb#18 + # source://actionpack//lib/action_dispatch/http/upload.rb#20 def content_type=(_arg0); end # Shortcut for +tempfile.eof?+. # # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/upload.rb#94 + # source://actionpack//lib/action_dispatch/http/upload.rb#96 def eof?; end # A string with the headers of the multipart request. # - # source://actionpack//lib/action_dispatch/http/upload.rb#25 + # source://actionpack//lib/action_dispatch/http/upload.rb#27 def headers; end # A string with the headers of the multipart request. # - # source://actionpack//lib/action_dispatch/http/upload.rb#25 + # source://actionpack//lib/action_dispatch/http/upload.rb#27 def headers=(_arg0); end # Shortcut for +tempfile.open+. # - # source://actionpack//lib/action_dispatch/http/upload.rb#64 + # source://actionpack//lib/action_dispatch/http/upload.rb#66 def open; end # The basename of the file in the client. # - # source://actionpack//lib/action_dispatch/http/upload.rb#15 + # source://actionpack//lib/action_dispatch/http/upload.rb#17 def original_filename; end # The basename of the file in the client. # - # source://actionpack//lib/action_dispatch/http/upload.rb#15 + # source://actionpack//lib/action_dispatch/http/upload.rb#17 def original_filename=(_arg0); end # Shortcut for +tempfile.path+. # - # source://actionpack//lib/action_dispatch/http/upload.rb#74 + # source://actionpack//lib/action_dispatch/http/upload.rb#76 def path; end # Shortcut for +tempfile.read+. # - # source://actionpack//lib/action_dispatch/http/upload.rb#59 + # source://actionpack//lib/action_dispatch/http/upload.rb#61 def read(length = T.unsafe(nil), buffer = T.unsafe(nil)); end # Shortcut for +tempfile.rewind+. # - # source://actionpack//lib/action_dispatch/http/upload.rb#84 + # source://actionpack//lib/action_dispatch/http/upload.rb#86 def rewind; end # Shortcut for +tempfile.size+. # - # source://actionpack//lib/action_dispatch/http/upload.rb#89 + # source://actionpack//lib/action_dispatch/http/upload.rb#91 def size; end # A +Tempfile+ object with the actual uploaded file. Note that some of # its interface is available directly. # - # source://actionpack//lib/action_dispatch/http/upload.rb#22 + # source://actionpack//lib/action_dispatch/http/upload.rb#24 def tempfile; end # A +Tempfile+ object with the actual uploaded file. Note that some of # its interface is available directly. # - # source://actionpack//lib/action_dispatch/http/upload.rb#22 + # source://actionpack//lib/action_dispatch/http/upload.rb#24 def tempfile=(_arg0); end - # source://actionpack//lib/action_dispatch/http/upload.rb#98 + # source://actionpack//lib/action_dispatch/http/upload.rb#100 def to_io; end # Shortcut for +tempfile.to_path+. # - # source://actionpack//lib/action_dispatch/http/upload.rb#79 + # source://actionpack//lib/action_dispatch/http/upload.rb#81 def to_path; end end -# source://actionpack//lib/action_dispatch.rb#40 -class ActionDispatch::IllegalStateError < ::StandardError; end - # source://actionpack//lib/action_dispatch/testing/integration.rb#11 module ActionDispatch::Integration; end @@ -10920,8 +11466,10 @@ module ActionDispatch::Integration::RequestHelpers # will be performed. Any arguments are passed to the # underlying request. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#61 - def follow_redirect!(**args); end + # The HTTP_REFERER header will be set to the previous url. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#63 + def follow_redirect!(headers: T.unsafe(nil), **args); end # Performs a GET request with the given parameters. See ActionDispatch::Integration::Session#process # for more details. @@ -10960,67 +11508,67 @@ module ActionDispatch::Integration::RequestHelpers def put(path, **args); end end -# source://actionpack//lib/action_dispatch/testing/integration.rb#316 +# source://actionpack//lib/action_dispatch/testing/integration.rb#325 module ActionDispatch::Integration::Runner - include ::ActionDispatch::Assertions::ResponseAssertions include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions::ResponseAssertions include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable include ::Rails::Dom::Testing::Assertions::SelectorAssertions include ::Rails::Dom::Testing::Assertions include ::ActionDispatch::Assertions + extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods - # source://actionpack//lib/action_dispatch/testing/integration.rb#324 + # source://actionpack//lib/action_dispatch/testing/integration.rb#333 def initialize(*args, &blk); end # Returns the value of attribute app. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#321 + # source://actionpack//lib/action_dispatch/testing/integration.rb#330 def app; end - # source://actionpack//lib/action_dispatch/testing/integration.rb#395 + # source://actionpack//lib/action_dispatch/testing/integration.rb#404 def assertions; end - # source://actionpack//lib/action_dispatch/testing/integration.rb#399 + # source://actionpack//lib/action_dispatch/testing/integration.rb#408 def assertions=(assertions); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + # source://actionpack//lib/action_dispatch/testing/integration.rb#376 def assigns(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#329 + # source://actionpack//lib/action_dispatch/testing/integration.rb#338 def before_setup; end - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + # source://actionpack//lib/action_dispatch/testing/integration.rb#376 def cookies(*_arg0, **_arg1, &_arg2); end # Copy the instance variables from the current session instance into the # test instance. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#405 + # source://actionpack//lib/action_dispatch/testing/integration.rb#414 def copy_session_variables!; end - # source://actionpack//lib/action_dispatch/testing/integration.rb#344 + # source://actionpack//lib/action_dispatch/testing/integration.rb#353 def create_session(app); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#411 + # source://actionpack//lib/action_dispatch/testing/integration.rb#420 def default_url_options; end - # source://actionpack//lib/action_dispatch/testing/integration.rb#415 + # source://actionpack//lib/action_dispatch/testing/integration.rb#424 def default_url_options=(options); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + # source://actionpack//lib/action_dispatch/testing/integration.rb#376 def delete(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + # source://actionpack//lib/action_dispatch/testing/integration.rb#376 def follow_redirect!(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + # source://actionpack//lib/action_dispatch/testing/integration.rb#376 def get(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + # source://actionpack//lib/action_dispatch/testing/integration.rb#376 def head(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#334 + # source://actionpack//lib/action_dispatch/testing/integration.rb#343 def integration_session; end # Open a new session instance. If a block is given, the new session is @@ -11034,47 +11582,47 @@ module ActionDispatch::Integration::Runner # can use this method to open multiple sessions that ought to be tested # simultaneously. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#387 + # source://actionpack//lib/action_dispatch/testing/integration.rb#396 def open_session; end - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + # source://actionpack//lib/action_dispatch/testing/integration.rb#376 def patch(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + # source://actionpack//lib/action_dispatch/testing/integration.rb#376 def post(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + # source://actionpack//lib/action_dispatch/testing/integration.rb#376 def put(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#356 + # source://actionpack//lib/action_dispatch/testing/integration.rb#365 def remove!; end # Reset the current session. This is useful for testing multiple sessions # in a single test case. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#340 + # source://actionpack//lib/action_dispatch/testing/integration.rb#349 def reset!; end - # source://actionpack//lib/action_dispatch/testing/integration.rb#322 + # source://actionpack//lib/action_dispatch/testing/integration.rb#331 def root_session; end - # source://actionpack//lib/action_dispatch/testing/integration.rb#322 + # source://actionpack//lib/action_dispatch/testing/integration.rb#331 def root_session=(_arg0); end private # Delegate unhandled messages to the current session instance. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#425 + # source://actionpack//lib/action_dispatch/testing/integration.rb#434 def method_missing(method, *args, **_arg2, &block); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/testing/integration.rb#420 + # source://actionpack//lib/action_dispatch/testing/integration.rb#429 def respond_to_missing?(method, _); end end -# source://actionpack//lib/action_dispatch/testing/integration.rb#319 +# source://actionpack//lib/action_dispatch/testing/integration.rb#328 ActionDispatch::Integration::Runner::APP_SESSIONS = T.let(T.unsafe(nil), Hash) # An instance of this class represents a set of requests and responses @@ -11082,17 +11630,15 @@ ActionDispatch::Integration::Runner::APP_SESSIONS = T.let(T.unsafe(nil), Hash) # multiple sessions and run them side-by-side, you can also mimic (to some # limited extent) multiple simultaneous users interacting with your system. # -# Typically, you will instantiate a new session using -# IntegrationTest#open_session, rather than instantiating -# Integration::Session directly. +# Typically, you will instantiate a new session using Runner#open_session, +# rather than instantiating a \Session directly. # -# source://actionpack//lib/action_dispatch/testing/integration.rb#84 +# source://actionpack//lib/action_dispatch/testing/integration.rb#89 class ActionDispatch::Integration::Session include ::Minitest::Assertions - include ::ActionDispatch::Assertions::ResponseAssertions include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions::ResponseAssertions include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable include ::Rails::Dom::Testing::Assertions::SelectorAssertions include ::Rails::Dom::Testing::Assertions include ::ActionDispatch::Assertions @@ -11101,53 +11647,54 @@ class ActionDispatch::Integration::Session include ::ActionDispatch::TestProcess include ::ActionDispatch::Routing::PolymorphicRoutes include ::ActionDispatch::Routing::UrlFor + extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods - # Create and initialize a new Session instance. + # Create and initialize a new \Session instance. # # @return [Session] a new instance of Session # - # source://actionpack//lib/action_dispatch/testing/integration.rb#126 + # source://actionpack//lib/action_dispatch/testing/integration.rb#131 def initialize(app); end # The Accept header to send. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#103 + # source://actionpack//lib/action_dispatch/testing/integration.rb#108 def accept; end # The Accept header to send. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#103 + # source://actionpack//lib/action_dispatch/testing/integration.rb#108 def accept=(_arg0); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#90 + # source://actionpack//lib/action_dispatch/testing/integration.rb#95 def body(*_arg0, **_arg1, &_arg2); end # A reference to the controller instance used by the last request. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#112 + # source://actionpack//lib/action_dispatch/testing/integration.rb#117 def controller; end # A map of the cookies returned by the last response, and which will be # sent with the next request. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#107 + # source://actionpack//lib/action_dispatch/testing/integration.rb#112 def cookies; end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options; end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options=(_arg0); end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options?; end - # source://actionpack//lib/action_dispatch/testing/integration.rb#90 + # source://actionpack//lib/action_dispatch/testing/integration.rb#95 def headers(*_arg0, **_arg1, &_arg2); end # The hostname used in the last request. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#94 + # source://actionpack//lib/action_dispatch/testing/integration.rb#99 def host; end # Sets the attribute host @@ -11157,14 +11704,14 @@ class ActionDispatch::Integration::Session # # @param value the value to set the attribute host to. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#97 + # source://actionpack//lib/action_dispatch/testing/integration.rb#102 def host!(_arg0); end # Sets the attribute host # # @param value the value to set the attribute host to. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#97 + # source://actionpack//lib/action_dispatch/testing/integration.rb#102 def host=(_arg0); end # Specify whether or not the session should mimic a secure HTTPS request. @@ -11172,7 +11719,7 @@ class ActionDispatch::Integration::Session # session.https! # session.https!(false) # - # source://actionpack//lib/action_dispatch/testing/integration.rb#174 + # source://actionpack//lib/action_dispatch/testing/integration.rb#179 def https!(flag = T.unsafe(nil)); end # Returns +true+ if the session is mimicking a secure HTTPS request. @@ -11183,10 +11730,10 @@ class ActionDispatch::Integration::Session # # @return [Boolean] # - # source://actionpack//lib/action_dispatch/testing/integration.rb#183 + # source://actionpack//lib/action_dispatch/testing/integration.rb#188 def https?; end - # source://actionpack//lib/action_dispatch/testing/integration.rb#91 + # source://actionpack//lib/action_dispatch/testing/integration.rb#96 def path(*_arg0, **_arg1, &_arg2); end # Performs the actual request. @@ -11211,9 +11758,10 @@ class ActionDispatch::Integration::Session # Supports +:json+ by default and will set the appropriate request headers. # The headers will be merged into the Rack env hash. # - # This method is rarely used directly. Use +#get+, +#post+, or other standard - # HTTP methods in integration tests. +#process+ is only required when using a - # request method that doesn't have a method defined in the integration tests. + # This method is rarely used directly. Use RequestHelpers#get, + # RequestHelpers#post, or other standard HTTP methods in integration + # tests. +#process+ is only required when using a request method that + # doesn't have a method defined in the integration tests. # # This method returns the response status, after performing the request. # Furthermore, if this method was called from an ActionDispatch::IntegrationTest object, @@ -11223,35 +11771,35 @@ class ActionDispatch::Integration::Session # Example: # process :get, '/author', params: { since: 201501011400 } # - # source://actionpack//lib/action_dispatch/testing/integration.rb#220 + # source://actionpack//lib/action_dispatch/testing/integration.rb#226 def process(method, path, params: T.unsafe(nil), headers: T.unsafe(nil), env: T.unsafe(nil), xhr: T.unsafe(nil), as: T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#90 + # source://actionpack//lib/action_dispatch/testing/integration.rb#95 def redirect?(*_arg0, **_arg1, &_arg2); end # The remote_addr used in the last request. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#100 + # source://actionpack//lib/action_dispatch/testing/integration.rb#105 def remote_addr; end # The remote_addr used in the last request. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#100 + # source://actionpack//lib/action_dispatch/testing/integration.rb#105 def remote_addr=(_arg0); end # A reference to the request instance used by the last request. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#115 + # source://actionpack//lib/action_dispatch/testing/integration.rb#120 def request; end # A running counter of the number of requests processed. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#121 + # source://actionpack//lib/action_dispatch/testing/integration.rb#126 def request_count; end # A running counter of the number of requests processed. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#121 + # source://actionpack//lib/action_dispatch/testing/integration.rb#126 def request_count=(_arg0); end # Resets the instance. This can be used to reset the state information @@ -11260,49 +11808,49 @@ class ActionDispatch::Integration::Session # # session.reset! # - # source://actionpack//lib/action_dispatch/testing/integration.rb#150 + # source://actionpack//lib/action_dispatch/testing/integration.rb#155 def reset!; end # A reference to the response instance used by the last request. # - # source://actionpack//lib/action_dispatch/testing/integration.rb#118 + # source://actionpack//lib/action_dispatch/testing/integration.rb#123 def response; end - # source://actionpack//lib/action_dispatch/testing/integration.rb#90 + # source://actionpack//lib/action_dispatch/testing/integration.rb#95 def status(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#90 + # source://actionpack//lib/action_dispatch/testing/integration.rb#95 def status_message(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#133 + # source://actionpack//lib/action_dispatch/testing/integration.rb#138 def url_options; end private - # source://actionpack//lib/action_dispatch/testing/integration.rb#300 + # source://actionpack//lib/action_dispatch/testing/integration.rb#309 def _mock_session; end # @yield [location] # - # source://actionpack//lib/action_dispatch/testing/integration.rb#308 + # source://actionpack//lib/action_dispatch/testing/integration.rb#317 def build_expanded_path(path); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#304 + # source://actionpack//lib/action_dispatch/testing/integration.rb#313 def build_full_uri(path, env); end class << self - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options; end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options=(value); end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options?; end end end -# source://actionpack//lib/action_dispatch/testing/integration.rb#85 +# source://actionpack//lib/action_dispatch/testing/integration.rb#90 ActionDispatch::Integration::Session::DEFAULT_HOST = T.let(T.unsafe(nil), String) # An integration test spans multiple controllers and actions, @@ -11310,8 +11858,9 @@ ActionDispatch::Integration::Session::DEFAULT_HOST = T.let(T.unsafe(nil), String # more completely than either unit or functional tests do, exercising the # entire stack, from the dispatcher to the database. # -# At its simplest, you simply extend IntegrationTest and write your tests -# using the get/post methods: +# At its simplest, you simply extend IntegrationTest and write your +# tests using the Integration::RequestHelpers#get and/or +# Integration::RequestHelpers#post methods: # # require "test_helper" # @@ -11482,7 +12031,7 @@ ActionDispatch::Integration::Session::DEFAULT_HOST = T.let(T.unsafe(nil), String # the request format to JSON unless overridden), sets the content type to # "application/json" and encodes the parameters as JSON. # -# Calling +parsed_body+ on the response parses the response body based on the +# Calling TestResponse#parsed_body on the response parses the response body based on the # last response MIME type. # # Out of the box, only :json is supported. But for any custom MIME @@ -11494,17 +12043,16 @@ ActionDispatch::Integration::Session::DEFAULT_HOST = T.let(T.unsafe(nil), String # # Where +param_encoder+ defines how the params should be encoded and # +response_parser+ defines how the response body should be parsed through -# +parsed_body+. +# TestResponse#parsed_body. # -# Consult the Rails Testing Guide for more. +# Consult the {Rails Testing Guide}[https://guides.rubyonrails.org/testing.html] for more. # -# source://actionpack//lib/action_dispatch/testing/integration.rb#631 +# source://actionpack//lib/action_dispatch/testing/integration.rb#641 class ActionDispatch::IntegrationTest < ::ActiveSupport::TestCase include ::ActionDispatch::TestProcess::FixtureFile - include ::ActionDispatch::Assertions::ResponseAssertions include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions::ResponseAssertions include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable include ::Rails::Dom::Testing::Assertions::SelectorAssertions include ::Rails::Dom::Testing::Assertions include ::ActionDispatch::Assertions @@ -11517,12 +12065,11 @@ class ActionDispatch::IntegrationTest < ::ActiveSupport::TestCase extend ::ActionDispatch::IntegrationTest::Behavior::ClassMethods end -# source://actionpack//lib/action_dispatch/testing/integration.rb#641 +# source://actionpack//lib/action_dispatch/testing/integration.rb#651 module ActionDispatch::IntegrationTest::Behavior - include ::ActionDispatch::Assertions::ResponseAssertions include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions::ResponseAssertions include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable include ::Rails::Dom::Testing::Assertions::SelectorAssertions include ::Rails::Dom::Testing::Assertions include ::ActionDispatch::Assertions @@ -11534,30 +12081,30 @@ module ActionDispatch::IntegrationTest::Behavior mixes_in_class_methods ::ActionDispatch::IntegrationTest::Behavior::ClassMethods - # source://actionpack//lib/action_dispatch/testing/integration.rb#672 + # source://actionpack//lib/action_dispatch/testing/integration.rb#682 def app; end - # source://actionpack//lib/action_dispatch/testing/integration.rb#676 + # source://actionpack//lib/action_dispatch/testing/integration.rb#686 def document_root_element; end end -# source://actionpack//lib/action_dispatch/testing/integration.rb#654 +# source://actionpack//lib/action_dispatch/testing/integration.rb#664 module ActionDispatch::IntegrationTest::Behavior::ClassMethods - # source://actionpack//lib/action_dispatch/testing/integration.rb#655 + # source://actionpack//lib/action_dispatch/testing/integration.rb#665 def app; end - # source://actionpack//lib/action_dispatch/testing/integration.rb#663 + # source://actionpack//lib/action_dispatch/testing/integration.rb#673 def app=(app); end - # source://actionpack//lib/action_dispatch/testing/integration.rb#667 + # source://actionpack//lib/action_dispatch/testing/integration.rb#677 def register_encoder(*args, **options); end end -# source://actionpack//lib/action_dispatch/testing/integration.rb#634 +# source://actionpack//lib/action_dispatch/testing/integration.rb#644 module ActionDispatch::IntegrationTest::UrlOptions extend ::ActiveSupport::Concern - # source://actionpack//lib/action_dispatch/testing/integration.rb#636 + # source://actionpack//lib/action_dispatch/testing/integration.rb#646 def url_options; end end @@ -11701,7 +12248,7 @@ class ActionDispatch::Journey::Formatter # source://actionpack//lib/action_dispatch/journey/formatter.rb#13 def initialize(routes); end - # source://actionpack//lib/action_dispatch/journey/formatter.rb#97 + # source://actionpack//lib/action_dispatch/journey/formatter.rb#103 def clear; end # source://actionpack//lib/action_dispatch/journey/formatter.rb#59 @@ -11714,30 +12261,30 @@ class ActionDispatch::Journey::Formatter private - # source://actionpack//lib/action_dispatch/journey/formatter.rb#196 + # source://actionpack//lib/action_dispatch/journey/formatter.rb#202 def build_cache; end - # source://actionpack//lib/action_dispatch/journey/formatter.rb#207 + # source://actionpack//lib/action_dispatch/journey/formatter.rb#213 def cache; end - # source://actionpack//lib/action_dispatch/journey/formatter.rb#102 + # source://actionpack//lib/action_dispatch/journey/formatter.rb#108 def extract_parameterized_parts(route, options, recall); end - # source://actionpack//lib/action_dispatch/journey/formatter.rb#129 + # source://actionpack//lib/action_dispatch/journey/formatter.rb#135 def match_route(name, options); end # Returns an array populated with missing keys if any are present. # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#168 + # source://actionpack//lib/action_dispatch/journey/formatter.rb#174 def missing_keys(route, parts); end - # source://actionpack//lib/action_dispatch/journey/formatter.rb#125 + # source://actionpack//lib/action_dispatch/journey/formatter.rb#131 def named_routes; end - # source://actionpack//lib/action_dispatch/journey/formatter.rb#151 + # source://actionpack//lib/action_dispatch/journey/formatter.rb#157 def non_recursive(cache, options); end - # source://actionpack//lib/action_dispatch/journey/formatter.rb#188 + # source://actionpack//lib/action_dispatch/journey/formatter.rb#194 def possibles(cache, options, depth = T.unsafe(nil)); end end @@ -12466,7 +13013,7 @@ class ActionDispatch::Journey::Route # @return [Route] a new instance of Route # # source://actionpack//lib/action_dispatch/journey/route.rb#56 - def initialize(name:, path:, app: T.unsafe(nil), constraints: T.unsafe(nil), required_defaults: T.unsafe(nil), defaults: T.unsafe(nil), request_method_match: T.unsafe(nil), precedence: T.unsafe(nil), scope_options: T.unsafe(nil), internal: T.unsafe(nil)); end + def initialize(name:, path:, app: T.unsafe(nil), constraints: T.unsafe(nil), required_defaults: T.unsafe(nil), defaults: T.unsafe(nil), request_method_match: T.unsafe(nil), precedence: T.unsafe(nil), scope_options: T.unsafe(nil), internal: T.unsafe(nil), source_location: T.unsafe(nil)); end # Returns the value of attribute app. # @@ -12495,18 +13042,18 @@ class ActionDispatch::Journey::Route # @return [Boolean] # - # source://actionpack//lib/action_dispatch/journey/route.rb#141 + # source://actionpack//lib/action_dispatch/journey/route.rb#142 def dispatcher?; end - # source://actionpack//lib/action_dispatch/journey/route.rb#77 + # source://actionpack//lib/action_dispatch/journey/route.rb#78 def eager_load!; end - # source://actionpack//lib/action_dispatch/journey/route.rb#119 + # source://actionpack//lib/action_dispatch/journey/route.rb#120 def format(path_options); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/journey/route.rb#137 + # source://actionpack//lib/action_dispatch/journey/route.rb#138 def glob?; end # Returns the value of attribute internal. @@ -12514,12 +13061,12 @@ class ActionDispatch::Journey::Route # source://actionpack//lib/action_dispatch/journey/route.rb#7 def internal; end - # source://actionpack//lib/action_dispatch/journey/route.rb#163 + # source://actionpack//lib/action_dispatch/journey/route.rb#164 def ip; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/journey/route.rb#145 + # source://actionpack//lib/action_dispatch/journey/route.rb#146 def matches?(request); end # Returns the value of attribute name. @@ -12527,7 +13074,7 @@ class ActionDispatch::Journey::Route # source://actionpack//lib/action_dispatch/journey/route.rb#7 def name; end - # source://actionpack//lib/action_dispatch/journey/route.rb#114 + # source://actionpack//lib/action_dispatch/journey/route.rb#115 def parts; end # Returns the value of attribute path. @@ -12542,16 +13089,16 @@ class ActionDispatch::Journey::Route # @return [Boolean] # - # source://actionpack//lib/action_dispatch/journey/route.rb#127 + # source://actionpack//lib/action_dispatch/journey/route.rb#128 def required_default?(key); end - # source://actionpack//lib/action_dispatch/journey/route.rb#131 + # source://actionpack//lib/action_dispatch/journey/route.rb#132 def required_defaults; end - # source://actionpack//lib/action_dispatch/journey/route.rb#102 + # source://actionpack//lib/action_dispatch/journey/route.rb#103 def required_keys; end - # source://actionpack//lib/action_dispatch/journey/route.rb#123 + # source://actionpack//lib/action_dispatch/journey/route.rb#124 def required_parts; end # Needed for `bin/rails routes`. Picks up succinctly defined requirements @@ -12563,12 +13110,12 @@ class ActionDispatch::Journey::Route # will have {:controller=>"photos", :action=>"show", :id=>/[A-Z]\d{5}/} # as requirements. # - # source://actionpack//lib/action_dispatch/journey/route.rb#92 + # source://actionpack//lib/action_dispatch/journey/route.rb#93 def requirements; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/journey/route.rb#167 + # source://actionpack//lib/action_dispatch/journey/route.rb#168 def requires_matching_verb?; end # Returns the value of attribute scope_options. @@ -12576,24 +13123,29 @@ class ActionDispatch::Journey::Route # source://actionpack//lib/action_dispatch/journey/route.rb#7 def scope_options; end - # source://actionpack//lib/action_dispatch/journey/route.rb#106 + # source://actionpack//lib/action_dispatch/journey/route.rb#107 def score(supplied_keys); end - # source://actionpack//lib/action_dispatch/journey/route.rb#114 + # source://actionpack//lib/action_dispatch/journey/route.rb#115 def segment_keys; end - # source://actionpack//lib/action_dispatch/journey/route.rb#98 + # source://actionpack//lib/action_dispatch/journey/route.rb#99 def segments; end - # source://actionpack//lib/action_dispatch/journey/route.rb#171 + # Returns the value of attribute source_location. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#7 + def source_location; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#172 def verb; end private - # source://actionpack//lib/action_dispatch/journey/route.rb#180 + # source://actionpack//lib/action_dispatch/journey/route.rb#181 def match_verb(request); end - # source://actionpack//lib/action_dispatch/journey/route.rb#176 + # source://actionpack//lib/action_dispatch/journey/route.rb#177 def verbs; end class << self @@ -12758,7 +13310,7 @@ class ActionDispatch::Journey::Router # source://actionpack//lib/action_dispatch/journey/router.rb#24 def eager_load!; end - # source://actionpack//lib/action_dispatch/journey/router.rb#65 + # source://actionpack//lib/action_dispatch/journey/router.rb#66 def recognize(rails_req); end # Returns the value of attribute routes. @@ -12776,30 +13328,30 @@ class ActionDispatch::Journey::Router # source://actionpack//lib/action_dispatch/journey/router.rb#31 def serve(req); end - # source://actionpack//lib/action_dispatch/journey/router.rb#78 + # source://actionpack//lib/action_dispatch/journey/router.rb#79 def visualizer; end private - # source://actionpack//lib/action_dispatch/journey/router.rb#92 + # source://actionpack//lib/action_dispatch/journey/router.rb#93 def ast; end - # source://actionpack//lib/action_dispatch/journey/router.rb#100 + # source://actionpack//lib/action_dispatch/journey/router.rb#101 def custom_routes; end - # source://actionpack//lib/action_dispatch/journey/router.rb#104 + # source://actionpack//lib/action_dispatch/journey/router.rb#105 def filter_routes(path); end - # source://actionpack//lib/action_dispatch/journey/router.rb#109 + # source://actionpack//lib/action_dispatch/journey/router.rb#110 def find_routes(req); end - # source://actionpack//lib/action_dispatch/journey/router.rb#134 + # source://actionpack//lib/action_dispatch/journey/router.rb#135 def match_head_routes(routes, req); end - # source://actionpack//lib/action_dispatch/journey/router.rb#86 + # source://actionpack//lib/action_dispatch/journey/router.rb#87 def partitioned_routes; end - # source://actionpack//lib/action_dispatch/journey/router.rb#96 + # source://actionpack//lib/action_dispatch/journey/router.rb#97 def simulator; end end @@ -12917,7 +13469,7 @@ class ActionDispatch::Journey::Routes # @return [Routes] a new instance of Routes # # source://actionpack//lib/action_dispatch/journey/routes.rb#12 - def initialize; end + def initialize(routes = T.unsafe(nil)); end # source://actionpack//lib/action_dispatch/journey/routes.rb#65 def add_route(name, mapping); end @@ -13201,7 +13753,24 @@ end # source://actionpack//lib/action_dispatch/journey/visitors.rb#55 ActionDispatch::Journey::Visitors::Visitor::DISPATCH_CACHE = T.let(T.unsafe(nil), Hash) -# source://actionpack//lib/action_dispatch/middleware/stack.rb#7 +# source://actionpack//lib/action_dispatch/log_subscriber.rb#4 +class ActionDispatch::LogSubscriber < ::ActiveSupport::LogSubscriber + # source://actionpack//lib/action_dispatch/log_subscriber.rb#5 + def redirect(event); end + + class << self + # source://activesupport/7.1.3.2/lib/active_support/log_subscriber.rb#87 + def log_levels; end + end +end + +# = Action Dispatch \MiddlewareStack +# +# Read more about {Rails middleware +# stack}[https://guides.rubyonrails.org/rails_on_rack.html#action-dispatcher-middleware-stack] +# in the guides. +# +# source://actionpack//lib/action_dispatch/middleware/stack.rb#12 class ActionDispatch::MiddlewareStack include ::Enumerable @@ -13209,13 +13778,13 @@ class ActionDispatch::MiddlewareStack # @yield [_self] # @yieldparam _self [ActionDispatch::MiddlewareStack] the object that the method was called on # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#70 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#75 def initialize(*args); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#87 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#92 def [](i); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#160 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#165 def build(app = T.unsafe(nil), &block); end # Deletes a middleware from the middleware stack. @@ -13223,7 +13792,7 @@ class ActionDispatch::MiddlewareStack # Returns the array of middlewares not including the deleted item, or # returns nil if the target is not found. # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#125 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#130 def delete(target); end # Deletes a middleware from the middleware stack. @@ -13231,69 +13800,69 @@ class ActionDispatch::MiddlewareStack # Returns the array of middlewares not including the deleted item, or # raises +RuntimeError+ if the target is not found. # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#133 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#138 def delete!(target); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#75 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#80 def each(&block); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#100 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#105 def insert(index, klass, *args, **_arg3, &block); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#108 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#113 def insert_after(index, *args, **_arg2, &block); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#100 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#105 def insert_before(index, klass, *args, **_arg3, &block); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#83 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#88 def last; end # Returns the value of attribute middlewares. # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#68 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#73 def middlewares; end # Sets the attribute middlewares # # @param value the value to set the attribute middlewares to. # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#68 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#73 def middlewares=(_arg0); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#137 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#142 def move(target, source); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#147 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#152 def move_after(target, source); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#137 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#142 def move_before(target, source); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#79 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#84 def size; end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#114 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#119 def swap(target, *args, **_arg2, &block); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#91 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#96 def unshift(klass, *args, **_arg2, &block); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#155 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#160 def use(klass, *args, **_arg2, &block); end private - # source://actionpack//lib/action_dispatch/middleware/stack.rb#172 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#177 def assert_index(index, where); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#178 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#183 def build_middleware(klass, args, block); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#182 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#187 def index_of(klass); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#96 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#101 def initialize_copy(other); end end @@ -13301,61 +13870,63 @@ end # It proxies the +call+ method transparently and instruments the method # call. # -# source://actionpack//lib/action_dispatch/middleware/stack.rb#48 +# source://actionpack//lib/action_dispatch/middleware/stack.rb#53 class ActionDispatch::MiddlewareStack::InstrumentationProxy # @return [InstrumentationProxy] a new instance of InstrumentationProxy # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#51 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#56 def initialize(middleware, class_name); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#59 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#64 def call(env); end end -# source://actionpack//lib/action_dispatch/middleware/stack.rb#49 +# source://actionpack//lib/action_dispatch/middleware/stack.rb#54 ActionDispatch::MiddlewareStack::InstrumentationProxy::EVENT_NAME = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/middleware/stack.rb#8 +# source://actionpack//lib/action_dispatch/middleware/stack.rb#13 class ActionDispatch::MiddlewareStack::Middleware # @return [Middleware] a new instance of Middleware # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#11 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#16 def initialize(klass, args, block); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#19 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#24 def ==(middleware); end # Returns the value of attribute args. # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#9 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#14 def args; end # Returns the value of attribute block. # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#9 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#14 def block; end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#36 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#41 def build(app); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#40 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#45 def build_instrumented(app); end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#28 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#33 def inspect; end # Returns the value of attribute klass. # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#9 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#14 def klass; end - # source://actionpack//lib/action_dispatch/middleware/stack.rb#17 + # source://actionpack//lib/action_dispatch/middleware/stack.rb#22 def name; end end -# source://actionpack//lib/action_dispatch.rb#43 +# source://actionpack//lib/action_dispatch.rb#56 class ActionDispatch::MissingController < ::NameError; end +# = Action Dispatch \PermissionsPolicy +# # Configures the HTTP # {Feature-Policy}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy] # response header to specify which browser features the current document and @@ -13372,97 +13943,121 @@ class ActionDispatch::MissingController < ::NameError; end # policy.payment :self, "https://secure.example.com" # end # -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#22 +# The Feature-Policy header has been renamed to Permissions-Policy. +# The Permissions-Policy requires a different implementation and isn't +# yet supported by all browsers. To avoid having to rename this +# middleware in the future we use the new name for the middleware but +# keep the old header name and implementation for now. +# +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#29 class ActionDispatch::PermissionsPolicy # @return [PermissionsPolicy] a new instance of PermissionsPolicy # @yield [_self] # @yieldparam _self [ActionDispatch::PermissionsPolicy] the object that the method was called on # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#113 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 def initialize; end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 def accelerometer(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 def ambient_light_sensor(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 def autoplay(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#132 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#154 def build(context = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 def camera(*sources); end # Returns the value of attribute directives. # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#111 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#114 def directives; end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 def encrypted_media(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 def fullscreen(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 def geolocation(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 def gyroscope(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + def hid(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + def idle_detection(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 def magnetometer(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 def microphone(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 def midi(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 def payment(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 def picture_in_picture(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + def screen_wake_lock(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + def serial(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#136 def speaker(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + def sync_xhr(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 def usb(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#136 def vibrate(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#136 def vr(*sources); end + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + def web_share(*sources); end + private - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#150 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#172 def apply_mapping(source); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#137 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#159 def apply_mappings(sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#168 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#190 def build_directive(sources, context); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#156 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#178 def build_directives(context); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#118 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#121 def initialize_copy(other); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#172 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#194 def resolve_source(source, context); end end # List of available permissions can be found at -# https://github.com/w3c/webappsec-permissions-policy/blob/master/features.md#policy-controlled-features +# https://github.com/w3c/webappsec-permissions-policy/blob/main/features.md#policy-controlled-features # # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#89 ActionDispatch::PermissionsPolicy::DIRECTIVES = T.let(T.unsafe(nil), Hash) @@ -13470,14 +14065,14 @@ ActionDispatch::PermissionsPolicy::DIRECTIVES = T.let(T.unsafe(nil), Hash) # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#82 ActionDispatch::PermissionsPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#23 +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#30 class ActionDispatch::PermissionsPolicy::Middleware # @return [Middleware] a new instance of Middleware # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#32 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#31 def initialize(app); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#36 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#35 def call(env); end private @@ -13492,24 +14087,12 @@ class ActionDispatch::PermissionsPolicy::Middleware # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#65 def policy_empty?(policy); end - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#61 - def policy_present?(headers); end -end - -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#24 -ActionDispatch::PermissionsPolicy::Middleware::CONTENT_TYPE = T.let(T.unsafe(nil), String) - -# The Feature-Policy header has been renamed to Permissions-Policy. -# The Permissions-Policy requires a different implementation and isn't -# yet supported by all browsers. To avoid having to rename this -# middleware in the future we use the new name for the middleware but -# keep the old header name and implementation for now. -# -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#30 -ActionDispatch::PermissionsPolicy::Middleware::POLICY = T.let(T.unsafe(nil), String) - + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#61 + def policy_present?(headers); end +end + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#70 module ActionDispatch::PermissionsPolicy::Request # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#73 @@ -13522,6 +14105,8 @@ end # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#71 ActionDispatch::PermissionsPolicy::Request::POLICY = T.let(T.unsafe(nil), String) +# = Action Dispatch \PublicExceptions +# # When called, this middleware renders an error page. By default if an HTML # response is expected it will render static error pages from the /public # directory. For example when this middleware receives a 500 response it will @@ -13533,61 +14118,63 @@ ActionDispatch::PermissionsPolicy::Request::POLICY = T.let(T.unsafe(nil), String # When a request with a content type other than HTML is made, this middleware # will attempt to convert error information into the appropriate response type. # -# source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#14 +# source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#16 class ActionDispatch::PublicExceptions # @return [PublicExceptions] a new instance of PublicExceptions # - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#17 + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#19 def initialize(public_path); end - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#21 + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#23 def call(env); end # Returns the value of attribute public_path. # - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#15 + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#17 def public_path; end # Sets the attribute public_path # # @param value the value to set the attribute public_path to. # - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#15 + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#17 def public_path=(_arg0); end private - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#35 + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#37 def render(status, content_type, body); end - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#44 + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#46 def render_format(status, content_type, body); end - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#49 + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#51 def render_html(status); end end -# source://actionpack//lib/action_dispatch/railtie.rb#7 +# source://actionpack//lib/action_dispatch/railtie.rb#8 class ActionDispatch::Railtie < ::Rails::Railtie; end -# ActionDispatch::Reloader wraps the request with callbacks provided by ActiveSupport::Reloader -# callbacks, intended to assist with code reloading during development. +# = Action Dispatch \Reloader # -# By default, ActionDispatch::Reloader is included in the middleware stack -# only in the development environment; specifically, when +config.cache_classes+ -# is false. +# ActionDispatch::Reloader wraps the request with callbacks provided by +# ActiveSupport::Reloader, intended to assist with code reloading during +# development. # -# source://actionpack//lib/action_dispatch/middleware/reloader.rb#10 +# ActionDispatch::Reloader is included in the middleware stack only if +# reloading is enabled, which it is by the default in +development+ mode. +# +# source://actionpack//lib/action_dispatch/middleware/reloader.rb#12 class ActionDispatch::Reloader < ::ActionDispatch::Executor; end +# = Action Dispatch \RemoteIp +# # This middleware calculates the IP address of the remote client that is # making the request. It does this by checking various headers that could # contain the address, and then picking the last-set address that is not # on the list of trusted IPs. This follows the precedent set by e.g. -# {the Tomcat server}[https://issues.apache.org/bugzilla/show_bug.cgi?id=50453], -# with {reasoning explained at length}[https://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection] -# by @gingerlime. A more detailed explanation of the algorithm is given -# at GetIp#calculate_ip. +# {the Tomcat server}[https://issues.apache.org/bugzilla/show_bug.cgi?id=50453]. +# A more detailed explanation of the algorithm is given at GetIp#calculate_ip. # # Some Rack servers concatenate repeated headers, like {HTTP RFC 2616}[https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2] # requires. Some Rack servers simply drop preceding headers, and only report @@ -13601,9 +14188,10 @@ class ActionDispatch::Reloader < ::ActionDispatch::Executor; end # a proxy, because you are hosted on e.g. Heroku without SSL, any client can # claim to have any IP address by setting the +X-Forwarded-For+ header. If you # care about that, then you need to explicitly drop or ignore those headers -# sometime before this middleware runs. +# sometime before this middleware runs. Alternatively, remove this middleware +# to avoid inadvertently relying on it. # -# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#28 +# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#29 class ActionDispatch::RemoteIp # Create a new +RemoteIp+ middleware instance. # @@ -13622,7 +14210,7 @@ class ActionDispatch::RemoteIp # # @return [RemoteIp] a new instance of RemoteIp # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#60 + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#61 def initialize(app, ip_spoofing_check = T.unsafe(nil), custom_proxies = T.unsafe(nil)); end # Since the IP address may not be needed, we store the object here @@ -13630,17 +14218,17 @@ class ActionDispatch::RemoteIp # requests. For those requests that do need to know the IP, the # GetIp#calculate_ip method will calculate the memoized client IP address. # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#90 + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#89 def call(env); end # Returns the value of attribute check_ip. # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#44 + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#45 def check_ip; end # Returns the value of attribute proxies. # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#44 + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#45 def proxies; end end @@ -13648,11 +14236,11 @@ end # into an actual IP address. If the ActionDispatch::Request#remote_ip method # is called, this class will calculate the value and then memoize it. # -# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#99 +# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#98 class ActionDispatch::RemoteIp::GetIp # @return [GetIp] a new instance of GetIp # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#100 + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#99 def initialize(req, check_ip, proxies); end # Sort through the various IP address headers, looking for the IP most @@ -13666,7 +14254,7 @@ class ActionDispatch::RemoteIp::GetIp # proxies, that header may contain a list of IPs. Other proxy services # set the +Client-Ip+ header instead, so we check that too. # - # As discussed in {this post about Rails IP Spoofing}[https://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection/], + # As discussed in {this post about Rails IP Spoofing}[https://web.archive.org/web/20170626095448/https://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection/], # while the first IP in the list is likely to be the "originating" IP, # it could also have been set by the client maliciously. # @@ -13674,7 +14262,7 @@ class ActionDispatch::RemoteIp::GetIp # take the list of IPs, remove known and trusted proxies, and then take # the last address left, which was presumably set by one of those proxies. # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#124 + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#123 def calculate_ip; end # Memoizes the value returned by #calculate_ip and returns it for @@ -13685,14 +14273,14 @@ class ActionDispatch::RemoteIp::GetIp private - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#186 + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#187 def filter_proxies(ips); end # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#172 def ips_from(header); end end -# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#29 +# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#30 class ActionDispatch::RemoteIp::IpSpoofAttackError < ::StandardError; end # The default trusted IPs list simply includes IP addresses that are @@ -13700,7 +14288,7 @@ class ActionDispatch::RemoteIp::IpSpoofAttackError < ::StandardError; end # not be the ultimate client IP in production, and so are discarded. See # https://en.wikipedia.org/wiki/Private_network for details. # -# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#35 +# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#36 ActionDispatch::RemoteIp::TRUSTED_PROXIES = T.let(T.unsafe(nil), Array) # source://actionpack//lib/action_dispatch/http/request.rb#18 @@ -13725,12 +14313,12 @@ class ActionDispatch::Request # Override Rack's GET method to support indifferent access. # - # source://actionpack//lib/action_dispatch/http/request.rb#371 + # source://actionpack//lib/action_dispatch/http/request.rb#388 def GET; end # Override Rack's POST method to support indifferent access. # - # source://actionpack//lib/action_dispatch/http/request.rb#387 + # source://actionpack//lib/action_dispatch/http/request.rb#404 def POST; end # source://actionpack//lib/action_dispatch/http/request.rb#50 @@ -13751,16 +14339,16 @@ class ActionDispatch::Request # Returns the authorization header regardless of whether it was specified directly or through one of the # proxy alternatives. # - # source://actionpack//lib/action_dispatch/http/request.rb#403 + # source://actionpack//lib/action_dispatch/http/request.rb#420 def authorization; end # The request body is an IO input stream. If the RAW_POST_DATA environment # variable is already set, wrap it in a StringIO. # - # source://actionpack//lib/action_dispatch/http/request.rb#333 + # source://actionpack//lib/action_dispatch/http/request.rb#349 def body; end - # source://actionpack//lib/action_dispatch/http/request.rb#354 + # source://actionpack//lib/action_dispatch/http/request.rb#370 def body_stream; end # source://actionpack//lib/action_dispatch/http/request.rb#50 @@ -13772,12 +14360,15 @@ class ActionDispatch::Request # source://actionpack//lib/action_dispatch/http/request.rb#70 def commit_cookie_jar!; end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#62 + # source://actionpack//lib/action_dispatch/http/request.rb#452 + def commit_csrf_token; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#64 def commit_flash; end # Returns the content length of the request as an integer. # - # source://actionpack//lib/action_dispatch/http/request.rb#269 + # source://actionpack//lib/action_dispatch/http/request.rb#285 def content_length; end # source://actionpack//lib/action_dispatch/http/request.rb#79 @@ -13786,16 +14377,16 @@ class ActionDispatch::Request # source://actionpack//lib/action_dispatch/http/request.rb#85 def controller_class_for(name); end - # source://actionpack//lib/action_dispatch/http/request.rb#170 + # source://actionpack//lib/action_dispatch/http/request.rb#182 def controller_instance; end - # source://actionpack//lib/action_dispatch/http/request.rb#174 + # source://actionpack//lib/action_dispatch/http/request.rb#186 def controller_instance=(controller); end - # source://actionpack//lib/action_dispatch/http/request.rb#156 + # source://actionpack//lib/action_dispatch/http/request.rb#168 def engine_script_name(_routes); end - # source://actionpack//lib/action_dispatch/http/request.rb#160 + # source://actionpack//lib/action_dispatch/http/request.rb#172 def engine_script_name=(name); end # Determine whether the request body contains form-data by checking @@ -13809,7 +14400,7 @@ class ActionDispatch::Request # # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/request.rb#350 + # source://actionpack//lib/action_dispatch/http/request.rb#366 def form_data?; end # source://actionpack//lib/action_dispatch/http/request.rb#50 @@ -13823,7 +14414,7 @@ class ActionDispatch::Request # # get "/articles?page=2" # request.fullpath # => "/articles?page=2" # - # source://actionpack//lib/action_dispatch/http/request.rb#248 + # source://actionpack//lib/action_dispatch/http/request.rb#264 def fullpath; end # source://actionpack//lib/action_dispatch/http/request.rb#50 @@ -13833,10 +14424,10 @@ class ActionDispatch::Request # # request.headers["Content-Type"] # => "text/plain" # - # source://actionpack//lib/action_dispatch/http/request.rb#209 + # source://actionpack//lib/action_dispatch/http/request.rb#225 def headers; end - # source://actionpack//lib/action_dispatch/http/request.rb#178 + # source://actionpack//lib/action_dispatch/http/request.rb#190 def http_auth_salt; end # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#18 @@ -13845,12 +14436,12 @@ class ActionDispatch::Request # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#18 def ignore_accept_header=(val); end - # source://actionpack//lib/action_dispatch/http/request.rb#427 + # source://actionpack//lib/action_dispatch/http/request.rb#444 def inspect; end # Returns the IP address of client as a +String+. # - # source://actionpack//lib/action_dispatch/http/request.rb#282 + # source://actionpack//lib/action_dispatch/http/request.rb#299 def ip; end # Returns true if the request has a header matching the given key parameter. @@ -13866,10 +14457,10 @@ class ActionDispatch::Request # # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/request.rb#411 + # source://actionpack//lib/action_dispatch/http/request.rb#428 def local?; end - # source://actionpack//lib/action_dispatch/http/request.rb#420 + # source://actionpack//lib/action_dispatch/http/request.rb#437 def logger; end # The +String+ MIME type of the request. @@ -13877,19 +14468,22 @@ class ActionDispatch::Request # # get "/articles" # request.media_type # => "application/x-www-form-urlencoded" # - # source://actionpack//lib/action_dispatch/http/request.rb#264 + # source://actionpack//lib/action_dispatch/http/request.rb#280 def media_type; end # Returns the original value of the environment's REQUEST_METHOD, # even if it was overridden by middleware. See #request_method for # more information. # - # source://actionpack//lib/action_dispatch/http/request.rb#197 - def method; end + # For debugging purposes, when called with arguments this method will + # fall back to Object#method + # + # source://actionpack//lib/action_dispatch/http/request.rb#205 + def method(*args, **_arg1); end # Returns a symbol form of the #method. # - # source://actionpack//lib/action_dispatch/http/request.rb#202 + # source://actionpack//lib/action_dispatch/http/request.rb#218 def method_symbol; end # source://actionpack//lib/action_dispatch/http/request.rb#50 @@ -13906,7 +14500,7 @@ class ActionDispatch::Request # # get '/foo?bar' # request.original_fullpath # => '/foo?bar' # - # source://actionpack//lib/action_dispatch/http/request.rb#237 + # source://actionpack//lib/action_dispatch/http/request.rb#253 def original_fullpath; end # source://actionpack//lib/action_dispatch/http/request.rb#50 @@ -13917,7 +14511,7 @@ class ActionDispatch::Request # # get "/articles?page=2" # request.original_url # => "http://www.example.com/articles?page=2" # - # source://actionpack//lib/action_dispatch/http/request.rb#256 + # source://actionpack//lib/action_dispatch/http/request.rb#272 def original_url; end # source://actionpack//lib/action_dispatch/http/request.rb#50 @@ -13928,16 +14522,16 @@ class ActionDispatch::Request # Override Rack's GET method to support indifferent access. # - # source://actionpack//lib/action_dispatch/http/request.rb#371 + # source://actionpack//lib/action_dispatch/http/request.rb#388 def query_parameters; end # Read the request \body. This is useful for web services that need to # work with raw requests directly. # - # source://actionpack//lib/action_dispatch/http/request.rb#322 + # source://actionpack//lib/action_dispatch/http/request.rb#339 def raw_post; end - # source://rack/2.2.7/lib/rack/request.rb#157 + # source://rack/3.0.9.1/lib/rack/request.rb#197 def raw_request_method; end # source://actionpack//lib/action_dispatch/http/request.rb#50 @@ -13952,10 +14546,10 @@ class ActionDispatch::Request # Returns the IP address of client as a +String+, # usually set by the RemoteIp middleware. # - # source://actionpack//lib/action_dispatch/http/request.rb#288 + # source://actionpack//lib/action_dispatch/http/request.rb#305 def remote_ip; end - # source://actionpack//lib/action_dispatch/http/request.rb#292 + # source://actionpack//lib/action_dispatch/http/request.rb#309 def remote_ip=(remote_ip); end # source://actionpack//lib/action_dispatch/http/request.rb#50 @@ -13968,10 +14562,10 @@ class ActionDispatch::Request # This unique ID is useful for tracing a request from end-to-end as part of logging or debugging. # This relies on the Rack variable set by the ActionDispatch::RequestId middleware. # - # source://actionpack//lib/action_dispatch/http/request.rb#305 + # source://actionpack//lib/action_dispatch/http/request.rb#322 def request_id; end - # source://actionpack//lib/action_dispatch/http/request.rb#309 + # source://actionpack//lib/action_dispatch/http/request.rb#326 def request_id=(id); end # Returns the HTTP \method that the application should see. @@ -13984,35 +14578,49 @@ class ActionDispatch::Request # source://actionpack//lib/action_dispatch/http/request.rb#144 def request_method; end - # source://actionpack//lib/action_dispatch/http/request.rb#164 + # source://actionpack//lib/action_dispatch/http/request.rb#176 def request_method=(request_method); end # Returns a symbol form of the #request_method. # - # source://actionpack//lib/action_dispatch/http/request.rb#190 + # source://actionpack//lib/action_dispatch/http/request.rb#195 def request_method_symbol; end # Override Rack's POST method to support indifferent access. # - # source://actionpack//lib/action_dispatch/http/request.rb#387 + # source://actionpack//lib/action_dispatch/http/request.rb#404 def request_parameters; end - # source://actionpack//lib/action_dispatch/http/request.rb#415 + # source://actionpack//lib/action_dispatch/http/request.rb#432 def request_parameters=(params); end - # source://actionpack//lib/action_dispatch/middleware/flash.rb#75 + # source://actionpack//lib/action_dispatch/http/request.rb#448 + def reset_csrf_token; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#77 def reset_session; end - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#19 + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#27 def return_only_media_type_on_content_type; end - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#19 - def return_only_media_type_on_content_type=(val); end + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#20 + def return_only_media_type_on_content_type=(value); end + + # Returns the URI pattern of the matched route for the request, + # using the same format as `bin/rails routes`: + # + # request.route_uri_pattern # => "/:controller(/:action(/:id))(.:format)" + # + # source://actionpack//lib/action_dispatch/http/request.rb#152 + def route_uri_pattern; end + + # source://actionpack//lib/action_dispatch/http/request.rb#156 + def route_uri_pattern=(pattern); end - # source://actionpack//lib/action_dispatch/http/request.rb#148 + # source://actionpack//lib/action_dispatch/http/request.rb#160 def routes; end - # source://actionpack//lib/action_dispatch/http/request.rb#152 + # source://actionpack//lib/action_dispatch/http/request.rb#164 def routes=(routes); end # Early Hints is an HTTP/2 status code that indicates hints to help a client start @@ -14027,7 +14635,7 @@ class ActionDispatch::Request # If you are using +javascript_include_tag+ or +stylesheet_link_tag+ the # Early Hints headers are included by default if supported. # - # source://actionpack//lib/action_dispatch/http/request.rb#224 + # source://actionpack//lib/action_dispatch/http/request.rb#240 def send_early_hints(links); end # source://actionpack//lib/action_dispatch/http/request.rb#50 @@ -14038,20 +14646,15 @@ class ActionDispatch::Request # Returns the lowercase name of the HTTP server software. # - # source://actionpack//lib/action_dispatch/http/request.rb#316 + # source://actionpack//lib/action_dispatch/http/request.rb#333 def server_software; end - # source://actionpack//lib/action_dispatch/http/request.rb#362 + # source://actionpack//lib/action_dispatch/http/request.rb#379 def session=(session); end - # source://actionpack//lib/action_dispatch/http/request.rb#366 + # source://actionpack//lib/action_dispatch/http/request.rb#383 def session_options=(options); end - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/request.rb#182 - def show_exceptions?; end - # Returns the unique request id, which is based on either the +X-Request-Id+ header that can # be generated by a firewall, load balancer, or web server, or by the RequestId middleware # (which sets the +action_dispatch.request_id+ environment variable). @@ -14059,7 +14662,7 @@ class ActionDispatch::Request # This unique ID is useful for tracing a request from end-to-end as part of logging or debugging. # This relies on the Rack variable set by the ActionDispatch::RequestId middleware. # - # source://actionpack//lib/action_dispatch/http/request.rb#305 + # source://actionpack//lib/action_dispatch/http/request.rb#322 def uuid; end # source://actionpack//lib/action_dispatch/http/request.rb#50 @@ -14083,7 +14686,7 @@ class ActionDispatch::Request # # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/request.rb#276 + # source://actionpack//lib/action_dispatch/http/request.rb#293 def xhr?; end # Returns true if the +X-Requested-With+ header contains "XMLHttpRequest" @@ -14092,17 +14695,20 @@ class ActionDispatch::Request # # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/request.rb#276 + # source://actionpack//lib/action_dispatch/http/request.rb#293 def xml_http_request?; end private - # source://actionpack//lib/action_dispatch/http/request.rb#432 + # source://actionpack//lib/action_dispatch/http/request.rb#457 def check_method(name); end - # source://actionpack//lib/action_dispatch/http/request.rb#437 + # source://actionpack//lib/action_dispatch/http/request.rb#465 def default_session; end + # source://actionpack//lib/action_dispatch/http/request.rb#469 + def read_body_stream; end + class << self # source://actionpack//lib/action_dispatch/http/request.rb#56 def empty; end @@ -14115,16 +14721,10 @@ class ActionDispatch::Request # source://actionpack//lib/action_dispatch/http/parameters.rb#28 def parameter_parsers; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#19 - def return_only_media_type_on_content_type; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#19 - def return_only_media_type_on_content_type=(val); end end end -# source://actionpack//lib/action_dispatch/http/request.rb#297 +# source://actionpack//lib/action_dispatch/http/request.rb#314 ActionDispatch::Request::ACTION_DISPATCH_REQUEST_ID = T.let(T.unsafe(nil), String) # source://actionpack//lib/action_dispatch/http/request.rb#34 @@ -14205,49 +14805,49 @@ class ActionDispatch::Request::Session # Returns value of the key stored in the session or # +nil+ if the given key is not found in the session. # - # source://actionpack//lib/action_dispatch/request/session.rb#110 + # source://actionpack//lib/action_dispatch/request/session.rb#112 def [](key); end # Writes given value to given key of the session. # - # source://actionpack//lib/action_dispatch/request/session.rb#150 + # source://actionpack//lib/action_dispatch/request/session.rb#152 def []=(key, value); end # Clears the session. # - # source://actionpack//lib/action_dispatch/request/session.rb#156 + # source://actionpack//lib/action_dispatch/request/session.rb#158 def clear; end # Deletes given key from the session. # - # source://actionpack//lib/action_dispatch/request/session.rb#184 + # source://actionpack//lib/action_dispatch/request/session.rb#191 def delete(key); end - # source://actionpack//lib/action_dispatch/request/session.rb#95 + # source://actionpack//lib/action_dispatch/request/session.rb#97 def destroy; end # Returns the nested value specified by the sequence of keys, returning # +nil+ if any intermediate step is +nil+. # - # source://actionpack//lib/action_dispatch/request/session.rb#123 + # source://actionpack//lib/action_dispatch/request/session.rb#125 def dig(*keys); end - # source://actionpack//lib/action_dispatch/request/session.rb#240 + # source://actionpack//lib/action_dispatch/request/session.rb#242 def each(&block); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/request/session.rb#230 + # source://actionpack//lib/action_dispatch/request/session.rb#237 def empty?; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/request/session.rb#87 + # source://actionpack//lib/action_dispatch/request/session.rb#89 def enabled?; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/request/session.rb#220 + # source://actionpack//lib/action_dispatch/request/session.rb#227 def exists?; end # Returns value of the given key from the session, or raises +KeyError+ @@ -14265,60 +14865,74 @@ class ActionDispatch::Request::Session # end # # => :bar # - # source://actionpack//lib/action_dispatch/request/session.rb#203 + # source://actionpack//lib/action_dispatch/request/session.rb#210 def fetch(key, default = T.unsafe(nil), &block); end # Returns true if the session has the given key or false. # # @return [Boolean] # - # source://actionpack//lib/action_dispatch/request/session.rb#130 + # source://actionpack//lib/action_dispatch/request/session.rb#132 def has_key?(key); end - # source://actionpack//lib/action_dispatch/request/session.rb#83 + # source://actionpack//lib/action_dispatch/request/session.rb#85 def id; end + # source://actionpack//lib/action_dispatch/request/session.rb#246 + def id_was; end + # Returns true if the session has the given key or false. # # @return [Boolean] # - # source://actionpack//lib/action_dispatch/request/session.rb#130 + # source://actionpack//lib/action_dispatch/request/session.rb#132 def include?(key); end - # source://actionpack//lib/action_dispatch/request/session.rb#212 + # source://actionpack//lib/action_dispatch/request/session.rb#219 def inspect; end # Returns true if the session has the given key or false. # # @return [Boolean] # - # source://actionpack//lib/action_dispatch/request/session.rb#130 + # source://actionpack//lib/action_dispatch/request/session.rb#132 def key?(key); end # Returns keys of the session as Array. # - # source://actionpack//lib/action_dispatch/request/session.rb#138 + # source://actionpack//lib/action_dispatch/request/session.rb#140 def keys; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/request/session.rb#226 + # source://actionpack//lib/action_dispatch/request/session.rb#233 def loaded?; end - # source://actionpack//lib/action_dispatch/request/session.rb#235 - def merge!(other); end + # Updates the session with given Hash. + # + # session.to_hash + # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2"} + # + # session.update({ "foo" => "bar" }) + # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} + # + # session.to_hash + # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} + # + # source://actionpack//lib/action_dispatch/request/session.rb#180 + def merge!(hash); end - # source://actionpack//lib/action_dispatch/request/session.rb#91 + # source://actionpack//lib/action_dispatch/request/session.rb#93 def options; end # Returns the session as Hash. # - # source://actionpack//lib/action_dispatch/request/session.rb#162 + # source://actionpack//lib/action_dispatch/request/session.rb#164 def to_h; end # Returns the session as Hash. # - # source://actionpack//lib/action_dispatch/request/session.rb#162 + # source://actionpack//lib/action_dispatch/request/session.rb#164 def to_hash; end # Updates the session with given Hash. @@ -14332,26 +14946,26 @@ class ActionDispatch::Request::Session # session.to_hash # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} # - # source://actionpack//lib/action_dispatch/request/session.rb#178 + # source://actionpack//lib/action_dispatch/request/session.rb#180 def update(hash); end # Returns values of the session as Array. # - # source://actionpack//lib/action_dispatch/request/session.rb#144 + # source://actionpack//lib/action_dispatch/request/session.rb#146 def values; end private - # source://actionpack//lib/action_dispatch/request/session.rb#261 + # source://actionpack//lib/action_dispatch/request/session.rb#268 def load!; end - # source://actionpack//lib/action_dispatch/request/session.rb#257 + # source://actionpack//lib/action_dispatch/request/session.rb#264 def load_for_delete!; end - # source://actionpack//lib/action_dispatch/request/session.rb#245 + # source://actionpack//lib/action_dispatch/request/session.rb#252 def load_for_read!; end - # source://actionpack//lib/action_dispatch/request/session.rb#249 + # source://actionpack//lib/action_dispatch/request/session.rb#256 def load_for_write!; end class << self @@ -14448,23 +15062,23 @@ class ActionDispatch::Request::Utils end end -# source://actionpack//lib/action_dispatch/request/utils.rb#81 +# source://actionpack//lib/action_dispatch/request/utils.rb#83 class ActionDispatch::Request::Utils::CustomParamEncoder class << self - # source://actionpack//lib/action_dispatch/request/utils.rb#94 + # source://actionpack//lib/action_dispatch/request/utils.rb#99 def action_encoding_template(request, controller, action); end - # source://actionpack//lib/action_dispatch/request/utils.rb#82 + # source://actionpack//lib/action_dispatch/request/utils.rb#84 def encode(request, params, controller, action); end end end # Remove nils from the params hash. # -# source://actionpack//lib/action_dispatch/request/utils.rb#73 +# source://actionpack//lib/action_dispatch/request/utils.rb#75 class ActionDispatch::Request::Utils::NoNilParamEncoder < ::ActionDispatch::Request::Utils::ParamEncoder class << self - # source://actionpack//lib/action_dispatch/request/utils.rb#74 + # source://actionpack//lib/action_dispatch/request/utils.rb#76 def handle_array(params); end end end @@ -14472,7 +15086,7 @@ end # source://actionpack//lib/action_dispatch/request/utils.rb#48 class ActionDispatch::Request::Utils::ParamEncoder class << self - # source://actionpack//lib/action_dispatch/request/utils.rb#67 + # source://actionpack//lib/action_dispatch/request/utils.rb#69 def handle_array(params); end # Convert nested Hash to HashWithIndifferentAccess. @@ -14538,54 +15152,56 @@ module ActionDispatch::RequestCookieMethods def use_cookies_with_metadata; end end -# source://actionpack//lib/action_dispatch/testing/request_encoder.rb#4 +# source://actionpack//lib/action_dispatch/testing/request_encoder.rb#6 class ActionDispatch::RequestEncoder # @return [RequestEncoder] a new instance of RequestEncoder # - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#16 + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#18 def initialize(mime_name, param_encoder, response_parser); end - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#32 + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#34 def accept_header; end - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#28 + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#30 def content_type; end - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#36 + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#38 def encode_params(params); end # Returns the value of attribute response_parser. # - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#14 + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#16 def response_parser; end class << self - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#45 + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#47 def encoder(name); end - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#40 + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#42 def parser(content_type); end - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#49 + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#51 def register_encoder(mime_name, param_encoder: T.unsafe(nil), response_parser: T.unsafe(nil)); end end end -# source://actionpack//lib/action_dispatch/testing/request_encoder.rb#5 +# source://actionpack//lib/action_dispatch/testing/request_encoder.rb#7 class ActionDispatch::RequestEncoder::IdentityEncoder - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#7 + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#9 def accept_header; end - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#6 + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#8 def content_type; end - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#8 + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#10 def encode_params(params); end - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#9 + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#11 def response_parser; end end +# = Action Dispatch \RequestId +# # Makes a unique request id available to the +action_dispatch.request_id+ env variable (which is then accessible # through ActionDispatch::Request#request_id or the alias ActionDispatch::Request#uuid) and sends # the same id to the client via the +X-Request-Id+ header. @@ -14597,42 +15213,42 @@ end # The unique request id can be used to trace a request end-to-end and would typically end up being part of log files # from multiple pieces of the stack. # -# source://actionpack//lib/action_dispatch/middleware/request_id.rb#17 +# source://actionpack//lib/action_dispatch/middleware/request_id.rb#19 class ActionDispatch::RequestId # @return [RequestId] a new instance of RequestId # - # source://actionpack//lib/action_dispatch/middleware/request_id.rb#18 + # source://actionpack//lib/action_dispatch/middleware/request_id.rb#20 def initialize(app, header:); end - # source://actionpack//lib/action_dispatch/middleware/request_id.rb#23 + # source://actionpack//lib/action_dispatch/middleware/request_id.rb#25 def call(env); end private - # source://actionpack//lib/action_dispatch/middleware/request_id.rb#38 + # source://actionpack//lib/action_dispatch/middleware/request_id.rb#40 def internal_request_id; end - # source://actionpack//lib/action_dispatch/middleware/request_id.rb#30 + # source://actionpack//lib/action_dispatch/middleware/request_id.rb#32 def make_request_id(request_id); end end +# = Action Dispatch \Response +# # Represents an HTTP response generated by a controller action. Use it to # retrieve the current state of the response, or customize the response. It can # either represent a real HTTP response (i.e. one that is meant to be sent # back to the web browser) or a TestResponse (i.e. one that is generated # from integration tests). # -# \Response is mostly a Ruby on \Rails framework implementation detail, and -# should never be used directly in controllers. Controllers should use the -# methods defined in ActionController::Base instead. For example, if you want -# to set the HTTP response's content MIME type, then use -# ActionControllerBase#headers instead of Response#headers. +# The \Response object for the current request is exposed on controllers as +# ActionController::Metal#response. ActionController::Metal also provides a +# few additional methods that delegate to attributes of the \Response such as +# ActionController::Metal#headers. # -# Nevertheless, integration tests may want to inspect controller responses in -# more detail, and that's when \Response can be useful for application -# developers. Integration test methods such as -# Integration::RequestHelpers#get and Integration::RequestHelpers#post return -# objects of type TestResponse (which are of course also of type \Response). +# Integration tests will likely also want to inspect responses in +# more detail. Methods such as Integration::RequestHelpers#get +# and Integration::RequestHelpers#post return instances of +# TestResponse (which inherits from \Response) for this purpose. # # For example, the following demo integration test prints the body of the # controller response to the console: @@ -14655,50 +15271,50 @@ class ActionDispatch::Response # @yield [_self] # @yieldparam _self [ActionDispatch::Response] the object that the method was called on # - # source://actionpack//lib/action_dispatch/http/response.rb#161 - def initialize(status = T.unsafe(nil), header = T.unsafe(nil), body = T.unsafe(nil)); end + # source://actionpack//lib/action_dispatch/http/response.rb#169 + def initialize(status = T.unsafe(nil), headers = T.unsafe(nil), body = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/http/response.rb#71 + # source://actionpack//lib/action_dispatch/http/response.rb#73 def [](*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_dispatch/http/response.rb#71 + # source://actionpack//lib/action_dispatch/http/response.rb#73 def []=(*_arg0, **_arg1, &_arg2); end # Aliasing these off because AD::Http::Cache::Response defines them. # - # source://rack/2.2.7/lib/rack/response.rb#229 + # source://rack/3.0.9.1/lib/rack/response.rb#289 def _cache_control; end - # source://rack/2.2.7/lib/rack/response.rb#233 - def _cache_control=(v); end + # source://rack/3.0.9.1/lib/rack/response.rb#293 + def _cache_control=(value); end - # source://actionpack//lib/action_dispatch/http/response.rb#370 + # source://actionpack//lib/action_dispatch/http/response.rb#382 def abort; end - # source://actionpack//lib/action_dispatch/http/response.rb#183 + # source://actionpack//lib/action_dispatch/http/response.rb#195 def await_commit; end - # source://actionpack//lib/action_dispatch/http/response.rb#189 + # source://actionpack//lib/action_dispatch/http/response.rb#201 def await_sent; end # Returns the content of the response as a string. This contains the contents # of any calls to render. # - # source://actionpack//lib/action_dispatch/http/response.rb#304 + # source://actionpack//lib/action_dispatch/http/response.rb#316 def body; end # Allows you to manually set or override the response body. # - # source://actionpack//lib/action_dispatch/http/response.rb#313 + # source://actionpack//lib/action_dispatch/http/response.rb#325 def body=(body); end - # source://actionpack//lib/action_dispatch/http/response.rb#357 + # source://actionpack//lib/action_dispatch/http/response.rb#369 def body_parts; end # The charset of the response. HTML wants to know the encoding of the # content you're giving them, so we need to send that along. # - # source://actionpack//lib/action_dispatch/http/response.rb#274 + # source://actionpack//lib/action_dispatch/http/response.rb#286 def charset; end # Sets the HTTP character set. In case of +nil+ parameter @@ -14707,28 +15323,28 @@ class ActionDispatch::Response # response.charset = 'utf-16' # => 'utf-16' # response.charset = nil # => 'utf-8' # - # source://actionpack//lib/action_dispatch/http/response.rb#263 + # source://actionpack//lib/action_dispatch/http/response.rb#275 def charset=(charset); end - # source://actionpack//lib/action_dispatch/http/response.rb#366 + # source://actionpack//lib/action_dispatch/http/response.rb#378 def close; end - # Returns a string to ensure compatibility with Net::HTTPResponse. + # Returns a string to ensure compatibility with +Net::HTTPResponse+. # - # source://actionpack//lib/action_dispatch/http/response.rb#285 + # source://actionpack//lib/action_dispatch/http/response.rb#297 def code; end - # source://actionpack//lib/action_dispatch/http/response.rb#193 + # source://actionpack//lib/action_dispatch/http/response.rb#205 def commit!; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/response.rb#217 + # source://actionpack//lib/action_dispatch/http/response.rb#229 def committed?; end # Content type of response. # - # source://actionpack//lib/action_dispatch/http/response.rb#243 + # source://actionpack//lib/action_dispatch/http/response.rb#255 def content_type; end # Sets the HTTP response's content MIME type. For example, in the controller @@ -14740,55 +15356,79 @@ class ActionDispatch::Response # the character set information will also be included in the content type # information. # - # source://actionpack//lib/action_dispatch/http/response.rb#233 + # source://actionpack//lib/action_dispatch/http/response.rb#245 def content_type=(content_type); end # Returns the response cookies, converted to a Hash of (name => value) pairs # # assert_equal 'AuthorOfNewPage', r.cookies['author'] # - # source://actionpack//lib/action_dispatch/http/response.rb#394 + # source://actionpack//lib/action_dispatch/http/response.rb#406 def cookies; end - # source://actionpack//lib/action_dispatch/http/response.rb#85 + # source://actionpack//lib/action_dispatch/http/response.rb#86 def default_charset; end - # source://actionpack//lib/action_dispatch/http/response.rb#85 + # source://actionpack//lib/action_dispatch/http/response.rb#86 def default_charset=(val); end - # source://actionpack//lib/action_dispatch/http/response.rb#86 + # source://actionpack//lib/action_dispatch/http/response.rb#87 def default_headers; end - # source://actionpack//lib/action_dispatch/http/response.rb#86 + # source://actionpack//lib/action_dispatch/http/response.rb#87 def default_headers=(val); end - # source://actionpack//lib/action_dispatch/http/response.rb#181 + # source://actionpack//lib/action_dispatch/http/response.rb#193 def delete_header(key); end - # source://actionpack//lib/action_dispatch/http/response.rb#73 + # source://actionpack//lib/action_dispatch/http/response.rb#75 def each(&block); end - # source://actionpack//lib/action_dispatch/http/response.rb#179 + # source://actionpack//lib/action_dispatch/http/response.rb#191 def get_header(key); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/response.rb#178 + # source://actionpack//lib/action_dispatch/http/response.rb#190 def has_header?(key); end - # Get headers for this response. + # The headers for the response. + # + # header["Content-Type"] # => "text/plain" + # header["Content-Type"] = "application/json" + # header["Content-Type"] # => "application/json" # - # source://actionpack//lib/action_dispatch/http/response.rb#67 + # Also aliased as +headers+. + # + # headers["Content-Type"] # => "text/plain" + # headers["Content-Type"] = "application/json" + # headers["Content-Type"] # => "application/json" + # + # Also aliased as +header+ for compatibility. + # + # source://actionpack//lib/action_dispatch/http/response.rb#69 def header; end - # Get headers for this response. + # The headers for the response. + # + # header["Content-Type"] # => "text/plain" + # header["Content-Type"] = "application/json" + # header["Content-Type"] # => "application/json" # - # source://actionpack//lib/action_dispatch/http/response.rb#67 + # Also aliased as +headers+. + # + # headers["Content-Type"] # => "text/plain" + # headers["Content-Type"] = "application/json" + # headers["Content-Type"] # => "application/json" + # + # Also aliased as +header+ for compatibility. + # + # source://actionpack//lib/action_dispatch/http/response.rb#69 def headers; end # Media type of response. # - # source://actionpack//lib/action_dispatch/http/response.rb#248 + # source://actionpack//lib/action_dispatch/http/response.rb#260 def media_type; end # Returns the corresponding message for the current HTTP status code: @@ -14799,7 +15439,7 @@ class ActionDispatch::Response # response.status = 404 # response.message # => "Not Found" # - # source://actionpack//lib/action_dispatch/http/response.rb#297 + # source://actionpack//lib/action_dispatch/http/response.rb#309 def message; end # Turns the Response into a Rack-compatible array of the status, headers, @@ -14807,67 +15447,67 @@ class ActionDispatch::Response # # status, headers, body = *response # - # source://actionpack//lib/action_dispatch/http/response.rb#385 + # source://actionpack//lib/action_dispatch/http/response.rb#397 def prepare!; end # The location header we'll be responding with. # - # source://rack/2.2.7/lib/rack/response.rb#204 + # source://rack/3.0.9.1/lib/rack/response.rb#261 def redirect_url; end # The request that the response is responding to. # - # source://actionpack//lib/action_dispatch/http/response.rb#61 + # source://actionpack//lib/action_dispatch/http/response.rb#51 def request; end # The request that the response is responding to. # - # source://actionpack//lib/action_dispatch/http/response.rb#61 + # source://actionpack//lib/action_dispatch/http/response.rb#51 def request=(_arg0); end - # source://actionpack//lib/action_dispatch/http/response.rb#353 + # source://actionpack//lib/action_dispatch/http/response.rb#365 def reset_body!; end # The response code of the request. # - # source://actionpack//lib/action_dispatch/http/response.rb#280 + # source://actionpack//lib/action_dispatch/http/response.rb#292 def response_code; end # Send the file stored at +path+ as the response body. # - # source://actionpack//lib/action_dispatch/http/response.rb#348 + # source://actionpack//lib/action_dispatch/http/response.rb#360 def send_file(path); end - # source://actionpack//lib/action_dispatch/http/response.rb#201 + # source://actionpack//lib/action_dispatch/http/response.rb#213 def sending!; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/response.rb#216 + # source://actionpack//lib/action_dispatch/http/response.rb#228 def sending?; end - # source://actionpack//lib/action_dispatch/http/response.rb#252 + # source://actionpack//lib/action_dispatch/http/response.rb#264 def sending_file=(v); end - # source://actionpack//lib/action_dispatch/http/response.rb#209 + # source://actionpack//lib/action_dispatch/http/response.rb#221 def sent!; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/response.rb#218 + # source://actionpack//lib/action_dispatch/http/response.rb#230 def sent?; end - # source://actionpack//lib/action_dispatch/http/response.rb#180 + # source://actionpack//lib/action_dispatch/http/response.rb#192 def set_header(key, v); end # The HTTP status code. # - # source://actionpack//lib/action_dispatch/http/response.rb#64 + # source://actionpack//lib/action_dispatch/http/response.rb#54 def status; end # Sets the HTTP status code. # - # source://actionpack//lib/action_dispatch/http/response.rb#221 + # source://actionpack//lib/action_dispatch/http/response.rb#233 def status=(status); end # Returns the corresponding message for the current HTTP status code: @@ -14878,12 +15518,12 @@ class ActionDispatch::Response # response.status = 404 # response.message # => "Not Found" # - # source://actionpack//lib/action_dispatch/http/response.rb#297 + # source://actionpack//lib/action_dispatch/http/response.rb#309 def status_message; end # The underlying body, as a streamable object. # - # source://actionpack//lib/action_dispatch/http/response.rb#159 + # source://actionpack//lib/action_dispatch/http/response.rb#167 def stream; end # Turns the Response into a Rack-compatible array of the status, headers, @@ -14891,110 +15531,118 @@ class ActionDispatch::Response # # status, headers, body = *response # - # source://actionpack//lib/action_dispatch/http/response.rb#385 + # source://actionpack//lib/action_dispatch/http/response.rb#397 def to_a; end - # source://actionpack//lib/action_dispatch/http/response.rb#308 + # source://actionpack//lib/action_dispatch/http/response.rb#320 def write(string); end private - # source://actionpack//lib/action_dispatch/http/response.rb#466 + # source://actionpack//lib/action_dispatch/http/response.rb#477 def assign_default_content_type_and_charset!; end - # source://actionpack//lib/action_dispatch/http/response.rb#438 + # source://actionpack//lib/action_dispatch/http/response.rb#450 def before_committed; end - # source://actionpack//lib/action_dispatch/http/response.rb#446 + # source://actionpack//lib/action_dispatch/http/response.rb#458 def before_sending; end - # source://actionpack//lib/action_dispatch/http/response.rb#458 + # source://actionpack//lib/action_dispatch/http/response.rb#469 def build_buffer(response, body); end - # source://actionpack//lib/action_dispatch/http/response.rb#506 + # source://actionpack//lib/action_dispatch/http/response.rb#527 def handle_no_content!; end - # source://actionpack//lib/action_dispatch/http/response.rb#462 + # source://actionpack//lib/action_dispatch/http/response.rb#473 def munge_body_object(body); end - # source://actionpack//lib/action_dispatch/http/response.rb#418 + # source://actionpack//lib/action_dispatch/http/response.rb#430 def parse_content_type(content_type); end # Small internal convenience method to get the parsed version of the current # content type header. # - # source://actionpack//lib/action_dispatch/http/response.rb#428 + # source://actionpack//lib/action_dispatch/http/response.rb#440 def parsed_content_type_header; end - # source://actionpack//lib/action_dispatch/http/response.rb#513 - def rack_response(status, header); end + # source://actionpack//lib/action_dispatch/http/response.rb#534 + def rack_response(status, headers); end - # source://actionpack//lib/action_dispatch/http/response.rb#432 + # source://actionpack//lib/action_dispatch/http/response.rb#444 def set_content_type(content_type, charset); end class << self - # source://actionpack//lib/action_dispatch/http/response.rb#149 - def create(status = T.unsafe(nil), header = T.unsafe(nil), body = T.unsafe(nil), default_headers: T.unsafe(nil)); end + # source://actionpack//lib/action_dispatch/http/response.rb#157 + def create(status = T.unsafe(nil), headers = T.unsafe(nil), body = T.unsafe(nil), default_headers: T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/http/response.rb#85 + # source://actionpack//lib/action_dispatch/http/response.rb#86 def default_charset; end - # source://actionpack//lib/action_dispatch/http/response.rb#85 + # source://actionpack//lib/action_dispatch/http/response.rb#86 def default_charset=(val); end - # source://actionpack//lib/action_dispatch/http/response.rb#86 + # source://actionpack//lib/action_dispatch/http/response.rb#87 def default_headers; end - # source://actionpack//lib/action_dispatch/http/response.rb#86 + # source://actionpack//lib/action_dispatch/http/response.rb#87 def default_headers=(val); end - # source://actionpack//lib/action_dispatch/http/response.rb#154 + # source://actionpack//lib/action_dispatch/http/response.rb#162 def merge_default_headers(original, default); end end end -# source://actionpack//lib/action_dispatch/http/response.rb#97 +# source://actionpack//lib/action_dispatch/http/response.rb#98 class ActionDispatch::Response::Buffer # @return [Buffer] a new instance of Buffer # - # source://actionpack//lib/action_dispatch/http/response.rb#98 + # source://actionpack//lib/action_dispatch/http/response.rb#99 def initialize(response, buf); end - # source://actionpack//lib/action_dispatch/http/response.rb#131 + # @raise [IOError] + # + # source://actionpack//lib/action_dispatch/http/response.rb#120 + def <<(string); end + + # source://actionpack//lib/action_dispatch/http/response.rb#139 def abort; end - # source://actionpack//lib/action_dispatch/http/response.rb#105 + # source://actionpack//lib/action_dispatch/http/response.rb#112 def body; end - # source://actionpack//lib/action_dispatch/http/response.rb#134 + # source://actionpack//lib/action_dispatch/http/response.rb#142 def close; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/response.rb#139 + # source://actionpack//lib/action_dispatch/http/response.rb#147 def closed?; end - # source://actionpack//lib/action_dispatch/http/response.rb#121 + # source://actionpack//lib/action_dispatch/http/response.rb#129 def each(&block); end + # source://actionpack//lib/action_dispatch/http/response.rb#106 + def to_ary; end + # @raise [IOError] # - # source://actionpack//lib/action_dispatch/http/response.rb#113 + # source://actionpack//lib/action_dispatch/http/response.rb#120 def write(string); end private - # source://actionpack//lib/action_dispatch/http/response.rb#144 + # source://actionpack//lib/action_dispatch/http/response.rb#152 def each_chunk(&block); end end -# source://actionpack//lib/action_dispatch/http/response.rb#80 +# source://actionpack//lib/action_dispatch/http/response.rb#82 ActionDispatch::Response::CONTENT_TYPE = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/http/response.rb#412 +# source://actionpack//lib/action_dispatch/http/response.rb#424 ActionDispatch::Response::CONTENT_TYPE_PARSER = T.let(T.unsafe(nil), Regexp) -# source://actionpack//lib/action_dispatch/http/response.rb#409 +# source://actionpack//lib/action_dispatch/http/response.rb#421 class ActionDispatch::Response::ContentTypeHeader < ::Struct # Returns the value of attribute charset # @@ -15031,77 +15679,74 @@ end # Rack::Sendfile will usually intercept the response and uses # the path directly, so there is no reason to open the file. # -# source://actionpack//lib/action_dispatch/http/response.rb#326 +# source://actionpack//lib/action_dispatch/http/response.rb#338 class ActionDispatch::Response::FileBody # @return [FileBody] a new instance of FileBody # - # source://actionpack//lib/action_dispatch/http/response.rb#329 + # source://actionpack//lib/action_dispatch/http/response.rb#341 def initialize(path); end - # source://actionpack//lib/action_dispatch/http/response.rb#333 + # source://actionpack//lib/action_dispatch/http/response.rb#345 def body; end # Stream the file's contents if Rack::Sendfile isn't present. # - # source://actionpack//lib/action_dispatch/http/response.rb#338 + # source://actionpack//lib/action_dispatch/http/response.rb#350 def each; end - # source://actionpack//lib/action_dispatch/http/response.rb#327 + # source://actionpack//lib/action_dispatch/http/response.rb#339 def to_path; end end -# source://actionpack//lib/action_dispatch/http/response.rb#37 -class ActionDispatch::Response::Header - # @return [Header] a new instance of Header - # - # source://actionpack//lib/action_dispatch/http/response.rb#38 - def initialize(response, header); end - - # source://actionpack//lib/action_dispatch/http/response.rb#43 - def []=(k, v); end - - # source://actionpack//lib/action_dispatch/http/response.rb#51 - def merge(other); end - - # source://actionpack//lib/action_dispatch/http/response.rb#55 - def to_hash; end -end +# To be deprecated: +# +# source://actionpack//lib/action_dispatch/http/response.rb#48 +ActionDispatch::Response::Header = Rack::Headers -# source://actionpack//lib/action_dispatch/http/response.rb#82 -ActionDispatch::Response::LOCATION = T.let(T.unsafe(nil), String) +# source://actionpack//lib/action_dispatch/http/response.rb#40 +ActionDispatch::Response::Headers = Rack::Headers -# source://actionpack//lib/action_dispatch/http/response.rb#83 +# source://actionpack//lib/action_dispatch/http/response.rb#84 ActionDispatch::Response::NO_CONTENT_CODES = T.let(T.unsafe(nil), Array) -# source://actionpack//lib/action_dispatch/http/response.rb#410 +# source://actionpack//lib/action_dispatch/http/response.rb#422 ActionDispatch::Response::NullContentTypeHeader = T.let(T.unsafe(nil), ActionDispatch::Response::ContentTypeHeader) -# source://actionpack//lib/action_dispatch/http/response.rb#474 +# source://actionpack//lib/action_dispatch/http/response.rb#485 class ActionDispatch::Response::RackBody # @return [RackBody] a new instance of RackBody # - # source://actionpack//lib/action_dispatch/http/response.rb#475 + # source://actionpack//lib/action_dispatch/http/response.rb#486 def initialize(response); end - # source://actionpack//lib/action_dispatch/http/response.rb#489 + # source://actionpack//lib/action_dispatch/http/response.rb#496 def body; end - # source://actionpack//lib/action_dispatch/http/response.rb#483 + # source://actionpack//lib/action_dispatch/http/response.rb#518 + def call(*arguments, &block); end + + # source://actionpack//lib/action_dispatch/http/response.rb#490 def close; end - # source://actionpack//lib/action_dispatch/http/response.rb#479 + # source://actionpack//lib/action_dispatch/http/response.rb#514 def each(*args, &block); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/response.rb#493 + # source://actionpack//lib/action_dispatch/http/response.rb#502 def respond_to?(method, include_private = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/http/response.rb#501 + # source://actionpack//lib/action_dispatch/http/response.rb#510 + def to_ary; end + + # source://actionpack//lib/action_dispatch/http/response.rb#522 def to_path; end end -# source://actionpack//lib/action_dispatch/http/response.rb#81 +# source://actionpack//lib/action_dispatch/http/response.rb#500 +ActionDispatch::Response::RackBody::BODY_METHODS = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/response.rb#83 ActionDispatch::Response::SET_COOKIE = T.let(T.unsafe(nil), String) # The routing module provides URL rewriting in native Ruby. It's a way to @@ -15220,9 +15865,9 @@ ActionDispatch::Response::SET_COOKIE = T.let(T.unsafe(nil), String) # # # In config/routes.rb # controller :blog do -# get 'blog/show', to: :list -# get 'blog/delete', to: :delete -# get 'blog/edit', to: :edit +# get 'blog/show' => :list +# get 'blog/delete' => :delete +# get 'blog/edit' => :edit # end # # # provides named routes for show, delete, and edit @@ -15341,88 +15986,97 @@ ActionDispatch::Response::SET_COOKIE = T.let(T.unsafe(nil), String) # # == View a list of all your routes # -# rails routes +# $ bin/rails routes # # Target a specific controller with -c, or grep routes # using -g. Useful in conjunction with --expanded # which displays routes vertically. # -# source://actionpack//lib/action_dispatch/routing.rb#248 +# source://actionpack//lib/action_dispatch/routing.rb#246 module ActionDispatch::Routing extend ::ActiveSupport::Autoload end -# source://actionpack//lib/action_dispatch/routing/inspector.rb#129 +# source://actionpack//lib/action_dispatch/routing/inspector.rb#153 module ActionDispatch::Routing::ConsoleFormatter; end -# source://actionpack//lib/action_dispatch/routing/inspector.rb#130 +# source://actionpack//lib/action_dispatch/routing/inspector.rb#154 class ActionDispatch::Routing::ConsoleFormatter::Base # @return [Base] a new instance of Base # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#131 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#155 def initialize; end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#145 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#169 def header(routes); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#148 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#172 def no_routes(routes, filter); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#135 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#159 def result; end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#142 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#166 def section(routes); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#139 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#163 def section_title(title); end end -# source://actionpack//lib/action_dispatch/routing/inspector.rb#202 +# source://actionpack//lib/action_dispatch/routing/inspector.rb#226 class ActionDispatch::Routing::ConsoleFormatter::Expanded < ::ActionDispatch::Routing::ConsoleFormatter::Base # @return [Expanded] a new instance of Expanded # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#203 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#227 def initialize(width: T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#212 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#236 def section(routes); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#208 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#232 def section_title(title); end private - # source://actionpack//lib/action_dispatch/routing/inspector.rb#217 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#241 def draw_expanded_section(routes); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#229 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#256 def route_header(index:); end end -# source://actionpack//lib/action_dispatch/routing/inspector.rb#166 +# source://actionpack//lib/action_dispatch/routing/inspector.rb#190 class ActionDispatch::Routing::ConsoleFormatter::Sheet < ::ActionDispatch::Routing::ConsoleFormatter::Base - # source://actionpack//lib/action_dispatch/routing/inspector.rb#175 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#199 def header(routes); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#171 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#195 def section(routes); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#167 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#191 def section_title(title); end private - # source://actionpack//lib/action_dispatch/routing/inspector.rb#189 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#213 def draw_header(routes); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#180 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#204 def draw_section(routes); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#195 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#219 def widths(routes); end end +# source://actionpack//lib/action_dispatch/routing/inspector.rb#261 +class ActionDispatch::Routing::ConsoleFormatter::Unused < ::ActionDispatch::Routing::ConsoleFormatter::Sheet + # source://actionpack//lib/action_dispatch/routing/inspector.rb#262 + def header(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#270 + def no_routes(routes, filter); end +end + # source://actionpack//lib/action_dispatch/routing/endpoint.rb#5 class ActionDispatch::Routing::Endpoint # source://actionpack//lib/action_dispatch/routing/endpoint.rb#9 @@ -15455,28 +16109,28 @@ end # source://actionpack//lib/action_dispatch/routing.rb#258 ActionDispatch::Routing::HTTP_METHODS = T.let(T.unsafe(nil), Array) -# source://actionpack//lib/action_dispatch/routing/inspector.rb#235 +# source://actionpack//lib/action_dispatch/routing/inspector.rb#283 class ActionDispatch::Routing::HtmlTableFormatter # @return [HtmlTableFormatter] a new instance of HtmlTableFormatter # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#236 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#284 def initialize(view); end # The header is part of the HTML page, so we don't construct it here. # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#250 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#298 def header(routes); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#253 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#301 def no_routes(*_arg0); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#266 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#314 def result; end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#245 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#293 def section(routes); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#241 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#289 def section_title(title); end end @@ -15492,35 +16146,47 @@ class ActionDispatch::Routing::Mapper # @return [Mapper] a new instance of Mapper # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2302 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2313 def initialize(set); end class << self - # source://actionpack//lib/action_dispatch/routing/mapper.rb#381 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#16 + def backtrace_cleaner; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#16 + def backtrace_cleaner=(val); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#392 def normalize_name(name); end # Invokes Journey::Router::Utils.normalize_path, then ensures that # /(:locale) becomes (/:locale). Except for root cases, where the # former is the correct one. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#364 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#375 def normalize_path(path); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#15 + def route_source_locations; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#15 + def route_source_locations=(val); end end end -# source://actionpack//lib/action_dispatch/routing/mapper.rb#385 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#396 module ActionDispatch::Routing::Mapper::Base - # source://actionpack//lib/action_dispatch/routing/mapper.rb#618 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#629 def default_url_options(options); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#618 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#629 def default_url_options=(options); end # Query if the following named route was already defined. # # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#630 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#641 def has_named_route?(name); end # Matches a URL pattern to one or more routes. @@ -15704,7 +16370,7 @@ module ActionDispatch::Routing::Mapper::Base # Allows you to specify the default value for optional +format+ # segment or disable it by supplying +false+. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#566 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#577 def match(path, options = T.unsafe(nil)); end # Mount a Rack-based application to be used within the application. @@ -15729,23 +16395,23 @@ module ActionDispatch::Routing::Mapper::Base # # @raise [ArgumentError] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#588 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#599 def mount(app, options = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#623 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#634 def with_default_scope(scope, &block); end private - # source://actionpack//lib/action_dispatch/routing/mapper.rb#639 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#650 def app_name(app, rails_app); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#648 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#659 def define_generate_prefix(app, name); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#635 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#646 def rails_app?(app); end end @@ -15770,7 +16436,7 @@ end # concerns :commentable # end # -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2014 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2025 module ActionDispatch::Routing::Mapper::Concerns # Define a routing concern using a name. # @@ -15829,7 +16495,7 @@ module ActionDispatch::Routing::Mapper::Concerns # callable, they're accessible from the Mapper that's passed to # call. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2071 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2082 def concern(name, callable = T.unsafe(nil), &block); end # Use the named concerns @@ -15844,53 +16510,53 @@ module ActionDispatch::Routing::Mapper::Concerns # concerns :commentable # end # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2087 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2098 def concerns(*args); end end -# source://actionpack//lib/action_dispatch/routing/mapper.rb#15 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#18 class ActionDispatch::Routing::Mapper::Constraints < ::ActionDispatch::Routing::Endpoint # @return [Constraints] a new instance of Constraints # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#21 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#24 def initialize(app, constraints, strategy); end # Returns the value of attribute app. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#16 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#19 def app; end # Returns the value of attribute constraints. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#16 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#19 def constraints; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#36 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#39 def dispatcher?; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#38 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#41 def matches?(req); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#45 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#48 def serve(req); end private - # source://actionpack//lib/action_dispatch/routing/mapper.rb#52 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#55 def constraint_args(constraint, request); end end -# source://actionpack//lib/action_dispatch/routing/mapper.rb#19 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#22 ActionDispatch::Routing::Mapper::Constraints::CALL = T.let(T.unsafe(nil), Proc) -# source://actionpack//lib/action_dispatch/routing/mapper.rb#18 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#21 ActionDispatch::Routing::Mapper::Constraints::SERVE = T.let(T.unsafe(nil), Proc) -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2099 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2110 module ActionDispatch::Routing::Mapper::CustomUrls # Define custom URL helpers that will be added to the application's # routes. This allows you to override and/or replace the default behavior @@ -15940,7 +16606,7 @@ module ActionDispatch::Routing::Mapper::CustomUrls # NOTE: The +direct+ method can't be used inside of a scope block such as # +namespace+ or +scope+ and will raise an error if it detects that it is. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2147 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2158 def direct(name, options = T.unsafe(nil), &block); end # Define custom polymorphic mappings of models to URLs. This alters the @@ -15988,18 +16654,18 @@ module ActionDispatch::Routing::Mapper::CustomUrls # NOTE: The +resolve+ method can't be used inside of a scope block such as # +namespace+ or +scope+ and will raise an error if it detects that it is. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2199 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2210 def resolve(*args, &block); end end -# source://actionpack//lib/action_dispatch/routing/mapper.rb#682 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#693 module ActionDispatch::Routing::Mapper::HttpHelpers # Define a route that only recognizes HTTP DELETE. # For supported arguments, see match[rdoc-ref:Base#match] # # delete 'broccoli', to: 'food#broccoli' # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#719 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#730 def delete(*args, &block); end # Define a route that only recognizes HTTP GET. @@ -16007,7 +16673,7 @@ module ActionDispatch::Routing::Mapper::HttpHelpers # # get 'bacon', to: 'food#bacon' # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#687 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#698 def get(*args, &block); end # Define a route that only recognizes HTTP OPTIONS. @@ -16015,7 +16681,7 @@ module ActionDispatch::Routing::Mapper::HttpHelpers # # options 'carrots', to: 'food#carrots' # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#727 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#738 def options(*args, &block); end # Define a route that only recognizes HTTP PATCH. @@ -16023,7 +16689,7 @@ module ActionDispatch::Routing::Mapper::HttpHelpers # # patch 'bacon', to: 'food#bacon' # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#703 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#714 def patch(*args, &block); end # Define a route that only recognizes HTTP POST. @@ -16031,7 +16697,7 @@ module ActionDispatch::Routing::Mapper::HttpHelpers # # post 'bacon', to: 'food#bacon' # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#695 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#706 def post(*args, &block); end # Define a route that only recognizes HTTP PUT. @@ -16039,153 +16705,153 @@ module ActionDispatch::Routing::Mapper::HttpHelpers # # put 'bacon', to: 'food#bacon' # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#711 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#722 def put(*args, &block); end private - # source://actionpack//lib/action_dispatch/routing/mapper.rb#732 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#743 def map_method(method, args, &block); end end -# source://actionpack//lib/action_dispatch/routing/mapper.rb#69 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#72 class ActionDispatch::Routing::Mapper::Mapping # @return [Mapping] a new instance of Mapping # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#118 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#121 def initialize(set:, ast:, controller:, default_action:, to:, formatted:, via:, options_constraints:, anchor:, scope_params:, options:); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#176 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#179 def application; end # Returns the value of attribute ast. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#76 def ast; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#180 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#183 def conditions; end # Returns the value of attribute default_action. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#76 def default_action; end # Returns the value of attribute default_controller. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#76 def default_controller; end # Returns the value of attribute defaults. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#76 def defaults; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#169 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#172 def make_route(name, precedence); end # Returns the value of attribute path. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#76 def path; end # Returns the value of attribute required_defaults. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#76 def required_defaults; end # Returns the value of attribute requirements. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#76 def requirements; end # Returns the value of attribute scope_options. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#76 def scope_options; end # Returns the value of attribute to. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#76 def to; end private - # source://actionpack//lib/action_dispatch/routing/mapper.rb#316 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#318 def add_controller_module(controller, modyoule); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#269 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#279 def app(blocks); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#335 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#337 def blocks(callable_constraint); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#184 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#187 def build_conditions(current_conditions, request_class); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#281 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#291 def check_controller_and_action(path_params, controller, action); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#296 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#306 def check_part(name, part, path_params, hash); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#342 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#344 def constraints(options, path_params); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#356 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#358 def dispatcher(raise_on_name_error); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#199 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#202 def intern(object); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#265 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#275 def normalize_defaults(options); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#233 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#243 def normalize_format(formatted); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#203 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#206 def normalize_options!(options, path_params, modyoule); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#193 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#196 def request_method; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#227 - def split_constraints(path_params, constraints); end + # source://actionpack//lib/action_dispatch/routing/mapper.rb#362 + def route_source_location; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#308 - def split_to(to); end + # source://actionpack//lib/action_dispatch/routing/mapper.rb#237 + def split_constraints(path_params, constraints); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#328 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#330 def translate_controller(controller); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#249 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#259 def verify_regexp_requirements(requirements, wildcard_options); end class << self - # source://actionpack//lib/action_dispatch/routing/mapper.rb#76 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#79 def build(scope, set, ast, controller, default_action, to, via, formatted, options_constraints, anchor, options); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#90 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#93 def check_via(via); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#102 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#105 def normalize_path(path, format); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#114 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#117 def optional_format?(path, format); end end end -# source://actionpack//lib/action_dispatch/routing/mapper.rb#70 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#73 ActionDispatch::Routing::Mapper::Mapping::ANCHOR_CHARACTERS_REGEX = T.let(T.unsafe(nil), Regexp) -# source://actionpack//lib/action_dispatch/routing/mapper.rb#167 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#170 ActionDispatch::Routing::Mapper::Mapping::JOINED_SEPARATORS = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/routing/mapper.rb#71 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#74 ActionDispatch::Routing::Mapper::Mapping::OPTIONAL_FORMAT_REGEX = T.let(T.unsafe(nil), Regexp) # Resource routing allows you to quickly declare all of the common routes @@ -16227,7 +16893,7 @@ ActionDispatch::Routing::Mapper::Mapping::OPTIONAL_FORMAT_REGEX = T.let(T.unsafe # # This allows any character other than a slash as part of your +:id+. # -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1122 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1133 module ActionDispatch::Routing::Mapper::Resources # To add a route to the collection: # @@ -16237,12 +16903,12 @@ module ActionDispatch::Routing::Mapper::Resources # end # end # - # This will enable Rails to recognize paths such as /photos/search + # This will enable \Rails to recognize paths such as /photos/search # with GET, and route to the search action of +PhotosController+. It will also # create the search_photos_url and search_photos_path # route helpers. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1500 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1511 def collection(&block); end # Loads another routes file with the given +name+ located inside the @@ -16269,7 +16935,7 @@ module ActionDispatch::Routing::Mapper::Resources # applications — even those with a few hundred routes — it's easier for # developers to have a single routes file. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1610 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1621 def draw(name); end # Matches a URL pattern to one or more routes. @@ -16279,7 +16945,7 @@ module ActionDispatch::Routing::Mapper::Resources # match 'path', to: 'controller#action', via: :post # match 'path', 'otherpath', on: :member, via: :get # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1632 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1643 def match(path, *rest, &block); end # To add a member route, add a member block into the resource block: @@ -16294,18 +16960,18 @@ module ActionDispatch::Routing::Mapper::Resources # preview action of +PhotosController+. It will also create the # preview_photo_url and preview_photo_path helpers. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1521 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1532 def member(&block); end # See ActionDispatch::Routing::Mapper::Scoping#namespace. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1568 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1579 def namespace(path, options = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1547 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1558 def nested(&block); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1537 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1548 def new(&block); end # Sometimes, you have a resource that clients always look up without @@ -16340,10 +17006,10 @@ module ActionDispatch::Routing::Mapper::Resources # === Options # Takes same options as resources[rdoc-ref:#resources] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1292 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1303 def resource(*resources, &block); end - # In Rails, a resourceful route provides a mapping between HTTP verbs + # In \Rails, a resourceful route provides a mapping between HTTP verbs # and URLs and controller actions. By convention, each action also maps # to particular CRUD operations in a database. A single entry in the # routing file, such as @@ -16475,19 +17141,19 @@ module ActionDispatch::Routing::Mapper::Resources # # === Examples # - # # routes call Admin::PostsController + # # routes call +Admin::PostsController+ # resources :posts, module: "admin" # # # resource actions are at /admin/posts. # resources :posts, path: "admin/posts" # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1458 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1469 def resources(*resources, &block); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1257 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1268 def resources_path_names(options); end - # You can specify what Rails should route "/" to with the root method: + # You can specify what \Rails should route "/" to with the root method: # # root to: 'pages#main' # @@ -16499,337 +17165,337 @@ module ActionDispatch::Routing::Mapper::Resources # # You should put the root route at the top of config/routes.rb, # because this means it will be matched first. As this is the most popular route - # of most Rails applications, this is beneficial. + # of most \Rails applications, this is beneficial. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1679 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1690 def root(path, options = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1576 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1587 def shallow; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1583 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1594 def shallow?; end private # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1743 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1754 def action_options?(options); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1825 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1836 def action_path(name); end # @raise [ArgumentError] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1961 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1972 def add_route(action, controller, options, _path, to, via, formatted, anchor, options_constraints); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1879 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1890 def api_only?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1738 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1749 def apply_action_options(options); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1704 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1715 def apply_common_behavior_for(method, resources, options, &block); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1801 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1812 def canonical_action?(action); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1946 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1957 def decomposed_match(path, controller, options, _path, to, via, formatted, anchor, options_constraints); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1931 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1942 def get_to_from_path(path, to, action); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1890 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1901 def map_match(paths, options); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1988 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1999 def match_root_route(options); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1841 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1852 def name_for_action(as, action); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1778 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1789 def nested_options; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1759 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1770 def nested_scope?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1797 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1808 def param_constraint; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1793 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1804 def param_constraint?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1700 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1711 def parent_resource; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1815 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1826 def path_for_action(action, path); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1883 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1894 def path_scope(path); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1829 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1840 def prefix_name_for_action(as, action); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1755 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1766 def resource_method_scope?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1770 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1781 def resource_scope(resource, &block); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1751 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1762 def resource_scope?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1747 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1758 def scope_action_options; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1867 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1878 def set_member_mappings_for_resource; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1787 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1798 def shallow_nesting_depth; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1805 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1816 def shallow_scope; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1942 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1953 def using_match_shorthand?(path); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1763 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1774 def with_scope_level(kind); end end -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1127 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1138 ActionDispatch::Routing::Mapper::Resources::CANONICAL_ACTIONS = T.let(T.unsafe(nil), Array) -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1126 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1137 ActionDispatch::Routing::Mapper::Resources::RESOURCE_OPTIONS = T.let(T.unsafe(nil), Array) -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1129 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1140 class ActionDispatch::Routing::Mapper::Resources::Resource # @return [Resource] a new instance of Resource # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1132 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1143 def initialize(entities, api_only, shallow, options = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1157 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1168 def actions; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1165 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1176 def available_actions; end # Checks for uncountable plurals, and appends "_index" if the plural # and singular form are the same. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1189 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1200 def collection_name; end # Returns the value of attribute path. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1141 def collection_scope; end # Returns the value of attribute controller. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1141 def controller; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1149 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1160 def default_actions; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1181 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1192 def member_name; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1199 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1210 def member_scope; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1173 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1184 def name; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1209 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1220 def nested_param; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1213 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1224 def nested_scope; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1205 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1216 def new_scope(new_path); end # Returns the value of attribute param. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1141 def param; end # Returns the value of attribute path. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1141 def path; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1177 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1188 def plural; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1193 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1204 def resource_scope; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1217 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1228 def shallow?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1199 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1210 def shallow_scope; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1221 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1232 def singleton?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1181 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1192 def singular; end end -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1224 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1235 class ActionDispatch::Routing::Mapper::Resources::SingletonResource < ::ActionDispatch::Routing::Mapper::Resources::Resource # @return [SingletonResource] a new instance of SingletonResource # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1225 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1236 def initialize(entities, api_only, shallow, options); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1244 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1255 def collection_name; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1232 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1243 def default_actions; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1244 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1255 def member_name; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1141 def member_scope; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1141 def nested_scope; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1240 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1251 def plural; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1254 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1265 def singleton?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1244 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1255 def singular; end end # CANONICAL_ACTIONS holds all actions that does not need a prefix or # a path appended since they fit properly in their scope level. # -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1125 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1136 ActionDispatch::Routing::Mapper::Resources::VALID_ON_OPTIONS = T.let(T.unsafe(nil), Array) -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2213 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2224 class ActionDispatch::Routing::Mapper::Scope include ::Enumerable # @return [Scope] a new instance of Scope # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2223 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2234 def initialize(hash, parent = T.unsafe(nil), scope_level = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2282 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2293 def [](key); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2249 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2260 def action_name(name_prefix, prefix, collection_name, member_name); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2289 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2300 def each; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2297 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2308 def frame; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2229 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2240 def nested?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2274 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2285 def new(hash); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2278 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2289 def new_level(level); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2233 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2244 def null?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2270 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2281 def options; end # Returns the value of attribute parent. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2221 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2232 def parent; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2245 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2256 def resource_method_scope?; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2266 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2277 def resource_scope?; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2241 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2252 def resources?; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2237 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2248 def root?; end # Returns the value of attribute scope_level. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2221 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2232 def scope_level; end end -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2299 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2310 ActionDispatch::Routing::Mapper::Scope::NULL = T.let(T.unsafe(nil), ActionDispatch::Routing::Mapper::Scope) -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2214 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2225 ActionDispatch::Routing::Mapper::Scope::OPTIONS = T.let(T.unsafe(nil), Array) -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2219 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2230 ActionDispatch::Routing::Mapper::Scope::RESOURCE_METHOD_SCOPES = T.let(T.unsafe(nil), Array) -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2218 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2229 ActionDispatch::Routing::Mapper::Scope::RESOURCE_SCOPES = T.let(T.unsafe(nil), Array) # You may wish to organize groups of controllers under a namespace. @@ -16843,7 +17509,7 @@ ActionDispatch::Routing::Mapper::Scope::RESOURCE_SCOPES = T.let(T.unsafe(nil), A # end # # This will create a number of routes for each of the posts and comments -# controller. For Admin::PostsController, Rails will create: +# controller. For +Admin::PostsController+, \Rails will create: # # GET /admin/posts # GET /admin/posts/new @@ -16854,7 +17520,7 @@ ActionDispatch::Routing::Mapper::Scope::RESOURCE_SCOPES = T.let(T.unsafe(nil), A # DELETE /admin/posts/1 # # If you want to route /posts (without the prefix /admin) to -# Admin::PostsController, you could use +# +Admin::PostsController+, you could use # # scope module: "admin" do # resources :posts @@ -16887,7 +17553,7 @@ ActionDispatch::Routing::Mapper::Scope::RESOURCE_SCOPES = T.let(T.unsafe(nil), A # PATCH/PUT /admin/posts/1 # DELETE /admin/posts/1 # -# source://actionpack//lib/action_dispatch/routing/mapper.rb#794 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#805 module ActionDispatch::Routing::Mapper::Scoping # === Parameter Restriction # Allows you to constrain the nested routes based on a set of rules. @@ -16945,7 +17611,7 @@ module ActionDispatch::Routing::Mapper::Scoping # resources :iphones # end # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#999 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1010 def constraints(constraints = T.unsafe(nil), &block); end # Scopes routes to a specific controller @@ -16954,7 +17620,7 @@ module ActionDispatch::Routing::Mapper::Scoping # match "bacon", action: :bacon, via: :get # end # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#884 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#895 def controller(controller); end # Allows you to set default parameters for a route, such as this: @@ -16963,7 +17629,7 @@ module ActionDispatch::Routing::Mapper::Scoping # end # Using this, the +:id+ parameter here will default to 'home'. # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1008 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1019 def defaults(defaults = T.unsafe(nil)); end # Scopes routes to a specific namespace. For example: @@ -16995,7 +17661,7 @@ module ActionDispatch::Routing::Mapper::Scoping # resources :posts # end # - # # maps to Sekret::PostsController rather than Admin::PostsController + # # maps to +Sekret::PostsController+ rather than +Admin::PostsController+ # namespace :admin, module: "sekret" do # resources :posts # end @@ -17005,7 +17671,7 @@ module ActionDispatch::Routing::Mapper::Scoping # resources :posts # end # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#929 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#940 def namespace(path, options = T.unsafe(nil), &block); end # Scopes a set of routes to the given default options. @@ -17024,7 +17690,7 @@ module ActionDispatch::Routing::Mapper::Scoping # # Takes same options as Base#match and Resources#resources. # - # # route /posts (without the prefix /admin) to Admin::PostsController + # # route /posts (without the prefix /admin) to +Admin::PostsController+ # scope module: "admin" do # resources :posts # end @@ -17039,97 +17705,99 @@ module ActionDispatch::Routing::Mapper::Scoping # resources :posts # end # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#825 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#836 def scope(*args); end private - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1040 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1051 def merge_action_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1024 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1035 def merge_as_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1064 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1075 def merge_blocks_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1056 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1067 def merge_constraints_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1036 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1047 def merge_controller_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1060 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1071 def merge_defaults_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1048 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1059 def merge_format_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1032 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1043 def merge_module_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1070 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1081 def merge_options_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1052 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1063 def merge_path_names_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1016 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1027 def merge_path_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1020 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1031 def merge_shallow_path_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1028 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1039 def merge_shallow_prefix_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1074 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1085 def merge_shallow_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1078 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1089 def merge_to_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1044 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1055 def merge_via_scope(parent, child); end end -# source://actionpack//lib/action_dispatch/routing/mapper.rb#877 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#888 ActionDispatch::Routing::Mapper::Scoping::POISON = T.let(T.unsafe(nil), Object) # source://actionpack//lib/action_dispatch/routing/mapper.rb#13 ActionDispatch::Routing::Mapper::URL_OPTIONS = T.let(T.unsafe(nil), Array) -# source://actionpack//lib/action_dispatch/routing/redirection.rb#103 +# source://actionpack//lib/action_dispatch/routing/redirection.rb#112 class ActionDispatch::Routing::OptionRedirect < ::ActionDispatch::Routing::Redirect - # source://actionpack//lib/action_dispatch/routing/redirection.rb#132 + # source://actionpack//lib/action_dispatch/routing/redirection.rb#141 def inspect; end # source://actionpack//lib/action_dispatch/routing/redirection.rb#11 def options; end - # source://actionpack//lib/action_dispatch/routing/redirection.rb#106 + # source://actionpack//lib/action_dispatch/routing/redirection.rb#115 def path(params, request); end end -# source://actionpack//lib/action_dispatch/routing/redirection.rb#78 +# source://actionpack//lib/action_dispatch/routing/redirection.rb#87 class ActionDispatch::Routing::PathRedirect < ::ActionDispatch::Routing::Redirect - # source://actionpack//lib/action_dispatch/routing/redirection.rb#93 + # source://actionpack//lib/action_dispatch/routing/redirection.rb#102 def inspect; end - # source://actionpack//lib/action_dispatch/routing/redirection.rb#81 + # source://actionpack//lib/action_dispatch/routing/redirection.rb#90 def path(params, request); end private # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/redirection.rb#98 + # source://actionpack//lib/action_dispatch/routing/redirection.rb#107 def interpolation_required?(string, params); end end -# source://actionpack//lib/action_dispatch/routing/redirection.rb#79 +# source://actionpack//lib/action_dispatch/routing/redirection.rb#88 ActionDispatch::Routing::PathRedirect::URL_PARTS = T.let(T.unsafe(nil), Regexp) +# = Action Dispatch Routing \PolymorphicRoutes +# # Polymorphic URL helpers are methods for smart resolution to a named route call when # given an Active Record model instance. They are to be used in combination with # ActionController::Resources. @@ -17182,23 +17850,23 @@ ActionDispatch::Routing::PathRedirect::URL_PARTS = T.let(T.unsafe(nil), Regexp) # polymorphic_url([blog, @post]) # calls blog.post_path(@post) # form_for([blog, @post]) # => "/blog/posts/1" # -# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#57 +# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#59 module ActionDispatch::Routing::PolymorphicRoutes - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#153 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#155 def edit_polymorphic_path(record_or_hash, options = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#149 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#151 def edit_polymorphic_url(record_or_hash, options = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#153 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#155 def new_polymorphic_path(record_or_hash, options = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#149 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#151 def new_polymorphic_url(record_or_hash, options = T.unsafe(nil)); end # Returns the path component of a URL for the given record. # - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#124 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#126 def polymorphic_path(record_or_hash_or_array, options = T.unsafe(nil)); end # Constructs a call to a named RESTful route for the given record and returns the @@ -17244,95 +17912,95 @@ module ActionDispatch::Routing::PolymorphicRoutes # # the class of a record will also map to the collection # polymorphic_url(Comment) # same as comments_url() # - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#101 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#103 def polymorphic_url(record_or_hash_or_array, options = T.unsafe(nil)); end private - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#168 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#170 def polymorphic_mapping(record); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#164 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#166 def polymorphic_path_for_action(action, record_or_hash, options); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#160 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#162 def polymorphic_url_for_action(action, record_or_hash, options); end end -# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#176 +# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#178 class ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder # @return [HelperMethodBuilder] a new instance of HelperMethodBuilder # - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#239 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#241 def initialize(key_strategy, prefix, suffix); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#253 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#255 def handle_class(klass); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#257 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#259 def handle_class_call(target, klass); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#284 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#286 def handle_list(list); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#261 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#263 def handle_model(record); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#275 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#277 def handle_model_call(target, record); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#245 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#247 def handle_string(record); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#249 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#251 def handle_string_call(target, str); end # Returns the value of attribute prefix. # - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#237 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#239 def prefix; end # Returns the value of attribute suffix. # - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#237 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#239 def suffix; end private - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#338 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#340 def get_method_for_class(klass); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#343 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#345 def get_method_for_string(str); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#330 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#332 def polymorphic_mapping(target, record); end class << self - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#187 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#189 def build(action, type); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#179 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#181 def get(action, type); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#185 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#187 def path; end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#201 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#203 def plural(prefix, suffix); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#205 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#207 def polymorphic_method(recipient, record_or_hash_or_array, action, type, options); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#197 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#199 def singular(prefix, suffix); end - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#184 + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#186 def url; end end end -# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#177 +# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#179 ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder::CACHE = T.let(T.unsafe(nil), Hash) # source://actionpack//lib/action_dispatch/routing/redirection.rb#10 @@ -17347,13 +18015,16 @@ class ActionDispatch::Routing::Redirect < ::ActionDispatch::Routing::Endpoint # source://actionpack//lib/action_dispatch/routing/redirection.rb#11 def block; end + # source://actionpack//lib/action_dispatch/routing/redirection.rb#33 + def build_response(req); end + # source://actionpack//lib/action_dispatch/routing/redirection.rb#20 def call(env); end - # source://actionpack//lib/action_dispatch/routing/redirection.rb#56 + # source://actionpack//lib/action_dispatch/routing/redirection.rb#65 def inspect; end - # source://actionpack//lib/action_dispatch/routing/redirection.rb#52 + # source://actionpack//lib/action_dispatch/routing/redirection.rb#61 def path(params, request); end # @return [Boolean] @@ -17361,9 +18032,6 @@ class ActionDispatch::Routing::Redirect < ::ActionDispatch::Routing::Endpoint # source://actionpack//lib/action_dispatch/routing/redirection.rb#18 def redirect?; end - # source://actionpack//lib/action_dispatch/routing/redirection.rb#24 - def serve(req); end - # Returns the value of attribute status. # # source://actionpack//lib/action_dispatch/routing/redirection.rb#11 @@ -17371,22 +18039,22 @@ class ActionDispatch::Routing::Redirect < ::ActionDispatch::Routing::Endpoint private - # source://actionpack//lib/action_dispatch/routing/redirection.rb#65 + # source://actionpack//lib/action_dispatch/routing/redirection.rb#74 def escape(params); end - # source://actionpack//lib/action_dispatch/routing/redirection.rb#69 + # source://actionpack//lib/action_dispatch/routing/redirection.rb#78 def escape_fragment(params); end - # source://actionpack//lib/action_dispatch/routing/redirection.rb#73 + # source://actionpack//lib/action_dispatch/routing/redirection.rb#82 def escape_path(params); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/redirection.rb#61 + # source://actionpack//lib/action_dispatch/routing/redirection.rb#70 def relative_path?(path); end end -# source://actionpack//lib/action_dispatch/routing/redirection.rb#137 +# source://actionpack//lib/action_dispatch/routing/redirection.rb#146 module ActionDispatch::Routing::Redirection # Redirect any path to another path: # @@ -17442,7 +18110,7 @@ module ActionDispatch::Routing::Redirection # # @raise [ArgumentError] # - # source://actionpack//lib/action_dispatch/routing/redirection.rb#190 + # source://actionpack//lib/action_dispatch/routing/redirection.rb#199 def redirect(*args, &block); end end @@ -17455,31 +18123,34 @@ class ActionDispatch::Routing::RouteSet # source://actionpack//lib/action_dispatch/routing/route_set.rb#366 def initialize(config = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#615 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#649 def add_polymorphic_mapping(klass, options, &block); end # @raise [ArgumentError] # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#584 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#618 def add_route(mapping, name); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#619 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#653 def add_url_helper(name, options, &block); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#395 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#396 def api_only?; end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#415 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#435 def append(&block); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#849 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#879 def call(env); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#439 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#459 def clear!; end + # source://actionpack//lib/action_dispatch/routing/route_set.rb#409 + def default_env; end + # Returns the value of attribute default_scope. # # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 @@ -17504,7 +18175,7 @@ class ActionDispatch::Routing::RouteSet # source://actionpack//lib/action_dispatch/routing/route_set.rb#338 def default_url_options=(_arg0); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#461 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#481 def define_mounted_helper(name, script_namer = T.unsafe(nil)); end # Returns the value of attribute disable_clear_and_finalize. @@ -17519,7 +18190,7 @@ class ActionDispatch::Routing::RouteSet # source://actionpack//lib/action_dispatch/routing/route_set.rb#337 def disable_clear_and_finalize=(_arg0); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#408 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#428 def draw(&block); end # Returns the value of attribute draw_paths. @@ -17534,12 +18205,12 @@ class ActionDispatch::Routing::RouteSet # source://actionpack//lib/action_dispatch/routing/route_set.rb#338 def draw_paths=(_arg0); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#385 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#386 def eager_load!; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#580 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#614 def empty?; end # Returns the value of attribute env_key. @@ -17550,16 +18221,13 @@ class ActionDispatch::Routing::RouteSet # Generate the path indicated by the arguments, and return an array of # the keys that were not used to generate it. # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#760 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#794 def extra_keys(options, recall = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#433 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#453 def finalize!; end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#792 - def find_relative_url_root(options); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#788 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#822 def find_script_name(options); end # Returns the value of attribute formatter. @@ -17574,10 +18242,10 @@ class ActionDispatch::Routing::RouteSet # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 def formatter=(_arg0); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#764 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#798 def generate_extras(options, recall = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#488 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#508 def generate_url_helpers(supports_path); end # Since the router holds references to many parts of the system @@ -17591,7 +18259,7 @@ class ActionDispatch::Routing::RouteSet # You can include this in your classes if you want to # access routes for other engines. # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#457 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#477 def mounted_helpers; end # Returns the value of attribute named_routes. @@ -17608,10 +18276,10 @@ class ActionDispatch::Routing::RouteSet # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#784 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#818 def optimize_routes_generation?; end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#796 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#826 def path_for(options, route_name = T.unsafe(nil), reserved = T.unsafe(nil)); end # Returns the value of attribute polymorphic_mappings. @@ -17619,19 +18287,19 @@ class ActionDispatch::Routing::RouteSet # source://actionpack//lib/action_dispatch/routing/route_set.rb#339 def polymorphic_mappings; end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#419 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#439 def prepend(&block); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#855 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#885 def recognize_path(path, environment = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#870 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#900 def recognize_path_with_request(req, path, extras, raise_on_missing: T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#391 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#392 def relative_url_root; end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#399 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#400 def request_class; end # Returns the value of attribute resources_path_names. @@ -17677,21 +18345,21 @@ class ActionDispatch::Routing::RouteSet # The +options+ argument must be a hash whose keys are *symbols*. # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#801 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#831 def url_for(options, route_name = T.unsafe(nil), url_strategy = T.unsafe(nil), method_name = T.unsafe(nil), reserved = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#480 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#500 def url_helpers(supports_path = T.unsafe(nil)); end private - # source://actionpack//lib/action_dispatch/routing/route_set.rb#423 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#443 def eval_block(block); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#775 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#809 def generate(route_name, options, recall = T.unsafe(nil), method_name = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#403 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#404 def make_request(env); end class << self @@ -17736,37 +18404,37 @@ class ActionDispatch::Routing::RouteSet::Config < ::Struct end end -# source://actionpack//lib/action_dispatch/routing/route_set.rb#623 +# source://actionpack//lib/action_dispatch/routing/route_set.rb#657 class ActionDispatch::Routing::RouteSet::CustomUrlHelper # @return [CustomUrlHelper] a new instance of CustomUrlHelper # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#626 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#660 def initialize(name, defaults, &block); end # Returns the value of attribute block. # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#624 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#658 def block; end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#632 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#666 def call(t, args, only_path = T.unsafe(nil)); end # Returns the value of attribute defaults. # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#624 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#658 def defaults; end # Returns the value of attribute name. # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#624 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#658 def name; end private - # source://actionpack//lib/action_dispatch/routing/route_set.rb#644 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#678 def eval_block(t, args, options); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#648 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#682 def merge_defaults(options); end end @@ -17797,38 +18465,38 @@ class ActionDispatch::Routing::RouteSet::Dispatcher < ::ActionDispatch::Routing: def dispatch(controller, action, req, res); end end -# source://actionpack//lib/action_dispatch/routing/route_set.rb#653 +# source://actionpack//lib/action_dispatch/routing/route_set.rb#687 class ActionDispatch::Routing::RouteSet::Generator # @return [Generator] a new instance of Generator # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#656 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#690 def initialize(named_route, options, recall, set); end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#668 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#702 def controller; end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#672 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#706 def current_controller; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#743 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#777 def different_controller?; end # Generates a path from routes, returns a RouteWithParams or MissingRoute. # MissingRoute will raise ActionController::UrlGenerationError. # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#739 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#773 def generate; end # Returns the value of attribute named_route. # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#688 def named_route; end # Remove leading slashes from controllers # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#727 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#761 def normalize_controller!; end # This pulls :controller, :action, and :id out of the recall. @@ -17837,48 +18505,48 @@ class ActionDispatch::Routing::RouteSet::Generator # :controller, :action or :id is not found, don't pull any # more keys from the recall. # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#709 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#743 def normalize_controller_action_id!; end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#684 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#718 def normalize_options!; end # Returns the value of attribute options. # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#688 def options; end # Returns the value of attribute recall. # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#688 def recall; end # Returns the value of attribute set. # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#688 def set; end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#676 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#710 def use_recall_for(key); end # if the current controller is "foo/bar/baz" and controller: "baz/bat" # is specified, the controller becomes "foo/baz/bat" # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#717 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#751 def use_relative_controller!; end private # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#749 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#783 def named_route_exists?; end - # source://actionpack//lib/action_dispatch/routing/route_set.rb#753 + # source://actionpack//lib/action_dispatch/routing/route_set.rb#787 def segment_keys; end end -# source://actionpack//lib/action_dispatch/routing/route_set.rb#448 +# source://actionpack//lib/action_dispatch/routing/route_set.rb#468 module ActionDispatch::Routing::RouteSet::MountedHelpers extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -18060,7 +18728,7 @@ end # source://actionpack//lib/action_dispatch/routing/route_set.rb#333 ActionDispatch::Routing::RouteSet::PATH = T.let(T.unsafe(nil), Proc) -# source://actionpack//lib/action_dispatch/routing/route_set.rb#780 +# source://actionpack//lib/action_dispatch/routing/route_set.rb#814 ActionDispatch::Routing::RouteSet::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array) # source://actionpack//lib/action_dispatch/routing/route_set.rb#53 @@ -18081,38 +18749,43 @@ ActionDispatch::Routing::RouteSet::UNKNOWN = T.let(T.unsafe(nil), Proc) # source://actionpack//lib/action_dispatch/routing/inspector.rb#8 class ActionDispatch::Routing::RouteWrapper < ::SimpleDelegator - # source://actionpack//lib/action_dispatch/routing/inspector.rb#41 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#54 def action; end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#13 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#26 def constraints; end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#37 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#50 def controller; end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#9 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#15 def endpoint; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#49 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#62 def engine?; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#45 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#58 def internal?; end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#25 + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/inspector.rb#9 + def matches_filter?(filter, value); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#38 def name; end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#21 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#34 def path; end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#17 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#30 def rack_app; end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#29 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#42 def reqs; end end @@ -18120,28 +18793,28 @@ end # executes `bin/rails routes` or looks at the RoutingError page. # People should not use this class. # -# source://actionpack//lib/action_dispatch/routing/inspector.rb#58 +# source://actionpack//lib/action_dispatch/routing/inspector.rb#71 class ActionDispatch::Routing::RoutesInspector # @return [RoutesInspector] a new instance of RoutesInspector # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#59 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#72 def initialize(routes); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#64 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#77 def format(formatter, filter = T.unsafe(nil)); end private - # source://actionpack//lib/action_dispatch/routing/inspector.rb#117 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#141 def collect_engine_routes(route); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#104 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#127 def collect_routes(routes); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#93 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#116 def filter_routes(filter); end - # source://actionpack//lib/action_dispatch/routing/inspector.rb#84 + # source://actionpack//lib/action_dispatch/routing/inspector.rb#97 def normalize_filter(filter); end end @@ -18160,13 +18833,13 @@ class ActionDispatch::Routing::RoutesProxy # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 def _routes; end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options; end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options=(_arg0); end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options?; end # Returns the value of attribute routes. @@ -18203,7 +18876,7 @@ class ActionDispatch::Routing::RoutesProxy # about since it depends on the specific request, but use our # script name resolver for the mount point dependent part. # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#58 + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#53 def merge_script_names(previous_script_name, new_script_name); end # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#30 @@ -18215,13 +18888,13 @@ class ActionDispatch::Routing::RoutesProxy def respond_to_missing?(method, _); end class << self - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options; end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options=(value); end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options?; end end end @@ -18229,6 +18902,8 @@ end # source://actionpack//lib/action_dispatch/routing.rb#257 ActionDispatch::Routing::SEPARATORS = T.let(T.unsafe(nil), Array) +# = Action Dispatch Routing \UrlFor +# # In config/routes.rb you define URL-to-controller mappings, but the reverse # is also possible: a URL can be generated from one of your routing definitions. # URL generation functionality is centralized in this module. @@ -18264,7 +18939,7 @@ ActionDispatch::Routing::SEPARATORS = T.let(T.unsafe(nil), Array) # # => "/users/new?message=Welcome%21" # # Notice the only_path: true part. This is because UrlFor has no -# information about the website hostname that your Rails app is serving. So if you +# information about the website hostname that your \Rails app is serving. So if you # want to include the hostname as well, then you must also pass the :host # argument: # @@ -18311,7 +18986,7 @@ ActionDispatch::Routing::SEPARATORS = T.let(T.unsafe(nil), Array) # # User.find(1).base_uri # => "/users/1" # -# source://actionpack//lib/action_dispatch/routing/url_for.rb#87 +# source://actionpack//lib/action_dispatch/routing/url_for.rb#89 module ActionDispatch::Routing::UrlFor include ::ActionDispatch::Routing::PolymorphicRoutes extend ::ActiveSupport::Concern @@ -18319,10 +18994,10 @@ module ActionDispatch::Routing::UrlFor mixes_in_class_methods GeneratedClassMethods - # source://actionpack//lib/action_dispatch/routing/url_for.rb#106 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#108 def initialize(*_arg0, **_arg1, &_arg2); end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#173 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#177 def full_url_for(options = T.unsafe(nil)); end # Allows calling direct or regular named route. @@ -18343,7 +19018,7 @@ module ActionDispatch::Routing::UrlFor # threadable_path(threadable) # => "/buckets/1" # threadable_url(threadable) # => "http://example.com/buckets/1" # - # source://actionpack//lib/action_dispatch/routing/url_for.rb#213 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#217 def route_for(name, *args); end # Generate a URL based on the options provided, +default_url_options+, and the @@ -18365,6 +19040,8 @@ module ActionDispatch::Routing::UrlFor # * :port - Optionally specify the port to connect to. # * :anchor - An anchor name to be appended to the path. # * :params - The query parameters to be appended to the path. + # * :path_params - The query parameters that will only be used + # for the named dynamic segments of path. If unused, they will be discarded. # * :trailing_slash - If true, adds a trailing slash, as in "/archive/2009/". # * :script_name - Specifies application path relative to domain root. If provided, prepends application path. # @@ -18398,29 +19075,29 @@ module ActionDispatch::Routing::UrlFor # implicitly used by +url_for+ can always be overwritten like shown on the # last +url_for+ calls. # - # source://actionpack//lib/action_dispatch/routing/url_for.rb#169 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#173 def url_for(options = T.unsafe(nil)); end # Hook overridden in controller to add request information # with +default_url_options+. Application logic should not # go into url_options. # - # source://actionpack//lib/action_dispatch/routing/url_for.rb#114 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#116 def url_options; end protected # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/url_for.rb#218 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#222 def optimize_routes_generation?; end private - # source://actionpack//lib/action_dispatch/routing/url_for.rb#230 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#234 def _routes_context; end - # source://actionpack//lib/action_dispatch/routing/url_for.rb#223 + # source://actionpack//lib/action_dispatch/routing/url_for.rb#227 def _with_routes(routes); end module GeneratedClassMethods @@ -18436,6 +19113,8 @@ module ActionDispatch::Routing::UrlFor end end +# = Action Dispatch \SSL +# # This middleware is added to the stack when config.force_ssl = true, and is passed # the options set in +config.ssl_options+. It does three jobs to enforce secure HTTP # requests: @@ -18482,94 +19161,91 @@ end # expire HSTS immediately. Setting hsts: false is a shortcut for # hsts: { expires: 0 }. # -# source://actionpack//lib/action_dispatch/middleware/ssl.rb#49 +# source://actionpack//lib/action_dispatch/middleware/ssl.rb#51 class ActionDispatch::SSL # @return [SSL] a new instance of SSL # - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#61 + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#63 def initialize(app, redirect: T.unsafe(nil), hsts: T.unsafe(nil), secure_cookies: T.unsafe(nil), ssl_default_redirect_status: T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#73 + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#75 def call(env); end private # https://tools.ietf.org/html/rfc6797#section-6.1 # - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#107 + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#109 def build_hsts_header(hsts); end - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#114 + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#116 def flag_cookies_as_secure!(headers); end - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#145 + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#157 def https_location_for(request); end - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#92 + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#94 def normalize_hsts_options(options); end - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#128 + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#140 def redirect_to_https(request); end - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#135 + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#147 def redirection_status(request); end - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#88 + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#90 def set_hsts_header!(headers); end class << self - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#57 + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#59 def default_hsts_options; end end end # Default to 2 years as recommended on hstspreload.org. # -# source://actionpack//lib/action_dispatch/middleware/ssl.rb#53 +# source://actionpack//lib/action_dispatch/middleware/ssl.rb#55 ActionDispatch::SSL::HSTS_EXPIRES_IN = T.let(T.unsafe(nil), Integer) -# source://actionpack//lib/action_dispatch/middleware/ssl.rb#55 +# source://actionpack//lib/action_dispatch/middleware/ssl.rb#57 ActionDispatch::SSL::PERMANENT_REDIRECT_REQUEST_METHODS = T.let(T.unsafe(nil), Array) # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#6 class ActionDispatch::ServerTiming # @return [ServerTiming] a new instance of ServerTiming # - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#52 + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#50 def initialize(app); end - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#58 + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#56 def call(env); end class << self - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#48 + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#46 def unsubscribe; end end end # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#7 -ActionDispatch::ServerTiming::SERVER_TIMING_HEADER = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/server_timing.rb#9 class ActionDispatch::ServerTiming::Subscriber include ::Singleton extend ::Singleton::SingletonClassMethods # @return [Subscriber] a new instance of Subscriber # - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#13 + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#11 def initialize; end - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#17 + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#15 def call(event); end - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#23 + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#21 def collect_events; end - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#32 + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#30 def ensure_subscribed; end - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#40 + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#38 def unsubscribe; end class << self @@ -18580,28 +19256,33 @@ class ActionDispatch::ServerTiming::Subscriber end end -# source://actionpack//lib/action_dispatch/middleware/server_timing.rb#11 +# source://actionpack//lib/action_dispatch/middleware/server_timing.rb#9 ActionDispatch::ServerTiming::Subscriber::KEY = T.let(T.unsafe(nil), Symbol) -# source://actionpack//lib/action_dispatch.rb#91 -module ActionDispatch::Session; end +# source://actionpack//lib/action_dispatch.rb#106 +module ActionDispatch::Session + class << self + # source://actionpack//lib/action_dispatch.rb#113 + def resolve_store(session_store); end + end +end -# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#90 +# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#95 class ActionDispatch::Session::AbstractSecureStore < ::Rack::Session::Abstract::PersistedSecure include ::ActionDispatch::Session::Compatibility include ::ActionDispatch::Session::StaleSessionCheck include ::ActionDispatch::Session::SessionObject - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#95 + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#100 def generate_sid; end private - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#100 + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#105 def set_cookie(request, response, cookie); end end -# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#79 +# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#84 class ActionDispatch::Session::AbstractStore < ::Rack::Session::Abstract::Persisted include ::ActionDispatch::Session::Compatibility include ::ActionDispatch::Session::StaleSessionCheck @@ -18609,10 +19290,12 @@ class ActionDispatch::Session::AbstractStore < ::Rack::Session::Abstract::Persis private - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#85 + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#90 def set_cookie(request, response, cookie); end end +# = Action Dispatch Session \CacheStore +# # A session store that uses an ActiveSupport::Cache::Store to store the sessions. This store is most useful # if you don't store critical data in your sessions and you don't need them to live for extended periods # of time. @@ -18622,36 +19305,36 @@ end # * expire_after - The length of time a session will be stored before automatically expiring. # By default, the :expires_in option of the cache is used. # -# source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#15 +# source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#17 class ActionDispatch::Session::CacheStore < ::ActionDispatch::Session::AbstractSecureStore # @return [CacheStore] a new instance of CacheStore # - # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#16 + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#18 def initialize(app, options = T.unsafe(nil)); end # Remove a session from the cache. # - # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#42 + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#44 def delete_session(env, sid, options); end # Get a session from the cache. # - # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#23 + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#25 def find_session(env, sid); end # Set a session in the cache. # - # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#31 + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#33 def write_session(env, sid, session, options); end private # Turn the session id into a cache key. # - # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#50 + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#52 def cache_key(id); end - # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#54 + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#56 def get_session_with_fallback(sid); end end @@ -18672,7 +19355,9 @@ module ActionDispatch::Session::Compatibility def make_request(env); end end -# This cookie-based session store is the Rails default. It is +# = Action Dispatch Session \CookieStore +# +# This cookie-based session store is the \Rails default. It is # dramatically faster than the alternatives. # # Sessions typically contain at most a user ID and flash message; both fit @@ -18684,18 +19369,18 @@ end # # Your cookies will be encrypted using your application's +secret_key_base+. This # goes a step further than signed cookies in that encrypted cookies cannot -# be altered or read by users. This is the default starting in Rails 4. +# be altered or read by users. This is the default starting in \Rails 4. # # Configure your session store in an initializer: # # Rails.application.config.session_store :cookie_store, key: '_your_app_session' # # In the development and test environments your application's +secret_key_base+ is -# generated by Rails and stored in a temporary file in tmp/development_secret.txt. +# generated by \Rails and stored in a temporary file in tmp/local_secret.txt. # In all other environments, it is stored encrypted in the # config/credentials.yml.enc file. # -# If your application was not updated to Rails 5.2 defaults, the +secret_key_base+ +# If your application was not updated to \Rails 5.2 defaults, the +secret_key_base+ # will be found in the old config/secrets.yml file. # # Note that changing your +secret_key_base+ will invalidate all existing session. @@ -18713,64 +19398,70 @@ end # Other useful options include :key, :secure, # :httponly, and :same_site. # -# source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#49 +# source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#51 class ActionDispatch::Session::CookieStore < ::ActionDispatch::Session::AbstractSecureStore # @return [CookieStore] a new instance of CookieStore # - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#59 + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#63 def initialize(app, options = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#63 + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#69 def delete_session(req, session_id, options); end - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#70 + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#76 def load_session(req); end private - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#117 + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#123 def cookie_jar(request); end - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#79 + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#85 def extract_session_id(req); end - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#113 + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#119 def get_cookie(req); end - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#98 + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#104 def persistent_session_id!(data, sid = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#109 + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#115 def set_cookie(request, session_id, cookie); end - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#86 + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#92 def unpacked_cookie_data(req); end - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#104 + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#110 def write_session(req, sid, session_data, options); end end -# source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#50 +# source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#61 +ActionDispatch::Session::CookieStore::DEFAULT_SAME_SITE = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#52 class ActionDispatch::Session::CookieStore::SessionId # @return [SessionId] a new instance of SessionId # - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#53 + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#55 def initialize(session_id, cookie_value = T.unsafe(nil)); end # Returns the value of attribute cookie_value. # - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#51 + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#53 def cookie_value; end end # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#69 module ActionDispatch::Session::SessionObject + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#70 + def commit_session(req, res); end + # @return [Boolean] # - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#74 + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#79 def loaded_session?(session); end - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#70 + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#75 def prepare_session(req); end end @@ -18794,48 +19485,53 @@ module ActionDispatch::Session::StaleSessionCheck def stale_session_check!; end end +# = Action Dispatch \ShowExceptions +# # This middleware rescues any exception returned by the application # and calls an exceptions app that will wrap it in a format for the end user. # # The exceptions app should be passed as a parameter on initialization of # +ShowExceptions+. Every time there is an exception, +ShowExceptions+ will # store the exception in env["action_dispatch.exception"], rewrite -# the +PATH_INFO+ to the exception status code and call the Rack app. +# the +PATH_INFO+ to the exception status code, and call the Rack app. # # In \Rails applications, the exceptions app can be configured with # +config.exceptions_app+, which defaults to ActionDispatch::PublicExceptions. # -# If the application returns an "X-Cascade" => "pass" response, this -# middleware will send an empty response as a result with the correct status -# code. If any exception happens inside the exceptions app, this middleware -# catches the exceptions and returns a failsafe response. +# If the application returns a response with the X-Cascade header +# set to "pass", this middleware will send an empty response as a +# result with the correct status code. If any exception happens inside the +# exceptions app, this middleware catches the exceptions and returns a +# failsafe response. # -# source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#21 +# source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#24 class ActionDispatch::ShowExceptions # @return [ShowExceptions] a new instance of ShowExceptions # - # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#22 + # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#25 def initialize(app, exceptions_app); end - # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#27 + # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#30 def call(env); end private - # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#61 + # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#64 def fallback_to_html_format_if_invalid_mime_type(request); end - # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#70 + # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#73 def pass_response(status); end - # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#39 - def render_exception(request, exception); end + # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#44 + def render_exception(request, wrapper); end end +# = Action Dispatch \Static +# # This middleware serves static files from disk, if available. # If no file is found, it hands off to the main app. # -# In Rails apps, this middleware is configured to serve assets from +# In \Rails apps, this middleware is configured to serve assets from # the +public/+ directory. # # Only GET and HEAD requests are served. POST and other HTTP methods @@ -18843,14 +19539,14 @@ end # # Only files in the root directory are served; path traversal is denied. # -# source://actionpack//lib/action_dispatch/middleware/static.rb#16 +# source://actionpack//lib/action_dispatch/middleware/static.rb#18 class ActionDispatch::Static # @return [Static] a new instance of Static # - # source://actionpack//lib/action_dispatch/middleware/static.rb#17 + # source://actionpack//lib/action_dispatch/middleware/static.rb#19 def initialize(app, path, index: T.unsafe(nil), headers: T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/middleware/static.rb#22 + # source://actionpack//lib/action_dispatch/middleware/static.rb#24 def call(env); end end @@ -18860,19 +19556,19 @@ module ActionDispatch::TestProcess # @raise [NoMethodError] # - # source://actionpack//lib/action_dispatch/testing/test_process.rb#30 + # source://actionpack//lib/action_dispatch/testing/test_process.rb#31 def assigns(key = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/testing/test_process.rb#44 + # source://actionpack//lib/action_dispatch/testing/test_process.rb#45 def cookies; end - # source://actionpack//lib/action_dispatch/testing/test_process.rb#40 + # source://actionpack//lib/action_dispatch/testing/test_process.rb#41 def flash; end - # source://actionpack//lib/action_dispatch/testing/test_process.rb#48 + # source://actionpack//lib/action_dispatch/testing/test_process.rb#49 def redirect_to_url; end - # source://actionpack//lib/action_dispatch/testing/test_process.rb#36 + # source://actionpack//lib/action_dispatch/testing/test_process.rb#37 def session; end end @@ -18880,14 +19576,28 @@ end module ActionDispatch::TestProcess::FixtureFile # Shortcut for Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.file_fixture_path, path), type): # - # post :change_avatar, params: { avatar: fixture_file_upload('david.png', 'image/png') } + # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png') } + # + # Default fixture files location is test/fixtures/files. + # + # To upload binary files on Windows, pass :binary as the last parameter. + # This will not affect other platforms: + # + # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png', :binary) } + # + # source://actionpack//lib/action_dispatch/testing/test_process.rb#19 + def file_fixture_upload(path, mime_type = T.unsafe(nil), binary = T.unsafe(nil)); end + + # Shortcut for Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.file_fixture_path, path), type): + # + # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png') } # # Default fixture files location is test/fixtures/files. # # To upload binary files on Windows, pass :binary as the last parameter. # This will not affect other platforms: # - # post :change_avatar, params: { avatar: fixture_file_upload('david.png', 'image/png', :binary) } + # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png', :binary) } # # source://actionpack//lib/action_dispatch/testing/test_process.rb#19 def fixture_file_upload(path, mime_type = T.unsafe(nil), binary = T.unsafe(nil)); end @@ -18958,24 +19668,38 @@ class ActionDispatch::TestResponse < ::ActionDispatch::Response # # ==== Examples # get "/posts" - # response.content_type # => "text/html; charset=utf-8" - # response.parsed_body.class # => String - # response.parsed_body # => "\n\n..." + # response.content_type # => "text/html; charset=utf-8" + # response.parsed_body.class # => Nokogiri::HTML5::Document + # response.parsed_body.to_html # => "\n\n..." + # + # assert_pattern { response.parsed_body.at("main") => { content: "Hello, world" } } + # + # response.parsed_body.at("main") => {name:, content:} + # assert_equal "main", name + # assert_equal "Some main content", content # # get "/posts.json" - # response.content_type # => "application/json; charset=utf-8" - # response.parsed_body.class # => Array - # response.parsed_body # => [{"id"=>42, "title"=>"Title"},... + # response.content_type # => "application/json; charset=utf-8" + # response.parsed_body.class # => Array + # response.parsed_body # => [{"id"=>42, "title"=>"Title"},... + # + # assert_pattern { response.parsed_body => [{ id: 42 }] } # # get "/posts/42.json" - # response.content_type # => "application/json; charset=utf-8" - # response.parsed_body.class # => Hash - # response.parsed_body # => {"id"=>42, "title"=>"Title"} + # response.content_type # => "application/json; charset=utf-8" + # response.parsed_body.class # => ActiveSupport::HashWithIndifferentAccess + # response.parsed_body # => {"id"=>42, "title"=>"Title"} # - # source://actionpack//lib/action_dispatch/testing/test_response.rb#35 + # assert_pattern { response.parsed_body => [{ title: /title/i }] } + # + # response.parsed_body => {id:, title:} + # assert_equal 42, id + # assert_equal "Title", title + # + # source://actionpack//lib/action_dispatch/testing/test_response.rb#49 def parsed_body; end - # source://actionpack//lib/action_dispatch/testing/test_response.rb#39 + # source://actionpack//lib/action_dispatch/testing/test_response.rb#53 def response_parser; end class << self @@ -18987,12 +19711,12 @@ end # source://actionpack//lib/action_pack/gem_version.rb#3 module ActionPack class << self - # Returns the currently loaded version of Action Pack as a Gem::Version. + # Returns the currently loaded version of Action Pack as a +Gem::Version+. # # source://actionpack//lib/action_pack/gem_version.rb#5 def gem_version; end - # Returns the currently loaded version of Action Pack as a Gem::Version. + # Returns the currently loaded version of Action Pack as a +Gem::Version+. # # source://actionpack//lib/action_pack/version.rb#7 def version; end @@ -19009,7 +19733,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) @@ -19025,11 +19749,19 @@ end # source://actionpack//lib/action_dispatch/http/mime_type.rb#5 module Mime class << self - # source://actionpack//lib/action_dispatch/http/mime_type.rb#40 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#49 def [](type); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#45 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#62 def fetch(type, &block); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#54 + def symbols; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#58 + def valid_symbols?(symbols); end end end @@ -19037,27 +19769,27 @@ end # other concrete types. It's a wildcard match that we use for +respond_to+ # negotiation internals. # -# source://actionpack//lib/action_dispatch/http/mime_type.rb#333 +# source://actionpack//lib/action_dispatch/http/mime_type.rb#356 Mime::ALL = T.let(T.unsafe(nil), Mime::AllType) -# source://actionpack//lib/action_dispatch/http/mime_type.rb#319 +# source://actionpack//lib/action_dispatch/http/mime_type.rb#342 class Mime::AllType < ::Mime::Type include ::Singleton extend ::Singleton::SingletonClassMethods # @return [AllType] a new instance of AllType # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#322 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#345 def initialize; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#326 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#349 def all?; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#327 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#350 def html?; end class << self @@ -19068,10 +19800,10 @@ class Mime::AllType < ::Mime::Type end end -# source://actionpack//lib/action_dispatch/http/mime_type.rb#36 +# source://actionpack//lib/action_dispatch/http/mime_type.rb#45 Mime::EXTENSION_LOOKUP = T.let(T.unsafe(nil), Hash) -# source://actionpack//lib/action_dispatch/http/mime_type.rb#37 +# source://actionpack//lib/action_dispatch/http/mime_type.rb#46 Mime::LOOKUP = T.let(T.unsafe(nil), Hash) # source://actionpack//lib/action_dispatch/http/mime_type.rb#6 @@ -19083,45 +19815,52 @@ class Mime::Mimes # source://actionpack//lib/action_dispatch/http/mime_type.rb#11 def initialize; end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#20 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#21 def <<(type); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#25 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#28 def delete_if; end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#16 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#17 def each(&block); end # Returns the value of attribute symbols. # # source://actionpack//lib/action_dispatch/http/mime_type.rb#7 def symbols; end + + # :nodoc + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#39 + def valid_symbols?(symbols); end end -# source://actionpack//lib/action_dispatch/http/mime_type.rb#335 +# source://actionpack//lib/action_dispatch/http/mime_type.rb#358 class Mime::NullType include ::Singleton extend ::Singleton::SingletonClassMethods # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#338 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#361 def nil?; end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#346 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#369 def ref; end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#342 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#365 def to_s; end private - # source://actionpack//lib/action_dispatch/http/mime_type.rb#353 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#376 def method_missing(method, *args); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#349 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#372 def respond_to_missing?(method, _); end class << self @@ -19132,7 +19871,7 @@ class Mime::NullType end end -# source://actionpack//lib/action_dispatch/http/mime_type.rb#35 +# source://actionpack//lib/action_dispatch/http/mime_type.rb#44 Mime::SET = T.let(T.unsafe(nil), Mime::Mimes) # Encapsulates the notion of a MIME type. Can be used at render time, for example, with: @@ -19149,124 +19888,124 @@ Mime::SET = T.let(T.unsafe(nil), Mime::Mimes) # end # end # -# source://actionpack//lib/action_dispatch/http/mime_type.rb#64 +# source://actionpack//lib/action_dispatch/http/mime_type.rb#81 class Mime::Type # @return [Type] a new instance of Type # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#234 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#257 def initialize(string, symbol = T.unsafe(nil), synonyms = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#267 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#290 def ==(mime_type); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#259 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#282 def ===(list); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#281 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#304 def =~(mime_type); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#297 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#320 def all?; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#274 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#297 def eql?(other); end # Returns the value of attribute hash. # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#225 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#248 def hash; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#293 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#316 def html?; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#287 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#310 def match?(mime_type); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#255 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#278 def ref; end # Returns the value of attribute symbol. # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#65 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#82 def symbol; end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#243 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#266 def to_s; end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#247 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#270 def to_str; end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#251 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#274 def to_sym; end protected # Returns the value of attribute string. # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#300 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#323 def string; end # Returns the value of attribute synonyms. # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#300 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#323 def synonyms; end private - # source://actionpack//lib/action_dispatch/http/mime_type.rb#306 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#329 def method_missing(method, *args); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#314 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#337 def respond_to_missing?(method, include_private = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#304 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#327 def to_a; end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#303 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#326 def to_ary; end class << self - # source://actionpack//lib/action_dispatch/http/mime_type.rb#144 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#164 def lookup(string); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#148 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#169 def lookup_by_extension(extension); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#172 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#193 def parse(accept_header); end # For an input of 'text', returns [Mime[:json], Mime[:xml], Mime[:ics], - # Mime[:html], Mime[:css], Mime[:csv], Mime[:js], Mime[:yaml], Mime[:text]. + # Mime[:html], Mime[:css], Mime[:csv], Mime[:js], Mime[:yaml], Mime[:text]]. # # For an input of 'application', returns [Mime[:html], Mime[:js], - # Mime[:xml], Mime[:yaml], Mime[:atom], Mime[:json], Mime[:rss], Mime[:url_encoded_form]. + # Mime[:xml], Mime[:yaml], Mime[:atom], Mime[:json], Mime[:rss], Mime[:url_encoded_form]]. # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#206 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#229 def parse_data_with_trailing_star(type); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#197 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#220 def parse_trailing_star(accept_header); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#158 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#179 def register(string, symbol, mime_type_synonyms = T.unsafe(nil), extension_synonyms = T.unsafe(nil), skip_lookup = T.unsafe(nil)); end # Registers an alias that's not used on MIME type lookup, but can be referenced directly. Especially useful for # rendering different HTML versions depending on the user agent, like an iPhone. # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#154 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#175 def register_alias(string, symbol, extension_synonyms = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#140 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#160 def register_callback(&block); end # This method is opposite of register method. @@ -19275,78 +20014,78 @@ class Mime::Type # # Mime::Type.unregister(:mobile) # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#215 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#238 def unregister(symbol); end end end # A simple helper class used in parsing the accept header. # -# source://actionpack//lib/action_dispatch/http/mime_type.rb#70 +# source://actionpack//lib/action_dispatch/http/mime_type.rb#87 class Mime::Type::AcceptItem # @return [AcceptItem] a new instance of AcceptItem # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#74 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#91 def initialize(index, name, q = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#81 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#98 def <=>(item); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#88 def index; end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#88 def index=(_arg0); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#88 def name; end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#88 def name=(_arg0); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#88 def q; end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#88 def q=(_arg0); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#88 def to_s; end end -# source://actionpack//lib/action_dispatch/http/mime_type.rb#88 +# source://actionpack//lib/action_dispatch/http/mime_type.rb#105 class Mime::Type::AcceptList class << self - # source://actionpack//lib/action_dispatch/http/mime_type.rb#131 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#148 def find_item_by_name(array, name); end - # source://actionpack//lib/action_dispatch/http/mime_type.rb#89 + # source://actionpack//lib/action_dispatch/http/mime_type.rb#106 def sort!(list); end end end -# source://actionpack//lib/action_dispatch/http/mime_type.rb#232 +# source://actionpack//lib/action_dispatch/http/mime_type.rb#255 class Mime::Type::InvalidMimeType < ::StandardError; end -# source://actionpack//lib/action_dispatch/http/mime_type.rb#227 +# source://actionpack//lib/action_dispatch/http/mime_type.rb#250 Mime::Type::MIME_NAME = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/http/mime_type.rb#229 +# source://actionpack//lib/action_dispatch/http/mime_type.rb#252 Mime::Type::MIME_PARAMETER = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/http/mime_type.rb#228 +# source://actionpack//lib/action_dispatch/http/mime_type.rb#251 Mime::Type::MIME_PARAMETER_VALUE = T.let(T.unsafe(nil), String) -# source://actionpack//lib/action_dispatch/http/mime_type.rb#230 +# source://actionpack//lib/action_dispatch/http/mime_type.rb#253 Mime::Type::MIME_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://actionpack//lib/action_dispatch.rb#33 +# source://actionpack//lib/action_dispatch.rb#34 module Rack class << self - # source://rack/2.2.7/lib/rack/version.rb#26 + # source://rack/3.0.9.1/lib/rack/version.rb#31 def release; end - # source://rack/2.2.7/lib/rack/version.rb#19 + # source://rack/3.0.9.1/lib/rack/version.rb#23 def version; end end end diff --git a/sorbet/rbi/gems/actiontext@7.0.6.rbi b/sorbet/rbi/gems/actiontext@7.1.3.2.rbi similarity index 55% rename from sorbet/rbi/gems/actiontext@7.0.6.rbi rename to sorbet/rbi/gems/actiontext@7.1.3.2.rbi index c1c395843..5394c916b 100644 --- a/sorbet/rbi/gems/actiontext@7.0.6.rbi +++ b/sorbet/rbi/gems/actiontext@7.1.3.2.rbi @@ -4,90 +4,166 @@ # This is an autogenerated file for types exported from the `actiontext` gem. # Please instead update this file by running `bin/tapioca gem actiontext`. -# source://actiontext//lib/action_text.rb#8 +# :markup: markdown +# :include: actiontext/README.md +# +# source://actiontext//lib/action_text/gem_version.rb#3 module ActionText extend ::ActiveSupport::Autoload class << self - # source://railties/7.0.6/lib/rails/engine.rb#405 + # source://actiontext//lib/action_text/deprecator.rb#4 + def deprecator; end + + # Returns the currently loaded version of Action Text as a +Gem::Version+. + # + # source://actiontext//lib/action_text/gem_version.rb#5 + def gem_version; end + + # source://actiontext//lib/action_text.rb#47 + def html_document_class; end + + # source://actiontext//lib/action_text.rb#53 + def html_document_fragment_class; end + + # source://railties/7.1.3.2/lib/rails/engine.rb#412 def railtie_helpers_paths; end - # source://railties/7.0.6/lib/rails/engine.rb#394 + # source://railties/7.1.3.2/lib/rails/engine.rb#395 def railtie_namespace; end - # source://railties/7.0.6/lib/rails/engine.rb#409 + # source://railties/7.1.3.2/lib/rails/engine.rb#416 def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end - # source://railties/7.0.6/lib/rails/engine.rb#397 + # source://railties/7.1.3.2/lib/rails/engine.rb#401 def table_name_prefix; end - # source://railties/7.0.6/lib/rails/engine.rb#401 + # source://railties/7.1.3.2/lib/rails/engine.rb#408 def use_relative_model_naming?; end + + # Returns the currently loaded version of Action Text as a +Gem::Version+. + # + # source://actiontext//lib/action_text/version.rb#7 + def version; end end end -# source://actiontext//lib/action_text/attachable.rb#4 +# = Action Text \Attachable +# +# Include this module to make a record attachable to an ActionText::Content. +# +# class Person < ApplicationRecord +# include ActionText::Attachable +# end +# +# person = Person.create! name: "Javan" +# html = %Q() +# content = ActionText::Content.new(html) +# content.attachables # => [person] +# +# source://actiontext//lib/action_text/attachable.rb#16 module ActionText::Attachable extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionText::Attachable::ClassMethods - # source://actiontext//lib/action_text/attachable.rb#66 - def as_json(*_arg0); end - - # source://actiontext//lib/action_text/attachable.rb#46 + # source://actiontext//lib/action_text/attachable.rb#81 def attachable_content_type; end - # source://actiontext//lib/action_text/attachable.rb#50 + # source://actiontext//lib/action_text/attachable.rb#85 def attachable_filename; end - # source://actiontext//lib/action_text/attachable.rb#54 + # source://actiontext//lib/action_text/attachable.rb#89 def attachable_filesize; end - # source://actiontext//lib/action_text/attachable.rb#58 + # source://actiontext//lib/action_text/attachable.rb#93 def attachable_metadata; end - # source://actiontext//lib/action_text/attachable.rb#42 + # Returns the Signed Global ID for the attachable. The purpose of the ID is + # set to 'attachable' so it can't be reused for other purposes. + # + # source://actiontext//lib/action_text/attachable.rb#77 def attachable_sgid; end # @return [Boolean] # - # source://actiontext//lib/action_text/attachable.rb#62 + # source://actiontext//lib/action_text/attachable.rb#97 def previewable_attachable?; end - # source://actiontext//lib/action_text/attachable.rb#74 + # Returns the path to the partial that is used for rendering the attachable. + # Defaults to +to_partial_path+. + # + # Override to render a different partial: + # + # class User < ApplicationRecord + # def to_attachable_partial_path + # "users/attachable" + # end + # end + # + # source://actiontext//lib/action_text/attachable.rb#125 def to_attachable_partial_path; end - # source://actiontext//lib/action_text/attachable.rb#78 + # source://actiontext//lib/action_text/attachable.rb#129 def to_rich_text_attributes(attributes = T.unsafe(nil)); end - # source://actiontext//lib/action_text/attachable.rb#70 + # Returns the path to the partial that is used for rendering the attachable + # in Trix. Defaults to +to_partial_path+. + # + # Override to render a different partial: + # + # class User < ApplicationRecord + # def to_trix_content_attachment_partial_path + # "users/trix_content_attachment" + # end + # end + # + # source://actiontext//lib/action_text/attachable.rb#111 def to_trix_content_attachment_partial_path; end + private + + # source://actiontext//lib/action_text/attachable.rb#142 + def attribute_names_for_serialization; end + + # source://actiontext//lib/action_text/attachable.rb#146 + def read_attribute_for_serialization(key); end + class << self - # source://actiontext//lib/action_text/attachable.rb#22 + # source://actiontext//lib/action_text/attachable.rb#41 def from_attachable_sgid(sgid, options = T.unsafe(nil)); end - # source://actiontext//lib/action_text/attachable.rb#10 + # Extracts the +ActionText::Attachable+ from the attachment HTML node: + # + # person = Person.create! name: "Javan" + # html = %Q() + # fragment = ActionText::Fragment.wrap(html) + # attachment_node = fragment.find_all(ActionText::Attachment.tag_name).first + # ActionText::Attachable.from_node(attachment_node) # => person + # + # source://actiontext//lib/action_text/attachable.rb#29 def from_node(node); end private - # source://actiontext//lib/action_text/attachable.rb#29 + # source://actiontext//lib/action_text/attachable.rb#48 def attachable_from_sgid(sgid); end end end # source://actiontext//lib/action_text/attachable.rb#0 module ActionText::Attachable::ClassMethods - # source://actiontext//lib/action_text/attachable.rb#37 + # source://actiontext//lib/action_text/attachable.rb#56 def from_attachable_sgid(sgid); end + + # source://actiontext//lib/action_text/attachable.rb#70 + def to_missing_attachable_partial_path; end end -# source://actiontext//lib/action_text/attachable.rb#7 +# source://actiontext//lib/action_text/attachable.rb#19 ActionText::Attachable::LOCATOR_NAME = T.let(T.unsafe(nil), String) -# source://actiontext//lib/action_text.rb#25 +# source://actiontext//lib/action_text.rb#30 module ActionText::Attachables extend ::ActiveSupport::Autoload end @@ -101,6 +177,7 @@ class ActionText::Attachables::ContentAttachment include ::ActiveModel::ForbiddenAttributesProtection include ::ActiveModel::AttributeAssignment include ::ActiveModel::API + include ::ActiveModel::Access include ::ActiveModel::Model extend ::ActiveModel::Validations::ClassMethods extend ::ActiveModel::Naming @@ -111,99 +188,138 @@ class ActionText::Attachables::ContentAttachment extend ::ActiveModel::Validations::HelperMethods extend ::ActiveModel::Conversion::ClassMethods - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_validate_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _validate_callbacks; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators?; end - # source://actiontext//lib/action_text/attachables/content_attachment.rb#20 + # source://actiontext//lib/action_text/attachables/content_attachment.rb#18 def attachable_plain_text_representation(caption); end - # source://activemodel/7.0.6/lib/active_model/naming.rb#244 - def model_name(*_arg0, **_arg1, &_arg2); end + # Returns the value of attribute content. + # + # source://actiontext//lib/action_text/attachables/content_attachment.rb#13 + def content; end - # Returns the value of attribute name. + # Sets the attribute content # - # source://actiontext//lib/action_text/attachables/content_attachment.rb#17 - def name; end + # @param value the value to set the attribute content to. + # + # source://actiontext//lib/action_text/attachables/content_attachment.rb#13 + def content=(_arg0); end - # Sets the attribute name + # Returns the value of attribute content_type. # - # @param value the value to set the attribute name to. + # source://actiontext//lib/action_text/attachables/content_attachment.rb#13 + def content_type; end + + # Sets the attribute content_type # - # source://actiontext//lib/action_text/attachables/content_attachment.rb#17 - def name=(_arg0); end + # @param value the value to set the attribute content_type to. + # + # source://actiontext//lib/action_text/attachables/content_attachment.rb#13 + def content_type=(_arg0); end + + # source://activemodel/7.1.3.2/lib/active_model/naming.rb#255 + def model_name(&block); end - # source://actiontext//lib/action_text/attachables/content_attachment.rb#29 + # source://activemodel/7.1.3.2/lib/active_model/conversion.rb#32 + def param_delimiter=(_arg0); end + + # source://actiontext//lib/action_text/attachables/content_attachment.rb#22 + def to_html; end + + # source://actiontext//lib/action_text/attachables/content_attachment.rb#30 def to_partial_path; end - # source://actiontext//lib/action_text/attachables/content_attachment.rb#33 - def to_trix_content_attachment_partial_path; end + # source://actiontext//lib/action_text/attachables/content_attachment.rb#26 + def to_s; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#48 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#67 def validation_context; end private - # source://activemodel/7.0.6/lib/active_model/validations.rb#48 + # source://actiontext//lib/action_text/attachables/content_attachment.rb#35 + def content_instance; end + + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#67 def validation_context=(_arg0); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _validate_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _validate_callbacks=(value); end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators=(value); end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/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.2/lib/active_model/conversion.rb#32 + def param_delimiter; end + + # source://activemodel/7.1.3.2/lib/active_model/conversion.rb#32 + def param_delimiter=(value); end + + # source://activemodel/7.1.3.2/lib/active_model/conversion.rb#32 + def param_delimiter?; end end end # source://actiontext//lib/action_text/attachables/missing_attachable.rb#5 -module ActionText::Attachables::MissingAttachable +class ActionText::Attachables::MissingAttachable extend ::ActiveModel::Naming - # source://activemodel/7.0.6/lib/active_model/naming.rb#244 - def model_name(*_arg0, **_arg1, &_arg2); end + # @return [MissingAttachable] a new instance of MissingAttachable + # + # source://actiontext//lib/action_text/attachables/missing_attachable.rb#10 + def initialize(sgid); end - class << self - # source://actiontext//lib/action_text/attachables/missing_attachable.rb#8 - def to_partial_path; end - end + # source://actiontext//lib/action_text/attachables/missing_attachable.rb#22 + def model; end + + # source://activemodel/7.1.3.2/lib/active_model/naming.rb#255 + def model_name(&block); end + + # source://actiontext//lib/action_text/attachables/missing_attachable.rb#14 + def to_partial_path; end end +# source://actiontext//lib/action_text/attachables/missing_attachable.rb#8 +ActionText::Attachables::MissingAttachable::DEFAULT_PARTIAL_PATH = T.let(T.unsafe(nil), String) + # source://actiontext//lib/action_text/attachables/remote_image.rb#5 class ActionText::Attachables::RemoteImage extend ::ActiveModel::Naming @@ -226,8 +342,8 @@ class ActionText::Attachables::RemoteImage # source://actiontext//lib/action_text/attachables/remote_image.rb#28 def height; end - # source://activemodel/7.0.6/lib/active_model/naming.rb#244 - def model_name(*_arg0, **_arg1, &_arg2); end + # source://activemodel/7.1.3.2/lib/active_model/naming.rb#255 + def model_name(&block); end # source://actiontext//lib/action_text/attachables/remote_image.rb#41 def to_partial_path; end @@ -258,7 +374,19 @@ class ActionText::Attachables::RemoteImage end end -# source://actiontext//lib/action_text/attachment.rb#6 +# = Action Text \Attachment +# +# Attachments serialize attachables to HTML or plain text. +# +# class Person < ApplicationRecord +# include ActionText::Attachable +# end +# +# attachable = Person.create! name: "Javan" +# attachment = ActionText::Attachment.from_attachable(attachable) +# attachment.to_html # => " " "[racecar.jpg]" + # + # Use the +caption+ when set: + # + # attachment = ActionText::Attachment.from_attachable(attachable, caption: "Vroom vroom") + # attachment.to_plain_text # => "[Vroom vroom]" + # + # The presentation can be overridden by implementing the + # +attachable_plain_text_representation+ method: + # + # class Person < ApplicationRecord + # include ActionText::Attachable + # + # def attachable_plain_text_representation + # "[#{name}]" + # end + # end + # + # attachable = Person.create! name: "Javan" + # attachment = ActionText::Attachment.from_attachable(attachable) + # attachment.to_plain_text # => "[Javan]" + # + # source://actiontext//lib/action_text/attachment.rb#108 def to_plain_text; end - # source://actiontext//lib/action_text/attachment.rb#84 + # source://actiontext//lib/action_text/attachment.rb#125 def to_s; end - # source://actiontext//lib/action_text/attachment.rb#68 + # source://actiontext//lib/action_text/attachment.rb#79 def with_full_attributes; end private - # source://actiontext//lib/action_text/attachment.rb#97 + # source://actiontext//lib/action_text/attachment.rb#138 def attachable_attributes; end - # source://actiontext//lib/action_text/attachment.rb#93 + # source://actiontext//lib/action_text/attachment.rb#134 def node_attributes; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/delegation.rb#294 + # source://activesupport/7.1.3.2/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#101 + # source://actiontext//lib/action_text/attachment.rb#142 def sgid_attributes; end class << self - # source://actiontext//lib/action_text/attachment.rb#14 + # source://actiontext//lib/action_text/attachment.rb#25 def fragment_by_canonicalizing_attachments(content); end - # source://actiontext//lib/action_text/attachment.rb#26 + # source://actiontext//lib/action_text/attachment.rb#37 def from_attachable(attachable, attributes = T.unsafe(nil)); end - # source://actiontext//lib/action_text/attachment.rb#22 + # source://actiontext//lib/action_text/attachment.rb#33 def from_attachables(attachables); end - # source://actiontext//lib/action_text/attachment.rb#32 + # source://actiontext//lib/action_text/attachment.rb#43 def from_attributes(attributes, attachable = T.unsafe(nil)); end - # source://actiontext//lib/action_text/attachment.rb#18 + # source://actiontext//lib/action_text/attachment.rb#29 def from_node(node, attachable = T.unsafe(nil)); end - # source://actiontext//lib/action_text/attachment.rb#9 + # source://actiontext//lib/action_text/attachment.rb#20 def tag_name; end - # source://actiontext//lib/action_text/attachment.rb#9 + # source://actiontext//lib/action_text/attachment.rb#20 def tag_name=(val); end private - # source://actiontext//lib/action_text/attachment.rb#39 + # source://actiontext//lib/action_text/attachment.rb#50 def node_from_attributes(attributes); end - # source://actiontext//lib/action_text/attachment.rb#45 + # source://actiontext//lib/action_text/attachment.rb#56 def process_attributes(attributes); end end end -# source://actiontext//lib/action_text/attachment.rb#11 +# source://actiontext//lib/action_text/attachment.rb#22 ActionText::Attachment::ATTRIBUTES = T.let(T.unsafe(nil), Array) # source://actiontext//lib/action_text/attachment_gallery.rb#4 @@ -372,6 +532,7 @@ class ActionText::AttachmentGallery include ::ActiveModel::ForbiddenAttributesProtection include ::ActiveModel::AttributeAssignment include ::ActiveModel::API + include ::ActiveModel::Access include ::ActiveModel::Model extend ::ActiveModel::Validations::ClassMethods extend ::ActiveModel::Naming @@ -387,22 +548,22 @@ class ActionText::AttachmentGallery # source://actiontext//lib/action_text/attachment_gallery.rb#52 def initialize(node); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_validate_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _validate_callbacks; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators?; end # source://actiontext//lib/action_text/attachment_gallery.rb#56 @@ -411,48 +572,51 @@ class ActionText::AttachmentGallery # source://actiontext//lib/action_text/attachment_gallery.rb#66 def inspect; end - # source://activemodel/7.0.6/lib/active_model/naming.rb#244 - def model_name(*_arg0, **_arg1, &_arg2); end + # source://activemodel/7.1.3.2/lib/active_model/naming.rb#255 + def model_name(&block); end # Returns the value of attribute node. # # source://actiontext//lib/action_text/attachment_gallery.rb#50 def node; end + # source://activemodel/7.1.3.2/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.0.6/lib/active_model/validations.rb#48 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#67 def validation_context; end private - # source://activemodel/7.0.6/lib/active_model/validations.rb#48 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#67 def validation_context=(_arg0); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _validate_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _validate_callbacks=(value); end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators=(value); end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators?; end # source://actiontext//lib/action_text/attachment_gallery.rb#41 @@ -470,6 +634,15 @@ class ActionText::AttachmentGallery # source://actiontext//lib/action_text/attachment_gallery.rb#37 def from_node(node); end + # source://activemodel/7.1.3.2/lib/active_model/conversion.rb#32 + def param_delimiter; end + + # source://activemodel/7.1.3.2/lib/active_model/conversion.rb#32 + def param_delimiter=(value); end + + # source://activemodel/7.1.3.2/lib/active_model/conversion.rb#32 + def param_delimiter?; end + # source://actiontext//lib/action_text/attachment_gallery.rb#45 def selector; end end @@ -478,7 +651,7 @@ end # source://actiontext//lib/action_text/attachment_gallery.rb#7 ActionText::AttachmentGallery::TAG_NAME = T.let(T.unsafe(nil), String) -# source://actiontext//lib/action_text.rb#33 +# source://actiontext//lib/action_text.rb#38 module ActionText::Attachments extend ::ActiveSupport::Autoload end @@ -540,17 +713,36 @@ end # source://actiontext//lib/action_text/attribute.rb#0 module ActionText::Attribute::ClassMethods - # source://actiontext//lib/action_text/attribute.rb#33 - def has_rich_text(name, encrypted: T.unsafe(nil)); end + # source://actiontext//lib/action_text/attribute.rb#37 + def has_rich_text(name, encrypted: T.unsafe(nil), strict_loading: T.unsafe(nil)); end - # source://actiontext//lib/action_text/attribute.rb#61 + # source://actiontext//lib/action_text/attribute.rb#66 def rich_text_association_names; end - # source://actiontext//lib/action_text/attribute.rb#57 + # source://actiontext//lib/action_text/attribute.rb#62 def with_all_rich_text; end end -# source://actiontext//lib/action_text/content.rb#4 +# = Action Text \Content +# +# The +ActionText::Content+ class wraps an HTML fragment to add support for +# parsing, rendering and serialization. It can be used to extract links and +# attachments, convert the fragment to plain text, or serialize the fragment +# to the database. +# +# The ActionText::RichText record serializes the `body` attribute as +# +ActionText::Content+. +# +# class Message < ActiveRecord::Base +# has_rich_text :content +# end +# +# message = Message.create!(content: "

Funny times!

") +# body = message.content.body # => # +# body.to_s # => "

Funny times!

" +# body.to_plain_text # => "Funny times!" +# +# source://actiontext//lib/action_text/content.rb#22 class ActionText::Content include ::ActionText::Serialization include ::ActionText::Rendering @@ -559,108 +751,127 @@ class ActionText::Content # @return [Content] a new instance of Content # - # source://actiontext//lib/action_text/content.rb#19 + # 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#106 + # source://actiontext//lib/action_text/content.rb#145 def ==(other); end - # source://actiontext//lib/action_text/content.rb#55 + # source://actiontext//lib/action_text/content.rb#90 def append_attachables(attachables); end - # source://actiontext//lib/action_text/content.rb#98 + # source://actiontext//lib/action_text/content.rb#137 def as_json(*_arg0); end - # source://actiontext//lib/action_text/content.rb#49 + # Extracts +ActionText::Attachable+s from the HTML fragment: + # + # attachable = ActiveStorage::Blob.first + # html = %Q() + # content = ActionText::Content.new(html) + # content.attachables # => [attachable] + # + # source://actiontext//lib/action_text/content.rb#84 def attachables; end - # source://actiontext//lib/action_text/content.rb#39 + # source://actiontext//lib/action_text/content.rb#68 def attachment_galleries; end - # source://actiontext//lib/action_text/content.rb#33 + # Extracts +ActionText::Attachment+s from the HTML fragment: + # + # attachable = ActiveStorage::Blob.first + # html = %Q() + # content = ActionText::Content.new(html) + # content.attachments # => [# ["http://example.com/"] + # + # source://actiontext//lib/action_text/content.rb#52 def links; end - # source://actiontext//lib/action_text/content.rb#9 + # source://actiontext//lib/action_text/content.rb#27 def present?(*_arg0, **_arg1, &_arg2); end - # source://actiontext//lib/action_text/rendering.rb#13 + # source://actiontext//lib/action_text/rendering.rb#12 def render(*_arg0, **_arg1, &_arg2); end - # source://actiontext//lib/action_text/content.rb#67 + # source://actiontext//lib/action_text/content.rb#102 def render_attachment_galleries(&block); end - # source://actiontext//lib/action_text/content.rb#60 + # source://actiontext//lib/action_text/content.rb#95 def render_attachments(**options, &block); end - # source://actiontext//lib/action_text/content.rb#82 + # source://actiontext//lib/action_text/content.rb#121 def to_html; end - # source://actiontext//lib/action_text/content.rb#90 + # source://actiontext//lib/action_text/content.rb#129 def to_partial_path; end - # source://actiontext//lib/action_text/content.rb#74 + # Returns the content as plain text with all HTML tags removed. + # + # content = ActionText::Content.new("

Funny times!

") + # content.to_plain_text # => "Funny times!" + # + # source://actiontext//lib/action_text/content.rb#113 def to_plain_text; end - # source://actiontext//lib/action_text/content.rb#86 + # source://actiontext//lib/action_text/content.rb#125 def to_rendered_html_with_layout; end - # source://actiontext//lib/action_text/content.rb#94 + # source://actiontext//lib/action_text/content.rb#133 def to_s; end - # source://actiontext//lib/action_text/content.rb#78 + # source://actiontext//lib/action_text/content.rb#117 def to_trix_html; end private - # source://actiontext//lib/action_text/content.rb#121 + # source://actiontext//lib/action_text/content.rb#162 def attachment_for_node(node, with_full_attributes: T.unsafe(nil)); end - # source://actiontext//lib/action_text/content.rb#126 + # source://actiontext//lib/action_text/content.rb#167 def attachment_gallery_for_node(node); end - # source://actiontext//lib/action_text/content.rb#117 + # source://actiontext//lib/action_text/content.rb#158 def attachment_gallery_nodes; end - # source://actiontext//lib/action_text/content.rb#113 + # source://actiontext//lib/action_text/content.rb#154 def attachment_nodes; end class << self - # source://actiontext//lib/action_text/rendering.rb#11 - def default_renderer; end - - # source://actiontext//lib/action_text/rendering.rb#11 - def default_renderer=(val); end - - # source://actiontext//lib/action_text/content.rb#12 + # source://actiontext//lib/action_text/content.rb#30 def fragment_by_canonicalizing_content(content); end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#48 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 def renderer; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#92 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 def renderer=(obj); end end end @@ -676,6 +887,8 @@ module ActionText::ContentHelper def sanitize_action_text_content(content); end def sanitizer; end def sanitizer=(val); end + def sanitizer_allowed_attributes; end + def sanitizer_allowed_tags; end def scrubber; end def scrubber=(val); end @@ -696,16 +909,16 @@ class ActionText::EncryptedRichText < ::ActionText::RichText include ::ActionText::EncryptedRichText::GeneratedAssociationMethods class << self - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end - # source://activerecord/7.0.6/lib/active_record/attributes.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/attributes.rb#11 def attributes_to_define_after_schema_loads; end - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 + # source://activerecord/7.1.3.2/lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord/7.0.6/lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes; end end end @@ -741,11 +954,13 @@ end # source://actiontext//lib/action_text/engine.rb#11 class ActionText::Engine < ::Rails::Engine class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end end end +# = Action Text \FixtureSet +# # Fixtures are a way of organizing data that you want to test against; in # short, sample data. # @@ -781,7 +996,7 @@ end # When processed, Active Record will insert database records for each fixture # entry and will ensure the Action Text relationship is intact. # -# source://actiontext//lib/action_text/fixture_set.rb#38 +# source://actiontext//lib/action_text/fixture_set.rb#40 class ActionText::FixtureSet class << self # Fixtures support Action Text attachments as part of their body @@ -804,7 +1019,7 @@ class ActionText::FixtureSet # name: content # body:
Hello, <%= ActionText::FixtureSet.attachment("articles", :first) %>
# - # source://actiontext//lib/action_text/fixture_set.rb#59 + # source://actiontext//lib/action_text/fixture_set.rb#61 def attachment(fixture_set_name, label, column_type: T.unsafe(nil)); end end end @@ -827,16 +1042,16 @@ class ActionText::Fragment # source://actiontext//lib/action_text/fragment.rb#22 def source; end - # source://actiontext//lib/action_text/fragment.rb#49 + # source://actiontext//lib/action_text/fragment.rb#50 def to_html; end - # source://actiontext//lib/action_text/fragment.rb#45 + # source://actiontext//lib/action_text/fragment.rb#46 def to_plain_text; end - # source://actiontext//lib/action_text/fragment.rb#53 + # source://actiontext//lib/action_text/fragment.rb#54 def to_s; end - # @yield [source = self.source.clone] + # @yield [source = self.source.dup] # # source://actiontext//lib/action_text/fragment.rb#32 def update; end @@ -947,10 +1162,10 @@ class ActionText::Record < ::ActiveRecord::Base include ::ActionText::Record::GeneratedAssociationMethods class << self - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 + # source://activerecord/7.1.3.2/lib/active_record/enum.rb#167 def defined_enums; end end end @@ -967,10 +1182,13 @@ end # source://actiontext//lib/action_text/rendering.rb#0 module ActionText::Rendering::ClassMethods - # source://actiontext//lib/action_text/rendering.rb#25 + # source://actiontext//lib/action_text/rendering.rb#16 + def action_controller_renderer; end + + # source://actiontext//lib/action_text/rendering.rb#28 def render(*args, &block); end - # source://actiontext//lib/action_text/rendering.rb#17 + # source://actiontext//lib/action_text/rendering.rb#20 def with_renderer(renderer); end end @@ -978,13 +1196,13 @@ class ActionText::RichText < ::ActionText::Record include ::ActionText::RichText::GeneratedAttributeMethods include ::ActionText::RichText::GeneratedAssociationMethods - # source://activerecord/7.0.6/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_embeds_attachments(*args); end - # source://activerecord/7.0.6/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_embeds_blobs(*args); end - # source://activerecord/7.0.6/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_record(*args); end def blank?(*_arg0, **_arg1, &_arg2); end @@ -995,94 +1213,84 @@ class ActionText::RichText < ::ActionText::Record def to_s(*_arg0, **_arg1, &_arg2); end def to_trix_html; end - # source://activerecord/7.0.6/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/autosave_association.rb#160 def validate_associated_records_for_embeds_attachments(*args); end - # source://activerecord/7.0.6/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/autosave_association.rb#160 def validate_associated_records_for_embeds_blobs(*args); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#11 def _reflections; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end - # source://activestorage/7.0.6/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.3.2/lib/active_storage/reflection.rb#53 def attachment_reflections; end - # source://activerecord/7.0.6/lib/active_record/attributes.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/attributes.rb#11 def attributes_to_define_after_schema_loads; end - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 + # source://activerecord/7.1.3.2/lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.2/lib/active_record/scoping/named.rb#174 def with_attached_embeds(*args, **_arg1); end end end -module ActionText::RichText::EmbedsAttachmentsAssociationExtension - # source://activestorage/7.0.6/lib/active_storage/attached/model.rb#165 - def purge; end - - # source://activestorage/7.0.6/lib/active_storage/attached/model.rb#171 - def purge_later; end - - private - - # source://activestorage/7.0.6/lib/active_storage/attached/model.rb#178 - def deprecate(action); end -end - module ActionText::RichText::GeneratedAssociationMethods - # source://activestorage/7.0.6/lib/active_storage/attached/model.rb#134 + # source://activestorage/7.1.3.2/lib/active_storage/attached/model.rb#187 def embeds; end - # source://activestorage/7.0.6/lib/active_storage/attached/model.rb#139 + # source://activestorage/7.1.3.2/lib/active_storage/attached/model.rb#192 def embeds=(attachables); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/collection_association.rb#62 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/collection_association.rb#62 def embeds_attachment_ids; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/collection_association.rb#72 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/collection_association.rb#72 def embeds_attachment_ids=(ids); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#103 def embeds_attachments; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#111 def embeds_attachments=(value); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/collection_association.rb#62 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/collection_association.rb#62 def embeds_blob_ids; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/collection_association.rb#72 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/collection_association.rb#72 def embeds_blob_ids=(ids); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#103 def embeds_blobs; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#111 def embeds_blobs=(value); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#103 def record; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#111 def record=(value); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/belongs_to.rb#132 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/belongs_to.rb#145 def record_changed?; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/belongs_to.rb#136 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/belongs_to.rb#149 def record_previously_changed?; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#19 def reload_record; end + + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#23 + def reset_record; end end module ActionText::RichText::GeneratedAttributeMethods; end @@ -1185,6 +1393,24 @@ ActionText::TrixAttachment::SELECTOR = T.let(T.unsafe(nil), String) # source://actiontext//lib/action_text/trix_attachment.rb#5 ActionText::TrixAttachment::TAG_NAME = T.let(T.unsafe(nil), String) +# source://actiontext//lib/action_text/gem_version.rb#9 +module ActionText::VERSION; end + +# source://actiontext//lib/action_text/gem_version.rb#10 +ActionText::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://actiontext//lib/action_text/gem_version.rb#11 +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), String) + +# source://actiontext//lib/action_text/gem_version.rb#15 +ActionText::VERSION::STRING = T.let(T.unsafe(nil), String) + +# source://actiontext//lib/action_text/gem_version.rb#12 +ActionText::VERSION::TINY = T.let(T.unsafe(nil), Integer) + module ActionView::Helpers include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::TextHelper @@ -1199,216 +1425,216 @@ module ActionView::Helpers mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods class << self - # source://actionview/7.0.6/lib/action_view/helpers.rb#34 + # source://actionview/7.1.3.2/lib/action_view/helpers.rb#35 def eager_load!; end end end class ActionView::Helpers::FormBuilder - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1700 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1715 def initialize(object_name, object, template, options); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2614 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2644 def button(value = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2438 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_options_helper.rb#907 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_options_helper.rb#919 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_options_helper.rb#859 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def color_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def date_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/date_helper.rb#1239 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def datetime_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def datetime_local_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/date_helper.rb#1263 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def email_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2635 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2665 def emitted_hidden_id?; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1665 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1680 def field_helpers; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1665 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1680 def field_helpers=(_arg0); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1665 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1680 def field_helpers?; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1757 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#1777 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#2294 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2322 def fields(scope = T.unsafe(nil), model: T.unsafe(nil), **options, &block); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2257 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#2521 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2551 def file_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_options_helper.rb#871 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#2482 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2512 def hidden_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1737 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1752 def id; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1677 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1692 def index; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2369 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2399 def label(method, text = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def month_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1677 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1692 def multipart; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1680 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1695 def multipart=(multipart); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1677 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1692 def multipart?; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def number_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1675 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1690 def object; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1675 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1690 def object=(_arg0); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1675 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1690 def object_name; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1675 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1690 def object_name=(_arg0); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1675 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1690 def options; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1675 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1690 def options=(_arg0); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def password_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def phone_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2460 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2490 def radio_button(method, tag_value, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def search_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_options_helper.rb#847 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#2553 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2583 def submit(value = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def telephone_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def text_area(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def text_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def time_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/date_helper.rb#1251 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_options_helper.rb#883 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#1696 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1711 def to_model; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1692 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1707 def to_partial_path; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def url_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2021 def week_field(method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_options_helper.rb#895 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#2720 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2750 def convert_to_legacy_options(options); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2702 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2732 def fields_for_nested_model(name, object, fields_options, block); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2673 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2703 def fields_for_with_nested_attributes(association_name, association, options, block); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2669 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2699 def nested_attributes_association?(association_name); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2715 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2745 def nested_child_index(name); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2640 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2670 def objectify_options(options); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2646 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#2676 def submit_default_value; end class << self - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1688 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1703 def _to_partial_path; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1665 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1680 def field_helpers; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1665 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1680 def field_helpers=(value); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1665 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1680 def field_helpers?; end end end @@ -1422,141 +1648,141 @@ module ActionView::Helpers::FormHelper mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1573 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1586 def _object_for_form_builder(object); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1336 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#1366 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1373 def color_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1430 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1437 def date_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1497 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1510 def datetime_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1497 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#1551 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1564 def email_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1072 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1077 def fields(scope = T.unsafe(nil), model: T.unsafe(nil), **options, &block); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1021 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#1238 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1245 def file_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#433 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#434 def form_for(record, options = T.unsafe(nil), &block); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#754 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#479 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#480 def form_with_generates_ids; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#479 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#480 def form_with_generates_ids=(val); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#477 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#478 def form_with_generates_remote_forms; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#477 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#478 def form_with_generates_remote_forms=(val); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1205 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1212 def hidden_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1142 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#1516 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1529 def month_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#481 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#482 def multiple_file_field_include_hidden; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#481 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#482 def multiple_file_field_include_hidden=(val); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1560 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1573 def number_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1187 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1194 def password_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1398 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1405 def phone_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1358 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1365 def radio_button(object_name, method, tag_value, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1569 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#1389 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1396 def search_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1398 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1405 def telephone_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1268 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1275 def text_area(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1166 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1173 def text_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1468 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1475 def time_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1542 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1555 def url_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1533 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1546 def week_field(object_name, method, options = T.unsafe(nil)); end private - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#463 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#464 def apply_form_for_options!(object, options); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1607 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1620 def default_form_builder_class; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1578 + # source://actionview/7.1.3.2/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.0.6/lib/action_view/helpers/form_helper.rb#1593 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#1606 def instantiate_builder(record_name, record_object, options); end class << self - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#479 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#480 def form_with_generates_ids; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#479 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#480 def form_with_generates_ids=(val); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#477 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#478 def form_with_generates_remote_forms; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#477 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#478 def form_with_generates_remote_forms=(val); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#481 + # source://actionview/7.1.3.2/lib/action_view/helpers/form_helper.rb#482 def multiple_file_field_include_hidden; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#481 + # source://actionview/7.1.3.2/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.0.6.rbi b/sorbet/rbi/gems/actionview@7.1.3.2.rbi similarity index 87% rename from sorbet/rbi/gems/actionview@7.0.6.rbi rename to sorbet/rbi/gems/actionview@7.1.3.2.rbi index ada398d9f..e833e087f 100644 --- a/sorbet/rbi/gems/actionview@7.0.6.rbi +++ b/sorbet/rbi/gems/actionview@7.1.3.2.rbi @@ -5,540 +5,565 @@ # Please instead update this file by running `bin/tapioca gem actionview`. class ActionController::Base < ::ActionController::Metal + include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor include ::ActionDispatch::Routing::PolymorphicRoutes include ::ActionController::Head include ::AbstractController::Caching::ConfigMethods include ::ActionController::BasicImplicitRender + extend ::AbstractController::Helpers::Resolution - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods=(_arg0); end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://actionview//lib/action_view/layouts.rb#216 + def _layout_conditions(&block); end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _process_action_callbacks; end - # source://actionpack/7.0.6/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/7.1.3.2/lib/action_controller/metal/renderers.rb#31 def _renderers; end - # source://actionpack/7.0.6/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/7.1.3.2/lib/action_controller/metal/renderers.rb#31 def _renderers=(_arg0); end - # source://actionpack/7.0.6/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/7.1.3.2/lib/action_controller/metal/renderers.rb#31 def _renderers?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_process_action_callbacks(&block); end - # source://actionpack/7.0.6/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies; end - # source://actionpack/7.0.6/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies=(_arg0); end - # source://actionpack/7.0.6/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies?; end - # source://actionpack/7.0.6/lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack/7.1.3.2/lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options; end - # source://actionpack/7.0.6/lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack/7.1.3.2/lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options=(_arg0); end - # source://actionpack/7.0.6/lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack/7.1.3.2/lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options?; end - # source://actionpack/7.0.6/lib/action_controller/metal/flash.rb#36 + # source://actionpack/7.1.3.2/lib/action_controller/metal/flash.rb#36 def alert; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def allow_forgery_protection; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def allow_forgery_protection=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def assets_dir=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 + def csrf_token_storage_strategy; end + + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 + def csrf_token_storage_strategy=(value); end + + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_protect_from_forgery; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_protect_from_forgery=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_static_extension=(value); end - # source://actionpack/7.0.6/lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack/7.1.3.2/lib/action_dispatch/routing/url_for.rb#97 def default_url_options; end - # source://actionpack/7.0.6/lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack/7.1.3.2/lib/action_dispatch/routing/url_for.rb#97 def default_url_options=(_arg0); end - # source://actionpack/7.0.6/lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack/7.1.3.2/lib/action_dispatch/routing/url_for.rb#97 def default_url_options?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end - # source://actionpack/7.0.6/lib/action_controller/metal/etag_with_template_digest.rb#27 + # source://actionpack/7.1.3.2/lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest; end - # source://actionpack/7.0.6/lib/action_controller/metal/etag_with_template_digest.rb#27 + # source://actionpack/7.1.3.2/lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest=(_arg0); end - # source://actionpack/7.0.6/lib/action_controller/metal/etag_with_template_digest.rb#27 + # source://actionpack/7.1.3.2/lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest?; end - # source://actionpack/7.0.6/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/7.1.3.2/lib/action_controller/metal/conditional_get.rb#13 def etaggers; end - # source://actionpack/7.0.6/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/7.1.3.2/lib/action_controller/metal/conditional_get.rb#13 def etaggers=(_arg0); end - # source://actionpack/7.0.6/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/7.1.3.2/lib/action_controller/metal/conditional_get.rb#13 def etaggers?; end - # source://actionpack/7.0.6/lib/action_controller/metal/flash.rb#10 + # source://actionpack/7.1.3.2/lib/action_controller/metal/flash.rb#10 def flash(*_arg0, **_arg1, &_arg2); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def forgery_protection_origin_check; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def forgery_protection_origin_check=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def forgery_protection_strategy; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def forgery_protection_strategy=(value); end - # source://actionpack/7.0.6/lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys; end - # source://actionpack/7.0.6/lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys=(_arg0); end - # source://actionpack/7.0.6/lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys?; end - # source://actionpack/7.0.6/lib/action_controller/metal/helpers.rb#63 + # source://actionpack/7.1.3.2/lib/action_controller/metal/helpers.rb#65 def helpers_path; end - # source://actionpack/7.0.6/lib/action_controller/metal/helpers.rb#63 + # source://actionpack/7.1.3.2/lib/action_controller/metal/helpers.rb#65 def helpers_path=(_arg0); end - # source://actionpack/7.0.6/lib/action_controller/metal/helpers.rb#63 + # source://actionpack/7.1.3.2/lib/action_controller/metal/helpers.rb#65 def helpers_path?; end - # source://actionpack/7.0.6/lib/action_controller/metal/helpers.rb#64 + # source://actionpack/7.1.3.2/lib/action_controller/metal/helpers.rb#66 def include_all_helpers; end - # source://actionpack/7.0.6/lib/action_controller/metal/helpers.rb#64 + # source://actionpack/7.1.3.2/lib/action_controller/metal/helpers.rb#66 def include_all_helpers=(_arg0); end - # source://actionpack/7.0.6/lib/action_controller/metal/helpers.rb#64 + # source://actionpack/7.1.3.2/lib/action_controller/metal/helpers.rb#66 def include_all_helpers?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def log_warning_on_csrf_failure; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def log_warning_on_csrf_failure=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def logger=(value); end - # source://actionpack/7.0.6/lib/action_controller/metal/flash.rb#36 + # source://actionpack/7.1.3.2/lib/action_controller/metal/flash.rb#36 def notice; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def per_form_csrf_tokens; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def per_form_csrf_tokens=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def perform_caching=(value); end - # source://actionpack/7.0.6/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/7.1.3.2/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack/7.1.3.2/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + + # source://actionpack/7.1.3.2/lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects; end - # source://actionpack/7.0.6/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/7.1.3.2/lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects=(val); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def request_forgery_protection_token; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def request_forgery_protection_token=(value); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 - def urlsafe_csrf_tokens; end - private - # source://actionview//lib/action_view/layouts.rb#328 + # source://actionview//lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end - # source://actionpack/7.0.6/lib/action_controller/base.rb#266 + # source://actionpack/7.1.3.2/lib/action_controller/base.rb#252 def _protected_ivars; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://actionpack/7.0.6/lib/action_controller/form_builder.rb#31 + # source://actionpack/7.1.3.2/lib/action_controller/form_builder.rb#33 def _default_form_builder; end - # source://actionpack/7.0.6/lib/action_controller/form_builder.rb#31 + # source://actionpack/7.1.3.2/lib/action_controller/form_builder.rb#33 def _default_form_builder=(value); end - # source://actionpack/7.0.6/lib/action_controller/form_builder.rb#31 + # source://actionpack/7.1.3.2/lib/action_controller/form_builder.rb#33 def _default_form_builder?; end - # source://actionpack/7.0.6/lib/action_controller/metal/flash.rb#8 + # source://actionpack/7.1.3.2/lib/action_controller/metal/flash.rb#8 def _flash_types; end - # source://actionpack/7.0.6/lib/action_controller/metal/flash.rb#8 + # source://actionpack/7.1.3.2/lib/action_controller/metal/flash.rb#8 def _flash_types=(value); end - # source://actionpack/7.0.6/lib/action_controller/metal/flash.rb#8 + # source://actionpack/7.1.3.2/lib/action_controller/metal/flash.rb#8 def _flash_types?; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods=(value); end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods?; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#15 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#16 def _helpers; end - # source://actionview//lib/action_view/layouts.rb#209 + # source://actionview//lib/action_view/layouts.rb#211 def _layout; end - # source://actionview//lib/action_view/layouts.rb#209 + # source://actionview//lib/action_view/layouts.rb#211 def _layout=(value); end - # source://actionview//lib/action_view/layouts.rb#209 + # source://actionview//lib/action_view/layouts.rb#211 def _layout?; end - # source://actionview//lib/action_view/layouts.rb#210 + # source://actionview//lib/action_view/layouts.rb#212 def _layout_conditions; end - # source://actionview//lib/action_view/layouts.rb#210 + # source://actionview//lib/action_view/layouts.rb#212 def _layout_conditions=(value); end - # source://actionview//lib/action_view/layouts.rb#210 + # source://actionview//lib/action_view/layouts.rb#212 def _layout_conditions?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _process_action_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _process_action_callbacks=(value); end - # source://actionpack/7.0.6/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/7.1.3.2/lib/action_controller/metal/renderers.rb#31 def _renderers; end - # source://actionpack/7.0.6/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/7.1.3.2/lib/action_controller/metal/renderers.rb#31 def _renderers=(value); end - # source://actionpack/7.0.6/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/7.1.3.2/lib/action_controller/metal/renderers.rb#31 def _renderers?; end - # source://actionpack/7.0.6/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies; end - # source://actionpack/7.0.6/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies=(value); end - # source://actionpack/7.0.6/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies?; end - # source://actionpack/7.0.6/lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack/7.1.3.2/lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options; end - # source://actionpack/7.0.6/lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack/7.1.3.2/lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options=(value); end - # source://actionpack/7.0.6/lib/action_controller/metal/params_wrapper.rb#185 + # source://actionpack/7.1.3.2/lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def allow_forgery_protection; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def allow_forgery_protection=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def assets_dir=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 + def csrf_token_storage_strategy; end + + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 + def csrf_token_storage_strategy=(value); end + + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_protect_from_forgery; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_protect_from_forgery=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def default_static_extension=(value); end - # source://actionpack/7.0.6/lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack/7.1.3.2/lib/action_dispatch/routing/url_for.rb#97 def default_url_options; end - # source://actionpack/7.0.6/lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack/7.1.3.2/lib/action_dispatch/routing/url_for.rb#97 def default_url_options=(value); end - # source://actionpack/7.0.6/lib/action_dispatch/routing/url_for.rb#95 + # source://actionpack/7.1.3.2/lib/action_dispatch/routing/url_for.rb#97 def default_url_options?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end - # source://actionpack/7.0.6/lib/action_controller/metal/etag_with_template_digest.rb#27 + # source://actionpack/7.1.3.2/lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest; end - # source://actionpack/7.0.6/lib/action_controller/metal/etag_with_template_digest.rb#27 + # source://actionpack/7.1.3.2/lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest=(value); end - # source://actionpack/7.0.6/lib/action_controller/metal/etag_with_template_digest.rb#27 + # source://actionpack/7.1.3.2/lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest?; end - # source://actionpack/7.0.6/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/7.1.3.2/lib/action_controller/metal/conditional_get.rb#13 def etaggers; end - # source://actionpack/7.0.6/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/7.1.3.2/lib/action_controller/metal/conditional_get.rb#13 def etaggers=(value); end - # source://actionpack/7.0.6/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/7.1.3.2/lib/action_controller/metal/conditional_get.rb#13 def etaggers?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def forgery_protection_origin_check; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def forgery_protection_origin_check=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def forgery_protection_strategy; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def forgery_protection_strategy=(value); end - # source://actionpack/7.0.6/lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys; end - # source://actionpack/7.0.6/lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys=(value); end - # source://actionpack/7.0.6/lib/abstract_controller/caching/fragments.rb#23 + # source://actionpack/7.1.3.2/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys?; end - # source://actionpack/7.0.6/lib/action_controller/metal/helpers.rb#63 + # source://actionpack/7.1.3.2/lib/action_controller/metal/helpers.rb#65 def helpers_path; end - # source://actionpack/7.0.6/lib/action_controller/metal/helpers.rb#63 + # source://actionpack/7.1.3.2/lib/action_controller/metal/helpers.rb#65 def helpers_path=(value); end - # source://actionpack/7.0.6/lib/action_controller/metal/helpers.rb#63 + # source://actionpack/7.1.3.2/lib/action_controller/metal/helpers.rb#65 def helpers_path?; end - # source://actionpack/7.0.6/lib/action_controller/metal/helpers.rb#64 + # source://actionpack/7.1.3.2/lib/action_controller/metal/helpers.rb#66 def include_all_helpers; end - # source://actionpack/7.0.6/lib/action_controller/metal/helpers.rb#64 + # source://actionpack/7.1.3.2/lib/action_controller/metal/helpers.rb#66 def include_all_helpers=(value); end - # source://actionpack/7.0.6/lib/action_controller/metal/helpers.rb#64 + # source://actionpack/7.1.3.2/lib/action_controller/metal/helpers.rb#66 def include_all_helpers?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def log_warning_on_csrf_failure; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def log_warning_on_csrf_failure=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def logger=(value); end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def per_form_csrf_tokens; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def per_form_csrf_tokens=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def perform_caching=(value); end - # source://actionpack/7.0.6/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/7.1.3.2/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack/7.1.3.2/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + + # source://actionpack/7.1.3.2/lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects; end - # source://actionpack/7.0.6/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/7.1.3.2/lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects=(val); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def request_forgery_protection_token; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def request_forgery_protection_token=(value); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.3.2/lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#113 - def urlsafe_csrf_tokens; end - - # source://actionpack/7.0.6/lib/action_controller/metal/request_forgery_protection.rb#97 - def urlsafe_csrf_tokens=(urlsafe_csrf_tokens); end - - # source://actionpack/7.0.6/lib/action_controller/base.rb#198 + # source://actionpack/7.1.3.2/lib/action_controller/base.rb#184 def without_modules(*modules); end end end +# :include: actionview/README.rdoc +# # source://actionview//lib/action_view/gem_version.rb#3 module ActionView extend ::ActiveSupport::Autoload class << self - # source://actionview//lib/action_view.rb#90 + # source://actionview//lib/action_view/deprecator.rb#4 + def deprecator; end + + # source://actionview//lib/action_view.rb#93 def eager_load!; end - # Returns the currently loaded version of Action View as a Gem::Version. + # Returns the currently loaded version of Action View as a +Gem::Version+. # # source://actionview//lib/action_view/gem_version.rb#5 def gem_version; end - # Returns the currently loaded version of Action View as a Gem::Version. + # Returns the currently loaded version of Action View as a +Gem::Version+. # # source://actionview//lib/action_view/version.rb#7 def version; end @@ -710,10 +735,10 @@ ActionView::AbstractRenderer::RenderedTemplate::EMPTY_SPACER = T.let(T.unsafe(ni # = Action View Errors # -# source://actionview//lib/action_view/template/error.rb#7 +# source://actionview//lib/action_view/template/error.rb#8 class ActionView::ActionViewError < ::StandardError; end -# = Action View Base +# = Action View \Base # # Action View templates can be written in several ways. # If the template file has a .erb extension, then it uses the erubi[https://rubygems.org/gems/erubi] @@ -747,9 +772,9 @@ class ActionView::ActionViewError < ::StandardError; end # Using sub templates allows you to sidestep tedious replication and extract common display structures in shared templates. The # classic example is the use of a header and footer (even though the Action Pack-way would be to use Layouts): # -# <%= render "shared/header" %> +# <%= render "application/header" %> # Something really specific and terrific -# <%= render "shared/footer" %> +# <%= render "application/footer" %> # # As you see, we use the output embeddings for the render methods. The render call itself will just return a string holding the # result of the rendering. The output embedding writes it to the current template. @@ -758,7 +783,7 @@ class ActionView::ActionViewError < ::StandardError; end # variables defined using the regular embedding tags. Like this: # # <% @page_title = "A Wonderful Hello" %> -# <%= render "shared/header" %> +# <%= render "application/header" %> # # Now the header can pick up on the @page_title variable and use it for outputting a title tag: # @@ -768,9 +793,9 @@ class ActionView::ActionViewError < ::StandardError; end # # You can pass local variables to sub templates by using a hash with the variable names as keys and the objects as values: # -# <%= render "shared/header", { headline: "Welcome", person: person } %> +# <%= render "application/header", { headline: "Welcome", person: person } %> # -# These can now be accessed in shared/header with: +# These can now be accessed in application/header with: # # Headline: <%= headline %> # First name: <%= person.first_name %> @@ -785,8 +810,8 @@ class ActionView::ActionViewError < ::StandardError; end # # === Template caching # -# By default, Rails will compile each template to a method in order to render it. When you alter a template, -# Rails will check the file's modification time and recompile it in development mode. +# By default, \Rails will compile each template to a method in order to render it. When you alter a template, +# \Rails will check the file's modification time and recompile it in development mode. # # == Builder # @@ -847,17 +872,20 @@ class ActionView::Base include ::ActionView::Context include ::ERB::Escape include ::ERB::Util + include ::ActiveSupport::CoreExt::ERBUtil + include ::ActiveSupport::CoreExt::ERBUtilPrivate include ::ActiveSupport::Benchmarkable include ::ActionView::Helpers::ActiveModelHelper include ::ActionView::Helpers::AssetUrlHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper - include ::ActionView::Helpers::UrlHelper - include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::AssetTagHelper include ::ActionView::Helpers::AtomFeedHelper include ::ActionView::Helpers::CacheHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper + include ::ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::ControllerHelper include ::ActionView::Helpers::CspHelper include ::ActionView::Helpers::CsrfHelper @@ -882,7 +910,7 @@ class ActionView::Base # # @return [Base] a new instance of Base # - # source://actionview//lib/action_view/base.rb#227 + # source://actionview//lib/action_view/base.rb#228 def initialize(lookup_context, assigns, controller); end # source://actionview//lib/action_view/base.rb#165 @@ -894,8 +922,8 @@ class ActionView::Base # source://actionview//lib/action_view/base.rb#165 def _routes?; end - # source://actionview//lib/action_view/base.rb#240 - def _run(method, template, locals, buffer, add_to_stack: T.unsafe(nil), &block); end + # source://actionview//lib/action_view/base.rb#245 + def _run(method, template, locals, buffer, add_to_stack: T.unsafe(nil), has_strict_locals: T.unsafe(nil), &block); end # source://actionview//lib/action_view/base.rb#163 def annotate_rendered_view_with_filenames; end @@ -906,10 +934,10 @@ class ActionView::Base # source://actionview//lib/action_view/base.rb#207 def assign(new_assigns); end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attr_internal.rb#33 def assigns; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attr_internal.rb#33 def assigns=(_arg0); end # source://actionview//lib/action_view/base.rb#160 @@ -920,13 +948,13 @@ class ActionView::Base # @raise [NotImplementedError] # - # source://actionview//lib/action_view/base.rb#249 + # source://actionview//lib/action_view/base.rb#270 def compiled_method_container; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attr_internal.rb#33 def config; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attr_internal.rb#33 def config=(_arg0); end # source://actionview//lib/action_view/helpers/translation_helper.rb#18 @@ -953,7 +981,7 @@ class ActionView::Base # source://actionview//lib/action_view/base.rb#205 def formats=(arg); end - # source://actionview//lib/action_view/base.rb#257 + # source://actionview//lib/action_view/base.rb#278 def in_rendering_context(options); end # source://actionview//lib/action_view/base.rb#205 @@ -1041,10 +1069,10 @@ class ActionView::Base # source://actionview//lib/action_view/helpers/translation_helper.rb#18 def debug_missing_translation=(val); end - # source://actionview//lib/action_view/helpers/form_helper.rb#2729 + # source://actionview//lib/action_view/helpers/form_helper.rb#2759 def default_form_builder; end - # source://actionview//lib/action_view/helpers/form_helper.rb#2729 + # source://actionview//lib/action_view/helpers/form_helper.rb#2759 def default_form_builder=(val); end # source://actionview//lib/action_view/base.rb#157 @@ -1055,7 +1083,7 @@ class ActionView::Base # :stopdoc: # - # source://actionview//lib/action_view/base.rb#213 + # source://actionview//lib/action_view/base.rb#214 def empty; end # source://actionview//lib/action_view/base.rb#169 @@ -1091,13 +1119,13 @@ class ActionView::Base # source://actionview//lib/action_view/base.rb#149 def streaming_completion_on_exception=(val); end - # source://actionview//lib/action_view/base.rb#221 + # source://actionview//lib/action_view/base.rb#222 def with_context(context, assigns = T.unsafe(nil), controller = T.unsafe(nil)); end # source://actionview//lib/action_view/base.rb#183 def with_empty_template_cache; end - # source://actionview//lib/action_view/base.rb#217 + # source://actionview//lib/action_view/base.rb#218 def with_view_paths(view_paths, assigns = T.unsafe(nil), controller = T.unsafe(nil)); end # @return [Boolean] @@ -1108,44 +1136,36 @@ class ActionView::Base end # source://actionview//lib/action_view/cache_expiry.rb#4 -class ActionView::CacheExpiry; end +module ActionView::CacheExpiry; end # source://actionview//lib/action_view/cache_expiry.rb#5 -class ActionView::CacheExpiry::Executor - # @return [Executor] a new instance of Executor +class ActionView::CacheExpiry::ViewReloader + # @return [ViewReloader] a new instance of ViewReloader # # source://actionview//lib/action_view/cache_expiry.rb#6 - def initialize(watcher:); end - - # source://actionview//lib/action_view/cache_expiry.rb#20 - def complete(_); end - - # source://actionview//lib/action_view/cache_expiry.rb#13 - def run; end - - private + def initialize(watcher:, &block); end - # source://actionview//lib/action_view/cache_expiry.rb#25 - def clear_cache; end -end + # source://actionview//lib/action_view/cache_expiry.rb#22 + def execute; end -# source://actionview//lib/action_view/cache_expiry.rb#32 -class ActionView::CacheExpiry::ViewModificationWatcher - # @return [ViewModificationWatcher] a new instance of ViewModificationWatcher + # @return [Boolean] # - # source://actionview//lib/action_view/cache_expiry.rb#33 - def initialize(watcher:, &block); end - - # source://actionview//lib/action_view/cache_expiry.rb#41 - def execute_if_updated; end + # source://actionview//lib/action_view/cache_expiry.rb#18 + def updated?; end private - # source://actionview//lib/action_view/cache_expiry.rb#61 + # source://actionview//lib/action_view/cache_expiry.rb#58 def all_view_paths; end - # source://actionview//lib/action_view/cache_expiry.rb#57 + # source://actionview//lib/action_view/cache_expiry.rb#54 def dirs_to_watch; end + + # source://actionview//lib/action_view/cache_expiry.rb#36 + def rebuild_watcher; end + + # source://actionview//lib/action_view/cache_expiry.rb#32 + def reload!; end end # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#6 @@ -1165,7 +1185,7 @@ module ActionView::CollectionCaching # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#58 def collection_by_cache_keys(view, template, collection); end - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#70 + # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#71 def expanded_cache_key(key, view, template, digest_path); end # `order_by` is an enumerable object containing keys of the cache, @@ -1184,7 +1204,7 @@ module ActionView::CollectionCaching # If the partial is not already cached it will also be # written back to the underlying cache store. # - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#90 + # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#91 def fetch_or_cache_partial(cached_partials, template, order_by:); end # @return [Boolean] @@ -1197,21 +1217,21 @@ end class ActionView::CollectionRenderer < ::ActionView::PartialRenderer include ::ActionView::AbstractRenderer::ObjectRendering - # source://actionview//lib/action_view/renderer/collection_renderer.rb#122 + # source://actionview//lib/action_view/renderer/collection_renderer.rb#130 def render_collection_derive_partial(collection, context, block); end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#104 + # source://actionview//lib/action_view/renderer/collection_renderer.rb#112 def render_collection_with_partial(collection, partial, context, block); end private - # source://actionview//lib/action_view/renderer/collection_renderer.rb#174 + # source://actionview//lib/action_view/renderer/collection_renderer.rb#182 def collection_with_template(view, template, layout, collection); end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#145 + # source://actionview//lib/action_view/renderer/collection_renderer.rb#153 def render_collection(collection, view, path, template, layout, block); end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#140 + # source://actionview//lib/action_view/renderer/collection_renderer.rb#148 def retrieve_variable(path); end end @@ -1230,46 +1250,52 @@ class ActionView::CollectionRenderer::CollectionIterator # source://actionview//lib/action_view/renderer/collection_renderer.rb#51 def length; end + # source://actionview//lib/action_view/renderer/collection_renderer.rb#55 + def preload!; end + # source://actionview//lib/action_view/renderer/collection_renderer.rb#47 def size; end end -# source://actionview//lib/action_view/renderer/collection_renderer.rb#92 +# source://actionview//lib/action_view/renderer/collection_renderer.rb#100 class ActionView::CollectionRenderer::MixedCollectionIterator < ::ActionView::CollectionRenderer::CollectionIterator # @return [MixedCollectionIterator] a new instance of MixedCollectionIterator # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#93 + # source://actionview//lib/action_view/renderer/collection_renderer.rb#101 def initialize(collection, paths); end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#98 + # source://actionview//lib/action_view/renderer/collection_renderer.rb#106 def each_with_info; end end -# source://actionview//lib/action_view/renderer/collection_renderer.rb#74 +# source://actionview//lib/action_view/renderer/collection_renderer.rb#78 class ActionView::CollectionRenderer::PreloadCollectionIterator < ::ActionView::CollectionRenderer::SameCollectionIterator # @return [PreloadCollectionIterator] a new instance of PreloadCollectionIterator # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#75 + # source://actionview//lib/action_view/renderer/collection_renderer.rb#79 def initialize(collection, path, variables, relation); end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#85 + # source://actionview//lib/action_view/renderer/collection_renderer.rb#89 def each_with_info; end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#81 + # source://actionview//lib/action_view/renderer/collection_renderer.rb#85 def from_collection(collection); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#95 + def preload!; end end -# source://actionview//lib/action_view/renderer/collection_renderer.rb#56 +# source://actionview//lib/action_view/renderer/collection_renderer.rb#60 class ActionView::CollectionRenderer::SameCollectionIterator < ::ActionView::CollectionRenderer::CollectionIterator # @return [SameCollectionIterator] a new instance of SameCollectionIterator # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#57 + # source://actionview//lib/action_view/renderer/collection_renderer.rb#61 def initialize(collection, path, variables); end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#67 + # source://actionview//lib/action_view/renderer/collection_renderer.rb#71 def each_with_info; end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#63 + # source://actionview//lib/action_view/renderer/collection_renderer.rb#67 def from_collection(collection); end end @@ -1500,7 +1526,7 @@ class ActionView::Digestor # # * name - Template name # * format - Template format - # * finder - An instance of ActionView::LookupContext + # * +finder+ - An instance of ActionView::LookupContext # * dependencies - An array of dependent views # # source://actionview//lib/action_view/digestor.rb#16 @@ -1589,76 +1615,79 @@ end # source://actionview//lib/action_view/digestor.rb#115 class ActionView::Digestor::Partial < ::ActionView::Digestor::Node; end -# source://actionview//lib/action_view.rb#33 +# source://actionview//lib/action_view.rb#35 ActionView::ENCODING_FLAG = T.let(T.unsafe(nil), String) -# source://actionview//lib/action_view/template/error.rb#10 +# source://actionview//lib/action_view/template/error.rb#11 class ActionView::EncodingError < ::StandardError; end # A resolver that loads files from the filesystem. # -# source://actionview//lib/action_view/template/resolver.rb#89 +# source://actionview//lib/action_view/template/resolver.rb#93 class ActionView::FileSystemResolver < ::ActionView::Resolver # @raise [ArgumentError] # @return [FileSystemResolver] a new instance of FileSystemResolver # - # source://actionview//lib/action_view/template/resolver.rb#92 + # source://actionview//lib/action_view/template/resolver.rb#96 def initialize(path); end # @return [Boolean] # - # source://actionview//lib/action_view/template/resolver.rb#111 + # source://actionview//lib/action_view/template/resolver.rb#115 def ==(resolver); end - # source://actionview//lib/action_view/template/resolver.rb#116 + # source://actionview//lib/action_view/template/resolver.rb#120 def all_template_paths; end - # source://actionview//lib/action_view/template/resolver.rb#100 + # source://actionview//lib/action_view/template/resolver.rb#129 + def built_templates; end + + # source://actionview//lib/action_view/template/resolver.rb#104 def clear_cache; end # @return [Boolean] # - # source://actionview//lib/action_view/template/resolver.rb#111 + # source://actionview//lib/action_view/template/resolver.rb#115 def eql?(resolver); end # Returns the value of attribute path. # - # source://actionview//lib/action_view/template/resolver.rb#90 + # source://actionview//lib/action_view/template/resolver.rb#94 def path; end - # source://actionview//lib/action_view/template/resolver.rb#106 + # source://actionview//lib/action_view/template/resolver.rb#110 def to_path; end - # source://actionview//lib/action_view/template/resolver.rb#106 + # source://actionview//lib/action_view/template/resolver.rb#110 def to_s; end private - # source://actionview//lib/action_view/template/resolver.rb#126 + # source://actionview//lib/action_view/template/resolver.rb#134 def _find_all(name, prefix, partial, details, key, locals); end - # source://actionview//lib/action_view/template/resolver.rb#145 + # source://actionview//lib/action_view/template/resolver.rb#153 def build_unbound_template(template); end - # source://actionview//lib/action_view/template/resolver.rb#203 + # source://actionview//lib/action_view/template/resolver.rb#211 def escape_entry(entry); end - # source://actionview//lib/action_view/template/resolver.rb#175 + # source://actionview//lib/action_view/template/resolver.rb#183 def filter_and_sort_by_details(templates, requested_details); end - # source://actionview//lib/action_view/template/resolver.rb#141 + # source://actionview//lib/action_view/template/resolver.rb#149 def source_for_template(template); end # Safe glob within @path # - # source://actionview//lib/action_view/template/resolver.rb#190 + # source://actionview//lib/action_view/template/resolver.rb#198 def template_glob(glob); end - # source://actionview//lib/action_view/template/resolver.rb#158 + # source://actionview//lib/action_view/template/resolver.rb#166 def unbound_templates_from_path(path); end end -# source://actionview//lib/action_view/helpers/capture_helper.rb#7 +# source://actionview//lib/action_view/helpers/capture_helper.rb#6 module ActionView::Helpers include ::ActiveSupport::Benchmarkable include ::ActionView::Helpers::ActiveModelHelper @@ -1670,6 +1699,7 @@ module ActionView::Helpers include ::ActionView::Helpers::AssetTagHelper include ::ActionView::Helpers::AtomFeedHelper include ::ActionView::Helpers::CacheHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper include ::ActionView::Helpers::ControllerHelper include ::ActionView::Helpers::CspHelper include ::ActionView::Helpers::CsrfHelper @@ -1693,14 +1723,16 @@ module ActionView::Helpers mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods class << self - # source://actionview//lib/action_view/helpers.rb#34 + # source://actionview//lib/action_view/helpers.rb#35 def eager_load!; end end end -# source://actionview//lib/action_view/helpers/active_model_helper.rb#9 +# source://actionview//lib/action_view/helpers/active_model_helper.rb#8 module ActionView::Helpers::ActiveModelHelper; end +# = Active \Model Instance Tag \Helpers +# # source://actionview//lib/action_view/helpers/active_model_helper.rb#12 module ActionView::Helpers::ActiveModelInstanceTag # source://actionview//lib/action_view/helpers/active_model_helper.rb#20 @@ -1736,6 +1768,8 @@ module ActionView::Helpers::ActiveModelInstanceTag def tag_generate_errors?(options); end end +# = Action View Asset Tag \Helpers +# # This module provides methods for generating HTML that links views to assets such # as images, JavaScripts, stylesheets, and feeds. These methods do not verify # the assets exist before linking to them: @@ -1745,24 +1779,24 @@ end # stylesheet_link_tag("application") # # => # -# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#20 +# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#21 module ActionView::Helpers::AssetTagHelper include ::ActionView::Helpers::AssetUrlHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#28 def apply_stylesheet_media_default; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#28 def apply_stylesheet_media_default=(val); end # Returns an HTML audio tag for the +sources+. If +sources+ is a string, # a single audio tag will be returned. If +sources+ is an array, an audio # tag with nested source tags for each source will be returned. The - # +sources+ can be full paths or files that exist in your public audios - # directory. + # +sources+ can be full paths, files that exist in your public audios + # directory, or Active Storage attachments. # # When the last parameter is a hash you can add HTML attributes using that # parameter. @@ -1776,7 +1810,12 @@ module ActionView::Helpers::AssetTagHelper # audio_tag("sound.wav", "sound.mid") # # => # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#486 + # Active Storage blobs (audios that are uploaded by the users of your app): + # + # audio_tag(user.name_pronunciation_audio) + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#581 def audio_tag(*sources); end # Returns a link tag that browsers and feed readers can use to auto-detect @@ -1807,7 +1846,7 @@ module ActionView::Helpers::AssetTagHelper # auto_discovery_link_tag(:rss, "http://www.example.com/feed.rss", {title: "Example RSS"}) # # => # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#235 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#259 def auto_discovery_link_tag(type = T.unsafe(nil), url_options = T.unsafe(nil), tag_options = T.unsafe(nil)); end # Returns a link tag for a favicon managed by the asset pipeline. @@ -1838,19 +1877,19 @@ module ActionView::Helpers::AssetTagHelper # favicon_link_tag 'mb-icon.png', rel: 'apple-touch-icon', type: 'image/png' # # => # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#276 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#300 def favicon_link_tag(source = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 def image_decoding; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 def image_decoding=(val); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#24 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 def image_loading; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#24 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 def image_loading=(val); end # Returns an HTML image tag for the +source+. The +source+ can be a full @@ -1861,8 +1900,8 @@ module ActionView::Helpers::AssetTagHelper # You can add HTML attributes using the +options+. The +options+ supports # additional keys for convenience and conformance: # - # * :size - Supplied as "{Width}x{Height}" or "{Number}", so "30x45" becomes - # width="30" and height="45", and "50" becomes width="50" and height="50". + # * :size - Supplied as "#{width}x#{height}" or "#{number}", so "30x45" becomes + # width="30" height="45", and "50" becomes width="50" height="50". # :size will be ignored if the value is not in the correct format. # * :srcset - If supplied as a hash or array of [source, descriptor] # pairs, each image path will be expanded before the list is formatted as a string. @@ -1899,7 +1938,7 @@ module ActionView::Helpers::AssetTagHelper # image_tag(user.avatar.variant(resize_to_limit: [100, 100]), size: '100') # # => # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#394 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#418 def image_tag(source, options = T.unsafe(nil)); end # Returns an HTML script tag for each of the +sources+ provided. @@ -1917,13 +1956,14 @@ module ActionView::Helpers::AssetTagHelper # When the Asset Pipeline is enabled, you can pass the name of your manifest as # source, and include other JavaScript or CoffeeScript files inside the manifest. # - # If the server supports Early Hints, header links for these assets will be - # automatically pushed. + # If the server supports HTTP Early Hints, and the +defer+ option is not + # enabled, \Rails will push a 103 Early Hints response that links + # to the assets. # # ==== Options # # When the last parameter is a hash you can add HTML attributes using that - # parameter. The following options are supported: + # parameter. This includes but is not limited to the following options: # # * :extname - Append an extension to the generated URL unless the extension # already exists. This only applies for relative URLs. @@ -1935,6 +1975,20 @@ module ActionView::Helpers::AssetTagHelper # when it is set to true. # * :nonce - When set to true, adds an automatic nonce value if # you have Content Security Policy enabled. + # * :async - When set to +true+, adds the +async+ HTML + # attribute, allowing the script to be fetched in parallel to be parsed + # and evaluated as soon as possible. + # * :defer - When set to +true+, adds the +defer+ HTML + # attribute, which indicates to the browser that the script is meant to + # be executed after the document has been parsed. Additionally, prevents + # sending the Preload Links header. + # + # Any other specified options will be treated as HTML attributes for the + # +script+ tag. + # + # For more information regarding how the :async and :defer + # options affect the # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#89 + # javascript_include_tag "http://www.example.com/xmlhr.js", async: true + # # => + # + # javascript_include_tag "http://www.example.com/xmlhr.js", defer: true + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#111 def javascript_include_tag(*sources); end + # Returns an HTML picture tag for the +sources+. If +sources+ is a string, + # a single picture tag will be returned. If +sources+ is an array, a picture + # tag with nested source tags for each source will be returned. The + # +sources+ can be full paths, files that exist in your public images + # directory, or Active Storage attachments. Since the picture tag requires + # an img tag, the last element you provide will be used for the img tag. + # For complete control over the picture tag, a block can be passed, which + # will populate the contents of the tag accordingly. + # + # ==== Options + # + # When the last parameter is a hash you can add HTML attributes using that + # parameter. Apart from all the HTML supported options, the following are supported: + # + # * :image - Hash of options that are passed directly to the +image_tag+ helper. + # + # ==== Examples + # + # picture_tag("picture.webp") + # # => + # picture_tag("gold.png", :image => { :size => "20" }) + # # => + # picture_tag("gold.png", :image => { :size => "45x70" }) + # # => + # picture_tag("picture.webp", "picture.png") + # # => + # picture_tag("picture.webp", "picture.png", :image => { alt: "Image" }) + # # => Image + # picture_tag(["picture.webp", "picture.png"], :image => { alt: "Image" }) + # # => Image + # picture_tag(:class => "my-class") { tag(:source, :srcset => image_path("picture.webp")) + image_tag("picture.png", :alt => "Image") } + # # => Image + # picture_tag { tag(:source, :srcset => image_path("picture-small.webp"), :media => "(min-width: 600px)") + tag(:source, :srcset => image_path("picture-big.webp")) + image_tag("picture.png", :alt => "Image") } + # # => Image + # + # Active Storage blobs (images that are uploaded by the users of your app): + # + # picture_tag(user.profile_picture) + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#479 + def picture_tag(*sources, &block); end + # Returns a link tag that browsers can use to preload the +source+. # The +source+ can be the path of a resource managed by asset pipeline, # a full path, or an URI. @@ -2001,13 +2104,13 @@ module ActionView::Helpers::AssetTagHelper # preload_link_tag("/media/audio.ogg", nopush: true) # # => # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#319 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#343 def preload_link_tag(source, options = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 def preload_links_header; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 def preload_links_header=(val); end # Returns a stylesheet link tag for the sources specified as arguments. @@ -2018,8 +2121,8 @@ module ActionView::Helpers::AssetTagHelper # set extname: false in the options. # You can modify the link attributes by passing a hash as the last argument. # - # If the server supports Early Hints, header links for these assets will be - # automatically pushed. + # If the server supports HTTP Early Hints, \Rails will push a 103 Early + # Hints response that links to the assets. # # ==== Options # @@ -2056,14 +2159,14 @@ module ActionView::Helpers::AssetTagHelper # # => # # # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#170 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#193 def stylesheet_link_tag(*sources); end # Returns an HTML video tag for the +sources+. If +sources+ is a string, # a single video tag will be returned. If +sources+ is an array, a video # tag with nested source tags for each source will be returned. The - # +sources+ can be full paths or files that exist in your public videos - # directory. + # +sources+ can be full paths, files that exist in your public videos + # directory, or Active Storage attachments. # # ==== Options # @@ -2072,8 +2175,8 @@ module ActionView::Helpers::AssetTagHelper # # * :poster - Set an image (like a screenshot) to be shown # before the video loads. The path is calculated like the +src+ of +image_tag+. - # * :size - Supplied as "{Width}x{Height}" or "{Number}", so "30x45" becomes - # width="30" and height="45", and "50" becomes width="50" and height="50". + # * :size - Supplied as "#{width}x#{height}" or "#{number}", so "30x45" becomes + # width="30" height="45", and "50" becomes width="50" height="50". # :size will be ignored if the value is not in the correct format. # * :poster_skip_pipeline will bypass the asset pipeline when using # the :poster option instead using an asset in the public folder. @@ -2103,63 +2206,71 @@ module ActionView::Helpers::AssetTagHelper # video_tag(["trailer.ogg", "trailer.flv"], size: "160x120") # # => # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#459 + # Active Storage blobs (videos that are uploaded by the users of your app): + # + # video_tag(user.intro_video) + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#549 def video_tag(*sources); end private - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#527 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#622 def check_for_image_tag_errors(options); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#518 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#613 def extract_dimensions(size); end # @yield [options] # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#491 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#586 def multiple_sources_tag_builder(type, sources); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#508 - def resolve_image_source(source, skip_pipeline); end + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#603 + def resolve_asset_source(asset_type, source, skip_pipeline); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#533 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#628 def resolve_link_as(extname, mime_type); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#544 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#642 def send_preload_links_header(preload_links, max_header_size: T.unsafe(nil)); end class << self - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#28 def apply_stylesheet_media_default; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#28 def apply_stylesheet_media_default=(val); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 def image_decoding; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 def image_decoding=(val); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#24 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 def image_loading; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#24 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 def image_loading=(val); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 def preload_links_header; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 def preload_links_header=(val); end end end -# Some HTTP client and proxies have a 8kiB header limit +# Some HTTP client and proxies have a 4kiB header limit, but more importantly +# including preload links has diminishing returns so it's best to not go overboard # -# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#543 +# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#640 ActionView::Helpers::AssetTagHelper::MAX_HEADER_SIZE = T.let(T.unsafe(nil), Integer) +# = Action View Asset URL \Helpers +# # This module provides methods for generating asset paths and # URLs. # @@ -2171,8 +2282,8 @@ ActionView::Helpers::AssetTagHelper::MAX_HEADER_SIZE = T.let(T.unsafe(nil), Inte # # === Using asset hosts # -# By default, Rails links to these assets on the current host in the public -# folder, but you can direct Rails to link to assets from a dedicated asset +# By default, \Rails links to these assets on the current host in the public +# folder, but you can direct \Rails to link to assets from a dedicated asset # server by setting ActionController::Base.asset_host in the application # configuration, typically in config/environments/production.rb. # For example, you'd define assets.example.com to be your asset @@ -2272,7 +2383,7 @@ ActionView::Helpers::AssetTagHelper::MAX_HEADER_SIZE = T.let(T.unsafe(nil), Inte # "http://asset%d.example.com", "https://asset1.example.com" # ) # -# source://actionview//lib/action_view/helpers/asset_url_helper.rb#120 +# source://actionview//lib/action_view/helpers/asset_url_helper.rb#121 module ActionView::Helpers::AssetUrlHelper # This is the entry point for all assets. # When using an asset pipeline gem (e.g. propshaft or sprockets-rails), the @@ -2340,7 +2451,7 @@ module ActionView::Helpers::AssetUrlHelper # # @raise [ArgumentError] # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#186 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#187 def asset_path(source, options = T.unsafe(nil)); end # Computes the full URL to an asset in the public directory. This @@ -2353,7 +2464,7 @@ module ActionView::Helpers::AssetUrlHelper # asset_url "application.js" # => http://example.com/assets/application.js # asset_url "application.js", host: "http://cdn.example.com" # => http://cdn.example.com/assets/application.js # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#230 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#231 def asset_url(source, options = T.unsafe(nil)); end # Computes the path to an audio asset in the public audios directory. @@ -2366,7 +2477,7 @@ module ActionView::Helpers::AssetUrlHelper # audio_path("/sounds/horse.wav") # => /sounds/horse.wav # audio_path("http://www.example.com/sounds/horse.wav") # => http://www.example.com/sounds/horse.wav # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#429 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#430 def audio_path(source, options = T.unsafe(nil)); end # Computes the full URL to an audio asset in the public audios directory. @@ -2376,13 +2487,13 @@ module ActionView::Helpers::AssetUrlHelper # # audio_url "horse.wav", host: "http://stage.example.com" # => http://stage.example.com/audios/horse.wav # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#441 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#442 def audio_url(source, options = T.unsafe(nil)); end # Compute extname to append to asset path. Returns +nil+ if # nothing should be added. # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#242 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#243 def compute_asset_extname(source, options = T.unsafe(nil)); end # Pick an asset host for this source. Returns +nil+ if no host is set, @@ -2391,14 +2502,14 @@ module ActionView::Helpers::AssetUrlHelper # or the value returned from invoking call on an object responding to call # (proc or otherwise). # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#276 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#277 def compute_asset_host(source = T.unsafe(nil), options = T.unsafe(nil)); end # Computes asset path to public directory. Plugins and # extensions can override this method to point to custom assets # or generate digested paths or query strings. # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#265 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#266 def compute_asset_path(source, options = T.unsafe(nil)); end # Computes the path to a font asset. @@ -2410,7 +2521,7 @@ module ActionView::Helpers::AssetUrlHelper # font_path("/dir/font.ttf") # => /dir/font.ttf # font_path("http://www.example.com/dir/font.ttf") # => http://www.example.com/dir/font.ttf # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#454 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#455 def font_path(source, options = T.unsafe(nil)); end # Computes the full URL to a font asset. @@ -2420,7 +2531,7 @@ module ActionView::Helpers::AssetUrlHelper # # font_url "font.ttf", host: "http://stage.example.com" # => http://stage.example.com/fonts/font.ttf # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#466 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#467 def font_url(source, options = T.unsafe(nil)); end # Computes the path to an image asset. @@ -2434,10 +2545,10 @@ module ActionView::Helpers::AssetUrlHelper # image_path("http://www.example.com/img/edit.png") # => "http://www.example.com/img/edit.png" # # If you have images as application resources this method may conflict with their named routes. - # The alias +path_to_image+ is provided to avoid that. Rails uses the alias internally, and + # The alias +path_to_image+ is provided to avoid that. \Rails uses the alias internally, and # plugin authors are encouraged to do so. # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#377 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#378 def image_path(source, options = T.unsafe(nil)); end # Computes the full URL to an image asset. @@ -2447,7 +2558,7 @@ module ActionView::Helpers::AssetUrlHelper # # image_url "edit.png", host: "http://stage.example.com" # => http://stage.example.com/assets/edit.png # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#389 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#390 def image_url(source, options = T.unsafe(nil)); end # Computes the path to a JavaScript asset in the public javascripts directory. @@ -2461,7 +2572,7 @@ module ActionView::Helpers::AssetUrlHelper # javascript_path "http://www.example.com/js/xmlhr" # => http://www.example.com/js/xmlhr # javascript_path "http://www.example.com/js/xmlhr.js" # => http://www.example.com/js/xmlhr.js # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#320 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#321 def javascript_path(source, options = T.unsafe(nil)); end # Computes the full URL to a JavaScript asset in the public javascripts directory. @@ -2471,7 +2582,7 @@ module ActionView::Helpers::AssetUrlHelper # # javascript_url "js/xmlhr.js", host: "http://stage.example.com" # => http://stage.example.com/assets/js/xmlhr.js # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#332 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#333 def javascript_url(source, options = T.unsafe(nil)); end # This is the entry point for all assets. @@ -2541,7 +2652,7 @@ module ActionView::Helpers::AssetUrlHelper # # @raise [ArgumentError] # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#186 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#187 def path_to_asset(source, options = T.unsafe(nil)); end # Computes the path to an audio asset in the public audios directory. @@ -2555,7 +2666,7 @@ module ActionView::Helpers::AssetUrlHelper # audio_path("http://www.example.com/sounds/horse.wav") # => http://www.example.com/sounds/horse.wav # aliased to avoid conflicts with an audio_path named route # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#429 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#430 def path_to_audio(source, options = T.unsafe(nil)); end # Computes the path to a font asset. @@ -2568,7 +2679,7 @@ module ActionView::Helpers::AssetUrlHelper # font_path("http://www.example.com/dir/font.ttf") # => http://www.example.com/dir/font.ttf # aliased to avoid conflicts with a font_path named route # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#454 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#455 def path_to_font(source, options = T.unsafe(nil)); end # Computes the path to an image asset. @@ -2582,11 +2693,11 @@ module ActionView::Helpers::AssetUrlHelper # image_path("http://www.example.com/img/edit.png") # => "http://www.example.com/img/edit.png" # # If you have images as application resources this method may conflict with their named routes. - # The alias +path_to_image+ is provided to avoid that. Rails uses the alias internally, and + # The alias +path_to_image+ is provided to avoid that. \Rails uses the alias internally, and # plugin authors are encouraged to do so. # aliased to avoid conflicts with an image_path named route # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#377 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#378 def path_to_image(source, options = T.unsafe(nil)); end # Computes the path to a JavaScript asset in the public javascripts directory. @@ -2601,7 +2712,7 @@ module ActionView::Helpers::AssetUrlHelper # javascript_path "http://www.example.com/js/xmlhr.js" # => http://www.example.com/js/xmlhr.js # aliased to avoid conflicts with a javascript_path named route # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#320 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#321 def path_to_javascript(source, options = T.unsafe(nil)); end # Computes the path to a stylesheet asset in the public stylesheets directory. @@ -2616,7 +2727,7 @@ module ActionView::Helpers::AssetUrlHelper # stylesheet_path "http://www.example.com/css/style.css" # => http://www.example.com/css/style.css # aliased to avoid conflicts with a stylesheet_path named route # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#347 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#348 def path_to_stylesheet(source, options = T.unsafe(nil)); end # Computes the path to a video asset in the public videos directory. @@ -2630,14 +2741,14 @@ module ActionView::Helpers::AssetUrlHelper # video_path("http://www.example.com/vid/hd.avi") # => http://www.example.com/vid/hd.avi # aliased to avoid conflicts with a video_path named route # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#403 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#404 def path_to_video(source, options = T.unsafe(nil)); end # Computes asset path to public directory. Plugins and # extensions can override this method to point to custom assets # or generate digested paths or query strings. # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#265 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#266 def public_compute_asset_path(source, options = T.unsafe(nil)); end # Computes the path to a stylesheet asset in the public stylesheets directory. @@ -2651,7 +2762,7 @@ module ActionView::Helpers::AssetUrlHelper # stylesheet_path "http://www.example.com/css/style" # => http://www.example.com/css/style # stylesheet_path "http://www.example.com/css/style.css" # => http://www.example.com/css/style.css # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#347 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#348 def stylesheet_path(source, options = T.unsafe(nil)); end # Computes the full URL to a stylesheet asset in the public stylesheets directory. @@ -2661,7 +2772,7 @@ module ActionView::Helpers::AssetUrlHelper # # stylesheet_url "css/style.css", host: "http://stage.example.com" # => http://stage.example.com/assets/css/style.css # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#359 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#360 def stylesheet_url(source, options = T.unsafe(nil)); end # Computes the full URL to an asset in the public directory. This @@ -2675,7 +2786,7 @@ module ActionView::Helpers::AssetUrlHelper # asset_url "application.js", host: "http://cdn.example.com" # => http://cdn.example.com/assets/application.js # aliased to avoid conflicts with an asset_url named route # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#230 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#231 def url_to_asset(source, options = T.unsafe(nil)); end # Computes the full URL to an audio asset in the public audios directory. @@ -2686,7 +2797,7 @@ module ActionView::Helpers::AssetUrlHelper # audio_url "horse.wav", host: "http://stage.example.com" # => http://stage.example.com/audios/horse.wav # aliased to avoid conflicts with an audio_url named route # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#441 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#442 def url_to_audio(source, options = T.unsafe(nil)); end # Computes the full URL to a font asset. @@ -2697,7 +2808,7 @@ module ActionView::Helpers::AssetUrlHelper # font_url "font.ttf", host: "http://stage.example.com" # => http://stage.example.com/fonts/font.ttf # aliased to avoid conflicts with a font_url named route # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#466 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#467 def url_to_font(source, options = T.unsafe(nil)); end # Computes the full URL to an image asset. @@ -2708,7 +2819,7 @@ module ActionView::Helpers::AssetUrlHelper # image_url "edit.png", host: "http://stage.example.com" # => http://stage.example.com/assets/edit.png # aliased to avoid conflicts with an image_url named route # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#389 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#390 def url_to_image(source, options = T.unsafe(nil)); end # Computes the full URL to a JavaScript asset in the public javascripts directory. @@ -2719,7 +2830,7 @@ module ActionView::Helpers::AssetUrlHelper # javascript_url "js/xmlhr.js", host: "http://stage.example.com" # => http://stage.example.com/assets/js/xmlhr.js # aliased to avoid conflicts with a javascript_url named route # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#332 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#333 def url_to_javascript(source, options = T.unsafe(nil)); end # Computes the full URL to a stylesheet asset in the public stylesheets directory. @@ -2730,7 +2841,7 @@ module ActionView::Helpers::AssetUrlHelper # stylesheet_url "css/style.css", host: "http://stage.example.com" # => http://stage.example.com/assets/css/style.css # aliased to avoid conflicts with a stylesheet_url named route # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#359 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#360 def url_to_stylesheet(source, options = T.unsafe(nil)); end # Computes the full URL to a video asset in the public videos directory. @@ -2741,7 +2852,7 @@ module ActionView::Helpers::AssetUrlHelper # video_url "hd.avi", host: "http://stage.example.com" # => http://stage.example.com/videos/hd.avi # aliased to avoid conflicts with a video_url named route # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#415 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#416 def url_to_video(source, options = T.unsafe(nil)); end # Computes the path to a video asset in the public videos directory. @@ -2754,7 +2865,7 @@ module ActionView::Helpers::AssetUrlHelper # video_path("/trailers/hd.avi") # => /trailers/hd.avi # video_path("http://www.example.com/vid/hd.avi") # => http://www.example.com/vid/hd.avi # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#403 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#404 def video_path(source, options = T.unsafe(nil)); end # Computes the full URL to a video asset in the public videos directory. @@ -2764,21 +2875,23 @@ module ActionView::Helpers::AssetUrlHelper # # video_url "hd.avi", host: "http://stage.example.com" # => http://stage.example.com/videos/hd.avi # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#415 + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#416 def video_url(source, options = T.unsafe(nil)); end end -# source://actionview//lib/action_view/helpers/asset_url_helper.rb#235 +# source://actionview//lib/action_view/helpers/asset_url_helper.rb#236 ActionView::Helpers::AssetUrlHelper::ASSET_EXTENSIONS = T.let(T.unsafe(nil), Hash) # Maps asset types to public directory. # -# source://actionview//lib/action_view/helpers/asset_url_helper.rb#253 +# source://actionview//lib/action_view/helpers/asset_url_helper.rb#254 ActionView::Helpers::AssetUrlHelper::ASSET_PUBLIC_DIRECTORIES = T.let(T.unsafe(nil), Hash) -# source://actionview//lib/action_view/helpers/asset_url_helper.rb#121 +# source://actionview//lib/action_view/helpers/asset_url_helper.rb#122 ActionView::Helpers::AssetUrlHelper::URI_REGEXP = T.let(T.unsafe(nil), Regexp) +# = Action View Atom Feed \Helpers +# # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#8 module ActionView::Helpers::AtomFeedHelper # Adds easy defaults to writing Atom feeds with the Builder template engine (this does not work on ERB or any other @@ -2857,9 +2970,9 @@ module ActionView::Helpers::AtomFeedHelper # end # # The Atom spec defines five elements (content rights title subtitle - # summary) which may directly contain xhtml content if type: 'xhtml' + # summary) which may directly contain XHTML content if type: 'xhtml' # is specified as an attribute. If so, this helper will take care of - # the enclosing div and xhtml namespace declaration. Example usage: + # the enclosing div and XHTML namespace declaration. Example usage: # # entry.summary type: 'xhtml' do |xhtml| # xhtml.p pluralize(order.line_items.count, "line item") @@ -2884,7 +2997,7 @@ class ActionView::Helpers::AtomFeedHelper::AtomBuilder private - # Delegate to xml builder, first wrapping the element in an xhtml + # Delegate to XML Builder, first wrapping the element in an XHTML # namespaced div element if the method and arguments indicate # that an xhtml_block? is desired. # @@ -2930,6 +3043,8 @@ class ActionView::Helpers::AtomFeedHelper::AtomFeedBuilder < ::ActionView::Helpe def updated(date_or_time = T.unsafe(nil)); end end +# = Action View Cache \Helpers +# # source://actionview//lib/action_view/helpers/cache_helper.rb#6 module ActionView::Helpers::CacheHelper # This helper exposes a method for caching fragments of a view @@ -3171,37 +3286,42 @@ module ActionView::Helpers::CacheHelper def read_fragment_for(name, options); end # source://actionview//lib/action_view/helpers/cache_helper.rb#284 - def write_fragment_for(name, options); end + def write_fragment_for(name, options, &block); end end -# source://actionview//lib/action_view/helpers/cache_helper.rb#295 +# source://actionview//lib/action_view/helpers/cache_helper.rb#289 module ActionView::Helpers::CacheHelper::CachingRegistry extend ::ActionView::Helpers::CacheHelper::CachingRegistry # @return [Boolean] # - # source://actionview//lib/action_view/helpers/cache_helper.rb#298 + # source://actionview//lib/action_view/helpers/cache_helper.rb#292 def caching?; end - # source://actionview//lib/action_view/helpers/cache_helper.rb#302 + # source://actionview//lib/action_view/helpers/cache_helper.rb#296 def track_caching; end end # source://actionview//lib/action_view/helpers/cache_helper.rb#7 class ActionView::Helpers::CacheHelper::UncacheableFragmentError < ::StandardError; end -# CaptureHelper exposes methods to let you extract generated markup which +# = Action View Capture \Helpers +# +# \CaptureHelper exposes methods to let you extract generated markup which # can be used in other parts of a template or layout file. # -# It provides a method to capture blocks into variables through capture and -# a way to capture a block of markup for use in a layout through {content_for}[rdoc-ref:ActionView::Helpers::CaptureHelper#content_for]. +# It provides a method to capture blocks into variables through #capture and +# a way to capture a block of markup for use in a layout through #content_for. # -# source://actionview//lib/action_view/helpers/capture_helper.rb#13 +# As well as provides a method when using streaming responses through #provide. +# See ActionController::Streaming for more information. +# +# source://actionview//lib/action_view/helpers/capture_helper.rb#17 module ActionView::Helpers::CaptureHelper - # The capture method extracts part of a template as a String object. + # The capture method extracts part of a template as a string object. # You can then use this object anywhere in your templates, layout, or helpers. # - # The capture method can be used in ERB templates... + # The capture method can be used in \ERB templates... # # <% @greeting = capture do %> # Welcome to my shiny new web page! The date and time is @@ -3227,8 +3347,8 @@ module ActionView::Helpers::CaptureHelper # # @greeting # => "Welcome to my shiny new web page! The date and time is 2018-09-06 11:09:16 -0500" # - # source://actionview//lib/action_view/helpers/capture_helper.rb#43 - def capture(*args); end + # source://actionview//lib/action_view/helpers/capture_helper.rb#47 + def capture(*args, &block); end # Calling content_for stores a block of markup in an identifier for later use. # In order to access this stored content in other templates, helper modules @@ -3335,10 +3455,11 @@ module ActionView::Helpers::CaptureHelper # # WARNING: content_for is ignored in caches. So you shouldn't use it for elements that will be fragment cached. # - # source://actionview//lib/action_view/helpers/capture_helper.rb#155 + # source://actionview//lib/action_view/helpers/capture_helper.rb#172 def content_for(name, content = T.unsafe(nil), options = T.unsafe(nil), &block); end # content_for? checks whether any content has been captured yet using content_for. + # # Useful to render parts of your layout differently based on what is in your views. # # <%# This is the layout %> @@ -3355,7 +3476,7 @@ module ActionView::Helpers::CaptureHelper # # @return [Boolean] # - # source://actionview//lib/action_view/helpers/capture_helper.rb#195 + # source://actionview//lib/action_view/helpers/capture_helper.rb#215 def content_for?(name); end # The same as +content_for+ but when used with streaming flushes @@ -3364,72 +3485,160 @@ module ActionView::Helpers::CaptureHelper # template, you should use +content_for+, if not, use +provide+ to tell # the layout to stop looking for more contents. # - # source://actionview//lib/action_view/helpers/capture_helper.rb#175 + # See ActionController::Streaming for more information. + # + # source://actionview//lib/action_view/helpers/capture_helper.rb#194 def provide(name, content = T.unsafe(nil), &block); end # Use an alternate output buffer for the duration of the block. # Defaults to a new empty string. # - # source://actionview//lib/action_view/helpers/capture_helper.rb#201 + # source://actionview//lib/action_view/helpers/capture_helper.rb#221 def with_output_buffer(buf = T.unsafe(nil)); end end +# source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#5 +module ActionView::Helpers::ContentExfiltrationPreventionHelper + # source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6 + def prepend_content_exfiltration_prevention; end + + # source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6 + def prepend_content_exfiltration_prevention=(val); end + + # source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#61 + def prevent_content_exfiltration(html); end + + class << self + # source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6 + def prepend_content_exfiltration_prevention; end + + # source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6 + def prepend_content_exfiltration_prevention=(val); end + end +end + +# Close any open tags that support CDATA (textarea, xmp) before each form tag. +# This prevents attackers from injecting unclosed tags that could capture +# form contents. +# +# For example, an attacker might inject: +# +#
or +# the end of the document would be captured by the attacker's +# # - # source://actionview//lib/action_view/helpers/form_helper.rb#1268 + # source://actionview//lib/action_view/helpers/form_helper.rb#1275 def text_area(object_name, method, options = T.unsafe(nil)); end # Returns an input tag of the "text" type tailored for accessing a specified attribute (identified by +method+) on an object @@ -6868,7 +7115,7 @@ module ActionView::Helpers::FormHelper # text_field(:snippet, :code, size: 20, class: 'code_input') # # => # - # source://actionview//lib/action_view/helpers/form_helper.rb#1166 + # source://actionview//lib/action_view/helpers/form_helper.rb#1173 def text_field(object_name, method, options = T.unsafe(nil)); end # Returns a text_field of type "time". @@ -6906,7 +7153,7 @@ module ActionView::Helpers::FormHelper # time_field("task", "started_at", value: Time.now, include_seconds: false) # # => # - # source://actionview//lib/action_view/helpers/form_helper.rb#1468 + # source://actionview//lib/action_view/helpers/form_helper.rb#1475 def time_field(object_name, method, options = T.unsafe(nil)); end # Returns a text_field of type "url". @@ -6914,7 +7161,7 @@ module ActionView::Helpers::FormHelper # url_field("user", "homepage") # # => # - # source://actionview//lib/action_view/helpers/form_helper.rb#1542 + # source://actionview//lib/action_view/helpers/form_helper.rb#1555 def url_field(object_name, method, options = T.unsafe(nil)); end # Returns a text_field of type "week". @@ -6930,44 +7177,46 @@ module ActionView::Helpers::FormHelper # week_field("user", "born_on") # # => # - # source://actionview//lib/action_view/helpers/form_helper.rb#1533 + # source://actionview//lib/action_view/helpers/form_helper.rb#1546 def week_field(object_name, method, options = T.unsafe(nil)); end private - # source://actionview//lib/action_view/helpers/form_helper.rb#463 + # source://actionview//lib/action_view/helpers/form_helper.rb#464 def apply_form_for_options!(object, options); end - # source://actionview//lib/action_view/helpers/form_helper.rb#1607 + # source://actionview//lib/action_view/helpers/form_helper.rb#1620 def default_form_builder_class; end - # source://actionview//lib/action_view/helpers/form_helper.rb#1578 + # source://actionview//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//lib/action_view/helpers/form_helper.rb#1593 + # source://actionview//lib/action_view/helpers/form_helper.rb#1606 def instantiate_builder(record_name, record_object, options); end class << self - # source://actionview//lib/action_view/helpers/form_helper.rb#479 + # source://actionview//lib/action_view/helpers/form_helper.rb#480 def form_with_generates_ids; end - # source://actionview//lib/action_view/helpers/form_helper.rb#479 + # source://actionview//lib/action_view/helpers/form_helper.rb#480 def form_with_generates_ids=(val); end - # source://actionview//lib/action_view/helpers/form_helper.rb#477 + # source://actionview//lib/action_view/helpers/form_helper.rb#478 def form_with_generates_remote_forms; end - # source://actionview//lib/action_view/helpers/form_helper.rb#477 + # source://actionview//lib/action_view/helpers/form_helper.rb#478 def form_with_generates_remote_forms=(val); end - # source://actionview//lib/action_view/helpers/form_helper.rb#481 + # source://actionview//lib/action_view/helpers/form_helper.rb#482 def multiple_file_field_include_hidden; end - # source://actionview//lib/action_view/helpers/form_helper.rb#481 + # source://actionview//lib/action_view/helpers/form_helper.rb#482 def multiple_file_field_include_hidden=(val); end end end +# = Action View Form Option \Helpers +# # Provides a number of methods for turning different kinds of containers into a set of option tags. # # The collection_select, select and time_zone_select methods take an options parameter, a hash: @@ -7049,7 +7298,7 @@ end # # # -# source://actionview//lib/action_view/helpers/form_options_helper.rb#93 +# source://actionview//lib/action_view/helpers/form_options_helper.rb#94 module ActionView::Helpers::FormOptionsHelper include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::CaptureHelper @@ -7139,7 +7388,7 @@ module ActionView::Helpers::FormOptionsHelper # In the rare case you don't want this hidden field, you can pass the # include_hidden: false option to the helper method. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#781 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#782 def collection_check_boxes(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Returns radio button tags for the collection of existing return values @@ -7222,7 +7471,7 @@ module ActionView::Helpers::FormOptionsHelper # In case if you don't want the helper to generate this hidden field you can specify # include_hidden: false option. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#697 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#698 def collection_radio_buttons(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Returns # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#198 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#199 def collection_select(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end # Returns # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#257 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#258 def grouped_collection_select(object, method, collection, group_method, group_label_method, option_key_method, option_value_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end # Returns a string of tags, like options_for_select, but @@ -7388,7 +7637,7 @@ module ActionView::Helpers::FormOptionsHelper # Note: Only the and tags are returned, so you still have to # wrap the output in an appropriate tag. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#461 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#462 def option_groups_from_collection_for_select(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key = T.unsafe(nil)); end # Accepts a container (hash, array, enumerable, your type) and returns a string of option tags. Given a container @@ -7500,7 +7749,7 @@ module ActionView::Helpers::FormOptionsHelper # # NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#357 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#358 def options_for_select(container, selected = T.unsafe(nil)); end # Returns a string of option tags that have been compiled by iterating over the +collection+ and assigning @@ -7528,7 +7777,7 @@ module ActionView::Helpers::FormOptionsHelper # options_from_collection_for_select(@people, 'id', 'name', 1) # should produce the desired results. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#400 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#401 def options_from_collection_for_select(collection, value_method, text_method, selected = T.unsafe(nil)); end # Create a select tag and a series of contained option tags for the provided object and method. @@ -7593,7 +7842,7 @@ module ActionView::Helpers::FormOptionsHelper # In case if you don't want the helper to generate this hidden field you can specify # include_hidden: false option. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#158 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#159 def select(object, method, choices = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Returns a string of option tags for pretty much any time zone in the @@ -7616,7 +7865,7 @@ module ActionView::Helpers::FormOptionsHelper # NOTE: Only the option tags are returned, you have to wrap this call in # a regular HTML select tag. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#578 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#579 def time_zone_options_for_select(selected = T.unsafe(nil), priority_zones = T.unsafe(nil), model = T.unsafe(nil)); end # Returns select and option tags for the given object and method, using @@ -7650,7 +7899,7 @@ module ActionView::Helpers::FormOptionsHelper # # time_zone_select(:user, :time_zone, ActiveSupport::TimeZone.all.sort, model: ActiveSupport::TimeZone) # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#291 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#292 def time_zone_select(object, method, priority_zones = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil)); end # Returns a string of option tags for the days of the week. @@ -7665,49 +7914,52 @@ module ActionView::Helpers::FormOptionsHelper # NOTE: Only the option tags are returned, you have to wrap this call in # a regular HTML select tag. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#610 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#611 def weekday_options_for_select(selected = T.unsafe(nil), index_as_value: T.unsafe(nil), day_format: T.unsafe(nil), beginning_of_week: T.unsafe(nil)); end # Returns select and option tags for the given object and method, using # weekday_options_for_select to generate the list of option tags. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#297 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#298 def weekday_select(object, method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end private - # source://actionview//lib/action_view/helpers/form_options_helper.rb#808 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#809 def extract_selected_and_disabled(selected); end - # source://actionview//lib/action_view/helpers/form_options_helper.rb#819 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#820 def extract_values_from_collection(collection, value_method, selected); end - # source://actionview//lib/action_view/helpers/form_options_helper.rb#786 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#787 def option_html_attributes(element); end - # source://actionview//lib/action_view/helpers/form_options_helper.rb#794 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#795 def option_text_and_value(option); end # @return [Boolean] # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#804 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#805 def option_value_selected?(value, selected); end - # source://actionview//lib/action_view/helpers/form_options_helper.rb#833 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#834 def prompt_text(prompt); end - # source://actionview//lib/action_view/helpers/form_options_helper.rb#829 + # source://actionview//lib/action_view/helpers/form_options_helper.rb#830 def value_for_collection(item, value); end end +# = Action View Form Tag \Helpers +# # Provides a number of methods for creating form tags that don't rely on an Active Record object assigned to the template like # FormHelper does. Instead, you provide the names and values manually. # # NOTE: The HTML options disabled, readonly, and multiple can all be treated as booleans. So specifying # disabled: true will give disabled="disabled". # -# source://actionview//lib/action_view/helpers/form_tag_helper.rb#17 +# source://actionview//lib/action_view/helpers/form_tag_helper.rb#19 module ActionView::Helpers::FormTagHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper extend ::ActiveSupport::Concern include ::ActionView::Helpers::UrlHelper include ::ActionView::Helpers::SanitizeHelper @@ -7750,9 +8002,9 @@ module ActionView::Helpers::FormTagHelper # # Ask me! # # # - # ==== Deprecated: Rails UJS attributes + # ==== Deprecated: \Rails UJS attributes # - # Prior to Rails 7, Rails shipped with a JavaScript library called @rails/ujs on by default. Following Rails 7, + # Prior to \Rails 7, \Rails shipped with a JavaScript library called @rails/ujs on by default. Following \Rails 7, # this library is no longer on by default. This library integrated with the following options: # # * confirm: 'question?' - If present, the @@ -7770,12 +8022,19 @@ module ActionView::Helpers::FormTagHelper # button_tag "Checkout", data: { disable_with: "Please wait..." } # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#578 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#605 def button_tag(content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end + # :call-seq: + # check_box_tag(name, options = {}) + # check_box_tag(name, value, options = {}) + # check_box_tag(name, value, checked, options = {}) + # # Creates a check box form input tag. # # ==== Options + # * :value - The value of the input. Defaults to "1". + # * :checked - If set to true, the checkbox will be checked by default. # * :disabled - If set to true, the user will not be able to use this input. # * Any other key creates standard HTML options for the tag. # @@ -7795,8 +8054,8 @@ module ActionView::Helpers::FormTagHelper # check_box_tag 'eula', 'accepted', false, disabled: true # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#444 - def check_box_tag(name, value = T.unsafe(nil), checked = T.unsafe(nil), options = T.unsafe(nil)); end + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#455 + def check_box_tag(name, *args); end # Creates a text field of type "color". # @@ -7818,7 +8077,7 @@ module ActionView::Helpers::FormTagHelper # color_field_tag 'color', '#DEF726', class: 'special_input', disabled: true # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#676 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#703 def color_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "date". @@ -7841,7 +8100,7 @@ module ActionView::Helpers::FormTagHelper # date_field_tag 'date', '01/01/2014', class: 'special_input', disabled: true # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#746 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#773 def date_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "datetime-local". @@ -7853,8 +8112,9 @@ module ActionView::Helpers::FormTagHelper # * :min - The minimum acceptable value. # * :max - The maximum acceptable value. # * :step - The acceptable value granularity. + # * :include_seconds - Include seconds in the output timestamp format (true by default). # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#773 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#801 def datetime_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "datetime-local". @@ -7866,14 +8126,15 @@ module ActionView::Helpers::FormTagHelper # * :min - The minimum acceptable value. # * :max - The maximum acceptable value. # * :step - The acceptable value granularity. + # * :include_seconds - Include seconds in the output timestamp format (true by default). # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#773 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#801 def datetime_local_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#29 def default_enforce_utf8; end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#29 def default_enforce_utf8=(val); end # Creates a text field of type "email". @@ -7896,13 +8157,13 @@ module ActionView::Helpers::FormTagHelper # email_field_tag 'email', 'email@example.com', class: 'special_input', disabled: true # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#847 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#875 def email_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#23 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 def embed_authenticity_token_in_remote_forms; end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#23 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 def embed_authenticity_token_in_remote_forms=(val); end # Generate an HTML id attribute value for the given name and @@ -7912,16 +8173,16 @@ module ActionView::Helpers::FormTagHelper # attribute name. # # <%= label_tag :post, :title %> - # <%= text_field_tag :post, :title, aria: { describedby: field_id(:post, :title, :error) } %> + # <%= text_field :post, :title, aria: { describedby: field_id(:post, :title, :error) } %> # <%= tag.span("is blank", id: field_id(:post, :title, :error) %> # # In the example above, the element built by - # the call to text_field_tag declares an + # the call to text_field declares an # aria-describedby attribute referencing the # element, sharing a common id root (post_title, in this # case). # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#99 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#102 def field_id(object_name, method_name, *suffixes, index: T.unsafe(nil), namespace: T.unsafe(nil)); end # Generate an HTML name attribute value for the given name and @@ -7930,13 +8191,13 @@ module ActionView::Helpers::FormTagHelper # Return the value generated by the FormBuilder for the given # attribute name. # - # <%= text_field_tag :post, :title, name: field_name(:post, :title, :subtitle) %> - # <%# => + # <%= text_field :post, :title, name: field_name(:post, :title, :subtitle) %> + # <%# => %> # - # <%= text_field_tag :post, :tag, name: field_name(:post, :tag, multiple: true) %> - # <%# => + # <%= text_field :post, :tag, name: field_name(:post, :tag, multiple: true) %> + # <%# => %> # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#129 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#132 def field_name(object_name, method_name, *method_names, multiple: T.unsafe(nil), index: T.unsafe(nil)); end # Creates a field set for grouping HTML form elements. @@ -7960,7 +8221,7 @@ module ActionView::Helpers::FormTagHelper # <% end %> # # =>

# - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#650 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#677 def field_set_tag(legend = T.unsafe(nil), options = T.unsafe(nil), &block); end # Creates a file upload field. If you are using file uploads then you will also need @@ -7999,7 +8260,7 @@ module ActionView::Helpers::FormTagHelper # file_field_tag 'file', accept: 'text/html', class: 'upload', value: 'index.html' # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#344 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#347 def file_field_tag(name, options = T.unsafe(nil)); end # Starts a form tag that points the action to a URL configured with url_for_options just like @@ -8049,7 +8310,7 @@ module ActionView::Helpers::FormTagHelper # form_tag('http://far.away.com/form', authenticity_token: "cf50faa3fe97702ca1ae") # # form with custom authenticity token # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#75 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#78 def form_tag(url_for_options = T.unsafe(nil), options = T.unsafe(nil), &block); end # Creates a hidden form input field used to transmit data that would be lost due to HTTP's statelessness or @@ -8069,7 +8330,7 @@ module ActionView::Helpers::FormTagHelper # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#305 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#308 def hidden_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Displays an image which when clicked will submit the form. @@ -8103,7 +8364,7 @@ module ActionView::Helpers::FormTagHelper # image_submit_tag("save.png", data: { confirm: "Are you sure?" }) # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#624 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#651 def image_submit_tag(source, options = T.unsafe(nil)); end # Creates a label element. Accepts a block. @@ -8121,7 +8382,7 @@ module ActionView::Helpers::FormTagHelper # label_tag 'name', nil, class: 'small_label' # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#278 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#281 def label_tag(name = T.unsafe(nil), content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end # Creates a text field of type "month". @@ -8134,7 +8395,7 @@ module ActionView::Helpers::FormTagHelper # * :max - The maximum acceptable value. # * :step - The acceptable value granularity. # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#788 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#816 def month_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a number field. @@ -8182,7 +8443,7 @@ module ActionView::Helpers::FormTagHelper # number_field_tag 'quantity', '1', class: 'special_input', disabled: true # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#895 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#923 def number_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a password field, a masked text field that will hide the users input behind a mask character. @@ -8215,7 +8476,7 @@ module ActionView::Helpers::FormTagHelper # password_field_tag 'pin', '1234', maxlength: 4, size: 6, class: "pin_input" # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#377 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#380 def password_field_tag(name = T.unsafe(nil), value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "tel". @@ -8238,13 +8499,18 @@ module ActionView::Helpers::FormTagHelper # telephone_field_tag 'tel', '0123456789', class: 'special_input', disabled: true # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#722 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#749 def phone_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + # :call-seq: + # radio_button_tag(name, value, options = {}) + # radio_button_tag(name, value, checked, options = {}) + # # Creates a radio button; use groups of radio buttons named the same to allow users to # select from a group of options. # # ==== Options + # * :checked - If set to true, the radio button will be selected by default. # * :disabled - If set to true, the user will not be able to use this input. # * Any other key creates standard HTML options for the tag. # @@ -8261,8 +8527,8 @@ module ActionView::Helpers::FormTagHelper # radio_button_tag 'color', "green", true, class: "color_input" # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#469 - def radio_button_tag(name, value, checked = T.unsafe(nil), options = T.unsafe(nil)); end + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#491 + def radio_button_tag(name, value, *args); end # Creates a range form element. # @@ -8270,7 +8536,7 @@ module ActionView::Helpers::FormTagHelper # # Supports the same options as #number_field_tag. # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#909 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#937 def range_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "search". @@ -8293,7 +8559,7 @@ module ActionView::Helpers::FormTagHelper # search_field_tag 'search', 'Enter your search query here', class: 'special_input', disabled: true # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#699 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#726 def search_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a dropdown selection box, or if the :multiple option is set to true, a multiple @@ -8352,7 +8618,7 @@ module ActionView::Helpers::FormTagHelper # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#198 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#201 def select_tag(name, option_tags = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a submit button with the text value as the caption. @@ -8378,9 +8644,9 @@ module ActionView::Helpers::FormTagHelper # submit_tag "Edit", class: "edit_button" # # => # - # ==== Deprecated: Rails UJS attributes + # ==== Deprecated: \Rails UJS attributes # - # Prior to Rails 7, Rails shipped with the JavaScript library called @rails/ujs on by default. Following Rails 7, + # Prior to \Rails 7, \Rails shipped with the JavaScript library called @rails/ujs on by default. Following \Rails 7, # this library is no longer on by default. This library integrated with the following options: # # * confirm: 'question?' - If present the unobtrusive JavaScript @@ -8397,7 +8663,7 @@ module ActionView::Helpers::FormTagHelper # submit_tag "Save", data: { confirm: "Are you sure?" } # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#517 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#544 def submit_tag(value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "tel". @@ -8420,7 +8686,7 @@ module ActionView::Helpers::FormTagHelper # telephone_field_tag 'tel', '0123456789', class: 'special_input', disabled: true # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#722 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#749 def telephone_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text input area; use a textarea for longer text inputs such as blog posts or descriptions. @@ -8453,7 +8719,7 @@ module ActionView::Helpers::FormTagHelper # text_area_tag 'comment', nil, class: 'comment_input' # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#410 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#413 def text_area_tag(name, content = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a standard text field; use these text fields to input smaller chunks of text like a username @@ -8493,7 +8759,7 @@ module ActionView::Helpers::FormTagHelper # text_field_tag 'ip', '0.0.0.0', maxlength: 15, size: 20, class: "ip-input" # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#260 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#263 def text_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "time". @@ -8507,7 +8773,7 @@ module ActionView::Helpers::FormTagHelper # * :step - The acceptable value granularity. # * :include_seconds - Include seconds and ms in the output timestamp format (true by default). # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#760 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#787 def time_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "url". @@ -8530,13 +8796,13 @@ module ActionView::Helpers::FormTagHelper # url_field_tag 'url', 'http://rubyonrails.org', class: 'special_input', disabled: true # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#824 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#852 def url_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates the hidden UTF-8 enforcer tag. Override this method in a helper # to customize the tag. # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#915 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#943 def utf8_enforcer_tag; end # Creates a text field of type "week". @@ -8549,50 +8815,52 @@ module ActionView::Helpers::FormTagHelper # * :max - The maximum acceptable value. # * :step - The acceptable value granularity. # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#801 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#829 def week_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end private - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1011 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1040 def convert_direct_upload_option_to_url(options); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#950 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#978 def extra_tags_for_form(html_options); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#980 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1008 def form_tag_html(html_options); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#985 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1014 def form_tag_with_body(html_options, content); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#923 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#951 def html_options_for_form(url_for_options, options); end # see http://www.w3.org/TR/html4/types.html#type-name # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#992 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1021 def sanitize_to_id(name); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#996 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1025 def set_default_disable_with(value, tag_options); end class << self - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#29 def default_enforce_utf8; end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#29 def default_enforce_utf8=(val); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#23 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 def embed_authenticity_token_in_remote_forms; end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#23 + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 def embed_authenticity_token_in_remote_forms=(val); end end end -# source://actionview//lib/action_view/helpers/javascript_helper.rb#5 +# = Action View JavaScript \Helpers +# +# source://actionview//lib/action_view/helpers/javascript_helper.rb#6 module ActionView::Helpers::JavaScriptHelper # Escapes carriage returns and single and double quotes for JavaScript segments. # @@ -8601,7 +8869,7 @@ module ActionView::Helpers::JavaScriptHelper # # $('some_element').replaceWith('<%= j render 'some/element_template' %>'); # - # source://actionview//lib/action_view/helpers/javascript_helper.rb#27 + # source://actionview//lib/action_view/helpers/javascript_helper.rb#28 def escape_javascript(javascript); end # Escapes carriage returns and single and double quotes for JavaScript segments. @@ -8611,10 +8879,10 @@ module ActionView::Helpers::JavaScriptHelper # # $('some_element').replaceWith('<%= j render 'some/element_template' %>'); # - # source://actionview//lib/action_view/helpers/javascript_helper.rb#27 + # source://actionview//lib/action_view/helpers/javascript_helper.rb#28 def j(javascript); end - # source://actionview//lib/action_view/helpers/javascript_helper.rb#90 + # source://actionview//lib/action_view/helpers/javascript_helper.rb#91 def javascript_cdata_section(content); end # Returns a JavaScript tag with the +content+ inside. Example: @@ -8653,13 +8921,15 @@ module ActionView::Helpers::JavaScriptHelper # alert('All is good') # <% end -%> # - # source://actionview//lib/action_view/helpers/javascript_helper.rb#74 + # source://actionview//lib/action_view/helpers/javascript_helper.rb#75 def javascript_tag(content_or_options_with_block = T.unsafe(nil), html_options = T.unsafe(nil), &block); end end -# source://actionview//lib/action_view/helpers/javascript_helper.rb#6 +# source://actionview//lib/action_view/helpers/javascript_helper.rb#7 ActionView::Helpers::JavaScriptHelper::JS_ESCAPE_MAP = T.let(T.unsafe(nil), Hash) +# = Action View Number \Helpers +# # Provides methods for converting numbers into formatted strings. # Methods are provided for phone numbers, currency, percentage, # precision, positional notation, file size, and pretty printing. @@ -8667,439 +8937,141 @@ ActionView::Helpers::JavaScriptHelper::JS_ESCAPE_MAP = T.let(T.unsafe(nil), Hash # Most methods expect a +number+ argument, and will return it # unchanged if can't be converted into a valid number. # -# source://actionview//lib/action_view/helpers/number_helper.rb#16 +# source://actionview//lib/action_view/helpers/number_helper.rb#17 module ActionView::Helpers::NumberHelper - # Formats a +number+ into a currency string (e.g., $13.65). You - # can customize the format in the +options+ hash. - # - # The currency unit and number formatting of the current locale will be used - # unless otherwise specified in the provided options. No currency conversion - # is performed. If the user is given a way to change their locale, they will - # also be able to change the relative value of the currency displayed with - # this helper. If your application will ever support multiple locales, you - # may want to specify a constant :locale option or consider - # using a library capable of currency conversion. - # - # ==== Options + # Delegates to ActiveSupport::NumberHelper#number_to_currency. # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the level of precision (defaults - # to 2). - # * :unit - Sets the denomination of the currency - # (defaults to "$"). - # * :separator - Sets the separator between the units - # (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ","). - # * :format - Sets the format for non-negative numbers - # (defaults to "%u%n"). Fields are %u for the - # currency, and %n for the number. - # * :negative_format - Sets the format for negative - # numbers (defaults to prepending a hyphen to the formatted - # number given by :format). Accepts the same fields - # than :format, except %n is here the - # absolute value of the number. - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: # - # ==== Examples + # number_to_currency("12x34") # => "$12x34" + # number_to_currency("12x34", raise: true) # => InvalidNumberError # - # number_to_currency(1234567890.50) # => $1,234,567,890.50 - # number_to_currency(1234567890.506) # => $1,234,567,890.51 - # number_to_currency(1234567890.506, precision: 3) # => $1,234,567,890.506 - # number_to_currency(1234567890.506, locale: :fr) # => 1 234 567 890,51 € - # number_to_currency("123a456") # => $123a456 - # - # number_to_currency("123a456", raise: true) # => InvalidNumberError - # - # number_to_currency(-0.456789, precision: 0) - # # => "$0" - # number_to_currency(-1234567890.50, negative_format: "(%u%n)") - # # => ($1,234,567,890.50) - # number_to_currency(1234567890.50, unit: "R$", separator: ",", delimiter: "") - # # => R$1234567890,50 - # number_to_currency(1234567890.50, unit: "R$", separator: ",", delimiter: "", format: "%n %u") - # # => 1234567890,50 R$ - # number_to_currency(1234567890.50, strip_insignificant_zeros: true) - # # => "$1,234,567,890.5" - # - # source://actionview//lib/action_view/helpers/number_helper.rb#127 + # source://actionview//lib/action_view/helpers/number_helper.rb#51 def number_to_currency(number, options = T.unsafe(nil)); end - # Pretty prints (formats and approximates) a number in a way it - # is more readable by humans (e.g.: 1200000000 becomes "1.2 - # Billion"). This is useful for numbers that can get very large - # (and too hard to read). - # - # See number_to_human_size if you want to print a file - # size. - # - # You can also define your own unit-quantifier names if you want - # to use other decimal units (e.g.: 1500 becomes "1.5 - # kilometers", 0.150 becomes "150 milliliters", etc). You may - # define a wide range of unit quantifiers, even fractional ones - # (centi, deci, mili, etc). - # - # ==== Options + # Delegates to ActiveSupport::NumberHelper#number_to_human. # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +true+) - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +true+) - # * :units - A Hash of unit quantifier names. Or a - # string containing an i18n scope where to find this hash. It - # might have the following keys: - # * *integers*: :unit, :ten, - # :hundred, :thousand, :million, - # :billion, :trillion, - # :quadrillion - # * *fractionals*: :deci, :centi, - # :mili, :micro, :nano, - # :pico, :femto - # * :format - Sets the format of the output string - # (defaults to "%n %u"). The field types are: - # * %u - The quantifier (ex.: 'thousand') - # * %n - The number - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: # - # ==== Examples + # number_to_human("12x34") # => "12x34" + # number_to_human("12x34", raise: true) # => InvalidNumberError # - # number_to_human(123) # => "123" - # number_to_human(1234) # => "1.23 Thousand" - # number_to_human(12345) # => "12.3 Thousand" - # number_to_human(1234567) # => "1.23 Million" - # number_to_human(1234567890) # => "1.23 Billion" - # number_to_human(1234567890123) # => "1.23 Trillion" - # number_to_human(1234567890123456) # => "1.23 Quadrillion" - # number_to_human(1234567890123456789) # => "1230 Quadrillion" - # number_to_human(489939, precision: 2) # => "490 Thousand" - # number_to_human(489939, precision: 4) # => "489.9 Thousand" - # number_to_human(1234567, precision: 4, - # significant: false) # => "1.2346 Million" - # number_to_human(1234567, precision: 1, - # separator: ',', - # significant: false) # => "1,2 Million" - # - # number_to_human(500000000, precision: 5) # => "500 Million" - # number_to_human(12345012345, significant: false) # => "12.345 Billion" - # - # Non-significant zeros after the decimal separator are stripped - # out by default (set :strip_insignificant_zeros to - # +false+ to change that): - # - # number_to_human(12.00001) # => "12" - # number_to_human(12.00001, strip_insignificant_zeros: false) # => "12.0" - # - # ==== Custom Unit Quantifiers - # - # You can also use your own custom unit quantifiers: - # - # number_to_human(500000, units: {unit: "ml", thousand: "lt"}) # => "500 lt" - # - # If in your I18n locale you have: - # distance: - # centi: - # one: "centimeter" - # other: "centimeters" - # unit: - # one: "meter" - # other: "meters" - # thousand: - # one: "kilometer" - # other: "kilometers" - # billion: "gazillion-distance" - # - # Then you could do: - # - # number_to_human(543934, units: :distance) # => "544 kilometers" - # number_to_human(54393498, units: :distance) # => "54400 kilometers" - # number_to_human(54393498000, units: :distance) # => "54.4 gazillion-distance" - # number_to_human(343, units: :distance, precision: 1) # => "300 meters" - # number_to_human(1, units: :distance) # => "1 meter" - # number_to_human(0.34, units: :distance) # => "34 centimeters" - # - # source://actionview//lib/action_view/helpers/number_helper.rb#404 + # source://actionview//lib/action_view/helpers/number_helper.rb#111 def number_to_human(number, options = T.unsafe(nil)); end - # Formats the bytes in +number+ into a more understandable - # representation (e.g., giving it 1500 yields 1.46 KB). This - # method is useful for reporting file sizes to users. You can - # customize the format in the +options+ hash. - # - # See number_to_human if you want to pretty-print a - # generic number. - # - # ==== Options + # Delegates to ActiveSupport::NumberHelper#number_to_human_size. # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +true+) - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +true+) - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: # - # ==== Examples + # number_to_human_size("12x34") # => "12x34" + # number_to_human_size("12x34", raise: true) # => InvalidNumberError # - # number_to_human_size(123) # => 123 Bytes - # number_to_human_size(1234) # => 1.21 KB - # number_to_human_size(12345) # => 12.1 KB - # number_to_human_size(1234567) # => 1.18 MB - # number_to_human_size(1234567890) # => 1.15 GB - # number_to_human_size(1234567890123) # => 1.12 TB - # number_to_human_size(1234567890123456) # => 1.1 PB - # number_to_human_size(1234567890123456789) # => 1.07 EB - # number_to_human_size(1234567, precision: 2) # => 1.2 MB - # number_to_human_size(483989, precision: 2) # => 470 KB - # number_to_human_size(1234567, precision: 2, separator: ',') # => 1,2 MB - # number_to_human_size(1234567890123, precision: 5) # => "1.1228 TB" - # number_to_human_size(524288000, precision: 5) # => "500 MB" - # - # source://actionview//lib/action_view/helpers/number_helper.rb#297 + # source://actionview//lib/action_view/helpers/number_helper.rb#99 def number_to_human_size(number, options = T.unsafe(nil)); end - # Formats a +number+ as a percentage string (e.g., 65%). You can - # customize the format in the +options+ hash. - # - # ==== Options + # Delegates to ActiveSupport::NumberHelper#number_to_percentage. # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +false+). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). - # * :format - Specifies the format of the percentage - # string The number field is %n (defaults to "%n%"). - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: # - # ==== Examples - # - # number_to_percentage(100) # => 100.000% - # number_to_percentage("98") # => 98.000% - # number_to_percentage(100, precision: 0) # => 100% - # number_to_percentage(1000, delimiter: '.', separator: ',') # => 1.000,000% - # number_to_percentage(302.24398923423, precision: 5) # => 302.24399% - # number_to_percentage(1000, locale: :fr) # => 1 000,000% - # number_to_percentage("98a") # => 98a% - # number_to_percentage(100, format: "%n %") # => 100.000 % + # number_to_percentage("99x") # => "99x%" + # number_to_percentage("99x", raise: true) # => InvalidNumberError # - # number_to_percentage("98a", raise: true) # => InvalidNumberError - # - # source://actionview//lib/action_view/helpers/number_helper.rb#167 + # source://actionview//lib/action_view/helpers/number_helper.rb#63 def number_to_percentage(number, options = T.unsafe(nil)); end - # Formats a +number+ into a phone number (US by default e.g., (555) - # 123-9876). You can customize the format in the +options+ hash. - # - # ==== Options + # Delegates to ActiveSupport::NumberHelper#number_to_phone. # - # * :area_code - Adds parentheses around the area code. - # * :delimiter - Specifies the delimiter to use - # (defaults to "-"). - # * :extension - Specifies an extension to add to the - # end of the generated number. - # * :country_code - Sets the country code for the phone - # number. - # * :pattern - Specifies how the number is divided into three - # groups with the custom regexp to override the default format. - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: # - # ==== Examples + # number_to_phone("12x34") # => "12x34" + # number_to_phone("12x34", raise: true) # => InvalidNumberError # - # number_to_phone(5551234) # => 555-1234 - # number_to_phone("5551234") # => 555-1234 - # number_to_phone(1235551234) # => 123-555-1234 - # number_to_phone(1235551234, area_code: true) # => (123) 555-1234 - # number_to_phone(1235551234, delimiter: " ") # => 123 555 1234 - # number_to_phone(1235551234, area_code: true, extension: 555) # => (123) 555-1234 x 555 - # number_to_phone(1235551234, country_code: 1) # => +1-123-555-1234 - # number_to_phone("123a456") # => 123a456 - # number_to_phone("1234a567", raise: true) # => InvalidNumberError - # - # number_to_phone(1235551234, country_code: 1, extension: 1343, delimiter: ".") - # # => +1.123.555.1234 x 1343 - # - # number_to_phone(75561234567, pattern: /(\d{1,4})(\d{4})(\d{4})$/, area_code: true) - # # => "(755) 6123-4567" - # number_to_phone(13312345678, pattern: /(\d{3})(\d{4})(\d{4})$/) - # # => "133-1234-5678" - # - # source://actionview//lib/action_view/helpers/number_helper.rb#62 + # source://actionview//lib/action_view/helpers/number_helper.rb#35 def number_to_phone(number, options = T.unsafe(nil)); end - # Formats a +number+ with grouped thousands using +delimiter+ - # (e.g., 12,324). You can customize the format in the +options+ - # hash. - # - # ==== Options + # Delegates to ActiveSupport::NumberHelper#number_to_delimited. # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :delimiter - Sets the thousands delimiter (defaults - # to ","). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter_pattern - Sets a custom regular expression used for - # deriving the placement of delimiter. Helpful when using currency formats - # like INR. - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: # - # ==== Examples - # - # number_with_delimiter(12345678) # => 12,345,678 - # number_with_delimiter("123456") # => 123,456 - # number_with_delimiter(12345678.05) # => 12,345,678.05 - # number_with_delimiter(12345678, delimiter: ".") # => 12.345.678 - # number_with_delimiter(12345678, delimiter: ",") # => 12,345,678 - # number_with_delimiter(12345678.05, separator: " ") # => 12,345,678 05 - # number_with_delimiter(12345678.05, locale: :fr) # => 12 345 678,05 - # number_with_delimiter("112a") # => 112a - # number_with_delimiter(98765432.98, delimiter: " ", separator: ",") - # # => 98 765 432,98 - # - # number_with_delimiter("123456.78", - # delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/) # => "1,23,456.78" - # - # number_with_delimiter("112a", raise: true) # => raise InvalidNumberError + # number_with_delimiter("12x34") # => "12x34" + # number_with_delimiter("12x34", raise: true) # => InvalidNumberError # - # source://actionview//lib/action_view/helpers/number_helper.rb#206 + # source://actionview//lib/action_view/helpers/number_helper.rb#75 def number_with_delimiter(number, options = T.unsafe(nil)); end - # Formats a +number+ with the specified level of - # :precision (e.g., 112.32 has a precision of 2 if - # +:significant+ is +false+, and 5 if +:significant+ is +true+). - # You can customize the format in the +options+ hash. - # - # ==== Options - # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +false+). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. - # - # ==== Examples - # - # number_with_precision(111.2345) # => 111.235 - # number_with_precision(111.2345, precision: 2) # => 111.23 - # number_with_precision(13, precision: 5) # => 13.00000 - # number_with_precision(389.32314, precision: 0) # => 389 - # number_with_precision(111.2345, significant: true) # => 111 - # number_with_precision(111.2345, precision: 1, significant: true) # => 100 - # number_with_precision(13, precision: 5, significant: true) # => 13.000 - # number_with_precision(111.234, locale: :fr) # => 111,234 + # Delegates to ActiveSupport::NumberHelper#number_to_rounded. # - # number_with_precision(13, precision: 5, significant: true, strip_insignificant_zeros: true) - # # => 13 + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: # - # number_with_precision(389.32314, precision: 4, significant: true) # => 389.3 - # number_with_precision(1111.2345, precision: 2, separator: ',', delimiter: '.') - # # => 1.111,23 + # number_with_precision("12x34") # => "12x34" + # number_with_precision("12x34", raise: true) # => InvalidNumberError # - # source://actionview//lib/action_view/helpers/number_helper.rb#251 + # source://actionview//lib/action_view/helpers/number_helper.rb#87 def number_with_precision(number, options = T.unsafe(nil)); end private - # source://actionview//lib/action_view/helpers/number_helper.rb#409 + # source://actionview//lib/action_view/helpers/number_helper.rb#116 def delegate_number_helper_method(method, number, options); end - # source://actionview//lib/action_view/helpers/number_helper.rb#428 + # source://actionview//lib/action_view/helpers/number_helper.rb#135 def escape_units(units); end - # source://actionview//lib/action_view/helpers/number_helper.rb#418 + # source://actionview//lib/action_view/helpers/number_helper.rb#125 def escape_unsafe_options(options); end # @raise [InvalidNumberError] # - # source://actionview//lib/action_view/helpers/number_helper.rb#451 + # source://actionview//lib/action_view/helpers/number_helper.rb#158 def parse_float(number, raise_error); end # @return [Boolean] # - # source://actionview//lib/action_view/helpers/number_helper.rb#447 + # source://actionview//lib/action_view/helpers/number_helper.rb#154 def valid_float?(number); end # @raise [InvalidNumberError] # - # source://actionview//lib/action_view/helpers/number_helper.rb#434 + # source://actionview//lib/action_view/helpers/number_helper.rb#141 def wrap_with_output_safety_handling(number, raise_on_invalid, &block); end end # Raised when argument +number+ param given to the helpers is invalid and # the option +:raise+ is set to +true+. # -# source://actionview//lib/action_view/helpers/number_helper.rb#19 +# source://actionview//lib/action_view/helpers/number_helper.rb#20 class ActionView::Helpers::NumberHelper::InvalidNumberError < ::StandardError # @return [InvalidNumberError] a new instance of InvalidNumberError # - # source://actionview//lib/action_view/helpers/number_helper.rb#21 + # source://actionview//lib/action_view/helpers/number_helper.rb#22 def initialize(number); end # Returns the value of attribute number. # - # source://actionview//lib/action_view/helpers/number_helper.rb#20 + # source://actionview//lib/action_view/helpers/number_helper.rb#21 def number; end # Sets the attribute number # # @param value the value to set the attribute number to. # - # source://actionview//lib/action_view/helpers/number_helper.rb#20 + # source://actionview//lib/action_view/helpers/number_helper.rb#21 def number=(_arg0); end end +# = Action View Raw Output \Helpers +# # source://actionview//lib/action_view/helpers/output_safety_helper.rb#8 module ActionView::Helpers::OutputSafetyHelper # This method outputs without escaping a string. Since escaping tags is - # now default, this can be used when you don't want Rails to automatically + # now default, this can be used when you don't want \Rails to automatically # escape tags. This is not recommended if the data is coming from the user's # input. # @@ -9133,7 +9105,7 @@ module ActionView::Helpers::OutputSafetyHelper def to_sentence(array, options = T.unsafe(nil)); end end -# = Action View Rendering +# = Action View \Rendering \Helpers # # Implements methods that allow rendering from a view context. # In order to use this module, all you need is to implement @@ -9216,10 +9188,12 @@ module ActionView::Helpers::RenderingHelper def render(options = T.unsafe(nil), locals = T.unsafe(nil), &block); end end +# = Action View Sanitize \Helpers +# # The SanitizeHelper module provides a set of methods for scrubbing text of undesired HTML elements. # These helper methods extend Action View making them callable within your template files. # -# source://actionview//lib/action_view/helpers/sanitize_helper.rb#10 +# source://actionview//lib/action_view/helpers/sanitize_helper.rb#11 module ActionView::Helpers::SanitizeHelper extend ::ActiveSupport::Concern @@ -9227,12 +9201,11 @@ module ActionView::Helpers::SanitizeHelper # Sanitizes HTML input, stripping all but known-safe tags and attributes. # - # It also strips href/src attributes with unsafe protocols like - # javascript:, while also protecting against attempts to use Unicode, - # ASCII, and hex character references to work around these protocol filters. - # All special characters will be escaped. + # It also strips +href+ / +src+ attributes with unsafe protocols like +javascript:+, while + # also protecting against attempts to use Unicode, ASCII, and hex character references to work + # around these protocol filters. # - # The default sanitizer is Rails::Html::SafeListSanitizer. See {Rails HTML + # The default sanitizer is +Rails::HTML5::SafeListSanitizer+. See {Rails HTML # Sanitizers}[https://github.com/rails/rails-html-sanitizer] for more information. # # Custom sanitization rules can also be provided. @@ -9242,26 +9215,31 @@ module ActionView::Helpers::SanitizeHelper # # ==== Options # - # * :tags - An array of allowed tags. - # * :attributes - An array of allowed attributes. - # * :scrubber - A {Rails::Html scrubber}[https://github.com/rails/rails-html-sanitizer] + # [+:tags+] + # An array of allowed tags. + # + # [+:attributes+] + # An array of allowed attributes. + # + # [+:scrubber+] + # A {Rails::HTML scrubber}[https://github.com/rails/rails-html-sanitizer] # or {Loofah::Scrubber}[https://github.com/flavorjones/loofah] object that # defines custom sanitization rules. A custom scrubber takes precedence over # custom tags and attributes. # # ==== Examples # - # Normal use: + # ===== Normal use # # <%= sanitize @comment.body %> # - # Providing custom lists of permitted tags and attributes: + # ===== Providing custom lists of permitted tags and attributes # # <%= sanitize @comment.body, tags: %w(strong em a), attributes: %w(href) %> # - # Providing a custom Rails::Html scrubber: + # ===== Providing a custom +Rails::HTML+ scrubber # - # class CommentScrubber < Rails::Html::PermitScrubber + # class CommentScrubber < Rails::HTML::PermitScrubber # def initialize # super # self.tags = %w( form script comment blockquote ) @@ -9273,21 +9251,27 @@ module ActionView::Helpers::SanitizeHelper # end # end # + # + # # <%= sanitize @comment.body, scrubber: CommentScrubber.new %> # # See {Rails HTML Sanitizer}[https://github.com/rails/rails-html-sanitizer] for - # documentation about Rails::Html scrubbers. + # documentation about +Rails::HTML+ scrubbers. # - # Providing a custom Loofah::Scrubber: + # ===== Providing a custom +Loofah::Scrubber+ # # scrubber = Loofah::Scrubber.new do |node| # node.remove if node.name == 'script' # end # + # + # # <%= sanitize @comment.body, scrubber: scrubber %> # # See {Loofah's documentation}[https://github.com/flavorjones/loofah] for more - # information about defining custom Loofah::Scrubber objects. + # information about defining custom +Loofah::Scrubber+ objects. + # + # ==== Global Configuration # # To set the default allowed tags or attributes across your application: # @@ -9295,14 +9279,36 @@ module ActionView::Helpers::SanitizeHelper # config.action_view.sanitized_allowed_tags = ['strong', 'em', 'a'] # config.action_view.sanitized_allowed_attributes = ['href', 'title'] # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#81 + # The default, starting in \Rails 7.1, is to use an HTML5 parser for sanitization (if it is + # available, see NOTE below). If you wish to revert back to the previous HTML4 behavior, you + # can do so by setting the following in your application configuration: + # + # # In config/application.rb + # config.action_view.sanitizer_vendor = Rails::HTML4::Sanitizer + # + # Or, if you're upgrading from a previous version of \Rails and wish to opt into the HTML5 + # behavior: + # + # # In config/application.rb + # config.action_view.sanitizer_vendor = Rails::HTML5::Sanitizer + # + # NOTE: +Rails::HTML5::Sanitizer+ is not supported on JRuby, so on JRuby platforms \Rails will + # fall back to using +Rails::HTML4::Sanitizer+. + # + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#111 def sanitize(html, options = T.unsafe(nil)); end - # Sanitizes a block of CSS code. Used by +sanitize+ when it comes across a style attribute. + # Sanitizes a block of CSS code. Used by #sanitize when it comes across a style attribute. # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#86 + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#116 def sanitize_css(style); end + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor; end + + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor=(val); end + # Strips all link tags from +html+ leaving just the link text. # # strip_links('Ruby on Rails') @@ -9317,7 +9323,7 @@ module ActionView::Helpers::SanitizeHelper # strip_links('<malformed & link') # # => <malformed & link # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#120 + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#150 def strip_links(html); end # Strips all HTML tags from +html+, including comments and special characters. @@ -9334,64 +9340,72 @@ module ActionView::Helpers::SanitizeHelper # strip_tags("> A quote from Smith & Wesson") # # => > A quote from Smith & Wesson # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#103 + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#133 def strip_tags(html); end -end -# source://actionview//lib/action_view/helpers/sanitize_helper.rb#124 -module ActionView::Helpers::SanitizeHelper::ClassMethods - # Gets the Rails::Html::FullSanitizer instance used by +strip_tags+. Replace with + class << self + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor; end + + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor=(val); end + end +end + +# source://actionview//lib/action_view/helpers/sanitize_helper.rb#154 +module ActionView::Helpers::SanitizeHelper::ClassMethods + # Gets the Rails::HTML::FullSanitizer instance used by +strip_tags+. Replace with # any object that responds to +sanitize+. # # class Application < Rails::Application # config.action_view.full_sanitizer = MySpecialSanitizer.new # end # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#145 + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#175 def full_sanitizer; end # Sets the attribute full_sanitizer # # @param value the value to set the attribute full_sanitizer to. # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#125 + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#155 def full_sanitizer=(_arg0); end - # Gets the Rails::Html::LinkSanitizer instance used by +strip_links+. + # Gets the Rails::HTML::LinkSanitizer instance used by +strip_links+. # Replace with any object that responds to +sanitize+. # # class Application < Rails::Application # config.action_view.link_sanitizer = MySpecialSanitizer.new # end # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#155 + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#185 def link_sanitizer; end # Sets the attribute link_sanitizer # # @param value the value to set the attribute link_sanitizer to. # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#125 + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#155 def link_sanitizer=(_arg0); end - # Gets the Rails::Html::SafeListSanitizer instance used by sanitize and +sanitize_css+. + # Gets the Rails::HTML::SafeListSanitizer instance used by sanitize and +sanitize_css+. # Replace with any object that responds to +sanitize+. # # class Application < Rails::Application # config.action_view.safe_list_sanitizer = MySpecialSanitizer.new # end # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#165 + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#195 def safe_list_sanitizer; end # Sets the attribute safe_list_sanitizer # # @param value the value to set the attribute safe_list_sanitizer to. # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#125 + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#155 def safe_list_sanitizer=(_arg0); end - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#135 + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#165 def sanitized_allowed_attributes; end # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#34 @@ -9415,7 +9429,7 @@ module ActionView::Helpers::SanitizeHelper::ClassMethods # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#48 def sanitized_allowed_protocols=(_); end - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#131 + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#161 def sanitized_allowed_tags; end # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#24 @@ -9445,7 +9459,7 @@ module ActionView::Helpers::SanitizeHelper::ClassMethods # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#48 def sanitized_uri_attributes=(_); end - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#127 + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#157 def sanitizer_vendor; end private @@ -9454,10 +9468,12 @@ module ActionView::Helpers::SanitizeHelper::ClassMethods def deprecate_option(name); end end +# = Action View Tag \Helpers +# # Provides methods to generate HTML tags programmatically both as a modern # HTML5 compliant builder style and legacy XHTML compliant tags. # -# source://actionview//lib/action_view/helpers/tag_helper.rb#14 +# source://actionview//lib/action_view/helpers/tag_helper.rb#15 module ActionView::Helpers::TagHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper @@ -9476,7 +9492,7 @@ module ActionView::Helpers::TagHelper # cdata_section("hello]]>world") # # => world]]> # - # source://actionview//lib/action_view/helpers/tag_helper.rb#408 + # source://actionview//lib/action_view/helpers/tag_helper.rb#386 def cdata_section(content); end # Returns a string of tokens built from +args+. @@ -9491,7 +9507,7 @@ module ActionView::Helpers::TagHelper # token_list(nil, false, 123, "", "foo", { bar: true }) # # => "123 foo bar" # - # source://actionview//lib/action_view/helpers/tag_helper.rb#388 + # source://actionview//lib/action_view/helpers/tag_helper.rb#366 def class_names(*args); end # Returns an HTML block tag of type +name+ surrounding the +content+. Add @@ -9523,7 +9539,7 @@ module ActionView::Helpers::TagHelper # <% end -%> # # =>
Hello world!
# - # source://actionview//lib/action_view/helpers/tag_helper.rb#368 + # source://actionview//lib/action_view/helpers/tag_helper.rb#346 def content_tag(name, content_or_options_with_block = T.unsafe(nil), options = T.unsafe(nil), escape = T.unsafe(nil), &block); end # Returns an escaped version of +html+ without affecting existing escaped entities. @@ -9534,7 +9550,7 @@ module ActionView::Helpers::TagHelper # escape_once("<< Accept & Checkout") # # => "<< Accept & Checkout" # - # source://actionview//lib/action_view/helpers/tag_helper.rb#420 + # source://actionview//lib/action_view/helpers/tag_helper.rb#398 def escape_once(html); end # Returns an HTML tag. @@ -9630,7 +9646,7 @@ module ActionView::Helpers::TagHelper # # === Legacy syntax # - # The following format is for legacy syntax support. It will be deprecated in future versions of Rails. + # The following format is for legacy syntax support. It will be deprecated in future versions of \Rails. # # tag(name, options = nil, open = false, escape = true) # @@ -9676,7 +9692,7 @@ module ActionView::Helpers::TagHelper # tag("div", class: { highlight: current_user.admin? }) # # =>
# - # source://actionview//lib/action_view/helpers/tag_helper.rb#331 + # source://actionview//lib/action_view/helpers/tag_helper.rb#309 def tag(name = T.unsafe(nil), options = T.unsafe(nil), open = T.unsafe(nil), escape = T.unsafe(nil)); end # Returns a string of tokens built from +args+. @@ -9691,46 +9707,46 @@ module ActionView::Helpers::TagHelper # token_list(nil, false, 123, "", "foo", { bar: true }) # # => "123 foo bar" # - # source://actionview//lib/action_view/helpers/tag_helper.rb#388 + # source://actionview//lib/action_view/helpers/tag_helper.rb#366 def token_list(*args); end private - # source://actionview//lib/action_view/helpers/tag_helper.rb#425 + # source://actionview//lib/action_view/helpers/tag_helper.rb#403 def build_tag_values(*args); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#445 + # source://actionview//lib/action_view/helpers/tag_helper.rb#423 def tag_builder; end class << self - # source://actionview//lib/action_view/helpers/tag_helper.rb#425 + # source://actionview//lib/action_view/helpers/tag_helper.rb#403 def build_tag_values(*args); end end end -# source://actionview//lib/action_view/helpers/tag_helper.rb#31 +# source://actionview//lib/action_view/helpers/tag_helper.rb#32 ActionView::Helpers::TagHelper::ARIA_PREFIXES = T.let(T.unsafe(nil), Set) -# source://actionview//lib/action_view/helpers/tag_helper.rb#18 +# source://actionview//lib/action_view/helpers/tag_helper.rb#19 ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES = T.let(T.unsafe(nil), Set) -# source://actionview//lib/action_view/helpers/tag_helper.rb#32 +# source://actionview//lib/action_view/helpers/tag_helper.rb#33 ActionView::Helpers::TagHelper::DATA_PREFIXES = T.let(T.unsafe(nil), Set) -# source://actionview//lib/action_view/helpers/tag_helper.rb#40 +# source://actionview//lib/action_view/helpers/tag_helper.rb#41 ActionView::Helpers::TagHelper::PRE_CONTENT_STRINGS = T.let(T.unsafe(nil), Hash) -# source://actionview//lib/action_view/helpers/tag_helper.rb#34 +# source://actionview//lib/action_view/helpers/tag_helper.rb#35 ActionView::Helpers::TagHelper::TAG_TYPES = T.let(T.unsafe(nil), Hash) -# source://actionview//lib/action_view/helpers/tag_helper.rb#44 +# source://actionview//lib/action_view/helpers/tag_helper.rb#45 class ActionView::Helpers::TagHelper::TagBuilder include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper # @return [TagBuilder] a new instance of TagBuilder # - # source://actionview//lib/action_view/helpers/tag_helper.rb#51 + # source://actionview//lib/action_view/helpers/tag_helper.rb#52 def initialize(view_context); end # Transforms a Hash into HTML Attributes, ready to be interpolated into @@ -9739,48 +9755,45 @@ class ActionView::Helpers::TagHelper::TagBuilder # > # # => # - # source://actionview//lib/action_view/helpers/tag_helper.rb#60 + # source://actionview//lib/action_view/helpers/tag_helper.rb#61 def attributes(attributes); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#133 + # source://actionview//lib/action_view/helpers/tag_helper.rb#132 def boolean_tag_option(key); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + # source://actionview//lib/action_view/helpers/tag_helper.rb#79 def content_tag_string(name, content, options, escape = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#64 + # source://actionview//lib/action_view/helpers/tag_helper.rb#65 def p(*arguments, **options, &block); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#137 + # source://actionview//lib/action_view/helpers/tag_helper.rb#136 def tag_option(key, value, escape); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#91 + # source://actionview//lib/action_view/helpers/tag_helper.rb#90 def tag_options(options, escape = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#68 - def tag_string(name, content = T.unsafe(nil), **options, &block); end + # source://actionview//lib/action_view/helpers/tag_helper.rb#69 + def tag_string(name, content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end private - # source://actionview//lib/action_view/helpers/tag_helper.rb#167 - def handle_deprecated_escape_options(options); end - - # source://actionview//lib/action_view/helpers/tag_helper.rb#188 + # source://actionview//lib/action_view/helpers/tag_helper.rb#166 def method_missing(called, *args, **options, &block); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#155 + # source://actionview//lib/action_view/helpers/tag_helper.rb#154 def prefix_tag_option(prefix, key, value, escape); end # @return [Boolean] # - # source://actionview//lib/action_view/helpers/tag_helper.rb#163 + # source://actionview//lib/action_view/helpers/tag_helper.rb#162 def respond_to_missing?(*args); end end -# source://actionview//lib/action_view/helpers/tag_helper.rb#48 +# source://actionview//lib/action_view/helpers/tag_helper.rb#49 ActionView::Helpers::TagHelper::TagBuilder::HTML_VOID_ELEMENTS = T.let(T.unsafe(nil), Set) -# source://actionview//lib/action_view/helpers/tag_helper.rb#49 +# source://actionview//lib/action_view/helpers/tag_helper.rb#50 ActionView::Helpers::TagHelper::TagBuilder::SVG_SELF_CLOSING_ELEMENTS = T.let(T.unsafe(nil), Set) # source://actionview//lib/action_view/helpers/tags.rb#5 @@ -9793,86 +9806,75 @@ class ActionView::Helpers::Tags::Base include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper include ::ActionView::Helpers::UrlHelper include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::TextHelper include ::ActionView::Helpers::FormTagHelper include ::ActionView::Helpers::ActiveModelInstanceTag - include ::ActionView::Helpers::FormOptionsHelper extend ::ActionView::Helpers::UrlHelper::ClassMethods extend ::ActionView::Helpers::SanitizeHelper::ClassMethods # @return [Base] a new instance of Base # - # source://actionview//lib/action_view/helpers/tags/base.rb#12 + # source://actionview//lib/action_view/helpers/tags/base.rb#11 def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end # Returns the value of attribute object. # - # source://actionview//lib/action_view/helpers/tags/base.rb#10 + # source://actionview//lib/action_view/helpers/tags/base.rb#9 def object; end # This is what child classes implement. # # @raise [NotImplementedError] # - # source://actionview//lib/action_view/helpers/tags/base.rb#32 + # source://actionview//lib/action_view/helpers/tags/base.rb#31 def render; end private - # source://actionview//lib/action_view/helpers/tags/base.rb#95 + # source://actionview//lib/action_view/helpers/tags/base.rb#96 def add_default_name_and_id(options); end - # source://actionview//lib/action_view/helpers/tags/base.rb#82 + # source://actionview//lib/action_view/helpers/tags/base.rb#83 def add_default_name_and_id_for_value(tag_value, options); end - # source://actionview//lib/action_view/helpers/tags/base.rb#147 - def add_options(option_tags, options, value = T.unsafe(nil)); end - # @return [Boolean] # - # source://actionview//lib/action_view/helpers/tags/base.rb#173 + # source://actionview//lib/action_view/helpers/tags/base.rb#132 def generate_ids?; end - # source://actionview//lib/action_view/helpers/tags/base.rb#165 + # source://actionview//lib/action_view/helpers/tags/base.rb#124 def name_and_id_index(options); end - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/tags/base.rb#142 - def placeholder_required?(html_options); end - - # source://actionview//lib/action_view/helpers/tags/base.rb#73 + # source://actionview//lib/action_view/helpers/tags/base.rb#74 def retrieve_autoindex(pre_match); end - # source://actionview//lib/action_view/helpers/tags/base.rb#62 + # source://actionview//lib/action_view/helpers/tags/base.rb#63 def retrieve_object(object); end - # source://actionview//lib/action_view/helpers/tags/base.rb#115 + # source://actionview//lib/action_view/helpers/tags/base.rb#116 def sanitized_method_name; end - # source://actionview//lib/action_view/helpers/tags/base.rb#119 + # source://actionview//lib/action_view/helpers/tags/base.rb#120 def sanitized_value(value); end - # source://actionview//lib/action_view/helpers/tags/base.rb#123 - def select_content_tag(option_tags, options, html_options); end - - # source://actionview//lib/action_view/helpers/tags/base.rb#111 + # source://actionview//lib/action_view/helpers/tags/base.rb#112 def tag_id(index = T.unsafe(nil), namespace = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/tags/base.rb#107 + # source://actionview//lib/action_view/helpers/tags/base.rb#108 def tag_name(multiple = T.unsafe(nil), index = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/tags/base.rb#37 + # source://actionview//lib/action_view/helpers/tags/base.rb#36 def value; end - # source://actionview//lib/action_view/helpers/tags/base.rb#45 + # source://actionview//lib/action_view/helpers/tags/base.rb#46 def value_before_type_cast; end # @return [Boolean] # - # source://actionview//lib/action_view/helpers/tags/base.rb#57 + # source://actionview//lib/action_view/helpers/tags/base.rb#58 def value_came_from_user?; end end @@ -9910,22 +9912,23 @@ end # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#8 class ActionView::Helpers::Tags::CollectionCheckBoxes < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::CollectionHelpers + include ::ActionView::Helpers::FormOptionsHelper - # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#20 + # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#21 def render(&block); end private - # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#29 + # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#30 def hidden_field_name; end - # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#25 + # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#26 def render_component(builder); end end -# source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#11 +# source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#12 class ActionView::Helpers::Tags::CollectionCheckBoxes::CheckBoxBuilder < ::ActionView::Helpers::Tags::CollectionHelpers::Builder - # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#12 + # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#13 def check_box(extra_html_options = T.unsafe(nil)); end end @@ -9990,30 +9993,34 @@ end # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#8 class ActionView::Helpers::Tags::CollectionRadioButtons < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::CollectionHelpers + include ::ActionView::Helpers::FormOptionsHelper - # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#19 + # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#20 def render(&block); end private - # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#24 + # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#25 def render_component(builder); end end -# source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#11 +# source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#12 class ActionView::Helpers::Tags::CollectionRadioButtons::RadioButtonBuilder < ::ActionView::Helpers::Tags::CollectionHelpers::Builder - # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#12 + # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#13 def radio_button(extra_html_options = T.unsafe(nil)); end end # source://actionview//lib/action_view/helpers/tags/collection_select.rb#6 class ActionView::Helpers::Tags::CollectionSelect < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + # @return [CollectionSelect] a new instance of CollectionSelect # - # source://actionview//lib/action_view/helpers/tags/collection_select.rb#7 + # source://actionview//lib/action_view/helpers/tags/collection_select.rb#10 def initialize(object_name, method_name, template_object, collection, value_method, text_method, options, html_options); end - # source://actionview//lib/action_view/helpers/tags/collection_select.rb#16 + # source://actionview//lib/action_view/helpers/tags/collection_select.rb#19 def render; end end @@ -10033,32 +10040,34 @@ class ActionView::Helpers::Tags::DateField < ::ActionView::Helpers::Tags::Dateti private # source://actionview//lib/action_view/helpers/tags/date_field.rb#8 - def format_date(value); end + def format_datetime(value); end end # source://actionview//lib/action_view/helpers/tags/date_select.rb#8 class ActionView::Helpers::Tags::DateSelect < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::SelectRenderer + # @return [DateSelect] a new instance of DateSelect # - # source://actionview//lib/action_view/helpers/tags/date_select.rb#9 + # source://actionview//lib/action_view/helpers/tags/date_select.rb#11 def initialize(object_name, method_name, template_object, options, html_options); end - # source://actionview//lib/action_view/helpers/tags/date_select.rb#15 + # source://actionview//lib/action_view/helpers/tags/date_select.rb#17 def render; end private - # source://actionview//lib/action_view/helpers/tags/date_select.rb#30 + # source://actionview//lib/action_view/helpers/tags/date_select.rb#32 def datetime_selector(options, html_options); end - # source://actionview//lib/action_view/helpers/tags/date_select.rb#43 + # source://actionview//lib/action_view/helpers/tags/date_select.rb#45 def default_datetime(options); end - # source://actionview//lib/action_view/helpers/tags/date_select.rb#26 + # source://actionview//lib/action_view/helpers/tags/date_select.rb#28 def select_type; end class << self - # source://actionview//lib/action_view/helpers/tags/date_select.rb#20 + # source://actionview//lib/action_view/helpers/tags/date_select.rb#22 def select_type; end end end @@ -10070,24 +10079,32 @@ class ActionView::Helpers::Tags::DatetimeField < ::ActionView::Helpers::Tags::Te private - # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#21 + # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#17 def datetime_value(value); end # @raise [NotImplementedError] # - # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#17 - def format_date(value); end + # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#25 + def format_datetime(value); end + + # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#29 + def parse_datetime(value); end end # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#6 class ActionView::Helpers::Tags::DatetimeLocalField < ::ActionView::Helpers::Tags::DatetimeField + # @return [DatetimeLocalField] a new instance of DatetimeLocalField + # + # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#7 + def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end + private - # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#14 - def format_date(value); end + # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#19 + def format_datetime(value); end class << self - # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#8 + # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#13 def field_type; end end end @@ -10111,12 +10128,15 @@ end # source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#6 class ActionView::Helpers::Tags::GroupedCollectionSelect < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + # @return [GroupedCollectionSelect] a new instance of GroupedCollectionSelect # - # source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#7 + # source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#10 def initialize(object_name, method_name, template_object, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options); end - # source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#18 + # source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#21 def render; end end @@ -10166,7 +10186,7 @@ class ActionView::Helpers::Tags::MonthField < ::ActionView::Helpers::Tags::Datet private # source://actionview//lib/action_view/helpers/tags/month_field.rb#8 - def format_date(value); end + def format_datetime(value); end end # source://actionview//lib/action_view/helpers/tags/number_field.rb#6 @@ -10218,12 +10238,15 @@ end # source://actionview//lib/action_view/helpers/tags/select.rb#6 class ActionView::Helpers::Tags::Select < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + # @return [Select] a new instance of Select # - # source://actionview//lib/action_view/helpers/tags/select.rb#7 + # source://actionview//lib/action_view/helpers/tags/select.rb#10 def initialize(object_name, method_name, template_object, choices, options, html_options); end - # source://actionview//lib/action_view/helpers/tags/select.rb#16 + # source://actionview//lib/action_view/helpers/tags/select.rb#19 def render; end private @@ -10235,10 +10258,26 @@ class ActionView::Helpers::Tags::Select < ::ActionView::Helpers::Tags::Base # # @return [Boolean] # - # source://actionview//lib/action_view/helpers/tags/select.rb#36 + # source://actionview//lib/action_view/helpers/tags/select.rb#39 def grouped_choices?; end end +# source://actionview//lib/action_view/helpers/tags/select_renderer.rb#6 +module ActionView::Helpers::Tags::SelectRenderer + private + + # source://actionview//lib/action_view/helpers/tags/select_renderer.rb#36 + def add_options(option_tags, options, value = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/tags/select_renderer.rb#31 + def placeholder_required?(html_options); end + + # source://actionview//lib/action_view/helpers/tags/select_renderer.rb#8 + def select_content_tag(option_tags, options, html_options); end +end + # source://actionview//lib/action_view/helpers/tags/tel_field.rb#6 class ActionView::Helpers::Tags::TelField < ::ActionView::Helpers::Tags::TextField; end @@ -10278,7 +10317,7 @@ class ActionView::Helpers::Tags::TimeField < ::ActionView::Helpers::Tags::Dateti private # source://actionview//lib/action_view/helpers/tags/time_field.rb#13 - def format_date(value); end + def format_datetime(value); end end # source://actionview//lib/action_view/helpers/tags/time_select.rb#6 @@ -10286,12 +10325,15 @@ class ActionView::Helpers::Tags::TimeSelect < ::ActionView::Helpers::Tags::DateS # source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#6 class ActionView::Helpers::Tags::TimeZoneSelect < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + # @return [TimeZoneSelect] a new instance of TimeZoneSelect # - # source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#7 + # source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#10 def initialize(object_name, method_name, template_object, priority_zones, options, html_options); end - # source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#14 + # source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#17 def render; end end @@ -10342,20 +10384,25 @@ class ActionView::Helpers::Tags::WeekField < ::ActionView::Helpers::Tags::Dateti private # source://actionview//lib/action_view/helpers/tags/week_field.rb#8 - def format_date(value); end + def format_datetime(value); end end # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#6 class ActionView::Helpers::Tags::WeekdaySelect < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + # @return [WeekdaySelect] a new instance of WeekdaySelect # - # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#7 + # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#10 def initialize(object_name, method_name, template_object, options, html_options); end - # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#13 + # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#16 def render; end end +# = Action View Text \Helpers +# # The TextHelper module provides a set of methods for filtering, formatting # and transforming strings, which can reduce the amount of inline Ruby code in # your views. These helper methods extend Action View making them callable @@ -10379,7 +10426,7 @@ end # simple_format h('Example') # # => "

<a href=\"http://example.com/\">Example</a>

" # -# source://actionview//lib/action_view/helpers/text_helper.rb#35 +# source://actionview//lib/action_view/helpers/text_helper.rb#36 module ActionView::Helpers::TextHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper @@ -10390,41 +10437,44 @@ module ActionView::Helpers::TextHelper mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods # The preferred method of outputting text in your views is to use the - # <%= "text" %> eRuby syntax. The regular _puts_ and _print_ methods + # <%= "text" %> eRuby syntax. The regular +puts+ and +print+ methods # do not operate as expected in an eRuby code block. If you absolutely must - # output text within a non-output code block (i.e., <% %>), you can use the concat method. + # output text within a non-output code block (i.e., <% %>), you + # can use the +concat+ method. # - # <% - # concat "hello" - # # is the equivalent of <%= "hello" %> + # <% concat "hello" %> is equivalent to <%= "hello" %> # - # if logged_in - # concat "Logged in!" - # else - # concat link_to('login', action: :login) - # end - # # will either display "Logged in!" or a login link + # <% + # unless signed_in? + # concat link_to("Sign In", action: :sign_in) + # end # %> # - # source://actionview//lib/action_view/helpers/text_helper.rb#58 + # is equivalent to + # + # <% unless signed_in? %> + # <%= link_to "Sign In", action: :sign_in %> + # <% end %> + # + # source://actionview//lib/action_view/helpers/text_helper.rb#63 def concat(string); end # Returns the current cycle string after a cycle has been started. Useful # for complex table highlighting or any other design need which requires # the current cycle string in more than one place. # - # # Alternate background colors - # @items = [1,2,3,4] + # <%# Alternate background colors %> + # <% @items = [1,2,3,4] %> # <% @items.each do |item| %> #
"> # <%= item %> #
# <% end %> # - # source://actionview//lib/action_view/helpers/text_helper.rb#382 + # source://actionview//lib/action_view/helpers/text_helper.rb#454 def current_cycle(name = T.unsafe(nil)); end - # Creates a Cycle object whose _to_s_ method cycles through elements of an + # Creates a Cycle object whose +to_s+ method cycles through elements of an # array every time it is called. This can be used for example, to alternate # classes for table rows. You can use named cycles to allow nesting in loops. # Passing a Hash as the last parameter with a :name key will create a @@ -10433,8 +10483,8 @@ module ActionView::Helpers::TextHelper # and passing the name of the cycle. The current cycle string can be obtained # anytime using the current_cycle method. # - # # Alternate CSS classes for even and odd numbers... - # @items = [1,2,3,4] + # <%# Alternate CSS classes for even and odd numbers... %> + # <% @items = [1,2,3,4] %> # # <% @items.each do |item| %> # "> @@ -10444,10 +10494,12 @@ module ActionView::Helpers::TextHelper #
# # - # # Cycle CSS classes for rows, and text colors for values within each row - # @items = x = [{first: 'Robert', middle: 'Daniel', last: 'James'}, - # {first: 'Emily', middle: 'Shannon', maiden: 'Pike', last: 'Hicks'}, - # {first: 'June', middle: 'Dae', last: 'Jones'}] + # <%# Cycle CSS classes for rows, and text colors for values within each row %> + # <% @items = [ + # { first: "Robert", middle: "Daniel", last: "James" }, + # { first: "Emily", middle: "Shannon", maiden: "Pike", last: "Hicks" }, + # { first: "June", middle: "Dae", last: "Jones" }, + # ] %> # <% @items.each do |item| %> # "> # @@ -10462,100 +10514,129 @@ module ActionView::Helpers::TextHelper # # <% end %> # - # source://actionview//lib/action_view/helpers/text_helper.rb#358 + # source://actionview//lib/action_view/helpers/text_helper.rb#430 def cycle(first_value, *values); end - # Extracts an excerpt from +text+ that matches the first instance of +phrase+. - # The :radius option expands the excerpt on each side of the first occurrence of +phrase+ by the number of characters - # defined in :radius (which defaults to 100). If the excerpt radius overflows the beginning or end of the +text+, - # then the :omission option (which defaults to "...") will be prepended/appended accordingly. Use the - # :separator option to choose the delimitation. The resulting string will be stripped in any case. If the +phrase+ - # isn't found, +nil+ is returned. + # Extracts the first occurrence of +phrase+ plus surrounding text from + # +text+. An omission marker is prepended / appended if the start / end of + # the result does not coincide with the start / end of +text+. The result + # is always stripped in any case. Returns +nil+ if +phrase+ isn't found. + # + # ==== Options + # + # [+:radius+] + # The number of characters (or tokens — see +:separator+ option) around + # +phrase+ to include in the result. Defaults to 100. + # + # [+:omission+] + # The marker to prepend / append when the start / end of the excerpt + # does not coincide with the start / end of +text+. Defaults to + # "...". + # + # [+:separator+] + # The separator between tokens to count for +:radius+. Defaults to + # "", which treats each character as a token. + # + # ==== Examples # # excerpt('This is an example', 'an', radius: 5) - # # => ...s is an exam... + # # => "...s is an exam..." # # excerpt('This is an example', 'is', radius: 5) - # # => This is a... + # # => "This is a..." # # excerpt('This is an example', 'is') - # # => This is an example + # # => "This is an example" # # excerpt('This next thing is an example', 'ex', radius: 2) - # # => ...next... + # # => "...next..." # # excerpt('This is also an example', 'an', radius: 8, omission: ' ') - # # => is also an example + # # => " is also an example" # # excerpt('This is a very beautiful morning', 'very', separator: ' ', radius: 1) - # # => ...a very beautiful... + # # => "...a very beautiful..." # - # source://actionview//lib/action_view/helpers/text_helper.rb#179 + # source://actionview//lib/action_view/helpers/text_helper.rb#235 def excerpt(text, phrase, options = T.unsafe(nil)); end - # Highlights one or more +phrases+ everywhere in +text+ by inserting it into - # a :highlighter string. The highlighter can be specialized by passing :highlighter - # as a single-quoted string with \1 where the phrase is to be inserted (defaults to - # \1) or passing a block that receives each matched term. By default +text+ - # is sanitized to prevent possible XSS attacks. If the input is trustworthy, passing false - # for :sanitize will turn sanitizing off. + # Highlights occurrences of +phrases+ in +text+ by formatting them with a + # highlighter string. +phrases+ can be one or more strings or regular + # expressions. The result will be marked HTML safe. By default, +text+ is + # sanitized before highlighting to prevent possible XSS attacks. + # + # If a block is specified, it will be used instead of the highlighter + # string. Each occurrence of a phrase will be passed to the block, and its + # return value will be inserted into the final result. + # + # ==== Options + # + # [+:highlighter+] + # The highlighter string. Uses \1 as the placeholder for a + # phrase, similar to +String#sub+. Defaults to "\1". + # This option is ignored if a block is specified. + # + # [+:sanitize+] + # Whether to sanitize +text+ before highlighting. Defaults to true. + # + # ==== Examples # # highlight('You searched for: rails', 'rails') - # # => You searched for: rails + # # => "You searched for: rails" # # highlight('You searched for: rails', /for|rails/) - # # => You searched for: rails + # # => "You searched for: rails" # # highlight('You searched for: ruby, rails, dhh', 'actionpack') - # # => You searched for: ruby, rails, dhh + # # => "You searched for: ruby, rails, dhh" # # highlight('You searched for: rails', ['for', 'rails'], highlighter: '\1') - # # => You searched for: rails + # # => "You searched for: rails" # # highlight('You searched for: rails', 'rails', highlighter: '\1') - # # => You searched for: rails + # # => "You searched for: rails" # # highlight('You searched for: rails', 'rails') { |match| link_to(search_path(q: match, match)) } - # # => You searched for: rails + # # => "You searched for: rails" # # highlight('ruby on rails', 'rails', sanitize: false) - # # => ruby on rails + # # => "ruby on rails" # - # source://actionview//lib/action_view/helpers/text_helper.rb#136 + # source://actionview//lib/action_view/helpers/text_helper.rb#174 def highlight(text, phrases, options = T.unsafe(nil), &block); end # Attempts to pluralize the +singular+ word unless +count+ is 1. If # +plural+ is supplied, it will use that when count is > 1, otherwise # it will use the Inflector to determine the plural form for the given locale, - # which defaults to I18n.locale + # which defaults to +I18n.locale+. # # The word will be pluralized using rules defined for the locale # (you must define your own inflection rules for languages other than English). # See ActiveSupport::Inflector.pluralize # # pluralize(1, 'person') - # # => 1 person + # # => "1 person" # # pluralize(2, 'person') - # # => 2 people + # # => "2 people" # # pluralize(3, 'person', plural: 'users') - # # => 3 users + # # => "3 users" # # pluralize(0, 'person') - # # => 0 people + # # => "0 people" # # pluralize(2, 'Person', locale: :de) - # # => 2 Personen + # # => "2 Personen" # - # source://actionview//lib/action_view/helpers/text_helper.rb#234 + # source://actionview//lib/action_view/helpers/text_helper.rb#290 def pluralize(count, singular, plural_arg = T.unsafe(nil), plural: T.unsafe(nil), locale: T.unsafe(nil)); end # Resets a cycle so that it starts from the first element the next time # it is called. Pass in +name+ to reset a named cycle. # - # # Alternate CSS classes for even and odd numbers... - # @items = [[1,2,3,4], [5,6,3], [3,4,5,6,7,4]] + # <%# Alternate CSS classes for even and odd numbers... %> + # <% @items = [[1,2,3,4], [5,6,3], [3,4,5,6,7,4]] %> # # <% @items.each do |item| %> # "> @@ -10570,10 +10651,10 @@ module ActionView::Helpers::TextHelper # <% end %> #
# - # source://actionview//lib/action_view/helpers/text_helper.rb#405 + # source://actionview//lib/action_view/helpers/text_helper.rb#477 def reset_cycle(name = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/text_helper.rb#62 + # source://actionview//lib/action_view/helpers/text_helper.rb#67 def safe_concat(string); end # Returns +text+ transformed into HTML using simple formatting rules. @@ -10588,6 +10669,7 @@ module ActionView::Helpers::TextHelper # # ==== Options # * :sanitize - If +false+, does not sanitize +text+. + # * :sanitize_options - Any extra options you want appended to the sanitize. # * :wrapper_tag - String representing the wrapper tag, defaults to "p" # # ==== Examples @@ -10613,20 +10695,42 @@ module ActionView::Helpers::TextHelper # simple_format("Blinkable! It's true.", {}, sanitize: false) # # => "

Blinkable! It's true.

" # - # source://actionview//lib/action_view/helpers/text_helper.rb#306 + # simple_format("Continue", {}, { sanitize_options: { attributes: %w[target href] } }) + # # => "

Continue

" + # + # source://actionview//lib/action_view/helpers/text_helper.rb#376 def simple_format(text, html_options = T.unsafe(nil), options = T.unsafe(nil)); end - # Truncates a given +text+ after a given :length if +text+ is longer than :length - # (defaults to 30). The last characters will be replaced with the :omission (defaults to "...") - # for a total length not exceeding :length. + # Truncates +text+ if it is longer than a specified +:length+. If +text+ + # is truncated, an omission marker will be appended to the result for a + # total length not exceeding +:length+. + # + # You can also pass a block to render and append extra content after the + # omission marker when +text+ is truncated. However, this content _can_ + # cause the total length to exceed +:length+ characters. + # + # The result will be escaped unless escape: false is specified. + # In any case, the result will be marked HTML-safe. Care should be taken + # if +text+ might contain HTML tags or entities, because truncation could + # produce invalid HTML, such as unbalanced or incomplete tags. + # + # ==== Options + # + # [+:length+] + # The maximum number of characters that should be returned, excluding + # any extra content from the block. Defaults to 30. # - # Pass a :separator to truncate +text+ at a natural break. + # [+:omission+] + # The string to append after truncating. Defaults to "...". # - # Pass a block if you want to show extra content when the text is truncated. + # [+:separator+] + # A string or regexp used to find a breaking point at which to truncate. + # By default, truncation can occur at any character in +text+. # - # The result is marked as HTML-safe, but it is escaped by default, unless :escape is - # +false+. Care should be taken if +text+ contains HTML tags or entities, because truncation - # may produce invalid HTML (such as unbalanced or incomplete tags). + # [+:escape+] + # Whether to escape the result. Defaults to true. + # + # ==== Examples # # truncate("Once upon a time in a world far far away") # # => "Once upon a time in a world..." @@ -10647,9 +10751,9 @@ module ActionView::Helpers::TextHelper # # => "

Once upon a time in a wo..." # # truncate("Once upon a time in a world far far away") { link_to "Continue", "#" } - # # => "Once upon a time in a wo...Continue" + # # => "Once upon a time in a world...Continue" # - # source://actionview//lib/action_view/helpers/text_helper.rb#98 + # source://actionview//lib/action_view/helpers/text_helper.rb#122 def truncate(text, options = T.unsafe(nil), &block); end # Wraps the +text+ into lines no longer than +line_width+ width. This method @@ -10657,77 +10761,79 @@ module ActionView::Helpers::TextHelper # (which is 80 by default). # # word_wrap('Once upon a time') - # # => Once upon a time + # # => "Once upon a time" # # word_wrap('Once upon a time, in a kingdom called Far Far Away, a king fell ill, and finding a successor to the throne turned out to be more trouble than anyone could have imagined...') - # # => Once upon a time, in a kingdom called Far Far Away, a king fell ill, and finding\na successor to the throne turned out to be more trouble than anyone could have\nimagined... + # # => "Once upon a time, in a kingdom called Far Far Away, a king fell ill, and finding\na successor to the throne turned out to be more trouble than anyone could have\nimagined..." # # word_wrap('Once upon a time', line_width: 8) - # # => Once\nupon a\ntime + # # => "Once\nupon a\ntime" # # word_wrap('Once upon a time', line_width: 1) - # # => Once\nupon\na\ntime + # # => "Once\nupon\na\ntime" # - # You can also specify a custom +break_sequence+ ("\n" by default) + # You can also specify a custom +break_sequence+ ("\n" by default): # # word_wrap('Once upon a time', line_width: 1, break_sequence: "\r\n") - # # => Once\r\nupon\r\na\r\ntime + # # => "Once\r\nupon\r\na\r\ntime" # - # source://actionview//lib/action_view/helpers/text_helper.rb#264 + # source://actionview//lib/action_view/helpers/text_helper.rb#320 def word_wrap(text, line_width: T.unsafe(nil), break_sequence: T.unsafe(nil)); end private - # source://actionview//lib/action_view/helpers/text_helper.rb#468 + # source://actionview//lib/action_view/helpers/text_helper.rb#540 def cut_excerpt_part(part_position, part, separator, options); end # The cycle helpers need to store the cycles in a place that is # guaranteed to be reset every time a page is rendered, so it # uses an instance variable of ActionView::Base. # - # source://actionview//lib/action_view/helpers/text_helper.rb#450 + # source://actionview//lib/action_view/helpers/text_helper.rb#522 def get_cycle(name); end - # source://actionview//lib/action_view/helpers/text_helper.rb#455 + # source://actionview//lib/action_view/helpers/text_helper.rb#527 def set_cycle(name, cycle_object); end - # source://actionview//lib/action_view/helpers/text_helper.rb#460 + # source://actionview//lib/action_view/helpers/text_helper.rb#532 def split_paragraphs(text); end end -# source://actionview//lib/action_view/helpers/text_helper.rb#410 +# source://actionview//lib/action_view/helpers/text_helper.rb#482 class ActionView::Helpers::TextHelper::Cycle # @return [Cycle] a new instance of Cycle # - # source://actionview//lib/action_view/helpers/text_helper.rb#413 + # source://actionview//lib/action_view/helpers/text_helper.rb#485 def initialize(first_value, *values); end - # source://actionview//lib/action_view/helpers/text_helper.rb#422 + # source://actionview//lib/action_view/helpers/text_helper.rb#494 def current_value; end - # source://actionview//lib/action_view/helpers/text_helper.rb#418 + # source://actionview//lib/action_view/helpers/text_helper.rb#490 def reset; end - # source://actionview//lib/action_view/helpers/text_helper.rb#426 + # source://actionview//lib/action_view/helpers/text_helper.rb#498 def to_s; end # Returns the value of attribute values. # - # source://actionview//lib/action_view/helpers/text_helper.rb#411 + # source://actionview//lib/action_view/helpers/text_helper.rb#483 def values; end private - # source://actionview//lib/action_view/helpers/text_helper.rb#433 + # source://actionview//lib/action_view/helpers/text_helper.rb#505 def next_index; end - # source://actionview//lib/action_view/helpers/text_helper.rb#437 + # source://actionview//lib/action_view/helpers/text_helper.rb#509 def previous_index; end - # source://actionview//lib/action_view/helpers/text_helper.rb#441 + # source://actionview//lib/action_view/helpers/text_helper.rb#513 def step_index(n); end end +# = Action View Translation \Helpers +# # source://actionview//lib/action_view/helpers/translation_helper.rb#9 module ActionView::Helpers::TranslationHelper include ::ActionView::Helpers::CaptureHelper @@ -10884,16 +10990,19 @@ ActionView::Helpers::TranslationHelper::MISSING_TRANSLATION = T.let(T.unsafe(nil # source://actionview//lib/action_view/helpers/translation_helper.rb#125 ActionView::Helpers::TranslationHelper::NO_DEFAULT = T.let(T.unsafe(nil), Array) +# = Action View URL \Helpers +# # Provides a set of methods for making links and getting URLs that # depend on the routing subsystem (see ActionDispatch::Routing). # This allows you to use the same format for links in views # and controllers. # -# source://actionview//lib/action_view/helpers/url_helper.rb#15 +# source://actionview//lib/action_view/helpers/url_helper.rb#17 module ActionView::Helpers::UrlHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods @@ -10901,9 +11010,6 @@ module ActionView::Helpers::UrlHelper # Generates a form containing a single button that submits to the URL created # by the set of +options+. This is the safest method to ensure links that # cause changes to your data are not triggered by search bots or accelerators. - # If the HTML button does not work with your layout, you can also consider - # using the +link_to+ method with the :method modifier as described in - # the +link_to+ documentation. # # You can control the form and button behavior with +html_options+. Most # values in +html_options+ are passed through to the button element. For @@ -10917,6 +11023,10 @@ module ActionView::Helpers::UrlHelper # The form submits a POST request by default. You can specify a different # HTTP verb via the +:method+ option within +html_options+. # + # If the HTML button generated from +button_to+ does not work with your layout, you can + # consider using the +link_to+ method with the +data-turbo-method+ + # attribute as described in the +link_to+ documentation. + # # ==== Options # The +options+ hash accepts the same options as +url_for+. To generate a # element without an [action] attribute, pass @@ -10982,9 +11092,9 @@ module ActionView::Helpers::UrlHelper # # # #

" # - # ==== Deprecated: Rails UJS Attributes + # ==== Deprecated: \Rails UJS Attributes # - # Prior to Rails 7, Rails shipped with a JavaScript library called @rails/ujs on by default. Following Rails 7, + # Prior to \Rails 7, \Rails shipped with a JavaScript library called @rails/ujs on by default. Following \Rails 7, # this library is no longer on by default. This library integrated with the following options: # # * :remote - If set to true, will allow @rails/ujs to control the @@ -11000,7 +11110,7 @@ module ActionView::Helpers::UrlHelper # used as the value for a disabled version of the submit # button when the form is submitted. # - # ===== Rails UJS Examples + # ===== \Rails UJS Examples # # <%= button_to "Create", { action: "create" }, remote: true, form: { "data-type" => "json" } %> # # => "
@@ -11008,18 +11118,18 @@ module ActionView::Helpers::UrlHelper # # # #
" # - # source://actionview//lib/action_view/helpers/url_helper.rb#331 + # source://actionview//lib/action_view/helpers/url_helper.rb#357 def button_to(name = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end - # source://actionview//lib/action_view/helpers/url_helper.rb#32 + # source://actionview//lib/action_view/helpers/url_helper.rb#35 def button_to_generates_button_tag; end - # source://actionview//lib/action_view/helpers/url_helper.rb#32 + # source://actionview//lib/action_view/helpers/url_helper.rb#35 def button_to_generates_button_tag=(val); end # @return [Boolean] # - # source://actionview//lib/action_view/helpers/url_helper.rb#582 + # source://actionview//lib/action_view/helpers/url_helper.rb#609 def current_page?(options = T.unsafe(nil), check_parameters: T.unsafe(nil), **options_as_kwargs); end # Creates an anchor element of the given +name+ using a URL created by the set of +options+. @@ -11055,7 +11165,7 @@ module ActionView::Helpers::UrlHelper # ==== Examples # # Because it relies on +url_for+, +link_to+ supports both older-style controller/action/id arguments - # and newer RESTful routes. Current Rails style favors RESTful routes whenever possible, so base + # and newer RESTful routes. Current \Rails style favors RESTful routes whenever possible, so base # your application on resources and use # # link_to "Profile", profile_path(@profile) @@ -11132,9 +11242,31 @@ module ActionView::Helpers::UrlHelper # link_to "External link", "http://www.rubyonrails.org/", target: "_blank", rel: "nofollow" # # => External link # - # ==== Deprecated: Rails UJS Attributes + # ==== Turbo + # + # Rails 7 ships with Turbo enabled by default. Turbo provides the following +:data+ options: + # + # * turbo_method: symbol of HTTP verb - Performs a Turbo link visit + # with the given HTTP verb. Forms are recommended when performing non-+GET+ requests. + # Only use data-turbo-method where a form is not possible. + # + # * turbo_confirm: "question?" - Adds a confirmation dialog to the link with the + # given value. # - # Prior to Rails 7, Rails shipped with a JavaScript library called @rails/ujs on by default. Following Rails 7, + # {Consult the Turbo Handbook for more information on the options + # above.}[https://turbo.hotwired.dev/handbook/drive#performing-visits-with-a-different-method] + # + # ===== \Examples + # + # link_to "Delete profile", @profile, data: { turbo_method: :delete } + # # => Delete profile + # + # link_to "Visit Other Site", "https://rubyonrails.org/", data: { turbo_confirm: "Are you sure?" } + # # => Visit Other Site + # + # ==== Deprecated: \Rails UJS Attributes + # + # Prior to \Rails 7, \Rails shipped with a JavaScript library called @rails/ujs on by default. Following \Rails 7, # this library is no longer on by default. This library integrated with the following options: # # * method: symbol of HTTP verb - This modifier will dynamically @@ -11160,7 +11292,7 @@ module ActionView::Helpers::UrlHelper # * :disable_with - Value of this parameter will be used as the # name for a disabled version of the link. # - # ===== Rails UJS Examples + # ===== \Rails UJS Examples # # link_to "Remove Profile", profile_path(@profile), method: :delete # # => Remove Profile @@ -11168,7 +11300,7 @@ module ActionView::Helpers::UrlHelper # link_to "Visit Other Site", "http://www.rubyonrails.org/", data: { confirm: "Are you sure?" } # # => Visit Other Site # - # source://actionview//lib/action_view/helpers/url_helper.rb#209 + # source://actionview//lib/action_view/helpers/url_helper.rb#234 def link_to(name = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a link tag of the given +name+ using a URL created by the set of @@ -11191,7 +11323,7 @@ module ActionView::Helpers::UrlHelper # # If they are logged in... # # => my_username # - # source://actionview//lib/action_view/helpers/url_helper.rb#471 + # source://actionview//lib/action_view/helpers/url_helper.rb#498 def link_to_if(condition, name, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a link tag of the given +name+ using a URL created by the set of @@ -11215,7 +11347,7 @@ module ActionView::Helpers::UrlHelper # # If not... # # => Reply # - # source://actionview//lib/action_view/helpers/url_helper.rb#448 + # source://actionview//lib/action_view/helpers/url_helper.rb#475 def link_to_unless(condition, name, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a link tag of the given +name+ using a URL created by the set of @@ -11257,7 +11389,7 @@ module ActionView::Helpers::UrlHelper # end # %> # - # source://actionview//lib/action_view/helpers/url_helper.rb#424 + # source://actionview//lib/action_view/helpers/url_helper.rb#451 def link_to_unless_current(name, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a mailto link tag to the specified +email_address+, which is @@ -11275,7 +11407,7 @@ module ActionView::Helpers::UrlHelper # * :reply_to - Preset the +Reply-To+ field of the email. # # ==== Obfuscation - # Prior to Rails 4.0, +mail_to+ provided options for encoding the address + # Prior to \Rails 4.0, +mail_to+ provided options for encoding the address # in order to hinder email harvesters. To take advantage of these options, # install the +actionview-encoded_mail_to+ gem. # @@ -11299,7 +11431,7 @@ module ActionView::Helpers::UrlHelper # Email me: me@domain.com # # - # source://actionview//lib/action_view/helpers/url_helper.rb#521 + # source://actionview//lib/action_view/helpers/url_helper.rb#548 def mail_to(email_address, name = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a TEL anchor link tag to the specified +phone_number+. When the @@ -11338,7 +11470,7 @@ module ActionView::Helpers::UrlHelper # Phone me: # # - # source://actionview//lib/action_view/helpers/url_helper.rb#716 + # source://actionview//lib/action_view/helpers/url_helper.rb#743 def phone_to(phone_number, name = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates an SMS anchor link tag to the specified +phone_number+. When the @@ -11382,45 +11514,45 @@ module ActionView::Helpers::UrlHelper # Text me: # # - # source://actionview//lib/action_view/helpers/url_helper.rb#665 + # source://actionview//lib/action_view/helpers/url_helper.rb#692 def sms_to(phone_number, name = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Basic implementation of url_for to allow use helpers without routes existence # - # source://actionview//lib/action_view/helpers/url_helper.rb#35 + # source://actionview//lib/action_view/helpers/url_helper.rb#38 def url_for(options = T.unsafe(nil)); end private - # source://actionview//lib/action_view/helpers/url_helper.rb#47 + # source://actionview//lib/action_view/helpers/url_helper.rb#50 def _back_url; end - # source://actionview//lib/action_view/helpers/url_helper.rb#52 + # source://actionview//lib/action_view/helpers/url_helper.rb#55 def _filtered_referrer; end - # source://actionview//lib/action_view/helpers/url_helper.rb#759 + # source://actionview//lib/action_view/helpers/url_helper.rb#786 def add_method_to_attributes!(html_options, method); end - # source://actionview//lib/action_view/helpers/url_helper.rb#730 + # source://actionview//lib/action_view/helpers/url_helper.rb#757 def convert_options_to_data_attributes(options, html_options); end # @return [Boolean] # - # source://actionview//lib/action_view/helpers/url_helper.rb#753 + # source://actionview//lib/action_view/helpers/url_helper.rb#780 def link_to_remote_options?(options); end - # source://actionview//lib/action_view/helpers/url_helper.rb#770 + # source://actionview//lib/action_view/helpers/url_helper.rb#797 def method_for_options(options); end # @return [Boolean] # - # source://actionview//lib/action_view/helpers/url_helper.rb#788 + # source://actionview//lib/action_view/helpers/url_helper.rb#815 def method_not_get_method?(method); end - # source://actionview//lib/action_view/helpers/url_helper.rb#807 + # source://actionview//lib/action_view/helpers/url_helper.rb#834 def method_tag(method); end - # source://actionview//lib/action_view/helpers/url_helper.rb#853 + # source://actionview//lib/action_view/helpers/url_helper.rb#880 def remove_trailing_slash!(url_string); end # Returns an array of hashes each containing :name and :value keys @@ -11440,20 +11572,20 @@ module ActionView::Helpers::UrlHelper # to_form_params({ name: 'Denmark' }, 'country') # # => [{name: 'country[name]', value: 'Denmark'}] # - # source://actionview//lib/action_view/helpers/url_helper.rb#827 + # source://actionview//lib/action_view/helpers/url_helper.rb#854 def to_form_params(attribute, namespace = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/url_helper.rb#793 + # source://actionview//lib/action_view/helpers/url_helper.rb#820 def token_tag(token = T.unsafe(nil), form_options: T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/url_helper.rb#745 + # source://actionview//lib/action_view/helpers/url_helper.rb#772 def url_target(name, options); end class << self - # source://actionview//lib/action_view/helpers/url_helper.rb#32 + # source://actionview//lib/action_view/helpers/url_helper.rb#35 def button_to_generates_button_tag; end - # source://actionview//lib/action_view/helpers/url_helper.rb#32 + # source://actionview//lib/action_view/helpers/url_helper.rb#35 def button_to_generates_button_tag=(val); end end end @@ -11464,16 +11596,16 @@ end # (link_to_unless_current, for instance), which must be provided # as a method called #request on the context. # -# source://actionview//lib/action_view/helpers/url_helper.rb#21 +# source://actionview//lib/action_view/helpers/url_helper.rb#23 ActionView::Helpers::UrlHelper::BUTTON_TAG_METHOD_VERBS = T.let(T.unsafe(nil), Array) -# source://actionview//lib/action_view/helpers/url_helper.rb#26 +# source://actionview//lib/action_view/helpers/url_helper.rb#29 module ActionView::Helpers::UrlHelper::ClassMethods - # source://actionview//lib/action_view/helpers/url_helper.rb#27 + # source://actionview//lib/action_view/helpers/url_helper.rb#30 def _url_for_modules; end end -# source://actionview//lib/action_view/helpers/url_helper.rb#780 +# source://actionview//lib/action_view/helpers/url_helper.rb#807 ActionView::Helpers::UrlHelper::STRINGIFIED_COMMON_METHODS = T.let(T.unsafe(nil), Hash) # This is a class to fix I18n global state. Whenever you provide I18n.locale during a request, @@ -11486,10 +11618,10 @@ class ActionView::I18nProxy < ::I18n::Config # source://actionview//lib/action_view/rendering.rb#11 def initialize(original_config, lookup_context); end - # source://actionview//lib/action_view/rendering.rb#16 + # source://actionview//lib/action_view/rendering.rb#17 def locale; end - # source://actionview//lib/action_view/rendering.rb#20 + # source://actionview//lib/action_view/rendering.rb#21 def locale=(value); end # source://actionview//lib/action_view/rendering.rb#9 @@ -11499,12 +11631,14 @@ class ActionView::I18nProxy < ::I18n::Config def original_config; end end +# = Action View \Layouts +# # Layouts reverse the common pattern of including shared headers and footers in many templates to isolate changes in # repeated setups. The inclusion pattern has pages that look like this: # -# <%= render "shared/header" %> +# <%= render "application/header" %> # Hello World -# <%= render "shared/footer" %> +# <%= render "application/footer" %> # # This approach is a decent way of keeping common structures isolated from the changing content, but it's verbose # and if you ever want to change the structure of these two includes, you'll have to change all the templates. @@ -11645,7 +11779,7 @@ end # The template will be looked always in app/views/layouts/ folder. But you can point # layouts folder direct also. layout "layouts/demo" is the same as layout "demo". # -# Setting the layout to +nil+ forces it to be looked up in the filesystem and fallbacks to the parent behavior if none exists. +# Setting the layout to +nil+ forces it to be looked up in the filesystem and falls back to the parent behavior if none exists. # Setting it to +nil+ is useful to re-enable template lookup overriding a previous configuration set in the parent: # # class ApplicationController < ActionController::Base @@ -11657,7 +11791,7 @@ end # end # # class CommentsController < ApplicationController -# # Will search for "comments" layout and fallback "application" layout +# # Will search for "comments" layout and fall back to "application" layout # layout nil # end # @@ -11696,7 +11830,7 @@ end # # This will override the controller-wide "weblog_standard" layout, and will render the help action with the "help" layout instead. # -# source://actionview//lib/action_view/layouts.rb#203 +# source://actionview//lib/action_view/layouts.rb#205 module ActionView::Layouts extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -11708,13 +11842,10 @@ module ActionView::Layouts mixes_in_class_methods ::ActionView::Rendering::ClassMethods mixes_in_class_methods ::ActionView::Layouts::ClassMethods - # source://actionview//lib/action_view/layouts.rb#361 + # source://actionview//lib/action_view/layouts.rb#363 def initialize(*_arg0); end - # source://actionview//lib/action_view/layouts.rb#215 - def _layout_conditions(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/layouts.rb#350 + # source://actionview//lib/action_view/layouts.rb#352 def _normalize_options(options); end def action_has_layout=(_arg0); end @@ -11728,14 +11859,14 @@ module ActionView::Layouts # # @return [Boolean] # - # source://actionview//lib/action_view/layouts.rb#372 + # source://actionview//lib/action_view/layouts.rb#374 def action_has_layout?; end private # @return [Boolean] # - # source://actionview//lib/action_view/layouts.rb#377 + # source://actionview//lib/action_view/layouts.rb#379 def _conditional_layout?; end # Returns the default layout for this controller. @@ -11749,17 +11880,17 @@ module ActionView::Layouts # ==== Returns # * template - The template object for the default layout (or +nil+) # - # source://actionview//lib/action_view/layouts.rb#415 + # source://actionview//lib/action_view/layouts.rb#417 def _default_layout(lookup_context, formats, require_layout = T.unsafe(nil)); end # @return [Boolean] # - # source://actionview//lib/action_view/layouts.rb#430 + # source://actionview//lib/action_view/layouts.rb#432 def _include_layout?(options); end # This will be overwritten by _write_layout_method # - # source://actionview//lib/action_view/layouts.rb#382 + # source://actionview//lib/action_view/layouts.rb#384 def _layout(*_arg0); end # Determine the layout for a given name, taking into account the name type. @@ -11767,10 +11898,10 @@ module ActionView::Layouts # ==== Parameters # * name - The name of the template # - # source://actionview//lib/action_view/layouts.rb#388 + # source://actionview//lib/action_view/layouts.rb#390 def _layout_for_option(name); end - # source://actionview//lib/action_view/layouts.rb#401 + # source://actionview//lib/action_view/layouts.rb#403 def _normalize_layout(value); end module GeneratedClassMethods @@ -11785,17 +11916,17 @@ module ActionView::Layouts module GeneratedInstanceMethods; end end -# source://actionview//lib/action_view/layouts.rb#217 +# source://actionview//lib/action_view/layouts.rb#219 module ActionView::Layouts::ClassMethods # Creates a _layout method to be called by _default_layout . # # If a layout is not explicitly mentioned then look for a layout with the controller's name. # if nothing is found then try same procedure to find super class's layout. # - # source://actionview//lib/action_view/layouts.rb#283 + # source://actionview//lib/action_view/layouts.rb#285 def _write_layout_method; end - # source://actionview//lib/action_view/layouts.rb#218 + # source://actionview//lib/action_view/layouts.rb#220 def inherited(klass); end # Specify the layout to use for this class. @@ -11820,7 +11951,7 @@ module ActionView::Layouts::ClassMethods # * +:only+ - A list of actions to apply this layout to. # * +:except+ - Apply this layout to all actions but this one. # - # source://actionview//lib/action_view/layouts.rb#269 + # source://actionview//lib/action_view/layouts.rb#271 def layout(layout, conditions = T.unsafe(nil)); end private @@ -11831,14 +11962,14 @@ module ActionView::Layouts::ClassMethods # ==== Returns # * String - A template name # - # source://actionview//lib/action_view/layouts.rb#345 + # source://actionview//lib/action_view/layouts.rb#347 def _implied_layout_name; end end # This module is mixed in if layout conditions are provided. This means # that if no layout conditions are used, this method is not used # -# source://actionview//lib/action_view/layouts.rb#225 +# source://actionview//lib/action_view/layouts.rb#227 module ActionView::Layouts::ClassMethods::LayoutConditions private @@ -11851,59 +11982,76 @@ module ActionView::Layouts::ClassMethods::LayoutConditions # # @return [Boolean] # - # source://actionview//lib/action_view/layouts.rb#233 + # source://actionview//lib/action_view/layouts.rb#235 def _conditional_layout?; end end # = Action View Log Subscriber # -# Provides functionality so that Rails can output logs from Action View. +# Provides functionality so that \Rails can output logs from Action View. # # source://actionview//lib/action_view/log_subscriber.rb#9 class ActionView::LogSubscriber < ::ActiveSupport::LogSubscriber + include ::ActionView::LogSubscriber::Utils + # @return [LogSubscriber] a new instance of LogSubscriber # # source://actionview//lib/action_view/log_subscriber.rb#12 def initialize; end - # source://actionview//lib/action_view/log_subscriber.rb#59 - def logger; end - - # source://actionview//lib/action_view/log_subscriber.rb#42 + # source://actionview//lib/action_view/log_subscriber.rb#45 def render_collection(event); end - # source://actionview//lib/action_view/log_subscriber.rb#35 + # source://actionview//lib/action_view/log_subscriber.rb#37 def render_layout(event); end - # source://actionview//lib/action_view/log_subscriber.rb#25 + # source://actionview//lib/action_view/log_subscriber.rb#26 def render_partial(event); end # source://actionview//lib/action_view/log_subscriber.rb#17 def render_template(event); end - # source://actionview//lib/action_view/log_subscriber.rb#53 - def start(name, id, payload); end - private - # source://actionview//lib/action_view/log_subscriber.rb#83 + # source://actionview//lib/action_view/log_subscriber.rb#117 def cache_message(payload); end - # source://actionview//lib/action_view/log_subscriber.rb#65 - def from_rails_root(string); end + # source://actionview//lib/action_view/log_subscriber.rb#109 + def render_count(payload); end - # source://actionview//lib/action_view/log_subscriber.rb#92 - def log_rendering_start(payload, name); end + class << self + # source://actionview//lib/action_view/log_subscriber.rb#101 + def attach_to(*_arg0); end - # source://actionview//lib/action_view/log_subscriber.rb#71 - def rails_root; end + # source://activesupport/7.1.3.2/lib/active_support/log_subscriber.rb#87 + def log_levels; end + end +end - # source://actionview//lib/action_view/log_subscriber.rb#75 - def render_count(payload); end +# source://actionview//lib/action_view/log_subscriber.rb#76 +class ActionView::LogSubscriber::Start + include ::ActionView::LogSubscriber::Utils + + # source://actionview//lib/action_view/log_subscriber.rb#97 + def finish(name, id, payload); end + + # source://actionview//lib/action_view/log_subscriber.rb#79 + def start(name, id, payload); end end -# source://actionview//lib/action_view/log_subscriber.rb#64 -ActionView::LogSubscriber::EMPTY = T.let(T.unsafe(nil), String) +# source://actionview//lib/action_view/log_subscriber.rb#57 +module ActionView::LogSubscriber::Utils + # source://actionview//lib/action_view/log_subscriber.rb#58 + def logger; end + + private + + # source://actionview//lib/action_view/log_subscriber.rb#63 + def from_rails_root(string); end + + # source://actionview//lib/action_view/log_subscriber.rb#69 + def rails_root; end +end # source://actionview//lib/action_view/log_subscriber.rb#10 ActionView::LogSubscriber::VIEWS_PATTERN = T.let(T.unsafe(nil), Regexp) @@ -11924,28 +12072,28 @@ class ActionView::LookupContext # @return [LookupContext] a new instance of LookupContext # - # source://actionview//lib/action_view/lookup_context.rb#216 + # source://actionview//lib/action_view/lookup_context.rb#232 def initialize(view_paths, details = T.unsafe(nil), prefixes = T.unsafe(nil)); end - # source://actionview//lib/action_view/lookup_context.rb#226 + # source://actionview//lib/action_view/lookup_context.rb#242 def digest_cache; end # Override formats= to expand ["*/*"] values and automatically # add :html as fallback to :js. # - # source://actionview//lib/action_view/lookup_context.rb#247 + # source://actionview//lib/action_view/lookup_context.rb#263 def formats=(values); end # Override locale to return a symbol instead of array. # - # source://actionview//lib/action_view/lookup_context.rb#267 + # source://actionview//lib/action_view/lookup_context.rb#283 def locale; end # Overload locale= to also set the I18n.locale. If the current I18n.config object responds # to original_config, it means that it has a copy of the original I18n configuration and it's # acting as proxy, which we need to skip. # - # source://actionview//lib/action_view/lookup_context.rb#274 + # source://actionview//lib/action_view/lookup_context.rb#290 def locale=(value); end # source://actionview//lib/action_view/lookup_context.rb#16 @@ -11954,18 +12102,12 @@ class ActionView::LookupContext # source://actionview//lib/action_view/lookup_context.rb#16 def prefixes=(_arg0); end - # source://actionview//lib/action_view/lookup_context.rb#16 - def rendered_format; end - - # source://actionview//lib/action_view/lookup_context.rb#16 - def rendered_format=(_arg0); end - - # source://actionview//lib/action_view/lookup_context.rb#230 + # source://actionview//lib/action_view/lookup_context.rb#246 def with_prepended_formats(formats); end private - # source://actionview//lib/action_view/lookup_context.rb#237 + # source://actionview//lib/action_view/lookup_context.rb#253 def initialize_details(target, details); end class << self @@ -12026,34 +12168,34 @@ ActionView::LookupContext::Accessors::DEFAULT_PROCS = T.let(T.unsafe(nil), Hash) # Add caching behavior on top of Details. # -# source://actionview//lib/action_view/lookup_context.rb#94 +# source://actionview//lib/action_view/lookup_context.rb#98 module ActionView::LookupContext::DetailsCache # Returns the value of attribute cache. # - # source://actionview//lib/action_view/lookup_context.rb#95 + # source://actionview//lib/action_view/lookup_context.rb#99 def cache; end # Sets the attribute cache # # @param value the value to set the attribute cache to. # - # source://actionview//lib/action_view/lookup_context.rb#95 + # source://actionview//lib/action_view/lookup_context.rb#99 def cache=(_arg0); end # Calculate the details key. Remove the handlers from calculation to improve performance # since the user cannot modify it explicitly. # - # source://actionview//lib/action_view/lookup_context.rb#99 + # source://actionview//lib/action_view/lookup_context.rb#103 def details_key; end # Temporary skip passing the details_key forward. # - # source://actionview//lib/action_view/lookup_context.rb#104 + # source://actionview//lib/action_view/lookup_context.rb#108 def disable_cache; end private - # source://actionview//lib/action_view/lookup_context.rb#112 + # source://actionview//lib/action_view/lookup_context.rb#116 def _set_detail(key, value); end end @@ -12062,7 +12204,7 @@ class ActionView::LookupContext::DetailsKey def eql?(_arg0); end class << self - # source://actionview//lib/action_view/lookup_context.rb#73 + # source://actionview//lib/action_view/lookup_context.rb#77 def clear; end # source://actionview//lib/action_view/lookup_context.rb#65 @@ -12071,55 +12213,61 @@ class ActionView::LookupContext::DetailsKey # source://actionview//lib/action_view/lookup_context.rb#61 def digest_cache(details); end - # source://actionview//lib/action_view/lookup_context.rb#82 + # source://actionview//lib/action_view/lookup_context.rb#86 def digest_caches; end - # source://actionview//lib/action_view/lookup_context.rb#86 - def view_context_class(klass); end + # source://actionview//lib/action_view/lookup_context.rb#90 + def view_context_class; end end end # Helpers related to template lookup using the lookup context information. # -# source://actionview//lib/action_view/lookup_context.rb#121 +# source://actionview//lib/action_view/lookup_context.rb#125 module ActionView::LookupContext::ViewPaths # @return [Boolean] # - # source://actionview//lib/action_view/lookup_context.rb#144 + # source://actionview//lib/action_view/lookup_context.rb#148 def any?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end # @return [Boolean] # - # source://actionview//lib/action_view/lookup_context.rb#144 + # source://actionview//lib/action_view/lookup_context.rb#148 def any_templates?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end + # source://actionview//lib/action_view/lookup_context.rb#155 + def append_view_paths(paths); end + # @return [Boolean] # - # source://actionview//lib/action_view/lookup_context.rb#137 + # source://actionview//lib/action_view/lookup_context.rb#141 def exists?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), **options); end - # source://actionview//lib/action_view/lookup_context.rb#124 + # source://actionview//lib/action_view/lookup_context.rb#128 def find(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actionview//lib/action_view/lookup_context.rb#131 + # source://actionview//lib/action_view/lookup_context.rb#135 def find_all(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actionview//lib/action_view/lookup_context.rb#124 + # source://actionview//lib/action_view/lookup_context.rb#128 def find_template(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end # Returns the value of attribute html_fallback_for_js. # - # source://actionview//lib/action_view/lookup_context.rb#122 + # source://actionview//lib/action_view/lookup_context.rb#126 def html_fallback_for_js; end + # source://actionview//lib/action_view/lookup_context.rb#159 + def prepend_view_paths(paths); end + # @return [Boolean] # - # source://actionview//lib/action_view/lookup_context.rb#137 + # source://actionview//lib/action_view/lookup_context.rb#141 def template_exists?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), **options); end # Returns the value of attribute view_paths. # - # source://actionview//lib/action_view/lookup_context.rb#122 + # source://actionview//lib/action_view/lookup_context.rb#126 def view_paths; end private @@ -12127,30 +12275,30 @@ module ActionView::LookupContext::ViewPaths # Whenever setting view paths, makes a copy so that we can manipulate them in # instance objects as we wish. # - # source://actionview//lib/action_view/lookup_context.rb#154 + # source://actionview//lib/action_view/lookup_context.rb#166 def build_view_paths(paths); end # Compute details hash and key according to user options (e.g. passed from #render). # - # source://actionview//lib/action_view/lookup_context.rb#159 + # source://actionview//lib/action_view/lookup_context.rb#175 def detail_args_for(options); end - # source://actionview//lib/action_view/lookup_context.rb#172 + # source://actionview//lib/action_view/lookup_context.rb#188 def detail_args_for_any; end # Fix when prefix is specified as part of the template name # - # source://actionview//lib/action_view/lookup_context.rb#193 + # source://actionview//lib/action_view/lookup_context.rb#209 def normalize_name(name, prefixes); end end -# source://actionview//lib/action_view/template/error.rb#29 +# source://actionview//lib/action_view/template/error.rb#30 class ActionView::MissingTemplate < ::ActionView::ActionViewError include ::DidYouMean::Correctable # @return [MissingTemplate] a new instance of MissingTemplate # - # source://actionview//lib/action_view/template/error.rb#32 + # source://actionview//lib/action_view/template/error.rb#33 def initialize(paths, path, prefixes, partial, details, *_arg5); end # Apps may have thousands of candidate templates so we attempt to @@ -12158,50 +12306,50 @@ class ActionView::MissingTemplate < ::ActionView::ActionViewError # First we split templates into prefixes and basenames, so that those can # be matched separately. # - # source://actionview//lib/action_view/template/error.rb#92 + # source://actionview//lib/action_view/template/error.rb#93 def corrections; end # Returns the value of attribute partial. # - # source://actionview//lib/action_view/template/error.rb#30 + # source://actionview//lib/action_view/template/error.rb#31 def partial; end # Returns the value of attribute path. # - # source://actionview//lib/action_view/template/error.rb#30 + # source://actionview//lib/action_view/template/error.rb#31 def path; end # Returns the value of attribute paths. # - # source://actionview//lib/action_view/template/error.rb#30 + # source://actionview//lib/action_view/template/error.rb#31 def paths; end # Returns the value of attribute prefixes. # - # source://actionview//lib/action_view/template/error.rb#30 + # source://actionview//lib/action_view/template/error.rb#31 def prefixes; end end -# source://actionview//lib/action_view/template/error.rb#59 +# source://actionview//lib/action_view/template/error.rb#60 class ActionView::MissingTemplate::Results # @return [Results] a new instance of Results # - # source://actionview//lib/action_view/template/error.rb#62 + # source://actionview//lib/action_view/template/error.rb#63 def initialize(size); end - # source://actionview//lib/action_view/template/error.rb#79 + # source://actionview//lib/action_view/template/error.rb#80 def add(path, score); end # @return [Boolean] # - # source://actionview//lib/action_view/template/error.rb#71 + # source://actionview//lib/action_view/template/error.rb#72 def should_record?(score); end - # source://actionview//lib/action_view/template/error.rb#67 + # source://actionview//lib/action_view/template/error.rb#68 def to_a; end end -# source://actionview//lib/action_view/template/error.rb#60 +# source://actionview//lib/action_view/template/error.rb#61 class ActionView::MissingTemplate::Results::Result < ::Struct # Returns the value of attribute path # @@ -12285,23 +12433,80 @@ end # puts sbuf # => "hello\u0005" # # source://actionview//lib/action_view/buffers.rb#21 -class ActionView::OutputBuffer < ::ActiveSupport::SafeBuffer +class ActionView::OutputBuffer # @return [OutputBuffer] a new instance of OutputBuffer # # source://actionview//lib/action_view/buffers.rb#22 - def initialize(*_arg0); end + def initialize(buffer = T.unsafe(nil)); end - # source://actionview//lib/action_view/buffers.rb#27 + # source://actionview//lib/action_view/buffers.rb#42 def <<(value); end - # source://actionview//lib/action_view/buffers.rb#27 + # source://actionview//lib/action_view/buffers.rb#81 + def ==(other); end + + # source://actionview//lib/action_view/buffers.rb#42 def append=(value); end - # source://activesupport/7.0.6/lib/active_support/core_ext/string/output_safety.rb#195 + # source://actionview//lib/action_view/buffers.rb#27 + def blank?(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#72 + def capture(*args); end + + # source://actionview//lib/action_view/buffers.rb#42 + def concat(value); end + + # source://actionview//lib/action_view/buffers.rb#27 + def empty?(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#27 + def encode!(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#27 + def encoding(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#27 + def force_encoding(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#29 + def html_safe; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/buffers.rb#38 + def html_safe?; end + + # source://actionview//lib/action_view/buffers.rb#27 + def length(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#85 + def raw; end + + # Returns the value of attribute raw_buffer. + # + # source://actionview//lib/action_view/buffers.rb#89 + def raw_buffer; end + + # source://actionview//lib/action_view/buffers.rb#56 def safe_append=(value); end - # source://actionview//lib/action_view/buffers.rb#33 + # source://actionview//lib/action_view/buffers.rb#56 + def safe_concat(value); end + + # source://actionview//lib/action_view/buffers.rb#62 def safe_expr_append=(val); end + + # source://actionview//lib/action_view/buffers.rb#29 + def to_s; end + + # source://actionview//lib/action_view/buffers.rb#34 + def to_str; end + + private + + # source://actionview//lib/action_view/buffers.rb#68 + def initialize_copy(other); end end # source://actionview//lib/action_view/flows.rb#6 @@ -12607,7 +12812,7 @@ class ActionView::PartialRenderer < ::ActionView::AbstractRenderer private - # source://actionview//lib/action_view/renderer/partial_renderer.rb#261 + # source://actionview//lib/action_view/renderer/partial_renderer.rb#262 def find_template(path, locals); end # source://actionview//lib/action_view/renderer/partial_renderer.rb#245 @@ -12625,6 +12830,31 @@ class ActionView::PartialRenderer < ::ActionView::AbstractRenderer end end +# source://actionview//lib/action_view/path_registry.rb#4 +module ActionView::PathRegistry + class << self + # source://actionview//lib/action_view/path_registry.rb#53 + def all_file_system_resolvers; end + + # source://actionview//lib/action_view/path_registry.rb#47 + def all_resolvers; end + + # source://actionview//lib/action_view/path_registry.rb#22 + def cast_file_system_resolvers(paths); end + + # Returns the value of attribute file_system_resolver_hooks. + # + # source://actionview//lib/action_view/path_registry.rb#11 + def file_system_resolver_hooks; end + + # source://actionview//lib/action_view/path_registry.rb#14 + def get_view_paths(klass); end + + # source://actionview//lib/action_view/path_registry.rb#18 + def set_view_paths(klass, paths); end + end +end + # = Action View PathSet # # This class is used to store and access paths in Action View. A number of @@ -12643,10 +12873,7 @@ class ActionView::PathSet def initialize(paths = T.unsafe(nil)); end # source://actionview//lib/action_view/path_set.rb#35 - def +(array); end - - # source://actionview//lib/action_view/path_set.rb#41 - def <<(*args); end + def +(other); end # source://actionview//lib/action_view/path_set.rb#16 def [](*_arg0, **_arg1, &_arg2); end @@ -12654,58 +12881,43 @@ class ActionView::PathSet # source://actionview//lib/action_view/path_set.rb#31 def compact; end - # source://actionview//lib/action_view/path_set.rb#41 - def concat(*args); end - # source://actionview//lib/action_view/path_set.rb#16 def each(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://actionview//lib/action_view/path_set.rb#60 + # source://actionview//lib/action_view/path_set.rb#53 def exists?(path, prefixes, partial, details, details_key, locals); end - # source://actionview//lib/action_view/path_set.rb#47 + # source://actionview//lib/action_view/path_set.rb#40 def find(path, prefixes, partial, details, details_key, locals); end - # source://actionview//lib/action_view/path_set.rb#52 + # source://actionview//lib/action_view/path_set.rb#45 def find_all(path, prefixes, partial, details, details_key, locals); end # source://actionview//lib/action_view/path_set.rb#16 def include?(*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/path_set.rb#41 - def insert(*args); end - # Returns the value of attribute paths. # # source://actionview//lib/action_view/path_set.rb#14 def paths; end - # source://actionview//lib/action_view/path_set.rb#16 - def pop(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/path_set.rb#41 - def push(*args); end - # source://actionview//lib/action_view/path_set.rb#16 def size(*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/path_set.rb#27 def to_ary; end - # source://actionview//lib/action_view/path_set.rb#41 - def unshift(*args); end - private # source://actionview//lib/action_view/path_set.rb#22 def initialize_copy(other); end - # source://actionview//lib/action_view/path_set.rb#65 + # source://actionview//lib/action_view/path_set.rb#58 def search_combinations(prefixes); end - # source://actionview//lib/action_view/path_set.rb#74 + # source://actionview//lib/action_view/path_set.rb#67 def typecast(paths); end end @@ -12714,11 +12926,41 @@ end # source://actionview//lib/action_view/railtie.rb#8 class ActionView::Railtie < ::Rails::Engine class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end end end +# source://actionview//lib/action_view/buffers.rb#92 +class ActionView::RawOutputBuffer + # @return [RawOutputBuffer] a new instance of RawOutputBuffer + # + # source://actionview//lib/action_view/buffers.rb#93 + def initialize(buffer); end + + # source://actionview//lib/action_view/buffers.rb#97 + def <<(value); end + + # source://actionview//lib/action_view/buffers.rb#103 + def raw; end +end + +# source://actionview//lib/action_view/buffers.rb#150 +class ActionView::RawStreamingBuffer + # @return [RawStreamingBuffer] a new instance of RawStreamingBuffer + # + # source://actionview//lib/action_view/buffers.rb#151 + def initialize(buffer); end + + # source://actionview//lib/action_view/buffers.rb#155 + def <<(value); end + + # source://actionview//lib/action_view/buffers.rb#161 + def raw; end +end + +# = Action View \Record \Identifier +# # RecordIdentifier encapsulates methods used by various ActionView helpers # to associate records with DOM elements. # @@ -12746,6 +12988,8 @@ end # automatically generated, following naming conventions encapsulated by the # RecordIdentifier methods #dom_id and #dom_class: # +# dom_id(Post) # => "new_post" +# dom_class(Post) # => "post" # dom_id(Post.new) # => "new_post" # dom_class(Post.new) # => "post" # dom_id(Post.find 42) # => "post_42" @@ -12769,7 +13013,7 @@ end # end # end # -# source://actionview//lib/action_view/record_identifier.rb#56 +# source://actionview//lib/action_view/record_identifier.rb#60 module ActionView::RecordIdentifier include ::ActionView::ModelNaming extend ::ActionView::RecordIdentifier @@ -12785,22 +13029,24 @@ module ActionView::RecordIdentifier # dom_class(post, :edit) # => "edit_post" # dom_class(Person, :edit) # => "edit_person" # - # source://actionview//lib/action_view/record_identifier.rb#74 + # source://actionview//lib/action_view/record_identifier.rb#78 def dom_class(record_or_class, prefix = T.unsafe(nil)); end # The DOM id convention is to use the singular form of an object or class with the id following an underscore. # If no id is found, prefix with "new_" instead. # - # dom_id(Post.find(45)) # => "post_45" - # dom_id(Post.new) # => "new_post" + # dom_id(Post.find(45)) # => "post_45" + # dom_id(Post) # => "new_post" # # If you need to address multiple instances of the same class in the same view, you can prefix the dom_id: # # dom_id(Post.find(45), :edit) # => "edit_post_45" - # dom_id(Post.new, :custom) # => "custom_post" + # dom_id(Post, :custom) # => "custom_post" # - # source://actionview//lib/action_view/record_identifier.rb#89 - def dom_id(record, prefix = T.unsafe(nil)); end + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/record_identifier.rb#93 + def dom_id(record_or_class, prefix = T.unsafe(nil)); end private @@ -12813,14 +13059,14 @@ module ActionView::RecordIdentifier # method that replaces all characters that are invalid inside DOM ids, with valid ones. You need to # make sure yourself that your dom ids are valid, in case you override this method. # - # source://actionview//lib/action_view/record_identifier.rb#106 + # source://actionview//lib/action_view/record_identifier.rb#113 def record_key_for_dom_id(record); end end -# source://actionview//lib/action_view/record_identifier.rb#62 +# source://actionview//lib/action_view/record_identifier.rb#66 ActionView::RecordIdentifier::JOIN = T.let(T.unsafe(nil), String) -# source://actionview//lib/action_view/record_identifier.rb#63 +# source://actionview//lib/action_view/record_identifier.rb#67 ActionView::RecordIdentifier::NEW = T.let(T.unsafe(nil), String) # source://actionview//lib/action_view/ripper_ast_parser.rb#6 @@ -13586,6 +13832,8 @@ end # source://actionview//lib/action_view/ripper_ast_parser.rb#150 ActionView::RenderParser::RipperASTParser::RenderCallExtractor::METHODS_TO_PARSE = T.let(T.unsafe(nil), Array) +# = Action View \Renderer +# # This is the main entry point for rendering. It basically delegates # to other objects like TemplateRenderer and PartialRenderer which # actually renders the template. @@ -13596,31 +13844,31 @@ ActionView::RenderParser::RipperASTParser::RenderCallExtractor::METHODS_TO_PARSE # the setup and logic necessary to render a view and a new object is created # each time +render+ is called. # -# source://actionview//lib/action_view/renderer/renderer.rb#13 +# source://actionview//lib/action_view/renderer/renderer.rb#15 class ActionView::Renderer # @return [Renderer] a new instance of Renderer # - # source://actionview//lib/action_view/renderer/renderer.rb#16 + # source://actionview//lib/action_view/renderer/renderer.rb#18 def initialize(lookup_context); end - # source://actionview//lib/action_view/renderer/renderer.rb#56 + # source://actionview//lib/action_view/renderer/renderer.rb#58 def cache_hits; end # Returns the value of attribute lookup_context. # - # source://actionview//lib/action_view/renderer/renderer.rb#14 + # source://actionview//lib/action_view/renderer/renderer.rb#16 def lookup_context; end # Sets the attribute lookup_context # # @param value the value to set the attribute lookup_context to. # - # source://actionview//lib/action_view/renderer/renderer.rb#14 + # source://actionview//lib/action_view/renderer/renderer.rb#16 def lookup_context=(_arg0); end # Main render entry point shared by Action View and Action Controller. # - # source://actionview//lib/action_view/renderer/renderer.rb#21 + # source://actionview//lib/action_view/renderer/renderer.rb#23 def render(context, options); end # Render but returns a valid Rack body. If fibers are defined, we return @@ -13629,38 +13877,38 @@ class ActionView::Renderer # Note that partials are not supported to be rendered with streaming, # so in such cases, we just wrap them in an array. # - # source://actionview//lib/action_view/renderer/renderer.rb#38 + # source://actionview//lib/action_view/renderer/renderer.rb#40 def render_body(context, options); end # Direct access to partial rendering. # - # source://actionview//lib/action_view/renderer/renderer.rb#52 + # source://actionview//lib/action_view/renderer/renderer.rb#54 def render_partial(context, options, &block); end - # source://actionview//lib/action_view/renderer/renderer.rb#64 + # source://actionview//lib/action_view/renderer/renderer.rb#66 def render_partial_to_object(context, options, &block); end # Direct access to template rendering. # - # source://actionview//lib/action_view/renderer/renderer.rb#47 + # source://actionview//lib/action_view/renderer/renderer.rb#49 def render_template(context, options); end - # source://actionview//lib/action_view/renderer/renderer.rb#60 + # source://actionview//lib/action_view/renderer/renderer.rb#62 def render_template_to_object(context, options); end - # source://actionview//lib/action_view/renderer/renderer.rb#25 + # source://actionview//lib/action_view/renderer/renderer.rb#27 def render_to_object(context, options); end private - # source://actionview//lib/action_view/renderer/renderer.rb#107 + # source://actionview//lib/action_view/renderer/renderer.rb#109 def collection_from_object(object); end - # source://actionview//lib/action_view/renderer/renderer.rb#100 + # source://actionview//lib/action_view/renderer/renderer.rb#102 def collection_from_options(options); end end -# source://actionview//lib/action_view/rendering.rb#25 +# source://actionview//lib/action_view/rendering.rb#26 module ActionView::Rendering extend ::ActiveSupport::Concern include ::ActionView::ViewPaths @@ -13668,20 +13916,20 @@ module ActionView::Rendering mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods mixes_in_class_methods ::ActionView::Rendering::ClassMethods - # source://actionview//lib/action_view/rendering.rb#31 + # source://actionview//lib/action_view/rendering.rb#32 def initialize; end # Override process to set up I18n proxy. # - # source://actionview//lib/action_view/rendering.rb#37 + # source://actionview//lib/action_view/rendering.rb#38 def process(*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/rendering.rb#101 + # source://actionview//lib/action_view/rendering.rb#119 def render_to_body(options = T.unsafe(nil)); end # Returns the value of attribute rendered_format. # - # source://actionview//lib/action_view/rendering.rb#29 + # source://actionview//lib/action_view/rendering.rb#30 def rendered_format; end # An instance of a view class. The default view class is ActionView::Base. @@ -13695,53 +13943,61 @@ module ActionView::Rendering # # Override this method in a module to change the default behavior. # - # source://actionview//lib/action_view/rendering.rb#91 + # source://actionview//lib/action_view/rendering.rb#109 def view_context; end - # source://actionview//lib/action_view/rendering.rb#77 + # source://actionview//lib/action_view/rendering.rb#95 def view_context_class; end # Returns an object that is able to render templates. # - # source://actionview//lib/action_view/rendering.rb#96 + # source://actionview//lib/action_view/rendering.rb#114 def view_renderer; end private - # Normalize args by converting render "foo" to render :action => "foo" and - # render "foo/bar" to render :template => "foo/bar". + # Normalize args by converting render "foo" to render action: "foo" and + # render "foo/bar" to render template: "foo/bar". # - # source://actionview//lib/action_view/rendering.rb#134 + # source://actionview//lib/action_view/rendering.rb#152 def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil)); end # Normalize options. # - # source://actionview//lib/action_view/rendering.rb#158 + # source://actionview//lib/action_view/rendering.rb#176 def _normalize_options(options); end # Assign the rendered format to look up context. # - # source://actionview//lib/action_view/rendering.rb#127 + # source://actionview//lib/action_view/rendering.rb#145 def _process_format(format); end # Find and render a template based on the options given. # - # source://actionview//lib/action_view/rendering.rb#108 + # source://actionview//lib/action_view/rendering.rb#126 def _render_template(options); end end -# source://actionview//lib/action_view/rendering.rb#44 +# source://actionview//lib/action_view/rendering.rb#45 module ActionView::Rendering::ClassMethods - # source://actionview//lib/action_view/rendering.rb#48 + # source://actionview//lib/action_view/rendering.rb#49 def _helpers; end - # source://actionview//lib/action_view/rendering.rb#45 + # source://actionview//lib/action_view/rendering.rb#46 def _routes; end - # source://actionview//lib/action_view/rendering.rb#51 + # source://actionview//lib/action_view/rendering.rb#59 def build_view_context_class(klass, supports_path, routes, helpers); end - # source://actionview//lib/action_view/rendering.rb#64 + # source://actionview//lib/action_view/rendering.rb#76 + def eager_load!; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/rendering.rb#52 + def inherit_view_context_class?; end + + # source://actionview//lib/action_view/rendering.rb#82 def view_context_class; end end @@ -13749,29 +14005,34 @@ end # # source://actionview//lib/action_view/template/resolver.rb#12 class ActionView::Resolver - # source://actionview//lib/action_view/template/resolver.rb#68 + include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor + + # source://actionview//lib/action_view/template/resolver.rb#72 def all_template_paths; end - # source://actionview//lib/action_view/template/resolver.rb#54 + # source://actionview//lib/action_view/template/resolver.rb#67 + def built_templates; end + + # source://actionview//lib/action_view/template/resolver.rb#53 def caching; end - # source://actionview//lib/action_view/template/resolver.rb#54 + # source://actionview//lib/action_view/template/resolver.rb#53 def caching=(val); end - # source://actionview//lib/action_view/template/resolver.rb#78 - def caching?(*_arg0, **_arg1, &_arg2); end + # source://actionview//lib/action_view/template/resolver.rb#82 + def caching?(&block); end - # source://actionview//lib/action_view/template/resolver.rb#60 + # source://actionview//lib/action_view/template/resolver.rb#59 def clear_cache; end # Normalizes the arguments and passes it on to find_templates. # - # source://actionview//lib/action_view/template/resolver.rb#64 + # source://actionview//lib/action_view/template/resolver.rb#63 def find_all(name, prefix = T.unsafe(nil), partial = T.unsafe(nil), details = T.unsafe(nil), key = T.unsafe(nil), locals = T.unsafe(nil)); end private - # source://actionview//lib/action_view/template/resolver.rb#74 + # source://actionview//lib/action_view/template/resolver.rb#78 def _find_all(name, prefix, partial, details, key, locals); end # This is what child classes implement. No defaults are needed @@ -13780,34 +14041,31 @@ class ActionView::Resolver # # @raise [NotImplementedError] # - # source://actionview//lib/action_view/template/resolver.rb#83 + # source://actionview//lib/action_view/template/resolver.rb#87 def find_templates(name, prefix, partial, details, locals = T.unsafe(nil)); end class << self - # source://actionview//lib/action_view/template/resolver.rb#54 + # source://actionview//lib/action_view/template/resolver.rb#53 def caching; end - # source://actionview//lib/action_view/template/resolver.rb#54 + # source://actionview//lib/action_view/template/resolver.rb#53 def caching=(val); end - # source://actionview//lib/action_view/template/resolver.rb#54 + # source://actionview//lib/action_view/template/resolver.rb#53 def caching?; end end end -# source://actionview//lib/action_view/template/resolver.rb#13 -ActionView::Resolver::Path = ActionView::TemplatePath - -# source://actionview//lib/action_view/template/resolver.rb#16 +# source://actionview//lib/action_view/template/resolver.rb#15 class ActionView::Resolver::PathParser - # source://actionview//lib/action_view/template/resolver.rb#19 + # source://actionview//lib/action_view/template/resolver.rb#18 def build_path_regex; end - # source://actionview//lib/action_view/template/resolver.rb#40 + # source://actionview//lib/action_view/template/resolver.rb#39 def parse(path); end end -# source://actionview//lib/action_view/template/resolver.rb#17 +# source://actionview//lib/action_view/template/resolver.rb#16 class ActionView::Resolver::PathParser::ParsedPath < ::Struct # Returns the value of attribute details # @@ -13844,7 +14102,7 @@ end module ActionView::RoutingUrlFor include ::ActionDispatch::Routing::PolymorphicRoutes - # source://actionpack/7.0.6/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/7.1.3.2/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 @@ -13946,39 +14204,50 @@ module ActionView::RoutingUrlFor def optimize_routes_generation?; end class << self - # source://actionpack/7.0.6/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/7.1.3.2/lib/action_dispatch/routing/url_for.rb#99 def default_url_options=(val); end end end -# source://actionview//lib/action_view/buffers.rb#41 +# source://actionview//lib/action_view/buffers.rb#108 class ActionView::StreamingBuffer # @return [StreamingBuffer] a new instance of StreamingBuffer # - # source://actionview//lib/action_view/buffers.rb#42 + # source://actionview//lib/action_view/buffers.rb#109 def initialize(block); end - # source://actionview//lib/action_view/buffers.rb#46 + # source://actionview//lib/action_view/buffers.rb#113 def <<(value); end - # source://actionview//lib/action_view/buffers.rb#46 + # source://actionview//lib/action_view/buffers.rb#113 def append=(value); end - # source://actionview//lib/action_view/buffers.rb#46 + # Returns the value of attribute block. + # + # source://actionview//lib/action_view/buffers.rb#147 + def block; end + + # source://actionview//lib/action_view/buffers.rb#126 + def capture; end + + # source://actionview//lib/action_view/buffers.rb#113 def concat(value); end - # source://actionview//lib/action_view/buffers.rb#63 + # source://actionview//lib/action_view/buffers.rb#139 def html_safe; end # @return [Boolean] # - # source://actionview//lib/action_view/buffers.rb#59 + # source://actionview//lib/action_view/buffers.rb#135 def html_safe?; end - # source://actionview//lib/action_view/buffers.rb#54 + # source://actionview//lib/action_view/buffers.rb#143 + def raw; end + + # source://actionview//lib/action_view/buffers.rb#121 def safe_append=(value); end - # source://actionview//lib/action_view/buffers.rb#54 + # source://actionview//lib/action_view/buffers.rb#121 def safe_concat(value); end end @@ -14053,21 +14322,21 @@ class ActionView::StreamingTemplateRenderer::Body def log_error(exception); end end -# source://actionview//lib/action_view/template/error.rb#232 +# source://actionview//lib/action_view/template/error.rb#245 class ActionView::SyntaxErrorInTemplate < ::ActionView::Template::Error # @return [SyntaxErrorInTemplate] a new instance of SyntaxErrorInTemplate # - # source://actionview//lib/action_view/template/error.rb#233 + # source://actionview//lib/action_view/template/error.rb#246 def initialize(template, offending_code_string); end - # source://actionview//lib/action_view/template/error.rb#244 + # source://actionview//lib/action_view/template/error.rb#257 def annotated_source_code; end - # source://actionview//lib/action_view/template/error.rb#238 + # source://actionview//lib/action_view/template/error.rb#251 def message; end end -# = Action View Template +# = Action View \Template # # source://actionview//lib/action_view/template.rb#8 class ActionView::Template @@ -14076,7 +14345,7 @@ class ActionView::Template # @return [Template] a new instance of Template # - # source://actionview//lib/action_view/template.rb#123 + # source://actionview//lib/action_view/template.rb#186 def initialize(source, identifier, handler, locals:, format: T.unsafe(nil), variant: T.unsafe(nil), virtual_path: T.unsafe(nil)); end # This method is responsible for properly setting the encoding of the @@ -14089,42 +14358,46 @@ class ActionView::Template # before passing the source on to the template engine, leaving a # blank line in its stead. # - # source://actionview//lib/action_view/template.rb#189 + # source://actionview//lib/action_view/template.rb#297 def encode!; end # Returns the value of attribute format. # - # source://actionview//lib/action_view/template.rb#121 + # source://actionview//lib/action_view/template.rb#182 def format; end # Returns the value of attribute handler. # - # source://actionview//lib/action_view/template.rb#120 + # source://actionview//lib/action_view/template.rb#181 def handler; end # Returns the value of attribute identifier. # - # source://actionview//lib/action_view/template.rb#120 + # source://actionview//lib/action_view/template.rb#181 def identifier; end - # source://actionview//lib/action_view/template.rb#171 + # source://actionview//lib/action_view/template.rb#276 def inspect; end - # Returns the value of attribute locals. + # The locals this template has been or will be compiled for, or nil if this + # is a strict locals template. # - # source://actionview//lib/action_view/template.rb#121 + # source://actionview//lib/action_view/template.rb#210 def locals; end # Exceptions are marshalled when using the parallel test runner with DRb, so we need # to ensure that references to the template object can be marshalled as well. This means forgoing # the marshalling of the compiler mutex and instantiating that again on unmarshalling. # - # source://actionview//lib/action_view/template.rb#229 + # source://actionview//lib/action_view/template.rb#363 def marshal_dump; end - # source://actionview//lib/action_view/template.rb#233 + # source://actionview//lib/action_view/template.rb#367 def marshal_load(array); end + # source://actionview//lib/action_view/template.rb#372 + def method_name; end + # Render a template. If the template was not compiled yet, it is done # exactly before rendering. # @@ -14132,39 +14405,68 @@ class ActionView::Template # we use a bang in this instrumentation because you don't want to # consume this in production. This is only slow if it's being listened to. # - # source://actionview//lib/action_view/template.rb#154 - def render(view, locals, buffer = T.unsafe(nil), add_to_stack: T.unsafe(nil), &block); end + # source://actionview//lib/action_view/template.rb#248 + def render(view, locals, buffer = T.unsafe(nil), implicit_locals: T.unsafe(nil), add_to_stack: T.unsafe(nil), &block); end - # source://actionview//lib/action_view/template.rb#167 + # source://actionview//lib/action_view/template.rb#272 def short_identifier; end - # source://actionview//lib/action_view/template.rb#175 + # source://actionview//lib/action_view/template.rb#280 def source; end + # source://actionview//lib/action_view/template.rb#218 + def spot(location); end + + # This method is responsible for marking a template as having strict locals + # which means the template can only accept the locals defined in a magic + # comment. For example, if your template acceps the locals +title+ and + # +comment_count+, add the following to your template file: + # + # <%# locals: (title: "Default title", comment_count: 0) %> + # + # Strict locals are useful for validating template arguments and for + # specifying defaults. + # + # source://actionview//lib/action_view/template.rb#342 + def strict_locals!; end + + # Returns whether a template is using strict locals. + # + # @return [Boolean] + # + # source://actionview//lib/action_view/template.rb#356 + def strict_locals?; end + # Returns whether the underlying handler supports streaming. If so, # a streaming buffer *may* be passed when it starts rendering. # # @return [Boolean] # - # source://actionview//lib/action_view/template.rb#144 + # source://actionview//lib/action_view/template.rb#238 def supports_streaming?; end - # source://actionview//lib/action_view/template.rb#163 + # Translate an error location returned by ErrorHighlight to the correct + # source location inside the template. + # + # source://actionview//lib/action_view/template.rb#228 + def translate_location(backtrace_location, spot); end + + # source://actionview//lib/action_view/template.rb#268 def type; end # Returns the value of attribute variable. # - # source://actionview//lib/action_view/template.rb#121 + # source://actionview//lib/action_view/template.rb#182 def variable; end # Returns the value of attribute variant. # - # source://actionview//lib/action_view/template.rb#121 + # source://actionview//lib/action_view/template.rb#182 def variant; end # Returns the value of attribute virtual_path. # - # source://actionview//lib/action_view/template.rb#121 + # source://actionview//lib/action_view/template.rb#182 def virtual_path; end private @@ -14181,42 +14483,55 @@ class ActionView::Template # In general, this means that templates will be UTF-8 inside of Rails, # regardless of the original source encoding. # - # source://actionview//lib/action_view/template.rb#275 + # source://actionview//lib/action_view/template.rb#472 def compile(mod); end # Compile a template. This method ensures a template is compiled # just once and removes the source after it is compiled. # - # source://actionview//lib/action_view/template.rb#241 + # source://actionview//lib/action_view/template.rb#394 def compile!(view); end - # source://actionview//lib/action_view/template.rb#316 + # This method compiles the source of the template. The compilation of templates + # involves setting strict_locals! if applicable, encoding the template, and setting + # frozen string literal. + # + # source://actionview//lib/action_view/template.rb#419 + def compiled_source; end + + # source://actionview//lib/action_view/template.rb#381 + def find_node_by_id(node, node_id); end + + # source://actionview//lib/action_view/template.rb#518 def handle_render_error(view, e); end - # source://actionview//lib/action_view/template.rb#352 + # source://actionview//lib/action_view/template.rb#540 def identifier_method_name; end - # source://actionview//lib/action_view/template.rb#356 + # source://actionview//lib/action_view/template.rb#544 def instrument(action, &block); end - # source://actionview//lib/action_view/template.rb#364 + # source://actionview//lib/action_view/template.rb#552 def instrument_payload; end - # source://actionview//lib/action_view/template.rb#360 + # source://actionview//lib/action_view/template.rb#548 def instrument_render_template(&block); end - # source://actionview//lib/action_view/template.rb#325 + # source://actionview//lib/action_view/template.rb#527 def locals_code; end - # source://actionview//lib/action_view/template.rb#344 - def method_name; end + # source://actionview//lib/action_view/template.rb#510 + def offset; end class << self - # source://actionview//lib/action_view/template.rb#117 + # source://actionview//lib/action_view/template.rb#167 def frozen_string_literal; end - # source://actionview//lib/action_view/template.rb#117 + # source://actionview//lib/action_view/template.rb#167 def frozen_string_literal=(_arg0); end + + # source://actionview//lib/action_view/template.rb#171 + def mime_types_implementation=(implementation); end end end @@ -14224,48 +14539,61 @@ end # fails. This exception then gathers a bunch of intimate details and uses it to report a # precise exception message. # -# source://actionview//lib/action_view/template/error.rb#153 +# source://actionview//lib/action_view/template/error.rb#154 class ActionView::Template::Error < ::ActionView::ActionViewError # @return [Error] a new instance of Error # - # source://actionview//lib/action_view/template/error.rb#159 + # source://actionview//lib/action_view/template/error.rb#162 def initialize(template); end - # source://actionview//lib/action_view/template/error.rb#207 + # source://actionview//lib/action_view/template/error.rb#220 def annotated_source_code; end + # source://actionview//lib/action_view/template/error.rb#171 + def backtrace; end + + # source://actionview//lib/action_view/template/error.rb#175 + def backtrace_locations; end + # Override to prevent #cause resetting during re-raise. # - # source://actionview//lib/action_view/template/error.rb#157 + # source://actionview//lib/action_view/template/error.rb#158 def cause; end - # source://actionview//lib/action_view/template/error.rb#166 + # source://actionview//lib/action_view/template/error.rb#179 def file_name; end - # source://actionview//lib/action_view/template/error.rb#199 + # source://actionview//lib/action_view/template/error.rb#212 def line_number; end - # source://actionview//lib/action_view/template/error.rb#179 + # source://actionview//lib/action_view/template/error.rb#192 def source_extract(indentation = T.unsafe(nil)); end - # source://actionview//lib/action_view/template/error.rb#170 + # source://actionview//lib/action_view/template/error.rb#183 def sub_template_message; end - # source://actionview//lib/action_view/template/error.rb#194 + # source://actionview//lib/action_view/template/error.rb#207 def sub_template_of(template_path); end + # Returns the value of attribute template. + # + # source://actionview//lib/action_view/template/error.rb#160 + def template; end + private - # source://actionview//lib/action_view/template/error.rb#220 + # source://actionview//lib/action_view/template/error.rb#233 def formatted_code_for(source_code, line_counter, indent); end - # source://actionview//lib/action_view/template/error.rb#212 + # source://actionview//lib/action_view/template/error.rb#225 def source_location; end end -# source://actionview//lib/action_view/template/error.rb#154 +# source://actionview//lib/action_view/template/error.rb#155 ActionView::Template::Error::SOURCE_CODE_RADIUS = T.let(T.unsafe(nil), Integer) +# = Action View HTML Template +# # source://actionview//lib/action_view/template/html.rb#6 class ActionView::Template::HTML # @return [HTML] a new instance of HTML @@ -14292,6 +14620,8 @@ class ActionView::Template::HTML def type; end end +# = Action View Template Handlers +# # source://actionview//lib/action_view/template/handlers.rb#6 module ActionView::Template::Handlers # source://actionview//lib/action_view/template/handlers.rb#61 @@ -14363,107 +14693,116 @@ class ActionView::Template::Handlers::Builder end end -# source://actionview//lib/action_view/template/handlers/erb.rb#6 +# source://actionview//lib/action_view/template/handlers/erb.rb#9 class ActionView::Template::Handlers::ERB - # source://actionview//lib/action_view/template/handlers/erb.rb#36 + # source://actionview//lib/action_view/template/handlers/erb.rb#61 def call(template, source); end - # source://actionview//lib/action_view/template/handlers/erb.rb#14 + # source://actionview//lib/action_view/template/handlers/erb.rb#17 def erb_implementation; end - # source://actionview//lib/action_view/template/handlers/erb.rb#14 + # source://actionview//lib/action_view/template/handlers/erb.rb#17 def erb_implementation=(_arg0); end - # source://actionview//lib/action_view/template/handlers/erb.rb#14 + # source://actionview//lib/action_view/template/handlers/erb.rb#17 def erb_implementation?; end - # source://actionview//lib/action_view/template/handlers/erb.rb#11 + # source://actionview//lib/action_view/template/handlers/erb.rb#14 def erb_trim_mode; end - # source://actionview//lib/action_view/template/handlers/erb.rb#11 + # source://actionview//lib/action_view/template/handlers/erb.rb#14 def erb_trim_mode=(_arg0); end - # source://actionview//lib/action_view/template/handlers/erb.rb#11 + # source://actionview//lib/action_view/template/handlers/erb.rb#14 def erb_trim_mode?; end - # source://actionview//lib/action_view/template/handlers/erb.rb#17 + # source://actionview//lib/action_view/template/handlers/erb.rb#20 def escape_ignore_list; end - # source://actionview//lib/action_view/template/handlers/erb.rb#17 + # source://actionview//lib/action_view/template/handlers/erb.rb#20 def escape_ignore_list=(_arg0); end - # source://actionview//lib/action_view/template/handlers/erb.rb#17 + # source://actionview//lib/action_view/template/handlers/erb.rb#20 def escape_ignore_list?; end # @return [Boolean] # - # source://actionview//lib/action_view/template/handlers/erb.rb#32 + # source://actionview//lib/action_view/template/handlers/erb.rb#37 def handles_encoding?; end - # source://actionview//lib/action_view/template/handlers/erb.rb#20 + # source://actionview//lib/action_view/template/handlers/erb.rb#23 def strip_trailing_newlines; end - # source://actionview//lib/action_view/template/handlers/erb.rb#20 + # source://actionview//lib/action_view/template/handlers/erb.rb#23 def strip_trailing_newlines=(_arg0); end - # source://actionview//lib/action_view/template/handlers/erb.rb#20 + # source://actionview//lib/action_view/template/handlers/erb.rb#23 def strip_trailing_newlines?; end # @return [Boolean] # - # source://actionview//lib/action_view/template/handlers/erb.rb#28 + # source://actionview//lib/action_view/template/handlers/erb.rb#33 def supports_streaming?; end + # Translate an error location returned by ErrorHighlight to the correct + # source location inside the template. + # + # source://actionview//lib/action_view/template/handlers/erb.rb#43 + def translate_location(spot, backtrace_location, source); end + private + # source://actionview//lib/action_view/template/handlers/erb.rb#108 + def find_offset(compiled, source_tokens, error_column); end + # @raise [WrongEncodingError] # - # source://actionview//lib/action_view/template/handlers/erb.rb#68 + # source://actionview//lib/action_view/template/handlers/erb.rb#93 def valid_encoding(string, encoding); end class << self - # source://actionview//lib/action_view/template/handlers/erb.rb#24 + # source://actionview//lib/action_view/template/handlers/erb.rb#29 def call(template, source); end - # source://actionview//lib/action_view/template/handlers/erb.rb#14 + # source://actionview//lib/action_view/template/handlers/erb.rb#17 def erb_implementation; end - # source://actionview//lib/action_view/template/handlers/erb.rb#14 + # source://actionview//lib/action_view/template/handlers/erb.rb#17 def erb_implementation=(value); end - # source://actionview//lib/action_view/template/handlers/erb.rb#14 + # source://actionview//lib/action_view/template/handlers/erb.rb#17 def erb_implementation?; end - # source://actionview//lib/action_view/template/handlers/erb.rb#11 + # source://actionview//lib/action_view/template/handlers/erb.rb#14 def erb_trim_mode; end - # source://actionview//lib/action_view/template/handlers/erb.rb#11 + # source://actionview//lib/action_view/template/handlers/erb.rb#14 def erb_trim_mode=(value); end - # source://actionview//lib/action_view/template/handlers/erb.rb#11 + # source://actionview//lib/action_view/template/handlers/erb.rb#14 def erb_trim_mode?; end - # source://actionview//lib/action_view/template/handlers/erb.rb#17 + # source://actionview//lib/action_view/template/handlers/erb.rb#20 def escape_ignore_list; end - # source://actionview//lib/action_view/template/handlers/erb.rb#17 + # source://actionview//lib/action_view/template/handlers/erb.rb#20 def escape_ignore_list=(value); end - # source://actionview//lib/action_view/template/handlers/erb.rb#17 + # source://actionview//lib/action_view/template/handlers/erb.rb#20 def escape_ignore_list?; end - # source://actionview//lib/action_view/template/handlers/erb.rb#20 + # source://actionview//lib/action_view/template/handlers/erb.rb#23 def strip_trailing_newlines; end - # source://actionview//lib/action_view/template/handlers/erb.rb#20 + # source://actionview//lib/action_view/template/handlers/erb.rb#23 def strip_trailing_newlines=(value); end - # source://actionview//lib/action_view/template/handlers/erb.rb#20 + # source://actionview//lib/action_view/template/handlers/erb.rb#23 def strip_trailing_newlines?; end end end -# source://actionview//lib/action_view/template/handlers/erb.rb#22 +# source://actionview//lib/action_view/template/handlers/erb.rb#25 ActionView::Template::Handlers::ERB::ENCODING_TAG = T.let(T.unsafe(nil), Regexp) # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#9 @@ -14473,30 +14812,30 @@ class ActionView::Template::Handlers::ERB::Erubi < ::Erubi::Engine # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#11 def initialize(input, properties = T.unsafe(nil)); end - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#26 - def evaluate(action_view_erb_handler_context); end - private - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#69 + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#65 def add_code(code); end - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#53 + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#47 def add_expression(indicator, code); end - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#74 + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#70 def add_postamble(_); end - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#36 + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#30 def add_text(text); end - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#79 + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#75 def flush_newline_if_pending(src); end end -# source://actionview//lib/action_view/template/handlers/erb/erubi.rb#51 +# source://actionview//lib/action_view/template/handlers/erb/erubi.rb#45 ActionView::Template::Handlers::ERB::Erubi::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) +# source://actionview//lib/action_view/template/handlers/erb.rb#27 +class ActionView::Template::Handlers::ERB::LocationParsingError < ::StandardError; end + # source://actionview//lib/action_view/template/handlers/html.rb#5 class ActionView::Template::Handlers::Html < ::ActionView::Template::Handlers::Raw # source://actionview//lib/action_view/template/handlers/html.rb#6 @@ -14521,6 +14860,14 @@ end # source://actionview//lib/action_view/template/inline.rb#8 ActionView::Template::Inline::Finalizer = T.let(T.unsafe(nil), Proc) +# source://actionview//lib/action_view/template.rb#284 +ActionView::Template::LEADING_ENCODING_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://actionview//lib/action_view/template.rb#184 +ActionView::Template::NONE = T.let(T.unsafe(nil), Object) + +# = Action View RawFile Template +# # source://actionview//lib/action_view/template/raw_file.rb#6 class ActionView::Template::RawFile # @return [RawFile] a new instance of RawFile @@ -14547,6 +14894,8 @@ class ActionView::Template::RawFile def type=(_arg0); end end +# = Action View Renderable Template for objects that respond to #render_in +# # source://actionview//lib/action_view/template/renderable.rb#6 class ActionView::Template::Renderable # @return [Renderable] a new instance of Renderable @@ -14564,6 +14913,57 @@ class ActionView::Template::Renderable def render(context, *args); end end +# source://actionview//lib/action_view/template.rb#11 +ActionView::Template::STRICT_LOCALS_REGEX = T.let(T.unsafe(nil), Regexp) + +# SimpleType is mostly just a stub implementation for when Action View +# is used without Action Dispatch. +# +# source://actionview//lib/action_view/template/types.rb#9 +class ActionView::Template::SimpleType + # @return [SimpleType] a new instance of SimpleType + # + # source://actionview//lib/action_view/template/types.rb#29 + def initialize(symbol); end + + # source://actionview//lib/action_view/template/types.rb#43 + def ==(type); end + + # source://actionview//lib/action_view/template/types.rb#38 + def ref; end + + # Returns the value of attribute symbol. + # + # source://actionview//lib/action_view/template/types.rb#27 + def symbol; end + + # source://actionview//lib/action_view/template/types.rb#33 + def to_s; end + + # source://actionview//lib/action_view/template/types.rb#33 + def to_str; end + + # source://actionview//lib/action_view/template/types.rb#38 + def to_sym; end + + class << self + # source://actionview//lib/action_view/template/types.rb#14 + def [](type); end + + # Returns the value of attribute symbols. + # + # source://actionview//lib/action_view/template/types.rb#12 + def symbols; end + + # :nodoc + # + # @return [Boolean] + # + # source://actionview//lib/action_view/template/types.rb#22 + def valid_symbols?(symbols); end + end +end + # source://actionview//lib/action_view/template/sources.rb#5 module ActionView::Template::Sources extend ::ActiveSupport::Autoload @@ -14580,6 +14980,8 @@ class ActionView::Template::Sources::File def to_s; end end +# = Action View Text Template +# # source://actionview//lib/action_view/template/text.rb#6 class ActionView::Template::Text # @return [Text] a new instance of Text @@ -14609,67 +15011,8 @@ class ActionView::Template::Text def type=(_arg0); end end -# source://actionview//lib/action_view/template/types.rb#7 -module ActionView::Template::Types - class << self - # source://actionview//lib/action_view/template/types.rb#47 - def [](type); end - - # source://actionview//lib/action_view/template/types.rb#43 - def delegate_to(klass); end - - # source://actionview//lib/action_view/template/types.rb#51 - def symbols; end - - # Returns the value of attribute type_klass. - # - # source://actionview//lib/action_view/template/types.rb#41 - def type_klass; end - - # Sets the attribute type_klass - # - # @param value the value to set the attribute type_klass to. - # - # source://actionview//lib/action_view/template/types.rb#41 - def type_klass=(_arg0); end - end -end - -# source://actionview//lib/action_view/template/types.rb#8 -class ActionView::Template::Types::Type - # @return [Type] a new instance of Type - # - # source://actionview//lib/action_view/template/types.rb#21 - def initialize(symbol); end - - # source://actionview//lib/action_view/template/types.rb#35 - def ==(type); end - - # source://actionview//lib/action_view/template/types.rb#30 - def ref; end - - # Returns the value of attribute symbol. - # - # source://actionview//lib/action_view/template/types.rb#19 - def symbol; end - - # source://actionview//lib/action_view/template/types.rb#25 - def to_s; end - - # source://actionview//lib/action_view/template/types.rb#25 - def to_str; end - - # source://actionview//lib/action_view/template/types.rb#30 - def to_sym; end - - class << self - # source://actionview//lib/action_view/template/types.rb#11 - def [](type); end - end -end - -# source://actionview//lib/action_view/template/types.rb#9 -ActionView::Template::Types::Type::SET = T.let(T.unsafe(nil), T.untyped) +# source://actionview//lib/action_view/template.rb#176 +ActionView::Template::Types = Mime # source://actionview//lib/action_view/template_details.rb#4 class ActionView::TemplateDetails @@ -14769,89 +15112,91 @@ end # source://actionview//lib/action_view/template_details.rb#9 ActionView::TemplateDetails::Requested::ANY_HASH = T.let(T.unsafe(nil), Hash) -# source://actionview//lib/action_view/template/error.rb#230 +# source://actionview//lib/action_view/template/error.rb#243 ActionView::TemplateError = ActionView::Template::Error +# = Action View \TemplatePath +# # Represents a template path within ActionView's lookup and rendering system, # like "users/show" # # TemplatePath makes it convenient to convert between separate name, prefix, # partial arguments and the virtual path. # -# source://actionview//lib/action_view/template_path.rb#9 +# source://actionview//lib/action_view/template_path.rb#11 class ActionView::TemplatePath # @return [TemplatePath] a new instance of TemplatePath # - # source://actionview//lib/action_view/template_path.rb#45 + # source://actionview//lib/action_view/template_path.rb#47 def initialize(name, prefix, partial, virtual); end # @return [Boolean] # - # source://actionview//lib/action_view/template_path.rb#59 + # source://actionview//lib/action_view/template_path.rb#61 def ==(other); end # @return [Boolean] # - # source://actionview//lib/action_view/template_path.rb#59 + # source://actionview//lib/action_view/template_path.rb#61 def eql?(other); end - # source://actionview//lib/action_view/template_path.rb#55 + # source://actionview//lib/action_view/template_path.rb#57 def hash; end # Returns the value of attribute name. # - # source://actionview//lib/action_view/template_path.rb#10 + # source://actionview//lib/action_view/template_path.rb#12 def name; end # Returns the value of attribute partial. # - # source://actionview//lib/action_view/template_path.rb#10 + # source://actionview//lib/action_view/template_path.rb#12 def partial; end # Returns the value of attribute partial. # - # source://actionview//lib/action_view/template_path.rb#10 + # source://actionview//lib/action_view/template_path.rb#12 def partial?; end # Returns the value of attribute prefix. # - # source://actionview//lib/action_view/template_path.rb#10 + # source://actionview//lib/action_view/template_path.rb#12 def prefix; end # Returns the value of attribute virtual. # - # source://actionview//lib/action_view/template_path.rb#10 + # source://actionview//lib/action_view/template_path.rb#12 def to_s; end # Returns the value of attribute virtual. # - # source://actionview//lib/action_view/template_path.rb#10 + # source://actionview//lib/action_view/template_path.rb#12 def to_str; end # Returns the value of attribute virtual. # - # source://actionview//lib/action_view/template_path.rb#10 + # source://actionview//lib/action_view/template_path.rb#12 def virtual; end # Returns the value of attribute virtual. # - # source://actionview//lib/action_view/template_path.rb#10 + # source://actionview//lib/action_view/template_path.rb#12 def virtual_path; end class << self # Convert name, prefix, and partial into a TemplatePath # - # source://actionview//lib/action_view/template_path.rb#41 + # source://actionview//lib/action_view/template_path.rb#43 def build(name, prefix, partial); end # Build a TemplatePath form a virtual path # - # source://actionview//lib/action_view/template_path.rb#26 + # source://actionview//lib/action_view/template_path.rb#28 def parse(virtual); end # Convert name, prefix, and partial into a virtual path string # - # source://actionview//lib/action_view/template_path.rb#15 + # source://actionview//lib/action_view/template_path.rb#17 def virtual(name, prefix, partial); end end end @@ -14872,7 +15217,7 @@ class ActionView::TemplateRenderer < ::ActionView::AbstractRenderer # context object. If no layout is found, it checks if at least a layout with # the given name exists across all details before raising the error. # - # source://actionview//lib/action_view/renderer/template_renderer.rb#87 + # source://actionview//lib/action_view/renderer/template_renderer.rb#88 def find_layout(layout, keys, formats); end # Renders the given template. A string representing the layout can be @@ -14881,17 +15226,29 @@ class ActionView::TemplateRenderer < ::ActionView::AbstractRenderer # source://actionview//lib/action_view/renderer/template_renderer.rb#58 def render_template(view, template, layout_name, locals); end - # source://actionview//lib/action_view/renderer/template_renderer.rb#70 + # source://actionview//lib/action_view/renderer/template_renderer.rb#71 def render_with_layout(view, template, path, locals); end - # source://actionview//lib/action_view/renderer/template_renderer.rb#91 + # source://actionview//lib/action_view/renderer/template_renderer.rb#92 def resolve_layout(layout, keys, formats); end end # = Action View Test Case # -# source://actionview//lib/action_view/test_case.rb#12 +# Read more about ActionView::TestCase in {Testing Rails Applications}[https://guides.rubyonrails.org/testing.html#testing-view-partials] +# in the guides. +# +# source://actionview//lib/action_view/test_case.rb#15 class ActionView::TestCase < ::ActiveSupport::TestCase + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions::ResponseAssertions + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::Assertions + include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor include ::AbstractController::Helpers include ::ActiveSupport::Benchmarkable include ::ActionView::Helpers::ActiveModelHelper @@ -14899,11 +15256,12 @@ class ActionView::TestCase < ::ActiveSupport::TestCase include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper - include ::ActionView::Helpers::UrlHelper - include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::AssetTagHelper include ::ActionView::Helpers::AtomFeedHelper include ::ActionView::Helpers::CacheHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper + include ::ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::ControllerHelper include ::ActionView::Helpers::CspHelper include ::ActionView::Helpers::CsrfHelper @@ -14911,15 +15269,6 @@ class ActionView::TestCase < ::ActiveSupport::TestCase include ::ActionView::Helpers::DebugHelper include ::ActionView::Helpers::TextHelper include ::ActionView::Helpers::FormTagHelper - include ::ActionDispatch::TestProcess::FixtureFile - include ::ActionDispatch::TestProcess - include ::ActionDispatch::Assertions::ResponseAssertions - include ::ActionDispatch::Assertions::RoutingAssertions - include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable - include ::Rails::Dom::Testing::Assertions::SelectorAssertions - include ::Rails::Dom::Testing::Assertions - include ::ActionDispatch::Assertions include ::ActionController::TemplateAssertions include ::ActionView::Context include ::ActionDispatch::Routing::PolymorphicRoutes @@ -14936,19 +15285,21 @@ class ActionView::TestCase < ::ActiveSupport::TestCase include ::ActionDispatch::Routing::UrlFor include ::ActionView::RoutingUrlFor include ::ActionView::TestCase::Behavior + extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + extend ::AbstractController::Helpers::Resolution extend ::AbstractController::Helpers::ClassMethods extend ::ActionView::Helpers::UrlHelper::ClassMethods extend ::ActionView::Helpers::SanitizeHelper::ClassMethods extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods extend ::ActionView::TestCase::Behavior::ClassMethods - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods=(_arg0); end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods?; end # source://actionview//lib/action_view/helpers/translation_helper.rb#18 @@ -14958,21 +15309,30 @@ class ActionView::TestCase < ::ActiveSupport::TestCase def debug_missing_translation=(val); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods=(value); end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods?; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#15 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#16 def _helpers; end + # source://actionview//lib/action_view/test_case.rb#201 + def content_class; end + + # source://actionview//lib/action_view/test_case.rb#201 + def content_class=(value); end + + # source://actionview//lib/action_view/test_case.rb#201 + def content_class?; end + # source://actionview//lib/action_view/helpers/translation_helper.rb#18 def debug_missing_translation; end @@ -14981,17 +15341,13 @@ class ActionView::TestCase < ::ActiveSupport::TestCase end end -# source://actionview//lib/action_view/test_case.rb#42 +# source://actionview//lib/action_view/test_case.rb#45 module ActionView::TestCase::Behavior include ::ActionDispatch::TestProcess::FixtureFile include ::ActionDispatch::TestProcess - include ::ActionDispatch::Assertions::ResponseAssertions - include ::ActionDispatch::Assertions::RoutingAssertions include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable include ::Rails::Dom::Testing::Assertions::SelectorAssertions include ::Rails::Dom::Testing::Assertions - include ::ActionDispatch::Assertions include ::ActionController::TemplateAssertions include ::ActionView::Context include ::ActionDispatch::Routing::PolymorphicRoutes @@ -15001,6 +15357,8 @@ module ActionView::TestCase::Behavior include ::ActionView::RoutingUrlFor extend ::ActiveSupport::Concern include GeneratedInstanceMethods + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions include ::AbstractController::Helpers include ::ActionView::Helpers::UrlHelper include ::ActionView::Helpers::SanitizeHelper @@ -15012,104 +15370,144 @@ module ActionView::TestCase::Behavior include ::ActiveSupport::Testing::ConstantLookup mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods mixes_in_class_methods ::AbstractController::Helpers::ClassMethods mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods mixes_in_class_methods ::ActionView::TestCase::Behavior::ClassMethods - # source://actionview//lib/action_view/test_case.rb#136 + # source://actionview//lib/action_view/test_case.rb#298 def _routes; end - # source://actionview//lib/action_view/test_case.rb#122 + # source://actionview//lib/action_view/test_case.rb#233 def config; end # Returns the value of attribute controller. # - # source://actionview//lib/action_view/test_case.rb#60 + # source://actionview//lib/action_view/test_case.rb#63 def controller; end # Sets the attribute controller # # @param value the value to set the attribute controller to. # - # source://actionview//lib/action_view/test_case.rb#60 + # source://actionview//lib/action_view/test_case.rb#63 def controller=(_arg0); end - # source://actionview//lib/action_view/test_case.rb#59 + # source://actionview//lib/action_view/test_case.rb#62 def lookup_context(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute output_buffer. # - # source://actionview//lib/action_view/test_case.rb#60 + # source://actionview//lib/action_view/test_case.rb#63 def output_buffer; end # Sets the attribute output_buffer # # @param value the value to set the attribute output_buffer to. # - # source://actionview//lib/action_view/test_case.rb#60 + # source://actionview//lib/action_view/test_case.rb#63 def output_buffer=(_arg0); end - # source://actionview//lib/action_view/test_case.rb#126 + # source://actionview//lib/action_view/test_case.rb#237 def render(options = T.unsafe(nil), local_assigns = T.unsafe(nil), &block); end - # Returns the value of attribute rendered. + # Returns the content rendered by the last +render+ call. # - # source://actionview//lib/action_view/test_case.rb#60 - def rendered; end - - # Sets the attribute rendered + # The returned object behaves like a string but also exposes a number of methods + # that allows you to parse the content string in formats registered using + # .register_parser. + # + # By default includes the following parsers: + # + # +.html+ + # + # Parse the rendered content String into HTML. By default, this means + # a Nokogiri::XML::Node. + # + # test "renders HTML" do + # article = Article.create!(title: "Hello, world") + # + # render partial: "articles/article", locals: { article: article } + # + # assert_pattern { rendered.html.at("main h1") => { content: "Hello, world" } } + # end + # + # To parse the rendered content into a Capybara::Simple::Node, + # re-register an :html parser with a call to + # Capybara.string: + # + # register_parser :html, -> rendered { Capybara.string(rendered) } + # + # test "renders HTML" do + # article = Article.create!(title: "Hello, world") + # + # render partial: article + # + # rendered.html.assert_css "h1", text: "Hello, world" + # end + # + # +.json+ + # + # Parse the rendered content String into JSON. By default, this means + # a ActiveSupport::HashWithIndifferentAccess. + # + # test "renders JSON" do + # article = Article.create!(title: "Hello, world") # - # @param value the value to set the attribute rendered to. + # render formats: :json, partial: "articles/article", locals: { article: article } # - # source://actionview//lib/action_view/test_case.rb#60 - def rendered=(_arg0); end + # assert_pattern { rendered.json => { title: "Hello, world" } } + # end + # + # source://actionview//lib/action_view/test_case.rb#294 + def rendered; end - # source://actionview//lib/action_view/test_case.rb#132 + # source://actionview//lib/action_view/test_case.rb#243 def rendered_views; end # Returns the value of attribute request. # - # source://actionview//lib/action_view/test_case.rb#60 + # source://actionview//lib/action_view/test_case.rb#63 def request; end # Sets the attribute request # # @param value the value to set the attribute request to. # - # source://actionview//lib/action_view/test_case.rb#60 + # source://actionview//lib/action_view/test_case.rb#63 def request=(_arg0); end - # source://actionview//lib/action_view/test_case.rb#108 + # source://actionview//lib/action_view/test_case.rb#221 def setup_with_controller; end private - # source://actionview//lib/action_view/test_case.rb#251 + # source://actionview//lib/action_view/test_case.rb#405 def _user_defined_ivars; end # The instance of ActionView::Base that is used by +render+. # - # source://actionview//lib/action_view/test_case.rb#207 + # source://actionview//lib/action_view/test_case.rb#357 def _view; end # Need to experiment if this priority is the best one: rendered => output_buffer # - # source://actionview//lib/action_view/test_case.rb#183 + # source://actionview//lib/action_view/test_case.rb#333 def document_root_element; end - # source://actionview//lib/action_view/test_case.rb#265 - def method_missing(selector, *args); end + # source://actionview//lib/action_view/test_case.rb#419 + def method_missing(selector, *args, **_arg2); end # @return [Boolean] # - # source://actionview//lib/action_view/test_case.rb#281 + # source://actionview//lib/action_view/test_case.rb#436 def respond_to_missing?(name, include_private = T.unsafe(nil)); end # The instance of ActionView::Base that is used by +render+. # - # source://actionview//lib/action_view/test_case.rb#207 + # source://actionview//lib/action_view/test_case.rb#357 def view; end # Returns a Hash of instance variables and their values, as defined by @@ -15117,13 +15515,16 @@ module ActionView::TestCase::Behavior # rendered. This is generally intended for internal use and extension # frameworks. # - # source://actionview//lib/action_view/test_case.rb#259 + # source://actionview//lib/action_view/test_case.rb#413 def view_assigns; end module GeneratedClassMethods def _helper_methods; end def _helper_methods=(value); end def _helper_methods?; end + def content_class; end + def content_class=(value); end + def content_class?; end end module GeneratedInstanceMethods @@ -15133,159 +15534,244 @@ module ActionView::TestCase::Behavior end end -# source://actionview//lib/action_view/test_case.rb#62 +# source://actionview//lib/action_view/test_case.rb#65 module ActionView::TestCase::Behavior::ClassMethods - # source://actionview//lib/action_view/test_case.rb#72 + # source://actionview//lib/action_view/test_case.rb#164 def determine_default_helper_class(name); end - # source://actionview//lib/action_view/test_case.rb#92 + # source://actionview//lib/action_view/test_case.rb#184 def helper_class; end # Sets the attribute helper_class # # @param value the value to set the attribute helper_class to. # - # source://actionview//lib/action_view/test_case.rb#90 + # source://actionview//lib/action_view/test_case.rb#182 def helper_class=(_arg0); end - # source://actionview//lib/action_view/test_case.rb#78 + # source://actionview//lib/action_view/test_case.rb#170 def helper_method(*methods); end - # source://actionview//lib/action_view/test_case.rb#96 + # source://actionview//lib/action_view/test_case.rb#66 + def inherited(descendant); end + + # source://actionview//lib/action_view/test_case.rb#188 def new(*_arg0); end - # source://actionview//lib/action_view/test_case.rb#63 + # Register a callable to parse rendered content for a given template + # format. + # + # Each registered parser will also define a +#rendered.[FORMAT]+ helper + # method, where +[FORMAT]+ corresponds to the value of the + # +format+ argument. + # + # By default, ActionView::TestCase defines parsers for: + # + # * +:html+ - returns an instance of +Nokogiri::XML::Node+ + # * +:json+ - returns an instance of ActiveSupport::HashWithIndifferentAccess + # + # These pre-registered parsers also define corresponding helpers: + # + # * +:html+ - defines +rendered.html+ + # * +:json+ - defines +rendered.json+ + # + # ==== Parameters + # + # [+format+] + # The name (as a +Symbol+) of the format used to render the content. + # + # [+callable+] + # The parser. A callable object that accepts the rendered string as + # its sole argument. Alternatively, the parser can be specified as a + # block. + # + # ==== Examples + # + # test "renders HTML" do + # article = Article.create!(title: "Hello, world") + # + # render partial: "articles/article", locals: { article: article } + # + # assert_pattern { rendered.html.at("main h1") => { content: "Hello, world" } } + # end + # + # test "renders JSON" do + # article = Article.create!(title: "Hello, world") + # + # render formats: :json, partial: "articles/article", locals: { article: article } + # + # assert_pattern { rendered.json => { title: "Hello, world" } } + # end + # + # To parse the rendered content into RSS, register a call to +RSS::Parser.parse+: + # + # register_parser :rss, -> rendered { RSS::Parser.parse(rendered) } + # + # test "renders RSS" do + # article = Article.create!(title: "Hello, world") + # + # render formats: :rss, partial: article + # + # assert_equal "Hello, world", rendered.rss.items.last.title + # end + # + # To parse the rendered content into a +Capybara::Simple::Node+, + # re-register an +:html+ parser with a call to +Capybara.string+: + # + # register_parser :html, -> rendered { Capybara.string(rendered) } + # + # test "renders HTML" do + # article = Article.create!(title: "Hello, world") + # + # render partial: article + # + # rendered.html.assert_css "h1", text: "Hello, world" + # end + # + # source://actionview//lib/action_view/test_case.rb#148 + def register_parser(format, callable = T.unsafe(nil), &block); end + + # source://actionview//lib/action_view/test_case.rb#155 def tests(helper_class); end private - # source://actionview//lib/action_view/test_case.rb#102 + # source://actionview//lib/action_view/test_case.rb#194 def include_helper_modules!; end end -# source://actionview//lib/action_view/test_case.rb#220 +# source://actionview//lib/action_view/test_case.rb#370 ActionView::TestCase::Behavior::INTERNAL_IVARS = T.let(T.unsafe(nil), Array) -# source://actionview//lib/action_view/test_case.rb#187 +# source://actionview//lib/action_view/test_case.rb#337 module ActionView::TestCase::Behavior::Locals - # source://actionview//lib/action_view/test_case.rb#190 + # source://actionview//lib/action_view/test_case.rb#340 def render(options = T.unsafe(nil), local_assigns = T.unsafe(nil)); end # Returns the value of attribute rendered_views. # - # source://actionview//lib/action_view/test_case.rb#188 + # source://actionview//lib/action_view/test_case.rb#338 def rendered_views; end # Sets the attribute rendered_views # # @param value the value to set the attribute rendered_views to. # - # source://actionview//lib/action_view/test_case.rb#188 + # source://actionview//lib/action_view/test_case.rb#338 def rendered_views=(_arg0); end end +# source://actionview//lib/action_view/test_case.rb#302 +class ActionView::TestCase::Behavior::RenderedViewContent < ::String + # source://actionview//lib/action_view/test_case.rb#150 + def html; end + + # source://actionview//lib/action_view/test_case.rb#150 + def json; end +end + # Need to experiment if this priority is the best one: rendered => output_buffer # -# source://actionview//lib/action_view/test_case.rb#141 +# source://actionview//lib/action_view/test_case.rb#306 class ActionView::TestCase::Behavior::RenderedViewsCollection # @return [RenderedViewsCollection] a new instance of RenderedViewsCollection # - # source://actionview//lib/action_view/test_case.rb#142 + # source://actionview//lib/action_view/test_case.rb#307 def initialize; end - # source://actionview//lib/action_view/test_case.rb#146 + # source://actionview//lib/action_view/test_case.rb#311 def add(view, locals); end - # source://actionview//lib/action_view/test_case.rb#151 + # source://actionview//lib/action_view/test_case.rb#316 def locals_for(view); end - # source://actionview//lib/action_view/test_case.rb#155 + # source://actionview//lib/action_view/test_case.rb#320 def rendered_views; end # @return [Boolean] # - # source://actionview//lib/action_view/test_case.rb#159 + # source://actionview//lib/action_view/test_case.rb#324 def view_rendered?(view, expected_locals); end end # source://actionview//lib/action_view/test_case.rb#0 module ActionView::TestCase::HelperMethods - # source://actionview//lib/action_view/test_case.rb#175 + # source://actionview//lib/action_view/test_case.rb#215 def _test_case; end - # source://actionview//lib/action_view/test_case.rb#171 + # source://actionview//lib/action_view/test_case.rb#211 def protect_against_forgery?; end end -# source://actionview//lib/action_view/test_case.rb#13 +# source://actionview//lib/action_view/test_case.rb#16 class ActionView::TestCase::TestController < ::ActionController::Base include ::ActionDispatch::TestProcess::FixtureFile include ::ActionDispatch::TestProcess # @return [TestController] a new instance of TestController # - # source://actionview//lib/action_view/test_case.rb#31 + # source://actionview//lib/action_view/test_case.rb#34 def initialize; end - # source://actionview//lib/action_view/test_case.rb#23 + # source://actionview//lib/action_view/test_case.rb#26 def controller_path=(path); end # Returns the value of attribute params. # - # source://actionview//lib/action_view/test_case.rb#16 + # source://actionview//lib/action_view/test_case.rb#19 def params; end # Sets the attribute params # # @param value the value to set the attribute params to. # - # source://actionview//lib/action_view/test_case.rb#16 + # source://actionview//lib/action_view/test_case.rb#19 def params=(_arg0); end # Returns the value of attribute request. # - # source://actionview//lib/action_view/test_case.rb#16 + # source://actionview//lib/action_view/test_case.rb#19 def request; end # Sets the attribute request # # @param value the value to set the attribute request to. # - # source://actionview//lib/action_view/test_case.rb#16 + # source://actionview//lib/action_view/test_case.rb#19 def request=(_arg0); end # Returns the value of attribute response. # - # source://actionview//lib/action_view/test_case.rb#16 + # source://actionview//lib/action_view/test_case.rb#19 def response; end # Sets the attribute response # # @param value the value to set the attribute response to. # - # source://actionview//lib/action_view/test_case.rb#16 + # source://actionview//lib/action_view/test_case.rb#19 def response=(_arg0); end private - # source://actionview//lib/action_view/layouts.rb#328 + # source://actionview//lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://actionview//lib/action_view/test_case.rb#27 + # source://actionview//lib/action_view/test_case.rb#30 def controller_name; end # Overrides AbstractController::Base#controller_path # - # source://actionview//lib/action_view/test_case.rb#20 + # source://actionview//lib/action_view/test_case.rb#23 def controller_path; end # Overrides AbstractController::Base#controller_path # - # source://actionview//lib/action_view/test_case.rb#20 + # source://actionview//lib/action_view/test_case.rb#23 def controller_path=(_arg0); end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -15300,6 +15786,9 @@ class ActionView::UnboundTemplate # source://actionview//lib/action_view/unbound_template.rb#20 def bind_locals(locals); end + # source://actionview//lib/action_view/unbound_template.rb#44 + def built_templates; end + # Returns the value of attribute details. # # source://actionview//lib/action_view/unbound_template.rb#7 @@ -15324,10 +15813,10 @@ class ActionView::UnboundTemplate private - # source://actionview//lib/action_view/unbound_template.rb#39 + # source://actionview//lib/action_view/unbound_template.rb#49 def build_template(locals); end - # source://actionview//lib/action_view/unbound_template.rb#53 + # source://actionview//lib/action_view/unbound_template.rb#63 def normalize_locals(locals); end end @@ -15341,7 +15830,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) @@ -15357,7 +15846,7 @@ module ActionView::ViewPaths # The prefixes used in render "foo" shortcuts. # - # source://actionview//lib/action_view/view_paths.rb#90 + # source://actionview//lib/action_view/view_paths.rb#81 def _prefixes; end # source://actionview//lib/action_view/view_paths.rb#11 @@ -15370,10 +15859,10 @@ module ActionView::ViewPaths # the default view path. You may also provide a custom view path # (see ActionView::PathSet for more information) # - # source://actionview//lib/action_view/view_paths.rb#112 + # source://actionview//lib/action_view/view_paths.rb#103 def append_view_path(path); end - # source://actionview//lib/action_view/view_paths.rb#102 + # source://actionview//lib/action_view/view_paths.rb#93 def details_for_lookup; end # source://actionview//lib/action_view/view_paths.rb#11 @@ -15392,7 +15881,7 @@ module ActionView::ViewPaths # information required for looking up templates, i.e. view paths and # details. Check ActionView::LookupContext for more information. # - # source://actionview//lib/action_view/view_paths.rb#97 + # source://actionview//lib/action_view/view_paths.rb#88 def lookup_context; end # Prepend a path to the list of view paths for the current LookupContext. @@ -15402,7 +15891,7 @@ module ActionView::ViewPaths # the default view path. You may also provide a custom view path # (see ActionView::PathSet for more information) # - # source://actionview//lib/action_view/view_paths.rb#122 + # source://actionview//lib/action_view/view_paths.rb#113 def prepend_view_path(path); end # source://actionview//lib/action_view/view_paths.rb#11 @@ -15410,21 +15899,13 @@ module ActionView::ViewPaths # source://actionview//lib/action_view/view_paths.rb#11 def view_paths(*_arg0, **_arg1, &_arg2); end - - class << self - # source://actionview//lib/action_view/view_paths.rb#84 - def all_view_paths; end - - # source://actionview//lib/action_view/view_paths.rb#76 - def get_view_paths(klass); end - - # source://actionview//lib/action_view/view_paths.rb#80 - def set_view_paths(klass, paths); end - end end # source://actionview//lib/action_view/view_paths.rb#14 module ActionView::ViewPaths::ClassMethods + # source://actionview//lib/action_view/view_paths.rb#31 + def _build_view_paths(paths); end + # source://actionview//lib/action_view/view_paths.rb#23 def _prefixes; end @@ -15441,7 +15922,7 @@ module ActionView::ViewPaths::ClassMethods # the default view path. You may also provide a custom view path # (see ActionView::PathSet for more information) # - # source://actionview//lib/action_view/view_paths.rb#37 + # source://actionview//lib/action_view/view_paths.rb#44 def append_view_path(path); end # Prepend a path to the list of view paths for this controller. @@ -15451,12 +15932,12 @@ module ActionView::ViewPaths::ClassMethods # the default view path. You may also provide a custom view path # (see ActionView::PathSet for more information) # - # source://actionview//lib/action_view/view_paths.rb#47 + # source://actionview//lib/action_view/view_paths.rb#54 def prepend_view_path(path); end # A list of all of the default view paths for this controller. # - # source://actionview//lib/action_view/view_paths.rb#52 + # source://actionview//lib/action_view/view_paths.rb#59 def view_paths; end # Set the view paths. @@ -15465,7 +15946,7 @@ module ActionView::ViewPaths::ClassMethods # * paths - If a PathSet is provided, use that; # otherwise, process the parameter into a PathSet. # - # source://actionview//lib/action_view/view_paths.rb#61 + # source://actionview//lib/action_view/view_paths.rb#68 def view_paths=(paths); end private @@ -15473,18 +15954,18 @@ module ActionView::ViewPaths::ClassMethods # Override this method in your controller if you want to change paths prefixes for finding views. # Prefixes defined here will still be added to parents' ._prefixes. # - # source://actionview//lib/action_view/view_paths.rb#68 + # source://actionview//lib/action_view/view_paths.rb#75 def local_prefixes; end end -# source://actionview//lib/action_view/template/error.rb#13 +# source://actionview//lib/action_view/template/error.rb#14 class ActionView::WrongEncodingError < ::ActionView::EncodingError # @return [WrongEncodingError] a new instance of WrongEncodingError # - # source://actionview//lib/action_view/template/error.rb#14 + # source://actionview//lib/action_view/template/error.rb#15 def initialize(string, encoding); end - # source://actionview//lib/action_view/template/error.rb#18 + # source://actionview//lib/action_view/template/error.rb#19 def message; end end diff --git a/sorbet/rbi/gems/activejob@7.0.6.rbi b/sorbet/rbi/gems/activejob@7.1.3.2.rbi similarity index 79% rename from sorbet/rbi/gems/activejob@7.0.6.rbi rename to sorbet/rbi/gems/activejob@7.1.3.2.rbi index d1233d530..bc5af0e44 100644 --- a/sorbet/rbi/gems/activejob@7.0.6.rbi +++ b/sorbet/rbi/gems/activejob@7.1.3.2.rbi @@ -4,20 +4,53 @@ # 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 +# # source://activejob//lib/active_job/gem_version.rb#3 module ActiveJob extend ::ActiveSupport::Autoload class << self - # Returns the currently loaded version of Active Job as a Gem::Version. + # source://activejob//lib/active_job/queue_adapter.rb#7 + def adapter_name(adapter); end + + # source://activejob//lib/active_job/deprecator.rb#4 + def deprecator; end + + # Returns the currently loaded version of Active Job as a +Gem::Version+. # # source://activejob//lib/active_job/gem_version.rb#5 def gem_version; end - # Returns the currently loaded version of Active Job as a Gem::Version. + # Push many jobs onto the queue at once without running enqueue callbacks. + # Queue adapters may communicate the enqueue status of each job by setting + # successfully_enqueued and/or enqueue_error on the passed-in job instances. + # + # source://activejob//lib/active_job/enqueuing.rb#16 + def perform_all_later(*jobs); end + + # source://activejob//lib/active_job.rb#53 + def use_big_decimal_serializer; end + + # source://activejob//lib/active_job.rb#53 + def use_big_decimal_serializer=(_arg0); end + + # source://activejob//lib/active_job.rb#61 + def verbose_enqueue_logs; end + + # source://activejob//lib/active_job.rb#61 + def verbose_enqueue_logs=(_arg0); end + + # Returns the currently loaded version of Active Job as a +Gem::Version+. # # source://activejob//lib/active_job/version.rb#7 def version; end + + private + + # source://activejob//lib/active_job/instrumentation.rb#6 + def instrument_enqueue_all(queue_adapter, jobs); end end end @@ -43,66 +76,63 @@ module ActiveJob::Arguments private - # source://activejob//lib/active_job/arguments.rb#204 + # source://activejob//lib/active_job/arguments.rb#201 def convert_to_global_id_hash(argument); end # @return [Boolean] # - # source://activejob//lib/active_job/arguments.rb#151 + # source://activejob//lib/active_job/arguments.rb#148 def custom_serialized?(hash); end - # source://activejob//lib/active_job/arguments.rb#122 + # source://activejob//lib/active_job/arguments.rb#119 def deserialize_argument(argument); end - # source://activejob//lib/active_job/arguments.rb#147 + # source://activejob//lib/active_job/arguments.rb#144 def deserialize_global_id(hash); end - # source://activejob//lib/active_job/arguments.rb#161 + # source://activejob//lib/active_job/arguments.rb#158 def deserialize_hash(serialized_hash); end - # source://activejob//lib/active_job/arguments.rb#95 + # source://activejob//lib/active_job/arguments.rb#71 def serialize_argument(argument); end - # source://activejob//lib/active_job/arguments.rb#155 + # source://activejob//lib/active_job/arguments.rb#152 def serialize_hash(argument); end - # source://activejob//lib/active_job/arguments.rb#174 + # source://activejob//lib/active_job/arguments.rb#171 def serialize_hash_key(key); end - # source://activejob//lib/active_job/arguments.rb#185 + # source://activejob//lib/active_job/arguments.rb#182 def serialize_indifferent_hash(indifferent_hash); end # @return [Boolean] # - # source://activejob//lib/active_job/arguments.rb#143 + # source://activejob//lib/active_job/arguments.rb#140 def serialized_global_id?(hash); end - # source://activejob//lib/active_job/arguments.rb#191 + # source://activejob//lib/active_job/arguments.rb#188 def transform_symbol_keys(hash, symbol_keys); end end -# source://activejob//lib/active_job/arguments.rb#52 +# source://activejob//lib/active_job/arguments.rb#50 ActiveJob::Arguments::GLOBALID_KEY = T.let(T.unsafe(nil), String) -# source://activejob//lib/active_job/arguments.rb#60 +# source://activejob//lib/active_job/arguments.rb#58 ActiveJob::Arguments::OBJECT_SERIALIZER_KEY = T.let(T.unsafe(nil), String) -# source://activejob//lib/active_job/arguments.rb#50 -ActiveJob::Arguments::PERMITTED_TYPES = T.let(T.unsafe(nil), Array) - -# source://activejob//lib/active_job/arguments.rb#63 +# source://activejob//lib/active_job/arguments.rb#61 ActiveJob::Arguments::RESERVED_KEYS = T.let(T.unsafe(nil), Array) -# source://activejob//lib/active_job/arguments.rb#56 +# source://activejob//lib/active_job/arguments.rb#54 ActiveJob::Arguments::RUBY2_KEYWORDS_KEY = T.let(T.unsafe(nil), String) -# source://activejob//lib/active_job/arguments.rb#54 +# source://activejob//lib/active_job/arguments.rb#52 ActiveJob::Arguments::SYMBOL_KEYS_KEY = T.let(T.unsafe(nil), String) -# source://activejob//lib/active_job/arguments.rb#58 +# source://activejob//lib/active_job/arguments.rb#56 ActiveJob::Arguments::WITH_INDIFFERENT_ACCESS_KEY = T.let(T.unsafe(nil), String) -# = Active Job +# = Active Job \Base # # Active Job objects can be configured to work with different backend # queuing frameworks. To specify a queue adapter to use: @@ -180,32 +210,41 @@ class ActiveJob::Base extend ::Sidekiq::Job::Options::ClassMethods extend ::ActiveJob::TestHelper::TestQueueAdapter::ClassMethods - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _enqueue_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _perform_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_enqueue_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_perform_callbacks(&block); end + # source://activejob//lib/active_job/exceptions.rb#12 + def after_discard_procs; end + + # source://activejob//lib/active_job/exceptions.rb#12 + def after_discard_procs=(_arg0); end + + # source://activejob//lib/active_job/exceptions.rb#12 + def after_discard_procs?; end + # source://activejob//lib/active_job/logging.rb#11 def logger; end # source://activejob//lib/active_job/logging.rb#11 def logger=(val); end - # source://activejob//lib/active_job/queue_adapter.rb#15 - def queue_adapter(*_arg0, **_arg1, &_arg2); end + # source://activejob//lib/active_job/queue_adapter.rb#26 + def queue_adapter(&block); end # source://activejob//lib/active_job/queue_name.rb#57 def queue_name_prefix; end @@ -216,65 +255,65 @@ class ActiveJob::Base # source://activejob//lib/active_job/queue_name.rb#57 def queue_name_prefix?; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#137 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#137 def sidekiq_options_hash; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#149 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#149 def sidekiq_options_hash=(_arg0); end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#137 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#137 def sidekiq_retries_exhausted_block; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#149 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#149 def sidekiq_retries_exhausted_block=(_arg0); end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#137 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#137 def sidekiq_retry_in_block; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#149 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#149 def sidekiq_retry_in_block=(_arg0); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _enqueue_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _enqueue_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _perform_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _perform_callbacks=(value); end - # source://activejob//lib/active_job/queue_adapter.rb#13 + # source://activejob//lib/active_job/queue_adapter.rb#24 def _queue_adapter; end - # source://activejob//lib/active_job/queue_adapter.rb#13 + # source://activejob//lib/active_job/queue_adapter.rb#24 def _queue_adapter=(value); end - # source://activejob//lib/active_job/queue_adapter.rb#12 + # source://activejob//lib/active_job/queue_adapter.rb#23 def _queue_adapter_name; end - # source://activejob//lib/active_job/queue_adapter.rb#12 + # source://activejob//lib/active_job/queue_adapter.rb#23 def _queue_adapter_name=(value); end # source://activejob//lib/active_job/test_helper.rb#19 @@ -283,6 +322,15 @@ class ActiveJob::Base # source://activejob//lib/active_job/test_helper.rb#19 def _test_adapter=(value); end + # source://activejob//lib/active_job/exceptions.rb#12 + def after_discard_procs; end + + # source://activejob//lib/active_job/exceptions.rb#12 + def after_discard_procs=(value); end + + # source://activejob//lib/active_job/exceptions.rb#12 + def after_discard_procs?; end + # source://activejob//lib/active_job/logging.rb#12 def log_arguments; end @@ -298,13 +346,13 @@ class ActiveJob::Base # source://activejob//lib/active_job/logging.rb#11 def logger=(val); end - # source://activejob//lib/active_job/queue_priority.rb#32 + # source://activejob//lib/active_job/queue_priority.rb#49 def priority; end - # source://activejob//lib/active_job/queue_priority.rb#32 + # source://activejob//lib/active_job/queue_priority.rb#49 def priority=(value); end - # source://activejob//lib/active_job/queue_priority.rb#32 + # source://activejob//lib/active_job/queue_priority.rb#49 def priority?; end # source://activejob//lib/active_job/queue_name.rb#55 @@ -334,13 +382,13 @@ class ActiveJob::Base # source://activejob//lib/active_job/queue_name.rb#57 def queue_name_prefix?; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # source://activejob//lib/active_job/exceptions.rb#11 @@ -349,44 +397,38 @@ class ActiveJob::Base # source://activejob//lib/active_job/exceptions.rb#11 def retry_jitter=(value); end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#104 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#104 def sidekiq_options_hash; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#112 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#112 def sidekiq_options_hash=(val); end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#104 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#104 def sidekiq_retries_exhausted_block; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#112 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#112 def sidekiq_retries_exhausted_block=(val); end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#104 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#104 def sidekiq_retry_in_block; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#112 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#112 def sidekiq_retry_in_block=(val); end - # source://activesupport/7.0.6/lib/active_support/deprecation/method_wrappers.rb#63 - def skip_after_callbacks_if_terminated(*args, **_arg1, &block); end - - # source://activesupport/7.0.6/lib/active_support/deprecation/method_wrappers.rb#63 - def skip_after_callbacks_if_terminated=(*args, **_arg1, &block); end - private - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#99 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#99 def __synchronized_sidekiq_options_hash; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#99 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#99 def __synchronized_sidekiq_retries_exhausted_block; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#99 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#99 def __synchronized_sidekiq_retry_in_block; end end end -# = Active Job Callbacks +# = Active Job \Callbacks # # Active Job provides hooks during the life cycle of a job. Callbacks allow you # to trigger logic during this cycle. Available callbacks are: @@ -413,16 +455,16 @@ module ActiveJob::Callbacks mixes_in_class_methods ::ActiveJob::Callbacks::ClassMethods class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _execute_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_execute_callbacks(&block); end end @@ -441,7 +483,7 @@ end # These methods will be included into any Active Job object, adding # callbacks for +perform+ and +enqueue+ methods. # -# source://activejob//lib/active_job/callbacks.rb#40 +# source://activejob//lib/active_job/callbacks.rb#37 module ActiveJob::Callbacks::ClassMethods # Defines a callback that will get called right after the # job is enqueued. @@ -450,7 +492,8 @@ module ActiveJob::Callbacks::ClassMethods # queue_as :default # # after_enqueue do |job| - # $statsd.increment "enqueue-video-job.success" + # result = job.successfully_enqueued? ? "success" : "failure" + # $statsd.increment "enqueue-video-job.#{result}" # end # # def perform(video_id) @@ -458,7 +501,7 @@ module ActiveJob::Callbacks::ClassMethods # end # end # - # source://activejob//lib/active_job/callbacks.rb#146 + # source://activejob//lib/active_job/callbacks.rb#144 def after_enqueue(*filters, &blk); end # Defines a callback that will get called right after the @@ -476,7 +519,7 @@ module ActiveJob::Callbacks::ClassMethods # end # end # - # source://activejob//lib/active_job/callbacks.rb#75 + # source://activejob//lib/active_job/callbacks.rb#72 def after_perform(*filters, &blk); end # Defines a callback that will get called around the enqueuing @@ -496,7 +539,7 @@ module ActiveJob::Callbacks::ClassMethods # end # end # - # source://activejob//lib/active_job/callbacks.rb#167 + # source://activejob//lib/active_job/callbacks.rb#165 def around_enqueue(*filters, &blk); end # Defines a callback that will get called around the job's perform method. @@ -528,7 +571,7 @@ module ActiveJob::Callbacks::ClassMethods # end # end # - # source://activejob//lib/active_job/callbacks.rb#108 + # source://activejob//lib/active_job/callbacks.rb#105 def around_perform(*filters, &blk); end # Defines a callback that will get called right before the @@ -546,7 +589,7 @@ module ActiveJob::Callbacks::ClassMethods # end # end # - # source://activejob//lib/active_job/callbacks.rb#127 + # source://activejob//lib/active_job/callbacks.rb#124 def before_enqueue(*filters, &blk); end # Defines a callback that will get called right before the @@ -564,7 +607,7 @@ module ActiveJob::Callbacks::ClassMethods # end # end # - # source://activejob//lib/active_job/callbacks.rb#56 + # source://activejob//lib/active_job/callbacks.rb#53 def before_perform(*filters, &blk); end end @@ -575,6 +618,9 @@ class ActiveJob::ConfiguredJob # source://activejob//lib/active_job/configured_job.rb#5 def initialize(job_class, options = T.unsafe(nil)); end + # source://activejob//lib/active_job/configured_job.rb#18 + def perform_all_later(multi_args); end + # source://activejob//lib/active_job/configured_job.rb#14 def perform_later(*_arg0, **_arg1, &_arg2); end @@ -582,10 +628,12 @@ class ActiveJob::ConfiguredJob def perform_now(*_arg0, **_arg1, &_arg2); end end +# = Active Job \Core +# # Provides general behavior that will be included into every Active Job # object that inherits from ActiveJob::Base. # -# source://activejob//lib/active_job/core.rb#6 +# source://activejob//lib/active_job/core.rb#8 module ActiveJob::Core extend ::ActiveSupport::Concern @@ -594,17 +642,20 @@ module ActiveJob::Core # Creates a new job instance. Takes the arguments that will be # passed to the perform method. # - # source://activejob//lib/active_job/core.rb#91 + # source://activejob//lib/active_job/core.rb#95 def initialize(*arguments, **_arg1); end + # source://activejob//lib/active_job/core.rb#18 + def _scheduled_at_time; end + # Job arguments # - # source://activejob//lib/active_job/core.rb#10 + # source://activejob//lib/active_job/core.rb#12 def arguments; end # Job arguments # - # source://activejob//lib/active_job/core.rb#10 + # source://activejob//lib/active_job/core.rb#12 def arguments=(_arg0); end # Attaches the stored job data to the current instance. Receives a hash @@ -634,27 +685,27 @@ module ActiveJob::Core # end # end # - # source://activejob//lib/active_job/core.rb#146 + # source://activejob//lib/active_job/core.rb#153 def deserialize(job_data); end # Track any exceptions raised by the backend so callers can inspect the errors. # - # source://activejob//lib/active_job/core.rb#54 + # source://activejob//lib/active_job/core.rb#58 def enqueue_error; end # Track any exceptions raised by the backend so callers can inspect the errors. # - # source://activejob//lib/active_job/core.rb#54 + # source://activejob//lib/active_job/core.rb#58 def enqueue_error=(_arg0); end # Track when a job was enqueued # - # source://activejob//lib/active_job/core.rb#44 + # source://activejob//lib/active_job/core.rb#48 def enqueued_at; end # Track when a job was enqueued # - # source://activejob//lib/active_job/core.rb#44 + # source://activejob//lib/active_job/core.rb#48 def enqueued_at=(_arg0); end # Hash that contains the number of times this job handled errors for each specific retry_on declaration. @@ -662,7 +713,7 @@ module ActiveJob::Core # while its associated value holds the number of executions where the corresponding retry_on # declaration handled one of its listed exceptions. # - # source://activejob//lib/active_job/core.rb#35 + # source://activejob//lib/active_job/core.rb#39 def exception_executions; end # Hash that contains the number of times this job handled errors for each specific retry_on declaration. @@ -670,135 +721,133 @@ module ActiveJob::Core # while its associated value holds the number of executions where the corresponding retry_on # declaration handled one of its listed exceptions. # - # source://activejob//lib/active_job/core.rb#35 + # source://activejob//lib/active_job/core.rb#39 def exception_executions=(_arg0); end # Number of times this job has been executed (which increments on every retry, like after an exception). # - # source://activejob//lib/active_job/core.rb#29 + # source://activejob//lib/active_job/core.rb#33 def executions; end # Number of times this job has been executed (which increments on every retry, like after an exception). # - # source://activejob//lib/active_job/core.rb#29 + # source://activejob//lib/active_job/core.rb#33 def executions=(_arg0); end # Job Identifier # - # source://activejob//lib/active_job/core.rb#17 + # source://activejob//lib/active_job/core.rb#21 def job_id; end # Job Identifier # - # source://activejob//lib/active_job/core.rb#17 + # source://activejob//lib/active_job/core.rb#21 def job_id=(_arg0); end # I18n.locale to be used during the job. # - # source://activejob//lib/active_job/core.rb#38 + # source://activejob//lib/active_job/core.rb#42 def locale; end # I18n.locale to be used during the job. # - # source://activejob//lib/active_job/core.rb#38 + # source://activejob//lib/active_job/core.rb#42 def locale=(_arg0); end # Priority that the job will have (lower is more priority). # - # source://activejob//lib/active_job/core.rb#23 + # source://activejob//lib/active_job/core.rb#27 def priority=(_arg0); end # ID optionally provided by adapter # - # source://activejob//lib/active_job/core.rb#26 + # source://activejob//lib/active_job/core.rb#30 def provider_job_id; end # ID optionally provided by adapter # - # source://activejob//lib/active_job/core.rb#26 + # source://activejob//lib/active_job/core.rb#30 def provider_job_id=(_arg0); end # Queue in which the job will reside. # - # source://activejob//lib/active_job/core.rb#20 + # source://activejob//lib/active_job/core.rb#24 def queue_name=(_arg0); end - # Timestamp when the job should be performed + # Time when the job should be performed # - # source://activejob//lib/active_job/core.rb#14 + # source://activejob//lib/active_job/core.rb#16 def scheduled_at; end - # Timestamp when the job should be performed - # - # source://activejob//lib/active_job/core.rb#14 - def scheduled_at=(_arg0); end + # source://activejob//lib/active_job/core.rb#177 + def scheduled_at=(value); end # Returns a hash with the job data that can safely be passed to the # queuing adapter. # - # source://activejob//lib/active_job/core.rb#104 + # source://activejob//lib/active_job/core.rb#110 def serialize; end # Sets the attribute serialized_arguments # # @param value the value to set the attribute serialized_arguments to. # - # source://activejob//lib/active_job/core.rb#11 + # source://activejob//lib/active_job/core.rb#13 def serialized_arguments=(_arg0); end # Configures the job with the given options. # - # source://activejob//lib/active_job/core.rb#160 + # source://activejob//lib/active_job/core.rb#168 def set(options = T.unsafe(nil)); end # Track whether the adapter received the job successfully. # - # source://activejob//lib/active_job/core.rb#47 + # source://activejob//lib/active_job/core.rb#51 def successfully_enqueued=(_arg0); end # @return [Boolean] # - # source://activejob//lib/active_job/core.rb#49 + # source://activejob//lib/active_job/core.rb#53 def successfully_enqueued?; end # Timezone to be used during the job. # - # source://activejob//lib/active_job/core.rb#41 + # source://activejob//lib/active_job/core.rb#45 def timezone; end # Timezone to be used during the job. # - # source://activejob//lib/active_job/core.rb#41 + # source://activejob//lib/active_job/core.rb#45 def timezone=(_arg0); end private # @return [Boolean] # - # source://activejob//lib/active_job/core.rb#193 + # source://activejob//lib/active_job/core.rb#213 def arguments_serialized?; end - # source://activejob//lib/active_job/core.rb#189 + # source://activejob//lib/active_job/core.rb#209 def deserialize_arguments(serialized_args); end - # source://activejob//lib/active_job/core.rb#178 + # source://activejob//lib/active_job/core.rb#198 def deserialize_arguments_if_needed; end - # source://activejob//lib/active_job/core.rb#185 + # source://activejob//lib/active_job/core.rb#205 def serialize_arguments(arguments); end - # source://activejob//lib/active_job/core.rb#170 + # source://activejob//lib/active_job/core.rb#190 def serialize_arguments_if_needed(arguments); end end # These methods will be included into any Active Job object, adding # helpers for de/serialization and creation of job instances. # -# source://activejob//lib/active_job/core.rb#58 +# source://activejob//lib/active_job/core.rb#62 module ActiveJob::Core::ClassMethods # Creates a new job instance from a hash created with +serialize+ # - # source://activejob//lib/active_job/core.rb#60 + # source://activejob//lib/active_job/core.rb#64 def deserialize(job_data); end # Creates a job preconfigured with the given options. You can call @@ -820,7 +869,7 @@ module ActiveJob::Core::ClassMethods # VideoJob.set(queue: :some_queue, wait_until: Time.now.tomorrow).perform_later(Video.last) # VideoJob.set(queue: :some_queue, wait: 5.minutes, priority: 10).perform_later(Video.last) # - # source://activejob//lib/active_job/core.rb#84 + # source://activejob//lib/active_job/core.rb#88 def set(options = T.unsafe(nil)); end end @@ -842,7 +891,7 @@ end # source://activejob//lib/active_job/enqueuing.rb#10 class ActiveJob::EnqueueError < ::StandardError; end -# source://activejob//lib/active_job/enqueuing.rb#12 +# source://activejob//lib/active_job/enqueuing.rb#42 module ActiveJob::Enqueuing extend ::ActiveSupport::Concern @@ -864,13 +913,13 @@ module ActiveJob::Enqueuing # my_job_instance.enqueue wait_until: Date.tomorrow.midnight # my_job_instance.enqueue priority: 10 # - # source://activejob//lib/active_job/enqueuing.rb#59 + # source://activejob//lib/active_job/enqueuing.rb#89 def enqueue(options = T.unsafe(nil)); end end # Includes the +perform_later+ method for job initialization. # -# source://activejob//lib/active_job/enqueuing.rb#16 +# source://activejob//lib/active_job/enqueuing.rb#46 module ActiveJob::Enqueuing::ClassMethods # Push a job onto the queue. By default the arguments must be either String, # Integer, Float, NilClass, TrueClass, FalseClass, BigDecimal, Symbol, Date, @@ -886,12 +935,12 @@ module ActiveJob::Enqueuing::ClassMethods # # @yield [job] # - # source://activejob//lib/active_job/enqueuing.rb#28 + # source://activejob//lib/active_job/enqueuing.rb#58 def perform_later(*_arg0, **_arg1, &_arg2); end private - # source://activejob//lib/active_job/enqueuing.rb#38 + # source://activejob//lib/active_job/enqueuing.rb#68 def job_or_instantiate(*args, **_arg1); end end @@ -928,35 +977,64 @@ module ActiveJob::Exceptions # end # end # - # source://activejob//lib/active_job/exceptions.rb#125 + # source://activejob//lib/active_job/exceptions.rb#157 def retry_job(options = T.unsafe(nil)); end private - # source://activejob//lib/active_job/exceptions.rb#135 + # source://activejob//lib/active_job/exceptions.rb#167 def determine_delay(seconds_or_duration_or_algorithm:, executions:, jitter: T.unsafe(nil)); end - # source://activejob//lib/active_job/exceptions.rb#155 + # source://activejob//lib/active_job/exceptions.rb#188 def determine_jitter_for_delay(delay, jitter); end - # source://activejob//lib/active_job/exceptions.rb#160 + # source://activejob//lib/active_job/exceptions.rb#193 def executions_for(exceptions); end + # source://activejob//lib/active_job/exceptions.rb#202 + def run_after_discard_procs(exception); end + module GeneratedClassMethods + def after_discard_procs; end + def after_discard_procs=(value); end + def after_discard_procs?; end def retry_jitter; end def retry_jitter=(value); end end - module GeneratedInstanceMethods; end + module GeneratedInstanceMethods + def after_discard_procs; end + def after_discard_procs=(value); end + def after_discard_procs?; end + end end -# source://activejob//lib/active_job/exceptions.rb#14 +# source://activejob//lib/active_job/exceptions.rb#15 module ActiveJob::Exceptions::ClassMethods + # A block to run when a job is about to be discarded for any reason. + # + # ==== Example + # + # class WorkJob < ActiveJob::Base + # after_discard do |job, exception| + # ExceptionNotifier.report(exception) + # end + # + # ... + # + # end + # + # source://activejob//lib/active_job/exceptions.rb#130 + def after_discard(&blk); end + # Discard the job with no attempts to retry, if the exception is raised. This is useful when the subject of the job, # like an Active Record, is no longer available, and the job is thus no longer relevant. # # You can also pass a block that'll be invoked. This block is yielded with the job instance as the first and the error instance as the second parameter. # + # `retry_on` and `discard_on` handlers are searched from bottom to top, and up the class hierarchy. The handler of the first class for + # which exception.is_a?(klass) holds true is the one invoked, if any. + # # ==== Example # # class SearchIndexingJob < ActiveJob::Base @@ -971,7 +1049,7 @@ module ActiveJob::Exceptions::ClassMethods # end # end # - # source://activejob//lib/active_job/exceptions.rb#94 + # source://activejob//lib/active_job/exceptions.rb#109 def discard_on(*exceptions); end # Catch the exception and reschedule job for re-execution after so many seconds, for a specific number of attempts. @@ -982,10 +1060,13 @@ module ActiveJob::Exceptions::ClassMethods # You can also pass a block that'll be invoked if the retry attempts fail for custom logic rather than letting # the exception bubble up. This block is yielded with the job instance as the first and the error instance as the second parameter. # + # `retry_on` and `discard_on` handlers are searched from bottom to top, and up the class hierarchy. The handler of the first class for + # which exception.is_a?(klass) holds true is the one invoked, if any. + # # ==== Options # * :wait - Re-enqueues the job with a delay specified either in seconds (default: 3 seconds), # as a computing proc that takes the number of executions so far as an argument, or as a symbol reference of - # :exponentially_longer, which applies the wait algorithm of ((executions**4) + (Kernel.rand * (executions**4) * jitter)) + 2 + # :polynomially_longer, which applies the wait algorithm of ((executions**4) + (Kernel.rand * (executions**4) * jitter)) + 2 # (first wait ~3s, then ~18s, then ~83s, etc) # * :attempts - Re-enqueues the job the specified number of times (default: 5 attempts) or a symbol reference of :unlimited # to retry the job until it succeeds @@ -1001,11 +1082,11 @@ module ActiveJob::Exceptions::ClassMethods # retry_on CustomInfrastructureException, wait: 5.minutes, attempts: :unlimited # # retry_on ActiveRecord::Deadlocked, wait: 5.seconds, attempts: 3 - # retry_on Net::OpenTimeout, Timeout::Error, wait: :exponentially_longer, attempts: 10 # retries at most 10 times for Net::OpenTimeout and Timeout::Error combined + # retry_on Net::OpenTimeout, Timeout::Error, wait: :polynomially_longer, attempts: 10 # retries at most 10 times for Net::OpenTimeout and Timeout::Error combined # # To retry at most 10 times for each individual exception: - # # retry_on Net::OpenTimeout, wait: :exponentially_longer, attempts: 10 + # # retry_on Net::OpenTimeout, wait: :polynomially_longer, attempts: 10 # # retry_on Net::ReadTimeout, wait: 5.seconds, jitter: 0.30, attempts: 10 - # # retry_on Timeout::Error, wait: :exponentially_longer, attempts: 10 + # # retry_on Timeout::Error, wait: :polynomially_longer, attempts: 10 # # retry_on(YetAnotherCustomAppException) do |job, error| # ExceptionNotifier.caught(error) @@ -1018,11 +1099,11 @@ module ActiveJob::Exceptions::ClassMethods # end # end # - # source://activejob//lib/active_job/exceptions.rb#58 + # source://activejob//lib/active_job/exceptions.rb#62 def retry_on(*exceptions, wait: T.unsafe(nil), attempts: T.unsafe(nil), queue: T.unsafe(nil), priority: T.unsafe(nil), jitter: T.unsafe(nil)); end end -# source://activejob//lib/active_job/exceptions.rb#132 +# source://activejob//lib/active_job/exceptions.rb#164 ActiveJob::Exceptions::JITTER_DEFAULT = T.let(T.unsafe(nil), Object) # = Active Job \Execution @@ -1042,7 +1123,7 @@ module ActiveJob::Execution mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods mixes_in_class_methods ::ActiveJob::Execution::ClassMethods - # source://activejob//lib/active_job/execution.rb#57 + # source://activejob//lib/active_job/execution.rb#61 def perform(*_arg0); end # Performs the job immediately. The job is not sent to the queuing adapter @@ -1062,7 +1143,7 @@ module ActiveJob::Execution private - # source://activejob//lib/active_job/execution.rb#62 + # source://activejob//lib/active_job/execution.rb#66 def _perform_job; end module GeneratedClassMethods @@ -1093,64 +1174,105 @@ module ActiveJob::Execution::ClassMethods def perform_now(*_arg0, **_arg1, &_arg2); end end -# source://activejob//lib/active_job/instrumentation.rb#4 +# source://activejob//lib/active_job/instrumentation.rb#16 module ActiveJob::Instrumentation extend ::ActiveSupport::Concern - # source://activejob//lib/active_job/instrumentation.rb#13 + # source://activejob//lib/active_job/instrumentation.rb#25 def perform_now; end private - # source://activejob//lib/active_job/instrumentation.rb#18 + # source://activejob//lib/active_job/instrumentation.rb#30 def _perform_job; end - # source://activejob//lib/active_job/instrumentation.rb#39 + # source://activejob//lib/active_job/instrumentation.rb#47 def halted_callback_hook(*_arg0); end - # source://activejob//lib/active_job/instrumentation.rb#23 + # source://activejob//lib/active_job/instrumentation.rb#35 def instrument(operation, payload = T.unsafe(nil), &block); end end -# source://activejob//lib/active_job/log_subscriber.rb#7 +# source://activejob//lib/active_job/log_subscriber.rb#6 class ActiveJob::LogSubscriber < ::ActiveSupport::LogSubscriber - # source://activejob//lib/active_job/log_subscriber.rb#94 + # source://activejob//lib/active_job/log_subscriber.rb#7 + def backtrace_cleaner; end + + # source://activejob//lib/active_job/log_subscriber.rb#7 + def backtrace_cleaner=(_arg0); end + + # source://activejob//lib/active_job/log_subscriber.rb#7 + def backtrace_cleaner?; end + + # source://activejob//lib/active_job/log_subscriber.rb#130 def discard(event); end - # source://activejob//lib/active_job/log_subscriber.rb#8 + # source://activejob//lib/active_job/log_subscriber.rb#9 def enqueue(event); end - # source://activejob//lib/active_job/log_subscriber.rb#27 + # source://activejob//lib/active_job/log_subscriber.rb#49 + def enqueue_all(event); end + + # source://activejob//lib/active_job/log_subscriber.rb#29 def enqueue_at(event); end - # source://activejob//lib/active_job/log_subscriber.rb#71 + # source://activejob//lib/active_job/log_subscriber.rb#105 def enqueue_retry(event); end - # source://activejob//lib/active_job/log_subscriber.rb#53 + # source://activejob//lib/active_job/log_subscriber.rb#86 def perform(event); end - # source://activejob//lib/active_job/log_subscriber.rb#46 + # source://activejob//lib/active_job/log_subscriber.rb#76 def perform_start(event); end - # source://activejob//lib/active_job/log_subscriber.rb#85 + # source://activejob//lib/active_job/log_subscriber.rb#120 def retry_stopped(event); end private - # source://activejob//lib/active_job/log_subscriber.rb#108 + # source://activejob//lib/active_job/log_subscriber.rb#145 def args_info(job); end - # source://activejob//lib/active_job/log_subscriber.rb#117 + # source://activejob//lib/active_job/log_subscriber.rb#203 + def enqueued_jobs_message(adapter, enqueued_jobs); end + + # source://activejob//lib/active_job/log_subscriber.rb#183 + def error(progname = T.unsafe(nil), &block); end + + # source://activejob//lib/active_job/log_subscriber.rb#199 + def extract_enqueue_source_location(locations); end + + # source://activejob//lib/active_job/log_subscriber.rb#154 def format(arg); end - # source://activejob//lib/active_job/log_subscriber.rb#134 + # source://activejob//lib/active_job/log_subscriber.rb#175 + def info(progname = T.unsafe(nil), &block); end + + # source://activejob//lib/active_job/log_subscriber.rb#191 + def log_enqueue_source; end + + # source://activejob//lib/active_job/log_subscriber.rb#171 def logger; end - # source://activejob//lib/active_job/log_subscriber.rb#104 + # source://activejob//lib/active_job/log_subscriber.rb#141 def queue_name(event); end - # source://activejob//lib/active_job/log_subscriber.rb#130 + # source://activejob//lib/active_job/log_subscriber.rb#167 def scheduled_at(event); end + + class << self + # source://activejob//lib/active_job/log_subscriber.rb#7 + def backtrace_cleaner; end + + # source://activejob//lib/active_job/log_subscriber.rb#7 + def backtrace_cleaner=(value); end + + # source://activejob//lib/active_job/log_subscriber.rb#7 + def backtrace_cleaner?; end + + # source://activesupport/7.1.3.2/lib/active_support/log_subscriber.rb#87 + def log_levels; end + end end # source://activejob//lib/active_job/logging.rb#7 @@ -1182,10 +1304,12 @@ module ActiveJob::Logging module GeneratedInstanceMethods; end end -# The ActiveJob::QueueAdapter module is used to load the +# = Active Job Queue adapter +# +# The +ActiveJob::QueueAdapter+ module is used to load the # correct adapter. The default queue adapter is the +:async+ queue. # -# source://activejob//lib/active_job/queue_adapter.rb#8 +# source://activejob//lib/active_job/queue_adapter.rb#19 module ActiveJob::QueueAdapter extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -1205,42 +1329,42 @@ end # Includes the setter method for changing the active queue adapter. # -# source://activejob//lib/active_job/queue_adapter.rb#21 +# source://activejob//lib/active_job/queue_adapter.rb#32 module ActiveJob::QueueAdapter::ClassMethods # Returns the backend queue provider. The default queue adapter # is the +:async+ queue. See QueueAdapters for more information. # - # source://activejob//lib/active_job/queue_adapter.rb#24 + # source://activejob//lib/active_job/queue_adapter.rb#35 def queue_adapter; end # Specify the backend queue provider. The default queue adapter # is the +:async+ queue. See QueueAdapters for more # information. # - # source://activejob//lib/active_job/queue_adapter.rb#37 + # source://activejob//lib/active_job/queue_adapter.rb#48 def queue_adapter=(name_or_adapter); end # Returns string denoting the name of the configured queue adapter. # By default returns "async". # - # source://activejob//lib/active_job/queue_adapter.rb#30 + # source://activejob//lib/active_job/queue_adapter.rb#41 def queue_adapter_name; end private - # source://activejob//lib/active_job/queue_adapter.rb#53 + # source://activejob//lib/active_job/queue_adapter.rb#64 def assign_adapter(adapter_name, queue_adapter); end # @return [Boolean] # - # source://activejob//lib/active_job/queue_adapter.rb#60 + # source://activejob//lib/active_job/queue_adapter.rb#71 def queue_adapter?(object); end end -# source://activejob//lib/active_job/queue_adapter.rb#58 +# source://activejob//lib/active_job/queue_adapter.rb#69 ActiveJob::QueueAdapter::ClassMethods::QUEUE_ADAPTER_METHODS = T.let(T.unsafe(nil), Array) -# == Active Job adapters +# = Active Job adapters # # Active Job has adapters for the following queuing backends: # @@ -1252,10 +1376,14 @@ ActiveJob::QueueAdapter::ClassMethods::QUEUE_ADAPTER_METHODS = T.let(T.unsafe(ni # * {Sidekiq}[https://sidekiq.org] # * {Sneakers}[https://github.com/jondot/sneakers] # * {Sucker Punch}[https://github.com/brandonhilkert/sucker_punch] -# * {Active Job Async Job}[https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/AsyncAdapter.html] -# * {Active Job Inline}[https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/InlineAdapter.html] # * Please Note: We are not accepting pull requests for new adapters. See the {README}[link:files/activejob/README_md.html] for more details. # +# For testing and development Active Job has three built-in adapters: +# +# * {Active Job Async}[https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/AsyncAdapter.html] +# * {Active Job Inline}[https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/InlineAdapter.html] +# * {Active Job Test}[https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/TestAdapter.html] +# # === Backends Features # # | | Async | Queues | Delayed | Priorities | Timeout | Retries | @@ -1270,6 +1398,7 @@ ActiveJob::QueueAdapter::ClassMethods::QUEUE_ADAPTER_METHODS = T.let(T.unsafe(ni # | Sucker Punch | Yes | Yes | Yes | No | No | No | # | Active Job Async | Yes | Yes | Yes | No | No | No | # | Active Job Inline | No | Yes | N/A | N/A | N/A | N/A | +# | Active Job Test | No | Yes | N/A | N/A | N/A | N/A | # # ==== Async # @@ -1345,12 +1474,7 @@ ActiveJob::QueueAdapter::ClassMethods::QUEUE_ADAPTER_METHODS = T.let(T.unsafe(ni # N/A: The adapter does not run in a separate process, and therefore doesn't # support retries. # -# === Async and Inline Queue Adapters -# -# Active Job has two built-in queue adapters intended for development and -# testing: +:async+ and +:inline+. -# -# source://activejob//lib/active_job/queue_adapters.rb#113 +# source://activejob//lib/active_job/queue_adapters.rb#114 module ActiveJob::QueueAdapters extend ::ActiveSupport::Autoload @@ -1360,15 +1484,15 @@ module ActiveJob::QueueAdapters # ActiveJob::QueueAdapters.lookup(:sidekiq) # # => ActiveJob::QueueAdapters::SidekiqAdapter # - # source://activejob//lib/active_job/queue_adapters.rb#136 + # source://activejob//lib/active_job/queue_adapters.rb#137 def lookup(name); end end end -# source://activejob//lib/active_job/queue_adapters.rb#128 +# source://activejob//lib/active_job/queue_adapters.rb#129 ActiveJob::QueueAdapters::ADAPTER = T.let(T.unsafe(nil), String) -# == Active Job Async adapter +# = Active Job Async adapter # # The Async adapter runs jobs with an in-process thread pool. # @@ -1471,7 +1595,7 @@ end # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#75 ActiveJob::QueueAdapters::AsyncAdapter::Scheduler::DEFAULT_EXECUTOR_OPTIONS = T.let(T.unsafe(nil), Hash) -# == Active Job Inline adapter +# = Active Job Inline adapter # # When enqueuing jobs with the Inline adapter the job will be executed # immediately. @@ -1491,11 +1615,11 @@ class ActiveJob::QueueAdapters::InlineAdapter def enqueue_at(*_arg0); end end -# == Sidekiq adapter for Active Job +# = Sidekiq adapter for Active Job # # Simple, efficient background processing for Ruby. Sidekiq uses threads to # handle many jobs at the same time in the same process. It does not -# require Rails but will integrate tightly with it to make background +# require \Rails but will integrate tightly with it to make background # processing dead simple. # # Read more about Sidekiq {here}[http://sidekiq.org]. @@ -1504,80 +1628,83 @@ end # # Rails.application.config.active_job.queue_adapter = :sidekiq # -# source://activejob//lib/active_job/queue_adapters/sidekiq_adapter.rb#19 +# source://activejob//lib/active_job/queue_adapters/sidekiq_adapter.rb#20 class ActiveJob::QueueAdapters::SidekiqAdapter - # source://activejob//lib/active_job/queue_adapters/sidekiq_adapter.rb#20 + # source://activejob//lib/active_job/queue_adapters/sidekiq_adapter.rb#21 def enqueue(job); end - # source://activejob//lib/active_job/queue_adapters/sidekiq_adapter.rb#29 + # source://activejob//lib/active_job/queue_adapters/sidekiq_adapter.rb#35 + def enqueue_all(jobs); end + + # source://activejob//lib/active_job/queue_adapters/sidekiq_adapter.rb#28 def enqueue_at(job, timestamp); end end -# source://activejob//lib/active_job/queue_adapters/sidekiq_adapter.rb#38 +# source://activejob//lib/active_job/queue_adapters/sidekiq_adapter.rb#66 class ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper include ::Sidekiq::Job include ::Sidekiq::Job::Options extend ::Sidekiq::Job::Options::ClassMethods extend ::Sidekiq::Job::ClassMethods - # source://activejob//lib/active_job/queue_adapters/sidekiq_adapter.rb#41 + # source://activejob//lib/active_job/queue_adapters/sidekiq_adapter.rb#69 def perform(job_data); end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#137 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#137 def sidekiq_options_hash; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#149 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#149 def sidekiq_options_hash=(_arg0); end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#137 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#137 def sidekiq_retries_exhausted_block; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#149 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#149 def sidekiq_retries_exhausted_block=(_arg0); end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#137 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#137 def sidekiq_retry_in_block; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#149 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#149 def sidekiq_retry_in_block=(_arg0); end class << self - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#104 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#104 def sidekiq_options_hash; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#112 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#112 def sidekiq_options_hash=(val); end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#104 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#104 def sidekiq_retries_exhausted_block; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#112 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#112 def sidekiq_retries_exhausted_block=(val); end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#104 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#104 def sidekiq_retry_in_block; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#112 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#112 def sidekiq_retry_in_block=(val); end private - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#99 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#99 def __synchronized_sidekiq_options_hash; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#99 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#99 def __synchronized_sidekiq_retries_exhausted_block; end - # source://sidekiq/7.1.2/lib/sidekiq/job.rb#99 + # source://sidekiq/7.2.2/lib/sidekiq/job.rb#99 def __synchronized_sidekiq_retry_in_block; end end end -# == Test adapter for Active Job +# = Test adapter for Active Job # # The test adapter should be used only in testing. Along with # ActiveJob::TestCase and ActiveJob::TestHelper -# it makes a great tool to test your Rails application. +# it makes a great tool to test your \Rails application. # # To use the test adapter set +queue_adapter+ config to +:test+. # @@ -1815,7 +1942,7 @@ module ActiveJob::QueuePriority # Returns the priority that the job will be created with # - # source://activejob//lib/active_job/queue_priority.rb#36 + # source://activejob//lib/active_job/queue_priority.rb#53 def priority; end module GeneratedClassMethods @@ -1847,9 +1974,26 @@ module ActiveJob::QueuePriority::ClassMethods # end # end # - # Specify either an argument or a block. + # Can be given a block that will evaluate in the context of the job + # so that a dynamic priority can be applied: + # + # class PublishToFeedJob < ApplicationJob + # queue_with_priority do + # post = self.arguments.first + # + # if post.paid? + # 10 + # else + # 50 + # end + # end # - # source://activejob//lib/active_job/queue_priority.rb#22 + # def perform(post) + # post.to_feed! + # end + # end + # + # source://activejob//lib/active_job/queue_priority.rb#39 def queue_with_priority(priority = T.unsafe(nil), &block); end class << self @@ -1879,29 +2023,31 @@ class ActiveJob::Railtie < ::Rails::Railtie; end # source://activejob//lib/active_job/arguments.rb#26 class ActiveJob::SerializationError < ::ArgumentError; end -# The ActiveJob::Serializers module is used to store a list of known serializers +# = Active Job \Serializers +# +# The +ActiveJob::Serializers+ module is used to store a list of known serializers # and to add new ones. It also has helpers to serialize/deserialize objects. # -# source://activejob//lib/active_job/serializers.rb#8 +# source://activejob//lib/active_job/serializers.rb#10 module ActiveJob::Serializers extend ::ActiveSupport::Autoload - # source://activejob//lib/active_job/serializers.rb#22 + # source://activejob//lib/active_job/serializers.rb#25 def _additional_serializers; end - # source://activejob//lib/active_job/serializers.rb#22 + # source://activejob//lib/active_job/serializers.rb#25 def _additional_serializers=(val); end class << self - # source://activejob//lib/active_job/serializers.rb#22 + # source://activejob//lib/active_job/serializers.rb#25 def _additional_serializers; end - # source://activejob//lib/active_job/serializers.rb#22 + # source://activejob//lib/active_job/serializers.rb#25 def _additional_serializers=(val); end # Adds new serializers to a list of known serializers. # - # source://activejob//lib/active_job/serializers.rb#54 + # source://activejob//lib/active_job/serializers.rb#57 def add_serializers(*new_serializers); end # Returns deserialized object. @@ -1910,25 +2056,39 @@ module ActiveJob::Serializers # # @raise [ArgumentError] # - # source://activejob//lib/active_job/serializers.rb#38 + # source://activejob//lib/active_job/serializers.rb#41 def deserialize(argument); end # Returns serialized representative of the passed object. # Will look up through all known serializers. - # Raises ActiveJob::SerializationError if it can't find a proper serializer. + # Raises ActiveJob::SerializationError if it can't find a proper serializer. # # @raise [SerializationError] # - # source://activejob//lib/active_job/serializers.rb#29 + # source://activejob//lib/active_job/serializers.rb#32 def serialize(argument); end # Returns list of known serializers. # - # source://activejob//lib/active_job/serializers.rb#49 + # source://activejob//lib/active_job/serializers.rb#52 def serializers; end end end +# source://activejob//lib/active_job/serializers/big_decimal_serializer.rb#7 +class ActiveJob::Serializers::BigDecimalSerializer < ::ActiveJob::Serializers::ObjectSerializer + # source://activejob//lib/active_job/serializers/big_decimal_serializer.rb#12 + def deserialize(hash); end + + # source://activejob//lib/active_job/serializers/big_decimal_serializer.rb#8 + def serialize(big_decimal); end + + private + + # source://activejob//lib/active_job/serializers/big_decimal_serializer.rb#17 + def klass; end +end + # source://activejob//lib/active_job/serializers/date_serializer.rb#5 class ActiveJob::Serializers::DateSerializer < ::ActiveJob::Serializers::ObjectSerializer # source://activejob//lib/active_job/serializers/date_serializer.rb#10 @@ -1956,7 +2116,7 @@ end # source://activejob//lib/active_job/serializers/duration_serializer.rb#5 class ActiveJob::Serializers::DurationSerializer < ::ActiveJob::Serializers::ObjectSerializer - # source://activejob//lib/active_job/serializers/duration_serializer.rb#10 + # source://activejob//lib/active_job/serializers/duration_serializer.rb#12 def deserialize(hash); end # source://activejob//lib/active_job/serializers/duration_serializer.rb#6 @@ -1964,7 +2124,7 @@ class ActiveJob::Serializers::DurationSerializer < ::ActiveJob::Serializers::Obj private - # source://activejob//lib/active_job/serializers/duration_serializer.rb#18 + # source://activejob//lib/active_job/serializers/duration_serializer.rb#20 def klass; end end @@ -2106,16 +2266,22 @@ class ActiveJob::Serializers::TimeSerializer < ::ActiveJob::Serializers::TimeObj end # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#5 -class ActiveJob::Serializers::TimeWithZoneSerializer < ::ActiveJob::Serializers::TimeObjectSerializer - # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#6 +class ActiveJob::Serializers::TimeWithZoneSerializer < ::ActiveJob::Serializers::ObjectSerializer + # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#15 def deserialize(hash); end + # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#8 + def serialize(time_with_zone); end + private - # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#11 + # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#20 def klass; end end +# source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#6 +ActiveJob::Serializers::TimeWithZoneSerializer::NANO_PRECISION = T.let(T.unsafe(nil), Integer) + # source://activejob//lib/active_job/test_case.rb#6 class ActiveJob::TestCase < ::ActiveSupport::TestCase include ::ActiveJob::TestHelper @@ -2127,7 +2293,7 @@ end module ActiveJob::TestHelper include ::ActiveSupport::Testing::Assertions - # source://activejob//lib/active_job/test_helper.rb#51 + # source://activejob//lib/active_job/test_helper.rb#53 def after_teardown; end # Asserts that the number of enqueued jobs matches the given number. @@ -2184,7 +2350,7 @@ module ActiveJob::TestHelper # end # end # - # source://activejob//lib/active_job/test_helper.rb#123 + # source://activejob//lib/active_job/test_helper.rb#120 def assert_enqueued_jobs(number, only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), &block); end # Asserts that the job has been enqueued with the given arguments. @@ -2197,6 +2363,13 @@ module ActiveJob::TestHelper # assert_enqueued_with(at: Date.tomorrow.noon, queue: "my_queue") # end # + # For keyword arguments, specify them as a hash inside an array: + # + # def test_assert_enqueued_with_keyword_arguments + # MyJob.perform_later(arg1: 'value1', arg2: 'value2') + # assert_enqueued_with(job: MyJob, args: [{ arg1: 'value1', arg2: 'value2' }]) + # end + # # The given arguments may also be specified as matcher procs that return a # boolean value indicating whether a job's attribute meets certain criteria. # @@ -2233,7 +2406,7 @@ module ActiveJob::TestHelper # end # end # - # source://activejob//lib/active_job/test_helper.rb#392 + # source://activejob//lib/active_job/test_helper.rb#396 def assert_enqueued_with(job: T.unsafe(nil), args: T.unsafe(nil), at: T.unsafe(nil), queue: T.unsafe(nil), priority: T.unsafe(nil), &block); end # Asserts that no jobs have been enqueued. @@ -2283,7 +2456,7 @@ module ActiveJob::TestHelper # # assert_enqueued_jobs 0, &block # - # source://activejob//lib/active_job/test_helper.rb#185 + # source://activejob//lib/active_job/test_helper.rb#182 def assert_no_enqueued_jobs(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), &block); end # Asserts that no jobs have been performed. @@ -2339,7 +2512,7 @@ module ActiveJob::TestHelper # # assert_performed_jobs 0, &block # - # source://activejob//lib/active_job/test_helper.rb#343 + # source://activejob//lib/active_job/test_helper.rb#340 def assert_no_performed_jobs(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), &block); end # Asserts that the number of performed jobs matches the given number. @@ -2429,7 +2602,7 @@ module ActiveJob::TestHelper # end # end # - # source://activejob//lib/active_job/test_helper.rb#275 + # source://activejob//lib/active_job/test_helper.rb#272 def assert_performed_jobs(number, only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), &block); end # Asserts that the job has been performed with the given arguments. @@ -2489,10 +2662,10 @@ module ActiveJob::TestHelper # end # end # - # source://activejob//lib/active_job/test_helper.rb#494 + # source://activejob//lib/active_job/test_helper.rb#498 def assert_performed_with(job: T.unsafe(nil), args: T.unsafe(nil), at: T.unsafe(nil), queue: T.unsafe(nil), priority: T.unsafe(nil), &block); end - # source://activejob//lib/active_job/test_helper.rb#39 + # source://activejob//lib/active_job/test_helper.rb#41 def before_setup; end # source://activejob//lib/active_job/test_helper.rb#9 @@ -2556,10 +2729,14 @@ module ActiveJob::TestHelper # assert_performed_jobs 1 # end # - # If the +:at+ option is specified, then only run jobs enqueued to run - # immediately or before the given time + # If the +:at+ option is specified, then only jobs that have been enqueued + # to run at or before the given time will be performed. This includes jobs + # that have been enqueued without a time. + # + # If queue_adapter_for_test is overridden to return a different adapter, + # +perform_enqueued_jobs+ will merely execute the block. # - # source://activejob//lib/active_job/test_helper.rb#598 + # source://activejob//lib/active_job/test_helper.rb#606 def perform_enqueued_jobs(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), at: T.unsafe(nil), &block); end # source://activejob//lib/active_job/test_helper.rb#9 @@ -2574,60 +2751,60 @@ module ActiveJob::TestHelper # assert_instance_of CustomQueueAdapter, HelloJob.queue_adapter # end # - # source://activejob//lib/active_job/test_helper.rb#634 + # source://activejob//lib/active_job/test_helper.rb#644 def queue_adapter; end - # Specifies the queue adapter to use with all Active Job test helpers. - # - # Returns an instance of the queue adapter and defaults to - # ActiveJob::QueueAdapters::TestAdapter. + # Returns a queue adapter instance to use with all Active Job test helpers. + # By default, returns an instance of ActiveJob::QueueAdapters::TestAdapter. + # Override this method to specify a different adapter. The adapter must + # implement the same interface as ActiveJob::QueueAdapters::TestAdapter. # - # Note: The adapter provided by this method must provide some additional - # methods from those expected of a standard ActiveJob::QueueAdapter - # in order to be used with the active job test helpers. Refer to - # ActiveJob::QueueAdapters::TestAdapter. - # - # source://activejob//lib/active_job/test_helper.rb#66 + # source://activejob//lib/active_job/test_helper.rb#63 def queue_adapter_for_test; end private - # source://activejob//lib/active_job/test_helper.rb#639 + # source://activejob//lib/active_job/test_helper.rb#653 def clear_enqueued_jobs; end - # source://activejob//lib/active_job/test_helper.rb#643 + # source://activejob//lib/active_job/test_helper.rb#657 def clear_performed_jobs; end - # source://activejob//lib/active_job/test_helper.rb#704 + # source://activejob//lib/active_job/test_helper.rb#722 def deserialize_args_for_assertion(job); end - # source://activejob//lib/active_job/test_helper.rb#679 + # source://activejob//lib/active_job/test_helper.rb#693 def enqueued_jobs_with(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), at: T.unsafe(nil), &block); end - # source://activejob//lib/active_job/test_helper.rb#673 + # source://activejob//lib/active_job/test_helper.rb#687 def filter_as_proc(filter); end - # source://activejob//lib/active_job/test_helper.rb#687 + # source://activejob//lib/active_job/test_helper.rb#701 def flush_enqueued_jobs(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), at: T.unsafe(nil)); end - # source://activejob//lib/active_job/test_helper.rb#711 + # source://activejob//lib/active_job/test_helper.rb#729 def instantiate_job(payload, skip_deserialize_arguments: T.unsafe(nil)); end - # source://activejob//lib/active_job/test_helper.rb#647 + # source://activejob//lib/active_job/test_helper.rb#661 def jobs_with(jobs, only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), at: T.unsafe(nil)); end - # source://activejob//lib/active_job/test_helper.rb#683 + # source://activejob//lib/active_job/test_helper.rb#697 def performed_jobs_with(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), &block); end - # source://activejob//lib/active_job/test_helper.rb#695 + # source://activejob//lib/active_job/test_helper.rb#709 def prepare_args_for_assertion(args); end - # source://activejob//lib/active_job/test_helper.rb#718 + # source://activejob//lib/active_job/test_helper.rb#736 def queue_adapter_changed_jobs; end + # @return [Boolean] + # + # source://activejob//lib/active_job/test_helper.rb#649 + def using_test_adapter?; end + # @raise [ArgumentError] # - # source://activejob//lib/active_job/test_helper.rb#725 + # source://activejob//lib/active_job/test_helper.rb#743 def validate_option(only: T.unsafe(nil), except: T.unsafe(nil)); end end @@ -2679,7 +2856,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-serializers-xml@1.0.2.rbi b/sorbet/rbi/gems/activemodel-serializers-xml@1.0.2.rbi index cac8c1347..9fd7a27e8 100644 --- a/sorbet/rbi/gems/activemodel-serializers-xml@1.0.2.rbi +++ b/sorbet/rbi/gems/activemodel-serializers-xml@1.0.2.rbi @@ -7,13 +7,13 @@ # source://activemodel-serializers-xml//lib/active_model/serializers/xml.rb#8 module ActiveModel class << self - # source://activemodel/7.0.4.3/lib/active_model.rb#71 + # source://activemodel/7.0.8/lib/active_model.rb#72 def eager_load!; end - # source://activemodel/7.0.4.3/lib/active_model/gem_version.rb#5 + # source://activemodel/7.0.8/lib/active_model/gem_version.rb#5 def gem_version; end - # source://activemodel/7.0.4.3/lib/active_model/version.rb#7 + # source://activemodel/7.0.8/lib/active_model/version.rb#7 def version; end end end diff --git a/sorbet/rbi/gems/activemodel@7.0.6.rbi b/sorbet/rbi/gems/activemodel@7.1.3.2.rbi similarity index 79% rename from sorbet/rbi/gems/activemodel@7.0.6.rbi rename to sorbet/rbi/gems/activemodel@7.1.3.2.rbi index 3740ffcd3..df22f8cfc 100644 --- a/sorbet/rbi/gems/activemodel@7.0.6.rbi +++ b/sorbet/rbi/gems/activemodel@7.1.3.2.rbi @@ -4,30 +4,35 @@ # 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 module ActiveModel extend ::ActiveSupport::Autoload class << self - # source://activemodel//lib/active_model.rb#72 + # source://activemodel//lib/active_model/deprecator.rb#4 + def deprecator; end + + # source://activemodel//lib/active_model.rb#76 def eager_load!; end - # Returns the currently loaded version of \Active \Model as a Gem::Version. + # Returns the currently loaded version of \Active \Model as a +Gem::Version+. # # source://activemodel//lib/active_model/gem_version.rb#5 def gem_version; end - # Returns the currently loaded version of \Active \Model as a Gem::Version. + # Returns the currently loaded version of \Active \Model as a +Gem::Version+. # # source://activemodel//lib/active_model/version.rb#7 def version; end end end -# == Active \Model \API +# = Active \Model \API # # Includes the required interface for an object to interact with -# Action Pack and Action View, using different Active Model modules. +# Action Pack and Action View, using different Active \Model modules. # It includes model name introspections, conversions, translations, and # validations. Besides that, it allows you to initialize the object with a # hash of attributes, pretty much like Active Record does. @@ -43,7 +48,7 @@ end # person.name # => "bob" # person.age # => "18" # -# Note that, by default, ActiveModel::API implements persisted? +# Note that, by default, +ActiveModel::API+ implements #persisted? # to return +false+, which is the most common case. You may want to override # it in your class to simulate a different scenario: # @@ -59,7 +64,7 @@ end # person = Person.new(id: 1, name: 'bob') # person.persisted? # => true # -# Also, if for some reason you need to run code on initialize, make +# Also, if for some reason you need to run code on initialize ( ::new ), make # sure you call +super+ if you want the attributes hash initialization to # happen. # @@ -77,7 +82,7 @@ end # person.omg # => true # # For more detailed information on other functionalities available, please -# refer to the specific modules included in ActiveModel::API +# refer to the specific modules included in +ActiveModel::API+ # (see below). # # source://activemodel//lib/active_model/api.rb#59 @@ -136,6 +141,9 @@ module ActiveModel::API def _validators; end def _validators=(value); end def _validators?; end + def param_delimiter; end + def param_delimiter=(value); end + def param_delimiter?; end end module GeneratedInstanceMethods @@ -143,9 +151,19 @@ module ActiveModel::API def __callbacks?; end def _validators; end def _validators?; end + def param_delimiter=(value); end end end +# source://activemodel//lib/active_model/access.rb#7 +module ActiveModel::Access + # source://activemodel//lib/active_model/access.rb#8 + def slice(*methods); end + + # source://activemodel//lib/active_model/access.rb#12 + def values_at(*methods); end +end + # source://activemodel//lib/active_model/attribute.rb#6 class ActiveModel::Attribute # This method should not be called directly. @@ -156,47 +174,47 @@ class ActiveModel::Attribute # source://activemodel//lib/active_model/attribute.rb#33 def initialize(name, value_before_type_cast, type, original_attribute = T.unsafe(nil), value = T.unsafe(nil)); end - # source://activemodel//lib/active_model/attribute.rb#112 + # source://activemodel//lib/active_model/attribute.rb#115 def ==(other); end # @return [Boolean] # - # source://activemodel//lib/active_model/attribute.rb#104 + # source://activemodel//lib/active_model/attribute.rb#107 def came_from_user?; end # @return [Boolean] # - # source://activemodel//lib/active_model/attribute.rb#63 + # source://activemodel//lib/active_model/attribute.rb#66 def changed?; end # @return [Boolean] # - # source://activemodel//lib/active_model/attribute.rb#67 + # source://activemodel//lib/active_model/attribute.rb#70 def changed_in_place?; end - # source://activemodel//lib/active_model/attribute.rb#132 + # source://activemodel//lib/active_model/attribute.rb#135 def encode_with(coder); end - # source://activemodel//lib/active_model/attribute.rb#112 + # source://activemodel//lib/active_model/attribute.rb#115 def eql?(other); end - # source://activemodel//lib/active_model/attribute.rb#71 + # source://activemodel//lib/active_model/attribute.rb#74 def forgetting_assignment; end # @return [Boolean] # - # source://activemodel//lib/active_model/attribute.rb#108 + # source://activemodel//lib/active_model/attribute.rb#111 def has_been_read?; end - # source://activemodel//lib/active_model/attribute.rb#120 + # source://activemodel//lib/active_model/attribute.rb#123 def hash; end - # source://activemodel//lib/active_model/attribute.rb#124 + # source://activemodel//lib/active_model/attribute.rb#127 def init_with(coder); end # @return [Boolean] # - # source://activemodel//lib/active_model/attribute.rb#100 + # source://activemodel//lib/active_model/attribute.rb#103 def initialized?; end # Returns the value of attribute name. @@ -207,12 +225,12 @@ class ActiveModel::Attribute # source://activemodel//lib/active_model/attribute.rb#47 def original_value; end - # source://activemodel//lib/active_model/attribute.rb#140 + # source://activemodel//lib/active_model/attribute.rb#143 def original_value_for_database; end # @return [Boolean] # - # source://activemodel//lib/active_model/attribute.rb#59 + # source://activemodel//lib/active_model/attribute.rb#62 def serializable?(&block); end # Returns the value of attribute type. @@ -222,7 +240,7 @@ class ActiveModel::Attribute # @raise [NotImplementedError] # - # source://activemodel//lib/active_model/attribute.rb#96 + # source://activemodel//lib/active_model/attribute.rb#99 def type_cast(*_arg0); end # source://activemodel//lib/active_model/attribute.rb#41 @@ -236,39 +254,45 @@ class ActiveModel::Attribute # source://activemodel//lib/active_model/attribute.rb#55 def value_for_database; end - # source://activemodel//lib/active_model/attribute.rb#84 + # source://activemodel//lib/active_model/attribute.rb#87 def with_cast_value(value); end - # source://activemodel//lib/active_model/attribute.rb#88 + # source://activemodel//lib/active_model/attribute.rb#91 def with_type(type); end - # source://activemodel//lib/active_model/attribute.rb#80 + # source://activemodel//lib/active_model/attribute/user_provided_default.rb#7 + def with_user_default(value); end + + # source://activemodel//lib/active_model/attribute.rb#83 def with_value_from_database(value); end - # source://activemodel//lib/active_model/attribute.rb#75 + # source://activemodel//lib/active_model/attribute.rb#78 def with_value_from_user(value); end private - # source://activemodel//lib/active_model/attribute.rb#162 + # source://activemodel//lib/active_model/attribute.rb#169 def _original_value_for_database; end + # source://activemodel//lib/active_model/attribute.rb#165 + def _value_for_database; end + # Returns the value of attribute original_attribute. # - # source://activemodel//lib/active_model/attribute.rb#149 + # source://activemodel//lib/active_model/attribute.rb#152 def assigned?; end # @return [Boolean] # - # source://activemodel//lib/active_model/attribute.rb#158 + # source://activemodel//lib/active_model/attribute.rb#161 def changed_from_assignment?; end - # source://activemodel//lib/active_model/attribute.rb#152 + # source://activemodel//lib/active_model/attribute.rb#155 def initialize_dup(other); end # Returns the value of attribute original_attribute. # - # source://activemodel//lib/active_model/attribute.rb#149 + # source://activemodel//lib/active_model/attribute.rb#152 def original_attribute; end class << self @@ -289,123 +313,131 @@ class ActiveModel::Attribute end end -# source://activemodel//lib/active_model/attribute.rb#166 +# source://activemodel//lib/active_model/attribute.rb#173 class ActiveModel::Attribute::FromDatabase < ::ActiveModel::Attribute - # source://activemodel//lib/active_model/attribute.rb#167 + # source://activemodel//lib/active_model/attribute.rb#178 + def forgetting_assignment; end + + # source://activemodel//lib/active_model/attribute.rb#174 def type_cast(value); end private - # source://activemodel//lib/active_model/attribute.rb#172 + # source://activemodel//lib/active_model/attribute.rb#192 def _original_value_for_database; end end -# source://activemodel//lib/active_model/attribute.rb#177 +# source://activemodel//lib/active_model/attribute.rb#197 class ActiveModel::Attribute::FromUser < ::ActiveModel::Attribute # @return [Boolean] # - # source://activemodel//lib/active_model/attribute.rb#182 + # source://activemodel//lib/active_model/attribute.rb#202 def came_from_user?; end - # source://activemodel//lib/active_model/attribute.rb#178 + # source://activemodel//lib/active_model/attribute.rb#198 def type_cast(value); end + + private + + # source://activemodel//lib/active_model/attribute.rb#207 + def _value_for_database; end end -# source://activemodel//lib/active_model/attribute.rb#197 +# source://activemodel//lib/active_model/attribute.rb#222 class ActiveModel::Attribute::Null < ::ActiveModel::Attribute # @return [Null] a new instance of Null # - # source://activemodel//lib/active_model/attribute.rb#198 + # source://activemodel//lib/active_model/attribute.rb#223 def initialize(name); end - # source://activemodel//lib/active_model/attribute.rb#202 + # source://activemodel//lib/active_model/attribute.rb#227 def type_cast(*_arg0); end # @raise [ActiveModel::MissingAttributeError] # - # source://activemodel//lib/active_model/attribute.rb#210 + # source://activemodel//lib/active_model/attribute.rb#235 def with_cast_value(value); end - # source://activemodel//lib/active_model/attribute.rb#206 + # source://activemodel//lib/active_model/attribute.rb#231 def with_type(type); end # @raise [ActiveModel::MissingAttributeError] # - # source://activemodel//lib/active_model/attribute.rb#210 + # source://activemodel//lib/active_model/attribute.rb#235 def with_value_from_database(value); end # @raise [ActiveModel::MissingAttributeError] # - # source://activemodel//lib/active_model/attribute.rb#210 + # source://activemodel//lib/active_model/attribute.rb#235 def with_value_from_user(value); end end -# source://activemodel//lib/active_model/attribute.rb#217 +# source://activemodel//lib/active_model/attribute.rb#242 class ActiveModel::Attribute::Uninitialized < ::ActiveModel::Attribute # @return [Uninitialized] a new instance of Uninitialized # - # source://activemodel//lib/active_model/attribute.rb#220 + # source://activemodel//lib/active_model/attribute.rb#245 def initialize(name, type); end - # source://activemodel//lib/active_model/attribute.rb#241 + # source://activemodel//lib/active_model/attribute.rb#266 def forgetting_assignment; end # @return [Boolean] # - # source://activemodel//lib/active_model/attribute.rb#237 + # source://activemodel//lib/active_model/attribute.rb#262 def initialized?; end - # source://activemodel//lib/active_model/attribute.rb#230 + # source://activemodel//lib/active_model/attribute.rb#255 def original_value; end - # source://activemodel//lib/active_model/attribute.rb#224 + # source://activemodel//lib/active_model/attribute.rb#249 def value; end - # source://activemodel//lib/active_model/attribute.rb#234 + # source://activemodel//lib/active_model/attribute.rb#259 def value_for_database; end - # source://activemodel//lib/active_model/attribute.rb#245 + # source://activemodel//lib/active_model/attribute.rb#270 def with_type(type); end end -# source://activemodel//lib/active_model/attribute.rb#218 +# source://activemodel//lib/active_model/attribute.rb#243 ActiveModel::Attribute::Uninitialized::UNINITIALIZED_ORIGINAL_VALUE = T.let(T.unsafe(nil), Object) -# source://activemodel//lib/active_model/attribute/user_provided_default.rb#7 +# source://activemodel//lib/active_model/attribute/user_provided_default.rb#11 class ActiveModel::Attribute::UserProvidedDefault < ::ActiveModel::Attribute::FromUser # @return [UserProvidedDefault] a new instance of UserProvidedDefault # - # source://activemodel//lib/active_model/attribute/user_provided_default.rb#8 + # source://activemodel//lib/active_model/attribute/user_provided_default.rb#12 def initialize(name, value, type, database_default); end - # source://activemodel//lib/active_model/attribute/user_provided_default.rb#25 + # source://activemodel//lib/active_model/attribute/user_provided_default.rb#29 def marshal_dump; end - # source://activemodel//lib/active_model/attribute/user_provided_default.rb#36 + # source://activemodel//lib/active_model/attribute/user_provided_default.rb#40 def marshal_load(values); end - # source://activemodel//lib/active_model/attribute/user_provided_default.rb#13 + # source://activemodel//lib/active_model/attribute/user_provided_default.rb#17 def value_before_type_cast; end - # source://activemodel//lib/active_model/attribute/user_provided_default.rb#21 + # source://activemodel//lib/active_model/attribute/user_provided_default.rb#25 def with_type(type); end private # Returns the value of attribute user_provided_value. # - # source://activemodel//lib/active_model/attribute/user_provided_default.rb#48 + # source://activemodel//lib/active_model/attribute/user_provided_default.rb#52 def user_provided_value; end end -# source://activemodel//lib/active_model/attribute.rb#187 +# source://activemodel//lib/active_model/attribute.rb#212 class ActiveModel::Attribute::WithCastValue < ::ActiveModel::Attribute # @return [Boolean] # - # source://activemodel//lib/active_model/attribute.rb#192 + # source://activemodel//lib/active_model/attribute.rb#217 def changed_in_place?; end - # source://activemodel//lib/active_model/attribute.rb#188 + # source://activemodel//lib/active_model/attribute.rb#213 def type_cast(value); end end @@ -417,7 +449,7 @@ module ActiveModel::AttributeAssignment # keys matching the attribute names. # # If the passed hash responds to permitted? method and the return value - # of this method is +false+ an ActiveModel::ForbiddenAttributesError + # of this method is +false+ an ActiveModel::ForbiddenAttributesError # exception is raised. # # class Cat @@ -440,7 +472,7 @@ module ActiveModel::AttributeAssignment # keys matching the attribute names. # # If the passed hash responds to permitted? method and the return value - # of this method is +false+ an ActiveModel::ForbiddenAttributesError + # of this method is +false+ an ActiveModel::ForbiddenAttributesError # exception is raised. # # class Cat @@ -468,13 +500,13 @@ module ActiveModel::AttributeAssignment def _assign_attributes(attributes); end end -# == Active \Model \Attribute \Methods +# = Active \Model \Attribute \Methods # # Provides a way to add prefixes and suffixes to your methods as -# well as handling the creation of ActiveRecord::Base-like +# well as handling the creation of ActiveRecord::Base - like # class methods such as +table_name+. # -# The requirements to implement ActiveModel::AttributeMethods are to: +# The requirements to implement +ActiveModel::AttributeMethods+ are to: # # * include ActiveModel::AttributeMethods in your class. # * Call each of its methods you want to add, such as +attribute_method_suffix+ @@ -528,7 +560,7 @@ module ActiveModel::AttributeMethods # attribute method. If so, we tell +attribute_missing+ to dispatch the # attribute. This method can be overloaded to customize the behavior. # - # source://activemodel//lib/active_model/attribute_methods.rb#459 + # source://activemodel//lib/active_model/attribute_methods.rb#498 def attribute_missing(match, *args, **_arg2, &block); end # Allows access to the object attributes, which are held in the hash @@ -542,12 +574,12 @@ module ActiveModel::AttributeMethods # class belonging to the +clients+ table with a +master_id+ foreign key # can instantiate master through Client#master. # - # source://activemodel//lib/active_model/attribute_methods.rb#445 + # source://activemodel//lib/active_model/attribute_methods.rb#484 def method_missing(method, *args, **_arg2, &block); end # @return [Boolean] # - # source://activemodel//lib/active_model/attribute_methods.rb#468 + # source://activemodel//lib/active_model/attribute_methods.rb#507 def respond_to?(method, include_private_methods = T.unsafe(nil)); end # A +Person+ instance with a +name+ attribute can ask @@ -557,43 +589,43 @@ module ActiveModel::AttributeMethods private - # source://activemodel//lib/active_model/attribute_methods.rb#496 + # source://activemodel//lib/active_model/attribute_methods.rb#535 def _read_attribute(attr); end # @return [Boolean] # - # source://activemodel//lib/active_model/attribute_methods.rb#481 + # source://activemodel//lib/active_model/attribute_methods.rb#520 def attribute_method?(attr_name); end # Returns a struct representing the matching attribute method. # The struct's attributes are prefix, base and suffix. # - # source://activemodel//lib/active_model/attribute_methods.rb#487 + # source://activemodel//lib/active_model/attribute_methods.rb#526 def matched_attribute_method(method_name); end # @raise [ActiveModel::MissingAttributeError] # - # source://activemodel//lib/active_model/attribute_methods.rb#492 + # source://activemodel//lib/active_model/attribute_methods.rb#531 def missing_attribute(attr_name, stack); end module GeneratedClassMethods def attribute_aliases; end def attribute_aliases=(value); end def attribute_aliases?; end - def attribute_method_matchers; end - def attribute_method_matchers=(value); end - def attribute_method_matchers?; end + def attribute_method_patterns; end + def attribute_method_patterns=(value); end + def attribute_method_patterns?; end end module GeneratedInstanceMethods def attribute_aliases; end def attribute_aliases?; end - def attribute_method_matchers; end - def attribute_method_matchers?; end + def attribute_method_patterns; end + def attribute_method_patterns?; end end end -# source://activemodel//lib/active_model/attribute_methods.rb#500 +# source://activemodel//lib/active_model/attribute_methods.rb#539 module ActiveModel::AttributeMethods::AttrNames class << self # We want to generate the methods via module_eval rather than @@ -611,12 +643,12 @@ module ActiveModel::AttributeMethods::AttrNames # Making it frozen means that it doesn't get duped when used to # key the @attributes in read_attribute. # - # source://activemodel//lib/active_model/attribute_methods.rb#517 + # source://activemodel//lib/active_model/attribute_methods.rb#556 def define_attribute_accessor_method(owner, attr_name, writer: T.unsafe(nil)); end end end -# source://activemodel//lib/active_model/attribute_methods.rb#501 +# source://activemodel//lib/active_model/attribute_methods.rb#540 ActiveModel::AttributeMethods::AttrNames::DEF_SAFE_NAME = T.let(T.unsafe(nil), Regexp) # source://activemodel//lib/active_model/attribute_methods.rb#68 @@ -651,16 +683,22 @@ module ActiveModel::AttributeMethods::ClassMethods # source://activemodel//lib/active_model/attribute_methods.rb#204 def alias_attribute(new_name, old_name); end + # source://activemodel//lib/active_model/attribute_methods.rb#224 + def alias_attribute_method_definition(code_generator, pattern, new_name, old_name); end + + # source://activemodel//lib/active_model/attribute_methods.rb#375 + def aliases_by_attribute_name; end + # Returns the original name for the alias +name+ # - # source://activemodel//lib/active_model/attribute_methods.rb#243 + # source://activemodel//lib/active_model/attribute_methods.rb#258 def attribute_alias(name); end # Is +new_name+ an alias? # # @return [Boolean] # - # source://activemodel//lib/active_model/attribute_methods.rb#238 + # source://activemodel//lib/active_model/attribute_methods.rb#253 def attribute_alias?(new_name); end # Declares a method available for all attributes with the given prefix @@ -765,7 +803,7 @@ module ActiveModel::AttributeMethods::ClassMethods def attribute_method_suffix(*suffixes, parameters: T.unsafe(nil)); end # Declares an attribute that should be prefixed and suffixed by - # ActiveModel::AttributeMethods. + # +ActiveModel::AttributeMethods+. # # To use, pass an attribute name (as string or symbol). Be sure to declare # +define_attribute_method+ after you define any prefix, suffix or affix @@ -793,11 +831,11 @@ module ActiveModel::AttributeMethods::ClassMethods # person.name # => "Bob" # person.name_short? # => true # - # source://activemodel//lib/active_model/attribute_methods.rb#304 + # source://activemodel//lib/active_model/attribute_methods.rb#324 def define_attribute_method(attr_name, _owner: T.unsafe(nil)); end # Declares the attributes that should be prefixed and suffixed by - # ActiveModel::AttributeMethods. + # +ActiveModel::AttributeMethods+. # # To use, pass attribute names (as strings or symbols). Be sure to declare # +define_attribute_methods+ after you define any prefix, suffix, or affix @@ -820,10 +858,16 @@ module ActiveModel::AttributeMethods::ClassMethods # end # end # - # source://activemodel//lib/active_model/attribute_methods.rb#270 + # source://activemodel//lib/active_model/attribute_methods.rb#285 def define_attribute_methods(*attr_names); end - # Removes all the previously dynamically defined methods from the class. + # source://activemodel//lib/active_model/attribute_methods.rb#212 + def eagerly_generate_alias_attribute_methods(new_name, old_name); end + + # source://activemodel//lib/active_model/attribute_methods.rb#218 + def generate_alias_attribute_methods(code_generator, new_name, old_name); end + + # Removes all the previously dynamically defined methods from the class, including alias attribute methods. # # class Person # include ActiveModel::AttributeMethods @@ -831,6 +875,7 @@ module ActiveModel::AttributeMethods::ClassMethods # attr_accessor :name # attribute_method_suffix '_short?' # define_attribute_method :name + # alias_attribute :first_name, :name # # private # def attribute_short?(attr) @@ -840,13 +885,15 @@ module ActiveModel::AttributeMethods::ClassMethods # # person = Person.new # person.name = 'Bob' + # person.first_name # => "Bob" # person.name_short? # => true # # Person.undefine_attribute_methods # # person.name_short? # => NoMethodError + # person.first_name # => NoMethodError # - # source://activemodel//lib/active_model/attribute_methods.rb#345 + # source://activemodel//lib/active_model/attribute_methods.rb#368 def undefine_attribute_methods; end private @@ -861,64 +908,70 @@ module ActiveModel::AttributeMethods::ClassMethods # significantly (in our case our test suite finishes 10% faster with # this cache). # - # source://activemodel//lib/active_model/attribute_methods.rb#370 - def attribute_method_matchers_cache; end + # source://activemodel//lib/active_model/attribute_methods.rb#408 + def attribute_method_patterns_cache; end - # source://activemodel//lib/active_model/attribute_methods.rb#374 - def attribute_method_matchers_matching(method_name); end + # source://activemodel//lib/active_model/attribute_methods.rb#412 + def attribute_method_patterns_matching(method_name); end # Define a method `name` in `mod` that dispatches to `send` # using the given `extra` args. This falls back on `send` # if the called name cannot be compiled. # - # source://activemodel//lib/active_model/attribute_methods.rb#383 - def define_proxy_call(code_generator, name, target, parameters, *call_args, namespace:); end + # source://activemodel//lib/active_model/attribute_methods.rb#421 + def define_proxy_call(code_generator, name, proxy_target, parameters, *call_args, namespace:); end - # source://activemodel//lib/active_model/attribute_methods.rb#353 + # source://activemodel//lib/active_model/attribute_methods.rb#391 def generated_attribute_methods; end + # source://activemodel//lib/active_model/attribute_methods.rb#380 + def inherited(base); end + # @return [Boolean] # - # source://activemodel//lib/active_model/attribute_methods.rb#357 + # source://activemodel//lib/active_model/attribute_methods.rb#395 def instance_method_already_implemented?(method_name); end + + # source://activemodel//lib/active_model/attribute_methods.rb#387 + def resolve_attribute_name(name); end end -# source://activemodel//lib/active_model/attribute_methods.rb#409 -class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher - # @return [AttributeMethodMatcher] a new instance of AttributeMethodMatcher +# source://activemodel//lib/active_model/attribute_methods.rb#448 +class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodPattern + # @return [AttributeMethodPattern] a new instance of AttributeMethodPattern # - # source://activemodel//lib/active_model/attribute_methods.rb#414 + # source://activemodel//lib/active_model/attribute_methods.rb#453 def initialize(prefix: T.unsafe(nil), suffix: T.unsafe(nil), parameters: T.unsafe(nil)); end - # source://activemodel//lib/active_model/attribute_methods.rb#423 + # source://activemodel//lib/active_model/attribute_methods.rb#462 def match(method_name); end - # source://activemodel//lib/active_model/attribute_methods.rb#429 + # source://activemodel//lib/active_model/attribute_methods.rb#468 def method_name(attr_name); end # Returns the value of attribute parameters. # - # source://activemodel//lib/active_model/attribute_methods.rb#410 + # source://activemodel//lib/active_model/attribute_methods.rb#449 def parameters; end # Returns the value of attribute prefix. # - # source://activemodel//lib/active_model/attribute_methods.rb#410 + # source://activemodel//lib/active_model/attribute_methods.rb#449 def prefix; end - # Returns the value of attribute suffix. + # Returns the value of attribute proxy_target. # - # source://activemodel//lib/active_model/attribute_methods.rb#410 - def suffix; end + # source://activemodel//lib/active_model/attribute_methods.rb#449 + def proxy_target; end - # Returns the value of attribute target. + # Returns the value of attribute suffix. # - # source://activemodel//lib/active_model/attribute_methods.rb#410 - def target; end + # source://activemodel//lib/active_model/attribute_methods.rb#449 + def suffix; end end -# source://activemodel//lib/active_model/attribute_methods.rb#412 -class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher::AttributeMethodMatch < ::Struct +# source://activemodel//lib/active_model/attribute_methods.rb#451 +class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodPattern::AttributeMethod < ::Struct # Returns the value of attribute attr_name # # @return [Object] the current value of attr_name @@ -930,16 +983,16 @@ class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher::Attri # @return [Object] the newly set value def attr_name=(_); end - # Returns the value of attribute target + # Returns the value of attribute proxy_target # - # @return [Object] the current value of target - def target; end + # @return [Object] the current value of proxy_target + def proxy_target; end - # Sets the attribute target + # Sets the attribute proxy_target # - # @param value [Object] the value to set the attribute target to. + # @param value [Object] the value to set the attribute proxy_target to. # @return [Object] the newly set value - def target=(_); end + def proxy_target=(_); end class << self def [](*_arg0); end @@ -1027,6 +1080,75 @@ end # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#8 ActiveModel::AttributeMutationTracker::OPTION_NOT_GIVEN = T.let(T.unsafe(nil), Object) +# source://activemodel//lib/active_model/attribute_registration.rb#8 +module ActiveModel::AttributeRegistration + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveModel::AttributeRegistration::ClassMethods +end + +# source://activemodel//lib/active_model/attribute_registration.rb#11 +module ActiveModel::AttributeRegistration::ClassMethods + # source://activemodel//lib/active_model/attribute_registration.rb#22 + def _default_attributes; end + + # source://activemodel//lib/active_model/attribute_registration.rb#12 + def attribute(name, type = T.unsafe(nil), default: T.unsafe(nil), **options); end + + # source://activemodel//lib/active_model/attribute_registration.rb#26 + def attribute_types; end + + private + + # source://activemodel//lib/active_model/attribute_registration.rb#48 + def apply_pending_attributes(attribute_set); end + + # source://activemodel//lib/active_model/attribute_registration.rb#58 + def build_default_attributes; end + + # source://activemodel//lib/active_model/attribute_registration.rb#43 + def pending_attribute(name); end + + # source://activemodel//lib/active_model/attribute_registration.rb#62 + def reset_default_attributes; end + + # source://activemodel//lib/active_model/attribute_registration.rb#68 + def resolve_attribute_name(name); end + + # source://activemodel//lib/active_model/attribute_registration.rb#72 + def resolve_type_name(name, **options); end +end + +# source://activemodel//lib/active_model/attribute_registration.rb#33 +class ActiveModel::AttributeRegistration::ClassMethods::PendingAttribute + # source://activemodel//lib/active_model/attribute_registration.rb#36 + def apply_to(attribute); end + + # Returns the value of attribute default. + # + # source://activemodel//lib/active_model/attribute_registration.rb#34 + def default; end + + # Sets the attribute default + # + # @param value the value to set the attribute default to. + # + # source://activemodel//lib/active_model/attribute_registration.rb#34 + def default=(_arg0); end + + # Returns the value of attribute type. + # + # source://activemodel//lib/active_model/attribute_registration.rb#34 + def type; end + + # Sets the attribute type + # + # @param value the value to set the attribute type to. + # + # source://activemodel//lib/active_model/attribute_registration.rb#34 + def type=(_arg0); end +end + # source://activemodel//lib/active_model/attribute_set/builder.rb#6 class ActiveModel::AttributeSet # @return [AttributeSet] a new instance of AttributeSet @@ -1034,7 +1156,7 @@ class ActiveModel::AttributeSet # source://activemodel//lib/active_model/attribute_set.rb#12 def initialize(attributes); end - # source://activemodel//lib/active_model/attribute_set.rb#97 + # source://activemodel//lib/active_model/attribute_set.rb#106 def ==(other); end # source://activemodel//lib/active_model/attribute_set.rb#16 @@ -1043,10 +1165,13 @@ class ActiveModel::AttributeSet # source://activemodel//lib/active_model/attribute_set.rb#20 def []=(name, value); end - # source://activemodel//lib/active_model/attribute_set.rb#88 + # source://activemodel//lib/active_model/attribute_set.rb#93 def accessed; end - # source://activemodel//lib/active_model/attribute_set.rb#68 + # source://activemodel//lib/active_model/attribute_set.rb#24 + def cast_types; end + + # source://activemodel//lib/active_model/attribute_set.rb#73 def deep_dup; end # source://activemodel//lib/active_model/attribute_set.rb#10 @@ -1058,65 +1183,73 @@ class ActiveModel::AttributeSet # source://activemodel//lib/active_model/attribute_set.rb#10 def fetch(*_arg0, **_arg1, &_arg2); end - # source://activemodel//lib/active_model/attribute_set.rb#45 + # source://activemodel//lib/active_model/attribute_set.rb#50 def fetch_value(name, &block); end - # source://activemodel//lib/active_model/attribute_set.rb#63 + # source://activemodel//lib/active_model/attribute_set.rb#68 def freeze; end # @return [Boolean] # - # source://activemodel//lib/active_model/attribute_set.rb#37 - def key?(name); end + # source://activemodel//lib/active_model/attribute_set.rb#41 + def include?(name); end + # @return [Boolean] + # # source://activemodel//lib/active_model/attribute_set.rb#41 + def key?(name); end + + # source://activemodel//lib/active_model/attribute_set.rb#46 def keys; end - # source://activemodel//lib/active_model/attribute_set.rb#92 + # source://activemodel//lib/active_model/attribute_set.rb#97 def map(&block); end - # source://activemodel//lib/active_model/attribute_set.rb#82 + # source://activemodel//lib/active_model/attribute_set.rb#87 def reset(key); end - # source://activemodel//lib/active_model/attribute_set.rb#32 + # source://activemodel//lib/active_model/attribute_set.rb#102 + def reverse_merge!(target_attributes); end + + # source://activemodel//lib/active_model/attribute_set.rb#36 def to_h; end - # source://activemodel//lib/active_model/attribute_set.rb#32 + # source://activemodel//lib/active_model/attribute_set.rb#36 def to_hash; end - # source://activemodel//lib/active_model/attribute_set.rb#24 + # source://activemodel//lib/active_model/attribute_set.rb#28 def values_before_type_cast; end - # source://activemodel//lib/active_model/attribute_set.rb#28 + # source://activemodel//lib/active_model/attribute_set.rb#32 def values_for_database; end - # source://activemodel//lib/active_model/attribute_set.rb#59 + # source://activemodel//lib/active_model/attribute_set.rb#64 def write_cast_value(name, value); end - # source://activemodel//lib/active_model/attribute_set.rb#49 + # source://activemodel//lib/active_model/attribute_set.rb#54 def write_from_database(name, value); end # @raise [FrozenError] # - # source://activemodel//lib/active_model/attribute_set.rb#53 + # source://activemodel//lib/active_model/attribute_set.rb#58 def write_from_user(name, value); end protected # Returns the value of attribute attributes. # - # source://activemodel//lib/active_model/attribute_set.rb#102 + # source://activemodel//lib/active_model/attribute_set.rb#111 def attributes; end private - # source://activemodel//lib/active_model/attribute_set.rb#105 + # source://activemodel//lib/active_model/attribute_set.rb#114 def default_attribute(name); end - # source://activemodel//lib/active_model/attribute_set.rb#77 + # source://activemodel//lib/active_model/attribute_set.rb#82 def initialize_clone(_); end - # source://activemodel//lib/active_model/attribute_set.rb#72 + # source://activemodel//lib/active_model/attribute_set.rb#77 def initialize_dup(_); end end @@ -1165,20 +1298,49 @@ class ActiveModel::AttributeSet::YAMLEncoder def default_types; end end -# source://activemodel//lib/active_model/attributes.rb#7 +# = Active \Model \Attributes +# +# The Attributes module allows models to define attributes beyond simple Ruby +# readers and writers. Similar to Active Record attributes, which are +# typically inferred from the database schema, Active Model Attributes are +# aware of data types, can have default values, and can handle casting and +# serialization. +# +# To use Attributes, include the module in your model class and define your +# attributes using the +attribute+ macro. It accepts a name, a type, a default +# value, and any other options supported by the attribute type. +# +# ==== Examples +# +# class Person +# include ActiveModel::Attributes +# +# attribute :name, :string +# attribute :active, :boolean, default: true +# end +# +# person = Person.new +# person.name = "Volmer" +# +# person.name # => "Volmer" +# person.active # => true +# +# source://activemodel//lib/active_model/attributes.rb#30 module ActiveModel::Attributes extend ::ActiveSupport::Concern include GeneratedInstanceMethods + include ::ActiveModel::AttributeRegistration include ::ActiveModel::AttributeMethods mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveModel::AttributeRegistration::ClassMethods mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods mixes_in_class_methods ::ActiveModel::Attributes::ClassMethods - # source://activemodel//lib/active_model/attributes.rb#78 + # source://activemodel//lib/active_model/attributes.rb#93 def initialize(*_arg0); end - # Returns an array of attribute names as strings + # Returns an array of attribute names as strings. # # class Person # include ActiveModel::Attributes @@ -1188,13 +1350,13 @@ module ActiveModel::Attributes # end # # person = Person.new - # person.attribute_names - # # => ["name", "age"] + # person.attribute_names # => ["name", "age"] # - # source://activemodel//lib/active_model/attributes.rb#116 + # source://activemodel//lib/active_model/attributes.rb#133 def attribute_names; end - # Returns a hash of all the attributes with their names as keys and the values of the attributes as values. + # Returns a hash of all the attributes with their names as keys and the + # values of the attributes as values. # # class Person # include ActiveModel::Attributes @@ -1203,59 +1365,74 @@ module ActiveModel::Attributes # attribute :age, :integer # end # - # person = Person.new(name: 'Francesco', age: 22) - # person.attributes - # # => {"name"=>"Francesco", "age"=>22} + # person = Person.new + # person.name = "Francesco" + # person.age = 22 + # + # person.attributes # => { "name" => "Francesco", "age" => 22} # - # source://activemodel//lib/active_model/attributes.rb#100 + # source://activemodel//lib/active_model/attributes.rb#118 def attributes; end - # source://activemodel//lib/active_model/attributes.rb#120 + # source://activemodel//lib/active_model/attributes.rb#137 def freeze; end private - # source://activemodel//lib/active_model/attributes.rb#126 + # source://activemodel//lib/active_model/attributes.rb#143 def _write_attribute(attr_name, value); end - # source://activemodel//lib/active_model/attributes.rb#131 + # source://activemodel//lib/active_model/attributes.rb#148 def attribute(attr_name); end - # source://activemodel//lib/active_model/attributes.rb#126 + # source://activemodel//lib/active_model/attributes.rb#143 def attribute=(attr_name, value); end - # source://activemodel//lib/active_model/attributes.rb#83 + # source://activemodel//lib/active_model/attributes.rb#98 def initialize_dup(other); end module GeneratedClassMethods - def _default_attributes; end - def _default_attributes=(value); end - def _default_attributes?; end def attribute_aliases; end def attribute_aliases=(value); end def attribute_aliases?; end - def attribute_method_matchers; end - def attribute_method_matchers=(value); end - def attribute_method_matchers?; end - def attribute_types; end - def attribute_types=(value); end - def attribute_types?; end + def attribute_method_patterns; end + def attribute_method_patterns=(value); end + def attribute_method_patterns?; end end module GeneratedInstanceMethods def attribute_aliases; end def attribute_aliases?; end - def attribute_method_matchers; end - def attribute_method_matchers?; end + def attribute_method_patterns; end + def attribute_method_patterns?; end end end -# source://activemodel//lib/active_model/attributes.rb#18 +# source://activemodel//lib/active_model/attributes.rb#39 module ActiveModel::Attributes::ClassMethods - # source://activemodel//lib/active_model/attributes.rb#19 - def attribute(name, cast_type = T.unsafe(nil), default: T.unsafe(nil), **options); end + # :call-seq: attribute(name, cast_type = nil, default: nil, **options) + # + # Defines a model attribute. In addition to the attribute name, a cast + # type and default value may be specified, as well as any options + # supported by the given cast type. + # + # class Person + # include ActiveModel::Attributes + # + # attribute :name, :string + # attribute :active, :boolean, default: true + # end + # + # person = Person.new + # person.name = "Volmer" + # + # person.name # => "Volmer" + # person.active # => true + # + # source://activemodel//lib/active_model/attributes.rb#59 + def attribute(name, *_arg1, **_arg2, &_arg3); end - # Returns an array of attribute names as strings + # Returns an array of attribute names as strings. # # class Person # include ActiveModel::Attributes @@ -1264,48 +1441,41 @@ module ActiveModel::Attributes::ClassMethods # attribute :age, :integer # end # - # Person.attribute_names - # # => ["name", "age"] + # Person.attribute_names # => ["name", "age"] # - # source://activemodel//lib/active_model/attributes.rb#41 + # source://activemodel//lib/active_model/attributes.rb#74 def attribute_names; end private - # source://activemodel//lib/active_model/attributes.rb#62 - def define_default_attribute(name, value, type); end - - # source://activemodel//lib/active_model/attributes.rb#46 + # source://activemodel//lib/active_model/attributes.rb#79 def define_method_attribute=(name, owner:); end end -# source://activemodel//lib/active_model/attributes.rb#59 -ActiveModel::Attributes::ClassMethods::NO_DEFAULT_PROVIDED = T.let(T.unsafe(nil), Object) - # +BlockValidator+ is a special +EachValidator+ which receives a block on initialization # and call this block for each attribute being validated. +validates_each+ uses this validator. # -# source://activemodel//lib/active_model/validator.rb#177 +# source://activemodel//lib/active_model/validator.rb#179 class ActiveModel::BlockValidator < ::ActiveModel::EachValidator # @return [BlockValidator] a new instance of BlockValidator # - # source://activemodel//lib/active_model/validator.rb#178 + # source://activemodel//lib/active_model/validator.rb#180 def initialize(options, &block); end private - # source://activemodel//lib/active_model/validator.rb#184 + # source://activemodel//lib/active_model/validator.rb#186 def validate_each(record, attribute, value); end end -# == Active \Model \Callbacks +# = Active \Model \Callbacks # # Provides an interface for any class to have Active Record like callbacks. # # Like the Active Record methods, the callback chain is aborted as soon as # one of the methods throws +:abort+. # -# First, extend ActiveModel::Callbacks from the class you are creating: +# First, extend +ActiveModel::Callbacks+ from the class you are creating: # # class MyModel # extend ActiveModel::Callbacks @@ -1358,7 +1528,7 @@ end # # source://activemodel//lib/active_model/callbacks.rb#65 module ActiveModel::Callbacks - # define_model_callbacks accepts the same options +define_callbacks+ does, + # +define_model_callbacks+ accepts the same options +define_callbacks+ does, # in case you want to overwrite a default. Besides that, it also accepts an # :only option, where you can choose if you want all types (before, # around or after) or just some. @@ -1366,7 +1536,7 @@ module ActiveModel::Callbacks # define_model_callbacks :initialize, only: :after # # Note, the only: hash will apply to all callbacks defined - # on that method call. To get around this you can call the define_model_callbacks + # on that method call. To get around this you can call the +define_model_callbacks+ # method as many times as you need. # # define_model_callbacks :create, only: :after @@ -1393,7 +1563,7 @@ module ActiveModel::Callbacks # end # end # - # NOTE: +method_name+ passed to define_model_callbacks must not end with + # NOTE: +method_name+ passed to +define_model_callbacks+ must not end with # !, ? or =. # # source://activemodel//lib/active_model/callbacks.rb#109 @@ -1416,7 +1586,7 @@ module ActiveModel::Callbacks end end -# == Active \Model \Conversion +# = Active \Model \Conversion # # Handles default conversions: to_model, to_key, to_param, and to_partial_path. # @@ -1440,7 +1610,9 @@ end # source://activemodel//lib/active_model/conversion.rb#24 module ActiveModel::Conversion extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActiveModel::Conversion::ClassMethods # Returns an Array of all key attributes if any of the attributes is set, whether or not @@ -1458,7 +1630,7 @@ module ActiveModel::Conversion # person = Person.new(1) # person.to_key # => [1] # - # source://activemodel//lib/active_model/conversion.rb#59 + # source://activemodel//lib/active_model/conversion.rb#67 def to_key; end # If your object is already designed to implement all of the \Active \Model @@ -1476,7 +1648,7 @@ module ActiveModel::Conversion # define :to_model yourself returning a proxy object that wraps # your object with \Active \Model compliant methods. # - # source://activemodel//lib/active_model/conversion.rb#41 + # source://activemodel//lib/active_model/conversion.rb#49 def to_model; end # Returns a +string+ representing the object's key suitable for use in URLs, @@ -1498,7 +1670,7 @@ module ActiveModel::Conversion # person = Person.new(1) # person.to_param # => "1" # - # source://activemodel//lib/active_model/conversion.rb#82 + # source://activemodel//lib/active_model/conversion.rb#90 def to_param; end # Returns a +string+ identifying the path associated with the object. @@ -1511,20 +1683,30 @@ module ActiveModel::Conversion # person = Person.new # person.to_partial_path # => "people/person" # - # source://activemodel//lib/active_model/conversion.rb#95 + # source://activemodel//lib/active_model/conversion.rb#103 def to_partial_path; end + + module GeneratedClassMethods + def param_delimiter; end + def param_delimiter=(value); end + def param_delimiter?; end + end + + module GeneratedInstanceMethods + def param_delimiter=(value); end + end end -# source://activemodel//lib/active_model/conversion.rb#99 +# source://activemodel//lib/active_model/conversion.rb#107 module ActiveModel::Conversion::ClassMethods # Provide a class level cache for #to_partial_path. This is an # internal method and should not be accessed directly. # - # source://activemodel//lib/active_model/conversion.rb#102 + # source://activemodel//lib/active_model/conversion.rb#110 def _to_partial_path; end end -# == Active \Model \Dirty +# = Active \Model \Dirty # # Provides a way to track changes in your object in the same way as # Active Record does. @@ -1534,8 +1716,7 @@ end # * include ActiveModel::Dirty in your object. # * Call define_attribute_methods passing each method you want to # track. -# * Call [attr_name]_will_change! before each change to the tracked -# attribute. +# * Call *_will_change! before each change to the tracked attribute. # * Call changes_applied after the changes are persisted. # * Call clear_changes_information when you want to reset the changes # information. @@ -1630,17 +1811,20 @@ end # person.changes # => {"name" => ["Bill", "Bob"]} # # If an attribute is modified in-place then make use of -# [attribute_name]_will_change! to mark that the attribute is changing. +# {*_will_change!}[rdoc-label:method-i-2A_will_change-21] to mark that the attribute is changing. # Otherwise \Active \Model can't track changes to in-place attributes. Note # that Active Record can detect in-place modifications automatically. You do -# not need to call [attribute_name]_will_change! on Active Record models. +# not need to call *_will_change! on Active Record models. # # person.name_will_change! # person.name_change # => ["Bill", "Bill"] # person.name << 'y' # person.name_change # => ["Bill", "Billy"] # -# source://activemodel//lib/active_model/dirty.rb#121 +# Methods can be invoked as +name_changed?+ or by passing an argument to the +# generic method attribute_changed?("name"). +# +# source://activemodel//lib/active_model/dirty.rb#123 module ActiveModel::Dirty extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -1649,36 +1833,36 @@ module ActiveModel::Dirty mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods - # source://activemodel//lib/active_model/dirty.rb#143 + # source://activemodel//lib/active_model/dirty.rb#258 def as_json(options = T.unsafe(nil)); end - # Dispatch target for *_changed? attribute methods. + # Dispatch target for {*_changed?}[rdoc-label:method-i-2A_changed-3F] attribute methods. # # @return [Boolean] # - # source://activemodel//lib/active_model/dirty.rb#178 + # source://activemodel//lib/active_model/dirty.rb#293 def attribute_changed?(attr_name, **options); end # @return [Boolean] # - # source://activemodel//lib/active_model/dirty.rb#245 + # source://activemodel//lib/active_model/dirty.rb#360 def attribute_changed_in_place?(attr_name); end - # Dispatch target for *_previously_changed? attribute methods. + # Dispatch target for {*_previously_changed?}[rdoc-label:method-i-2A_previously_changed-3F] attribute methods. # # @return [Boolean] # - # source://activemodel//lib/active_model/dirty.rb#188 + # source://activemodel//lib/active_model/dirty.rb#303 def attribute_previously_changed?(attr_name, **options); end - # Dispatch target for *_previously_was attribute methods. + # Dispatch target for {*_previously_was}[rdoc-label:method-i-2A_previously_was] attribute methods. # - # source://activemodel//lib/active_model/dirty.rb#193 + # source://activemodel//lib/active_model/dirty.rb#308 def attribute_previously_was(attr_name); end - # Dispatch target for *_was attribute methods. + # Dispatch target for {*_was}[rdoc-label:method-i-2A_was] attribute methods. # - # source://activemodel//lib/active_model/dirty.rb#183 + # source://activemodel//lib/active_model/dirty.rb#298 def attribute_was(attr_name); end # Returns an array with the name of the attributes with unsaved changes. @@ -1687,7 +1871,7 @@ module ActiveModel::Dirty # person.name = 'bob' # person.changed # => ["name"] # - # source://activemodel//lib/active_model/dirty.rb#173 + # source://activemodel//lib/active_model/dirty.rb#288 def changed; end # Returns +true+ if any of the attributes has unsaved changes, +false+ otherwise. @@ -1698,7 +1882,7 @@ module ActiveModel::Dirty # # @return [Boolean] # - # source://activemodel//lib/active_model/dirty.rb#164 + # source://activemodel//lib/active_model/dirty.rb#279 def changed?; end # Returns a hash of the attributes with unsaved changes indicating their original @@ -1708,7 +1892,7 @@ module ActiveModel::Dirty # person.name = 'robert' # person.changed_attributes # => {"name" => "bob"} # - # source://activemodel//lib/active_model/dirty.rb#221 + # source://activemodel//lib/active_model/dirty.rb#336 def changed_attributes; end # Returns a hash of changed attributes indicating their original @@ -1718,21 +1902,21 @@ module ActiveModel::Dirty # person.name = 'bob' # person.changes # => { "name" => ["bill", "bob"] } # - # source://activemodel//lib/active_model/dirty.rb#231 + # source://activemodel//lib/active_model/dirty.rb#346 def changes; end # Clears dirty data and moves +changes+ to +previous_changes+ and # +mutations_from_database+ to +mutations_before_last_save+ respectively. # - # source://activemodel//lib/active_model/dirty.rb#150 + # source://activemodel//lib/active_model/dirty.rb#265 def changes_applied; end - # source://activemodel//lib/active_model/dirty.rb#209 + # source://activemodel//lib/active_model/dirty.rb#324 def clear_attribute_changes(attr_names); end # Clears all dirty data: current changes and previous changes. # - # source://activemodel//lib/active_model/dirty.rb#203 + # source://activemodel//lib/active_model/dirty.rb#318 def clear_changes_information; end # Returns a hash of attributes that were changed before the model was saved. @@ -1742,75 +1926,80 @@ module ActiveModel::Dirty # person.save # person.previous_changes # => {"name" => ["bob", "robert"]} # - # source://activemodel//lib/active_model/dirty.rb#241 + # source://activemodel//lib/active_model/dirty.rb#356 def previous_changes; end # Restore all previous data of the provided attributes. # - # source://activemodel//lib/active_model/dirty.rb#198 + # source://activemodel//lib/active_model/dirty.rb#313 def restore_attributes(attr_names = T.unsafe(nil)); end private # Dispatch target for *_change attribute methods. # - # source://activemodel//lib/active_model/dirty.rb#271 + # source://activemodel//lib/active_model/dirty.rb#392 def attribute_change(attr_name); end # Dispatch target for *_previous_change attribute methods. # - # source://activemodel//lib/active_model/dirty.rb#276 + # source://activemodel//lib/active_model/dirty.rb#397 def attribute_previous_change(attr_name); end # Dispatch target for *_will_change! attribute methods. # - # source://activemodel//lib/active_model/dirty.rb#281 + # source://activemodel//lib/active_model/dirty.rb#402 def attribute_will_change!(attr_name); end - # source://activemodel//lib/active_model/dirty.rb#250 + # source://activemodel//lib/active_model/dirty.rb#371 def clear_attribute_change(attr_name); end - # source://activemodel//lib/active_model/dirty.rb#262 + # source://activemodel//lib/active_model/dirty.rb#383 def forget_attribute_assignments; end - # source://activemodel//lib/active_model/dirty.rb#133 + # source://activemodel//lib/active_model/dirty.rb#365 + def init_internals; end + + # source://activemodel//lib/active_model/dirty.rb#248 def initialize_dup(other); end - # source://activemodel//lib/active_model/dirty.rb#266 + # source://activemodel//lib/active_model/dirty.rb#387 def mutations_before_last_save; end - # source://activemodel//lib/active_model/dirty.rb#254 + # source://activemodel//lib/active_model/dirty.rb#375 def mutations_from_database; end # Dispatch target for restore_*! attribute methods. # - # source://activemodel//lib/active_model/dirty.rb#286 + # source://activemodel//lib/active_model/dirty.rb#407 def restore_attribute!(attr_name); end module GeneratedClassMethods def attribute_aliases; end def attribute_aliases=(value); end def attribute_aliases?; end - def attribute_method_matchers; end - def attribute_method_matchers=(value); end - def attribute_method_matchers?; end + def attribute_method_patterns; end + def attribute_method_patterns=(value); end + def attribute_method_patterns?; end end module GeneratedInstanceMethods def attribute_aliases; end def attribute_aliases?; end - def attribute_method_matchers; end - def attribute_method_matchers?; end + def attribute_method_patterns; end + def attribute_method_patterns?; end end end +# = Active \Model \EachValidator +# # +EachValidator+ is a validator which iterates through the attributes given # in the options hash invoking the validate_each method passing in the # record, attribute, and value. # # All \Active \Model validations are built on top of this validator. # -# source://activemodel//lib/active_model/validator.rb#132 +# source://activemodel//lib/active_model/validator.rb#134 class ActiveModel::EachValidator < ::ActiveModel::Validator # Returns a new validator instance. All options will be available via the # +options+ reader, however the :attributes option will be removed @@ -1819,26 +2008,26 @@ class ActiveModel::EachValidator < ::ActiveModel::Validator # @raise [ArgumentError] # @return [EachValidator] a new instance of EachValidator # - # source://activemodel//lib/active_model/validator.rb#138 + # source://activemodel//lib/active_model/validator.rb#140 def initialize(options); end # Returns the value of attribute attributes. # - # source://activemodel//lib/active_model/validator.rb#133 + # source://activemodel//lib/active_model/validator.rb#135 def attributes; end # Hook method that gets called by the initializer allowing verification # that the arguments supplied are valid. You could for example raise an # +ArgumentError+ when invalid options are supplied. # - # source://activemodel//lib/active_model/validator.rb#166 + # source://activemodel//lib/active_model/validator.rb#168 def check_validity!; end # Performs validation on the supplied record. By default this will call # +validate_each+ to determine validity therefore subclasses should # override +validate_each+ with validation logic. # - # source://activemodel//lib/active_model/validator.rb#148 + # source://activemodel//lib/active_model/validator.rb#150 def validate(record); end # Override this method in subclasses with the validation logic, adding @@ -1846,16 +2035,16 @@ class ActiveModel::EachValidator < ::ActiveModel::Validator # # @raise [NotImplementedError] # - # source://activemodel//lib/active_model/validator.rb#159 + # source://activemodel//lib/active_model/validator.rb#161 def validate_each(record, attribute, value); end private - # source://activemodel//lib/active_model/validator.rb#170 + # source://activemodel//lib/active_model/validator.rb#172 def prepare_value_for_validation(value, record, attr_name); end end -# == Active \Model \Error +# = Active \Model \Error # # Represents one single error # @@ -1866,7 +2055,7 @@ class ActiveModel::Error # source://activemodel//lib/active_model/error.rb#103 def initialize(base, attribute, type = T.unsafe(nil), **options); end - # source://activemodel//lib/active_model/error.rb#189 + # source://activemodel//lib/active_model/error.rb#190 def ==(other); end # The attribute of +base+ which the error belongs to @@ -1885,7 +2074,7 @@ class ActiveModel::Error # error.details # # => { error: :too_short, count: 5 } # - # source://activemodel//lib/active_model/error.rb#148 + # source://activemodel//lib/active_model/error.rb#149 def detail; end # Returns the error details. @@ -1894,10 +2083,10 @@ class ActiveModel::Error # error.details # # => { error: :too_short, count: 5 } # - # source://activemodel//lib/active_model/error.rb#148 + # source://activemodel//lib/active_model/error.rb#149 def details; end - # source://activemodel//lib/active_model/error.rb#189 + # source://activemodel//lib/active_model/error.rb#190 def eql?(other); end # Returns the full error message. @@ -1906,10 +2095,10 @@ class ActiveModel::Error # error.full_message # # => "Name is too short (minimum is 5 characters)" # - # source://activemodel//lib/active_model/error.rb#158 + # source://activemodel//lib/active_model/error.rb#159 def full_message; end - # source://activemodel//lib/active_model/error.rb#194 + # source://activemodel//lib/active_model/error.rb#195 def hash; end # source://activemodel//lib/active_model/error.rb#13 @@ -1921,7 +2110,7 @@ class ActiveModel::Error # source://activemodel//lib/active_model/error.rb#13 def i18n_customize_full_message?; end - # source://activemodel//lib/active_model/error.rb#198 + # source://activemodel//lib/active_model/error.rb#199 def inspect; end # See if error matches provided +attribute+, +type+, and +options+. @@ -1930,7 +2119,7 @@ class ActiveModel::Error # # @return [Boolean] # - # source://activemodel//lib/active_model/error.rb#165 + # source://activemodel//lib/active_model/error.rb#166 def match?(attribute, type = T.unsafe(nil), **options); end # Returns the error message. @@ -1939,17 +2128,18 @@ class ActiveModel::Error # error.message # # => "is too short (minimum is 5 characters)" # - # source://activemodel//lib/active_model/error.rb#134 + # source://activemodel//lib/active_model/error.rb#135 def message; end - # The options provided when calling +errors#add+ + # The options provided when calling errors#add # - # source://activemodel//lib/active_model/error.rb#127 + # source://activemodel//lib/active_model/error.rb#128 def options; end - # The raw value provided as the second parameter when calling +errors#add+ + # The raw value provided as the second parameter when calling + # errors#add # - # source://activemodel//lib/active_model/error.rb#125 + # source://activemodel//lib/active_model/error.rb#126 def raw_type; end # See if error matches provided +attribute+, +type+, and +options+ exactly. @@ -1959,7 +2149,7 @@ class ActiveModel::Error # # @return [Boolean] # - # source://activemodel//lib/active_model/error.rb#183 + # source://activemodel//lib/active_model/error.rb#184 def strict_match?(attribute, type, **options); end # The type of error, defaults to +:invalid+ unless specified @@ -1969,7 +2159,7 @@ class ActiveModel::Error protected - # source://activemodel//lib/active_model/error.rb#203 + # source://activemodel//lib/active_model/error.rb#204 def attributes_for_hash; end private @@ -2001,7 +2191,7 @@ ActiveModel::Error::CALLBACKS_OPTIONS = T.let(T.unsafe(nil), Array) # source://activemodel//lib/active_model/error.rb#11 ActiveModel::Error::MESSAGE_OPTIONS = T.let(T.unsafe(nil), Array) -# == Active \Model \Errors +# = Active \Model \Errors # # Provides error related functionalities you can include in your object # for handling error messages and interacting with Action View helpers. @@ -2052,7 +2242,7 @@ ActiveModel::Error::MESSAGE_OPTIONS = T.let(T.unsafe(nil), Array) # person.errors.full_messages # => ["name cannot be nil"] # # etc.. # -# source://activemodel//lib/active_model/errors.rb#62 +# source://activemodel//lib/active_model/errors.rb#61 class ActiveModel::Errors include ::Enumerable extend ::Forwardable @@ -2067,7 +2257,7 @@ class ActiveModel::Errors # # @return [Errors] a new instance of Errors # - # source://activemodel//lib/active_model/errors.rb#92 + # source://activemodel//lib/active_model/errors.rb#117 def initialize(base); end # When passed a symbol or a name of a method, returns an array of errors @@ -2076,7 +2266,7 @@ class ActiveModel::Errors # person.errors[:name] # => ["cannot be nil"] # person.errors['name'] # => ["cannot be nil"] # - # source://activemodel//lib/active_model/errors.rb#204 + # source://activemodel//lib/active_model/errors.rb#229 def [](attribute); end # Adds a new error of +type+ on +attribute+. @@ -2101,7 +2291,7 @@ class ActiveModel::Errors # person.errors.messages # # => {:name=>["can't be blank"]} # - # person.errors.add(:name, :too_long, { count: 25 }) + # person.errors.add(:name, :too_long, count: 25) # person.errors.messages # # => ["is too long (maximum is 25 characters)"] # @@ -2129,7 +2319,7 @@ class ActiveModel::Errors # person.errors.details # # => {:base=>[{error: :name_or_email_blank}]} # - # source://activemodel//lib/active_model/errors.rb#317 + # source://activemodel//lib/active_model/errors.rb#342 def add(attribute, type = T.unsafe(nil), **options); end # Returns +true+ if an error matches provided +attribute+ and +type+, @@ -2142,7 +2332,7 @@ class ActiveModel::Errors # If the error requires options, then it returns +true+ with # the correct options, or +false+ with incorrect or missing options. # - # person.errors.add :name, :too_long, { count: 25 } + # person.errors.add :name, :too_long, count: 25 # person.errors.added? :name, :too_long, count: 25 # => true # person.errors.added? :name, "is too long (maximum is 25 characters)" # => true # person.errors.added? :name, :too_long, count: 24 # => false @@ -2151,17 +2341,17 @@ class ActiveModel::Errors # # @return [Boolean] # - # source://activemodel//lib/active_model/errors.rb#347 + # source://activemodel//lib/active_model/errors.rb#372 def added?(attribute, type = T.unsafe(nil), options = T.unsafe(nil)); end # Returns a Hash that can be used as the JSON representation for this # object. You can pass the :full_messages option. This determines - # if the json object should contain full messages or not (false by default). + # if the JSON object should contain full messages or not (false by default). # # person.errors.as_json # => {:name=>["cannot be nil"]} # person.errors.as_json(full_messages: true) # => {:name=>["name cannot be nil"]} # - # source://activemodel//lib/active_model/errors.rb#222 + # source://activemodel//lib/active_model/errors.rb#247 def as_json(options = T.unsafe(nil)); end # Returns all error attribute names @@ -2169,7 +2359,7 @@ class ActiveModel::Errors # person.errors.messages # => {:name=>["cannot be nil", "must be specified"]} # person.errors.attribute_names # => [:name] # - # source://activemodel//lib/active_model/errors.rb#212 + # source://activemodel//lib/active_model/errors.rb#237 def attribute_names; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -2186,7 +2376,7 @@ class ActiveModel::Errors # # person.errors.copy!(other) # - # source://activemodel//lib/active_model/errors.rb#113 + # source://activemodel//lib/active_model/errors.rb#138 def copy!(other); end # Delete messages for +key+. Returns the deleted messages. @@ -2195,12 +2385,12 @@ class ActiveModel::Errors # person.errors.delete(:name) # => ["cannot be nil"] # person.errors[:name] # => [] # - # source://activemodel//lib/active_model/errors.rb#190 + # source://activemodel//lib/active_model/errors.rb#215 def delete(attribute, type = T.unsafe(nil), **options); end # Returns a Hash of attributes with an array of their error details. # - # source://activemodel//lib/active_model/errors.rb#251 + # source://activemodel//lib/active_model/errors.rb#276 def details; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -2212,14 +2402,14 @@ class ActiveModel::Errors # The actual array of +Error+ objects # This method is aliased to objects. # - # source://activemodel//lib/active_model/errors.rb#82 + # source://activemodel//lib/active_model/errors.rb#107 def errors; end # Returns a full message for a given attribute. # # person.errors.full_message(:name, 'is invalid') # => "Name is invalid" # - # source://activemodel//lib/active_model/errors.rb#426 + # source://activemodel//lib/active_model/errors.rb#451 def full_message(attribute, message); end # Returns all the full error messages in an array. @@ -2233,7 +2423,7 @@ class ActiveModel::Errors # person.errors.full_messages # # => ["Name is too short (minimum is 5 characters)", "Name can't be blank", "Email can't be blank"] # - # source://activemodel//lib/active_model/errors.rb#390 + # source://activemodel//lib/active_model/errors.rb#415 def full_messages; end # Returns all the full error messages for a given attribute in an array. @@ -2247,7 +2437,7 @@ class ActiveModel::Errors # person.errors.full_messages_for(:name) # # => ["Name is too short (minimum is 5 characters)", "Name can't be blank"] # - # source://activemodel//lib/active_model/errors.rb#405 + # source://activemodel//lib/active_model/errors.rb#430 def full_messages_for(attribute); end # Translates an error message in its default scope @@ -2275,7 +2465,7 @@ class ActiveModel::Errors # * errors.attributes.title.blank # * errors.messages.blank # - # source://activemodel//lib/active_model/errors.rb#454 + # source://activemodel//lib/active_model/errors.rb#479 def generate_message(attribute, type = T.unsafe(nil), options = T.unsafe(nil)); end # Returns a Hash of attributes with an array of their Error objects. @@ -2283,7 +2473,7 @@ class ActiveModel::Errors # person.errors.group_by_attribute # # => {:name=>[<#ActiveModel::Error>, <#ActiveModel::Error>]} # - # source://activemodel//lib/active_model/errors.rb#264 + # source://activemodel//lib/active_model/errors.rb#289 def group_by_attribute; end # Returns +true+ if the error messages include an error for the given key @@ -2295,7 +2485,7 @@ class ActiveModel::Errors # # @return [Boolean] # - # source://activemodel//lib/active_model/errors.rb#177 + # source://activemodel//lib/active_model/errors.rb#202 def has_key?(attribute); end # Imports one error. @@ -2308,7 +2498,7 @@ class ActiveModel::Errors # * +:attribute+ - Override the attribute the error belongs to. # * +:type+ - Override type of the error. # - # source://activemodel//lib/active_model/errors.rb#129 + # source://activemodel//lib/active_model/errors.rb#154 def import(error, override_options = T.unsafe(nil)); end # Returns +true+ if the error messages include an error for the given key @@ -2320,10 +2510,10 @@ class ActiveModel::Errors # # @return [Boolean] # - # source://activemodel//lib/active_model/errors.rb#177 + # source://activemodel//lib/active_model/errors.rb#202 def include?(attribute); end - # source://activemodel//lib/active_model/errors.rb#458 + # source://activemodel//lib/active_model/errors.rb#483 def inspect; end # Returns +true+ if the error messages include an error for the given key @@ -2335,7 +2525,7 @@ class ActiveModel::Errors # # @return [Boolean] # - # source://activemodel//lib/active_model/errors.rb#177 + # source://activemodel//lib/active_model/errors.rb#202 def key?(attribute); end # Merges the errors from other, @@ -2349,12 +2539,12 @@ class ActiveModel::Errors # # person.errors.merge!(other) # - # source://activemodel//lib/active_model/errors.rb#149 + # source://activemodel//lib/active_model/errors.rb#174 def merge!(other); end # Returns a Hash of attributes with an array of their error messages. # - # source://activemodel//lib/active_model/errors.rb#243 + # source://activemodel//lib/active_model/errors.rb#268 def messages; end # Returns all the error messages for a given attribute in an array. @@ -2368,20 +2558,20 @@ class ActiveModel::Errors # person.errors.messages_for(:name) # # => ["is too short (minimum is 5 characters)", "can't be blank"] # - # source://activemodel//lib/active_model/errors.rb#419 + # source://activemodel//lib/active_model/errors.rb#444 def messages_for(attribute); end # The actual array of +Error+ objects # This method is aliased to objects. # - # source://activemodel//lib/active_model/errors.rb#82 + # source://activemodel//lib/active_model/errors.rb#107 def objects; end # Returns +true+ if an error on the attribute with the given type is # present, or +false+ otherwise. +type+ is treated the same as for +add+. # # person.errors.add :age - # person.errors.add :name, :too_long, { count: 25 } + # person.errors.add :name, :too_long, count: 25 # person.errors.of_kind? :age # => true # person.errors.of_kind? :name # => false # person.errors.of_kind? :name, :too_long # => true @@ -2391,7 +2581,7 @@ class ActiveModel::Errors # # @return [Boolean] # - # source://activemodel//lib/active_model/errors.rb#370 + # source://activemodel//lib/active_model/errors.rb#395 def of_kind?(attribute, type = T.unsafe(nil)); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -2408,7 +2598,7 @@ class ActiveModel::Errors # person.errors.full_messages # # => ["Name is too short (minimum is 5 characters)", "Name can't be blank", "Email can't be blank"] # - # source://activemodel//lib/active_model/errors.rb#390 + # source://activemodel//lib/active_model/errors.rb#415 def to_a; end # Returns a Hash of attributes with their error messages. If +full_messages+ @@ -2417,7 +2607,7 @@ class ActiveModel::Errors # person.errors.to_hash # => {:name=>["cannot be nil"]} # person.errors.to_hash(true) # => {:name=>["name cannot be nil"]} # - # source://activemodel//lib/active_model/errors.rb#231 + # source://activemodel//lib/active_model/errors.rb#256 def to_hash(full_messages = T.unsafe(nil)); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -2431,21 +2621,23 @@ class ActiveModel::Errors # person.errors.where(:name, :too_short) # => all name errors being too short # person.errors.where(:name, :too_short, minimum: 2) # => all name errors being too short and minimum is 2 # - # source://activemodel//lib/active_model/errors.rb#164 + # source://activemodel//lib/active_model/errors.rb#189 def where(attribute, type = T.unsafe(nil), **options); end private - # source://activemodel//lib/active_model/errors.rb#97 + # source://activemodel//lib/active_model/errors.rb#122 def initialize_dup(other); end - # source://activemodel//lib/active_model/errors.rb#465 + # source://activemodel//lib/active_model/errors.rb#490 def normalize_arguments(attribute, type, **options); end end -# source://activemodel//lib/active_model/errors.rb#240 +# source://activemodel//lib/active_model/errors.rb#265 ActiveModel::Errors::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) +# = Active \Model \ForbiddenAttributesError +# # Raised when forbidden attributes are used for mass assignment. # # class Person < ActiveRecord::Base @@ -2459,17 +2651,17 @@ ActiveModel::Errors::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) # Person.new(params) # # => # # -# source://activemodel//lib/active_model/forbidden_attributes_protection.rb#16 +# source://activemodel//lib/active_model/forbidden_attributes_protection.rb#18 class ActiveModel::ForbiddenAttributesError < ::StandardError; end -# source://activemodel//lib/active_model/forbidden_attributes_protection.rb#19 +# source://activemodel//lib/active_model/forbidden_attributes_protection.rb#21 module ActiveModel::ForbiddenAttributesProtection private - # source://activemodel//lib/active_model/forbidden_attributes_protection.rb#21 + # source://activemodel//lib/active_model/forbidden_attributes_protection.rb#23 def sanitize_for_mass_assignment(attributes); end - # source://activemodel//lib/active_model/forbidden_attributes_protection.rb#21 + # source://activemodel//lib/active_model/forbidden_attributes_protection.rb#23 def sanitize_forbidden_attributes(attributes); end end @@ -2664,7 +2856,7 @@ module ActiveModel::Lint; end # == Active \Model \Lint \Tests # # You can test whether an object is compliant with the Active \Model API by -# including ActiveModel::Lint::Tests in your TestCase. It will +# including +ActiveModel::Lint::Tests+ in your TestCase. It will # include tests that tell you whether your object is fully compliant, # or if not, which aspects of the API are not implemented. # @@ -2768,12 +2960,12 @@ end # # user = User.first # user.pets.select(:id).first.user_id -# # => ActiveModel::MissingAttributeError: missing attribute: user_id +# # => ActiveModel::MissingAttributeError: missing attribute 'user_id' for Pet # # source://activemodel//lib/active_model/attribute_methods.rb#15 class ActiveModel::MissingAttributeError < ::NoMethodError; end -# == Active \Model \Basic \Model +# = Active \Model \Basic \Model # # Allows implementing models similar to ActiveRecord::Base. # Includes ActiveModel::API for the required interface for an @@ -2809,11 +3001,12 @@ class ActiveModel::MissingAttributeError < ::NoMethodError; end # person.omg # => true # # For more detailed information on other functionalities available, please -# refer to the specific modules included in ActiveModel::Model +# refer to the specific modules included in +ActiveModel::Model+ # (see below). # # source://activemodel//lib/active_model/model.rb#42 module ActiveModel::Model + include ::ActiveModel::Access extend ::ActiveSupport::Concern include GeneratedInstanceMethods include ::ActiveSupport::Callbacks @@ -2838,6 +3031,9 @@ module ActiveModel::Model def _validators; end def _validators=(value); end def _validators?; end + def param_delimiter; end + def param_delimiter=(value); end + def param_delimiter?; end end module GeneratedInstanceMethods @@ -2845,6 +3041,7 @@ module ActiveModel::Model def __callbacks?; end def _validators; end def _validators?; end + def param_delimiter=(value); end end end @@ -3030,16 +3227,25 @@ class ActiveModel::Name # @return [Boolean] # - # source://activemodel//lib/active_model/naming.rb#212 + # source://activemodel//lib/active_model/naming.rb#209 def uncountable?; end private - # source://activemodel//lib/active_model/naming.rb#217 + # source://activemodel//lib/active_model/naming.rb#216 def _singularize(string); end + + # source://activemodel//lib/active_model/naming.rb#220 + def i18n_keys; end + + # source://activemodel//lib/active_model/naming.rb#228 + def i18n_scope; end end -# == Active \Model \Naming +# source://activemodel//lib/active_model/naming.rb#214 +ActiveModel::Name::MISSING_TRANSLATION = T.let(T.unsafe(nil), Integer) + +# = Active \Model \Naming # # Creates a +model_name+ method on your object. # @@ -3059,7 +3265,7 @@ end # is required to pass the \Active \Model Lint test. So either extending the # provided method below, or rolling your own is required. # -# source://activemodel//lib/active_model/naming.rb#241 +# source://activemodel//lib/active_model/naming.rb#252 module ActiveModel::Naming # Returns an ActiveModel::Name object for module. It can be # used to retrieve all kinds of naming-related information @@ -3074,11 +3280,16 @@ module ActiveModel::Naming # Person.model_name.singular # => "person" # Person.model_name.plural # => "people" # - # source://activemodel//lib/active_model/naming.rb#259 + # source://activemodel//lib/active_model/naming.rb#270 def model_name; end + private + + # source://activemodel//lib/active_model/naming.rb#352 + def inherited(base); end + class << self - # source://activemodel//lib/active_model/naming.rb#242 + # source://activemodel//lib/active_model/naming.rb#253 def extended(base); end # Returns string to use for params names. It differs for @@ -3090,7 +3301,7 @@ module ActiveModel::Naming # # For shared engine: # ActiveModel::Naming.param_key(Blog::Post) # => "blog_post" # - # source://activemodel//lib/active_model/naming.rb#327 + # source://activemodel//lib/active_model/naming.rb#338 def param_key(record_or_class); end # Returns the plural class name of a record or class. @@ -3098,7 +3309,7 @@ module ActiveModel::Naming # ActiveModel::Naming.plural(post) # => "posts" # ActiveModel::Naming.plural(Highrise::Person) # => "highrise_people" # - # source://activemodel//lib/active_model/naming.rb#272 + # source://activemodel//lib/active_model/naming.rb#283 def plural(record_or_class); end # Returns string to use while generating route names. It differs for @@ -3113,7 +3324,7 @@ module ActiveModel::Naming # The route key also considers if the noun is uncountable and, in # such cases, automatically appends _index. # - # source://activemodel//lib/active_model/naming.rb#315 + # source://activemodel//lib/active_model/naming.rb#326 def route_key(record_or_class); end # Returns the singular class name of a record or class. @@ -3121,7 +3332,7 @@ module ActiveModel::Naming # ActiveModel::Naming.singular(post) # => "post" # ActiveModel::Naming.singular(Highrise::Person) # => "highrise_person" # - # source://activemodel//lib/active_model/naming.rb#280 + # source://activemodel//lib/active_model/naming.rb#291 def singular(record_or_class); end # Returns string to use while generating route names. It differs for @@ -3133,7 +3344,7 @@ module ActiveModel::Naming # # For shared engine: # ActiveModel::Naming.singular_route_key(Blog::Post) # => "blog_post" # - # source://activemodel//lib/active_model/naming.rb#300 + # source://activemodel//lib/active_model/naming.rb#311 def singular_route_key(record_or_class); end # Identifies whether the class name of a record or class is uncountable. @@ -3143,12 +3354,12 @@ module ActiveModel::Naming # # @return [Boolean] # - # source://activemodel//lib/active_model/naming.rb#288 + # source://activemodel//lib/active_model/naming.rb#299 def uncountable?(record_or_class); end private - # source://activemodel//lib/active_model/naming.rb#331 + # source://activemodel//lib/active_model/naming.rb#342 def model_name_from_record_or_class(record_or_class); end end end @@ -3217,9 +3428,11 @@ end # source://activemodel//lib/active_model/railtie.rb#7 class ActiveModel::Railtie < ::Rails::Railtie; end +# = Active \Model \RangeError +# # Raised when attribute values are out of range. # -# source://activemodel//lib/active_model/errors.rb#494 +# source://activemodel//lib/active_model/errors.rb#523 class ActiveModel::RangeError < ::RangeError; end # source://activemodel//lib/active_model/secure_password.rb#4 @@ -3240,8 +3453,8 @@ end # source://activemodel//lib/active_model/secure_password.rb#17 module ActiveModel::SecurePassword::ClassMethods # Adds methods to set and authenticate against a BCrypt password. - # This mechanism requires you to have a +XXX_digest+ attribute. - # Where +XXX+ is the attribute name of your desired password. + # This mechanism requires you to have a +XXX_digest+ attribute, + # where +XXX+ is the attribute name of your desired password. # # The following validations are added automatically: # * Password must be present on creation @@ -3253,10 +3466,17 @@ module ActiveModel::SecurePassword::ClassMethods # it). When this attribute has a +nil+ value, the validation will not be # triggered. # - # For further customizability, it is possible to suppress the default - # validations by passing validations: false as an argument. + # Additionally, a +XXX_challenge+ attribute is created. When set to a + # value other than +nil+, it will validate against the currently persisted + # password. This validation relies on dirty tracking, as provided by + # ActiveModel::Dirty; if dirty tracking methods are not defined, this + # validation will fail. + # + # All of the above validations can be omitted by passing + # validations: false as an argument. This allows complete + # customizability of validation behavior. # - # Add bcrypt (~> 3.1.7) to Gemfile to use #has_secure_password: + # To use +has_secure_password+, add bcrypt (~> 3.1.7) to your Gemfile: # # gem 'bcrypt', '~> 3.1.7' # @@ -3270,20 +3490,30 @@ module ActiveModel::SecurePassword::ClassMethods # has_secure_password :recovery_password, validations: false # end # - # user = User.new(name: 'david', password: '', password_confirmation: 'nomatch') - # user.save # => false, password required - # user.password = 'mUc3m00RsqyRe' - # user.save # => false, confirmation doesn't match - # user.password_confirmation = 'mUc3m00RsqyRe' - # user.save # => true + # user = User.new(name: "david", password: "", password_confirmation: "nomatch") + # + # user.save # => false, password required + # user.password = "vr00m" + # user.save # => false, confirmation doesn't match + # user.password_confirmation = "vr00m" + # user.save # => true + # + # user.authenticate("notright") # => false + # user.authenticate("vr00m") # => user + # User.find_by(name: "david")&.authenticate("notright") # => false + # User.find_by(name: "david")&.authenticate("vr00m") # => user + # # user.recovery_password = "42password" - # user.recovery_password_digest # => "$2a$04$iOfhwahFymCs5weB3BNH/uXkTG65HR.qpW.bNhEjFP3ftli3o5DQC" - # user.save # => true - # user.authenticate('notright') # => false - # user.authenticate('mUc3m00RsqyRe') # => user - # user.authenticate_recovery_password('42password') # => user - # User.find_by(name: 'david')&.authenticate('notright') # => false - # User.find_by(name: 'david')&.authenticate('mUc3m00RsqyRe') # => user + # user.recovery_password_digest # => "$2a$04$iOfhwahFymCs5weB3BNH/uXkTG65HR.qpW.bNhEjFP3ftli3o5DQC" + # user.save # => true + # + # user.authenticate_recovery_password("42password") # => user + # + # user.update(password: "pwn3d", password_challenge: "") # => false, challenge doesn't authenticate + # user.update(password: "nohack4u", password_challenge: "vr00m") # => true + # + # user.authenticate("vr00m") # => false, old password + # user.authenticate("nohack4u") # => user # # ===== Conditionally requiring a password # @@ -3305,15 +3535,15 @@ module ActiveModel::SecurePassword::ClassMethods # account.is_guest = true # account.valid? # => true # - # source://activemodel//lib/active_model/secure_password.rb#84 + # source://activemodel//lib/active_model/secure_password.rb#101 def has_secure_password(attribute = T.unsafe(nil), validations: T.unsafe(nil)); end end -# source://activemodel//lib/active_model/secure_password.rb#114 +# source://activemodel//lib/active_model/secure_password.rb#148 class ActiveModel::SecurePassword::InstanceMethodsOnActivation < ::Module # @return [InstanceMethodsOnActivation] a new instance of InstanceMethodsOnActivation # - # source://activemodel//lib/active_model/secure_password.rb#115 + # source://activemodel//lib/active_model/secure_password.rb#149 def initialize(attribute); end end @@ -3324,7 +3554,7 @@ end # source://activemodel//lib/active_model/secure_password.rb#10 ActiveModel::SecurePassword::MAX_PASSWORD_LENGTH_ALLOWED = T.let(T.unsafe(nil), Integer) -# == Active \Model \Serialization +# = Active \Model \Serialization # # Provides a basic serialization to a serializable_hash for your objects. # @@ -3354,8 +3584,8 @@ ActiveModel::SecurePassword::MAX_PASSWORD_LENGTH_ALLOWED = T.let(T.unsafe(nil), # at the private method +read_attribute_for_serialization+. # # ActiveModel::Serializers::JSON module automatically includes -# the ActiveModel::Serialization module, so there is no need to -# explicitly include ActiveModel::Serialization. +# the +ActiveModel::Serialization+ module, so there is no need to +# explicitly include +ActiveModel::Serialization+. # # A minimal implementation including JSON would be: # @@ -3486,12 +3716,12 @@ module ActiveModel::Serialization def serializable_attributes(attribute_names); end end -# source://activemodel//lib/active_model.rb#64 +# source://activemodel//lib/active_model.rb#68 module ActiveModel::Serializers extend ::ActiveSupport::Autoload end -# == Active \Model \JSON \Serializer +# = Active \Model \JSON \Serializer # # source://activemodel//lib/active_model/serializers/json.rb#8 module ActiveModel::Serializers::JSON @@ -3634,6 +3864,8 @@ module ActiveModel::Serializers::JSON end end +# = Active \Model \StrictValidationFailed +# # Raised when a validation cannot be corrected by end users and are considered # exceptional. # @@ -3650,12 +3882,12 @@ end # person.valid? # # => ActiveModel::StrictValidationFailed: Name can't be blank # -# source://activemodel//lib/active_model/errors.rb#490 +# source://activemodel//lib/active_model/errors.rb#517 class ActiveModel::StrictValidationFailed < ::StandardError; end -# == Active \Model \Translation +# = Active \Model \Translation # -# Provides integration between your object and the Rails internationalization +# Provides integration between your object and the \Rails internationalization # (i18n) framework. # # A minimal implementation could be: @@ -3668,7 +3900,7 @@ class ActiveModel::StrictValidationFailed < ::StandardError; end # # => "My attribute" # # This also provides the required class methods for hooking into the -# Rails internationalization API, including being able to define a +# \Rails internationalization API, including being able to define a # class-based +i18n_scope+ and +lookup_ancestors+ to find translations in # parent classes. # @@ -3683,7 +3915,7 @@ module ActiveModel::Translation # # Specify +options+ with additional translating options. # - # source://activemodel//lib/active_model/translation.rb#44 + # source://activemodel//lib/active_model/translation.rb#46 def human_attribute_name(attribute, options = T.unsafe(nil)); end # Returns the +i18n_scope+ for the class. Override if you want custom lookup. @@ -3700,208 +3932,370 @@ module ActiveModel::Translation def lookup_ancestors; end end +# source://activemodel//lib/active_model/translation.rb#38 +ActiveModel::Translation::MISSING_TRANSLATION = T.let(T.unsafe(nil), Integer) + # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#4 module ActiveModel::Type class << self - # source://activemodel//lib/active_model/type.rb#37 + # source://activemodel//lib/active_model/type.rb#38 def default_value; end - # source://activemodel//lib/active_model/type.rb#33 + # source://activemodel//lib/active_model/type.rb#34 def lookup(*_arg0, **_arg1, &_arg2); end # Add a new type to the registry, allowing it to be referenced as a # symbol by {attribute}[rdoc-ref:Attributes::ClassMethods#attribute]. # - # source://activemodel//lib/active_model/type.rb#29 + # source://activemodel//lib/active_model/type.rb#30 def register(type_name, klass = T.unsafe(nil), &block); end - # source://activemodel//lib/active_model/type.rb#25 + # source://activemodel//lib/active_model/type.rb#26 def registry; end - # source://activemodel//lib/active_model/type.rb#25 + # source://activemodel//lib/active_model/type.rb#26 def registry=(_arg0); end end end -# source://activemodel//lib/active_model/type/big_integer.rb#7 +# = Active Model \BigInteger \Type +# +# Attribute type for integers that can be serialized to an unlimited number +# of bytes. This type is registered under the +:big_integer+ key. +# +# class Person +# include ActiveModel::Attributes +# +# attribute :id, :big_integer +# end +# +# person = Person.new +# person.id = "18_000_000_000" +# +# person.id # => 18000000000 +# +# All casting and serialization are performed in the same way as the +# standard ActiveModel::Type::Integer type. +# +# source://activemodel//lib/active_model/type/big_integer.rb#25 class ActiveModel::Type::BigInteger < ::ActiveModel::Type::Integer + # source://activemodel//lib/active_model/type/big_integer.rb#26 + def serialize_cast_value(value); end + private - # source://activemodel//lib/active_model/type/big_integer.rb#9 + # source://activemodel//lib/active_model/type/big_integer.rb#31 def max_value; end end -# source://activemodel//lib/active_model/type/binary.rb#5 +# = Active Model \Binary \Type +# +# Attribute type for representation of binary data. This type is registered +# under the +:binary+ key. +# +# Non-string values are coerced to strings using their +to_s+ method. +# +# source://activemodel//lib/active_model/type/binary.rb#11 class ActiveModel::Type::Binary < ::ActiveModel::Type::Value # @return [Boolean] # - # source://activemodel//lib/active_model/type/binary.rb#10 + # source://activemodel//lib/active_model/type/binary.rb#16 def binary?; end - # source://activemodel//lib/active_model/type/binary.rb#14 + # source://activemodel//lib/active_model/type/binary.rb#20 def cast(value); end # @return [Boolean] # - # source://activemodel//lib/active_model/type/binary.rb#29 + # source://activemodel//lib/active_model/type/binary.rb#35 def changed_in_place?(raw_old_value, value); end - # source://activemodel//lib/active_model/type/binary.rb#24 + # source://activemodel//lib/active_model/type/binary.rb#30 def serialize(value); end - # source://activemodel//lib/active_model/type/binary.rb#6 + # source://activemodel//lib/active_model/type/binary.rb#12 def type; end end -# source://activemodel//lib/active_model/type/binary.rb#34 +# source://activemodel//lib/active_model/type/binary.rb#40 class ActiveModel::Type::Binary::Data # @return [Data] a new instance of Data # - # source://activemodel//lib/active_model/type/binary.rb#35 + # source://activemodel//lib/active_model/type/binary.rb#41 def initialize(value); end - # source://activemodel//lib/active_model/type/binary.rb#50 + # source://activemodel//lib/active_model/type/binary.rb#56 def ==(other); end - # source://activemodel//lib/active_model/type/binary.rb#46 + # source://activemodel//lib/active_model/type/binary.rb#52 def hex; end - # source://activemodel//lib/active_model/type/binary.rb#41 + # source://activemodel//lib/active_model/type/binary.rb#47 def to_s; end - # source://activemodel//lib/active_model/type/binary.rb#41 + # source://activemodel//lib/active_model/type/binary.rb#47 def to_str; end end -# == Active \Model \Type \Boolean +# = Active Model \Boolean \Type # -# A class that behaves like a boolean type, including rules for coercion of user input. +# A class that behaves like a boolean type, including rules for coercion of +# user input. # -# === Coercion -# Values set from user input will first be coerced into the appropriate ruby type. -# Coercion behavior is roughly mapped to Ruby's boolean semantics. +# - "false", "f", "0", +0+ or any other value in +# +FALSE_VALUES+ will be coerced to +false+. +# - Empty strings are coerced to +nil+. +# - All other values will be coerced to +true+. # -# - "false", "f" , "0", +0+ or any other value in +FALSE_VALUES+ will be coerced to +false+ -# - Empty strings are coerced to +nil+ -# - All other values will be coerced to +true+ -# -# source://activemodel//lib/active_model/type/boolean.rb#16 +# source://activemodel//lib/active_model/type/boolean.rb#14 class ActiveModel::Type::Boolean < ::ActiveModel::Type::Value - # source://activemodel//lib/active_model/type/boolean.rb#32 + # source://activemodel//lib/active_model/type/boolean.rb#30 def serialize(value); end - # source://activemodel//lib/active_model/type/boolean.rb#28 + # source://activemodel//lib/active_model/type/boolean.rb#34 + def serialize_cast_value(value); end + + # source://activemodel//lib/active_model/type/boolean.rb#26 def type; end private - # source://activemodel//lib/active_model/type/boolean.rb#37 + # source://activemodel//lib/active_model/type/boolean.rb#39 def cast_value(value); end end -# source://activemodel//lib/active_model/type/boolean.rb#17 +# source://activemodel//lib/active_model/type/boolean.rb#15 ActiveModel::Type::Boolean::FALSE_VALUES = T.let(T.unsafe(nil), Set) -# source://activemodel//lib/active_model/type/date.rb#5 +# = Active Model \Date \Type +# +# Attribute type for date representation. It is registered under the +# +:date+ key. +# +# class Person +# include ActiveModel::Attributes +# +# attribute :birthday, :date +# end +# +# person = Person.new +# person.birthday = "1989-07-13" +# +# person.birthday.class # => Date +# person.birthday.year # => 1989 +# person.birthday.month # => 7 +# person.birthday.day # => 13 +# +# String values are parsed using the ISO 8601 date format. Any other values +# are cast using their +to_date+ method, if it exists. +# +# source://activemodel//lib/active_model/type/date.rb#26 class ActiveModel::Type::Date < ::ActiveModel::Type::Value include ::ActiveModel::Type::Helpers::Timezone include ::ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods - # source://activemodel//lib/active_model/type/date.rb#9 + # source://activemodel//lib/active_model/type/date.rb#30 def type; end - # source://activemodel//lib/active_model/type/date.rb#13 + # source://activemodel//lib/active_model/type/date.rb#34 def type_cast_for_schema(value); end private - # source://activemodel//lib/active_model/type/date.rb#18 + # source://activemodel//lib/active_model/type/date.rb#39 def cast_value(value); end - # source://activemodel//lib/active_model/type/date.rb#36 + # source://activemodel//lib/active_model/type/date.rb#57 def fallback_string_to_date(string); end - # source://activemodel//lib/active_model/type/date.rb#30 + # source://activemodel//lib/active_model/type/date.rb#51 def fast_string_to_date(string); end - # source://activemodel//lib/active_model/type/date.rb#40 + # source://activemodel//lib/active_model/type/date.rb#66 def new_date(year, mon, mday); end - # source://activemodel//lib/active_model/type/date.rb#46 + # source://activemodel//lib/active_model/type/date.rb#72 def value_from_multiparameter_assignment(*_arg0); end end -# source://activemodel//lib/active_model/type/date.rb#29 +# source://activemodel//lib/active_model/type/date.rb#50 ActiveModel::Type::Date::ISO_DATE = T.let(T.unsafe(nil), Regexp) -# source://activemodel//lib/active_model/type/date_time.rb#5 +# = Active Model \DateTime \Type +# +# Attribute type to represent dates and times. It is registered under the +# +:datetime+ key. +# +# class Event +# include ActiveModel::Attributes +# +# attribute :start, :datetime +# end +# +# event = Event.new +# event.start = "Wed, 04 Sep 2013 03:00:00 EAT" +# +# event.start.class # => Time +# event.start.year # => 2013 +# event.start.month # => 9 +# event.start.day # => 4 +# event.start.hour # => 3 +# event.start.min # => 0 +# event.start.sec # => 0 +# event.start.zone # => "EAT" +# +# String values are parsed using the ISO 8601 datetime format. Partial +# time-only formats are also accepted. +# +# event.start = "06:07:08+09:00" +# event.start.utc # => 1999-12-31 21:07:08 UTC +# +# The degree of sub-second precision can be customized when declaring an +# attribute: +# +# class Event +# include ActiveModel::Attributes +# +# attribute :start, :datetime, precision: 4 +# end +# +# source://activemodel//lib/active_model/type/date_time.rb#42 class ActiveModel::Type::DateTime < ::ActiveModel::Type::Value include ::ActiveModel::Type::Helpers::Timezone - include ::ActiveModel::Type::Helpers::TimeValue include ::ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods + include ::ActiveModel::Type::Helpers::TimeValue - # source://activemodel//lib/active_model/type/date_time.rb#12 + # source://activemodel//lib/active_model/type/date_time.rb#49 def type; end private - # source://activemodel//lib/active_model/type/date_time.rb#17 + # source://activemodel//lib/active_model/type/date_time.rb#54 def cast_value(value); end - # source://activemodel//lib/active_model/type/date_time.rb#30 + # source://activemodel//lib/active_model/type/date_time.rb#67 def fallback_string_to_time(string); end # '0.123456' -> 123456 # '1.123456' -> 123456 # - # source://activemodel//lib/active_model/type/date_time.rb#26 + # source://activemodel//lib/active_model/type/date_time.rb#63 def microseconds(time); end - # source://activemodel//lib/active_model/type/date_time.rb#37 + # source://activemodel//lib/active_model/type/date_time.rb#79 def value_from_multiparameter_assignment(values_hash); end end -# source://activemodel//lib/active_model/type/decimal.rb#7 +# = Active Model \Decimal \Type +# +# Attribute type for decimal, high-precision floating point numeric +# representation. It is registered under the +:decimal+ key. +# +# class BagOfCoffee +# include ActiveModel::Attributes +# +# attribute :weight, :decimal +# end +# +# Numeric instances are converted to BigDecimal instances. Any other objects +# are cast using their +to_d+ method, except for blank strings, which are +# cast to +nil+. If a +to_d+ method is not defined, the object is converted +# to a string using +to_s+, which is then cast using +to_d+. +# +# bag = BagOfCoffee.new +# +# bag.weight = 0.01 +# bag.weight # => 0.1e-1 +# +# bag.weight = "0.01" +# bag.weight # => 0.1e-1 +# +# bag.weight = "" +# bag.weight # => nil +# +# bag.weight = :arbitrary +# bag.weight # => nil (the result of `.to_s.to_d`) +# +# Decimal precision defaults to 18, and can be customized when declaring an +# attribute: +# +# class BagOfCoffee +# include ActiveModel::Attributes +# +# attribute :weight, :decimal, precision: 24 +# end +# +# source://activemodel//lib/active_model/type/decimal.rb#45 class ActiveModel::Type::Decimal < ::ActiveModel::Type::Value include ::ActiveModel::Type::Helpers::Numeric - # source://activemodel//lib/active_model/type/decimal.rb#11 + # source://activemodel//lib/active_model/type/decimal.rb#49 def type; end - # source://activemodel//lib/active_model/type/decimal.rb#15 + # source://activemodel//lib/active_model/type/decimal.rb#53 def type_cast_for_schema(value); end private - # source://activemodel//lib/active_model/type/decimal.rb#60 + # source://activemodel//lib/active_model/type/decimal.rb#98 def apply_scale(value); end - # source://activemodel//lib/active_model/type/decimal.rb#20 + # source://activemodel//lib/active_model/type/decimal.rb#58 def cast_value(value); end - # source://activemodel//lib/active_model/type/decimal.rb#44 + # source://activemodel//lib/active_model/type/decimal.rb#82 def convert_float_to_big_decimal(value); end - # source://activemodel//lib/active_model/type/decimal.rb#52 + # source://activemodel//lib/active_model/type/decimal.rb#90 def float_precision; end end -# source://activemodel//lib/active_model/type/decimal.rb#9 +# source://activemodel//lib/active_model/type/decimal.rb#47 ActiveModel::Type::Decimal::BIGDECIMAL_PRECISION = T.let(T.unsafe(nil), Integer) -# source://activemodel//lib/active_model/type/float.rb#7 +# = Active Model \Float \Type +# +# Attribute type for floating point numeric values. It is registered under +# the +:float+ key. +# +# class BagOfCoffee +# include ActiveModel::Attributes +# +# attribute :weight, :float +# end +# +# Values are cast using their +to_f+ method, except for the following +# strings: +# +# - Blank strings are cast to +nil+. +# - "Infinity" is cast to +Float::INFINITY+. +# - "-Infinity" is cast to -Float::INFINITY. +# - "NaN" is cast to +Float::NAN+. +# +# bag = BagOfCoffee.new +# +# bag.weight = "0.25" +# bag.weight # => 0.25 +# +# bag.weight = "" +# bag.weight # => nil +# +# bag.weight = "NaN" +# bag.weight # => Float::NAN +# +# source://activemodel//lib/active_model/type/float.rb#36 class ActiveModel::Type::Float < ::ActiveModel::Type::Value include ::ActiveModel::Type::Helpers::Numeric - # source://activemodel//lib/active_model/type/float.rb#10 + # source://activemodel//lib/active_model/type/float.rb#39 def type; end - # source://activemodel//lib/active_model/type/float.rb#14 + # source://activemodel//lib/active_model/type/float.rb#43 def type_cast_for_schema(value); end private - # source://activemodel//lib/active_model/type/float.rb#24 + # source://activemodel//lib/active_model/type/float.rb#53 def cast_value(value); end end @@ -3912,30 +4306,33 @@ module ActiveModel::Type::Helpers; end class ActiveModel::Type::Helpers::AcceptsMultiparameterTime < ::Module # @return [AcceptsMultiparameterTime] a new instance of AcceptsMultiparameterTime # - # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#33 + # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#37 def initialize(defaults: T.unsafe(nil)); end end # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#7 module ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods - # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#20 + # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#24 def assert_valid_value(value); end - # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#12 + # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#16 def cast(value); end # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#8 def serialize(value); end + # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#12 + def serialize_cast_value(value); end + # @return [Boolean] # - # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#28 + # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#32 def value_constructed_by_mass_assignment?(value); end end # source://activemodel//lib/active_model/type/helpers/mutable.rb#6 module ActiveModel::Type::Helpers::Mutable - # source://activemodel//lib/active_model/type/helpers/mutable.rb#11 + # source://activemodel//lib/active_model/type/helpers/mutable.rb#7 def cast(value); end # +raw_old_value+ will be the `_before_type_cast` version of the @@ -3944,45 +4341,50 @@ module ActiveModel::Type::Helpers::Mutable # # @return [Boolean] # - # source://activemodel//lib/active_model/type/helpers/mutable.rb#18 + # source://activemodel//lib/active_model/type/helpers/mutable.rb#14 def changed_in_place?(raw_old_value, new_value); end - # source://activemodel//lib/active_model/type/helpers/mutable.rb#7 - def immutable_value(value); end + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/helpers/mutable.rb#18 + def mutable?; end end # source://activemodel//lib/active_model/type/helpers/numeric.rb#6 module ActiveModel::Type::Helpers::Numeric - # source://activemodel//lib/active_model/type/helpers/numeric.rb#11 + # source://activemodel//lib/active_model/type/helpers/numeric.rb#15 def cast(value); end # @return [Boolean] # - # source://activemodel//lib/active_model/type/helpers/numeric.rb#27 + # source://activemodel//lib/active_model/type/helpers/numeric.rb#31 def changed?(old_value, _new_value, new_value_before_type_cast); end # source://activemodel//lib/active_model/type/helpers/numeric.rb#7 def serialize(value); end + # source://activemodel//lib/active_model/type/helpers/numeric.rb#11 + def serialize_cast_value(value); end + private # @return [Boolean] # - # source://activemodel//lib/active_model/type/helpers/numeric.rb#33 + # source://activemodel//lib/active_model/type/helpers/numeric.rb#37 def equal_nan?(old_value, new_value); end # @return [Boolean] # - # source://activemodel//lib/active_model/type/helpers/numeric.rb#44 + # source://activemodel//lib/active_model/type/helpers/numeric.rb#49 def non_numeric_string?(value); end # @return [Boolean] # - # source://activemodel//lib/active_model/type/helpers/numeric.rb#40 + # source://activemodel//lib/active_model/type/helpers/numeric.rb#44 def number_to_non_number?(old_value, new_value_before_type_cast); end end -# source://activemodel//lib/active_model/type/helpers/numeric.rb#51 +# source://activemodel//lib/active_model/type/helpers/numeric.rb#56 ActiveModel::Type::Helpers::Numeric::NUMERIC_REGEX = T.let(T.unsafe(nil), Regexp) # source://activemodel//lib/active_model/type/helpers/time_value.rb#9 @@ -3991,7 +4393,7 @@ module ActiveModel::Type::Helpers::TimeValue def apply_seconds_precision(value); end # source://activemodel//lib/active_model/type/helpers/time_value.rb#10 - def serialize(value); end + def serialize_cast_value(value); end # source://activemodel//lib/active_model/type/helpers/time_value.rb#38 def type_cast_for_schema(value); end @@ -4001,7 +4403,7 @@ module ActiveModel::Type::Helpers::TimeValue private - # source://activemodel//lib/active_model/type/helpers/time_value.rb#72 + # source://activemodel//lib/active_model/type/helpers/time_value.rb#73 def fast_string_to_time(string); end # source://activemodel//lib/active_model/type/helpers/time_value.rb#47 @@ -4022,80 +4424,159 @@ module ActiveModel::Type::Helpers::Timezone def is_utc?; end end -# source://activemodel//lib/active_model/type/immutable_string.rb#5 +# = Active Model \ImmutableString \Type +# +# Attribute type to represent immutable strings. It casts incoming values to +# frozen strings. +# +# class Person +# include ActiveModel::Attributes +# +# attribute :name, :immutable_string +# end +# +# person = Person.new +# person.name = 1 +# +# person.name # => "1" +# person.name.frozen? # => true +# +# Values are coerced to strings using their +to_s+ method. Boolean values +# are treated differently, however: +true+ will be cast to "t" and +# +false+ will be cast to "f". These strings can be customized when +# declaring an attribute: +# +# class Person +# include ActiveModel::Attributes +# +# attribute :active, :immutable_string, true: "aye", false: "nay" +# end +# +# person = Person.new +# person.active = true +# +# person.active # => "aye" +# +# source://activemodel//lib/active_model/type/immutable_string.rb#37 class ActiveModel::Type::ImmutableString < ::ActiveModel::Type::Value # @return [ImmutableString] a new instance of ImmutableString # - # source://activemodel//lib/active_model/type/immutable_string.rb#6 + # source://activemodel//lib/active_model/type/immutable_string.rb#38 def initialize(**args); end - # source://activemodel//lib/active_model/type/immutable_string.rb#16 + # source://activemodel//lib/active_model/type/immutable_string.rb#48 def serialize(value); end - # source://activemodel//lib/active_model/type/immutable_string.rb#12 + # source://activemodel//lib/active_model/type/immutable_string.rb#57 + def serialize_cast_value(value); end + + # source://activemodel//lib/active_model/type/immutable_string.rb#44 def type; end private - # source://activemodel//lib/active_model/type/immutable_string.rb#26 + # source://activemodel//lib/active_model/type/immutable_string.rb#62 def cast_value(value); end end -# source://activemodel//lib/active_model/type/integer.rb#5 +# = Active Model \Integer \Type +# +# Attribute type for integer representation. This type is registered under +# the +:integer+ key. +# +# class Person +# include ActiveModel::Attributes +# +# attribute :age, :integer +# end +# +# Values are cast using their +to_i+ method, except for blank strings, which +# are cast to +nil+. If a +to_i+ method is not defined or raises an error, +# the value will be cast to +nil+. +# +# person = Person.new +# +# person.age = "18" +# person.age # => 18 +# +# person.age = "" +# person.age # => nil +# +# person.age = :not_an_integer +# person.age # => nil (because Symbol does not define #to_i) +# +# Serialization also works under the same principle. Non-numeric strings are +# serialized as +nil+, for example. +# +# Serialization also validates that the integer can be stored using a +# limited number of bytes. If it cannot, an ActiveModel::RangeError will be +# raised. The default limit is 4 bytes, and can be customized when declaring +# an attribute: +# +# class Person +# include ActiveModel::Attributes +# +# attribute :age, :integer, limit: 6 +# end +# +# source://activemodel//lib/active_model/type/integer.rb#44 class ActiveModel::Type::Integer < ::ActiveModel::Type::Value include ::ActiveModel::Type::Helpers::Numeric # @return [Integer] a new instance of Integer # - # source://activemodel//lib/active_model/type/integer.rb#12 + # source://activemodel//lib/active_model/type/integer.rb#51 def initialize(**_arg0); end - # source://activemodel//lib/active_model/type/integer.rb#21 + # source://activemodel//lib/active_model/type/integer.rb#60 def deserialize(value); end # @return [Boolean] # - # source://activemodel//lib/active_model/type/integer.rb#31 + # source://activemodel//lib/active_model/type/integer.rb#74 def serializable?(value); end - # source://activemodel//lib/active_model/type/integer.rb#26 + # source://activemodel//lib/active_model/type/integer.rb#65 def serialize(value); end - # source://activemodel//lib/active_model/type/integer.rb#17 + # source://activemodel//lib/active_model/type/integer.rb#70 + def serialize_cast_value(value); end + + # source://activemodel//lib/active_model/type/integer.rb#56 def type; end private - # source://activemodel//lib/active_model/type/integer.rb#65 + # source://activemodel//lib/active_model/type/integer.rb#108 def _limit; end - # source://activemodel//lib/active_model/type/integer.rb#46 + # source://activemodel//lib/active_model/type/integer.rb#89 def cast_value(value); end - # source://activemodel//lib/active_model/type/integer.rb#50 + # source://activemodel//lib/active_model/type/integer.rb#93 def ensure_in_range(value); end # @return [Boolean] # - # source://activemodel//lib/active_model/type/integer.rb#42 + # source://activemodel//lib/active_model/type/integer.rb#85 def in_range?(value); end - # source://activemodel//lib/active_model/type/integer.rb#57 + # source://activemodel//lib/active_model/type/integer.rb#100 def max_value; end - # source://activemodel//lib/active_model/type/integer.rb#61 + # source://activemodel//lib/active_model/type/integer.rb#104 def min_value; end # Returns the value of attribute range. # - # source://activemodel//lib/active_model/type/integer.rb#40 + # source://activemodel//lib/active_model/type/integer.rb#83 def range; end end # Column storage size in bytes. # 4 bytes means an integer as opposed to smallint etc. # -# source://activemodel//lib/active_model/type/integer.rb#10 +# source://activemodel//lib/active_model/type/integer.rb#49 ActiveModel::Type::Integer::DEFAULT_LIMIT = T.let(T.unsafe(nil), Integer) # source://activemodel//lib/active_model/type/registry.rb#5 @@ -4122,51 +4603,151 @@ class ActiveModel::Type::Registry def registrations; end end -# source://activemodel//lib/active_model/type/string.rb#7 +# source://activemodel//lib/active_model/type/serialize_cast_value.rb#5 +module ActiveModel::Type::SerializeCastValue + extend ::ActiveSupport::Concern + include ::ActiveModel::Type::SerializeCastValue::DefaultImplementation + + mixes_in_class_methods ::ActiveModel::Type::SerializeCastValue::ClassMethods + + # source://activemodel//lib/active_model/type/serialize_cast_value.rb#41 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://activemodel//lib/active_model/type/serialize_cast_value.rb#37 + def itself_if_serialize_cast_value_compatible; end + + class << self + # @private + # + # source://activemodel//lib/active_model/type/serialize_cast_value.rb#21 + def included(klass); end + + # source://activemodel//lib/active_model/type/serialize_cast_value.rb#25 + def serialize(type, value); end + end +end + +# source://activemodel//lib/active_model/type/serialize_cast_value.rb#8 +module ActiveModel::Type::SerializeCastValue::ClassMethods + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/serialize_cast_value.rb#9 + def serialize_cast_value_compatible?; end +end + +# source://activemodel//lib/active_model/type/serialize_cast_value.rb#15 +module ActiveModel::Type::SerializeCastValue::DefaultImplementation + # source://activemodel//lib/active_model/type/serialize_cast_value.rb#16 + def serialize_cast_value(value); end +end + +# = Active Model \String \Type +# +# Attribute type for strings. It is registered under the +:string+ key. +# +# This class is a specialization of ActiveModel::Type::ImmutableString. It +# performs coercion in the same way, and can be configured in the same way. +# However, it accounts for mutable strings, so dirty tracking can properly +# check if a string has changed. +# +# source://activemodel//lib/active_model/type/string.rb#15 class ActiveModel::Type::String < ::ActiveModel::Type::ImmutableString # @return [Boolean] # - # source://activemodel//lib/active_model/type/string.rb#8 + # source://activemodel//lib/active_model/type/string.rb#16 def changed_in_place?(raw_old_value, new_value); end - # source://activemodel//lib/active_model/type/string.rb#14 + # source://activemodel//lib/active_model/type/string.rb#22 def to_immutable_string; end private - # source://activemodel//lib/active_model/type/string.rb#25 + # source://activemodel//lib/active_model/type/string.rb#33 def cast_value(value); end end -# source://activemodel//lib/active_model/type/time.rb#5 +# = Active Model \Time \Type +# +# Attribute type for time of day representation. It is registered under the +# +:time+ key. +# +# class Event +# include ActiveModel::Attributes +# +# attribute :start, :time +# end +# +# String values are parsed using the ISO 8601 datetime format, but are +# normalized to have a date of 2000-01-01 and be in the UTC time zone. +# +# event = Event.new +# event.start = "2004-10-25T01:23:45-06:00" +# +# event.start.class # => Time +# event.start # => 2000-01-01 07:23:45 UTC +# +# Partial time-only formats are also accepted. +# +# event.start = "00:01:02+03:00" +# event.start # => 1999-12-31 21:01:02 UTC +# +# The degree of sub-second precision can be customized when declaring an +# attribute: +# +# class Event +# include ActiveModel::Attributes +# +# attribute :start, :time, precision: 4 +# end +# +# source://activemodel//lib/active_model/type/time.rb#38 class ActiveModel::Type::Time < ::ActiveModel::Type::Value include ::ActiveModel::Type::Helpers::Timezone - include ::ActiveModel::Type::Helpers::TimeValue include ::ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods + include ::ActiveModel::Type::Helpers::TimeValue - # source://activemodel//lib/active_model/type/time.rb#12 + # source://activemodel//lib/active_model/type/time.rb#45 def type; end - # source://activemodel//lib/active_model/type/time.rb#16 + # source://activemodel//lib/active_model/type/time.rb#49 def user_input_in_time_zone(value); end private - # source://activemodel//lib/active_model/type/time.rb#32 + # source://activemodel//lib/active_model/type/time.rb#69 def cast_value(value); end end -# source://activemodel//lib/active_model/type/value.rb#5 +# = Active Model \Value \Type +# +# The base class for all attribute types. This class also serves as the +# default type for attributes that do not specify a type. +# +# source://activemodel//lib/active_model/type/value.rb#9 class ActiveModel::Type::Value + include ::ActiveModel::Type::SerializeCastValue + include ::ActiveModel::Type::SerializeCastValue::DefaultImplementation + extend ::ActiveModel::Type::SerializeCastValue::ClassMethods + + # Initializes a type with three basic configuration settings: precision, + # limit, and scale. The Value base class does not define behavior for + # these settings. It uses them for equality comparison and hash key + # generation only. + # # @return [Value] a new instance of Value # - # source://activemodel//lib/active_model/type/value.rb#8 + # source://activemodel//lib/active_model/type/value.rb#17 def initialize(precision: T.unsafe(nil), limit: T.unsafe(nil), scale: T.unsafe(nil)); end - # source://activemodel//lib/active_model/type/value.rb#109 + # source://activemodel//lib/active_model/type/value.rb#121 def ==(other); end - # source://activemodel//lib/active_model/type/value.rb#121 + # @raise [NoMethodError] + # + # source://activemodel//lib/active_model/type/value.rb#144 + def as_json(*_arg0); end + + # source://activemodel//lib/active_model/type/value.rb#133 def assert_valid_value(_); end # These predicates are not documented, as I need to look further into @@ -4174,7 +4755,7 @@ class ActiveModel::Type::Value # # @return [Boolean] # - # source://activemodel//lib/active_model/type/value.rb#65 + # source://activemodel//lib/active_model/type/value.rb#77 def binary?; end # Type casts a value from user input (e.g. from a setter). This value may @@ -4188,7 +4769,7 @@ class ActiveModel::Type::Value # # +value+ The raw input, as provided to the attribute setter. # - # source://activemodel//lib/active_model/type/value.rb#45 + # source://activemodel//lib/active_model/type/value.rb#57 def cast(value); end # Determines whether a value has changed for dirty checking. +old_value+ @@ -4197,7 +4778,7 @@ class ActiveModel::Type::Value # # @return [Boolean] # - # source://activemodel//lib/active_model/type/value.rb#72 + # source://activemodel//lib/active_model/type/value.rb#84 def changed?(old_value, new_value, _new_value_before_type_cast); end # Determines whether the mutable value has been modified since it was @@ -4220,7 +4801,7 @@ class ActiveModel::Type::Value # # @return [Boolean] # - # source://activemodel//lib/active_model/type/value.rb#93 + # source://activemodel//lib/active_model/type/value.rb#105 def changed_in_place?(raw_old_value, new_value); end # Converts a value from database input to the appropriate ruby type. The @@ -4230,41 +4811,43 @@ class ActiveModel::Type::Value # # +value+ The raw input, as provided from the database. # - # source://activemodel//lib/active_model/type/value.rb#31 + # source://activemodel//lib/active_model/type/value.rb#43 def deserialize(value); end - # source://activemodel//lib/active_model/type/value.rb#109 + # source://activemodel//lib/active_model/type/value.rb#121 def eql?(other); end # @return [Boolean] # - # source://activemodel//lib/active_model/type/value.rb#101 + # source://activemodel//lib/active_model/type/value.rb#113 def force_equality?(_value); end - # source://activemodel//lib/active_model/type/value.rb#117 + # source://activemodel//lib/active_model/type/value.rb#129 def hash; end - # source://activemodel//lib/active_model/type/value.rb#124 - def immutable_value(value); end - # Returns the value of attribute limit. # - # source://activemodel//lib/active_model/type/value.rb#6 + # source://activemodel//lib/active_model/type/value.rb#11 def limit; end # @yield [value] # - # source://activemodel//lib/active_model/type/value.rb#105 + # source://activemodel//lib/active_model/type/value.rb#117 def map(value); end + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/value.rb#140 + def mutable?; end + # Returns the value of attribute precision. # - # source://activemodel//lib/active_model/type/value.rb#6 + # source://activemodel//lib/active_model/type/value.rb#11 def precision; end # Returns the value of attribute scale. # - # source://activemodel//lib/active_model/type/value.rb#6 + # source://activemodel//lib/active_model/type/value.rb#11 def scale; end # Returns true if this type can convert +value+ to a type that is usable @@ -4274,7 +4857,7 @@ class ActiveModel::Type::Value # # @return [Boolean] # - # source://activemodel//lib/active_model/type/value.rb#18 + # source://activemodel//lib/active_model/type/value.rb#28 def serializable?(value); end # Casts a value from the ruby type to a type that the database knows how @@ -4282,21 +4865,29 @@ class ActiveModel::Type::Value # +String+, +Numeric+, +Date+, +Time+, +Symbol+, +true+, +false+, or # +nil+. # - # source://activemodel//lib/active_model/type/value.rb#53 + # source://activemodel//lib/active_model/type/value.rb#65 def serialize(value); end - # source://activemodel//lib/active_model/type/value.rb#22 + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/value.rb#136 + def serialized?; end + + # Returns the unique type name as a Symbol. Subclasses should override + # this method. + # + # source://activemodel//lib/active_model/type/value.rb#34 def type; end # Type casts a value for schema dumping. This method is private, as we are # hoping to remove it entirely. # - # source://activemodel//lib/active_model/type/value.rb#59 + # source://activemodel//lib/active_model/type/value.rb#71 def type_cast_for_schema(value); end # @return [Boolean] # - # source://activemodel//lib/active_model/type/value.rb#97 + # source://activemodel//lib/active_model/type/value.rb#109 def value_constructed_by_mass_assignment?(_value); end private @@ -4305,10 +4896,12 @@ class ActiveModel::Type::Value # behavior for user and database inputs. Called by Value#cast for # values except +nil+. # - # source://activemodel//lib/active_model/type/value.rb#132 + # source://activemodel//lib/active_model/type/value.rb#152 def cast_value(value); end end +# = Active \Model \UnknownAttributeError +# # Raised when unknown attributes are supplied via mass assignment. # # class Person @@ -4320,21 +4913,21 @@ end # person.assign_attributes(name: 'Gorby') # # => ActiveModel::UnknownAttributeError: unknown attribute 'name' for Person. # -# source://activemodel//lib/active_model/errors.rb#507 +# source://activemodel//lib/active_model/errors.rb#538 class ActiveModel::UnknownAttributeError < ::NoMethodError # @return [UnknownAttributeError] a new instance of UnknownAttributeError # - # source://activemodel//lib/active_model/errors.rb#510 + # source://activemodel//lib/active_model/errors.rb#541 def initialize(record, attribute); end # Returns the value of attribute attribute. # - # source://activemodel//lib/active_model/errors.rb#508 + # source://activemodel//lib/active_model/errors.rb#539 def attribute; end # Returns the value of attribute record. # - # source://activemodel//lib/active_model/errors.rb#508 + # source://activemodel//lib/active_model/errors.rb#539 def record; end end @@ -4348,7 +4941,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) @@ -4356,7 +4949,7 @@ ActiveModel::VERSION::STRING = T.let(T.unsafe(nil), String) # source://activemodel//lib/active_model/gem_version.rb#12 ActiveModel::VERSION::TINY = T.let(T.unsafe(nil), Integer) -# = Active Model ValidationError +# = Active \Model \ValidationError # # Raised by validate! when the model is invalid. Use the # +model+ method to retrieve the record which did not validate. @@ -4367,20 +4960,20 @@ ActiveModel::VERSION::TINY = T.let(T.unsafe(nil), Integer) # puts invalid.model.errors # end # -# source://activemodel//lib/active_model/validations.rb#425 +# source://activemodel//lib/active_model/validations.rb#460 class ActiveModel::ValidationError < ::StandardError # @return [ValidationError] a new instance of ValidationError # - # source://activemodel//lib/active_model/validations.rb#428 + # source://activemodel//lib/active_model/validations.rb#463 def initialize(model); end # Returns the value of attribute model. # - # source://activemodel//lib/active_model/validations.rb#426 + # source://activemodel//lib/active_model/validations.rb#461 def model; end end -# == Active \Model \Validations +# = Active \Model \Validations # # Provides a full validation framework to your objects. # @@ -4408,7 +5001,7 @@ end # person.invalid? # => true # person.errors.messages # => {first_name:["starts with z."]} # -# Note that ActiveModel::Validations automatically adds an +errors+ +# Note that +ActiveModel::Validations+ automatically adds an +errors+ # method to your instances initialized with a new ActiveModel::Errors # object, so there is no need for you to do this manually. # @@ -4441,7 +5034,7 @@ module ActiveModel::Validations # person.valid? # => false # person.errors # => # # - # source://activemodel//lib/active_model/validations.rb#301 + # source://activemodel//lib/active_model/validations.rb#330 def errors; end # Performs the opposite of valid?. Returns +true+ if errors were @@ -4476,7 +5069,7 @@ module ActiveModel::Validations # # @return [Boolean] # - # source://activemodel//lib/active_model/validations.rb#373 + # source://activemodel//lib/active_model/validations.rb#402 def invalid?(context = T.unsafe(nil)); end # Hook method defining how an attribute value should be retrieved. By default @@ -4529,7 +5122,7 @@ module ActiveModel::Validations # # @return [Boolean] # - # source://activemodel//lib/active_model/validations.rb#334 + # source://activemodel//lib/active_model/validations.rb#363 def valid?(context = T.unsafe(nil)); end # Runs all the specified validations and returns +true+ if no errors were @@ -4564,7 +5157,7 @@ module ActiveModel::Validations # # @return [Boolean] # - # source://activemodel//lib/active_model/validations.rb#334 + # source://activemodel//lib/active_model/validations.rb#363 def validate(context = T.unsafe(nil)); end # Runs all the validations within the specified context. Returns +true+ if @@ -4573,7 +5166,7 @@ module ActiveModel::Validations # Validations with no :on option will run no matter the context. Validations with # some :on option will only run in the specified context. # - # source://activemodel//lib/active_model/validations.rb#382 + # source://activemodel//lib/active_model/validations.rb#411 def validate!(context = T.unsafe(nil)); end # Passes the record off to the class or classes specified and allows them @@ -4613,22 +5206,25 @@ module ActiveModel::Validations # to the class and available as +options+, please refer to the # class version of this method for more information. # - # source://activemodel//lib/active_model/validations/with.rb#137 + # source://activemodel//lib/active_model/validations/with.rb#144 def validates_with(*args, &block); end private + # source://activemodel//lib/active_model/validations.rb#434 + def init_internals; end + # Clean the +Errors+ object if instance is duped. # - # source://activemodel//lib/active_model/validations.rb#283 + # source://activemodel//lib/active_model/validations.rb#312 def initialize_dup(other); end # @raise [ValidationError] # - # source://activemodel//lib/active_model/validations.rb#410 + # source://activemodel//lib/active_model/validations.rb#445 def raise_validation_error; end - # source://activemodel//lib/active_model/validations.rb#405 + # source://activemodel//lib/active_model/validations.rb#440 def run_validations!; end module GeneratedClassMethods @@ -4706,12 +5302,12 @@ class ActiveModel::Validations::AcceptanceValidator::LazilyDefineAttributes < :: def attributes; end end -# == Active \Model \Validation \Callbacks +# = Active \Model \Validation \Callbacks # -# Provides an interface for any class to have +before_validation+ and -# +after_validation+ callbacks. +# Provides an interface for any class to have ClassMethods#before_validation and +# ClassMethods#after_validation callbacks. # -# First, include ActiveModel::Validations::Callbacks from the class you are +# First, include +ActiveModel::Validations::Callbacks+ from the class you are # creating: # # class MyModel @@ -4817,7 +5413,7 @@ module ActiveModel::Validations::Callbacks::ClassMethods def set_options_for_callback(options); end end -# source://activemodel//lib/active_model/validations.rb#55 +# source://activemodel//lib/active_model/validations.rb#74 module ActiveModel::Validations::ClassMethods # Returns +true+ if +attribute+ is an attribute method, +false+ otherwise. # @@ -4832,7 +5428,7 @@ module ActiveModel::Validations::ClassMethods # # @return [Boolean] # - # source://activemodel//lib/active_model/validations.rb#270 + # source://activemodel//lib/active_model/validations.rb#284 def attribute_method?(attribute); end # Clears all of the validators and validations. @@ -4873,12 +5469,12 @@ module ActiveModel::Validations::ClassMethods # # Person._validate_callbacks.empty? # => true # - # source://activemodel//lib/active_model/validations.rb#234 + # source://activemodel//lib/active_model/validations.rb#248 def clear_validators!; end # Copy validators on inheritance. # - # source://activemodel//lib/active_model/validations.rb#275 + # source://activemodel//lib/active_model/validations.rb#289 def inherited(base); end # Adds a validation method or block to the class. This is useful when @@ -4942,15 +5538,15 @@ module ActiveModel::Validations::ClassMethods # # NOTE: Calling +validate+ multiple times on the same method will overwrite previous definitions. # - # source://activemodel//lib/active_model/validations.rb#152 + # source://activemodel//lib/active_model/validations.rb#171 def validate(*args, &block); end # This method is a shortcut to all default validators and any custom - # validator classes ending in 'Validator'. Note that Rails default + # validator classes ending in 'Validator'. Note that \Rails default # validators can be overridden inside specific classes by creating # custom validator classes in their place such as PresenceValidator. # - # Examples of using the default rails validators: + # Examples of using the default \Rails validators: # # validates :username, absence: true # validates :terms, acceptance: true @@ -5052,7 +5648,7 @@ module ActiveModel::Validations::ClassMethods # This method is used to define validations that cannot be corrected by end # users and are considered exceptional. So each validator defined with bang # or :strict option set to true will always raise - # ActiveModel::StrictValidationFailed instead of adding error + # ActiveModel::StrictValidationFailed instead of adding error # when validation fails. See validates for more information about # the validation itself. # @@ -5101,7 +5697,7 @@ module ActiveModel::Validations::ClassMethods # method, proc, or string should return or evaluate to a +true+ or +false+ # value. # - # source://activemodel//lib/active_model/validations.rb#85 + # source://activemodel//lib/active_model/validations.rb#104 def validates_each(*attr_names, &block); end # Passes the record off to the class or classes specified and allows them @@ -5132,6 +5728,13 @@ module ActiveModel::Validations::ClassMethods # validates_with MyValidator, MyOtherValidator, on: :create # end # + # There is no default error message for +validates_with+. You must + # manually add errors to the record's errors collection in the validator + # class. + # + # To implement the validate method, you must have a +record+ parameter + # defined, which is the record to be validated. + # # Configuration options: # * :on - Specifies the contexts where this validation is active. # Runs in all validation contexts by default +nil+. You can pass a symbol @@ -5166,7 +5769,7 @@ module ActiveModel::Validations::ClassMethods # end # end # - # source://activemodel//lib/active_model/validations/with.rb#81 + # source://activemodel//lib/active_model/validations/with.rb#88 def validates_with(*args, &block); end # List all validators that are being used to validate the model using @@ -5187,7 +5790,7 @@ module ActiveModel::Validations::ClassMethods # # # # # ] # - # source://activemodel//lib/active_model/validations.rb#192 + # source://activemodel//lib/active_model/validations.rb#206 def validators; end # List all validators that are being used to validate a specific attribute. @@ -5206,7 +5809,7 @@ module ActiveModel::Validations::ClassMethods # # #, # # ] # - # source://activemodel//lib/active_model/validations.rb#254 + # source://activemodel//lib/active_model/validations.rb#268 def validators_on(*attributes); end private @@ -5219,24 +5822,29 @@ module ActiveModel::Validations::ClassMethods # # source://activemodel//lib/active_model/validations/validates.rb#157 def _validates_default_keys; end + + # source://activemodel//lib/active_model/validations.rb#298 + def predicate_for_validation_context(context); end end -# source://activemodel//lib/active_model/validations.rb#89 +# source://activemodel//lib/active_model/validations.rb#108 ActiveModel::Validations::ClassMethods::VALID_OPTIONS_FOR_VALIDATE = T.let(T.unsafe(nil), Array) -# source://activemodel//lib/active_model/validations/clusivity.rb#7 +# source://activemodel//lib/active_model/validations/clusivity.rb#8 module ActiveModel::Validations::Clusivity - # source://activemodel//lib/active_model/validations/clusivity.rb#11 + include ::ActiveModel::Validations::ResolveValue + + # source://activemodel//lib/active_model/validations/clusivity.rb#14 def check_validity!; end private - # source://activemodel//lib/active_model/validations/clusivity.rb#34 + # source://activemodel//lib/active_model/validations/clusivity.rb#31 def delimiter; end # @return [Boolean] # - # source://activemodel//lib/active_model/validations/clusivity.rb#18 + # source://activemodel//lib/active_model/validations/clusivity.rb#21 def include?(record, value); end # After Ruby 2.2, Range#include? on non-number-or-time-ish ranges checks all @@ -5245,33 +5853,31 @@ module ActiveModel::Validations::Clusivity # endpoints, which is fast but is only accurate on Numeric, Time, Date, # or DateTime ranges. # - # source://activemodel//lib/active_model/validations/clusivity.rb#43 + # source://activemodel//lib/active_model/validations/clusivity.rb#40 def inclusion_method(enumerable); end end -# source://activemodel//lib/active_model/validations/clusivity.rb#8 +# source://activemodel//lib/active_model/validations/clusivity.rb#11 ActiveModel::Validations::Clusivity::ERROR_MESSAGE = T.let(T.unsafe(nil), String) # source://activemodel//lib/active_model/validations/comparability.rb#5 module ActiveModel::Validations::Comparability - # source://activemodel//lib/active_model/validations/comparability.rb#21 - def error_options(value, option_value); end - # source://activemodel//lib/active_model/validations/comparability.rb#10 - def option_value(record, option_value); end + def error_options(value, option_value); end end # source://activemodel//lib/active_model/validations/comparability.rb#6 ActiveModel::Validations::Comparability::COMPARE_CHECKS = T.let(T.unsafe(nil), Hash) -# source://activemodel//lib/active_model/validations/comparison.rb#7 +# source://activemodel//lib/active_model/validations/comparison.rb#8 class ActiveModel::Validations::ComparisonValidator < ::ActiveModel::EachValidator include ::ActiveModel::Validations::Comparability + include ::ActiveModel::Validations::ResolveValue - # source://activemodel//lib/active_model/validations/comparison.rb#10 + # source://activemodel//lib/active_model/validations/comparison.rb#12 def check_validity!; end - # source://activemodel//lib/active_model/validations/comparison.rb#17 + # source://activemodel//lib/active_model/validations/comparison.rb#19 def validate_each(record, attr_name, value); end end @@ -5298,41 +5904,41 @@ end # source://activemodel//lib/active_model/validations/exclusion.rb#7 class ActiveModel::Validations::ExclusionValidator < ::ActiveModel::EachValidator + include ::ActiveModel::Validations::ResolveValue include ::ActiveModel::Validations::Clusivity # source://activemodel//lib/active_model/validations/exclusion.rb#10 def validate_each(record, attribute, value); end end -# source://activemodel//lib/active_model/validations/format.rb#5 +# source://activemodel//lib/active_model/validations/format.rb#7 class ActiveModel::Validations::FormatValidator < ::ActiveModel::EachValidator - # source://activemodel//lib/active_model/validations/format.rb#16 + include ::ActiveModel::Validations::ResolveValue + + # source://activemodel//lib/active_model/validations/format.rb#20 def check_validity!; end - # source://activemodel//lib/active_model/validations/format.rb#6 + # source://activemodel//lib/active_model/validations/format.rb#10 def validate_each(record, attribute, value); end private - # source://activemodel//lib/active_model/validations/format.rb#35 + # source://activemodel//lib/active_model/validations/format.rb#34 def check_options_validity(name); end - # source://activemodel//lib/active_model/validations/format.rb#26 - def option_call(record, name); end - - # source://activemodel//lib/active_model/validations/format.rb#31 + # source://activemodel//lib/active_model/validations/format.rb#30 def record_error(record, attribute, name, value); end # @return [Boolean] # - # source://activemodel//lib/active_model/validations/format.rb#49 + # source://activemodel//lib/active_model/validations/format.rb#48 def regexp_using_multiline_anchors?(regexp); end end # source://activemodel//lib/active_model/validations/absence.rb#12 module ActiveModel::Validations::HelperMethods # Validates that the specified attributes are blank (as defined by - # Object#present?). Happens by default on save. + # Object#present?). # # class Person < ActiveRecord::Base # validates_absence_of :first_name @@ -5360,7 +5966,7 @@ module ActiveModel::Validations::HelperMethods # # If the database column does not exist, the +terms_of_service+ attribute # is entirely virtual. This check is performed only if +terms_of_service+ - # is not +nil+ and by default on save. + # is not +nil+. # # Configuration options: # * :message - A custom error message (default is: "must be @@ -5389,17 +5995,23 @@ module ActiveModel::Validations::HelperMethods # Configuration options: # * :message - A custom error message (default is: "failed comparison"). # * :greater_than - Specifies the value must be greater than the - # supplied value. + # supplied value. The default error message for this option is _"must be + # greater than %{count}"_. # * :greater_than_or_equal_to - Specifies the value must be - # greater than or equal to the supplied value. + # greater than or equal to the supplied value. The default error message + # for this option is _"must be greater than or equal to %{count}"_. # * :equal_to - Specifies the value must be equal to the supplied - # value. + # value. The default error message for this option is _"must be equal to + # %{count}"_. # * :less_than - Specifies the value must be less than the - # supplied value. + # supplied value. The default error message for this option is _"must be + # less than %{count}"_. # * :less_than_or_equal_to - Specifies the value must be less - # than or equal to the supplied value. + # than or equal to the supplied value. The default error message for + # this option is _"must be less than or equal to %{count}"_. # * :other_than - Specifies the value must not be equal to the - # supplied value. + # supplied value. The default error message for this option is _"must be + # other than %{count}"_. # # There is also a list of default options supported by every validator: # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+ . @@ -5422,7 +6034,7 @@ module ActiveModel::Validations::HelperMethods # validates_comparison_of :preferred_name, other_than: :given_name, allow_nil: true # end # - # source://activemodel//lib/active_model/validations/comparison.rb#77 + # source://activemodel//lib/active_model/validations/comparison.rb#85 def validates_comparison_of(*attr_names); end # Encapsulates the pattern of wanting to validate a password or email @@ -5546,7 +6158,7 @@ module ActiveModel::Validations::HelperMethods # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+. # See ActiveModel::Validations::ClassMethods#validates for more information. # - # source://activemodel//lib/active_model/validations/format.rb#108 + # source://activemodel//lib/active_model/validations/format.rb#107 def validates_format_of(*attr_names); end # Validates whether the value of the specified attribute is available in a @@ -5626,14 +6238,15 @@ module ActiveModel::Validations::HelperMethods # +:if+, +:unless+, +:on+, and +:strict+. # See ActiveModel::Validations::ClassMethods#validates for more information. # - # source://activemodel//lib/active_model/validations/length.rb#121 + # source://activemodel//lib/active_model/validations/length.rb#123 def validates_length_of(*attr_names); end # Validates whether the value of the specified attribute is numeric by - # trying to convert it to a float with Kernel.Float (if only_integer - # is +false+) or applying it to the regular expression /\A[\+\-]?\d+\z/ - # (if only_integer is set to +true+). Precision of Kernel.Float values - # are guaranteed up to 15 digits. + # trying to convert it to a float with +Kernel.Float+ (if + # only_integer is +false+) or applying it to the regular + # expression /\A[\+\-]?\d+\z/ (if only_integer is set to + # +true+). Precision of +Kernel.Float+ values are guaranteed up to 15 + # digits. # # class Person < ActiveRecord::Base # validates_numericality_of :value, on: :create @@ -5643,24 +6256,36 @@ module ActiveModel::Validations::HelperMethods # * :message - A custom error message (default is: "is not a number"). # * :only_integer - Specifies whether the value has to be an # integer (default is +false+). + # * :only_numeric - Specifies whether the value has to be an + # instance of Numeric (default is +false+). The default behavior is to + # attempt parsing the value if it is a String. # * :allow_nil - Skip validation if attribute is +nil+ (default is # +false+). Notice that for Integer and Float columns empty strings are # converted to +nil+. # * :greater_than - Specifies the value must be greater than the - # supplied value. + # supplied value. The default error message for this option is _"must be + # greater than %{count}"_. # * :greater_than_or_equal_to - Specifies the value must be - # greater than or equal the supplied value. + # greater than or equal the supplied value. The default error message + # for this option is _"must be greater than or equal to %{count}"_. # * :equal_to - Specifies the value must be equal to the supplied - # value. + # value. The default error message for this option is _"must be equal to + # %{count}"_. # * :less_than - Specifies the value must be less than the - # supplied value. + # supplied value. The default error message for this option is _"must be + # less than %{count}"_. # * :less_than_or_equal_to - Specifies the value must be less - # than or equal the supplied value. + # than or equal the supplied value. The default error message for this + # option is _"must be less than or equal to %{count}"_. # * :other_than - Specifies the value must be other than the - # supplied value. - # * :odd - Specifies the value must be an odd number. - # * :even - Specifies the value must be an even number. - # * :in - Check that the value is within a range. + # supplied value. The default error message for this option is _"must be + # other than %{count}"_. + # * :odd - Specifies the value must be an odd number. The default + # error message for this option is _"must be odd"_. + # * :even - Specifies the value must be an even number. The + # default error message for this option is _"must be even"_. + # * :in - Check that the value is within a range. The default + # error message for this option is _"must be in %{count}"_. # # There is also a list of default options supported by every validator: # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+ . @@ -5684,11 +6309,11 @@ module ActiveModel::Validations::HelperMethods # validates_numericality_of :width, greater_than: :minimum_weight # end # - # source://activemodel//lib/active_model/validations/numericality.rb#205 + # source://activemodel//lib/active_model/validations/numericality.rb#217 def validates_numericality_of(*attr_names); end # Validates that the specified attributes are not blank (as defined by - # Object#blank?). Happens by default on save. + # Object#blank?). # # class Person < ActiveRecord::Base # validates_presence_of :first_name @@ -5762,7 +6387,7 @@ module ActiveModel::Validations::HelperMethods # +:if+, +:unless+, +:on+, and +:strict+. # See ActiveModel::Validations::ClassMethods#validates for more information. # - # source://activemodel//lib/active_model/validations/length.rb#121 + # source://activemodel//lib/active_model/validations/length.rb#123 def validates_size_of(*attr_names); end private @@ -5773,111 +6398,115 @@ end # source://activemodel//lib/active_model/validations/inclusion.rb#7 class ActiveModel::Validations::InclusionValidator < ::ActiveModel::EachValidator + include ::ActiveModel::Validations::ResolveValue include ::ActiveModel::Validations::Clusivity # source://activemodel//lib/active_model/validations/inclusion.rb#10 def validate_each(record, attribute, value); end end -# source://activemodel//lib/active_model/validations/length.rb#5 +# source://activemodel//lib/active_model/validations/length.rb#7 class ActiveModel::Validations::LengthValidator < ::ActiveModel::EachValidator + include ::ActiveModel::Validations::ResolveValue + # @return [LengthValidator] a new instance of LengthValidator # - # source://activemodel//lib/active_model/validations/length.rb#11 + # source://activemodel//lib/active_model/validations/length.rb#15 def initialize(options); end - # source://activemodel//lib/active_model/validations/length.rb#24 + # source://activemodel//lib/active_model/validations/length.rb#29 def check_validity!; end - # source://activemodel//lib/active_model/validations/length.rb#40 + # source://activemodel//lib/active_model/validations/length.rb#47 def validate_each(record, attribute, value); end private # @return [Boolean] # - # source://activemodel//lib/active_model/validations/length.rb#67 + # source://activemodel//lib/active_model/validations/length.rb#69 def skip_nil_check?(key); end end -# source://activemodel//lib/active_model/validations/length.rb#7 +# source://activemodel//lib/active_model/validations/length.rb#11 ActiveModel::Validations::LengthValidator::CHECKS = T.let(T.unsafe(nil), Hash) -# source://activemodel//lib/active_model/validations/length.rb#6 +# source://activemodel//lib/active_model/validations/length.rb#10 ActiveModel::Validations::LengthValidator::MESSAGES = T.let(T.unsafe(nil), Hash) -# source://activemodel//lib/active_model/validations/length.rb#9 +# source://activemodel//lib/active_model/validations/length.rb#13 ActiveModel::Validations::LengthValidator::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array) -# source://activemodel//lib/active_model/validations/numericality.rb#8 +# source://activemodel//lib/active_model/validations/numericality.rb#9 class ActiveModel::Validations::NumericalityValidator < ::ActiveModel::EachValidator include ::ActiveModel::Validations::Comparability + include ::ActiveModel::Validations::ResolveValue - # source://activemodel//lib/active_model/validations/numericality.rb#20 + # source://activemodel//lib/active_model/validations/numericality.rb#22 def check_validity!; end - # source://activemodel//lib/active_model/validations/numericality.rb#34 + # source://activemodel//lib/active_model/validations/numericality.rb#36 def validate_each(record, attr_name, value, precision: T.unsafe(nil), scale: T.unsafe(nil)); end private # @return [Boolean] # - # source://activemodel//lib/active_model/validations/numericality.rb#112 + # source://activemodel//lib/active_model/validations/numericality.rb#118 def allow_only_integer?(record); end - # source://activemodel//lib/active_model/validations/numericality.rb#106 + # source://activemodel//lib/active_model/validations/numericality.rb#112 def filtered_options(value); end # @return [Boolean] # - # source://activemodel//lib/active_model/validations/numericality.rb#102 + # source://activemodel//lib/active_model/validations/numericality.rb#108 def is_hexadecimal_literal?(raw_value); end # @return [Boolean] # - # source://activemodel//lib/active_model/validations/numericality.rb#98 + # source://activemodel//lib/active_model/validations/numericality.rb#104 def is_integer?(raw_value); end # @return [Boolean] # - # source://activemodel//lib/active_model/validations/numericality.rb#92 + # source://activemodel//lib/active_model/validations/numericality.rb#94 def is_number?(raw_value, precision, scale); end - # source://activemodel//lib/active_model/validations/numericality.rb#66 + # source://activemodel//lib/active_model/validations/numericality.rb#68 def option_as_number(record, option_value, precision, scale); end - # source://activemodel//lib/active_model/validations/numericality.rb#70 + # source://activemodel//lib/active_model/validations/numericality.rb#72 def parse_as_number(raw_value, precision, scale); end - # source://activemodel//lib/active_model/validations/numericality.rb#84 + # source://activemodel//lib/active_model/validations/numericality.rb#86 def parse_float(raw_value, precision, scale); end - # source://activemodel//lib/active_model/validations/numericality.rb#123 + # source://activemodel//lib/active_model/validations/numericality.rb#122 def prepare_value_for_validation(value, record, attr_name); end # @return [Boolean] # - # source://activemodel//lib/active_model/validations/numericality.rb#144 + # source://activemodel//lib/active_model/validations/numericality.rb#143 def record_attribute_changed_in_place?(record, attr_name); end - # source://activemodel//lib/active_model/validations/numericality.rb#88 + # source://activemodel//lib/active_model/validations/numericality.rb#90 def round(raw_value, scale); end end -# source://activemodel//lib/active_model/validations/numericality.rb#18 +# source://activemodel//lib/active_model/validations/numericality.rb#20 ActiveModel::Validations::NumericalityValidator::HEXADECIMAL_REGEX = T.let(T.unsafe(nil), Regexp) -# source://activemodel//lib/active_model/validations/numericality.rb#16 +# source://activemodel//lib/active_model/validations/numericality.rb#18 ActiveModel::Validations::NumericalityValidator::INTEGER_REGEX = T.let(T.unsafe(nil), Regexp) -# source://activemodel//lib/active_model/validations/numericality.rb#12 +# source://activemodel//lib/active_model/validations/numericality.rb#14 ActiveModel::Validations::NumericalityValidator::NUMBER_CHECKS = T.let(T.unsafe(nil), Hash) -# source://activemodel//lib/active_model/validations/numericality.rb#11 +# source://activemodel//lib/active_model/validations/numericality.rb#13 ActiveModel::Validations::NumericalityValidator::RANGE_CHECKS = T.let(T.unsafe(nil), Hash) -# source://activemodel//lib/active_model/validations/numericality.rb#14 +# source://activemodel//lib/active_model/validations/numericality.rb#16 ActiveModel::Validations::NumericalityValidator::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array) # source://activemodel//lib/active_model/validations/presence.rb#5 @@ -5886,13 +6515,19 @@ class ActiveModel::Validations::PresenceValidator < ::ActiveModel::EachValidator def validate_each(record, attr_name, value); end end +# source://activemodel//lib/active_model/validations/resolve_value.rb#5 +module ActiveModel::Validations::ResolveValue + # source://activemodel//lib/active_model/validations/resolve_value.rb#6 + def resolve_value(record, value); end +end + # source://activemodel//lib/active_model/validations/with.rb#7 class ActiveModel::Validations::WithValidator < ::ActiveModel::EachValidator # source://activemodel//lib/active_model/validations/with.rb#8 def validate_each(record, attr, val); end end -# == Active \Model \Validator +# = Active \Model \Validator # # A simple base class that can be used along with # ActiveModel::Validations::ClassMethods.validates_with @@ -5915,7 +6550,7 @@ end # end # end # -# Any class that inherits from ActiveModel::Validator must implement a method +# Any class that inherits from \ActiveModel::Validator must implement a method # called +validate+ which accepts a +record+. # # class Person @@ -5954,7 +6589,7 @@ end # life cycle, and not on each validation run. # # The easiest way to add custom validators for validating individual attributes -# is with the convenient ActiveModel::EachValidator. +# is with the convenient ActiveModel::EachValidator class. # # class TitleValidator < ActiveModel::EachValidator # def validate_each(record, attribute, value) @@ -5962,8 +6597,8 @@ end # end # end # -# This can now be used in combination with the +validates+ method -# (see ActiveModel::Validations::ClassMethods#validates for more on this). +# This can now be used in combination with the +validates+ method. +# See ActiveModel::Validations::ClassMethods#validates for more on this. # # class Person # include ActiveModel::Validations diff --git a/sorbet/rbi/gems/activerecord-typedstore@1.5.1.rbi b/sorbet/rbi/gems/activerecord-typedstore@1.6.0.rbi similarity index 66% rename from sorbet/rbi/gems/activerecord-typedstore@1.5.1.rbi rename to sorbet/rbi/gems/activerecord-typedstore@1.6.0.rbi index bc22ed593..0daedb898 100644 --- a/sorbet/rbi/gems/activerecord-typedstore@1.5.1.rbi +++ b/sorbet/rbi/gems/activerecord-typedstore@1.6.0.rbi @@ -7,172 +7,247 @@ # source://activerecord-typedstore//lib/active_record/typed_store.rb#5 module ActiveRecord class << self - # source://activerecord/7.0.4.3/lib/active_record.rb#277 + # source://activerecord/7.1.3.2/lib/active_record.rb#342 def action_on_strict_loading_violation; end - # source://activerecord/7.0.4.3/lib/active_record.rb#277 + # source://activerecord/7.1.3.2/lib/active_record.rb#342 def action_on_strict_loading_violation=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#270 + # source://activerecord/7.1.3.2/lib/active_record.rb#422 + def allow_deprecated_singular_associations_name; end + + # source://activerecord/7.1.3.2/lib/active_record.rb#422 + def allow_deprecated_singular_associations_name=(_arg0); end + + # source://activerecord/7.1.3.2/lib/active_record.rb#335 def application_record_class; end - # source://activerecord/7.0.4.3/lib/active_record.rb#270 + # source://activerecord/7.1.3.2/lib/active_record.rb#335 def application_record_class=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#213 + # source://activerecord/7.1.3.2/lib/active_record.rb#263 def async_query_executor; end - # source://activerecord/7.0.4.3/lib/active_record.rb#213 + # source://activerecord/7.1.3.2/lib/active_record.rb#263 def async_query_executor=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#183 + # source://activerecord/7.1.3.2/lib/active_record.rb#317 + def before_committed_on_all_records; end + + # source://activerecord/7.1.3.2/lib/active_record.rb#317 + def before_committed_on_all_records=(_arg0); end + + # source://activerecord/7.1.3.2/lib/active_record.rb#314 + def belongs_to_required_validates_foreign_key; end + + # source://activerecord/7.1.3.2/lib/active_record.rb#314 + def belongs_to_required_validates_foreign_key=(_arg0); end + + # source://activerecord/7.1.3.2/lib/active_record.rb#323 + def commit_transaction_on_non_local_return; end + + # source://activerecord/7.1.3.2/lib/active_record.rb#323 + def commit_transaction_on_non_local_return=(_arg0); end + + # source://activerecord/7.1.3.2/lib/active_record.rb#209 + def db_warnings_action; end + + # source://activerecord/7.1.3.2/lib/active_record.rb#211 + def db_warnings_action=(action); end + + # source://activerecord/7.1.3.2/lib/active_record.rb#236 + def db_warnings_ignore; end + + # source://activerecord/7.1.3.2/lib/active_record.rb#236 + def db_warnings_ignore=(_arg0); end + + # source://activerecord/7.1.3.2/lib/active_record.rb#192 def default_timezone; end - # source://activerecord/7.0.4.3/lib/active_record.rb#187 + # source://activerecord/7.1.3.2/lib/active_record.rb#196 def default_timezone=(default_timezone); end - # source://activerecord/7.0.4.3/lib/active_record.rb#311 + # source://activerecord/7.1.3.2/lib/active_record/deprecator.rb#4 + def deprecator; end + + # source://activerecord/7.1.3.2/lib/active_record.rb#177 + def disable_prepared_statements; end + + # source://activerecord/7.1.3.2/lib/active_record.rb#177 + def disable_prepared_statements=(_arg0); end + + # source://activerecord/7.1.3.2/lib/active_record.rb#476 + def disconnect_all!; end + + # source://activerecord/7.1.3.2/lib/active_record.rb#382 def dump_schema_after_migration; end - # source://activerecord/7.0.4.3/lib/active_record.rb#311 + # source://activerecord/7.1.3.2/lib/active_record.rb#382 def dump_schema_after_migration=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#321 + # source://activerecord/7.1.3.2/lib/active_record.rb#392 def dump_schemas; end - # source://activerecord/7.0.4.3/lib/active_record.rb#321 + # source://activerecord/7.1.3.2/lib/active_record.rb#392 def dump_schemas=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#365 + # source://activerecord/7.1.3.2/lib/active_record.rb#465 def eager_load!; end - # source://activerecord/7.0.4.3/lib/active_record.rb#296 + # source://activerecord/7.1.3.2/lib/active_record.rb#361 def error_on_ignored_order; end - # source://activerecord/7.0.4.3/lib/active_record.rb#296 + # source://activerecord/7.1.3.2/lib/active_record.rb#361 def error_on_ignored_order=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record/gem_version.rb#5 + # source://activerecord/7.1.3.2/lib/active_record/gem_version.rb#5 def gem_version; end - # source://activerecord/7.0.4.3/lib/active_record.rb#236 + # source://activerecord/7.1.3.2/lib/active_record.rb#454 + def generate_secure_token_on; end + + # source://activerecord/7.1.3.2/lib/active_record.rb#454 + def generate_secure_token_on=(_arg0); end + + # source://activerecord/7.1.3.2/lib/active_record.rb#286 def global_executor_concurrency; end - # source://activerecord/7.0.4.3/lib/active_record.rb#228 + # source://activerecord/7.1.3.2/lib/active_record.rb#278 def global_executor_concurrency=(global_executor_concurrency); end - # source://activerecord/7.0.4.3/lib/active_record.rb#216 + # source://activerecord/7.1.3.2/lib/active_record.rb#266 def global_thread_pool_async_query_executor; end - # source://activerecord/7.0.4.3/lib/active_record.rb#240 + # source://activerecord/7.1.3.2/lib/active_record.rb#290 def index_nested_attribute_errors; end - # source://activerecord/7.0.4.3/lib/active_record.rb#240 + # source://activerecord/7.1.3.2/lib/active_record.rb#290 def index_nested_attribute_errors=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#171 + # source://activerecord/7.1.3.2/lib/active_record.rb#183 def lazily_load_schema_cache; end - # source://activerecord/7.0.4.3/lib/active_record.rb#171 + # source://activerecord/7.1.3.2/lib/active_record.rb#183 def lazily_load_schema_cache=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#180 - def legacy_connection_handling; end + # source://activerecord/7.1.3.2/lib/active_record.rb#245 + def legacy_connection_handling=(_); end - # source://activerecord/7.0.4.3/lib/active_record.rb#180 - def legacy_connection_handling=(_arg0); end - - # source://activerecord/7.0.4.3/lib/active_record.rb#258 + # source://activerecord/7.1.3.2/lib/active_record.rb#308 def maintain_test_schema; end - # source://activerecord/7.0.4.3/lib/active_record.rb#258 + # source://activerecord/7.1.3.2/lib/active_record.rb#308 def maintain_test_schema=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#340 + # source://activerecord/7.1.3.2/lib/active_record.rb#457 + def marshalling_format_version; end + + # source://activerecord/7.1.3.2/lib/active_record.rb#461 + def marshalling_format_version=(value); end + + # source://activerecord/7.1.3.2/lib/active_record.rb#373 + def migration_strategy; end + + # source://activerecord/7.1.3.2/lib/active_record.rb#373 + def migration_strategy=(_arg0); end + + # source://activerecord/7.1.3.2/lib/active_record.rb#425 def query_transformers; end - # source://activerecord/7.0.4.3/lib/active_record.rb#340 + # source://activerecord/7.1.3.2/lib/active_record.rb#425 def query_transformers=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#255 + # source://activerecord/7.1.3.2/lib/active_record.rb#305 def queues; end - # source://activerecord/7.0.4.3/lib/active_record.rb#255 + # source://activerecord/7.1.3.2/lib/active_record.rb#305 def queues=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#355 + # source://activerecord/7.1.3.2/lib/active_record.rb#440 def raise_int_wider_than_64bit; end - # source://activerecord/7.0.4.3/lib/active_record.rb#355 + # source://activerecord/7.1.3.2/lib/active_record.rb#440 def raise_int_wider_than_64bit=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#200 + # source://activerecord/7.1.3.2/lib/active_record.rb#311 + def raise_on_assign_to_attr_readonly; end + + # source://activerecord/7.1.3.2/lib/active_record.rb#311 + def raise_on_assign_to_attr_readonly=(_arg0); end + + # source://activerecord/7.1.3.2/lib/active_record.rb#242 def reading_role; end - # source://activerecord/7.0.4.3/lib/active_record.rb#200 + # source://activerecord/7.1.3.2/lib/active_record.rb#242 def reading_role=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#177 + # source://activerecord/7.1.3.2/lib/active_record.rb#320 + def run_after_transaction_callbacks_in_order_defined; end + + # source://activerecord/7.1.3.2/lib/active_record.rb#320 + def run_after_transaction_callbacks_in_order_defined=(_arg0); end + + # source://activerecord/7.1.3.2/lib/active_record.rb#189 def schema_cache_ignored_tables; end - # source://activerecord/7.0.4.3/lib/active_record.rb#177 + # source://activerecord/7.1.3.2/lib/active_record.rb#189 def schema_cache_ignored_tables=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#288 + # source://activerecord/7.1.3.2/lib/active_record.rb#353 def schema_format; end - # source://activerecord/7.0.4.3/lib/active_record.rb#288 + # source://activerecord/7.1.3.2/lib/active_record.rb#353 def schema_format=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#328 + # source://activerecord/7.1.3.2/lib/active_record.rb#395 def suppress_multiple_database_warning; end - # source://activerecord/7.0.4.3/lib/active_record.rb#328 - def suppress_multiple_database_warning=(_arg0); end + # source://activerecord/7.1.3.2/lib/active_record.rb#402 + def suppress_multiple_database_warning=(value); end - # source://activerecord/7.0.4.3/lib/active_record.rb#302 + # source://activerecord/7.1.3.2/lib/active_record.rb#367 def timestamped_migrations; end - # source://activerecord/7.0.4.3/lib/active_record.rb#302 + # source://activerecord/7.1.3.2/lib/active_record.rb#367 def timestamped_migrations=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#347 + # source://activerecord/7.1.3.2/lib/active_record.rb#432 def use_yaml_unsafe_load; end - # source://activerecord/7.0.4.3/lib/active_record.rb#347 + # source://activerecord/7.1.3.2/lib/active_record.rb#432 def use_yaml_unsafe_load=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#248 + # source://activerecord/7.1.3.2/lib/active_record.rb#298 def verbose_query_logs; end - # source://activerecord/7.0.4.3/lib/active_record.rb#248 + # source://activerecord/7.1.3.2/lib/active_record.rb#298 def verbose_query_logs=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#337 + # source://activerecord/7.1.3.2/lib/active_record.rb#415 def verify_foreign_keys_for_fixtures; end - # source://activerecord/7.0.4.3/lib/active_record.rb#337 + # source://activerecord/7.1.3.2/lib/active_record.rb#415 def verify_foreign_keys_for_fixtures=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record/version.rb#7 + # source://activerecord/7.1.3.2/lib/active_record/version.rb#7 def version; end - # source://activerecord/7.0.4.3/lib/active_record.rb#267 + # source://activerecord/7.1.3.2/lib/active_record.rb#332 def warn_on_records_fetched_greater_than; end - # source://activerecord/7.0.4.3/lib/active_record.rb#267 + # source://activerecord/7.1.3.2/lib/active_record.rb#332 def warn_on_records_fetched_greater_than=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#197 + # source://activerecord/7.1.3.2/lib/active_record.rb#239 def writing_role; end - # source://activerecord/7.0.4.3/lib/active_record.rb#197 + # source://activerecord/7.1.3.2/lib/active_record.rb#239 def writing_role=(_arg0); end - # source://activerecord/7.0.4.3/lib/active_record.rb#362 + # source://activerecord/7.1.3.2/lib/active_record.rb#447 def yaml_column_permitted_classes; end - # source://activerecord/7.0.4.3/lib/active_record.rb#362 + # source://activerecord/7.1.3.2/lib/active_record.rb#447 def yaml_column_permitted_classes=(_arg0); end end end @@ -202,10 +277,10 @@ module ActiveRecord::TypedStore::Behavior private - # source://activerecord-typedstore//lib/active_record/typed_store/behavior.rb#77 + # source://activerecord-typedstore//lib/active_record/typed_store/behavior.rb#78 def attribute_names_for_partial_inserts; end - # source://activerecord-typedstore//lib/active_record/typed_store/behavior.rb#84 + # source://activerecord-typedstore//lib/active_record/typed_store/behavior.rb#85 def attribute_names_for_partial_updates; end end @@ -357,17 +432,17 @@ class ActiveRecord::TypedStore::Field private - # source://activerecord-typedstore//lib/active_record/typed_store/field.rb#54 + # source://activerecord-typedstore//lib/active_record/typed_store/field.rb#56 def extract_default(value); end - # source://activerecord-typedstore//lib/active_record/typed_store/field.rb#50 + # source://activerecord-typedstore//lib/active_record/typed_store/field.rb#52 def lookup_type(type, options); end - # source://activerecord-typedstore//lib/active_record/typed_store/field.rb#61 + # source://activerecord-typedstore//lib/active_record/typed_store/field.rb#63 def type_cast(value, arrayize: T.unsafe(nil)); end end -# source://activerecord-typedstore//lib/active_record/typed_store/field.rb#38 +# source://activerecord-typedstore//lib/active_record/typed_store/field.rb#40 ActiveRecord::TypedStore::Field::TYPES = T.let(T.unsafe(nil), Hash) # source://activerecord-typedstore//lib/active_record/typed_store/identity_coder.rb#4 @@ -428,13 +503,13 @@ class ActiveRecord::TypedStore::TypedHash < ::ActiveSupport::HashWithIndifferent def []=(key, value); end # source://activerecord-typedstore//lib/active_record/typed_store/typed_hash.rb#47 - def defaults_hash(*_arg0, **_arg1, &_arg2); end + def defaults_hash(&block); end # source://activerecord-typedstore//lib/active_record/typed_store/typed_hash.rb#21 def except(*_arg0, **_arg1, &_arg2); end # source://activerecord-typedstore//lib/active_record/typed_store/typed_hash.rb#47 - def fields(*_arg0, **_arg1, &_arg2); end + def fields(&block); end # source://activerecord-typedstore//lib/active_record/typed_store/typed_hash.rb#34 def merge!(other_hash); end diff --git a/sorbet/rbi/gems/activerecord@7.0.6.rbi b/sorbet/rbi/gems/activerecord@7.1.3.2.rbi similarity index 78% rename from sorbet/rbi/gems/activerecord@7.0.6.rbi rename to sorbet/rbi/gems/activerecord@7.1.3.2.rbi index fb4491d54..7f3a00c88 100644 --- a/sorbet/rbi/gems/activerecord@7.0.6.rbi +++ b/sorbet/rbi/gems/activerecord@7.1.3.2.rbi @@ -4,196 +4,273 @@ # 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 module ActiveRecord + include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor extend ::ActiveSupport::Autoload class << self - # source://activerecord//lib/active_record.rb#277 + # source://activerecord//lib/active_record.rb#342 def action_on_strict_loading_violation; end - # source://activerecord//lib/active_record.rb#277 + # source://activerecord//lib/active_record.rb#342 def action_on_strict_loading_violation=(_arg0); end - # source://activerecord//lib/active_record.rb#270 + # source://activerecord//lib/active_record.rb#422 + def allow_deprecated_singular_associations_name; end + + # source://activerecord//lib/active_record.rb#422 + def allow_deprecated_singular_associations_name=(_arg0); end + + # source://activerecord//lib/active_record.rb#335 def application_record_class; end - # source://activerecord//lib/active_record.rb#270 + # source://activerecord//lib/active_record.rb#335 def application_record_class=(_arg0); end - # source://activerecord//lib/active_record.rb#213 + # source://activerecord//lib/active_record.rb#263 def async_query_executor; end - # source://activerecord//lib/active_record.rb#213 + # source://activerecord//lib/active_record.rb#263 def async_query_executor=(_arg0); end - # source://activerecord//lib/active_record.rb#183 + # source://activerecord//lib/active_record.rb#317 + def before_committed_on_all_records; end + + # source://activerecord//lib/active_record.rb#317 + def before_committed_on_all_records=(_arg0); end + + # source://activerecord//lib/active_record.rb#314 + def belongs_to_required_validates_foreign_key; end + + # source://activerecord//lib/active_record.rb#314 + def belongs_to_required_validates_foreign_key=(_arg0); end + + # source://activerecord//lib/active_record.rb#323 + def commit_transaction_on_non_local_return; end + + # source://activerecord//lib/active_record.rb#323 + def commit_transaction_on_non_local_return=(_arg0); end + + # source://activerecord//lib/active_record.rb#209 + def db_warnings_action; end + + # source://activerecord//lib/active_record.rb#211 + def db_warnings_action=(action); end + + # source://activerecord//lib/active_record.rb#236 + def db_warnings_ignore; end + + # source://activerecord//lib/active_record.rb#236 + def db_warnings_ignore=(_arg0); end + + # source://activerecord//lib/active_record.rb#192 def default_timezone; end # Determines whether to use Time.utc (using :utc) or Time.local (using :local) when pulling # dates and times from the database. This is set to :utc by default. # - # source://activerecord//lib/active_record.rb#187 + # source://activerecord//lib/active_record.rb#196 def default_timezone=(default_timezone); end - # source://activerecord//lib/active_record.rb#311 + # source://activerecord//lib/active_record/deprecator.rb#4 + def deprecator; end + + # source://activerecord//lib/active_record.rb#177 + def disable_prepared_statements; end + + # source://activerecord//lib/active_record.rb#177 + def disable_prepared_statements=(_arg0); end + + # Explicitly closes all database connections in all pools. + # + # source://activerecord//lib/active_record.rb#476 + def disconnect_all!; end + + # source://activerecord//lib/active_record.rb#382 def dump_schema_after_migration; end - # source://activerecord//lib/active_record.rb#311 + # source://activerecord//lib/active_record.rb#382 def dump_schema_after_migration=(_arg0); end - # source://activerecord//lib/active_record.rb#321 + # source://activerecord//lib/active_record.rb#392 def dump_schemas; end - # source://activerecord//lib/active_record.rb#321 + # source://activerecord//lib/active_record.rb#392 def dump_schemas=(_arg0); end - # source://activerecord//lib/active_record.rb#365 + # source://activerecord//lib/active_record.rb#465 def eager_load!; end - # source://activerecord//lib/active_record.rb#296 + # source://activerecord//lib/active_record.rb#361 def error_on_ignored_order; end - # source://activerecord//lib/active_record.rb#296 + # source://activerecord//lib/active_record.rb#361 def error_on_ignored_order=(_arg0); end - # Returns the currently loaded version of Active Record as a Gem::Version. + # Returns the currently loaded version of Active Record as a +Gem::Version+. # # source://activerecord//lib/active_record/gem_version.rb#5 def gem_version; end - # source://activerecord//lib/active_record.rb#236 + # source://activerecord//lib/active_record.rb#454 + def generate_secure_token_on; end + + # source://activerecord//lib/active_record.rb#454 + def generate_secure_token_on=(_arg0); end + + # source://activerecord//lib/active_record.rb#286 def global_executor_concurrency; end # Set the +global_executor_concurrency+. This configuration value can only be used # with the global thread pool async query executor. # - # source://activerecord//lib/active_record.rb#228 + # source://activerecord//lib/active_record.rb#278 def global_executor_concurrency=(global_executor_concurrency); end - # source://activerecord//lib/active_record.rb#216 + # source://activerecord//lib/active_record.rb#266 def global_thread_pool_async_query_executor; end - # source://activerecord//lib/active_record.rb#240 + # source://activerecord//lib/active_record.rb#290 def index_nested_attribute_errors; end - # source://activerecord//lib/active_record.rb#240 + # source://activerecord//lib/active_record.rb#290 def index_nested_attribute_errors=(_arg0); end - # source://activerecord//lib/active_record.rb#171 + # source://activerecord//lib/active_record.rb#183 def lazily_load_schema_cache; end - # source://activerecord//lib/active_record.rb#171 + # source://activerecord//lib/active_record.rb#183 def lazily_load_schema_cache=(_arg0); end - # source://activerecord//lib/active_record.rb#180 - def legacy_connection_handling; end - - # source://activerecord//lib/active_record.rb#180 - def legacy_connection_handling=(_arg0); end + # @raise [ArgumentError] + # + # source://activerecord//lib/active_record.rb#245 + def legacy_connection_handling=(_); end - # source://activerecord//lib/active_record.rb#258 + # source://activerecord//lib/active_record.rb#308 def maintain_test_schema; end - # source://activerecord//lib/active_record.rb#258 + # source://activerecord//lib/active_record.rb#308 def maintain_test_schema=(_arg0); end - # source://activerecord//lib/active_record.rb#340 + # source://activerecord//lib/active_record.rb#457 + def marshalling_format_version; end + + # source://activerecord//lib/active_record.rb#461 + def marshalling_format_version=(value); end + + # source://activerecord//lib/active_record.rb#373 + def migration_strategy; end + + # source://activerecord//lib/active_record.rb#373 + def migration_strategy=(_arg0); end + + # source://activerecord//lib/active_record.rb#425 def query_transformers; end - # source://activerecord//lib/active_record.rb#340 + # source://activerecord//lib/active_record.rb#425 def query_transformers=(_arg0); end - # source://activerecord//lib/active_record.rb#255 + # source://activerecord//lib/active_record.rb#305 def queues; end - # source://activerecord//lib/active_record.rb#255 + # source://activerecord//lib/active_record.rb#305 def queues=(_arg0); end - # source://activerecord//lib/active_record.rb#355 + # source://activerecord//lib/active_record.rb#440 def raise_int_wider_than_64bit; end - # source://activerecord//lib/active_record.rb#355 + # source://activerecord//lib/active_record.rb#440 def raise_int_wider_than_64bit=(_arg0); end - # source://activerecord//lib/active_record.rb#200 + # source://activerecord//lib/active_record.rb#311 + def raise_on_assign_to_attr_readonly; end + + # source://activerecord//lib/active_record.rb#311 + def raise_on_assign_to_attr_readonly=(_arg0); end + + # source://activerecord//lib/active_record.rb#242 def reading_role; end - # source://activerecord//lib/active_record.rb#200 + # source://activerecord//lib/active_record.rb#242 def reading_role=(_arg0); end - # source://activerecord//lib/active_record.rb#177 + # source://activerecord//lib/active_record.rb#320 + def run_after_transaction_callbacks_in_order_defined; end + + # source://activerecord//lib/active_record.rb#320 + def run_after_transaction_callbacks_in_order_defined=(_arg0); end + + # source://activerecord//lib/active_record.rb#189 def schema_cache_ignored_tables; end - # source://activerecord//lib/active_record.rb#177 + # source://activerecord//lib/active_record.rb#189 def schema_cache_ignored_tables=(_arg0); end - # source://activerecord//lib/active_record.rb#288 + # source://activerecord//lib/active_record.rb#353 def schema_format; end - # source://activerecord//lib/active_record.rb#288 + # source://activerecord//lib/active_record.rb#353 def schema_format=(_arg0); end - # source://activerecord//lib/active_record.rb#328 + # source://activerecord//lib/active_record.rb#395 def suppress_multiple_database_warning; end - # source://activerecord//lib/active_record.rb#328 - def suppress_multiple_database_warning=(_arg0); end + # source://activerecord//lib/active_record.rb#402 + def suppress_multiple_database_warning=(value); end - # source://activerecord//lib/active_record.rb#302 + # source://activerecord//lib/active_record.rb#367 def timestamped_migrations; end - # source://activerecord//lib/active_record.rb#302 + # source://activerecord//lib/active_record.rb#367 def timestamped_migrations=(_arg0); end - # source://activerecord//lib/active_record.rb#347 + # source://activerecord//lib/active_record.rb#432 def use_yaml_unsafe_load; end - # source://activerecord//lib/active_record.rb#347 + # source://activerecord//lib/active_record.rb#432 def use_yaml_unsafe_load=(_arg0); end - # source://activerecord//lib/active_record.rb#248 + # source://activerecord//lib/active_record.rb#298 def verbose_query_logs; end - # source://activerecord//lib/active_record.rb#248 + # source://activerecord//lib/active_record.rb#298 def verbose_query_logs=(_arg0); end - # source://activerecord//lib/active_record.rb#337 + # source://activerecord//lib/active_record.rb#415 def verify_foreign_keys_for_fixtures; end - # source://activerecord//lib/active_record.rb#337 + # source://activerecord//lib/active_record.rb#415 def verify_foreign_keys_for_fixtures=(_arg0); end - # Returns the currently loaded version of Active Record as a Gem::Version. + # Returns the currently loaded version of Active Record as a +Gem::Version+. # # source://activerecord//lib/active_record/version.rb#7 def version; end - # source://activerecord//lib/active_record.rb#267 + # source://activerecord//lib/active_record.rb#332 def warn_on_records_fetched_greater_than; end - # source://activerecord//lib/active_record.rb#267 + # source://activerecord//lib/active_record.rb#332 def warn_on_records_fetched_greater_than=(_arg0); end - # source://activerecord//lib/active_record.rb#197 + # source://activerecord//lib/active_record.rb#239 def writing_role; end - # source://activerecord//lib/active_record.rb#197 + # source://activerecord//lib/active_record.rb#239 def writing_role=(_arg0); end - # source://activerecord//lib/active_record.rb#362 + # source://activerecord//lib/active_record.rb#447 def yaml_column_permitted_classes; end - # source://activerecord//lib/active_record.rb#362 + # source://activerecord//lib/active_record.rb#447 def yaml_column_permitted_classes=(_arg0); end end end -# Raised when trying to use a feature in Active Record which requires Active Job but the gem is not present. -# -# source://activerecord//lib/active_record/errors.rb#11 -class ActiveRecord::ActiveJobRequiredError < ::ActiveRecord::ActiveRecordError; end - # = Active Record Errors # # Generic Active Record exception class. @@ -201,21 +278,36 @@ class ActiveRecord::ActiveJobRequiredError < ::ActiveRecord::ActiveRecordError; # source://activerecord//lib/active_record/errors.rb#7 class ActiveRecord::ActiveRecordError < ::StandardError; end +# Superclass for all errors raised from an Active Record adapter. +# +# source://activerecord//lib/active_record/errors.rb#59 +class ActiveRecord::AdapterError < ::ActiveRecord::ActiveRecordError + # @return [AdapterError] a new instance of AdapterError + # + # source://activerecord//lib/active_record/errors.rb#60 + def initialize(message = T.unsafe(nil), connection_pool: T.unsafe(nil)); end + + # Returns the value of attribute connection_pool. + # + # source://activerecord//lib/active_record/errors.rb#65 + def connection_pool; end +end + # Raised when Active Record cannot find database adapter specified in # +config/database.yml+ or programmatically. # -# source://activerecord//lib/active_record/errors.rb#51 +# source://activerecord//lib/active_record/errors.rb#55 class ActiveRecord::AdapterNotFound < ::ActiveRecord::ActiveRecordError; end # Raised when adapter not specified on connection (or configuration file # +config/database.yml+ misses adapter field). # -# source://activerecord//lib/active_record/errors.rb#42 +# source://activerecord//lib/active_record/errors.rb#46 class ActiveRecord::AdapterNotSpecified < ::ActiveRecord::ActiveRecordError; end # AdapterTimeout will be raised when database clients times out while waiting from the server. # -# source://activerecord//lib/active_record/errors.rb#461 +# source://activerecord//lib/active_record/errors.rb#550 class ActiveRecord::AdapterTimeout < ::ActiveRecord::QueryAborted; end # See ActiveRecord::Aggregations::ClassMethods for documentation @@ -237,6 +329,8 @@ module ActiveRecord::Aggregations def initialize_dup(*_arg0); end end +# = Active Record \Aggregations +# # Active Record implements aggregation through a macro-like class method called #composed_of # for representing attributes as value objects. It expresses relationships like "Account [is] # composed of Money [among other things]" or "Person [is] composed of [an] address". Each call @@ -246,8 +340,8 @@ end # the database). # # class Customer < ActiveRecord::Base -# composed_of :balance, class_name: "Money", mapping: %w(balance amount) -# composed_of :address, mapping: [ %w(address_street street), %w(address_city city) ] +# composed_of :balance, class_name: "Money", mapping: { balance: :amount } +# composed_of :address, mapping: { address_street: :street, address_city: :city } # end # # The customer class now has the following methods to manipulate the value objects: @@ -364,7 +458,7 @@ end # class NetworkResource < ActiveRecord::Base # composed_of :cidr, # class_name: 'NetAddr::CIDR', -# mapping: [ %w(network_address network), %w(cidr_range bits) ], +# mapping: { network_address: :network, cidr_range: :bits }, # allow_nil: true, # constructor: Proc.new { |network_address, cidr_range| NetAddr::CIDR.create("#{network_address}/#{cidr_range}") }, # converter: Proc.new { |value| NetAddr::CIDR.create(value.is_a?(Array) ? value.join('/') : value) } @@ -392,7 +486,7 @@ end # # Customer.where(address: Address.new("May Street", "Chicago")) # -# source://activerecord//lib/active_record/aggregations.rb#181 +# source://activerecord//lib/active_record/aggregations.rb#183 module ActiveRecord::Aggregations::ClassMethods # Adds reader and writer methods for manipulating a value object: # composed_of :address adds address and address=(new_address) methods. @@ -403,10 +497,10 @@ module ActiveRecord::Aggregations::ClassMethods # to the Address class, but if the real class name is +CompanyAddress+, you'll have to specify it # with this option. # * :mapping - Specifies the mapping of entity attributes to attributes of the value - # object. Each mapping is represented as an array where the first item is the name of the - # entity attribute and the second item is the name of the attribute in the value object. The + # object. Each mapping is represented as a key-value pair where the key is the name of the + # entity attribute and the value is the name of the attribute in the value object. The # order in which mappings are defined determines the order in which attributes are sent to the - # value class constructor. + # value class constructor. The mapping can be written as a hash or as an array of pairs. # * :allow_nil - Specifies that the value object will not be instantiated when all mapped # attributes are +nil+. Setting the value object to +nil+ has the effect of writing +nil+ to all # mapped attributes. @@ -423,34 +517,35 @@ module ActiveRecord::Aggregations::ClassMethods # can return +nil+ to skip the assignment. # # Option examples: - # composed_of :temperature, mapping: %w(reading celsius) - # composed_of :balance, class_name: "Money", mapping: %w(balance amount) + # composed_of :temperature, mapping: { reading: :celsius } + # composed_of :balance, class_name: "Money", mapping: { balance: :amount } + # composed_of :address, mapping: { address_street: :street, address_city: :city } # composed_of :address, mapping: [ %w(address_street street), %w(address_city city) ] # composed_of :gps_location # composed_of :gps_location, allow_nil: true # composed_of :ip_address, # class_name: 'IPAddr', - # mapping: %w(ip to_i), + # mapping: { ip: :to_i }, # constructor: Proc.new { |ip| IPAddr.new(ip, Socket::AF_INET) }, # converter: Proc.new { |ip| ip.is_a?(Integer) ? IPAddr.new(ip, Socket::AF_INET) : IPAddr.new(ip.to_s) } # - # source://activerecord//lib/active_record/aggregations.rb#222 + # source://activerecord//lib/active_record/aggregations.rb#225 def composed_of(part_id, options = T.unsafe(nil)); end private - # source://activerecord//lib/active_record/aggregations.rb#245 + # source://activerecord//lib/active_record/aggregations.rb#248 def reader_method(name, class_name, mapping, allow_nil, constructor); end - # source://activerecord//lib/active_record/aggregations.rb#258 + # source://activerecord//lib/active_record/aggregations.rb#261 def writer_method(name, class_name, mapping, allow_nil, converter); end end -# source://activerecord//lib/active_record/associations.rb#187 +# source://activerecord//lib/active_record/associations.rb#203 class ActiveRecord::AmbiguousSourceReflectionForThroughAssociation < ::ActiveRecord::ActiveRecordError # @return [AmbiguousSourceReflectionForThroughAssociation] a new instance of AmbiguousSourceReflectionForThroughAssociation # - # source://activerecord//lib/active_record/associations.rb#188 + # source://activerecord//lib/active_record/associations.rb#204 def initialize(klass, macro, association_name, options, possible_sources); end end @@ -487,15 +582,25 @@ class ActiveRecord::AssociationRelation < ::ActiveRecord::Relation # source://activerecord//lib/active_record/association_relation.rb#14 def ==(other); end + # source://activerecord//lib/active_record/association_relation.rb#20 def insert(attributes, **kwargs); end + + # source://activerecord//lib/active_record/association_relation.rb#20 def insert!(attributes, **kwargs); end + + # source://activerecord//lib/active_record/association_relation.rb#20 def insert_all(attributes, **kwargs); end + + # source://activerecord//lib/active_record/association_relation.rb#20 def insert_all!(attributes, **kwargs); end # source://activerecord//lib/active_record/association_relation.rb#10 def proxy_association; end + # source://activerecord//lib/active_record/association_relation.rb#20 def upsert(attributes, **kwargs); end + + # source://activerecord//lib/active_record/association_relation.rb#20 def upsert_all(attributes, **kwargs); end private @@ -526,12 +631,12 @@ end # # Comments are not patches, this assignment raises AssociationTypeMismatch. # @ticket.patches << Comment.new(content: "Please attach tests to your patch.") # -# source://activerecord//lib/active_record/errors.rb#33 +# source://activerecord//lib/active_record/errors.rb#37 class ActiveRecord::AssociationTypeMismatch < ::ActiveRecord::ActiveRecordError; end # See ActiveRecord::Associations::ClassMethods for documentation. # -# source://activerecord//lib/active_record/associations.rb#251 +# source://activerecord//lib/active_record/associations.rb#267 module ActiveRecord::Associations extend ::ActiveSupport::Autoload extend ::ActiveSupport::Concern @@ -540,34 +645,34 @@ module ActiveRecord::Associations # Returns the association instance for the given name, instantiating it if it doesn't already exist # - # source://activerecord//lib/active_record/associations.rb#297 + # source://activerecord//lib/active_record/associations.rb#313 def association(name); end # @return [Boolean] # - # source://activerecord//lib/active_record/associations.rb#311 + # source://activerecord//lib/active_record/associations.rb#327 def association_cached?(name); end private # Returns the specified association instance if it exists, +nil+ otherwise. # - # source://activerecord//lib/active_record/associations.rb#327 + # source://activerecord//lib/active_record/associations.rb#343 def association_instance_get(name); end # Set the specified association instance. # - # source://activerecord//lib/active_record/associations.rb#332 + # source://activerecord//lib/active_record/associations.rb#348 def association_instance_set(name, association); end - # source://activerecord//lib/active_record/associations.rb#321 + # source://activerecord//lib/active_record/associations.rb#337 def init_internals; end - # source://activerecord//lib/active_record/associations.rb#315 + # source://activerecord//lib/active_record/associations.rb#331 def initialize_dup(*_arg0); end class << self - # source://activerecord//lib/active_record/associations.rb#290 + # source://activerecord//lib/active_record/associations.rb#306 def eager_load!; end end end @@ -622,7 +727,7 @@ end # Associations in Active Record are middlemen between the object that # holds the association, known as the owner, and the associated # result set, known as the target. Association metadata is available in -# reflection, which is an instance of ActiveRecord::Reflection::AssociationReflection. +# reflection, which is an instance of +ActiveRecord::Reflection::AssociationReflection+. # # For example, given # @@ -640,34 +745,36 @@ end class ActiveRecord::Associations::Association # @return [Association] a new instance of Association # - # source://activerecord//lib/active_record/associations/association.rb#40 + # source://activerecord//lib/active_record/associations/association.rb#41 def initialize(owner, reflection); end - # source://activerecord//lib/active_record/associations/association.rb#203 + # source://activerecord//lib/active_record/associations/association.rb#206 def create(attributes = T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/associations/association.rb#207 + # source://activerecord//lib/active_record/associations/association.rb#210 def create!(attributes = T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/associations/association.rb#36 + # Returns the value of attribute disable_joins. + # + # source://activerecord//lib/active_record/associations/association.rb#37 def disable_joins; end - # source://activerecord//lib/active_record/associations/association.rb#152 + # source://activerecord//lib/active_record/associations/association.rb#155 def extensions; end - # source://activerecord//lib/active_record/associations/association.rb#193 + # source://activerecord//lib/active_record/associations/association.rb#196 def initialize_attributes(record, except_from_scope_attributes = T.unsafe(nil)); end - # source://activerecord//lib/active_record/associations/association.rb#136 + # source://activerecord//lib/active_record/associations/association.rb#139 def inversed_from(record); end - # source://activerecord//lib/active_record/associations/association.rb#140 + # source://activerecord//lib/active_record/associations/association.rb#143 def inversed_from_queries(record); end # Returns the class of the target. belongs_to polymorphic overrides this to look at the # polymorphic_type field on the owner. # - # source://activerecord//lib/active_record/associations/association.rb#148 + # source://activerecord//lib/active_record/associations/association.rb#151 def klass; end # Loads the \target if needed and returns it. @@ -681,69 +788,74 @@ class ActiveRecord::Associations::Association # ActiveRecord::RecordNotFound is rescued within the method, and it is # not reraised. The proxy is \reset and +nil+ is the return value. # - # source://activerecord//lib/active_record/associations/association.rb#172 + # source://activerecord//lib/active_record/associations/association.rb#175 def load_target; end # Asserts the \target has been loaded setting the \loaded flag to +true+. # - # source://activerecord//lib/active_record/associations/association.rb#77 + # source://activerecord//lib/active_record/associations/association.rb#80 def loaded!; end # Has the \target been already \loaded? # # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#72 + # source://activerecord//lib/active_record/associations/association.rb#75 def loaded?; end # We can't dump @reflection and @through_reflection since it contains the scope proc # - # source://activerecord//lib/active_record/associations/association.rb#182 + # source://activerecord//lib/active_record/associations/association.rb#185 def marshal_dump; end - # source://activerecord//lib/active_record/associations/association.rb#187 + # source://activerecord//lib/active_record/associations/association.rb#190 def marshal_load(data); end - # source://activerecord//lib/active_record/associations/association.rb#38 + # source://activerecord//lib/active_record/associations/association.rb#39 def options(*_arg0, **_arg1, &_arg2); end # source://activerecord//lib/active_record/associations/association.rb#36 def owner; end # source://activerecord//lib/active_record/associations/association.rb#36 + def owner=(_arg0); end + + # Returns the value of attribute reflection. + # + # source://activerecord//lib/active_record/associations/association.rb#37 def reflection; end # Reloads the \target and returns +self+ on success. # The QueryCache is cleared if +force+ is true. # - # source://activerecord//lib/active_record/associations/association.rb#63 + # source://activerecord//lib/active_record/associations/association.rb#66 def reload(force = T.unsafe(nil)); end # Remove the inverse association, if possible # - # source://activerecord//lib/active_record/associations/association.rb#130 + # source://activerecord//lib/active_record/associations/association.rb#133 def remove_inverse_instance(record); end # Resets the \loaded flag to +false+ and sets the \target to +nil+. # - # source://activerecord//lib/active_record/associations/association.rb#51 + # source://activerecord//lib/active_record/associations/association.rb#54 def reset; end - # source://activerecord//lib/active_record/associations/association.rb#57 + # source://activerecord//lib/active_record/associations/association.rb#60 def reset_negative_cache; end - # source://activerecord//lib/active_record/associations/association.rb#110 + # source://activerecord//lib/active_record/associations/association.rb#113 def reset_scope; end - # source://activerecord//lib/active_record/associations/association.rb#98 + # source://activerecord//lib/active_record/associations/association.rb#101 def scope; end # Set the inverse association, if possible # - # source://activerecord//lib/active_record/associations/association.rb#115 + # source://activerecord//lib/active_record/associations/association.rb#118 def set_inverse_instance(record); end - # source://activerecord//lib/active_record/associations/association.rb#122 + # source://activerecord//lib/active_record/associations/association.rb#125 def set_inverse_instance_from_queries(record); end # The target is stale if the target no longer points to the record(s) that the @@ -755,15 +867,17 @@ class ActiveRecord::Associations::Association # # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#88 + # source://activerecord//lib/active_record/associations/association.rb#91 def stale_target?; end - # source://activerecord//lib/active_record/associations/association.rb#36 + # Returns the value of attribute target. + # + # source://activerecord//lib/active_record/associations/association.rb#37 def target; end # Sets the target of this association to \target, and the \loaded flag to +true+. # - # source://activerecord//lib/active_record/associations/association.rb#93 + # source://activerecord//lib/active_record/associations/association.rb#96 def target=(target); end private @@ -775,34 +889,34 @@ class ActiveRecord::Associations::Association # by scope.scoping { ... } or unscoped { ... } etc, which affects the scope which # actually gets built. # - # source://activerecord//lib/active_record/associations/association.rb#254 + # source://activerecord//lib/active_record/associations/association.rb#269 def association_scope; end - # source://activerecord//lib/active_record/associations/association.rb#336 + # source://activerecord//lib/active_record/associations/association.rb#352 def build_record(attributes); end - # source://activerecord//lib/active_record/associations/association.rb#351 + # source://activerecord//lib/active_record/associations/association.rb#367 def enqueue_destroy_association(options); end # Reader and writer methods call this so that consistent errors are presented # when the association target class does not exist. # - # source://activerecord//lib/active_record/associations/association.rb#214 + # source://activerecord//lib/active_record/associations/association.rb#217 def ensure_klass_exists!; end - # source://activerecord//lib/active_record/associations/association.rb#218 + # source://activerecord//lib/active_record/associations/association.rb#221 def find_target; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#274 + # source://activerecord//lib/active_record/associations/association.rb#289 def find_target?; end # Returns true if record contains the foreign_key # # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#324 + # source://activerecord//lib/active_record/associations/association.rb#339 def foreign_key_for?(record); end # Returns true if there is a foreign key present on the owner which @@ -816,22 +930,22 @@ class ActiveRecord::Associations::Association # # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#286 + # source://activerecord//lib/active_record/associations/association.rb#301 def foreign_key_present?; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#359 + # source://activerecord//lib/active_record/associations/association.rb#375 def inversable?(record); end - # source://activerecord//lib/active_record/associations/association.rb#304 + # source://activerecord//lib/active_record/associations/association.rb#319 def inverse_association_for(record); end # Can be redefined by subclasses, notably polymorphic belongs_to # The record parameter is necessary to support polymorphic inverses as we must check for # the association in the specific class of the record. # - # source://activerecord//lib/active_record/associations/association.rb#313 + # source://activerecord//lib/active_record/associations/association.rb#328 def inverse_reflection_for(record); end # Returns true if inverse association on the given record needs to be set. @@ -839,49 +953,52 @@ class ActiveRecord::Associations::Association # # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#319 + # source://activerecord//lib/active_record/associations/association.rb#334 def invertible_for?(record); end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#364 + # source://activerecord//lib/active_record/associations/association.rb#380 def matches_foreign_key?(record); end # Raises ActiveRecord::AssociationTypeMismatch unless +record+ is of # the kind of the class of the associated objects. Meant to be used as # a safety check when you are about to assign an associated record. # - # source://activerecord//lib/active_record/associations/association.rb#293 + # source://activerecord//lib/active_record/associations/association.rb#308 def raise_on_type_mismatch!(record); end - # source://activerecord//lib/active_record/associations/association.rb#270 + # source://activerecord//lib/active_record/associations/association.rb#285 def scope_for_create; end # Returns true if statement cache should be skipped on the association reader. # # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#344 + # source://activerecord//lib/active_record/associations/association.rb#360 def skip_statement_cache?(scope); end + # source://activerecord//lib/active_record/associations/association.rb#245 + def skip_strict_loading(&block); end + # This should be implemented to return the values of the relevant key(s) on the owner, # so that when stale_state is different from the value stored on the last find_target, # the target is stale. # # This is only relevant to certain associations, which is why it returns +nil+ by default. # - # source://activerecord//lib/active_record/associations/association.rb#333 + # source://activerecord//lib/active_record/associations/association.rb#349 def stale_state; end # Can be overridden (i.e. in ThroughAssociation) to merge in other scopes (i.e. the # through association's scope) # - # source://activerecord//lib/active_record/associations/association.rb#266 + # source://activerecord//lib/active_record/associations/association.rb#281 def target_scope; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#242 + # source://activerecord//lib/active_record/associations/association.rb#253 def violates_strict_loading?; end end @@ -897,16 +1014,16 @@ class ActiveRecord::Associations::AssociationScope private - # source://activerecord//lib/active_record/associations/association_scope.rb#117 + # source://activerecord//lib/active_record/associations/association_scope.rb#124 def add_constraints(scope, owner, chain); end - # source://activerecord//lib/active_record/associations/association_scope.rb#154 + # source://activerecord//lib/active_record/associations/association_scope.rb#161 def apply_scope(scope, table, key, value); end - # source://activerecord//lib/active_record/associations/association_scope.rb#162 + # source://activerecord//lib/active_record/associations/association_scope.rb#169 def eval_scope(reflection, scope, owner); end - # source://activerecord//lib/active_record/associations/association_scope.rb#105 + # source://activerecord//lib/active_record/associations/association_scope.rb#112 def get_chain(reflection, association, tracker); end # source://activerecord//lib/active_record/associations/association_scope.rb#54 @@ -915,10 +1032,10 @@ class ActiveRecord::Associations::AssociationScope # source://activerecord//lib/active_record/associations/association_scope.rb#58 def last_chain_scope(scope, reflection, owner); end - # source://activerecord//lib/active_record/associations/association_scope.rb#78 + # source://activerecord//lib/active_record/associations/association_scope.rb#81 def next_chain_scope(scope, reflection, next_reflection); end - # source://activerecord//lib/active_record/associations/association_scope.rb#74 + # source://activerecord//lib/active_record/associations/association_scope.rb#77 def transform_value(value); end # Returns the value of attribute value_transformation. @@ -941,19 +1058,19 @@ end # source://activerecord//lib/active_record/associations/association_scope.rb#19 ActiveRecord::Associations::AssociationScope::INSTANCE = T.let(T.unsafe(nil), ActiveRecord::Associations::AssociationScope) -# source://activerecord//lib/active_record/associations/association_scope.rb#94 +# source://activerecord//lib/active_record/associations/association_scope.rb#101 class ActiveRecord::Associations::AssociationScope::ReflectionProxy < ::SimpleDelegator # @return [ReflectionProxy] a new instance of ReflectionProxy # - # source://activerecord//lib/active_record/associations/association_scope.rb#97 + # source://activerecord//lib/active_record/associations/association_scope.rb#104 def initialize(reflection, aliased_table); end # Returns the value of attribute aliased_table. # - # source://activerecord//lib/active_record/associations/association_scope.rb#95 + # source://activerecord//lib/active_record/associations/association_scope.rb#102 def aliased_table; end - # source://activerecord//lib/active_record/associations/association_scope.rb#102 + # source://activerecord//lib/active_record/associations/association_scope.rb#109 def all_includes; end end @@ -961,85 +1078,85 @@ end # # source://activerecord//lib/active_record/associations/belongs_to_association.rb#6 class ActiveRecord::Associations::BelongsToAssociation < ::ActiveRecord::Associations::SingularAssociation - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#48 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#53 def decrement_counters; end - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#56 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#61 def decrement_counters_before_last_save; end - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#35 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#40 def default(&block); end # source://activerecord//lib/active_record/associations/belongs_to_association.rb#7 def handle_dependency; end - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#52 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#57 def increment_counters; end - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#30 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#35 def inversed_from(record); end - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#39 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#44 def reset; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#79 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#84 def saved_change_to_target?; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#71 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#76 def target_changed?; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#75 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#80 def target_previously_changed?; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#44 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#49 def updated?; end private # @return [Boolean] # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#113 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#118 def find_target?; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#133 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#141 def foreign_key_present?; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#137 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#145 def invertible_for?(record); end - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#129 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#137 def primary_key(klass); end - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#84 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#89 def replace(record); end - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#121 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#126 def replace_keys(record, force: T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#117 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#122 def require_counter_update?; end - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#142 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#150 def stale_state; end - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#98 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#103 def update_counters(by); end - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#108 + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#113 def update_counters_via_scope(klass, foreign_key, by); end end @@ -1080,7 +1197,7 @@ class ActiveRecord::Associations::BelongsToPolymorphicAssociation < ::ActiveReco def stale_state; end end -# source://activerecord//lib/active_record/associations.rb#264 +# source://activerecord//lib/active_record/associations.rb#280 module ActiveRecord::Associations::Builder; end # source://activerecord//lib/active_record/associations/builder/association.rb#15 @@ -1173,7 +1290,7 @@ ActiveRecord::Associations::Builder::Association::VALID_OPTIONS = T.let(T.unsafe class ActiveRecord::Associations::Builder::BelongsTo < ::ActiveRecord::Associations::Builder::SingularAssociation class << self # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#43 - def touch_record(o, changes, foreign_key, name, touch, touch_method); end + def touch_record(o, changes, foreign_key, name, touch); end private @@ -1192,7 +1309,7 @@ class ActiveRecord::Associations::Builder::BelongsTo < ::ActiveRecord::Associati # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#20 def define_callbacks(model, reflection); end - # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#130 + # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#143 def define_change_tracking_methods(model, reflection); end # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#112 @@ -1256,7 +1373,7 @@ class ActiveRecord::Associations::Builder::HasAndBelongsToMany # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#5 def lhs_model; end - # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#63 + # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#59 def middle_reflection(join_model); end # Returns the value of attribute options. @@ -1269,13 +1386,13 @@ class ActiveRecord::Associations::Builder::HasAndBelongsToMany private - # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#96 + # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#92 def belongs_to_options(options); end - # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#75 + # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#71 def middle_options(join_model); end - # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#84 + # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#80 def table_name; end end @@ -1336,7 +1453,7 @@ class ActiveRecord::Associations::Builder::SingularAssociation < ::ActiveRecord: # Defines the (build|create)_association methods for belongs_to or has_one association # - # source://activerecord//lib/active_record/associations/builder/singular_association.rb#26 + # source://activerecord//lib/active_record/associations/builder/singular_association.rb#30 def define_constructors(mixin, name); end # source://activerecord//lib/active_record/associations/builder/singular_association.rb#7 @@ -1344,6 +1461,8 @@ class ActiveRecord::Associations::Builder::SingularAssociation < ::ActiveRecord: end end +# = Active Record \Associations +# # \Associations are a set of macro-like class methods for tying objects together through # foreign keys. They express relationships like "Project has one Project Manager" # or "Project belongs to a Portfolio". Each macro adds a number of methods to the @@ -1360,23 +1479,42 @@ end # # The project class now has the following methods (and more) to ease the traversal and # manipulation of its relationships: -# * Project#portfolio, Project#portfolio=(portfolio), Project#reload_portfolio -# * Project#project_manager, Project#project_manager=(project_manager), Project#reload_project_manager -# * Project#milestones.empty?, Project#milestones.size, Project#milestones, Project#milestones<<(milestone), -# Project#milestones.delete(milestone), Project#milestones.destroy(milestone), Project#milestones.find(milestone_id), -# Project#milestones.build, Project#milestones.create -# * Project#categories.empty?, Project#categories.size, Project#categories, Project#categories<<(category1), -# Project#categories.delete(category1), Project#categories.destroy(category1) +# +# project = Project.first +# project.portfolio +# project.portfolio = Portfolio.first +# project.reload_portfolio +# +# project.project_manager +# project.project_manager = ProjectManager.first +# project.reload_project_manager +# +# project.milestones.empty? +# project.milestones.size +# project.milestones +# project.milestones << Milestone.first +# project.milestones.delete(Milestone.first) +# project.milestones.destroy(Milestone.first) +# project.milestones.find(Milestone.first.id) +# project.milestones.build +# project.milestones.create +# +# project.categories.empty? +# project.categories.size +# project.categories +# project.categories << Category.first +# project.categories.delete(category1) +# project.categories.destroy(category1) # # === A word of warning # # Don't create associations that have the same name as {instance methods}[rdoc-ref:ActiveRecord::Core] of -# ActiveRecord::Base. Since the association adds a method with that name to -# its model, using an association with the same name as one provided by ActiveRecord::Base will override the method inherited through ActiveRecord::Base and will break things. -# For instance, +attributes+ and +connection+ would be bad choices for association names, because those names already exist in the list of ActiveRecord::Base instance methods. +# +ActiveRecord::Base+. Since the association adds a method with that name to +# its model, using an association with the same name as one provided by +ActiveRecord::Base+ will override the method inherited through +ActiveRecord::Base+ and will break things. +# For instance, +attributes+ and +connection+ would be bad choices for association names, because those names already exist in the list of +ActiveRecord::Base+ instance methods. # # == Auto-generated methods -# See also Instance Public methods below for more details. +# See also "Instance Public methods" below ( from #belongs_to ) for more details. # # === Singular associations (one-to-one) # | | belongs_to | @@ -1622,6 +1760,7 @@ end # def log_after_remove(record) # # ... # end +# end # # It's possible to stack callbacks by passing them as an array. Example: # @@ -2023,7 +2162,7 @@ end # query per addressable type. # For example, if all the addressables are either of class Person or Company, then a total # of 3 queries will be executed. The list of addressable types to load is determined on -# the back of the addresses loaded. This is not supported if Active Record has to fallback +# the back of the addresses loaded. This is not supported if Active Record has to fall back # to the previous implementation of eager loading and will raise ActiveRecord::EagerLoadPolymorphicError. # The reason is that the parent model's type is a column value so its corresponding table # name cannot be put in the +FROM+/+JOIN+ clauses of that query. @@ -2036,45 +2175,45 @@ end # Indexes are appended for any more successive uses of the table name. # # Post.joins(:comments) -# # => SELECT ... FROM posts INNER JOIN comments ON ... +# # SELECT ... FROM posts INNER JOIN comments ON ... # Post.joins(:special_comments) # STI -# # => SELECT ... FROM posts INNER JOIN comments ON ... AND comments.type = 'SpecialComment' +# # SELECT ... FROM posts INNER JOIN comments ON ... AND comments.type = 'SpecialComment' # Post.joins(:comments, :special_comments) # special_comments is the reflection name, posts is the parent table name -# # => SELECT ... FROM posts INNER JOIN comments ON ... INNER JOIN comments special_comments_posts +# # SELECT ... FROM posts INNER JOIN comments ON ... INNER JOIN comments special_comments_posts # # Acts as tree example: # # TreeMixin.joins(:children) -# # => SELECT ... FROM mixins INNER JOIN mixins childrens_mixins ... +# # SELECT ... FROM mixins INNER JOIN mixins childrens_mixins ... # TreeMixin.joins(children: :parent) -# # => SELECT ... FROM mixins INNER JOIN mixins childrens_mixins ... -# INNER JOIN parents_mixins ... +# # SELECT ... FROM mixins INNER JOIN mixins childrens_mixins ... +# # INNER JOIN parents_mixins ... # TreeMixin.joins(children: {parent: :children}) -# # => SELECT ... FROM mixins INNER JOIN mixins childrens_mixins ... -# INNER JOIN parents_mixins ... -# INNER JOIN mixins childrens_mixins_2 +# # SELECT ... FROM mixins INNER JOIN mixins childrens_mixins ... +# # INNER JOIN parents_mixins ... +# # INNER JOIN mixins childrens_mixins_2 # # Has and Belongs to Many join tables use the same idea, but add a _join suffix: # # Post.joins(:categories) -# # => SELECT ... FROM posts INNER JOIN categories_posts ... INNER JOIN categories ... +# # SELECT ... FROM posts INNER JOIN categories_posts ... INNER JOIN categories ... # Post.joins(categories: :posts) -# # => SELECT ... FROM posts INNER JOIN categories_posts ... INNER JOIN categories ... -# INNER JOIN categories_posts posts_categories_join INNER JOIN posts posts_categories +# # SELECT ... FROM posts INNER JOIN categories_posts ... INNER JOIN categories ... +# # INNER JOIN categories_posts posts_categories_join INNER JOIN posts posts_categories # Post.joins(categories: {posts: :categories}) -# # => SELECT ... FROM posts INNER JOIN categories_posts ... INNER JOIN categories ... -# INNER JOIN categories_posts posts_categories_join INNER JOIN posts posts_categories -# INNER JOIN categories_posts categories_posts_join INNER JOIN categories categories_posts_2 +# # SELECT ... FROM posts INNER JOIN categories_posts ... INNER JOIN categories ... +# # INNER JOIN categories_posts posts_categories_join INNER JOIN posts posts_categories +# # INNER JOIN categories_posts categories_posts_join INNER JOIN categories categories_posts_2 # # If you wish to specify your own custom joins using ActiveRecord::QueryMethods#joins method, those table # names will take precedence over the eager associations: # # Post.joins(:comments).joins("inner join comments ...") -# # => SELECT ... FROM posts INNER JOIN comments_posts ON ... INNER JOIN comments ... +# # SELECT ... FROM posts INNER JOIN comments_posts ON ... INNER JOIN comments ... # Post.joins(:comments, :special_comments).joins("inner join comments ...") -# # => SELECT ... FROM posts INNER JOIN comments comments_posts ON ... -# INNER JOIN comments special_comments_posts ... -# INNER JOIN comments ... +# # SELECT ... FROM posts INNER JOIN comments comments_posts ON ... +# # INNER JOIN comments special_comments_posts ... +# # INNER JOIN comments ... # # Table aliases are automatically truncated according to the maximum length of table identifiers # according to the specific database. @@ -2155,7 +2294,8 @@ end # belongs_to :dungeon, inverse_of: :evil_wizard # end # -# For more information, see the documentation for the +:inverse_of+ option. +# For more information, see the documentation for the +:inverse_of+ option and the +# {Active Record Associations guide}[https://guides.rubyonrails.org/association_basics.html#bi-directional-associations]. # # == Deleting from associations # @@ -2177,7 +2317,7 @@ end # specific association types. When no option is given, the behavior is to do nothing # with the associated records when destroying a record. # -# Note that :dependent is implemented using Rails' callback +# Note that :dependent is implemented using \Rails' callback # system, which works by processing callbacks in order. Therefore, other # callbacks declared either before or after the :dependent option # can affect what it does. @@ -2242,7 +2382,7 @@ end # All of the association macros can be specialized through options. This makes cases # more complex than the simple and guessable ones possible. # -# source://activerecord//lib/active_record/associations.rb#1233 +# source://activerecord//lib/active_record/associations.rb#1272 module ActiveRecord::Associations::ClassMethods # Specifies a one-to-one association with another class. This method should only be used # if this class contains the foreign key. If the other class contains the foreign key, @@ -2255,42 +2395,52 @@ module ActiveRecord::Associations::ClassMethods # +association+ is a placeholder for the symbol passed as the +name+ argument, so # belongs_to :author would add among others author.nil?. # - # [association] + # [association] # Returns the associated object. +nil+ is returned if none is found. - # [association=(associate)] + # [association=(associate)] # Assigns the associate object, extracts the primary key, and sets it as the foreign key. # No modification or deletion of existing records takes place. - # [build_association(attributes = {})] + # [build_association(attributes = {})] # Returns a new object of the associated type that has been instantiated # with +attributes+ and linked to this object through a foreign key, but has not yet been saved. - # [create_association(attributes = {})] + # [create_association(attributes = {})] # Returns a new object of the associated type that has been instantiated # with +attributes+, linked to this object through a foreign key, and that # has already been saved (if it passed the validation). - # [create_association!(attributes = {})] + # [create_association!(attributes = {})] # Does the same as create_association, but raises ActiveRecord::RecordInvalid # if the record is invalid. - # [reload_association] + # [reload_association] # Returns the associated object, forcing a database read. - # [association_changed?] + # [reset_association] + # Unloads the associated object. The next access will query it from the database. + # [association_changed?] # Returns true if a new associate object has been assigned and the next save will update the foreign key. - # [association_previously_changed?] + # [association_previously_changed?] # Returns true if the previous save updated the association to reference a new associate object. # - # === Example - # - # A Post class declares belongs_to :author, which will add: - # * Post#author (similar to Author.find(author_id)) - # * Post#author=(author) (similar to post.author_id = author.id) - # * Post#build_author (similar to post.author = Author.new) - # * Post#create_author (similar to post.author = Author.new; post.author.save; post.author) - # * Post#create_author! (similar to post.author = Author.new; post.author.save!; post.author) - # * Post#reload_author - # * Post#author_changed? - # * Post#author_previously_changed? - # The declaration can also include an +options+ hash to specialize the behavior of the association. + # ==== Example + # + # class Post < ActiveRecord::Base + # belongs_to :author + # end + # + # Declaring belongs_to :author adds the following methods (and more): # - # === Scopes + # post = Post.find(7) + # author = Author.find(19) + # + # post.author # similar to Author.find(post.author_id) + # post.author = author # similar to post.author_id = author.id + # post.build_author # similar to post.author = Author.new + # post.create_author # similar to post.author = Author.new; post.author.save; post.author + # post.create_author! # similar to post.author = Author.new; post.author.save!; post.author + # post.reload_author + # post.reset_author + # post.author_changed? + # post.author_previously_changed? + # + # ==== Scopes # # You can pass a second argument +scope+ as a callable (i.e. proc or # lambda) to retrieve a specific record or customize the generated query @@ -2301,37 +2451,39 @@ module ActiveRecord::Associations::ClassMethods # belongs_to :user, -> { joins(:friends) } # belongs_to :level, ->(game) { where("game_level > ?", game.current_level) } # - # === Options + # ==== Options # - # [:class_name] + # The declaration can also include an +options+ hash to specialize the behavior of the association. + # + # [+:class_name+] # Specify the class name of the association. Use it only if that name can't be inferred # from the association name. So belongs_to :author will by default be linked to the Author class, but # if the real class name is Person, you'll have to specify it with this option. - # [:foreign_key] + # [+:foreign_key+] # Specify the foreign key used for the association. By default this is guessed to be the name # of the association with an "_id" suffix. So a class that defines a belongs_to :person # association will use "person_id" as the default :foreign_key. Similarly, # belongs_to :favorite_person, class_name: "Person" will use a foreign key # of "favorite_person_id". # - # If you are going to modify the association (rather than just read from it), then it is - # a good idea to set the :inverse_of option. - # [:foreign_type] + # Setting the :foreign_key option prevents automatic detection of the association's + # inverse, so it is generally a good idea to set the :inverse_of option as well. + # [+:foreign_type+] # Specify the column used to store the associated object's type, if this is a polymorphic # association. By default this is guessed to be the name of the association with a "_type" # suffix. So a class that defines a belongs_to :taggable, polymorphic: true # association will use "taggable_type" as the default :foreign_type. - # [:primary_key] + # [+:primary_key+] # Specify the method that returns the primary key of associated object used for the association. # By default this is +id+. - # [:dependent] + # [+:dependent+] # If set to :destroy, the associated object is destroyed when this object is. If set to # :delete, the associated object is deleted *without* calling its destroy method. If set to # :destroy_async, the associated object is scheduled to be destroyed in a background job. # This option should not be specified when #belongs_to is used in conjunction with # a #has_many relationship on another class because of the potential to leave # orphaned records behind. - # [:counter_cache] + # [+:counter_cache+] # Caches the number of belonging objects on the associate class through the use of CounterCache::ClassMethods#increment_counter # and CounterCache::ClassMethods#decrement_counter. The counter cache is incremented when an object of this # class is created and decremented when it's destroyed. This requires that a column @@ -2343,14 +2495,14 @@ module ActiveRecord::Associations::ClassMethods # option (e.g., counter_cache: :my_custom_counter.) # Note: Specifying a counter cache will add it to that model's list of readonly attributes # using +attr_readonly+. - # [:polymorphic] + # [+:polymorphic+] # Specify this association is a polymorphic association by passing +true+. # Note: If you've enabled the counter cache, then you may want to add the counter cache attribute # to the +attr_readonly+ list in the associated classes (e.g. class Post; attr_readonly :comments_count; end). - # [:validate] + # [+:validate+] # When set to +true+, validates new objects added to association when saving the parent object. +false+ by default. # If you want to ensure associated objects are revalidated on every update, use +validates_associated+. - # [:autosave] + # [+:autosave+] # If true, always save the associated object or destroy it if marked for destruction, when # saving the parent object. # If false, never save or destroy the associated object. @@ -2358,32 +2510,37 @@ module ActiveRecord::Associations::ClassMethods # # Note that NestedAttributes::ClassMethods#accepts_nested_attributes_for # sets :autosave to true. - # [:touch] + # [+:touch+] # If true, the associated object will be touched (the +updated_at+ / +updated_on+ attributes set to current time) # when this record is either saved or destroyed. If you specify a symbol, that attribute # will be updated with the current time in addition to the +updated_at+ / +updated_on+ attribute. # Please note that no validation will be performed when touching, and only the +after_touch+, # +after_commit+, and +after_rollback+ callbacks will be executed. - # [:inverse_of] + # [+:inverse_of+] # Specifies the name of the #has_one or #has_many association on the associated # object that is the inverse of this #belongs_to association. # See ActiveRecord::Associations::ClassMethods's overview on Bi-directional associations for more detail. - # [:optional] + # [+:optional+] # When set to +true+, the association will not have its presence validated. - # [:required] + # [+:required+] # When set to +true+, the association will also have its presence validated. # This will validate the association itself, not the id. You can use # +:inverse_of+ to avoid an extra query during validation. # NOTE: required is set to true by default and is deprecated. If # you don't want to have association presence validated, use optional: true. - # [:default] + # [+:default+] # Provide a callable (i.e. proc or lambda) to specify that the association should # be initialized with a particular record before validation. - # [:strict_loading] + # Please note that callable won't be executed if the record exists. + # [+:strict_loading+] # Enforces strict loading every time the associated record is loaded through this association. - # [:ensuring_owner_was] + # [+:ensuring_owner_was+] # Specifies an instance method to be called on the owner. The method must return true in order for the # associated records to be deleted in a background job. + # [+:query_constraints+] + # Serves as a composite foreign key. Defines the list of columns to be used to query the associated object. + # This is an optional option. By default Rails will attempt to derive the value automatically. + # When the value is set the Array size must match associated model's primary key or +query_constraints+ size. # # Option examples: # belongs_to :firm, foreign_key: "client_of" @@ -2399,8 +2556,9 @@ module ActiveRecord::Associations::ClassMethods # belongs_to :user, optional: true # belongs_to :account, default: -> { company.account } # belongs_to :account, strict_loading: true + # belong_to :note, query_constraints: [:organization_id, :note_id] # - # source://activerecord//lib/active_record/associations.rb#1799 + # source://activerecord//lib/active_record/associations.rb#1886 def belongs_to(name, scope = T.unsafe(nil), **options); end # Specifies a many-to-many relationship with another class. This associates two classes via an @@ -2420,7 +2578,7 @@ module ActiveRecord::Associations::ClassMethods # The join table should not have a primary key or a model associated with it. You must manually generate the # join table with a migration such as this: # - # class CreateDevelopersProjectsJoinTable < ActiveRecord::Migration[7.0] + # class CreateDevelopersProjectsJoinTable < ActiveRecord::Migration[7.1] # def change # create_join_table :developers, :projects # end @@ -2435,71 +2593,80 @@ module ActiveRecord::Associations::ClassMethods # +collection+ is a placeholder for the symbol passed as the +name+ argument, so # has_and_belongs_to_many :categories would add among others categories.empty?. # - # [collection] + # [collection] # Returns a Relation of all the associated objects. # An empty Relation is returned if none are found. - # [collection<<(object, ...)] + # [collection<<(object, ...)] # Adds one or more objects to the collection by creating associations in the join table # (collection.push and collection.concat are aliases to this method). # Note that this operation instantly fires update SQL without waiting for the save or update call on the # parent object, unless the parent object is a new record. - # [collection.delete(object, ...)] + # [collection.delete(object, ...)] # Removes one or more objects from the collection by removing their associations from the join table. # This does not destroy the objects. - # [collection.destroy(object, ...)] + # [collection.destroy(object, ...)] # Removes one or more objects from the collection by running destroy on each association in the join table, overriding any dependent option. # This does not destroy the objects. - # [collection=objects] + # [collection=objects] # Replaces the collection's content by deleting and adding objects as appropriate. - # [collection_singular_ids] + # [collection_singular_ids] # Returns an array of the associated objects' ids. - # [collection_singular_ids=ids] + # [collection_singular_ids=ids] # Replace the collection by the objects identified by the primary keys in +ids+. - # [collection.clear] + # [collection.clear] # Removes every object from the collection. This does not destroy the objects. - # [collection.empty?] + # [collection.empty?] # Returns +true+ if there are no associated objects. - # [collection.size] + # [collection.size] # Returns the number of associated objects. - # [collection.find(id)] + # [collection.find(id)] # Finds an associated object responding to the +id+ and that # meets the condition that it has to be associated with this object. # Uses the same rules as ActiveRecord::FinderMethods#find. - # [collection.exists?(...)] + # [collection.exists?(...)] # Checks whether an associated object with the given conditions exists. # Uses the same rules as ActiveRecord::FinderMethods#exists?. - # [collection.build(attributes = {})] + # [collection.build(attributes = {})] # Returns a new object of the collection type that has been instantiated # with +attributes+ and linked to this object through the join table, but has not yet been saved. - # [collection.create(attributes = {})] + # [collection.create(attributes = {})] # Returns a new object of the collection type that has been instantiated # with +attributes+, linked to this object through the join table, and that has already been # saved (if it passed the validation). - # [collection.reload] + # [collection.reload] # Returns a Relation of all of the associated objects, forcing a database read. # An empty Relation is returned if none are found. # - # === Example - # - # A Developer class declares has_and_belongs_to_many :projects, which will add: - # * Developer#projects - # * Developer#projects<< - # * Developer#projects.delete - # * Developer#projects.destroy - # * Developer#projects= - # * Developer#project_ids - # * Developer#project_ids= - # * Developer#projects.clear - # * Developer#projects.empty? - # * Developer#projects.size - # * Developer#projects.find(id) - # * Developer#projects.exists?(...) - # * Developer#projects.build (similar to Project.new(developer_id: id)) - # * Developer#projects.create (similar to c = Project.new(developer_id: id); c.save; c) - # * Developer#projects.reload + # ==== Example + # + # class Developer < ActiveRecord::Base + # has_and_belongs_to_many :projects + # end + # + # Declaring has_and_belongs_to_many :projects adds the following methods (and more): + # + # developer = Developer.find(11) + # project = Project.find(9) + # + # developer.projects + # developer.projects << project + # developer.projects.delete(project) + # developer.projects.destroy(project) + # developer.projects = [project] + # developer.project_ids + # developer.project_ids = [9] + # developer.projects.clear + # developer.projects.empty? + # developer.projects.size + # developer.projects.find(9) + # developer.projects.exists?(9) + # developer.projects.build # similar to Project.new(developer_id: 11) + # developer.projects.create # similar to Project.create(developer_id: 11) + # developer.projects.reload + # # The declaration may include an +options+ hash to specialize the behavior of the association. # - # === Scopes + # ==== Scopes # # You can pass a second argument +scope+ as a callable (i.e. proc or # lambda) to retrieve a specific set of records or customize the generated @@ -2511,7 +2678,7 @@ module ActiveRecord::Associations::ClassMethods # where("default_category = ?", post.default_category) # } # - # === Extensions + # ==== Extensions # # The +extension+ argument allows you to pass a block into a # has_and_belongs_to_many association. This is useful for adding new @@ -2526,33 +2693,33 @@ module ActiveRecord::Associations::ClassMethods # end # end # - # === Options + # ==== Options # - # [:class_name] + # [+:class_name+] # Specify the class name of the association. Use it only if that name can't be inferred # from the association name. So has_and_belongs_to_many :projects will by default be linked to the # Project class, but if the real class name is SuperProject, you'll have to specify it with this option. - # [:join_table] + # [+:join_table+] # Specify the name of the join table if the default based on lexical order isn't what you want. # WARNING: If you're overwriting the table name of either class, the +table_name+ method # MUST be declared underneath any #has_and_belongs_to_many declaration in order to work. - # [:foreign_key] + # [+:foreign_key+] # Specify the foreign key used for the association. By default this is guessed to be the name # of this class in lower-case and "_id" suffixed. So a Person class that makes # a #has_and_belongs_to_many association to Project will use "person_id" as the # default :foreign_key. # - # If you are going to modify the association (rather than just read from it), then it is - # a good idea to set the :inverse_of option. - # [:association_foreign_key] + # Setting the :foreign_key option prevents automatic detection of the association's + # inverse, so it is generally a good idea to set the :inverse_of option as well. + # [+:association_foreign_key+] # Specify the foreign key used for the association on the receiving side of the association. # By default this is guessed to be the name of the associated class in lower-case and "_id" suffixed. # So if a Person class makes a #has_and_belongs_to_many association to Project, # the association will use "project_id" as the default :association_foreign_key. - # [:validate] + # [+:validate+] # When set to +true+, validates new objects added to association when saving the parent object. +true+ by default. # If you want to ensure associated objects are revalidated on every update, use +validates_associated+. - # [:autosave] + # [+:autosave+] # If true, always save the associated objects or destroy them if marked for destruction, when # saving the parent object. # If false, never save or destroy the associated objects. @@ -2560,7 +2727,7 @@ module ActiveRecord::Associations::ClassMethods # # Note that NestedAttributes::ClassMethods#accepts_nested_attributes_for sets # :autosave to true. - # [:strict_loading] + # [+:strict_loading+] # Enforces strict loading every time an associated record is loaded through this association. # # Option examples: @@ -2571,7 +2738,7 @@ module ActiveRecord::Associations::ClassMethods # has_and_belongs_to_many :categories, -> { readonly } # has_and_belongs_to_many :categories, strict_loading: true # - # source://activerecord//lib/active_record/associations.rb#1971 + # source://activerecord//lib/active_record/associations.rb#2067 def has_and_belongs_to_many(name, scope = T.unsafe(nil), **options, &extension); end # Specifies a one-to-many association. The following methods for retrieval and query of @@ -2580,15 +2747,15 @@ module ActiveRecord::Associations::ClassMethods # +collection+ is a placeholder for the symbol passed as the +name+ argument, so # has_many :clients would add among others clients.empty?. # - # [collection] + # [collection] # Returns a Relation of all the associated objects. # An empty Relation is returned if none are found. - # [collection<<(object, ...)] + # [collection<<(object, ...)] # Adds one or more objects to the collection by setting their foreign keys to the collection's primary key. # Note that this operation instantly fires update SQL without waiting for the save or update call on the # parent object, unless the parent object is a new record. # This will also run validations and callbacks of associated object(s). - # [collection.delete(object, ...)] + # [collection.delete(object, ...)] # Removes one or more objects from the collection by setting their foreign keys to +NULL+. # Objects will be in addition destroyed if they're associated with dependent: :destroy, # and deleted if they're associated with dependent: :delete_all. @@ -2596,75 +2763,84 @@ module ActiveRecord::Associations::ClassMethods # If the :through option is used, then the join records are deleted (rather than # nullified) by default, but you can specify dependent: :destroy or # dependent: :nullify to override this. - # [collection.destroy(object, ...)] + # [collection.destroy(object, ...)] # Removes one or more objects from the collection by running destroy on # each record, regardless of any dependent option, ensuring callbacks are run. # # If the :through option is used, then the join records are destroyed # instead, not the objects themselves. - # [collection=objects] + # [collection=objects] # Replaces the collections content by deleting and adding objects as appropriate. If the :through # option is true callbacks in the join models are triggered except destroy callbacks, since deletion is # direct by default. You can specify dependent: :destroy or # dependent: :nullify to override this. - # [collection_singular_ids] + # [collection_singular_ids] # Returns an array of the associated objects' ids - # [collection_singular_ids=ids] + # [collection_singular_ids=ids] # Replace the collection with the objects identified by the primary keys in +ids+. This # method loads the models and calls collection=. See above. - # [collection.clear] + # [collection.clear] # Removes every object from the collection. This destroys the associated objects if they # are associated with dependent: :destroy, deletes them directly from the # database if dependent: :delete_all, otherwise sets their foreign keys to +NULL+. # If the :through option is true no destroy callbacks are invoked on the join models. # Join models are directly deleted. - # [collection.empty?] + # [collection.empty?] # Returns +true+ if there are no associated objects. - # [collection.size] + # [collection.size] # Returns the number of associated objects. - # [collection.find(...)] + # [collection.find(...)] # Finds an associated object according to the same rules as ActiveRecord::FinderMethods#find. - # [collection.exists?(...)] + # [collection.exists?(...)] # Checks whether an associated object with the given conditions exists. # Uses the same rules as ActiveRecord::FinderMethods#exists?. - # [collection.build(attributes = {}, ...)] + # [collection.build(attributes = {}, ...)] # Returns one or more new objects of the collection type that have been instantiated # with +attributes+ and linked to this object through a foreign key, but have not yet # been saved. - # [collection.create(attributes = {})] + # [collection.create(attributes = {})] # Returns a new object of the collection type that has been instantiated # with +attributes+, linked to this object through a foreign key, and that has already # been saved (if it passed the validation). *Note*: This only works if the base model # already exists in the DB, not if it is a new (unsaved) record! - # [collection.create!(attributes = {})] + # [collection.create!(attributes = {})] # Does the same as collection.create, but raises ActiveRecord::RecordInvalid # if the record is invalid. - # [collection.reload] + # [collection.reload] # Returns a Relation of all of the associated objects, forcing a database read. # An empty Relation is returned if none are found. # - # === Example - # - # A Firm class declares has_many :clients, which will add: - # * Firm#clients (similar to Client.where(firm_id: id)) - # * Firm#clients<< - # * Firm#clients.delete - # * Firm#clients.destroy - # * Firm#clients= - # * Firm#client_ids - # * Firm#client_ids= - # * Firm#clients.clear - # * Firm#clients.empty? (similar to firm.clients.size == 0) - # * Firm#clients.size (similar to Client.count "firm_id = #{id}") - # * Firm#clients.find (similar to Client.where(firm_id: id).find(id)) - # * Firm#clients.exists?(name: 'ACME') (similar to Client.exists?(name: 'ACME', firm_id: firm.id)) - # * Firm#clients.build (similar to Client.new(firm_id: id)) - # * Firm#clients.create (similar to c = Client.new(firm_id: id); c.save; c) - # * Firm#clients.create! (similar to c = Client.new(firm_id: id); c.save!) - # * Firm#clients.reload + # ==== Example + # + # class Firm < ActiveRecord::Base + # has_many :clients + # end + # + # Declaring has_many :clients adds the following methods (and more): + # + # firm = Firm.find(2) + # client = Client.find(6) + # + # firm.clients # similar to Client.where(firm_id: 2) + # firm.clients << client + # firm.clients.delete(client) + # firm.clients.destroy(client) + # firm.clients = [client] + # firm.client_ids + # firm.client_ids = [6] + # firm.clients.clear + # firm.clients.empty? # similar to firm.clients.size == 0 + # firm.clients.size # similar to Client.count "firm_id = 2" + # firm.clients.find # similar to Client.where(firm_id: 2).find(6) + # firm.clients.exists?(name: 'ACME') # similar to Client.exists?(name: 'ACME', firm_id: 2) + # firm.clients.build # similar to Client.new(firm_id: 2) + # firm.clients.create # similar to Client.create(firm_id: 2) + # firm.clients.create! # similar to Client.create!(firm_id: 2) + # firm.clients.reload + # # The declaration can also include an +options+ hash to specialize the behavior of the association. # - # === Scopes + # ==== Scopes # # You can pass a second argument +scope+ as a callable (i.e. proc or # lambda) to retrieve a specific set of records or customize the generated @@ -2675,7 +2851,7 @@ module ActiveRecord::Associations::ClassMethods # has_many :employees, -> { joins(:address) } # has_many :posts, ->(blog) { where("max_post_length > ?", blog.max_post_length) } # - # === Extensions + # ==== Extensions # # The +extension+ argument allows you to pass a block into a has_many # association. This is useful for adding new finders, creators, and other @@ -2689,31 +2865,31 @@ module ActiveRecord::Associations::ClassMethods # end # end # - # === Options - # [:class_name] + # ==== Options + # [+:class_name+] # Specify the class name of the association. Use it only if that name can't be inferred # from the association name. So has_many :products will by default be linked # to the +Product+ class, but if the real class name is +SpecialProduct+, you'll have to # specify it with this option. - # [:foreign_key] + # [+:foreign_key+] # Specify the foreign key used for the association. By default this is guessed to be the name # of this class in lower-case and "_id" suffixed. So a Person class that makes a #has_many # association will use "person_id" as the default :foreign_key. # - # If you are going to modify the association (rather than just read from it), then it is - # a good idea to set the :inverse_of option. - # [:foreign_type] + # Setting the :foreign_key option prevents automatic detection of the association's + # inverse, so it is generally a good idea to set the :inverse_of option as well. + # [+:foreign_type+] # Specify the column used to store the associated object's type, if this is a polymorphic # association. By default this is guessed to be the name of the polymorphic association # specified on "as" option with a "_type" suffix. So a class that defines a # has_many :tags, as: :taggable association will use "taggable_type" as the # default :foreign_type. - # [:primary_key] + # [+:primary_key+] # Specify the name of the column to use as the primary key for the association. By default this is +id+. - # [:dependent] + # [+:dependent+] # Controls what happens to the associated objects when # their owner is destroyed. Note that these are implemented as - # callbacks, and Rails executes callbacks in order. Therefore, other + # callbacks, and \Rails executes callbacks in order. Therefore, other # similar callbacks may affect the :dependent behavior, and the # :dependent behavior may affect other callbacks. # @@ -2725,7 +2901,7 @@ module ActiveRecord::Associations::ClassMethods # * :delete_all causes all the associated objects to be deleted directly from the database (so callbacks will not be executed). # * :nullify causes the foreign keys to be set to +NULL+. Polymorphic type will also be nullified # on polymorphic associations. Callbacks are not executed. - # * :restrict_with_exception causes an ActiveRecord::DeleteRestrictionError exception to be raised if there are any associated records. + # * :restrict_with_exception causes an ActiveRecord::DeleteRestrictionError exception to be raised if there are any associated records. # * :restrict_with_error causes an error to be added to the owner if there are any associated objects. # # If using with the :through option, the association on the join model must be @@ -2737,12 +2913,12 @@ module ActiveRecord::Associations::ClassMethods # has_many :comments, -> { where published: true }, dependent: :destroy and destroy is # called on a post, only published comments are destroyed. This means that any unpublished comments in the # database would still contain a foreign key pointing to the now deleted post. - # [:counter_cache] + # [+:counter_cache+] # This option can be used to configure a custom named :counter_cache. You only need this option, # when you customized the name of your :counter_cache on the #belongs_to association. - # [:as] + # [+:as+] # Specifies a polymorphic interface (See #belongs_to). - # [:through] + # [+:through+] # Specifies an association through which to perform the query. This can be any other type # of association, including other :through associations. Options for :class_name, # :primary_key and :foreign_key are ignored, as the association uses the @@ -2757,24 +2933,24 @@ module ActiveRecord::Associations::ClassMethods # a good idea to set the :inverse_of option on the source association on the # join model. This allows associated records to be built which will automatically create # the appropriate join model records when they are saved. (See the 'Association Join Models' - # section above.) - # [:disable_joins] + # and 'Setting Inverses' sections above.) + # [+:disable_joins+] # Specifies whether joins should be skipped for an association. If set to true, two or more queries # will be generated. Note that in some cases, if order or limit is applied, it will be done in-memory # due to database limitations. This option is only applicable on has_many :through associations as # +has_many+ alone do not perform a join. - # [:source] + # [+:source+] # Specifies the source association name used by #has_many :through queries. # Only use it if the name cannot be inferred from the association. # has_many :subscribers, through: :subscriptions will look for either :subscribers or # :subscriber on Subscription, unless a :source is given. - # [:source_type] + # [+:source_type+] # Specifies type of the source association used by #has_many :through queries where the source # association is a polymorphic #belongs_to. - # [:validate] + # [+:validate+] # When set to +true+, validates new objects added to association when saving the parent object. +true+ by default. # If you want to ensure associated objects are revalidated on every update, use +validates_associated+. - # [:autosave] + # [+:autosave+] # If true, always save the associated objects or destroy them if marked for destruction, # when saving the parent object. If false, never save or destroy the associated objects. # By default, only save associated objects that are new records. This option is implemented as a @@ -2783,20 +2959,24 @@ module ActiveRecord::Associations::ClassMethods # # Note that NestedAttributes::ClassMethods#accepts_nested_attributes_for sets # :autosave to true. - # [:inverse_of] + # [+:inverse_of+] # Specifies the name of the #belongs_to association on the associated object # that is the inverse of this #has_many association. # See ActiveRecord::Associations::ClassMethods's overview on Bi-directional associations for more detail. - # [:extend] + # [+:extend+] # Specifies a module or array of modules that will be extended into the association object returned. # Useful for defining methods on associations, especially when they should be shared between multiple # association objects. - # [:strict_loading] + # [+:strict_loading+] # When set to +true+, enforces strict loading every time the associated record is loaded through this # association. - # [:ensuring_owner_was] + # [+:ensuring_owner_was+] # Specifies an instance method to be called on the owner. The method must return true in order for the # associated records to be deleted in a background job. + # [+:query_constraints+] + # Serves as a composite foreign key. Defines the list of columns to be used to query the associated object. + # This is an optional option. By default Rails will attempt to derive the value automatically. + # When the value is set the Array size must match associated model's primary key or +query_constraints+ size. # # Option examples: # has_many :comments, -> { order("posted_on") } @@ -2809,8 +2989,9 @@ module ActiveRecord::Associations::ClassMethods # has_many :subscribers, through: :subscriptions, source: :user # has_many :subscribers, through: :subscriptions, disable_joins: true # has_many :comments, strict_loading: true + # has_many :comments, query_constraints: [:blog_id, :post_id] # - # source://activerecord//lib/active_record/associations.rb#1469 + # source://activerecord//lib/active_record/associations.rb#1522 def has_many(name, scope = T.unsafe(nil), **options, &extension); end # Specifies a one-to-one association with another class. This method should only be used @@ -2823,37 +3004,48 @@ module ActiveRecord::Associations::ClassMethods # +association+ is a placeholder for the symbol passed as the +name+ argument, so # has_one :manager would add among others manager.nil?. # - # [association] + # [association] # Returns the associated object. +nil+ is returned if none is found. - # [association=(associate)] + # [association=(associate)] # Assigns the associate object, extracts the primary key, sets it as the foreign key, # and saves the associate object. To avoid database inconsistencies, permanently deletes an existing # associated object when assigning a new one, even if the new one isn't saved to database. - # [build_association(attributes = {})] + # [build_association(attributes = {})] # Returns a new object of the associated type that has been instantiated # with +attributes+ and linked to this object through a foreign key, but has not # yet been saved. - # [create_association(attributes = {})] + # [create_association(attributes = {})] # Returns a new object of the associated type that has been instantiated # with +attributes+, linked to this object through a foreign key, and that # has already been saved (if it passed the validation). - # [create_association!(attributes = {})] + # [create_association!(attributes = {})] # Does the same as create_association, but raises ActiveRecord::RecordInvalid # if the record is invalid. - # [reload_association] + # [reload_association] # Returns the associated object, forcing a database read. + # [reset_association] + # Unloads the associated object. The next access will query it from the database. # - # === Example + # ==== Example # - # An Account class declares has_one :beneficiary, which will add: - # * Account#beneficiary (similar to Beneficiary.where(account_id: id).first) - # * Account#beneficiary=(beneficiary) (similar to beneficiary.account_id = account.id; beneficiary.save) - # * Account#build_beneficiary (similar to Beneficiary.new(account_id: id)) - # * Account#create_beneficiary (similar to b = Beneficiary.new(account_id: id); b.save; b) - # * Account#create_beneficiary! (similar to b = Beneficiary.new(account_id: id); b.save!; b) - # * Account#reload_beneficiary + # class Account < ActiveRecord::Base + # has_one :beneficiary + # end + # + # Declaring has_one :beneficiary adds the following methods (and more): + # + # account = Account.find(5) + # beneficiary = Beneficiary.find(8) + # + # account.beneficiary # similar to Beneficiary.find_by(account_id: 5) + # account.beneficiary = beneficiary # similar to beneficiary.update(account_id: 5) + # account.build_beneficiary # similar to Beneficiary.new(account_id: 5) + # account.create_beneficiary # similar to Beneficiary.create(account_id: 5) + # account.create_beneficiary! # similar to Beneficiary.create!(account_id: 5) + # account.reload_beneficiary + # account.reset_beneficiary # - # === Scopes + # ==== Scopes # # You can pass a second argument +scope+ as a callable (i.e. proc or # lambda) to retrieve a specific record or customize the generated query @@ -2864,16 +3056,16 @@ module ActiveRecord::Associations::ClassMethods # has_one :employer, -> { joins(:company) } # has_one :latest_post, ->(blog) { where("created_at > ?", blog.enabled_at) } # - # === Options + # ==== Options # # The declaration can also include an +options+ hash to specialize the behavior of the association. # # Options are: - # [:class_name] + # [+:class_name+] # Specify the class name of the association. Use it only if that name can't be inferred # from the association name. So has_one :manager will by default be linked to the Manager class, but # if the real class name is Person, you'll have to specify it with this option. - # [:dependent] + # [+:dependent+] # Controls what happens to the associated object when # its owner is destroyed: # @@ -2885,28 +3077,28 @@ module ActiveRecord::Associations::ClassMethods # * :delete causes the associated object to be deleted directly from the database (so callbacks will not execute) # * :nullify causes the foreign key to be set to +NULL+. Polymorphic type column is also nullified # on polymorphic associations. Callbacks are not executed. - # * :restrict_with_exception causes an ActiveRecord::DeleteRestrictionError exception to be raised if there is an associated record + # * :restrict_with_exception causes an ActiveRecord::DeleteRestrictionError exception to be raised if there is an associated record # * :restrict_with_error causes an error to be added to the owner if there is an associated object # # Note that :dependent option is ignored when using :through option. - # [:foreign_key] + # [+:foreign_key+] # Specify the foreign key used for the association. By default this is guessed to be the name # of this class in lower-case and "_id" suffixed. So a Person class that makes a #has_one association # will use "person_id" as the default :foreign_key. # - # If you are going to modify the association (rather than just read from it), then it is - # a good idea to set the :inverse_of option. - # [:foreign_type] + # Setting the :foreign_key option prevents automatic detection of the association's + # inverse, so it is generally a good idea to set the :inverse_of option as well. + # [+:foreign_type+] # Specify the column used to store the associated object's type, if this is a polymorphic # association. By default this is guessed to be the name of the polymorphic association # specified on "as" option with a "_type" suffix. So a class that defines a # has_one :tag, as: :taggable association will use "taggable_type" as the # default :foreign_type. - # [:primary_key] + # [+:primary_key+] # Specify the method that returns the primary key used for the association. By default this is +id+. - # [:as] + # [+:as+] # Specifies a polymorphic interface (See #belongs_to). - # [:through] + # [+:through+] # Specifies a Join Model through which to perform the query. Options for :class_name, # :primary_key, and :foreign_key are ignored, as the association uses the # source reflection. You can only use a :through query through a #has_one @@ -2921,49 +3113,53 @@ module ActiveRecord::Associations::ClassMethods # a good idea to set the :inverse_of option on the source association on the # join model. This allows associated records to be built which will automatically create # the appropriate join model records when they are saved. (See the 'Association Join Models' - # section above.) - # [:disable_joins] + # and 'Setting Inverses' sections above.) + # [+:disable_joins+] # Specifies whether joins should be skipped for an association. If set to true, two or more queries # will be generated. Note that in some cases, if order or limit is applied, it will be done in-memory # due to database limitations. This option is only applicable on has_one :through associations as # +has_one+ alone does not perform a join. - # [:source] + # [+:source+] # Specifies the source association name used by #has_one :through queries. # Only use it if the name cannot be inferred from the association. # has_one :favorite, through: :favorites will look for a # :favorite on Favorite, unless a :source is given. - # [:source_type] + # [+:source_type+] # Specifies type of the source association used by #has_one :through queries where the source # association is a polymorphic #belongs_to. - # [:validate] + # [+:validate+] # When set to +true+, validates new objects added to association when saving the parent object. +false+ by default. # If you want to ensure associated objects are revalidated on every update, use +validates_associated+. - # [:autosave] + # [+:autosave+] # If true, always save the associated object or destroy it if marked for destruction, # when saving the parent object. If false, never save or destroy the associated object. # By default, only save the associated object if it's a new record. # # Note that NestedAttributes::ClassMethods#accepts_nested_attributes_for sets # :autosave to true. - # [:touch] + # [+:touch+] # If true, the associated object will be touched (the +updated_at+ / +updated_on+ attributes set to current time) # when this record is either saved or destroyed. If you specify a symbol, that attribute # will be updated with the current time in addition to the +updated_at+ / +updated_on+ attribute. # Please note that no validation will be performed when touching, and only the +after_touch+, # +after_commit+, and +after_rollback+ callbacks will be executed. - # [:inverse_of] + # [+:inverse_of+] # Specifies the name of the #belongs_to association on the associated object # that is the inverse of this #has_one association. # See ActiveRecord::Associations::ClassMethods's overview on Bi-directional associations for more detail. - # [:required] + # [+:required+] # When set to +true+, the association will also have its presence validated. # This will validate the association itself, not the id. You can use # +:inverse_of+ to avoid an extra query during validation. - # [:strict_loading] + # [+:strict_loading+] # Enforces strict loading every time the associated record is loaded through this association. - # [:ensuring_owner_was] + # [+:ensuring_owner_was+] # Specifies an instance method to be called on the owner. The method must return true in order for the # associated records to be deleted in a background job. + # [+:query_constraints+] + # Serves as a composite foreign key. Defines the list of columns to be used to query the associated object. + # This is an optional option. By default Rails will attempt to derive the value automatically. + # When the value is set the Array size must match associated model's primary key or +query_constraints+ size. # # Option examples: # has_one :credit_card, dependent: :destroy # destroys the associated credit card @@ -2978,8 +3174,9 @@ module ActiveRecord::Associations::ClassMethods # has_one :primary_address, -> { where(primary: true) }, through: :addressables, source: :addressable # has_one :credit_card, required: true # has_one :credit_card, strict_loading: true + # has_one :employment_record_book, query_constraints: [:organization_id, :employee_id] # - # source://activerecord//lib/active_record/associations.rb#1639 + # source://activerecord//lib/active_record/associations.rb#1708 def has_one(name, scope = T.unsafe(nil), **options); end end @@ -2995,7 +3192,7 @@ end # # The CollectionAssociation class provides common methods to the collections # defined by +has_and_belongs_to_many+, +has_many+ or +has_many+ with -# the +:through association+ option. +# the :through association option. # # You need to be careful with assumptions regarding the target: The proxy # does not fetch records from the database until it needs them, but new @@ -3009,16 +3206,16 @@ end # # source://activerecord//lib/active_record/associations/collection_association.rb#31 class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associations::Association - # source://activerecord//lib/active_record/associations/collection_association.rb#271 + # source://activerecord//lib/active_record/associations/collection_association.rb#277 def add_to_target(record, skip_callbacks: T.unsafe(nil), replace: T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/associations/collection_association.rb#109 + # source://activerecord//lib/active_record/associations/collection_association.rb#115 def build(attributes = T.unsafe(nil), &block); end # Add +records+ to this association. Since +<<+ flattens its argument list # and inserts each record, +push+ and +concat+ behave identically. # - # source://activerecord//lib/active_record/associations/collection_association.rb#119 + # source://activerecord//lib/active_record/associations/collection_association.rb#125 def concat(*records); end # Removes +records+ from this association calling +before_remove+ and @@ -3029,7 +3226,7 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # are actually removed from the database, that depends precisely on # +delete_records+. They are in any case removed from the collection. # - # source://activerecord//lib/active_record/associations/collection_association.rb#178 + # source://activerecord//lib/active_record/associations/collection_association.rb#184 def delete(*records); end # Removes all records from the association without calling callbacks @@ -3046,7 +3243,7 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # # See delete for more info. # - # source://activerecord//lib/active_record/associations/collection_association.rb#142 + # source://activerecord//lib/active_record/associations/collection_association.rb#148 def delete_all(dependent = T.unsafe(nil)); end # Deletes the +records+ and removes them from this association calling @@ -3055,14 +3252,14 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # Note that this method removes records from the database ignoring the # +:dependent+ option. # - # source://activerecord//lib/active_record/associations/collection_association.rb#187 + # source://activerecord//lib/active_record/associations/collection_association.rb#193 def destroy(*records); end # Destroy all the records from this association. # # See destroy for more info. # - # source://activerecord//lib/active_record/associations/collection_association.rb#164 + # source://activerecord//lib/active_record/associations/collection_association.rb#170 def destroy_all; end # Returns true if the collection is empty. @@ -3076,15 +3273,15 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # # @return [Boolean] # - # source://activerecord//lib/active_record/associations/collection_association.rb#224 + # source://activerecord//lib/active_record/associations/collection_association.rb#230 def empty?; end - # source://activerecord//lib/active_record/associations/collection_association.rb#86 + # source://activerecord//lib/active_record/associations/collection_association.rb#92 def find(*args); end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/collection_association.rb#298 + # source://activerecord//lib/active_record/associations/collection_association.rb#304 def find_from_target?; end # Implements the ids reader method, e.g. foo.item_ids for Foo.has_many :items @@ -3099,15 +3296,15 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # @return [Boolean] # - # source://activerecord//lib/active_record/associations/collection_association.rb#250 + # source://activerecord//lib/active_record/associations/collection_association.rb#256 def include?(record); end - # source://activerecord//lib/active_record/associations/collection_association.rb#262 + # source://activerecord//lib/active_record/associations/collection_association.rb#268 def load_target; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/collection_association.rb#294 + # source://activerecord//lib/active_record/associations/collection_association.rb#300 def null_scope?; end # Implements the reader method, e.g. foo.items for Foo.has_many :items @@ -3118,13 +3315,13 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # Replace this collection with +other_array+. This will perform a diff # and delete/add only records that have changed. # - # source://activerecord//lib/active_record/associations/collection_association.rb#234 + # source://activerecord//lib/active_record/associations/collection_association.rb#240 def replace(other_array); end - # source://activerecord//lib/active_record/associations/collection_association.rb#79 + # source://activerecord//lib/active_record/associations/collection_association.rb#85 def reset; end - # source://activerecord//lib/active_record/associations/collection_association.rb#288 + # source://activerecord//lib/active_record/associations/collection_association.rb#294 def scope; end # Returns the size of the collection by executing a SELECT COUNT(*) @@ -3138,10 +3335,10 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # This method is abstract in the sense that it relies on # +count_records+, which is a method descendants have to provide. # - # source://activerecord//lib/active_record/associations/collection_association.rb#201 + # source://activerecord//lib/active_record/associations/collection_association.rb#207 def size; end - # source://activerecord//lib/active_record/associations/collection_association.rb#275 + # source://activerecord//lib/active_record/associations/collection_association.rb#281 def target=(record); end # Implements the writer method, e.g. foo.items= for Foo.has_many :items @@ -3151,21 +3348,21 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ private - # source://activerecord//lib/active_record/associations/collection_association.rb#340 + # source://activerecord//lib/active_record/associations/collection_association.rb#346 def _create_record(attributes, raise = T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/associations/collection_association.rb#478 + # source://activerecord//lib/active_record/associations/collection_association.rb#484 def callback(method, record); end - # source://activerecord//lib/active_record/associations/collection_association.rb#484 + # source://activerecord//lib/active_record/associations/collection_association.rb#490 def callbacks_for(callback_name); end # @raise [ActiveRecord::Rollback] # - # source://activerecord//lib/active_record/associations/collection_association.rb#424 + # source://activerecord//lib/active_record/associations/collection_association.rb#430 def concat_records(records, raise = T.unsafe(nil)); end - # source://activerecord//lib/active_record/associations/collection_association.rb#371 + # source://activerecord//lib/active_record/associations/collection_association.rb#377 def delete_or_destroy(records, method); end # Delete the given records from the association, @@ -3174,23 +3371,23 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/associations/collection_association.rb#400 + # source://activerecord//lib/active_record/associations/collection_association.rb#406 def delete_records(records, method); end # If the :inverse_of option has been # specified, then #find scans the entire collection. # - # source://activerecord//lib/active_record/associations/collection_association.rb#507 + # source://activerecord//lib/active_record/associations/collection_association.rb#513 def find_by_scan(*args); end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/collection_association.rb#493 + # source://activerecord//lib/active_record/associations/collection_association.rb#499 def include_in_memory?(record); end # Do the relevant stuff to insert the given record into the association collection. # - # source://activerecord//lib/active_record/associations/collection_association.rb#363 + # source://activerecord//lib/active_record/associations/collection_association.rb#369 def insert_record(record, validate = T.unsafe(nil), raise = T.unsafe(nil), &block); end # We have some records loaded from the database (persisted) and some that are @@ -3204,25 +3401,27 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # * Any changes made to attributes on objects in the memory array are to be preserved # * Otherwise, attributes should have the value found in the database # - # source://activerecord//lib/active_record/associations/collection_association.rb#321 + # source://activerecord//lib/active_record/associations/collection_association.rb#327 def merge_target_lists(persisted, memory); end - # source://activerecord//lib/active_record/associations/collection_association.rb#385 + # source://activerecord//lib/active_record/associations/collection_association.rb#391 def remove_records(existing_records, records, method); end - # source://activerecord//lib/active_record/associations/collection_association.rb#416 + # source://activerecord//lib/active_record/associations/collection_association.rb#422 def replace_common_records_in_memory(new_target, original_target); end - # source://activerecord//lib/active_record/associations/collection_association.rb#443 + # source://activerecord//lib/active_record/associations/collection_association.rb#449 def replace_on_target(record, skip_callbacks, replace:, inversing: T.unsafe(nil)); end - # source://activerecord//lib/active_record/associations/collection_association.rb#404 + # source://activerecord//lib/active_record/associations/collection_association.rb#410 def replace_records(new_target, original_target); end - # source://activerecord//lib/active_record/associations/collection_association.rb#307 + # source://activerecord//lib/active_record/associations/collection_association.rb#313 def transaction(&block); end end +# = Active Record Collection Proxy +# # Collection proxies in Active Record are middlemen between an # association, and its target result set. # @@ -3248,11 +3447,11 @@ end # is computed directly through SQL and does not trigger by itself the # instantiation of the actual post records. # -# source://activerecord//lib/active_record/associations/collection_proxy.rb#29 +# source://activerecord//lib/active_record/associations/collection_proxy.rb#31 class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # @return [CollectionProxy] a new instance of CollectionProxy # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#30 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#32 def initialize(klass, association, **_arg2); end # Adds one or more +records+ to the collection by setting their foreign keys @@ -3277,7 +3476,7 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # # # # ] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1031 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1036 def <<(*records); end # Equivalent to Array#==. Returns +true+ if the two arrays @@ -3300,33 +3499,36 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # person.pets == other # # => true # + # + # Note that unpersisted records can still be seen as equal: + # # other = [Pet.new(id: 1), Pet.new(id: 2)] # # person.pets == other - # # => false + # # => true # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#962 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#967 def ==(other); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def _select!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def and(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def and!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def annotate(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def annotate!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def annotate_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def annotate_values=(arg); end # Adds one or more +records+ to the collection by setting their foreign keys @@ -3351,10 +3553,10 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # # # # ] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1031 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1036 def append(*records); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def arel(*_arg0, **_arg1, &_arg2); end # Returns a new object of the collection type that has been instantiated @@ -3382,12 +3584,12 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # person.pets.size # => 5 # size of the collection # person.pets.count # => 0 # count from database # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#316 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#318 def build(attributes = T.unsafe(nil), &block); end # -- # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#722 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#724 def calculate(operation, column_name); end # Equivalent to +delete_all+. The difference is that returns +self+, instead @@ -3397,7 +3599,7 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # running an SQL query into the database, the +updated_at+ column of # the object is not changed. # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1048 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1053 def clear; end # Adds one or more +records+ to the collection by setting their foreign keys @@ -3422,10 +3624,10 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # # # # ] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1031 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1036 def concat(*records); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def construct_join_dependency(*_arg0, **_arg1, &_arg2); end # Returns a new object of the collection type that has been instantiated with @@ -3455,7 +3657,7 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # # # # ] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#347 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#349 def create(attributes = T.unsafe(nil), &block); end # Like #create, except that if the record is invalid, raises an exception. @@ -3471,19 +3673,19 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # person.pets.create!(name: nil) # # => ActiveRecord::RecordInvalid: Validation failed: Name can't be blank # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#363 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#365 def create!(attributes = T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def create_with(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def create_with!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def create_with_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def create_with_value=(arg); end # Deletes the +records+ supplied from the collection according to the strategy @@ -3602,7 +3804,7 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # # # # ] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#618 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#620 def delete(*records); end # Deletes all the records from the collection according to the strategy @@ -3685,7 +3887,7 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # Pet.find(1, 2, 3) # # => ActiveRecord::RecordNotFound: Couldn't find all Pets with 'id': (1, 2, 3) # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#472 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#474 def delete_all(dependent = T.unsafe(nil)); end # Destroys the +records+ supplied and removes them from the collection. @@ -3757,7 +3959,7 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # Pet.find(4, 5, 6) # => ActiveRecord::RecordNotFound: Couldn't find all Pets with 'id': (4, 5, 6) # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#690 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#692 def destroy(*records); end # Deletes the records of the collection directly from the database @@ -3784,31 +3986,31 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # Pet.find(1) # => Couldn't find Pet with id=1 # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#499 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#501 def destroy_all; end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def distinct(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def distinct!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def distinct_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def distinct_value=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def eager_load(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def eager_load!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def eager_load_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def eager_load_values=(arg); end # Returns +true+ if the collection is empty. If the collection has been @@ -3832,38 +4034,38 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # @return [Boolean] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#829 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#831 def empty?; end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def except(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def excluding(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def excluding!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def extending(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def extending!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def extending_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def extending_values=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def extensions(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def extract_associated(*_arg0, **_arg1, &_arg2); end # Finds an object in the collection responding to the +id+. Uses the same - # rules as ActiveRecord::Base.find. Returns ActiveRecord::RecordNotFound + # rules as ActiveRecord::FinderMethods.find. Returns ActiveRecord::RecordNotFound # error if the object cannot be found. # # class Person < ActiveRecord::Base @@ -3889,46 +4091,46 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # # # # ] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#136 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#138 def find(*args); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def from(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def from!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def from_clause(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def from_clause=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def group(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def group!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def group_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def group_values=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def having(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def having!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def having_clause(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def having_clause=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def in_order_of(*_arg0, **_arg1, &_arg2); end # Returns +true+ if the given +record+ is present in the collection. @@ -3944,52 +4146,52 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # @return [Boolean] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#925 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#927 def include?(record); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def includes(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def includes!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def includes_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def includes_values=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def insert(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def insert!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def insert_all(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def insert_all!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1100 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1105 def inspect; end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def invert_where(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def invert_where!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def joins(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def joins!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def joins_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def joins_values=(arg); end # Returns the last record, or the last +n+ records, from the collection. @@ -4019,40 +4221,40 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # another_person_without.pets.last # => nil # another_person_without.pets.last(3) # => [] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#257 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#259 def last(limit = T.unsafe(nil)); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def left_joins(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def left_outer_joins(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def left_outer_joins!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def left_outer_joins_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def left_outer_joins_values=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def limit(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def limit!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def limit_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def limit_value=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def load_async(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#42 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#44 def load_target; end # Returns +true+ if the association has been loaded, otherwise +false+. @@ -4063,7 +4265,7 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # @return [Boolean] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#51 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#53 def loaded; end # Returns +true+ if the association has been loaded, otherwise +false+. @@ -4074,25 +4276,25 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # @return [Boolean] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#51 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#53 def loaded?; end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def lock(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def lock!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def lock_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def lock_value=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def merge(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def merge!(*_arg0, **_arg1, &_arg2); end # Returns a new object of the collection type that has been instantiated @@ -4120,81 +4322,87 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # person.pets.size # => 5 # size of the collection # person.pets.count # => 0 # count from database # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#316 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#318 def new(attributes = T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def none(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def none!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 + def null_relation?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def offset(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def offset!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def offset_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def offset_value=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def only(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def optimizer_hints(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def optimizer_hints!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def optimizer_hints_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def optimizer_hints_values=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def or(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def or!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def order(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def order!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def order_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def order_values=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#726 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#728 def pluck(*column_names); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def preload(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def preload!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def preload_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def preload_values=(arg); end # @raise [NoMethodError] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1038 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1043 def prepend(*args); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#929 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1110 + def pretty_print(pp); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#931 def proxy_association; end # Adds one or more +records+ to the collection by setting their foreign keys @@ -4219,19 +4427,19 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # # # # ] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1031 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1036 def push(*records); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def readonly(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def readonly!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def readonly_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def readonly_value=(arg); end # :method: to_ary @@ -4273,21 +4481,27 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # # # # ] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1006 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1011 def records; end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def references(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def references!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def references_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def references_values=(arg); end + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 + def regroup(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 + def regroup!(*_arg0, **_arg1, &_arg2); end + # Reloads the collection from the database. Returns +self+. # # class Person < ActiveRecord::Base @@ -4303,19 +4517,19 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # person.pets.reload # fetches pets from the database # # => [#] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1067 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1072 def reload; end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def reorder(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def reorder!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def reordering_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def reordering_value=(arg); end # Replaces this collection with +other_array+. This will perform a diff @@ -4336,18 +4550,18 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # => [#] # # If the supplied array has an incorrect association type, it raises - # an ActiveRecord::AssociationTypeMismatch error: + # an ActiveRecord::AssociationTypeMismatch error: # # person.pets.replace(["doo", "ggie", "gaga"]) # # => ActiveRecord::AssociationTypeMismatch: Pet expected, got String # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#389 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#391 def replace(other_array); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def reselect(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def reselect!(*_arg0, **_arg1, &_arg2); end # Unloads the association. Returns +self+. @@ -4367,39 +4581,39 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # person.pets # fetches pets from the database # # => [#] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1088 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1093 def reset; end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1094 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1099 def reset_scope; end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def reverse_order(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def reverse_order!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def reverse_order_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def reverse_order_value=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def rewhere(*_arg0, **_arg1, &_arg2); end - # Returns a Relation object for the records in this association + # Returns a Relation object for the records in this association # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#934 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#936 def scope; end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def scoping(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def select_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def select_values=(arg); end # Returns the size of the collection. If the collection hasn't been loaded, @@ -4427,41 +4641,41 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # Because the collection is already loaded, this will behave like # # collection.size and no SQL count query is executed. # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#780 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#782 def size; end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def skip_preloading!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def skip_query_cache!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def skip_query_cache_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def skip_query_cache_value=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def spawn(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def strict_loading(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def strict_loading!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def strict_loading_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def strict_loading_value=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def structurally_compatible?(*_arg0, **_arg1, &_arg2); end # Gives a record (or N records if a parameter is supplied) from the collection - # using the same rules as ActiveRecord::Base.take. + # using the same rules as ActiveRecord::FinderMethods.take. # # class Person < ActiveRecord::Base # has_many :pets @@ -4486,70 +4700,82 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # another_person_without.pets.take # => nil # another_person_without.pets.take(2) # => [] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#287 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#289 def take(limit = T.unsafe(nil)); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#38 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#40 def target; end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def uniq!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def unscope(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def unscope!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def unscope_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def unscope_values=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def upsert(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def upsert_all(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def values(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def where(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def where!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def where_clause(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def where_clause=(arg); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 + def with(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 + def with!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 + def with_values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 + def with_values=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1124 def without(*_arg0, **_arg1, &_arg2); end private - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1135 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1145 def exec_queries; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1131 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1141 def find_from_target?; end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1122 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1132 def find_nth_from_last(index); end - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1117 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1127 def find_nth_with_limit(index, limit); end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1127 + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 def null_scope?; end end @@ -4586,27 +4812,28 @@ module ActiveRecord::Associations::ForeignAssociation end # = Active Record Has Many Association +# # This is the proxy that handles a has many association. # # If the association has a :through option further specialization # is provided by its child HasManyThroughAssociation. # -# source://activerecord//lib/active_record/associations/has_many_association.rb#10 +# source://activerecord//lib/active_record/associations/has_many_association.rb#11 class ActiveRecord::Associations::HasManyAssociation < ::ActiveRecord::Associations::CollectionAssociation include ::ActiveRecord::Associations::ForeignAssociation - # source://activerecord//lib/active_record/associations/has_many_association.rb#13 + # source://activerecord//lib/active_record/associations/has_many_association.rb#14 def handle_dependency; end - # source://activerecord//lib/active_record/associations/has_many_association.rb#56 + # source://activerecord//lib/active_record/associations/has_many_association.rb#61 def insert_record(record, validate = T.unsafe(nil), raise = T.unsafe(nil)); end private - # source://activerecord//lib/active_record/associations/has_many_association.rb#136 + # source://activerecord//lib/active_record/associations/has_many_association.rb#143 def _create_record(attributes, *_arg1); end - # source://activerecord//lib/active_record/associations/has_many_association.rb#132 + # source://activerecord//lib/active_record/associations/has_many_association.rb#139 def concat_records(records, *_arg1); end # Returns the number of records in this collection. @@ -4623,33 +4850,33 @@ class ActiveRecord::Associations::HasManyAssociation < ::ActiveRecord::Associati # If the collection is empty the target is set to an empty array and # the loaded flag is set to true as well. # - # source://activerecord//lib/active_record/associations/has_many_association.rb#75 + # source://activerecord//lib/active_record/associations/has_many_association.rb#80 def count_records; end - # source://activerecord//lib/active_record/associations/has_many_association.rb#107 + # source://activerecord//lib/active_record/associations/has_many_association.rb#112 def delete_count(method, scope); end - # source://activerecord//lib/active_record/associations/has_many_association.rb#115 + # source://activerecord//lib/active_record/associations/has_many_association.rb#120 def delete_or_nullify_all_records(method); end # Deletes the records according to the :dependent option. # - # source://activerecord//lib/active_record/associations/has_many_association.rb#122 + # source://activerecord//lib/active_record/associations/has_many_association.rb#127 def delete_records(records, method); end - # source://activerecord//lib/active_record/associations/has_many_association.rb#151 + # source://activerecord//lib/active_record/associations/has_many_association.rb#158 def difference(a, b); end - # source://activerecord//lib/active_record/associations/has_many_association.rb#155 + # source://activerecord//lib/active_record/associations/has_many_association.rb#162 def intersection(a, b); end - # source://activerecord//lib/active_record/associations/has_many_association.rb#93 + # source://activerecord//lib/active_record/associations/has_many_association.rb#98 def update_counter(difference, reflection = T.unsafe(nil)); end - # source://activerecord//lib/active_record/associations/has_many_association.rb#144 + # source://activerecord//lib/active_record/associations/has_many_association.rb#151 def update_counter_if_success(saved_successfully, difference); end - # source://activerecord//lib/active_record/associations/has_many_association.rb#99 + # source://activerecord//lib/active_record/associations/has_many_association.rb#104 def update_counter_in_memory(difference, reflection = T.unsafe(nil)); end end @@ -4672,7 +4899,7 @@ class ActiveRecord::Associations::HasManyThroughAssociation < ::ActiveRecord::As private - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#86 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#90 def build_record(attributes); end # The through record (built with build_record) is temporarily cached @@ -4687,62 +4914,62 @@ class ActiveRecord::Associations::HasManyThroughAssociation < ::ActiveRecord::As # source://activerecord//lib/active_record/associations/has_many_through_association.rb#37 def concat_records(records); end - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#126 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#130 def delete_or_nullify_all_records(method); end - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#130 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#134 def delete_records(records, method); end - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#199 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#203 def delete_through_records(records); end - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#167 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#171 def difference(a, b); end - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#183 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#187 def distribution(array); end - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#215 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#219 def find_target; end - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#173 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#177 def intersection(a, b); end # NOTE - not sure that we can actually cope with inverses here # # @return [Boolean] # - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#222 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#226 def invertible_for?(record); end - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#179 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#183 def mark_occurrence(distribution, record); end - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#106 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#110 def remove_records(existing_records, records, method); end - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#77 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#81 def save_through_record(record); end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#111 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#115 def target_reflection_has_associated_record?; end - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#189 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#193 def through_records_for(record); end # Returns the value of attribute through_scope. # - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#68 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#69 def through_scope; end - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#70 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#71 def through_scope_attributes; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#115 + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#119 def update_through_counter?(method); end end @@ -4760,30 +4987,27 @@ class ActiveRecord::Associations::HasOneAssociation < ::ActiveRecord::Associatio private - # source://activerecord//lib/active_record/associations/has_one_association.rb#130 + # source://activerecord//lib/active_record/associations/has_one_association.rb#133 def _create_record(attributes, raise_error = T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/associations/has_one_association.rb#118 + # source://activerecord//lib/active_record/associations/has_one_association.rb#119 def nullify_owner_attributes(record); end - # source://activerecord//lib/active_record/associations/has_one_association.rb#94 + # source://activerecord//lib/active_record/associations/has_one_association.rb#95 def remove_target!(method); end - # source://activerecord//lib/active_record/associations/has_one_association.rb#54 + # source://activerecord//lib/active_record/associations/has_one_association.rb#59 def replace(record, save = T.unsafe(nil)); end - # source://activerecord//lib/active_record/associations/has_one_association.rb#90 - def replace_keys(record, force: T.unsafe(nil)); end - # The reason that the save param for replace is false, if for create (not just build), # is because the setting of the foreign keys is actually handled by the scoping when # the record is instantiated, and so they are set straight away and do not need to be # updated within replace. # - # source://activerecord//lib/active_record/associations/has_one_association.rb#86 + # source://activerecord//lib/active_record/associations/has_one_association.rb#91 def set_new_record(record); end - # source://activerecord//lib/active_record/associations/has_one_association.rb#122 + # source://activerecord//lib/active_record/associations/has_one_association.rb#125 def transaction_if(value, &block); end end @@ -4857,7 +5081,7 @@ class ActiveRecord::Associations::JoinDependency # source://activerecord//lib/active_record/associations/join_dependency.rb#242 def construct(ar_parent, parent, row, seen, model_cache, strict_loading_value); end - # source://activerecord//lib/active_record/associations/join_dependency.rb#278 + # source://activerecord//lib/active_record/associations/join_dependency.rb#280 def construct_model(record, node, row, model_cache, id, strict_loading_value); end # source://activerecord//lib/active_record/associations/join_dependency.rb#223 @@ -5113,6 +5337,8 @@ class ActiveRecord::Associations::JoinDependency::JoinPart def table_name(*_arg0, **_arg1, &_arg2); end end +# = Active Record \Preloader +# # Implements the details of eager loading of Active Record associations. # # Suppose that you have the following two Active Record models: @@ -5131,8 +5357,8 @@ end # # Author.includes(:books).where(name: ['bell hooks', 'Homer']).to_a # -# => SELECT `authors`.* FROM `authors` WHERE `name` IN ('bell hooks', 'Homer') -# => SELECT `books`.* FROM `books` WHERE `author_id` IN (2, 5) +# # SELECT `authors`.* FROM `authors` WHERE `name` IN ('bell hooks', 'Homer') +# # SELECT `books`.* FROM `books` WHERE `author_id` IN (2, 5) # # Active Record saves the ids of the records from the first query to use in # the second. Depending on the number of associations involved there can be @@ -5142,16 +5368,16 @@ end # Record will fall back to a slightly more resource-intensive single query: # # Author.includes(:books).where(books: {title: 'Illiad'}).to_a -# => SELECT `authors`.`id` AS t0_r0, `authors`.`name` AS t0_r1, `authors`.`age` AS t0_r2, -# `books`.`id` AS t1_r0, `books`.`title` AS t1_r1, `books`.`sales` AS t1_r2 -# FROM `authors` -# LEFT OUTER JOIN `books` ON `authors`.`id` = `books`.`author_id` -# WHERE `books`.`title` = 'Illiad' +# # SELECT `authors`.`id` AS t0_r0, `authors`.`name` AS t0_r1, `authors`.`age` AS t0_r2, +# # `books`.`id` AS t1_r0, `books`.`title` AS t1_r1, `books`.`sales` AS t1_r2 +# # FROM `authors` +# # LEFT OUTER JOIN `books` ON `authors`.`id` = `books`.`author_id` +# # WHERE `books`.`title` = 'Illiad' # # This could result in many rows that contain redundant data and it performs poorly at scale # and is therefore only used when necessary. # -# source://activerecord//lib/active_record/associations/preloader.rb#44 +# source://activerecord//lib/active_record/associations/preloader.rb#46 class ActiveRecord::Associations::Preloader extend ::ActiveSupport::Autoload @@ -5175,15 +5401,16 @@ class ActiveRecord::Associations::Preloader # for an Author. # - an Array which specifies multiple association names. This array # is processed recursively. For example, specifying [:avatar, :books] - # allows this method to preload an author's avatar as well as all of his + # allows this method to preload an author's avatar as well as all of their # books. # - a Hash which specifies multiple association names, as well as # association names for the to-be-preloaded association objects. For # example, specifying { author: :avatar } will preload a # book's author, as well as that author's avatar. # - # +:associations+ has the same format as the +:include+ method in - # ActiveRecord::QueryMethods. So +associations+ could look like this: + # +:associations+ has the same format as the arguments to + # ActiveRecord::QueryMethods#includes. So +associations+ could look like + # this: # # :books # [ :books, :author ] @@ -5198,238 +5425,241 @@ class ActiveRecord::Associations::Preloader # # @return [Preloader] a new instance of Preloader # - # source://activerecord//lib/active_record/associations/preloader.rb#96 + # source://activerecord//lib/active_record/associations/preloader.rb#99 def initialize(records:, associations:, scope: T.unsafe(nil), available_records: T.unsafe(nil), associate_by_default: T.unsafe(nil)); end # Returns the value of attribute associate_by_default. # - # source://activerecord//lib/active_record/associations/preloader.rb#54 + # source://activerecord//lib/active_record/associations/preloader.rb#56 def associate_by_default; end # Returns the value of attribute associations. # - # source://activerecord//lib/active_record/associations/preloader.rb#54 + # source://activerecord//lib/active_record/associations/preloader.rb#56 def associations; end - # source://activerecord//lib/active_record/associations/preloader.rb#123 + # source://activerecord//lib/active_record/associations/preloader.rb#126 def branches; end - # source://activerecord//lib/active_record/associations/preloader.rb#117 + # source://activerecord//lib/active_record/associations/preloader.rb#120 def call; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/preloader.rb#113 + # source://activerecord//lib/active_record/associations/preloader.rb#116 def empty?; end - # source://activerecord//lib/active_record/associations/preloader.rb#127 + # source://activerecord//lib/active_record/associations/preloader.rb#130 def loaders; end # Returns the value of attribute records. # - # source://activerecord//lib/active_record/associations/preloader.rb#54 + # source://activerecord//lib/active_record/associations/preloader.rb#56 def records; end # Returns the value of attribute scope. # - # source://activerecord//lib/active_record/associations/preloader.rb#54 + # source://activerecord//lib/active_record/associations/preloader.rb#56 def scope; end end -# source://activerecord//lib/active_record/associations/preloader/association.rb#6 +# source://activerecord//lib/active_record/associations/preloader/association.rb#8 class ActiveRecord::Associations::Preloader::Association # @return [Association] a new instance of Association # - # source://activerecord//lib/active_record/associations/preloader/association.rb#87 + # source://activerecord//lib/active_record/associations/preloader/association.rb#104 def initialize(klass, owners, reflection, preload_scope, reflection_scope, associate_by_default); end - # source://activerecord//lib/active_record/associations/preloader/association.rb#202 + # source://activerecord//lib/active_record/associations/preloader/association.rb#218 def associate_records_from_unscoped(unscoped_records); end # The name of the key on the associated records # - # source://activerecord//lib/active_record/associations/preloader/association.rb#144 + # source://activerecord//lib/active_record/associations/preloader/association.rb#161 def association_key_name; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#102 + # source://activerecord//lib/active_record/associations/preloader/association.rb#119 def future_classes; end # Returns the value of attribute klass. # - # source://activerecord//lib/active_record/associations/preloader/association.rb#85 + # source://activerecord//lib/active_record/associations/preloader/association.rb#102 def klass; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#180 + # source://activerecord//lib/active_record/associations/preloader/association.rb#197 def load_records(raw_records = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/preloader/association.rb#159 + # source://activerecord//lib/active_record/associations/preloader/association.rb#176 def loaded?(owner); end - # source://activerecord//lib/active_record/associations/preloader/association.rb#148 + # source://activerecord//lib/active_record/associations/preloader/association.rb#165 def loader_query; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#152 + # source://activerecord//lib/active_record/associations/preloader/association.rb#169 def owners_by_key; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#137 + # source://activerecord//lib/active_record/associations/preloader/association.rb#154 def preloaded_records; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#131 + # source://activerecord//lib/active_record/associations/preloader/association.rb#148 def records_by_owner; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#118 + # source://activerecord//lib/active_record/associations/preloader/association.rb#135 def run; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/preloader/association.rb#114 + # source://activerecord//lib/active_record/associations/preloader/association.rb#131 def run?; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#110 + # source://activerecord//lib/active_record/associations/preloader/association.rb#127 def runnable_loaders; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#167 + # source://activerecord//lib/active_record/associations/preloader/association.rb#184 def scope; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#171 + # source://activerecord//lib/active_record/associations/preloader/association.rb#188 def set_inverse(record); end - # source://activerecord//lib/active_record/associations/preloader/association.rb#98 + # source://activerecord//lib/active_record/associations/preloader/association.rb#115 def table_name; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#163 + # source://activerecord//lib/active_record/associations/preloader/association.rb#180 def target_for(owner); end private - # source://activerecord//lib/active_record/associations/preloader/association.rb#229 + # source://activerecord//lib/active_record/associations/preloader/association.rb#245 def associate_records_to_owner(owner, records); end - # source://activerecord//lib/active_record/associations/preloader/association.rb#257 + # source://activerecord//lib/active_record/associations/preloader/association.rb#281 def association_key_type; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#269 + # source://activerecord//lib/active_record/associations/preloader/association.rb#293 def build_scope; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#285 + # source://activerecord//lib/active_record/associations/preloader/association.rb#309 def cascade_strict_loading(scope); end - # source://activerecord//lib/active_record/associations/preloader/association.rb#249 + # source://activerecord//lib/active_record/associations/preloader/association.rb#273 def convert_key(key); end + # source://activerecord//lib/active_record/associations/preloader/association.rb#265 + def derive_key(owner, key); end + # @return [Boolean] # - # source://activerecord//lib/active_record/associations/preloader/association.rb#241 + # source://activerecord//lib/active_record/associations/preloader/association.rb#257 def key_conversion_required?; end # Returns the value of attribute model. # - # source://activerecord//lib/active_record/associations/preloader/association.rb#222 + # source://activerecord//lib/active_record/associations/preloader/association.rb#238 def model; end # The name of the key on the model which declares the association # - # source://activerecord//lib/active_record/associations/preloader/association.rb#225 + # source://activerecord//lib/active_record/associations/preloader/association.rb#241 def owner_key_name; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#261 + # source://activerecord//lib/active_record/associations/preloader/association.rb#285 def owner_key_type; end # Returns the value of attribute owners. # - # source://activerecord//lib/active_record/associations/preloader/association.rb#222 + # source://activerecord//lib/active_record/associations/preloader/association.rb#238 def owners; end # Returns the value of attribute preload_scope. # - # source://activerecord//lib/active_record/associations/preloader/association.rb#222 + # source://activerecord//lib/active_record/associations/preloader/association.rb#238 def preload_scope; end # Returns the value of attribute reflection. # - # source://activerecord//lib/active_record/associations/preloader/association.rb#222 + # source://activerecord//lib/active_record/associations/preloader/association.rb#238 def reflection; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#265 + # source://activerecord//lib/active_record/associations/preloader/association.rb#289 def reflection_scope; end end -# source://activerecord//lib/active_record/associations/preloader/association.rb#7 +# source://activerecord//lib/active_record/associations/preloader/association.rb#9 class ActiveRecord::Associations::Preloader::Association::LoaderQuery # @return [LoaderQuery] a new instance of LoaderQuery # - # source://activerecord//lib/active_record/associations/preloader/association.rb#10 + # source://activerecord//lib/active_record/associations/preloader/association.rb#12 def initialize(scope, association_key_name); end # Returns the value of attribute association_key_name. # - # source://activerecord//lib/active_record/associations/preloader/association.rb#8 + # source://activerecord//lib/active_record/associations/preloader/association.rb#10 def association_key_name; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/preloader/association.rb#15 + # source://activerecord//lib/active_record/associations/preloader/association.rb#17 def eql?(other); end - # source://activerecord//lib/active_record/associations/preloader/association.rb#21 + # source://activerecord//lib/active_record/associations/preloader/association.rb#24 def hash; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#38 + # source://activerecord//lib/active_record/associations/preloader/association.rb#41 def load_records_for_keys(keys, &block); end - # source://activerecord//lib/active_record/associations/preloader/association.rb#29 + # source://activerecord//lib/active_record/associations/preloader/association.rb#32 def load_records_in_batch(loaders); end - # source://activerecord//lib/active_record/associations/preloader/association.rb#25 + # source://activerecord//lib/active_record/associations/preloader/association.rb#28 def records_for(loaders); end # Returns the value of attribute scope. # - # source://activerecord//lib/active_record/associations/preloader/association.rb#8 + # source://activerecord//lib/active_record/associations/preloader/association.rb#10 def scope; end end -# source://activerecord//lib/active_record/associations/preloader/association.rb#43 +# source://activerecord//lib/active_record/associations/preloader/association.rb#60 class ActiveRecord::Associations::Preloader::Association::LoaderRecords # @return [LoaderRecords] a new instance of LoaderRecords # - # source://activerecord//lib/active_record/associations/preloader/association.rb#44 + # source://activerecord//lib/active_record/associations/preloader/association.rb#61 def initialize(loaders, loader_query); end - # source://activerecord//lib/active_record/associations/preloader/association.rb#53 + # source://activerecord//lib/active_record/associations/preloader/association.rb#70 def records; end private - # source://activerecord//lib/active_record/associations/preloader/association.rb#80 + # source://activerecord//lib/active_record/associations/preloader/association.rb#97 def already_loaded_records; end # Returns the value of attribute already_loaded_records_by_key. # - # source://activerecord//lib/active_record/associations/preloader/association.rb#58 + # source://activerecord//lib/active_record/associations/preloader/association.rb#75 def already_loaded_records_by_key; end # Returns the value of attribute keys_to_load. # - # source://activerecord//lib/active_record/associations/preloader/association.rb#58 + # source://activerecord//lib/active_record/associations/preloader/association.rb#75 def keys_to_load; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#74 + # source://activerecord//lib/active_record/associations/preloader/association.rb#91 def load_records; end # Returns the value of attribute loader_query. # - # source://activerecord//lib/active_record/associations/preloader/association.rb#58 + # source://activerecord//lib/active_record/associations/preloader/association.rb#75 def loader_query; end # Returns the value of attribute loaders. # - # source://activerecord//lib/active_record/associations/preloader/association.rb#58 + # source://activerecord//lib/active_record/associations/preloader/association.rb#75 def loaders; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#60 + # source://activerecord//lib/active_record/associations/preloader/association.rb#77 def populate_keys_to_load_and_already_loaded_records; end end @@ -5623,6 +5853,8 @@ class ActiveRecord::Associations::SingularAssociation < ::ActiveRecord::Associat private + # @raise [RecordInvalid] + # # source://activerecord//lib/active_record/associations/singular_association.rb#56 def _create_record(attributes, raise_error = T.unsafe(nil), &block); end @@ -5650,7 +5882,7 @@ module ActiveRecord::Associations::ThroughAssociation private - # source://activerecord//lib/active_record/associations/through_association.rb#109 + # source://activerecord//lib/active_record/associations/through_association.rb#116 def build_record(attributes); end # Construct attributes for :through pointing to owner and associate. This is used by the @@ -5666,24 +5898,24 @@ module ActiveRecord::Associations::ThroughAssociation # situation it is more natural for the user to just create or modify their join records # directly as required. # - # source://activerecord//lib/active_record/associations/through_association.rb#53 + # source://activerecord//lib/active_record/associations/through_association.rb#57 def construct_join_attributes(*records); end - # source://activerecord//lib/active_record/associations/through_association.rb#89 + # source://activerecord//lib/active_record/associations/through_association.rb#96 def ensure_mutable; end - # source://activerecord//lib/active_record/associations/through_association.rb#99 + # source://activerecord//lib/active_record/associations/through_association.rb#106 def ensure_not_nested; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/through_association.rb#85 + # source://activerecord//lib/active_record/associations/through_association.rb#90 def foreign_key_present?; end # Note: this does not capture all cases, for example it would be impractical # to try to properly support stale-checking for nested associations. # - # source://activerecord//lib/active_record/associations/through_association.rb#79 + # source://activerecord//lib/active_record/associations/through_association.rb#82 def stale_state; end # We merge in these scopes for two reasons: @@ -5691,14 +5923,17 @@ module ActiveRecord::Associations::ThroughAssociation # 1. To get the default_scope conditions for any of the other reflections in the chain # 2. To get the type conditions for any STI models in the chain # - # source://activerecord//lib/active_record/associations/through_association.rb#30 + # source://activerecord//lib/active_record/associations/through_association.rb#34 def target_scope; end - # source://activerecord//lib/active_record/associations/through_association.rb#22 + # source://activerecord//lib/active_record/associations/through_association.rb#26 def through_association; end - # source://activerecord//lib/active_record/associations/through_association.rb#10 + # source://activerecord//lib/active_record/associations/through_association.rb#14 def through_reflection; end + + # source://activerecord//lib/active_record/associations/through_association.rb#10 + def transaction(&block); end end # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#4 @@ -5763,17 +5998,17 @@ end # AsynchronousQueryInsideTransactionError will be raised when attempting # to perform an asynchronous query from inside a transaction # -# source://activerecord//lib/active_record/errors.rb#426 +# source://activerecord//lib/active_record/errors.rb#509 class ActiveRecord::AsynchronousQueryInsideTransactionError < ::ActiveRecord::ActiveRecordError; end -# source://activerecord//lib/active_record/attribute_assignment.rb#6 +# source://activerecord//lib/active_record/attribute_assignment.rb#4 module ActiveRecord::AttributeAssignment include ::ActiveModel::ForbiddenAttributesProtection include ::ActiveModel::AttributeAssignment private - # source://activerecord//lib/active_record/attribute_assignment.rb#10 + # source://activerecord//lib/active_record/attribute_assignment.rb#8 def _assign_attributes(attributes); end # Instantiates objects for all attribute classes that needs more than one constructor parameter. This is done @@ -5783,24 +6018,24 @@ module ActiveRecord::AttributeAssignment # parentheses to have the parameters typecasted before they're used in the constructor. Use i for Integer and # f for Float. If all the values for a given attribute are empty, the attribute will be set to +nil+. # - # source://activerecord//lib/active_record/attribute_assignment.rb#40 + # source://activerecord//lib/active_record/attribute_assignment.rb#38 def assign_multiparameter_attributes(pairs); end # Assign any deferred nested attributes after the base attributes have been set. # - # source://activerecord//lib/active_record/attribute_assignment.rb#30 + # source://activerecord//lib/active_record/attribute_assignment.rb#28 def assign_nested_parameter_attributes(pairs); end - # source://activerecord//lib/active_record/attribute_assignment.rb#46 + # source://activerecord//lib/active_record/attribute_assignment.rb#44 def execute_callstack_for_multiparameter_attributes(callstack); end - # source://activerecord//lib/active_record/attribute_assignment.rb#64 + # source://activerecord//lib/active_record/attribute_assignment.rb#62 def extract_callstack_for_multiparameter_attributes(pairs); end - # source://activerecord//lib/active_record/attribute_assignment.rb#82 + # source://activerecord//lib/active_record/attribute_assignment.rb#80 def find_parameter_position(multiparameter_name); end - # source://activerecord//lib/active_record/attribute_assignment.rb#78 + # source://activerecord//lib/active_record/attribute_assignment.rb#76 def type_cast_attribute_value(multiparameter_name, value); end end @@ -5808,21 +6043,21 @@ end # {ActiveRecord::Base#attributes=}[rdoc-ref:AttributeAssignment#attributes=] method. # The exception has an +attribute+ property that is the name of the offending attribute. # -# source://activerecord//lib/active_record/errors.rb#352 +# source://activerecord//lib/active_record/errors.rb#422 class ActiveRecord::AttributeAssignmentError < ::ActiveRecord::ActiveRecordError # @return [AttributeAssignmentError] a new instance of AttributeAssignmentError # - # source://activerecord//lib/active_record/errors.rb#355 + # source://activerecord//lib/active_record/errors.rb#425 def initialize(message = T.unsafe(nil), exception = T.unsafe(nil), attribute = T.unsafe(nil)); end # Returns the value of attribute attribute. # - # source://activerecord//lib/active_record/errors.rb#353 + # source://activerecord//lib/active_record/errors.rb#423 def attribute; end # Returns the value of attribute exception. # - # source://activerecord//lib/active_record/errors.rb#353 + # source://activerecord//lib/active_record/errors.rb#423 def exception; end end @@ -5851,46 +6086,49 @@ module ActiveRecord::AttributeMethods mixes_in_class_methods ::ActiveRecord::AttributeMethods::Write::ClassMethods mixes_in_class_methods ::ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods mixes_in_class_methods ::ActiveRecord::AttributeMethods::TimeZoneConversion::ClassMethods - mixes_in_class_methods ::ActiveRecord::AttributeMethods::Dirty::ClassMethods mixes_in_class_methods ::ActiveRecord::AttributeMethods::Serialization::ClassMethods - # Returns the value of the attribute identified by attr_name after it has been typecast (for example, - # "2004-12-12" in a date column is cast to a date object, like Date.new(2004, 12, 12)). It raises - # ActiveModel::MissingAttributeError if the identified attribute is missing. - # - # Note: +:id+ is always present. + # Returns the value of the attribute identified by +attr_name+ after it has + # been type cast. (For information about specific type casting behavior, see + # the types under ActiveModel::Type.) # # class Person < ActiveRecord::Base # belongs_to :organization # end # - # person = Person.new(name: 'Francesco', age: '22') - # person[:name] # => "Francesco" - # person[:age] # => 22 + # person = Person.new(name: "Francesco", date_of_birth: "2004-12-12") + # person[:name] # => "Francesco" + # person[:date_of_birth] # => Date.new(2004, 12, 12) + # person[:organization_id] # => nil + # + # Raises ActiveModel::MissingAttributeError if the attribute is missing. + # Note, however, that the +id+ attribute will never be considered missing. # - # person = Person.select('id').first - # person[:name] # => ActiveModel::MissingAttributeError: missing attribute: name - # person[:organization_id] # => ActiveModel::MissingAttributeError: missing attribute: organization_id + # person = Person.select(:name).first + # person[:name] # => "Francesco" + # person[:date_of_birth] # => ActiveModel::MissingAttributeError: missing attribute 'date_of_birth' for Person + # person[:organization_id] # => ActiveModel::MissingAttributeError: missing attribute 'organization_id' for Person + # person[:id] # => nil # - # source://activerecord//lib/active_record/attribute_methods.rb#329 + # source://activerecord//lib/active_record/attribute_methods.rb#412 def [](attr_name); end - # Updates the attribute identified by attr_name with the specified +value+. + # Updates the attribute identified by +attr_name+ using the specified + # +value+. The attribute value will be type cast upon being read. # # class Person < ActiveRecord::Base # end # # person = Person.new - # person[:age] = '22' - # person[:age] # => 22 - # person[:age].class # => Integer + # person[:date_of_birth] = "2004-12-12" + # person[:date_of_birth] # => Date.new(2004, 12, 12) # - # source://activerecord//lib/active_record/attribute_methods.rb#342 + # source://activerecord//lib/active_record/attribute_methods.rb#425 def []=(attr_name, value); end # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods.rb#240 + # source://activerecord//lib/active_record/attribute_methods.rb#319 def _has_attribute?(attr_name); end # Returns the name of all database fields which have been read from this @@ -5922,7 +6160,7 @@ module ActiveRecord::AttributeMethods # end # end # - # source://activerecord//lib/active_record/attribute_methods.rb#374 + # source://activerecord//lib/active_record/attribute_methods.rb#457 def accessed_fields; end # Returns an #inspect-like string for the value of the @@ -5941,7 +6179,7 @@ module ActiveRecord::AttributeMethods # person.attribute_for_inspect(:tag_ids) # # => "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]" # - # source://activerecord//lib/active_record/attribute_methods.rb#283 + # source://activerecord//lib/active_record/attribute_methods.rb#362 def attribute_for_inspect(attr_name); end # Returns an array of names for the attributes available on this object. @@ -5953,7 +6191,7 @@ module ActiveRecord::AttributeMethods # person.attribute_names # # => ["id", "created_at", "updated_at", "name", "age"] # - # source://activerecord//lib/active_record/attribute_methods.rb#252 + # source://activerecord//lib/active_record/attribute_methods.rb#331 def attribute_names; end # Returns +true+ if the specified +attribute+ has been set by the user or by a @@ -5974,7 +6212,7 @@ module ActiveRecord::AttributeMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods.rb#305 + # source://activerecord//lib/active_record/attribute_methods.rb#384 def attribute_present?(attr_name); end # Returns a hash of all the attributes with their names as keys and the values of the attributes as values. @@ -5986,7 +6224,7 @@ module ActiveRecord::AttributeMethods # person.attributes # # => {"id"=>3, "created_at"=>Sun, 21 Oct 2012 04:53:04, "updated_at"=>Sun, 21 Oct 2012 04:53:04, "name"=>"Francesco", "age"=>22} # - # source://activerecord//lib/active_record/attribute_methods.rb#264 + # source://activerecord//lib/active_record/attribute_methods.rb#343 def attributes; end # Returns +true+ if the given attribute is in the attributes hash, otherwise +false+. @@ -6003,7 +6241,7 @@ module ActiveRecord::AttributeMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods.rb#234 + # source://activerecord//lib/active_record/attribute_methods.rb#313 def has_attribute?(attr_name); end # A Person object with a name attribute can ask person.respond_to?(:name), @@ -6025,36 +6263,36 @@ module ActiveRecord::AttributeMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods.rb#207 + # source://activerecord//lib/active_record/attribute_methods.rb#286 def respond_to?(name, include_private = T.unsafe(nil)); end private # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods.rb#379 + # source://activerecord//lib/active_record/attribute_methods.rb#462 def attribute_method?(attr_name); end # Filters out the virtual columns and also primary keys, from the attribute names, when the primary # key is to be generated (e.g. the id attribute has no value). # - # source://activerecord//lib/active_record/attribute_methods.rb#399 + # source://activerecord//lib/active_record/attribute_methods.rb#483 def attributes_for_create(attribute_names); end # Filters the primary keys, readonly attributes and virtual columns from the attribute names. # - # source://activerecord//lib/active_record/attribute_methods.rb#389 + # source://activerecord//lib/active_record/attribute_methods.rb#472 def attributes_for_update(attribute_names); end - # source://activerecord//lib/active_record/attribute_methods.rb#384 + # source://activerecord//lib/active_record/attribute_methods.rb#467 def attributes_with_values(attribute_names); end - # source://activerecord//lib/active_record/attribute_methods.rb#407 + # source://activerecord//lib/active_record/attribute_methods.rb#491 def format_for_inspect(name, value); end # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods.rb#423 + # source://activerecord//lib/active_record/attribute_methods.rb#507 def pk_attribute?(name); end class << self @@ -6066,9 +6304,12 @@ module ActiveRecord::AttributeMethods def attribute_aliases; end def attribute_aliases=(value); end def attribute_aliases?; end - def attribute_method_matchers; end - def attribute_method_matchers=(value); end - def attribute_method_matchers?; end + def attribute_method_patterns; end + def attribute_method_patterns=(value); end + def attribute_method_patterns?; end + def default_column_serializer; end + def default_column_serializer=(value); end + def default_column_serializer?; end def partial_inserts; end def partial_inserts=(value); end def partial_inserts?; end @@ -6089,8 +6330,8 @@ module ActiveRecord::AttributeMethods module GeneratedInstanceMethods def attribute_aliases; end def attribute_aliases?; end - def attribute_method_matchers; end - def attribute_method_matchers?; end + def attribute_method_patterns; end + def attribute_method_patterns?; end def partial_inserts; end def partial_inserts?; end def partial_updates; end @@ -6143,12 +6384,12 @@ module ActiveRecord::AttributeMethods::BeforeTypeCast # task.attributes_before_type_cast # # => {"id"=>nil, "title"=>nil, "is_done"=>true, "completed_on"=>"2012-10-21", "created_at"=>nil, "updated_at"=>nil} # - # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#65 + # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#82 def attributes_before_type_cast; end # Returns a hash of attributes for assignment to the database. # - # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#70 + # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#87 def attributes_for_database; end # Returns the value of the attribute identified by +attr_name+ before @@ -6167,29 +6408,49 @@ module ActiveRecord::AttributeMethods::BeforeTypeCast # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#48 def read_attribute_before_type_cast(attr_name); end + # Returns the value of the attribute identified by +attr_name+ after + # serialization. + # + # class Book < ActiveRecord::Base + # enum :status, { draft: 1, published: 2 } + # end + # + # book = Book.new(status: "published") + # book.read_attribute(:status) # => "published" + # book.read_attribute_for_database(:status) # => 2 + # + # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#65 + def read_attribute_for_database(attr_name); end + private # Dispatch target for *_before_type_cast attribute methods. # - # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#76 + # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#93 def attribute_before_type_cast(attr_name); end # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#84 + # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#101 def attribute_came_from_user?(attr_name); end - # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#80 + # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#97 def attribute_for_database(attr_name); end end -# source://activerecord//lib/active_record/attribute_methods.rb#41 +# source://activerecord//lib/active_record/attribute_methods.rb#42 module ActiveRecord::AttributeMethods::ClassMethods # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods.rb#186 + # source://activerecord//lib/active_record/attribute_methods.rb#255 def _has_attribute?(attr_name); end + # source://activerecord//lib/active_record/attribute_methods.rb#53 + def alias_attribute(new_name, old_name); end + + # source://activerecord//lib/active_record/attribute_methods.rb#85 + def alias_attribute_method_definition(code_generator, pattern, new_name, old_name); end + # Returns +true+ if +attribute+ is an attribute method and table exists, # +false+ otherwise. # @@ -6202,7 +6463,7 @@ module ActiveRecord::AttributeMethods::ClassMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods.rb#150 + # source://activerecord//lib/active_record/attribute_methods.rb#219 def attribute_method?(attribute); end # Returns an array of column names as strings if it's not an abstract class and @@ -6214,7 +6475,7 @@ module ActiveRecord::AttributeMethods::ClassMethods # Person.attribute_names # # => ["id", "created_at", "updated_at", "name", "age"] # - # source://activerecord//lib/active_record/attribute_methods.rb#162 + # source://activerecord//lib/active_record/attribute_methods.rb#231 def attribute_names; end # A method name is 'dangerous' if it is already (re)defined by Active Record, but @@ -6222,7 +6483,7 @@ module ActiveRecord::AttributeMethods::ClassMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods.rb#109 + # source://activerecord//lib/active_record/attribute_methods.rb#178 def dangerous_attribute_method?(name); end # A class method is 'dangerous' if it is already (re)defined by Active Record, but @@ -6230,15 +6491,21 @@ module ActiveRecord::AttributeMethods::ClassMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods.rb#127 + # source://activerecord//lib/active_record/attribute_methods.rb#196 def dangerous_class_method?(method_name); end # Generates all the attribute related methods for columns in the database # accessors, mutators and query methods. # - # source://activerecord//lib/active_record/attribute_methods.rb#58 + # source://activerecord//lib/active_record/attribute_methods.rb#126 def define_attribute_methods; end + # source://activerecord//lib/active_record/attribute_methods.rb#63 + def eagerly_generate_alias_attribute_methods(_new_name, _old_name); end + + # source://activerecord//lib/active_record/attribute_methods.rb#67 + def generate_alias_attributes; end + # Returns true if the given attribute exists, otherwise false. # # class Person < ActiveRecord::Base @@ -6252,13 +6519,10 @@ module ActiveRecord::AttributeMethods::ClassMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods.rb#180 + # source://activerecord//lib/active_record/attribute_methods.rb#249 def has_attribute?(attr_name); end - # source://activerecord//lib/active_record/attribute_methods.rb#42 - def inherited(child_class); end - - # source://activerecord//lib/active_record/attribute_methods.rb#47 + # source://activerecord//lib/active_record/attribute_methods.rb#43 def initialize_generated_modules; end # Raises an ActiveRecord::DangerousAttributeError exception when an @@ -6278,19 +6542,57 @@ module ActiveRecord::AttributeMethods::ClassMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods.rb#91 + # source://activerecord//lib/active_record/attribute_methods.rb#160 def instance_method_already_implemented?(method_name); end # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods.rb#113 + # source://activerecord//lib/active_record/attribute_methods.rb#182 def method_defined_within?(name, klass, superklass = T.unsafe(nil)); end - # source://activerecord//lib/active_record/attribute_methods.rb#70 + # source://activerecord//lib/active_record/attribute_methods.rb#138 def undefine_attribute_methods; end + + private + + # source://activerecord//lib/active_record/attribute_methods.rb#260 + def inherited(child_class); end end -# source://activerecord//lib/active_record/attribute_methods/dirty.rb#7 +# = Active Record Attribute Methods \Dirty +# +# Provides a way to track changes in your Active Record models. It adds all +# methods from ActiveModel::Dirty and adds database-specific methods. +# +# A newly created +Person+ object is unchanged: +# +# class Person < ActiveRecord::Base +# end +# +# person = Person.create(name: "Allison") +# person.changed? # => false +# +# Change the name: +# +# person.name = 'Alice' +# person.name_in_database # => "Allison" +# person.will_save_change_to_name? # => true +# person.name_change_to_be_saved # => ["Allison", "Alice"] +# person.changes_to_save # => {"name"=>["Allison", "Alice"]} +# +# Save the changes: +# +# person.save +# person.name_in_database # => "Alice" +# person.saved_change_to_name? # => true +# person.saved_change_to_name # => ["Allison", "Alice"] +# person.name_before_last_change # => "Allison" +# +# Similar to ActiveModel::Dirty, methods can be invoked as +# +saved_change_to_name?+ or by passing an argument to the generic method +# saved_change_to_attribute?("name"). +# +# source://activerecord//lib/active_record/attribute_methods/dirty.rb#39 module ActiveRecord::AttributeMethods::Dirty extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -6299,7 +6601,6 @@ module ActiveRecord::AttributeMethods::Dirty mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods - mixes_in_class_methods ::ActiveRecord::AttributeMethods::Dirty::ClassMethods # Returns the original value of an attribute before the last save. # @@ -6308,7 +6609,7 @@ module ActiveRecord::AttributeMethods::Dirty # invoked as +name_before_last_save+ instead of # attribute_before_last_save("name"). # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#100 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#108 def attribute_before_last_save(attr_name); end # Returns the change to an attribute that will be persisted during the @@ -6322,7 +6623,7 @@ module ActiveRecord::AttributeMethods::Dirty # If the attribute will change, the result will be an array containing the # original value and the new value about to be saved. # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#142 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#152 def attribute_change_to_be_saved(attr_name); end # Returns the value of an attribute in the database, as opposed to the @@ -6334,7 +6635,7 @@ module ActiveRecord::AttributeMethods::Dirty # saved. It can be invoked as +name_in_database+ instead of # attribute_in_database("name"). # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#154 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#164 def attribute_in_database(attr_name); end # Returns a hash of the attributes that will change when the record is @@ -6344,31 +6645,31 @@ module ActiveRecord::AttributeMethods::Dirty # original attribute values in the database (as opposed to the in-memory # values about to be saved). # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#181 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#191 def attributes_in_database; end # Returns an array of the names of any attributes that will change when # the record is next saved. # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#171 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#181 def changed_attribute_names_to_save; end # Returns a hash containing all the changes that will be persisted during # the next save. # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#165 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#175 def changes_to_save; end # Will the next call to +save+ have any changes to persist? # # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#159 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#169 def has_changes_to_save?; end # reload the record and clears changed attributes. # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#57 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#63 def reload(*_arg0); end # Returns the change to an attribute during the last save. If the @@ -6380,7 +6681,7 @@ module ActiveRecord::AttributeMethods::Dirty # invoked as +saved_change_to_name+ instead of # saved_change_to_attribute("name"). # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#90 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#98 def saved_change_to_attribute(attr_name); end # Did this attribute change when we last saved? @@ -6392,27 +6693,29 @@ module ActiveRecord::AttributeMethods::Dirty # # ==== Options # - # +from+ When passed, this method will return false unless the original - # value is equal to the given option + # [+from+] + # When specified, this method will return false unless the original + # value is equal to the given value. # - # +to+ When passed, this method will return false unless the value was - # changed to the given value + # [+to+] + # When specified, this method will return false unless the value will be + # changed to the given value. # # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#78 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#86 def saved_change_to_attribute?(attr_name, **options); end # Returns a hash containing all the changes that were just saved. # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#110 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#118 def saved_changes; end # Did the last call to +save+ have any changes to change? # # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#105 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#113 def saved_changes?; end # Will this attribute change the next time we save? @@ -6424,41 +6727,46 @@ module ActiveRecord::AttributeMethods::Dirty # # ==== Options # - # +from+ When passed, this method will return false unless the original - # value is equal to the given option + # [+from+] + # When specified, this method will return false unless the original + # value is equal to the given value. # - # +to+ When passed, this method will return false unless the value will be - # changed to the given value + # [+to+] + # When specified, this method will return false unless the value will be + # changed to the given value. # # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#128 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#138 def will_save_change_to_attribute?(attr_name, **options); end private - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#221 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#239 def _create_record(attribute_names = T.unsafe(nil)); end - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#186 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#204 def _touch_row(attribute_names, time); end - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#215 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#233 def _update_record(attribute_names = T.unsafe(nil)); end - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#231 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#249 def attribute_names_for_partial_inserts; end - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#227 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#245 def attribute_names_for_partial_updates; end + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#196 + def init_internals; end + module GeneratedClassMethods def attribute_aliases; end def attribute_aliases=(value); end def attribute_aliases?; end - def attribute_method_matchers; end - def attribute_method_matchers=(value); end - def attribute_method_matchers?; end + def attribute_method_patterns; end + def attribute_method_patterns=(value); end + def attribute_method_patterns?; end def partial_inserts; end def partial_inserts=(value); end def partial_inserts?; end @@ -6470,8 +6778,8 @@ module ActiveRecord::AttributeMethods::Dirty module GeneratedInstanceMethods def attribute_aliases; end def attribute_aliases?; end - def attribute_method_matchers; end - def attribute_method_matchers?; end + def attribute_method_patterns; end + def attribute_method_patterns?; end def partial_inserts; end def partial_inserts?; end def partial_updates; end @@ -6479,115 +6787,119 @@ module ActiveRecord::AttributeMethods::Dirty end end -# source://activerecord//lib/active_record/attribute_methods/dirty.rb#30 -module ActiveRecord::AttributeMethods::Dirty::ClassMethods - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#31 - def partial_writes; end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#47 - def partial_writes=(value); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#39 - def partial_writes?; end -end - # source://activerecord//lib/active_record/attribute_methods.rb#26 class ActiveRecord::AttributeMethods::GeneratedAttributeMethods < ::Module include ::Mutex_m - # source://mutex_m/0.1.2/mutex_m.rb#93 + # source://mutex_m/0.2.0/lib/mutex_m.rb#91 def lock; end - # source://mutex_m/0.1.2/mutex_m.rb#83 + # source://mutex_m/0.2.0/lib/mutex_m.rb#81 def locked?; end - # source://mutex_m/0.1.2/mutex_m.rb#78 + # source://mutex_m/0.2.0/lib/mutex_m.rb#76 def synchronize(&block); end - # source://mutex_m/0.1.2/mutex_m.rb#88 + # source://mutex_m/0.2.0/lib/mutex_m.rb#86 def try_lock; end - # source://mutex_m/0.1.2/mutex_m.rb#98 + # source://mutex_m/0.2.0/lib/mutex_m.rb#96 def unlock; end end -# source://activerecord//lib/active_record/attribute_methods/primary_key.rb#7 +# = Active Record Attribute Methods Primary Key +# +# source://activerecord//lib/active_record/attribute_methods/primary_key.rb#8 module ActiveRecord::AttributeMethods::PrimaryKey extend ::ActiveSupport::Concern mixes_in_class_methods ::ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods - # Returns the primary key column's value. + # Returns the primary key column's value. If the primary key is composite, + # returns an array of the primary key column values. # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#18 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#20 def id; end - # Sets the primary key column's value. + # Sets the primary key column's value. If the primary key is composite, + # raises TypeError when the set value not enumerable. # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#23 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#34 def id=(value); end - # Queries the primary key column's value. + # Queries the primary key column's value. If the primary key is composite, + # all primary key column values must be queryable. # # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#28 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#45 def id?; end - # Returns the primary key column's value before type cast. + # Returns the primary key column's value before type cast. If the primary key is composite, + # returns an array of primary key column values before type cast. # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#33 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#55 def id_before_type_cast; end - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#47 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#83 def id_for_database; end - # Returns the primary key column's value from the database. + # Returns the primary key column's value from the database. If the primary key is composite, + # returns an array of primary key column values from database. # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#43 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#75 def id_in_database; end - # Returns the primary key column's previous value. + # Returns the primary key column's previous value. If the primary key is composite, + # returns an array of primary key column previous values. # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#38 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#65 def id_was; end + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#26 + def primary_key_values_present?; end + # Returns this record's primary key value wrapped in an array if one is # available. # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#12 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#13 def to_key; end private # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#52 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#92 def attribute_method?(attr_name); end end -# source://activerecord//lib/active_record/attribute_methods/primary_key.rb#56 +# source://activerecord//lib/active_record/attribute_methods/primary_key.rb#96 module ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#63 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#118 + def composite_primary_key?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#104 def dangerous_attribute_method?(method_name); end - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#89 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#136 def get_primary_key(base_name); end # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#59 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#100 def instance_method_already_implemented?(method_name); end # Defines the primary key field -- can be overridden in subclasses. # Overwriting will negate any effect of the +primary_key_prefix_type+ # setting, though. # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#70 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#111 def primary_key; end # Sets the name of the primary key column. @@ -6606,44 +6918,60 @@ module ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods # # Project.primary_key # => "foo_id" # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#119 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#165 def primary_key=(value); end # Returns a quoted version of the primary key name, used to construct # SQL statements. # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#77 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#124 def quoted_primary_key; end - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#81 + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#128 def reset_primary_key; end private - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#126 - def suppress_composite_primary_key(pk); end + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#172 + def derive_primary_key(value); end + + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#180 + def inherited(base); end end -# source://activerecord//lib/active_record/attribute_methods/primary_key.rb#57 +# source://activerecord//lib/active_record/attribute_methods/primary_key.rb#97 ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods::ID_ATTRIBUTE_METHODS = T.let(T.unsafe(nil), Set) -# source://activerecord//lib/active_record/attribute_methods/query.rb#5 +# source://activerecord//lib/active_record/attribute_methods/primary_key.rb#98 +ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods::PRIMARY_KEY_NOT_SET = T.let(T.unsafe(nil), BasicObject) + +# = Active Record Attribute Methods \Query +# +# source://activerecord//lib/active_record/attribute_methods/query.rb#6 module ActiveRecord::AttributeMethods::Query extend ::ActiveSupport::Concern - # source://activerecord//lib/active_record/attribute_methods/query.rb#12 + # source://activerecord//lib/active_record/attribute_methods/query.rb#19 + def _query_attribute(attr_name); end + + # source://activerecord//lib/active_record/attribute_methods/query.rb#13 def query_attribute(attr_name); end private - # source://activerecord//lib/active_record/attribute_methods/query.rb#12 + # source://activerecord//lib/active_record/attribute_methods/query.rb#13 def attribute?(attr_name); end + + # source://activerecord//lib/active_record/attribute_methods/query.rb#29 + def query_cast_attribute(attr_name, value); end end # source://activerecord//lib/active_record/attribute_methods.rb#24 ActiveRecord::AttributeMethods::RESTRICTED_CLASS_METHODS = T.let(T.unsafe(nil), Array) -# source://activerecord//lib/active_record/attribute_methods/read.rb#5 +# = Active Record Attribute Methods \Read +# +# source://activerecord//lib/active_record/attribute_methods/read.rb#6 module ActiveRecord::AttributeMethods::Read extend ::ActiveSupport::Concern @@ -6652,14 +6980,15 @@ module ActiveRecord::AttributeMethods::Read # This method exists to avoid the expensive primary_key check internally, without # breaking compatibility with the read_attribute API # - # source://activerecord//lib/active_record/attribute_methods/read.rb#37 + # source://activerecord//lib/active_record/attribute_methods/read.rb#50 def _read_attribute(attr_name, &block); end - # Returns the value of the attribute identified by attr_name after - # it has been typecast (for example, "2004-12-12" in a date column is cast - # to a date object, like Date.new(2004, 12, 12)). + # Returns the value of the attribute identified by +attr_name+ after it + # has been type cast. For example, a date attribute will cast "2004-12-12" + # to Date.new(2004, 12, 12). (For information about specific type + # casting behavior, see the types under ActiveModel::Type.) # - # source://activerecord//lib/active_record/attribute_methods/read.rb#27 + # source://activerecord//lib/active_record/attribute_methods/read.rb#29 def read_attribute(attr_name, &block); end private @@ -6667,26 +6996,38 @@ module ActiveRecord::AttributeMethods::Read # This method exists to avoid the expensive primary_key check internally, without # breaking compatibility with the read_attribute API # - # source://activerecord//lib/active_record/attribute_methods/read.rb#37 + # source://activerecord//lib/active_record/attribute_methods/read.rb#50 def attribute(attr_name, &block); end end -# source://activerecord//lib/active_record/attribute_methods/read.rb#8 +# source://activerecord//lib/active_record/attribute_methods/read.rb#9 module ActiveRecord::AttributeMethods::Read::ClassMethods private - # source://activerecord//lib/active_record/attribute_methods/read.rb#10 + # source://activerecord//lib/active_record/attribute_methods/read.rb#11 def define_method_attribute(name, owner:); end end -# source://activerecord//lib/active_record/attribute_methods/serialization.rb#5 +# = Active Record Attribute Methods \Serialization +# +# source://activerecord//lib/active_record/attribute_methods/serialization.rb#6 module ActiveRecord::AttributeMethods::Serialization extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActiveRecord::AttributeMethods::Serialization::ClassMethods + + module GeneratedClassMethods + def default_column_serializer; end + def default_column_serializer=(value); end + def default_column_serializer?; end + end + + module GeneratedInstanceMethods; end end -# source://activerecord//lib/active_record/attribute_methods/serialization.rb#18 +# source://activerecord//lib/active_record/attribute_methods/serialization.rb#23 module ActiveRecord::AttributeMethods::Serialization::ClassMethods # If you have an attribute that needs to be saved to the database as a # serialized object, and retrieved by deserializing into the same object, @@ -6708,21 +7049,19 @@ module ActiveRecord::AttributeMethods::Serialization::ClassMethods # ==== Parameters # # * +attr_name+ - The name of the attribute to serialize. - # * +class_name_or_coder+ - Optional. May be one of the following: - # * default - The attribute value will be serialized as YAML. - # The attribute value must respond to +to_yaml+. - # * +Array+ - The attribute value will be serialized as YAML, but an - # empty +Array+ will be serialized as +NULL+. The attribute value - # must be an +Array+. - # * +Hash+ - The attribute value will be serialized as YAML, but an - # empty +Hash+ will be serialized as +NULL+. The attribute value - # must be a +Hash+. - # * +JSON+ - The attribute value will be serialized as JSON. The - # attribute value must respond to +to_json+. - # * custom coder - The attribute value will be serialized + # * +coder+ The serializer implementation to use, e.g. +JSON+. + # * The attribute value will be serialized # using the coder's dump(value) method, and will be # deserialized using the coder's load(string) method. The # +dump+ method may return +nil+ to serialize the value as +NULL+. + # * +type+ - Optional. What the type of the serialized object should be. + # * Attempting to serialize another type will raise an + # ActiveRecord::SerializationTypeMismatch error. + # * If the column is +NULL+ or starting from a new record, the default value + # will set to +type.new+ + # * +yaml+ - Optional. Yaml specific options. The allowed config is: + # * +:permitted_classes+ - +Array+ with the permitted classes. + # * +:unsafe_load+ - Unsafely load YAML blobs, allow YAML to load any class. # # ==== Options # @@ -6730,24 +7069,101 @@ module ActiveRecord::AttributeMethods::Serialization::ClassMethods # this option is not passed, the previous default value (if any) will # be used. Otherwise, the default will be +nil+. # + # ==== Choosing a serializer + # + # While any serialization format can be used, it is recommended to carefully + # evaluate the properties of a serializer before using it, as migrating to + # another format later on can be difficult. + # + # ===== Avoid accepting arbitrary types + # + # When serializing data in a column, it is heavily recommended to make sure + # only expected types will be serialized. For instance some serializer like + # +Marshal+ or +YAML+ are capable of serializing almost any Ruby object. + # + # This can lead to unexpected types being serialized, and it is important + # that type serialization remains backward and forward compatible as long + # as some database records still contain these serialized types. + # + # class Address + # def initialize(line, city, country) + # @line, @city, @country = line, city, country + # end + # end + # + # In the above example, if any of the +Address+ attributes is renamed, + # instances that were persisted before the change will be loaded with the + # old attributes. This problem is even worse when the serialized type comes + # from a dependency which doesn't expect to be serialized this way and may + # change its internal representation without notice. + # + # As such, it is heavily recommended to instead convert these objects into + # primitives of the serialization format, for example: + # + # class Address + # attr_reader :line, :city, :country + # + # def self.load(payload) + # data = YAML.safe_load(payload) + # new(data["line"], data["city"], data["country"]) + # end + # + # def self.dump(address) + # YAML.safe_dump( + # "line" => address.line, + # "city" => address.city, + # "country" => address.country, + # ) + # end + # + # def initialize(line, city, country) + # @line, @city, @country = line, city, country + # end + # end + # + # class User < ActiveRecord::Base + # serialize :address, coder: Address + # end + # + # This pattern allows to be more deliberate about what is serialized, and + # to evolve the format in a backward compatible way. + # + # ===== Ensure serialization stability + # + # Some serialization methods may accept some types they don't support by + # silently casting them to other types. This can cause bugs when the + # data is deserialized. + # + # For instance the +JSON+ serializer provided in the standard library will + # silently cast unsupported types to +String+: + # + # >> JSON.parse(JSON.dump(Struct.new(:foo))) + # => "#" + # # ==== Examples # # ===== Serialize the +preferences+ attribute using YAML # # class User < ActiveRecord::Base - # serialize :preferences + # serialize :preferences, coder: YAML # end # # ===== Serialize the +preferences+ attribute using JSON # # class User < ActiveRecord::Base - # serialize :preferences, JSON + # serialize :preferences, coder: JSON # end # # ===== Serialize the +preferences+ +Hash+ using YAML # # class User < ActiveRecord::Base - # serialize :preferences, Hash + # serialize :preferences, type: Hash, coder: YAML + # end + # + # ===== Serializes +preferences+ to YAML, permitting select classes + # + # class User < ActiveRecord::Base + # serialize :preferences, coder: YAML, yaml: { permitted_classes: [Symbol, Time] } # end # # ===== Serialize the +preferences+ attribute using a custom coder @@ -6769,25 +7185,28 @@ module ActiveRecord::AttributeMethods::Serialization::ClassMethods # end # # class User < ActiveRecord::Base - # serialize :preferences, Rot13JSON + # serialize :preferences, coder: Rot13JSON # end # - # source://activerecord//lib/active_record/attribute_methods/serialization.rb#103 - def serialize(attr_name, class_name_or_coder = T.unsafe(nil), **options); end + # source://activerecord//lib/active_record/attribute_methods/serialization.rb#183 + def serialize(attr_name, class_name_or_coder = T.unsafe(nil), coder: T.unsafe(nil), type: T.unsafe(nil), yaml: T.unsafe(nil), **options); end private + # source://activerecord//lib/active_record/attribute_methods/serialization.rb#228 + def build_column_serializer(attr_name, coder, type, yaml = T.unsafe(nil)); end + # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods/serialization.rb#126 - def type_incompatible_with_serialize?(type, class_name); end + # source://activerecord//lib/active_record/attribute_methods/serialization.rb#245 + def type_incompatible_with_serialize?(cast_type, coder, type); end end -# source://activerecord//lib/active_record/attribute_methods/serialization.rb#8 +# source://activerecord//lib/active_record/attribute_methods/serialization.rb#9 class ActiveRecord::AttributeMethods::Serialization::ColumnNotSerializableError < ::StandardError # @return [ColumnNotSerializableError] a new instance of ColumnNotSerializableError # - # source://activerecord//lib/active_record/attribute_methods/serialization.rb#9 + # source://activerecord//lib/active_record/attribute_methods/serialization.rb#10 def initialize(name, type); end end @@ -6859,7 +7278,9 @@ class ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter end end -# source://activerecord//lib/active_record/attribute_methods/write.rb#5 +# = Active Record Attribute Methods \Write +# +# source://activerecord//lib/active_record/attribute_methods/write.rb#6 module ActiveRecord::AttributeMethods::Write extend ::ActiveSupport::Concern @@ -6871,9 +7292,8 @@ module ActiveRecord::AttributeMethods::Write # source://activerecord//lib/active_record/attribute_methods/write.rb#41 def _write_attribute(attr_name, value); end - # Updates the attribute identified by attr_name with the - # specified +value+. Empty strings for Integer and Float columns are - # turned into +nil+. + # Updates the attribute identified by +attr_name+ using the specified + # +value+. The attribute value will be type cast upon being read. # # source://activerecord//lib/active_record/attribute_methods/write.rb#31 def write_attribute(attr_name, value); end @@ -6887,11 +7307,11 @@ module ActiveRecord::AttributeMethods::Write def attribute=(attr_name, value); end end -# source://activerecord//lib/active_record/attribute_methods/write.rb#12 +# source://activerecord//lib/active_record/attribute_methods/write.rb#13 module ActiveRecord::AttributeMethods::Write::ClassMethods private - # source://activerecord//lib/active_record/attribute_methods/write.rb#14 + # source://activerecord//lib/active_record/attribute_methods/write.rb#15 def define_method_attribute=(name, owner:); end end @@ -6914,6 +7334,8 @@ module ActiveRecord::Attributes module GeneratedInstanceMethods; end end +# = Active Record \Attributes +# # source://activerecord//lib/active_record/attributes.rb#14 module ActiveRecord::Attributes::ClassMethods # Defines an attribute with a type on this model. It will override the @@ -7098,10 +7520,10 @@ module ActiveRecord::Attributes::ClassMethods # end # # Product.where(price_in_bitcoins: Money.new(5, "USD")) - # # => SELECT * FROM products WHERE price_in_bitcoins = 0.02230 + # # SELECT * FROM products WHERE price_in_bitcoins = 0.02230 # # Product.where(price_in_bitcoins: Money.new(5, "GBP")) - # # => SELECT * FROM products WHERE price_in_bitcoins = 0.03412 + # # SELECT * FROM products WHERE price_in_bitcoins = 0.03412 # # ==== Dirty Tracking # @@ -7172,7 +7594,7 @@ ActiveRecord::Attributes::ClassMethods::NO_DEFAULT_PROVIDED = T.let(T.unsafe(nil # # Child records are validated unless :validate is +false+. # -# == Callbacks +# == \Callbacks # # Association with autosave option defines several callbacks on your # model (around_save, before_save, after_create, after_update). Please note that @@ -7334,32 +7756,32 @@ module ActiveRecord::AutosaveAssociation private - # source://activerecord//lib/active_record/autosave_association.rb#512 + # source://activerecord//lib/active_record/autosave_association.rb#554 def _ensure_no_duplicate_errors; end # If the record is new or it has changed, returns true. # # @return [Boolean] # - # source://activerecord//lib/active_record/autosave_association.rb#468 + # source://activerecord//lib/active_record/autosave_association.rb#475 def _record_changed?(reflection, record, key); end # Is used as an around_save callback to check while saving a collection # association whether or not the parent was a new record before saving. # - # source://activerecord//lib/active_record/autosave_association.rb#370 + # source://activerecord//lib/active_record/autosave_association.rb#371 def around_save_collection_association; end # Returns the record for an association collection that should be validated # or saved. If +autosave+ is +false+ only new records will be returned, # unless the parent is/was a new record itself. # - # source://activerecord//lib/active_record/autosave_association.rb#279 + # source://activerecord//lib/active_record/autosave_association.rb#284 def associated_records_to_validate_or_save(association, new_record, autosave); end # @return [Boolean] # - # source://activerecord//lib/active_record/autosave_association.rb#474 + # source://activerecord//lib/active_record/autosave_association.rb#482 def association_foreign_key_changed?(reflection, record, key); end # Returns whether or not the association is valid and applies any errors to @@ -7368,31 +7790,42 @@ module ActiveRecord::AutosaveAssociation # # @return [Boolean] # - # source://activerecord//lib/active_record/autosave_association.rb#330 + # source://activerecord//lib/active_record/autosave_association.rb#335 def association_valid?(reflection, record, index = T.unsafe(nil)); end + # source://activerecord//lib/active_record/autosave_association.rb#534 + def compute_primary_key(reflection, record); end + # @return [Boolean] # - # source://activerecord//lib/active_record/autosave_association.rb#508 + # source://activerecord//lib/active_record/autosave_association.rb#550 def custom_validation_context?; end + # source://activerecord//lib/active_record/autosave_association.rb#276 + def init_internals; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/autosave_association.rb#491 + def inverse_polymorphic_association_changed?(reflection, record); end + # Go through nested autosave associations that are loaded in memory (without loading # any new ones), and return true if any are changed for autosave. # Returns false if already called to prevent an infinite loop. # # @return [Boolean] # - # source://activerecord//lib/active_record/autosave_association.rb#292 + # source://activerecord//lib/active_record/autosave_association.rb#297 def nested_records_changed_for_autosave?; end - # source://activerecord//lib/active_record/autosave_association.rb#356 + # source://activerecord//lib/active_record/autosave_association.rb#361 def normalize_reflection_attribute(indexed_attribute, reflection, index, attribute); end # Saves the associated record if it's new or :autosave is enabled. # # In addition, it will destroy the association if it was marked for destruction. # - # source://activerecord//lib/active_record/autosave_association.rb#483 + # source://activerecord//lib/active_record/autosave_association.rb#502 def save_belongs_to_association(reflection); end # Saves any new associated records, or all loaded autosave associations if @@ -7404,7 +7837,7 @@ module ActiveRecord::AutosaveAssociation # This all happens inside a transaction, _if_ the Transactions module is included into # ActiveRecord::Base after the AutosaveAssociation module, which it does by default. # - # source://activerecord//lib/active_record/autosave_association.rb#387 + # source://activerecord//lib/active_record/autosave_association.rb#388 def save_collection_association(reflection); end # Saves the associated record if it's new or :autosave is enabled @@ -7416,20 +7849,20 @@ module ActiveRecord::AutosaveAssociation # This all happens inside a transaction, _if_ the Transactions module is included into # ActiveRecord::Base after the AutosaveAssociation module, which it does by default. # - # source://activerecord//lib/active_record/autosave_association.rb#441 + # source://activerecord//lib/active_record/autosave_association.rb#442 def save_has_one_association(reflection); end # Validate the associated records if :validate or # :autosave is turned on for the association specified by # +reflection+. # - # source://activerecord//lib/active_record/autosave_association.rb#319 + # source://activerecord//lib/active_record/autosave_association.rb#324 def validate_collection_association(reflection); end # Validate the association if :validate or :autosave is # turned on for the association. # - # source://activerecord//lib/active_record/autosave_association.rb#310 + # source://activerecord//lib/active_record/autosave_association.rb#315 def validate_single_association(reflection); end end @@ -7740,6 +8173,7 @@ end # source://activerecord//lib/active_record/base.rb#282 class ActiveRecord::Base include ::ActionText::Encryption + include ::ActiveModel::Access include ::ActiveRecord::Core include ::ActiveRecord::Persistence include ::ActiveRecord::ReadonlyAttributes @@ -7762,6 +8196,7 @@ class ActiveRecord::Base include ::ActiveRecord::Attributes include ::ActiveRecord::Locking::Optimistic include ::ActiveRecord::Locking::Pessimistic + include ::ActiveRecord::Encryption::EncryptableRecord include ::ActiveModel::AttributeMethods include ::ActiveRecord::AttributeMethods include ::ActiveRecord::Base::GeneratedAttributeMethods @@ -7780,6 +8215,7 @@ class ActiveRecord::Base include ::ActiveRecord::Timestamp include ::ActiveRecord::Associations include ::ActiveModel::SecurePassword + include ::ActiveRecord::SecurePassword include ::ActiveRecord::AutosaveAssociation include ::ActiveRecord::NestedAttributes include ::ActiveRecord::Transactions @@ -7791,9 +8227,11 @@ class ActiveRecord::Base include ::ActiveRecord::Serialization include ::ActiveRecord::Store include ::ActiveRecord::SecureToken + include ::ActiveRecord::TokenFor include ::ActiveRecord::SignedId include ::ActiveRecord::Suppressor - include ::ActiveRecord::Encryption::EncryptableRecord + include ::ActiveRecord::Normalization + include ::ActiveRecord::Marshalling::Methods include ::MoneyColumn::ActiveRecordHooks include ::ActiveStorage::Attached::Model include ::ActiveStorage::Reflection::ActiveRecordExtensions @@ -7831,19 +8269,20 @@ class ActiveRecord::Base extend ::ActiveRecord::CounterCache::ClassMethods extend ::ActiveRecord::Attributes::ClassMethods extend ::ActiveRecord::Locking::Optimistic::ClassMethods + extend ::ActiveRecord::Encryption::EncryptableRecord::ClassMethods extend ::ActiveModel::AttributeMethods::ClassMethods extend ::ActiveRecord::AttributeMethods::ClassMethods extend ::ActiveRecord::AttributeMethods::Read::ClassMethods extend ::ActiveRecord::AttributeMethods::Write::ClassMethods extend ::ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods extend ::ActiveRecord::AttributeMethods::TimeZoneConversion::ClassMethods - extend ::ActiveRecord::AttributeMethods::Dirty::ClassMethods extend ::ActiveRecord::AttributeMethods::Serialization::ClassMethods extend ::ActiveRecord::Callbacks::ClassMethods extend ::ActiveModel::Validations::Callbacks::ClassMethods extend ::ActiveRecord::Timestamp::ClassMethods extend ::ActiveRecord::Associations::ClassMethods extend ::ActiveModel::SecurePassword::ClassMethods + extend ::ActiveRecord::SecurePassword::ClassMethods extend ::ActiveRecord::AutosaveAssociation::ClassMethods extend ::ActiveRecord::NestedAttributes::ClassMethods extend ::ActiveRecord::Transactions::ClassMethods @@ -7851,37 +8290,38 @@ class ActiveRecord::Base extend ::ActiveRecord::Reflection::ClassMethods extend ::ActiveRecord::Store::ClassMethods extend ::ActiveRecord::SecureToken::ClassMethods + extend ::ActiveRecord::TokenFor::ClassMethods extend ::ActiveRecord::SignedId::ClassMethods extend ::ActiveRecord::Suppressor::ClassMethods - extend ::ActiveRecord::Encryption::EncryptableRecord::ClassMethods + extend ::ActiveRecord::Normalization::ClassMethods extend ::ActiveRecord::TypedStore::Extension extend ::MoneyColumn::ActiveRecordHooks::ClassMethods extend ::ActiveStorage::Attached::Model::ClassMethods extend ::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods extend ::ActionText::Attribute::ClassMethods - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _before_commit_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _commit_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _create_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _destroy_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _find_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _initialize_callbacks; end # source://activerecord//lib/active_record/reflection.rb#11 @@ -7890,64 +8330,64 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/reflection.rb#11 def _reflections?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _rollback_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_before_commit_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_commit_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_create_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_destroy_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_find_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_initialize_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_rollback_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_save_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_touch_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_update_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_validate_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_validation_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _save_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _touch_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _update_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _validate_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _validation_callbacks; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators?; end # source://activerecord//lib/active_record/reflection.rb#12 @@ -7956,23 +8396,23 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/reflection.rb#12 def aggregate_reflections?; end - # source://activestorage/7.0.6/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.3.2/lib/active_storage/reflection.rb#53 def attachment_reflections; end - # source://activestorage/7.0.6/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.3.2/lib/active_storage/reflection.rb#53 def attachment_reflections?; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#72 def attribute_aliases; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#72 def attribute_aliases?; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#73 - def attribute_method_matchers; end + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#73 + def attribute_method_patterns; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#73 - def attribute_method_matchers?; end + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#73 + def attribute_method_patterns?; end # source://activerecord//lib/active_record/reflection.rb#13 def automatic_scope_inversing; end @@ -7998,19 +8438,19 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/integration.rb#32 def collection_cache_versioning?; end - # source://activerecord//lib/active_record/model_schema.rb#171 - def column_for_attribute(*_arg0, **_arg1, &_arg2); end + # source://activerecord//lib/active_record/model_schema.rb#178 + def column_for_attribute(name, &block); end - # source://activerecord//lib/active_record/core.rb#74 + # source://activerecord//lib/active_record/core.rb#97 def default_connection_handler; end - # source://activerecord//lib/active_record/core.rb#74 + # source://activerecord//lib/active_record/core.rb#97 def default_connection_handler?; end - # source://activerecord//lib/active_record/core.rb#76 + # source://activerecord//lib/active_record/core.rb#99 def default_role; end - # source://activerecord//lib/active_record/core.rb#76 + # source://activerecord//lib/active_record/core.rb#99 def default_role?; end # source://activerecord//lib/active_record/scoping/default.rb#20 @@ -8019,20 +8459,23 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/scoping/default.rb#19 def default_scopes; end - # source://activerecord//lib/active_record/core.rb#78 + # source://activerecord//lib/active_record/core.rb#101 def default_shard; end - # source://activerecord//lib/active_record/core.rb#78 + # source://activerecord//lib/active_record/core.rb#101 def default_shard?; end - # source://activerecord//lib/active_record/enum.rb#116 + # source://activerecord//lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord//lib/active_record/enum.rb#116 + # source://activerecord//lib/active_record/enum.rb#167 def defined_enums?; end - # source://activerecord//lib/active_record/core.rb#26 - def destroy_association_async_job; end + # source://activerecord//lib/active_record/core.rb#47 + def destroy_association_async_batch_size; end + + # source://activerecord//lib/active_record/core.rb#37 + def destroy_association_async_job(&block); end # source://activerecord//lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes; end @@ -8043,10 +8486,10 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes?; end - # source://activemodel/7.0.6/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.2/lib/active_model/serializers/json.rb#15 def include_root_in_json; end - # source://activemodel/7.0.6/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.2/lib/active_model/serializers/json.rb#15 def include_root_in_json?; end # source://activerecord//lib/active_record/locking/optimistic.rb#56 @@ -8055,14 +8498,14 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/locking/optimistic.rb#56 def lock_optimistically?; end - # source://activerecord//lib/active_record/core.rb#20 + # source://activerecord//lib/active_record/core.rb#22 def logger; end - # source://activerecord//lib/active_record/core.rb#20 + # source://activerecord//lib/active_record/core.rb#22 def logger?; end - # source://activemodel/7.0.6/lib/active_model/naming.rb#244 - def model_name(*_arg0, **_arg1, &_arg2); end + # source://activemodel/7.1.3.2/lib/active_model/naming.rb#255 + def model_name(&block); end # source://activerecord//lib/active_record/nested_attributes.rb#15 def nested_attributes_options; end @@ -8070,28 +8513,40 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/nested_attributes.rb#15 def nested_attributes_options?; end - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#18 + # source://activerecord//lib/active_record/normalization.rb#8 + def normalized_attributes; end + + # source://activerecord//lib/active_record/normalization.rb#8 + def normalized_attributes=(_arg0); end + + # source://activerecord//lib/active_record/normalization.rb#8 + def normalized_attributes?; end + + # source://activemodel/7.1.3.2/lib/active_model/conversion.rb#32 + def param_delimiter=(_arg0); end + + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts; end - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#18 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts?; end - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#17 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#49 def partial_updates; end - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#17 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#49 def partial_updates?; end - # source://activerecord//lib/active_record/model_schema.rb#156 + # source://activerecord//lib/active_record/model_schema.rb#163 def pluralize_table_names; end - # source://activerecord//lib/active_record/model_schema.rb#156 + # source://activerecord//lib/active_record/model_schema.rb#163 def pluralize_table_names?; end - # source://activerecord//lib/active_record/model_schema.rb#151 + # source://activerecord//lib/active_record/model_schema.rb#158 def primary_key_prefix_type; end - # source://activerecord//lib/active_record/model_schema.rb#151 + # source://activerecord//lib/active_record/model_schema.rb#158 def primary_key_prefix_type?; end # source://activerecord//lib/active_record/timestamp.rb#47 @@ -8115,28 +8570,28 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#67 def skip_time_zone_conversion_for_attributes?; end - # source://activerecord//lib/active_record/inheritance.rb#42 + # source://activerecord//lib/active_record/inheritance.rb#43 def store_full_class_name; end - # source://activerecord//lib/active_record/inheritance.rb#42 + # source://activerecord//lib/active_record/inheritance.rb#43 def store_full_class_name?; end - # source://activerecord//lib/active_record/inheritance.rb#46 + # source://activerecord//lib/active_record/inheritance.rb#47 def store_full_sti_class; end - # source://activerecord//lib/active_record/inheritance.rb#46 + # source://activerecord//lib/active_record/inheritance.rb#47 def store_full_sti_class?; end - # source://activerecord//lib/active_record/model_schema.rb#152 + # source://activerecord//lib/active_record/model_schema.rb#159 def table_name_prefix; end - # source://activerecord//lib/active_record/model_schema.rb#152 + # source://activerecord//lib/active_record/model_schema.rb#159 def table_name_prefix?; end - # source://activerecord//lib/active_record/model_schema.rb#153 + # source://activerecord//lib/active_record/model_schema.rb#160 def table_name_suffix; end - # source://activerecord//lib/active_record/model_schema.rb#153 + # source://activerecord//lib/active_record/model_schema.rb#160 def table_name_suffix?; end # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#66 @@ -8151,70 +8606,88 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#68 def time_zone_aware_types?; end - # source://activerecord//lib/active_record/model_schema.rb#171 - def type_for_attribute(*_arg0, **_arg1, &_arg2); end + # source://activerecord//lib/active_record/model_schema.rb#178 + def type_for_attribute(attr_name, &block); end - # source://activemodel/7.0.6/lib/active_model/validations.rb#48 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#67 def validation_context; end private - # source://activemodel/7.0.6/lib/active_model/validations.rb#48 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#67 def validation_context=(_arg0); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activerecord//lib/active_record/readonly_attributes.rb#8 + # source://activerecord//lib/active_record/readonly_attributes.rb#11 def _attr_readonly; end - # source://activerecord//lib/active_record/readonly_attributes.rb#8 + # source://activerecord//lib/active_record/readonly_attributes.rb#11 def _attr_readonly=(value); end - # source://activerecord//lib/active_record/readonly_attributes.rb#8 + # source://activerecord//lib/active_record/readonly_attributes.rb#11 def _attr_readonly?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _before_commit_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _before_commit_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _commit_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _commit_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activerecord//lib/active_record/counter_cache.rb#9 + def _counter_cache_columns; end + + # source://activerecord//lib/active_record/counter_cache.rb#9 + def _counter_cache_columns=(value); end + + # source://activerecord//lib/active_record/counter_cache.rb#9 + def _counter_cache_columns?; end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _create_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _create_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activerecord//lib/active_record/core.rb#24 + def _destroy_association_async_job; end + + # source://activerecord//lib/active_record/core.rb#24 + def _destroy_association_async_job=(value); end + + # source://activerecord//lib/active_record/core.rb#24 + def _destroy_association_async_job?; end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _destroy_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _destroy_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _find_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _find_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _initialize_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _initialize_callbacks=(value); end # source://activerecord//lib/active_record/reflection.rb#11 @@ -8226,70 +8699,70 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/reflection.rb#11 def _reflections?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _rollback_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _rollback_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _save_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _save_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _touch_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _touch_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _update_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _update_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _validate_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _validate_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _validation_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _validation_callbacks=(value); end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators=(value); end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators?; end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#144 def after_create(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#144 def after_destroy(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#144 def after_find(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#144 def after_initialize(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#144 def after_save(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#144 def after_touch(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#144 def after_update(*args, **options, &block); end # source://activerecord//lib/active_record/reflection.rb#12 @@ -8301,53 +8774,53 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/reflection.rb#12 def aggregate_reflections?; end - # source://activerecord//lib/active_record/core.rb#82 + # source://activerecord//lib/active_record/core.rb#105 def application_record_class?; end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#137 def around_create(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#137 def around_destroy(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#137 def around_save(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#137 def around_update(*args, **options, &block); end - # source://activerecord//lib/active_record/core.rb#129 + # source://activerecord//lib/active_record/core.rb#125 def asynchronous_queries_session; end - # source://activerecord//lib/active_record/core.rb#133 + # source://activerecord//lib/active_record/core.rb#129 def asynchronous_queries_tracker; end - # source://activestorage/7.0.6/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.3.2/lib/active_storage/reflection.rb#53 def attachment_reflections; end - # source://activestorage/7.0.6/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.3.2/lib/active_storage/reflection.rb#53 def attachment_reflections=(value); end - # source://activestorage/7.0.6/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.3.2/lib/active_storage/reflection.rb#53 def attachment_reflections?; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#72 def attribute_aliases; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#72 def attribute_aliases=(value); end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#72 def attribute_aliases?; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#73 - def attribute_method_matchers; end + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#73 + def attribute_method_patterns; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#73 - def attribute_method_matchers=(value); end + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#73 + def attribute_method_patterns=(value); end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#73 - def attribute_method_matchers?; end + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#73 + def attribute_method_patterns?; end # source://activerecord//lib/active_record/attributes.rb#11 def attributes_to_define_after_schema_loads; end @@ -8367,25 +8840,25 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/reflection.rb#13 def automatic_scope_inversing?; end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#130 def before_create(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#130 def before_destroy(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#130 def before_save(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#130 def before_update(*args, **options, &block); end - # source://activerecord//lib/active_record/core.rb#68 + # source://activerecord//lib/active_record/core.rb#89 def belongs_to_required_by_default; end - # source://activerecord//lib/active_record/core.rb#68 + # source://activerecord//lib/active_record/core.rb#89 def belongs_to_required_by_default=(value); end - # source://activerecord//lib/active_record/core.rb#68 + # source://activerecord//lib/active_record/core.rb#89 def belongs_to_required_by_default?; end # source://activerecord//lib/active_record/integration.rb#16 @@ -8415,64 +8888,67 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/integration.rb#32 def collection_cache_versioning?; end - # source://activerecord//lib/active_record/core.rb#56 + # source://activerecord//lib/active_record/core.rb#77 def configurations; end - # source://activerecord//lib/active_record/core.rb#50 + # source://activerecord//lib/active_record/core.rb#71 def configurations=(config); end - # source://activerecord//lib/active_record/core.rb#201 + # source://activerecord//lib/active_record/core.rb#189 def connected_to_stack; end - # source://activerecord//lib/active_record/core.rb#215 + # source://activerecord//lib/active_record/core.rb#203 def connection_class; end - # source://activerecord//lib/active_record/core.rb#211 + # source://activerecord//lib/active_record/core.rb#199 def connection_class=(b); end - # source://activerecord//lib/active_record/core.rb#219 + # source://activerecord//lib/active_record/core.rb#207 def connection_class?; end - # source://activerecord//lib/active_record/core.rb#223 + # source://activerecord//lib/active_record/core.rb#211 def connection_class_for_self; end - # source://activerecord//lib/active_record/core.rb#94 + # source://activerecord//lib/active_record/core.rb#117 def connection_handler; end - # source://activerecord//lib/active_record/core.rb#98 + # source://activerecord//lib/active_record/core.rb#121 def connection_handler=(handler); end - # source://activerecord//lib/active_record/core.rb#102 - def connection_handlers; end - - # source://activerecord//lib/active_record/core.rb#111 - def connection_handlers=(handlers); end - - # source://activerecord//lib/active_record/core.rb#188 + # source://activerecord//lib/active_record/core.rb#180 def current_preventing_writes; end - # source://activerecord//lib/active_record/core.rb#147 + # source://activerecord//lib/active_record/core.rb#143 def current_role; end - # source://activerecord//lib/active_record/core.rb#169 + # source://activerecord//lib/active_record/core.rb#161 def current_shard; end - # source://activerecord//lib/active_record/core.rb#74 + # source://activerecord//lib/active_record/attribute_methods/serialization.rb#20 + def default_column_serializer; end + + # source://activerecord//lib/active_record/attribute_methods/serialization.rb#20 + def default_column_serializer=(value); end + + # source://activerecord//lib/active_record/attribute_methods/serialization.rb#20 + def default_column_serializer?; end + + # source://activerecord//lib/active_record/core.rb#97 def default_connection_handler; end - # source://activerecord//lib/active_record/core.rb#74 + # source://activerecord//lib/active_record/core.rb#97 def default_connection_handler=(value); end - # source://activerecord//lib/active_record/core.rb#74 + # source://activerecord//lib/active_record/core.rb#97 def default_connection_handler?; end - # source://activerecord//lib/active_record/core.rb#76 + # source://activerecord//lib/active_record/core.rb#99 def default_role; end - # source://activerecord//lib/active_record/core.rb#76 + # source://activerecord//lib/active_record/core.rb#99 def default_role=(value); end - # source://activerecord//lib/active_record/core.rb#76 + # source://activerecord//lib/active_record/core.rb#99 def default_role?; end # source://activerecord//lib/active_record/scoping/default.rb#20 @@ -8487,28 +8963,34 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/scoping/default.rb#19 def default_scopes=(value); end - # source://activerecord//lib/active_record/core.rb#78 + # source://activerecord//lib/active_record/core.rb#101 def default_shard; end - # source://activerecord//lib/active_record/core.rb#78 + # source://activerecord//lib/active_record/core.rb#101 def default_shard=(value); end - # source://activerecord//lib/active_record/core.rb#78 + # source://activerecord//lib/active_record/core.rb#101 def default_shard?; end - # source://activerecord//lib/active_record/enum.rb#116 + # source://activerecord//lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord//lib/active_record/enum.rb#116 + # source://activerecord//lib/active_record/enum.rb#167 def defined_enums=(value); end - # source://activerecord//lib/active_record/enum.rb#116 + # source://activerecord//lib/active_record/enum.rb#167 def defined_enums?; end - # source://activerecord//lib/active_record/core.rb#26 + # source://activerecord//lib/active_record/core.rb#47 + def destroy_association_async_batch_size; end + + # source://activerecord//lib/active_record/core.rb#47 + def destroy_association_async_batch_size=(value); end + + # source://activerecord//lib/active_record/core.rb#27 def destroy_association_async_job; end - # source://activerecord//lib/active_record/core.rb#26 + # source://activerecord//lib/active_record/core.rb#24 def destroy_association_async_job=(value); end # source://activerecord//lib/active_record/encryption/encryptable_record.rb#11 @@ -8520,73 +9002,79 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes?; end - # source://activerecord//lib/active_record/core.rb#66 + # source://activerecord//lib/active_record/core.rb#87 def enumerate_columns_in_select_statements; end - # source://activerecord//lib/active_record/core.rb#66 + # source://activerecord//lib/active_record/core.rb#87 def enumerate_columns_in_select_statements=(value); end - # source://activerecord//lib/active_record/core.rb#66 + # source://activerecord//lib/active_record/core.rb#87 def enumerate_columns_in_select_statements?; end - # source://activerecord//lib/active_record/core.rb#72 + # source://activerecord//lib/active_record/token_for.rb#11 + def generated_token_verifier; end + + # source://activerecord//lib/active_record/token_for.rb#11 + def generated_token_verifier=(value); end + + # source://activerecord//lib/active_record/core.rb#93 def has_many_inversing; end - # source://activerecord//lib/active_record/core.rb#72 + # source://activerecord//lib/active_record/core.rb#93 def has_many_inversing=(value); end - # source://activerecord//lib/active_record/core.rb#72 + # source://activerecord//lib/active_record/core.rb#93 def has_many_inversing?; end - # source://activerecord//lib/active_record/model_schema.rb#158 + # source://activerecord//lib/active_record/model_schema.rb#165 def immutable_strings_by_default; end - # source://activerecord//lib/active_record/model_schema.rb#158 + # source://activerecord//lib/active_record/model_schema.rb#165 def immutable_strings_by_default=(value); end - # source://activerecord//lib/active_record/model_schema.rb#158 + # source://activerecord//lib/active_record/model_schema.rb#165 def immutable_strings_by_default?; end - # source://activerecord//lib/active_record/model_schema.rb#157 + # source://activerecord//lib/active_record/model_schema.rb#164 def implicit_order_column; end - # source://activerecord//lib/active_record/model_schema.rb#157 + # source://activerecord//lib/active_record/model_schema.rb#164 def implicit_order_column=(value); end - # source://activerecord//lib/active_record/model_schema.rb#157 + # source://activerecord//lib/active_record/model_schema.rb#164 def implicit_order_column?; end - # source://activemodel/7.0.6/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.2/lib/active_model/serializers/json.rb#15 def include_root_in_json; end - # source://activemodel/7.0.6/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.2/lib/active_model/serializers/json.rb#15 def include_root_in_json=(value); end - # source://activemodel/7.0.6/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.2/lib/active_model/serializers/json.rb#15 def include_root_in_json?; end - # source://activerecord//lib/active_record/model_schema.rb#160 + # source://activerecord//lib/active_record/model_schema.rb#167 def inheritance_column; end - # source://activerecord//lib/active_record/model_schema.rb#311 + # source://activerecord//lib/active_record/model_schema.rb#321 def inheritance_column=(value); end - # source://activerecord//lib/active_record/model_schema.rb#160 + # source://activerecord//lib/active_record/model_schema.rb#167 def inheritance_column?; end - # source://activerecord//lib/active_record/model_schema.rb#155 + # source://activerecord//lib/active_record/model_schema.rb#162 def internal_metadata_table_name; end - # source://activerecord//lib/active_record/model_schema.rb#155 + # source://activerecord//lib/active_record/model_schema.rb#162 def internal_metadata_table_name=(value); end - # source://activerecord//lib/active_record/model_schema.rb#155 + # source://activerecord//lib/active_record/model_schema.rb#162 def internal_metadata_table_name?; end - # source://activerecord//lib/active_record/store.rb#99 + # source://activerecord//lib/active_record/store.rb#101 def local_stored_attributes; end - # source://activerecord//lib/active_record/store.rb#99 + # source://activerecord//lib/active_record/store.rb#101 def local_stored_attributes=(_arg0); end # source://activerecord//lib/active_record/locking/optimistic.rb#56 @@ -8598,13 +9086,13 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/locking/optimistic.rb#56 def lock_optimistically?; end - # source://activerecord//lib/active_record/core.rb#20 + # source://activerecord//lib/active_record/core.rb#22 def logger; end - # source://activerecord//lib/active_record/core.rb#20 + # source://activerecord//lib/active_record/core.rb#22 def logger=(value); end - # source://activerecord//lib/active_record/core.rb#20 + # source://activerecord//lib/active_record/core.rb#22 def logger?; end # source://activerecord//lib/active_record/nested_attributes.rb#15 @@ -8616,40 +9104,58 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/nested_attributes.rb#15 def nested_attributes_options?; end - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#18 + # source://activerecord//lib/active_record/normalization.rb#8 + def normalized_attributes; end + + # source://activerecord//lib/active_record/normalization.rb#8 + def normalized_attributes=(value); end + + # source://activerecord//lib/active_record/normalization.rb#8 + def normalized_attributes?; end + + # source://activemodel/7.1.3.2/lib/active_model/conversion.rb#32 + def param_delimiter; end + + # source://activemodel/7.1.3.2/lib/active_model/conversion.rb#32 + def param_delimiter=(value); end + + # source://activemodel/7.1.3.2/lib/active_model/conversion.rb#32 + def param_delimiter?; end + + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts; end - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#18 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts=(value); end - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#18 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts?; end - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#17 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#49 def partial_updates; end - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#17 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#49 def partial_updates=(value); end - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#17 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#49 def partial_updates?; end - # source://activerecord//lib/active_record/model_schema.rb#156 + # source://activerecord//lib/active_record/model_schema.rb#163 def pluralize_table_names; end - # source://activerecord//lib/active_record/model_schema.rb#156 + # source://activerecord//lib/active_record/model_schema.rb#163 def pluralize_table_names=(value); end - # source://activerecord//lib/active_record/model_schema.rb#156 + # source://activerecord//lib/active_record/model_schema.rb#163 def pluralize_table_names?; end - # source://activerecord//lib/active_record/model_schema.rb#151 + # source://activerecord//lib/active_record/model_schema.rb#158 def primary_key_prefix_type; end - # source://activerecord//lib/active_record/model_schema.rb#151 + # source://activerecord//lib/active_record/model_schema.rb#158 def primary_key_prefix_type=(value); end - # source://activerecord//lib/active_record/model_schema.rb#151 + # source://activerecord//lib/active_record/model_schema.rb#158 def primary_key_prefix_type?; end # source://activerecord//lib/active_record/timestamp.rb#47 @@ -8661,22 +9167,31 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/timestamp.rb#47 def record_timestamps?; end - # source://activerecord//lib/active_record/model_schema.rb#154 + # source://activerecord//lib/active_record/core.rb#95 + def run_commit_callbacks_on_first_saved_instances_in_transaction; end + + # source://activerecord//lib/active_record/core.rb#95 + def run_commit_callbacks_on_first_saved_instances_in_transaction=(value); end + + # source://activerecord//lib/active_record/core.rb#95 + def run_commit_callbacks_on_first_saved_instances_in_transaction?; end + + # source://activerecord//lib/active_record/model_schema.rb#161 def schema_migrations_table_name; end - # source://activerecord//lib/active_record/model_schema.rb#154 + # source://activerecord//lib/active_record/model_schema.rb#161 def schema_migrations_table_name=(value); end - # source://activerecord//lib/active_record/model_schema.rb#154 + # source://activerecord//lib/active_record/model_schema.rb#161 def schema_migrations_table_name?; end - # source://activerecord//lib/active_record/core.rb#80 + # source://activerecord//lib/active_record/core.rb#103 def shard_selector; end - # source://activerecord//lib/active_record/core.rb#80 + # source://activerecord//lib/active_record/core.rb#103 def shard_selector=(value); end - # source://activerecord//lib/active_record/core.rb#80 + # source://activerecord//lib/active_record/core.rb#103 def shard_selector?; end # source://activerecord//lib/active_record/signed_id.rb#13 @@ -8697,52 +9212,52 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#67 def skip_time_zone_conversion_for_attributes?; end - # source://activerecord//lib/active_record/inheritance.rb#42 + # source://activerecord//lib/active_record/inheritance.rb#43 def store_full_class_name; end - # source://activerecord//lib/active_record/inheritance.rb#42 + # source://activerecord//lib/active_record/inheritance.rb#43 def store_full_class_name=(value); end - # source://activerecord//lib/active_record/inheritance.rb#42 + # source://activerecord//lib/active_record/inheritance.rb#43 def store_full_class_name?; end - # source://activerecord//lib/active_record/inheritance.rb#46 + # source://activerecord//lib/active_record/inheritance.rb#47 def store_full_sti_class; end - # source://activerecord//lib/active_record/inheritance.rb#46 + # source://activerecord//lib/active_record/inheritance.rb#47 def store_full_sti_class=(value); end - # source://activerecord//lib/active_record/inheritance.rb#46 + # source://activerecord//lib/active_record/inheritance.rb#47 def store_full_sti_class?; end - # source://activerecord//lib/active_record/core.rb#70 + # source://activerecord//lib/active_record/core.rb#91 def strict_loading_by_default; end - # source://activerecord//lib/active_record/core.rb#70 + # source://activerecord//lib/active_record/core.rb#91 def strict_loading_by_default=(value); end - # source://activerecord//lib/active_record/core.rb#70 + # source://activerecord//lib/active_record/core.rb#91 def strict_loading_by_default?; end - # source://activerecord//lib/active_record/core.rb#238 + # source://activerecord//lib/active_record/core.rb#226 def strict_loading_violation!(owner:, reflection:); end - # source://activerecord//lib/active_record/model_schema.rb#152 + # source://activerecord//lib/active_record/model_schema.rb#159 def table_name_prefix; end - # source://activerecord//lib/active_record/model_schema.rb#152 + # source://activerecord//lib/active_record/model_schema.rb#159 def table_name_prefix=(value); end - # source://activerecord//lib/active_record/model_schema.rb#152 + # source://activerecord//lib/active_record/model_schema.rb#159 def table_name_prefix?; end - # source://activerecord//lib/active_record/model_schema.rb#153 + # source://activerecord//lib/active_record/model_schema.rb#160 def table_name_suffix; end - # source://activerecord//lib/active_record/model_schema.rb#153 + # source://activerecord//lib/active_record/model_schema.rb#160 def table_name_suffix=(value); end - # source://activerecord//lib/active_record/model_schema.rb#153 + # source://activerecord//lib/active_record/model_schema.rb#160 def table_name_suffix?; end # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#66 @@ -8763,9 +9278,15 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#68 def time_zone_aware_types?; end + # source://activerecord//lib/active_record/token_for.rb#10 + def token_definitions; end + + # source://activerecord//lib/active_record/token_for.rb#10 + def token_definitions=(value); end + private - # source://activerecord//lib/active_record/model_schema.rb#160 + # source://activerecord//lib/active_record/model_schema.rb#167 def _inheritance_column=(value); end end end @@ -8776,6 +9297,8 @@ module ActiveRecord::Base::GeneratedAssociationMethods; end # source://activerecord//lib/active_record/base.rb#0 module ActiveRecord::Base::GeneratedAttributeMethods; end +# = Active Record \Batches +# # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#4 module ActiveRecord::Batches # Looping through a collection of records from the database @@ -8809,7 +9332,16 @@ module ActiveRecord::Batches # * :finish - Specifies the primary key value to end at, inclusive of the value. # * :error_on_ignore - Overrides the application config to specify if an error should be raised when # an order is present in the relation. - # * :order - Specifies the primary key order (can be +:asc+ or +:desc+). Defaults to +:asc+. + # * :order - Specifies the primary key order (can be +:asc+ or +:desc+ or an array consisting + # of :asc or :desc). Defaults to +:asc+. + # + # class Order < ActiveRecord::Base + # self.primary_key = [:id_1, :id_2] + # end + # + # Order.find_each(order: [:asc, :desc]) + # + # In the above code, +id_1+ is sorted in ascending order and +id_2+ in descending order. # # Limits are honored, and if present there is no requirement for the batch # size: it can be less than, equal to, or greater than the limit. @@ -8838,7 +9370,7 @@ module ActiveRecord::Batches # NOTE: By its nature, batch processing is subject to race conditions if # other processes are modifying the database. # - # source://activerecord//lib/active_record/relation/batches.rb#68 + # source://activerecord//lib/active_record/relation/batches.rb#79 def find_each(start: T.unsafe(nil), finish: T.unsafe(nil), batch_size: T.unsafe(nil), error_on_ignore: T.unsafe(nil), order: T.unsafe(nil), &block); end # Yields each batch of records that was found by the find options as @@ -8865,7 +9397,16 @@ module ActiveRecord::Batches # * :finish - Specifies the primary key value to end at, inclusive of the value. # * :error_on_ignore - Overrides the application config to specify if an error should be raised when # an order is present in the relation. - # * :order - Specifies the primary key order (can be +:asc+ or +:desc+). Defaults to +:asc+. + # * :order - Specifies the primary key order (can be +:asc+ or +:desc+ or an array consisting + # of :asc or :desc). Defaults to +:asc+. + # + # class Order < ActiveRecord::Base + # self.primary_key = [:id_1, :id_2] + # end + # + # Order.find_in_batches(order: [:asc, :desc]) + # + # In the above code, +id_1+ is sorted in ascending order and +id_2+ in descending order. # # Limits are honored, and if present there is no requirement for the batch # size: it can be less than, equal to, or greater than the limit. @@ -8889,7 +9430,7 @@ module ActiveRecord::Batches # NOTE: By its nature, batch processing is subject to race conditions if # other processes are modifying the database. # - # source://activerecord//lib/active_record/relation/batches.rb#128 + # source://activerecord//lib/active_record/relation/batches.rb#148 def find_in_batches(start: T.unsafe(nil), finish: T.unsafe(nil), batch_size: T.unsafe(nil), error_on_ignore: T.unsafe(nil), order: T.unsafe(nil)); end # Yields ActiveRecord::Relation objects to work with a batch of records. @@ -8920,7 +9461,22 @@ module ActiveRecord::Batches # * :finish - Specifies the primary key value to end at, inclusive of the value. # * :error_on_ignore - Overrides the application config to specify if an error should be raised when # an order is present in the relation. - # * :order - Specifies the primary key order (can be +:asc+ or +:desc+). Defaults to +:asc+. + # * :order - Specifies the primary key order (can be +:asc+ or +:desc+ or an array consisting + # of :asc or :desc). Defaults to +:asc+. + # + # class Order < ActiveRecord::Base + # self.primary_key = [:id_1, :id_2] + # end + # + # Order.in_batches(order: [:asc, :desc]) + # + # In the above code, +id_1+ is sorted in ascending order and +id_2+ in descending order. + # + # * :use_ranges - Specifies whether to use range iteration (id >= x AND id <= y). + # It can make iterating over the whole or almost whole tables several times faster. + # Only whole table iterations use this style of iteration by default. You can disable this behavior by passing +false+. + # If you iterate over the table and the only condition is, e.g., archived_at: nil (and only a tiny fraction + # of the records are archived), it makes sense to opt in to this approach. # # Limits are honored, and if present there is no requirement for the batch # size, it can be less than, equal, or greater than the limit. @@ -8955,25 +9511,37 @@ module ActiveRecord::Batches # NOTE: By its nature, batch processing is subject to race conditions if # other processes are modifying the database. # - # source://activerecord//lib/active_record/relation/batches.rb#204 - def in_batches(of: T.unsafe(nil), start: T.unsafe(nil), finish: T.unsafe(nil), load: T.unsafe(nil), error_on_ignore: T.unsafe(nil), order: T.unsafe(nil)); end + # source://activerecord//lib/active_record/relation/batches.rb#239 + def in_batches(of: T.unsafe(nil), start: T.unsafe(nil), finish: T.unsafe(nil), load: T.unsafe(nil), error_on_ignore: T.unsafe(nil), order: T.unsafe(nil), use_ranges: T.unsafe(nil), &block); end private - # source://activerecord//lib/active_record/relation/batches.rb#286 + # source://activerecord//lib/active_record/relation/batches.rb#325 def act_on_ignored_order(error_on_ignore); end - # source://activerecord//lib/active_record/relation/batches.rb#278 - def apply_finish_limit(relation, finish, order); end + # source://activerecord//lib/active_record/relation/batches.rb#297 + def apply_finish_limit(relation, finish, batch_orders); end + + # source://activerecord//lib/active_record/relation/batches.rb#284 + def apply_limits(relation, start, finish, batch_orders); end + + # source://activerecord//lib/active_record/relation/batches.rb#290 + def apply_start_limit(relation, start, batch_orders); end + + # source://activerecord//lib/active_record/relation/batches.rb#304 + def batch_condition(relation, columns, values, operators); end - # source://activerecord//lib/active_record/relation/batches.rb#268 - def apply_limits(relation, start, finish, order); end + # source://activerecord//lib/active_record/relation/batches.rb#339 + def batch_on_loaded_relation(relation:, start:, finish:, order:, batch_limit:); end - # source://activerecord//lib/active_record/relation/batches.rb#274 - def apply_start_limit(relation, start, order); end + # source://activerecord//lib/active_record/relation/batches.rb#364 + def batch_on_unloaded_relation(relation:, start:, finish:, load:, order:, use_ranges:, remaining:, batch_limit:); end - # source://activerecord//lib/active_record/relation/batches.rb#282 - def batch_order(order); end + # source://activerecord//lib/active_record/relation/batches.rb#319 + def build_batch_orders(order); end + + # source://activerecord//lib/active_record/relation/batches.rb#335 + def get_the_order_of_primary_key(order); end end # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#5 @@ -8983,11 +9551,11 @@ class ActiveRecord::Batches::BatchEnumerator # @return [BatchEnumerator] a new instance of BatchEnumerator # # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#8 - def initialize(relation:, of: T.unsafe(nil), start: T.unsafe(nil), finish: T.unsafe(nil)); end + def initialize(relation:, of: T.unsafe(nil), start: T.unsafe(nil), finish: T.unsafe(nil), order: T.unsafe(nil), use_ranges: T.unsafe(nil)); end # The size of the batches yielded by the BatchEnumerator. # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#25 + # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#27 def batch_size; end # Deletes records in batches. Returns the total number of rows affected. @@ -8996,7 +9564,7 @@ class ActiveRecord::Batches::BatchEnumerator # # See Relation#delete_all for details of how each batch is deleted. # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#63 + # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#65 def delete_all; end # Destroys records in batches. @@ -9005,7 +9573,7 @@ class ActiveRecord::Batches::BatchEnumerator # # See Relation#destroy_all for details of how each batch is destroyed. # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#83 + # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#85 def destroy_all; end # Yields an ActiveRecord::Relation object for each batch of records. @@ -9014,7 +9582,7 @@ class ActiveRecord::Batches::BatchEnumerator # relation.update_all(awesome: true) # end # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#92 + # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#94 def each(&block); end # Looping through a collection of records from the database (using the @@ -9039,22 +9607,22 @@ class ActiveRecord::Batches::BatchEnumerator # person.award_trophy(index + 1) # end # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#50 + # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#52 def each_record(&block); end # The primary key value at which the BatchEnumerator ends, inclusive of the value. # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#19 + # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#21 def finish; end # The relation from which the BatchEnumerator yields batches. # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#22 + # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#24 def relation; end # The primary key value from which the BatchEnumerator starts, inclusive of the value. # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#16 + # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#18 def start; end # Updates records in batches. Returns the total number of rows affected. @@ -9063,21 +9631,74 @@ class ActiveRecord::Batches::BatchEnumerator # # See Relation#update_all for details of how each batch is updated. # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#72 + # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#74 def update_all(updates); end end -# source://activerecord//lib/active_record/relation/batches.rb#7 +# source://activerecord//lib/active_record/relation/batches.rb#9 +ActiveRecord::Batches::DEFAULT_ORDER = T.let(T.unsafe(nil), Symbol) + +# source://activerecord//lib/active_record/relation/batches.rb#8 ActiveRecord::Batches::ORDER_IGNORE_MESSAGE = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/relation/calculations.rb#6 +# = Active Record \Calculations +# +# source://activerecord//lib/active_record/relation/calculations.rb#7 module ActiveRecord::Calculations + # Same as #average, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#122 + def async_average(column_name); end + + # Same as #count, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#108 + def async_count(column_name = T.unsafe(nil)); end + + # Same as #ids, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#397 + def async_ids; end + + # Same as #maximum, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#152 + def async_maximum(column_name); end + + # Same as #minimum, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#137 + def async_minimum(column_name); end + + # Same as #pick, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#353 + def async_pick(*column_names); end + + # Same as #pluck, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#324 + def async_pluck(*column_names); end + + # Same as #sum, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#182 + def async_sum(identity_or_column = T.unsafe(nil)); end + # Calculates the average value on a given column. Returns +nil+ if there's # no row. See #calculate for examples with options. # # Person.average(:age) # => 35.8 # - # source://activerecord//lib/active_record/relation/calculations.rb#100 + # source://activerecord//lib/active_record/relation/calculations.rb#116 def average(column_name); end # This calculates aggregate values in the given column. Methods for #count, #sum, #average, @@ -9112,7 +9733,7 @@ module ActiveRecord::Calculations # ... # end # - # source://activerecord//lib/active_record/relation/calculations.rb#179 + # source://activerecord//lib/active_record/relation/calculations.rb#217 def calculate(operation, column_name); end # Count the records. @@ -9141,8 +9762,7 @@ module ActiveRecord::Calculations # of each key would be the #count. # # Article.group(:status, :category).count - # # => {["draft", "business"]=>10, ["draft", "technology"]=>4, - # # ["published", "business"]=>0, ["published", "technology"]=>2} + # # => {["draft", "business"]=>10, ["draft", "technology"]=>4, ["published", "technology"]=>2} # # If #count is used with {Relation#select}[rdoc-ref:QueryMethods#select], it will count the selected columns: # @@ -9152,15 +9772,25 @@ module ActiveRecord::Calculations # Note: not all valid {Relation#select}[rdoc-ref:QueryMethods#select] expressions are valid #count expressions. The specifics differ # between databases. In invalid cases, an error from the database is thrown. # - # source://activerecord//lib/active_record/relation/calculations.rb#84 + # When given a block, loads all records in the relation, if the relation + # hasn't been loaded yet. Calls the block with each record in the relation. + # Returns the number of records for which the block returns a truthy value. + # + # Person.count { |person| person.age > 21 } + # # => counts the number of people older that 21 + # + # Note: If there are a lot of records in the relation, loading all records + # could result in performance issues. + # + # source://activerecord//lib/active_record/relation/calculations.rb#94 def count(column_name = T.unsafe(nil)); end - # Pluck all the ID's for the relation using the table's primary key + # Returns the base model's ID's for the relation using the table's primary key # # Person.ids # SELECT people.id FROM people - # Person.joins(:companies).ids # SELECT people.id FROM people INNER JOIN companies ON companies.person_id = people.id + # Person.joins(:companies).ids # SELECT people.id FROM people INNER JOIN companies ON companies.id = people.company_id # - # source://activerecord//lib/active_record/relation/calculations.rb#283 + # source://activerecord//lib/active_record/relation/calculations.rb#361 def ids; end # Calculates the maximum value on a given column. The value is returned @@ -9169,7 +9799,7 @@ module ActiveRecord::Calculations # # Person.maximum(:age) # => 93 # - # source://activerecord//lib/active_record/relation/calculations.rb#118 + # source://activerecord//lib/active_record/relation/calculations.rb#146 def maximum(column_name); end # Calculates the minimum value on a given column. The value is returned @@ -9178,7 +9808,7 @@ module ActiveRecord::Calculations # # Person.minimum(:age) # => 7 # - # source://activerecord//lib/active_record/relation/calculations.rb#109 + # source://activerecord//lib/active_record/relation/calculations.rb#131 def minimum(column_name); end # Pick the value(s) from the named column(s) in the current relation. @@ -9196,7 +9826,7 @@ module ActiveRecord::Calculations # # SELECT people.name, people.email_address FROM people WHERE id = 1 LIMIT 1 # # => [ 'David', 'david@loudthinking.com' ] # - # source://activerecord//lib/active_record/relation/calculations.rb#271 + # source://activerecord//lib/active_record/relation/calculations.rb#342 def pick(*column_names); end # Use #pluck as a shortcut to select one or more attributes without @@ -9234,7 +9864,7 @@ module ActiveRecord::Calculations # # See also #ids. # - # source://activerecord//lib/active_record/relation/calculations.rb#233 + # source://activerecord//lib/active_record/relation/calculations.rb#283 def pluck(*column_names); end # Calculates the sum of values on a given column. The value is returned @@ -9243,68 +9873,79 @@ module ActiveRecord::Calculations # # Person.sum(:age) # => 4562 # - # source://activerecord//lib/active_record/relation/calculations.rb#127 - def sum(identity_or_column = T.unsafe(nil), &block); end + # When given a block, loads all records in the relation, if the relation + # hasn't been loaded yet. Calls the block with each record in the relation. + # Returns the sum of +initial_value_or_column+ and the block return + # values: + # + # Person.sum { |person| person.age } # => 4562 + # Person.sum(1000) { |person| person.age } # => 5562 + # + # Note: If there are a lot of records in the relation, loading all records + # could result in performance issues. + # + # source://activerecord//lib/active_record/relation/calculations.rb#172 + def sum(initial_value_or_column = T.unsafe(nil), &block); end private - # source://activerecord//lib/active_record/relation/calculations.rb#327 + # source://activerecord//lib/active_record/relation/calculations.rb#441 def aggregate_column(column_name); end # @return [Boolean] # - # source://activerecord//lib/active_record/relation/calculations.rb#288 + # source://activerecord//lib/active_record/relation/calculations.rb#402 def all_attributes?(column_names); end - # source://activerecord//lib/active_record/relation/calculations.rb#502 + # source://activerecord//lib/active_record/relation/calculations.rb#626 def build_count_subquery(relation, column_name, distinct); end # @return [Boolean] # - # source://activerecord//lib/active_record/relation/calculations.rb#323 + # source://activerecord//lib/active_record/relation/calculations.rb#437 def distinct_select?(column_name); end - # source://activerecord//lib/active_record/relation/calculations.rb#369 + # source://activerecord//lib/active_record/relation/calculations.rb#492 def execute_grouped_calculation(operation, column_name, distinct); end - # source://activerecord//lib/active_record/relation/calculations.rb#339 + # source://activerecord//lib/active_record/relation/calculations.rb#453 def execute_simple_calculation(operation, column_name, distinct); end # @return [Boolean] # - # source://activerecord//lib/active_record/relation/calculations.rb#292 + # source://activerecord//lib/active_record/relation/calculations.rb#406 def has_include?(column_name); end - # source://activerecord//lib/active_record/relation/calculations.rb#450 + # source://activerecord//lib/active_record/relation/calculations.rb#574 def lookup_cast_type_from_join_dependencies(name, join_dependencies = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/calculations.rb#335 + # source://activerecord//lib/active_record/relation/calculations.rb#449 def operation_over_aggregate_column(column, operation, distinct); end - # source://activerecord//lib/active_record/relation/calculations.rb#296 + # source://activerecord//lib/active_record/relation/calculations.rb#410 def perform_calculation(operation, column_name); end - # source://activerecord//lib/active_record/relation/calculations.rb#493 + # source://activerecord//lib/active_record/relation/calculations.rb#617 def select_for_count; end - # source://activerecord//lib/active_record/relation/calculations.rb#475 + # source://activerecord//lib/active_record/relation/calculations.rb#599 def type_cast_calculated_value(value, operation, type); end - # source://activerecord//lib/active_record/relation/calculations.rb#458 + # source://activerecord//lib/active_record/relation/calculations.rb#582 def type_cast_pluck_values(result, columns); end - # source://activerecord//lib/active_record/relation/calculations.rb#445 + # source://activerecord//lib/active_record/relation/calculations.rb#569 def type_for(field, &block); end end -# source://activerecord//lib/active_record/relation/calculations.rb#7 +# source://activerecord//lib/active_record/relation/calculations.rb#8 class ActiveRecord::Calculations::ColumnAliasTracker # @return [ColumnAliasTracker] a new instance of ColumnAliasTracker # - # source://activerecord//lib/active_record/relation/calculations.rb#8 + # source://activerecord//lib/active_record/relation/calculations.rb#9 def initialize(connection); end - # source://activerecord//lib/active_record/relation/calculations.rb#13 + # source://activerecord//lib/active_record/relation/calculations.rb#14 def alias_for(field); end private @@ -9317,10 +9958,10 @@ class ActiveRecord::Calculations::ColumnAliasTracker # column_alias_for("count(distinct users.id)") # => "count_distinct_users_id" # column_alias_for("count(*)") # => "count_all" # - # source://activerecord//lib/active_record/relation/calculations.rb#34 + # source://activerecord//lib/active_record/relation/calculations.rb#35 def column_alias_for(field); end - # source://activerecord//lib/active_record/relation/calculations.rb#43 + # source://activerecord//lib/active_record/relation/calculations.rb#44 def truncate(name); end end @@ -9407,7 +10048,7 @@ end # == Types of callbacks # # There are three types of callbacks accepted by the callback macros: method references (symbol), callback objects, -# inline methods (using a proc). Method references and callback objects are the recommended approaches, +# inline methods (using a proc). \Method references and callback objects are the recommended approaches, # inline methods using a proc are sometimes appropriate (such as for creating mix-ins). # # The method reference callbacks work by specifying a protected or private method available in the object, like this: @@ -9496,7 +10137,7 @@ end # # If a before_* callback throws +:abort+, all the later callbacks and # the associated action are cancelled. -# Callbacks are generally run in the order they are defined, with the exception of callbacks defined as +# \Callbacks are generally run in the order they are defined, with the exception of callbacks defined as # methods on the model, which are called last. # # == Ordering callbacks @@ -9557,30 +10198,16 @@ end # end # # In this case the +log_children+ is executed before +do_something_else+. -# The same applies to all non-transactional callbacks. -# -# As seen below, in case there are multiple transactional callbacks the order -# is reversed. +# This applies to all non-transactional callbacks, and to +before_commit+. # -# For example: +# For transactional +after_+ callbacks (+after_commit+, +after_rollback+, etc), the order +# can be set via configuration. # -# class Topic < ActiveRecord::Base -# has_many :children +# config.active_record.run_after_transaction_callbacks_in_order_defined = false # -# after_commit :log_children -# after_commit :do_something_else -# -# private -# def log_children -# # Child processing -# end -# -# def do_something_else -# # Something else -# end -# end -# -# In this case the +do_something_else+ is executed before +log_children+. +# When set to +true+ (the default from \Rails 7.1), callbacks are executed in the order they +# are defined, just like the example above. When set to +false+, the order is reversed, so +# +do_something_else+ is executed before +log_children+. # # == \Transactions # @@ -9612,7 +10239,7 @@ end # # Returns true or false depending on whether the proc is contained in the +before_save+ callback chain on a Topic model. # -# source://activerecord//lib/active_record/callbacks.rb#292 +# source://activerecord//lib/active_record/callbacks.rb#278 module ActiveRecord::Callbacks extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -9625,24 +10252,24 @@ module ActiveRecord::Callbacks mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods mixes_in_class_methods ::ActiveSupport::DescendantsTracker - # source://activerecord//lib/active_record/callbacks.rb#433 + # source://activerecord//lib/active_record/callbacks.rb#419 def destroy; end - # source://activerecord//lib/active_record/callbacks.rb#449 + # source://activerecord//lib/active_record/callbacks.rb#435 def increment!(attribute, by = T.unsafe(nil), touch: T.unsafe(nil)); end - # source://activerecord//lib/active_record/callbacks.rb#445 + # source://activerecord//lib/active_record/callbacks.rb#431 def touch(*_arg0, **_arg1); end private - # source://activerecord//lib/active_record/callbacks.rb#458 + # source://activerecord//lib/active_record/callbacks.rb#444 def _create_record; end - # source://activerecord//lib/active_record/callbacks.rb#462 + # source://activerecord//lib/active_record/callbacks.rb#448 def _update_record; end - # source://activerecord//lib/active_record/callbacks.rb#454 + # source://activerecord//lib/active_record/callbacks.rb#440 def create_or_update(**_arg0); end module GeneratedClassMethods @@ -9657,19 +10284,56 @@ module ActiveRecord::Callbacks end end -# source://activerecord//lib/active_record/callbacks.rb#295 +# source://activerecord//lib/active_record/callbacks.rb#281 ActiveRecord::Callbacks::CALLBACKS = T.let(T.unsafe(nil), Array) -# source://activerecord//lib/active_record/callbacks.rb#302 +# source://activerecord//lib/active_record/callbacks.rb#288 module ActiveRecord::Callbacks::ClassMethods include ::ActiveModel::Callbacks end -# source://activerecord//lib/active_record.rb#114 +# source://activerecord//lib/active_record.rb#122 module ActiveRecord::Coders; end +# source://activerecord//lib/active_record/coders/column_serializer.rb#5 +class ActiveRecord::Coders::ColumnSerializer + # @return [ColumnSerializer] a new instance of ColumnSerializer + # + # source://activerecord//lib/active_record/coders/column_serializer.rb#9 + def initialize(attr_name, coder, object_class = T.unsafe(nil)); end + + # Public because it's called by Type::Serialized + # + # source://activerecord//lib/active_record/coders/column_serializer.rb#46 + def assert_valid_value(object, action:); end + + # Returns the value of attribute coder. + # + # source://activerecord//lib/active_record/coders/column_serializer.rb#7 + def coder; end + + # source://activerecord//lib/active_record/coders/column_serializer.rb#22 + def dump(object); end + + # source://activerecord//lib/active_record/coders/column_serializer.rb#16 + def init_with(coder); end + + # source://activerecord//lib/active_record/coders/column_serializer.rb#29 + def load(payload); end + + # Returns the value of attribute object_class. + # + # source://activerecord//lib/active_record/coders/column_serializer.rb#6 + def object_class; end + + private + + # source://activerecord//lib/active_record/coders/column_serializer.rb#54 + def check_arity_of_constructor; end +end + # source://activerecord//lib/active_record/coders/json.rb#5 -class ActiveRecord::Coders::JSON +module ActiveRecord::Coders::JSON class << self # source://activerecord//lib/active_record/coders/json.rb#6 def dump(obj); end @@ -9680,54 +10344,63 @@ class ActiveRecord::Coders::JSON end # source://activerecord//lib/active_record/coders/yaml_column.rb#7 -class ActiveRecord::Coders::YAMLColumn +class ActiveRecord::Coders::YAMLColumn < ::ActiveRecord::Coders::ColumnSerializer # @return [YAMLColumn] a new instance of YAMLColumn # - # source://activerecord//lib/active_record/coders/yaml_column.rb#10 - def initialize(attr_name, object_class = T.unsafe(nil)); end + # source://activerecord//lib/active_record/coders/yaml_column.rb#59 + def initialize(attr_name, object_class = T.unsafe(nil), permitted_classes: T.unsafe(nil), unsafe_load: T.unsafe(nil)); end - # source://activerecord//lib/active_record/coders/yaml_column.rb#34 - def assert_valid_value(obj, action:); end + # source://activerecord//lib/active_record/coders/yaml_column.rb#77 + def coder; end - # source://activerecord//lib/active_record/coders/yaml_column.rb#16 - def dump(obj); end + # source://activerecord//lib/active_record/coders/yaml_column.rb#68 + def init_with(coder); end - # source://activerecord//lib/active_record/coders/yaml_column.rb#23 - def load(yaml); end + private - # Returns the value of attribute object_class. - # - # source://activerecord//lib/active_record/coders/yaml_column.rb#8 - def object_class; end + # source://activerecord//lib/active_record/coders/yaml_column.rb#88 + def check_arity_of_constructor; end +end - # Sets the attribute object_class - # - # @param value the value to set the attribute object_class to. +# source://activerecord//lib/active_record/coders/yaml_column.rb#8 +class ActiveRecord::Coders::YAMLColumn::SafeCoder + # @return [SafeCoder] a new instance of SafeCoder # - # source://activerecord//lib/active_record/coders/yaml_column.rb#8 - def object_class=(_arg0); end + # source://activerecord//lib/active_record/coders/yaml_column.rb#9 + def initialize(permitted_classes: T.unsafe(nil), unsafe_load: T.unsafe(nil)); end - private + # source://activerecord//lib/active_record/coders/yaml_column.rb#15 + def dump(object); end - # source://activerecord//lib/active_record/coders/yaml_column.rb#42 - def check_arity_of_constructor; end + # source://activerecord//lib/active_record/coders/yaml_column.rb#33 + def load(payload); end +end + +# source://activerecord//lib/active_record/associations.rb#187 +class ActiveRecord::CompositePrimaryKeyMismatchError < ::ActiveRecord::ActiveRecordError + # @return [CompositePrimaryKeyMismatchError] a new instance of CompositePrimaryKeyMismatchError + # + # source://activerecord//lib/active_record/associations.rb#190 + def initialize(reflection = T.unsafe(nil)); end - # source://activerecord//lib/active_record/coders/yaml_column.rb#49 - def yaml_load(payload); end + # Returns the value of attribute reflection. + # + # source://activerecord//lib/active_record/associations.rb#188 + def reflection; end end -# source://activerecord//lib/active_record/migration.rb#168 +# source://activerecord//lib/active_record/migration.rb#175 class ActiveRecord::ConcurrentMigrationError < ::ActiveRecord::MigrationError # @return [ConcurrentMigrationError] a new instance of ConcurrentMigrationError # - # source://activerecord//lib/active_record/migration.rb#172 + # source://activerecord//lib/active_record/migration.rb#179 def initialize(message = T.unsafe(nil)); end end -# source://activerecord//lib/active_record/migration.rb#169 +# source://activerecord//lib/active_record/migration.rb#176 ActiveRecord::ConcurrentMigrationError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/migration.rb#170 +# source://activerecord//lib/active_record/migration.rb#177 ActiveRecord::ConcurrentMigrationError::RELEASE_LOCK_FAILED_MESSAGE = T.let(T.unsafe(nil), String) # Raised when association is being configured improperly or user tries to use @@ -9736,7 +10409,7 @@ ActiveRecord::ConcurrentMigrationError::RELEASE_LOCK_FAILED_MESSAGE = T.let(T.un # {ActiveRecord::Base.has_and_belongs_to_many}[rdoc-ref:Associations::ClassMethods#has_and_belongs_to_many] # associations. # -# source://activerecord//lib/active_record/errors.rb#299 +# source://activerecord//lib/active_record/errors.rb#369 class ActiveRecord::ConfigurationError < ::ActiveRecord::ActiveRecordError; end # source://activerecord//lib/active_record/connection_adapters.rb#4 @@ -9744,6 +10417,8 @@ module ActiveRecord::ConnectionAdapters extend ::ActiveSupport::Autoload end +# = Active Record Abstract Adapter +# # Active Record supports multiple database systems. AbstractAdapter and # related classes form the abstraction layer which makes this possible. # An AbstractAdapter represents a connection to a database, and provides an @@ -9758,7 +10433,7 @@ end # Most of the methods in the adapter are useful during migrations. Most # notably, the instance methods provided by SchemaStatements are very useful. # -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#28 +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#31 class ActiveRecord::ConnectionAdapters::AbstractAdapter include ::ActiveSupport::Callbacks include ::ActiveRecord::Migration::JoinTable @@ -9773,25 +10448,25 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # @return [AbstractAdapter] a new instance of AbstractAdapter # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#82 - def initialize(connection, logger = T.unsafe(nil), config = T.unsafe(nil)); end + # 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.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _checkin_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _checkout_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_checkin_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_checkout_callbacks(&block); end # Checks whether the connection to the database is still active. This includes @@ -9800,30 +10475,35 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#523 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#674 def active?; end # Returns the human-readable name of the adapter. Use mixed case - one # can always use downcase if needed. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#292 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#377 def adapter_name; end + # This is meant to be implemented by the adapters that support custom enum types + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#612 + def add_enum_value(*_arg0); end + # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#478 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#619 def advisory_locks_enabled?; end # Override to check all foreign key constraints in a database. # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#514 - def all_foreign_keys_valid?; end + # source://activesupport/7.1.3.2/lib/active_support/deprecation/method_wrappers.rb#46 + def all_foreign_keys_valid?(*args, **_arg1, &block); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#461 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#586 def async_enabled?; end # Called by ActiveRecord::InsertAll, @@ -9832,64 +10512,88 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # should be overridden by adapters to implement common features with # non-standard syntax like handling duplicates or returning values. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#642 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#859 def build_insert_sql(insert); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#613 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#830 def case_insensitive_comparison(attribute, value); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#609 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#826 def case_sensitive_comparison(attribute, value); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#118 + # Override to check all foreign key constraints in a database. + # The adapter should raise a +ActiveRecord::StatementInvalid+ if foreign key + # constraints are not met. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#666 + def check_all_foreign_keys_valid!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#208 def check_if_write_query(sql); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#657 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#874 def check_version; end + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#799 + def clean!; end + # Clear any caching the database adapter may be doing. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#574 - def clear_cache!; end + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#754 + def clear_cache!(new_connection: T.unsafe(nil)); end # Check the connection back in to the connection pool # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#629 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#846 def close; end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#223 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#794 + def connect!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#313 def connection_class; end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#20 - def create(*_arg0); end + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#222 + def connection_retries; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def create(*_arg0, **_arg1, &_arg2); end # This is meant to be implemented by the adapters that support custom enum types # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#475 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#600 def create_enum(*_arg0); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#653 + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#386 + def database_exists?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#870 def database_version; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#633 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#850 def default_index_type?(index); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#605 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#234 + def default_timezone; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#822 def default_uniqueness_comparison(attribute, value); end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#20 - def delete(*_arg0); end + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def delete(*_arg0, **_arg1, &_arg2); end # This is meant to be implemented by the adapters that support extensions # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#467 - def disable_extension(name); end + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#592 + def disable_extension(name, **_arg1); end # Override to turn off referential integrity while executing &block. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#509 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#650 def disable_referential_integrity; end # Immediately forget this connection ever existed. Unlike disconnect!, @@ -9899,97 +10603,107 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # undefined. This is called internally just before a forked process gets # rid of a connection that belonged to its parent. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#547 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#729 def discard!; end # Disconnects from the database if already connected. Otherwise, this # method does nothing. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#536 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#717 def disconnect!; end + # This is meant to be implemented by the adapters that support custom enum types + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#604 + def drop_enum(*_arg0); end + # This is meant to be implemented by the adapters that support extensions # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#471 - def enable_extension(name); end + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#596 + def enable_extension(name, **_arg1); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def exec_insert_all(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#20 - def exec_insert_all(*_arg0); end + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def exec_query(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def execute(*_arg0, **_arg1, &_arg2); end # this method must only be called while holding connection pool's mutex # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#249 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#334 def expire; end # A list of extensions, to be filled in by adapters that support them. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#497 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#638 def extensions; end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#668 - def field_ordered_value(column, values); end - # This is meant to be implemented by the adapters that support advisory # locks # # Return true if we got the lock, otherwise false # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#486 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#627 def get_advisory_lock(lock_id); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#650 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#867 def get_database_version; end # Returns the value of attribute owner. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#42 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#45 def in_use?; end # A list of index algorithms, to be filled by adapters that support them. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#502 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#643 def index_algorithms; end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#20 - def insert(*_arg0); end + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def insert(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#261 + def internal_metadata; end # this method must only be called while holding connection pool's mutex # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#208 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#298 def lease; end # Returns the value of attribute lock. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#42 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#45 def lock; end + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#183 + def lock_thread=(lock_thread); end + # Returns the value of attribute logger. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#42 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#45 def logger; end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#153 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#253 def migration_context; end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#149 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#249 def migrations_paths; end # Returns the value of attribute owner. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#42 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#45 def owner; end # Returns the value of attribute pool. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#41 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#44 def pool; end - # Sets the attribute pool - # - # @param value the value to set the attribute pool to. - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#41 - def pool=(_arg0); end + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#48 + def pool=(value); end # Should primary key values be selected from their corresponding # sequence before the insert statement? If true, next_sequence_value @@ -9997,35 +10711,30 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#324 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#426 def prefetch_primary_key?(table_name = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#175 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#265 def prepared_statements; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#175 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#265 def prepared_statements?; end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#180 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#270 def prepared_statements_disabled_cache; end # Determines whether writes are currently being prevented. # - # Returns true if the connection is a replica. - # - # If the application is using legacy handling, returns - # true if +connection_handler.prevent_writes+ is set. - # - # If the application is using the new connection handling - # will return true based on +current_preventing_writes+. + # Returns true if the connection is a replica or returns + # the value of +current_preventing_writes+. # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#141 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#242 def preventing_writes?; end # Provides access to the underlying database driver for this adapter. For @@ -10039,65 +10748,93 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # this client. If that is the case, generally you'll want to invalidate # the query cache using +ActiveRecord::Base.clear_query_cache+. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#600 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#814 def raw_connection; end - # Disconnects from the database if already connected, and establishes a - # new connection with the database. Implementors should call super if they - # override the default implementation. + # Disconnects from the database if already connected, and establishes a new + # connection with the database. Implementors should define private #reconnect + # instead. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#529 - def reconnect!; end + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#680 + def reconnect!(restore_transactions: T.unsafe(nil)); end # This is meant to be implemented by the adapters that support advisory # locks. # # Return true if we released the lock, otherwise false # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#493 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#634 def release_advisory_lock(lock_id); end + # This is meant to be implemented by the adapters that support custom enum types + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#608 + def rename_enum(*_arg0); end + + # This is meant to be implemented by the adapters that support custom enum types + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#616 + def rename_enum_value(*_arg0); end + # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#124 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#214 def replica?; end # Returns true if its required to reload the connection between requests for development mode. # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#579 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#767 def requires_reloading?; end # Reset the state of this connection, directing the DBMS to clear # transactions and other connection-related server-side state. Usually a # database-dependent operation. # - # The default implementation does nothing; the implementation should be - # overridden by concrete adapters. + # If a database driver or protocol does not support such a feature, + # implementors may alias this to #reconnect!. Otherwise, implementors + # should call super immediately after resetting the connection (and while + # still holding @lock). # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#563 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#741 def reset!; end + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def restart_db_transaction(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#226 + def retry_deadline; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#582 + def return_value_after_insert?(column); end + # The role (e.g. +:writing+) for the current connection. In a # non-multi role application, +:writing+ is returned. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#229 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#319 def role; end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#20 - def rollback_db_transaction(*_arg0); end + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def rollback_db_transaction(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#20 - def rollback_to_savepoint(*_arg0); end + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def rollback_to_savepoint(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#239 - def schema_cache; end + # Do TransactionRollbackErrors on savepoints affect the parent + # transaction? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#410 + def savepoint_errors_invalidate_transactions?; end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#243 - def schema_cache=(cache); end + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#329 + def schema_cache; end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#157 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#257 def schema_migration; end # Returns the version identifier of the schema currently available in @@ -10105,73 +10842,73 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # numbered migration that has been executed, or 0 if no schema # information is present / the database is empty. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#664 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#881 def schema_version; end # Seconds since this connection was returned to the pool # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#278 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#363 def seconds_idle; end # The shard (e.g. +:default+) for the current connection. In # a non-sharded application, +:default+ is returned. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#235 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#325 def shard; end # this method must only be called while holding connection pool's mutex (and a desire for segfaults) # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#265 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#350 def steal!; end # Does this adapter support application-enforced advisory locking? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#317 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#419 def supports_advisory_locks?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#307 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#399 def supports_bulk_alter?; end # Does this adapter support creating check constraints? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#384 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#491 def supports_check_constraints?; end # Does this adapter support metadata comments on database objects (tables, columns, indexes)? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#409 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#526 def supports_comments?; end # Can comments for tables, columns, and indexes be specified in create/alter table statements? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#414 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#531 def supports_comments_in_create?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#433 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#550 def supports_common_table_expressions?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#457 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#574 def supports_concurrent_connections?; end # Does this adapter support datetime with precision? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#399 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#516 def supports_datetime_with_precision?; end # Does this adapter support DDL rollbacks in transactions? That is, would @@ -10179,56 +10916,70 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#303 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#395 def supports_ddl_transactions?; end # Does this adapter support creating deferrable constraints? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#379 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#486 def supports_deferrable_constraints?; end + # Does this adapter support creating exclusion constraints? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#496 + def supports_exclusion_constraints?; end + # Does this adapter support explain? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#348 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#455 def supports_explain?; end # Does this adapter support expression indices? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#343 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#450 def supports_expression_index?; end # Does this adapter support database extensions? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#358 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#465 def supports_extensions?; end # Does this adapter support creating foreign key constraints? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#369 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#476 def supports_foreign_keys?; end # Does this adapter support foreign/external tables? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#424 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#541 def supports_foreign_tables?; end + # Does this adapter support including non-key columns? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#445 + def supports_index_include?; end + # Does this adapter support index sort order? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#333 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#435 def supports_index_sort_order?; end # Does this adapter support creating indexes in the same statement as @@ -10236,316 +10987,448 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#364 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#471 def supports_indexes_in_create?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#453 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#570 def supports_insert_conflict_target?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#445 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#562 def supports_insert_on_duplicate_skip?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#449 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#566 def supports_insert_on_duplicate_update?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#441 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#558 def supports_insert_returning?; end - # Does this adapter support json data type? + # Does this adapter support JSON data type? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#404 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#521 def supports_json?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#437 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#554 def supports_lazy_transactions?; end # Does this adapter support materialized views? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#394 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#511 def supports_materialized_views?; end + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#578 + def supports_nulls_not_distinct?; end + # Does this adapter support optimizer hints? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#429 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#546 def supports_optimizer_hints?; end # Does this adapter support partial indices? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#338 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#440 def supports_partial_index?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#328 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#430 def supports_partitioned_indexes?; end + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#414 + def supports_restart_db_transaction?; end + # Does this adapter support savepoints? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#312 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#404 def supports_savepoints?; end # Does this adapter support setting the isolation level for a transaction? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#353 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#460 def supports_transaction_isolation?; end + # Does this adapter support creating unique constraints? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#501 + def supports_unique_constraints?; end + # Does this adapter support creating invalid constraints? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#374 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#481 def supports_validate_constraints?; end # Does this adapter support views? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#389 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#506 def supports_views?; end # Does this adapter support virtual columns? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#419 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#536 def supports_virtual_columns?; end # Removes the connection from the pool and disconnect it. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#568 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#748 def throw_away!; end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#20 - def truncate(*_arg0); end + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def truncate(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#20 - def truncate_tables(*_arg0); end + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def truncate_tables(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#283 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#368 def unprepared_statement; end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#20 - def update(*_arg0); end + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def update(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#128 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#218 def use_metadata_table?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#203 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#293 def valid_type?(type); end # Checks whether the connection to the database is still active (i.e. not stale). # This is done under the hood by calling #active?. If the connection # is no longer active, then this method will reconnect to the database. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#586 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#774 def verify!; end # Returns the value of attribute visitor. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#42 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#45 def visitor; end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#108 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#198 def with_instrumenter(instrumenter, &block); end private - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#821 + # Returns a raw connection for internal use with methods that are known + # to both be thread-safe and not rely upon actual server communication. + # This is useful for e.g. string escaping methods. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1099 + def any_raw_connection; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1204 def arel_visitor; end + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1088 + def backoff(counter); end + # Builds the result object. # # This is an internal hook to make possible connection adapters to build # custom result objects with connection-specific data. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#832 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1215 def build_result(columns:, rows:, column_types: T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#825 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1208 def build_statement_pool; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#623 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#840 def can_perform_case_insensitive_comparison_for?(column); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#807 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1190 def collector; end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#796 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1179 def column_for(table_name, column_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#802 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1185 def column_for_attribute(attribute); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#759 + # Perform any necessary initialization upon the newly-established + # connection settings, run queries to configure any application-global + # "session" variables, etc. + # + # Implementations may assume this method will only be called while + # holding @lock (or from #initialize). + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1226 + def configure_connection; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1229 + def default_prepared_statements; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1116 + def extended_type_map_key; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1074 + def invalidate_transaction(exception); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1142 def log(sql, name = T.unsafe(nil), binds = T.unsafe(nil), type_casted_binds = T.unsafe(nil), statement_name = T.unsafe(nil), async: T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#775 + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1092 + def reconnect; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#962 + def reconnect_can_restore_state?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1070 + def retryable_connection_error?(exception); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1081 + def retryable_query_error?(exception); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1158 def transform_query(sql); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#782 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1165 def translate_exception(exception, message:, sql:, binds:); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#749 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1132 def translate_exception_class(e, sql, binds); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#745 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1122 def type_map; end + # Similar to any_raw_connection, but ensures it is validated and + # connected. Any method called on this result still needs to be + # independently thread-safe, so it probably shouldn't talk to the + # server... but some drivers fail if they know the connection has gone + # away. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1108 + def valid_raw_connection; end + + # Mark the connection as verified. Call this inside a + # `with_raw_connection` block only when the block is guaranteed to + # exercise the raw connection. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1066 + def verified!; end + # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#792 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1233 + def warning_ignored?(warning); end + + # Lock the monitor, ensure we're properly connected and + # transactions are materialized, and then yield the underlying + # raw connection object. + # + # If +allow_retry+ is true, a connection-related exception will + # cause an automatic reconnect and re-run of the block, up to + # the connection's configured +connection_retries+ setting + # and the configured +retry_deadline+ limit. (Note that when + # +allow_retry+ is true, it's possible to return without having marked + # the connection as verified. If the block is guaranteed to exercise the + # connection, consider calling `verified!` to avoid needless + # verification queries in subsequent calls.) + # + # If +materialize_transactions+ is false, the block will be run without + # ensuring virtual transactions have been materialized in the DB + # server's state. The active transaction will also remain clean + # (if it is not already dirty), meaning it's able to be restored + # by reconnecting and opening an equivalent-depth set of new + # transactions. This should only be used by transaction control + # methods, and internal transaction-agnostic queries. + # + # + # + # It's not the primary use case, so not something to optimize + # for, but note that this method does need to be re-entrant: + # +materialize_transactions+ will re-enter if it has work to do, + # and the yield block can also do so under some circumstances. + # + # In the latter case, we really ought to guarantee the inner + # call will not reconnect (which would interfere with the + # still-yielded connection in the outer block), but we currently + # provide no special enforcement there. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#999 + def with_raw_connection(allow_retry: T.unsafe(nil), materialize_transactions: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1175 def without_prepared_statement?(binds); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _checkin_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _checkin_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _checkout_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _checkout_callbacks=(value); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#68 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#89 def build_read_query_regexp(*parts); end # Does the database for this adapter exist? # - # @raise [NotImplementedError] # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#297 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#382 def database_exists?(config); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#74 - def quoted_column_names; end + # Opens a database console session. + # + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#124 + def dbconsole(config, options = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#893 + def extended_type_map(default_timezone:); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#78 - def quoted_table_names; end + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#95 + def find_cmd_and_exec(commands, *args); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#57 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#886 + def register_class_with_precision(mapping, key, klass, **kwargs); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#68 def type_cast_config_to_boolean(config); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#47 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#58 def type_cast_config_to_integer(config); end + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#76 + def validate_default_timezone(config); end + private - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#737 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#953 def extract_limit(sql_type); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#733 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#949 def extract_precision(sql_type); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#726 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#942 def extract_scale(sql_type); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#679 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#902 def initialize_type_map(m); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#712 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#935 def register_class_with_limit(mapping, key, klass); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#719 - def register_class_with_precision(mapping, key, klass); end end end -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#29 +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#32 ActiveRecord::ConnectionAdapters::AbstractAdapter::ADAPTER_NAME = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#39 +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#42 ActiveRecord::ConnectionAdapters::AbstractAdapter::COMMENT_REGEX = T.let(T.unsafe(nil), Regexp) -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#65 +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#86 ActiveRecord::ConnectionAdapters::AbstractAdapter::DEFAULT_READ_QUERY = T.let(T.unsafe(nil), Array) -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#106 +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#196 ActiveRecord::ConnectionAdapters::AbstractAdapter::EXCEPTION_IMMEDIATE = T.let(T.unsafe(nil), Hash) -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#105 +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#195 ActiveRecord::ConnectionAdapters::AbstractAdapter::EXCEPTION_NEVER = T.let(T.unsafe(nil), Hash) -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#38 +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#959 +ActiveRecord::ConnectionAdapters::AbstractAdapter::EXTENDED_TYPE_MAPS = T.let(T.unsafe(nil), Concurrent::Map) + +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#180 +ActiveRecord::ConnectionAdapters::AbstractAdapter::FIBER_LOCK = T.let(T.unsafe(nil), ActiveSupport::Concurrency::LoadInterlockAwareMonitor) + +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#41 ActiveRecord::ConnectionAdapters::AbstractAdapter::SIMPLE_INT = T.let(T.unsafe(nil), Regexp) -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#742 +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#177 +ActiveRecord::ConnectionAdapters::AbstractAdapter::THREAD_LOCK = T.let(T.unsafe(nil), ActiveSupport::Concurrency::ThreadLoadInterlockAwareMonitor) + +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#958 ActiveRecord::ConnectionAdapters::AbstractAdapter::TYPE_MAP = T.let(T.unsafe(nil), ActiveRecord::Type::TypeMap) -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#184 +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#274 class ActiveRecord::ConnectionAdapters::AbstractAdapter::Version include ::Comparable # @return [Version] a new instance of Version # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#189 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#279 def initialize(version_string, full_version_string = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#194 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#284 def <=>(version_string); end # Returns the value of attribute full_version_string. # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#187 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#277 def full_version_string; end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#198 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#288 def to_s; end end # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#12 -module ActiveRecord::ConnectionAdapters::AbstractPool - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#13 - def get_schema_cache(connection); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#23 - def lazily_set_schema_cache; end +module ActiveRecord::ConnectionAdapters::AbstractPool; end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#19 - def set_schema_cache(cache); end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#80 +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#114 class ActiveRecord::ConnectionAdapters::AddColumnDefinition < ::Struct # Returns the value of attribute column # @@ -10567,58 +11450,153 @@ class ActiveRecord::ConnectionAdapters::AddColumnDefinition < ::Struct end end -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#534 +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#621 class ActiveRecord::ConnectionAdapters::AlterTable # @return [AlterTable] a new instance of AlterTable # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#539 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#626 def initialize(td); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#558 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#645 def add_check_constraint(expression, options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#566 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#653 def add_column(name, type, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#550 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#637 def add_foreign_key(to_table, options); end # Returns the value of attribute adds. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#535 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#622 def adds; end # Returns the value of attribute check_constraint_adds. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#537 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#624 def check_constraint_adds; end # Returns the value of attribute check_constraint_drops. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#537 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#624 def check_constraint_drops; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#562 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#649 def drop_check_constraint(constraint_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#554 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#641 def drop_foreign_key(name); end # Returns the value of attribute foreign_key_adds. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#536 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#623 def foreign_key_adds; end # Returns the value of attribute foreign_key_drops. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#536 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#623 def foreign_key_drops; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#548 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#635 def name; end end -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#82 +# source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#149 +class ActiveRecord::ConnectionAdapters::BoundSchemaReflection + # @return [BoundSchemaReflection] a new instance of BoundSchemaReflection + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#150 + def initialize(abstract_schema_reflection, connection); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#175 + def add(name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#163 + def cached?(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#155 + def clear!; end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#211 + def clear_data_source_cache!(name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#183 + def columns(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#187 + def columns_hash(table_name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#191 + def columns_hash?(table_name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#171 + def data_source_exists?(name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#179 + def data_sources(name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#199 + def database_version; end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#215 + def dump_to(filename); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#195 + def indexes(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#159 + def load!; end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#167 + def primary_keys(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#207 + def size; end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#203 + def version; end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#118 +class ActiveRecord::ConnectionAdapters::ChangeColumnDefaultDefinition < ::Struct + # Returns the value of attribute column + # + # @return [Object] the current value of column + def column; end + + # Sets the attribute column + # + # @param value [Object] the value to set the attribute column to. + # @return [Object] the newly set value + def column=(_); end + + # Returns the value of attribute default + # + # @return [Object] the current value of default + def default; end + + # Sets the attribute default + # + # @param value [Object] the value to set the attribute default to. + # @return [Object] the newly set value + def default=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#116 class ActiveRecord::ConnectionAdapters::ChangeColumnDefinition < ::Struct # Returns the value of attribute column # @@ -10651,11 +11629,16 @@ class ActiveRecord::ConnectionAdapters::ChangeColumnDefinition < ::Struct end end -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#138 +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#174 class ActiveRecord::ConnectionAdapters::CheckConstraintDefinition < ::Struct # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#148 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#188 + def defined_for?(name:, expression: T.unsafe(nil), validate: T.unsafe(nil), **options); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#184 def export_name_on_schema_dump?; end # Returns the value of attribute expression @@ -10669,7 +11652,7 @@ class ActiveRecord::ConnectionAdapters::CheckConstraintDefinition < ::Struct # @return [Object] the newly set value def expression=(_); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#139 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#175 def name; end # Returns the value of attribute options @@ -10696,12 +11679,12 @@ class ActiveRecord::ConnectionAdapters::CheckConstraintDefinition < ::Struct # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#143 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#179 def validate?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#143 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#179 def validated?; end class << self @@ -10732,9 +11715,21 @@ class ActiveRecord::ConnectionAdapters::Column # source://activerecord//lib/active_record/connection_adapters/column.rb#20 def initialize(name, default, sql_type_metadata = T.unsafe(nil), null = T.unsafe(nil), default_function = T.unsafe(nil), collation: T.unsafe(nil), comment: T.unsafe(nil), **_arg7); end - # source://activerecord//lib/active_record/connection_adapters/column.rb#66 + # source://activerecord//lib/active_record/connection_adapters/column.rb#75 def ==(other); end + # whether the column is auto-populated by the database using a sequence + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/column.rb#67 + def auto_incremented_by_db?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/column.rb#71 + def auto_populated?; end + # @return [Boolean] # # source://activerecord//lib/active_record/connection_adapters/column.rb#34 @@ -10763,7 +11758,7 @@ class ActiveRecord::ConnectionAdapters::Column # source://activerecord//lib/active_record/connection_adapters/column.rb#56 def encode_with(coder); end - # source://activerecord//lib/active_record/connection_adapters/column.rb#66 + # source://activerecord//lib/active_record/connection_adapters/column.rb#75 def eql?(other); end # @return [Boolean] @@ -10771,7 +11766,7 @@ class ActiveRecord::ConnectionAdapters::Column # source://activerecord//lib/active_record/connection_adapters/column.rb#30 def has_default?; end - # source://activerecord//lib/active_record/connection_adapters/column.rb#78 + # source://activerecord//lib/active_record/connection_adapters/column.rb#87 def hash; end # Returns the human name of the column name. @@ -10817,12 +11812,12 @@ class ActiveRecord::ConnectionAdapters::Column # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/column.rb#90 + # source://activerecord//lib/active_record/connection_adapters/column.rb#99 def virtual?; end private - # source://activerecord//lib/active_record/connection_adapters/column.rb#95 + # source://activerecord//lib/active_record/connection_adapters/column.rb#104 def deduplicated; end end @@ -10831,33 +11826,45 @@ end # +columns+ attribute of said TableDefinition object, in order to be used # for generating a number of table creation or table changing SQL statements. # -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#58 +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#79 class ActiveRecord::ConnectionAdapters::ColumnDefinition < ::Struct - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#75 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#109 def aliased_types(name, fallback); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#65 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 def collation; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#69 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 def collation=(value); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#65 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 def comment; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#69 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 def comment=(value); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#65 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 def default; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#69 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 def default=(value); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#65 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 + def if_exists; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 + def if_exists=(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 + def if_not_exists; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 + def if_not_exists=(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 def limit; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#69 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 def limit=(value); end # Returns the value of attribute name @@ -10871,10 +11878,10 @@ class ActiveRecord::ConnectionAdapters::ColumnDefinition < ::Struct # @return [Object] the newly set value def name=(_); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#65 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 def null; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#69 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 def null=(value); end # Returns the value of attribute options @@ -10888,21 +11895,21 @@ class ActiveRecord::ConnectionAdapters::ColumnDefinition < ::Struct # @return [Object] the newly set value def options=(_); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#65 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 def precision; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#69 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 def precision=(value); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#59 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#93 def primary_key?; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#65 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 def scale; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#69 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 def scale=(value); end # Returns the value of attribute sql_type @@ -10936,7 +11943,10 @@ class ActiveRecord::ConnectionAdapters::ColumnDefinition < ::Struct end end -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#240 +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#80 +ActiveRecord::ConnectionAdapters::ColumnDefinition::OPTION_NAMES = T.let(T.unsafe(nil), Array) + +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#300 module ActiveRecord::ConnectionAdapters::ColumnMethods extend ::ActiveSupport::Concern @@ -10945,7 +11955,7 @@ module ActiveRecord::ConnectionAdapters::ColumnMethods # Appends a primary key definition to the table definition. # Can be called multiple times, but this is probably not a good idea. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#245 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#305 def primary_key(name, type = T.unsafe(nil), **options); end end @@ -10953,10 +11963,12 @@ end module ActiveRecord::ConnectionAdapters::ColumnMethods::ClassMethods private - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#269 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#329 def define_column_methods(*column_types); end end +# = Active Record Connection Handler +# # ConnectionHandler is a collection of ConnectionPool objects. It is used # for keeping separate connection pools that connect to different databases. # @@ -11005,11 +12017,11 @@ end # about the model. The model needs to pass a connection specification name to the handler, # in order to look up the correct connection pool. # -# source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#55 +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#57 class ActiveRecord::ConnectionAdapters::ConnectionHandler # @return [ConnectionHandler] a new instance of ConnectionHandler # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#75 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#77 def initialize; end # Returns true if there are any active connections among the connection @@ -11017,27 +12029,27 @@ class ActiveRecord::ConnectionAdapters::ConnectionHandler # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#161 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#173 def active_connections?(role = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#117 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#97 def all_connection_pools; end # Returns any connections in use by the current thread back to the pool, # and also returns connections to the pool cached by threads that are no # longer alive. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#168 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#185 def clear_active_connections!(role = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#179 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#206 def clear_all_connections!(role = T.unsafe(nil)); end # Clears the cache which maps classes. # # See ConnectionPool#clear_reloadable_connections! for details. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#175 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#197 def clear_reloadable_connections!(role = T.unsafe(nil)); end # Returns true if a connection that's accessible to this class has @@ -11045,78 +12057,84 @@ class ActiveRecord::ConnectionAdapters::ConnectionHandler # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#216 - def connected?(spec_name, role: T.unsafe(nil), shard: T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#251 + def connected?(connection_name, role: T.unsafe(nil), shard: T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#121 + # Returns the pools for a connection handler and given role. If +:all+ is passed, + # all pools belonging to the connection handler will be returned. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#107 def connection_pool_list(role = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#113 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#93 def connection_pool_names; end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#121 + # Returns the pools for a connection handler and given role. If +:all+ is passed, + # all pools belonging to the connection handler will be returned. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#107 def connection_pools(role = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#126 - def establish_connection(config, owner_name: T.unsafe(nil), role: T.unsafe(nil), shard: T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#120 + def each_connection_pool(role = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#131 + def establish_connection(config, owner_name: T.unsafe(nil), role: T.unsafe(nil), shard: T.unsafe(nil), clobber: T.unsafe(nil)); end # Disconnects all currently idle connections. # # See ConnectionPool#flush! for details. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#186 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#218 def flush_idle_connections!(role = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#83 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#85 def prevent_writes; end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#87 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#89 def prevent_writes=(prevent_writes); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#221 - def remove_connection_pool(owner, role: T.unsafe(nil), shard: T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#256 + def remove_connection_pool(connection_name, role: T.unsafe(nil), shard: T.unsafe(nil)); end # Locate the connection of the nearest super class. This can be an # active or defined connection: if it is the latter, it will be # opened and set as the active connection for the class it was defined # for (not necessarily the current class). # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#194 - def retrieve_connection(spec_name, role: T.unsafe(nil), shard: T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#231 + def retrieve_connection(connection_name, role: T.unsafe(nil), shard: T.unsafe(nil)); end - # Retrieving the connection pool happens a lot, so we cache it in @owner_to_pool_manager. + # Retrieving the connection pool happens a lot, so we cache it in @connection_name_to_pool_manager. # This makes retrieving the connection pool O(1) once the process is warm. # When a connection is established or removed, we invalidate the cache. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#235 - def retrieve_connection_pool(owner, role: T.unsafe(nil), shard: T.unsafe(nil)); end - - # Prevent writing to the database regardless of role. - # - # In some cases you may want to prevent writes to the database - # even if you are on a database that can write. +while_preventing_writes+ - # will prevent writes to the database for the duration of the block. - # - # This method does not provide the same protection as a readonly - # user and is meant to be a safeguard against accidental writes. - # - # See +READ_QUERY+ for the queries that are blocked by this - # method. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#102 - def while_preventing_writes(enabled = T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#265 + def retrieve_connection_pool(connection_name, role: T.unsafe(nil), shard: T.unsafe(nil)); end private - # Returns the pool manager for an owner. + # Returns the value of attribute connection_name_to_pool_manager. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#244 - def get_pool_manager(owner); end + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#271 + def connection_name_to_pool_manager; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#287 + def deprecation_for_pool_handling(method); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#356 + def determine_owner_name(owner_name, config); end - # Returns the value of attribute owner_to_pool_manager. + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#304 + def disconnect_pool_from_pool_manager(pool_manager, role, shard); end + + # Returns the pool manager for a connection name / identifier. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#241 - def owner_to_pool_manager; end + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#274 + def get_pool_manager(connection_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#283 + def pool_managers; end # Returns an instance of PoolConfig for a given adapter. # Accepts a hash one layer deep that contains all connection information. @@ -11130,34 +12148,41 @@ class ActiveRecord::ConnectionAdapters::ConnectionHandler # # @raise [AdapterNotSpecified] # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#258 - def resolve_pool_config(config, owner_name, role, shard); end + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#323 + def resolve_pool_config(config, connection_name, role, shard); end + + # Get the existing pool manager or initialize and assign a new one. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#279 + def set_pool_manager(connection_name); end end -# source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#56 +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#58 ActiveRecord::ConnectionAdapters::ConnectionHandler::FINALIZER = T.let(T.unsafe(nil), Proc) -# source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#59 -class ActiveRecord::ConnectionAdapters::ConnectionHandler::StringConnectionOwner - # @return [StringConnectionOwner] a new instance of StringConnectionOwner +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#61 +class ActiveRecord::ConnectionAdapters::ConnectionHandler::StringConnectionName + # @return [StringConnectionName] a new instance of StringConnectionName # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#62 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#64 def initialize(name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#70 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#72 def current_preventing_writes; end # Returns the value of attribute name. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#60 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#62 def name; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#66 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#68 def primary_class?; end end +# = Active Record Connection Pool +# # Connection pool base class for managing Active Record database # connections. # @@ -11172,19 +12197,17 @@ end # handle cases in which there are more threads than connections: if all # connections have been checked out, and a thread tries to checkout a # connection anyway, then ConnectionPool will wait until some other thread -# has checked in a connection. +# has checked in a connection, or the +checkout_timeout+ has expired. # # == Obtaining (checking out) a connection # # Connections can be obtained and used from a connection pool in several # ways: # -# 1. Simply use {ActiveRecord::Base.connection}[rdoc-ref:ConnectionHandling.connection] -# as with Active Record 2.1 and -# earlier (pre-connection-pooling). Eventually, when you're done with -# the connection(s) and wish it to be returned to the pool, you call -# {ActiveRecord::Base.clear_active_connections!}[rdoc-ref:ConnectionAdapters::ConnectionHandler#clear_active_connections!]. -# This will be the default behavior for Active Record when used in conjunction with +# 1. Simply use {ActiveRecord::Base.connection}[rdoc-ref:ConnectionHandling.connection]. +# When you're done with the connection(s) and wish it to be returned to the pool, you call +# {ActiveRecord::Base.connection_handler.clear_active_connections!}[rdoc-ref:ConnectionAdapters::ConnectionHandler#clear_active_connections!]. +# This is the default behavior for Active Record when used in conjunction with # Action Pack's request handling cycle. # 2. Manually check out a connection from the pool with # {ActiveRecord::Base.connection_pool.checkout}[rdoc-ref:#checkout]. You are responsible for @@ -11197,6 +12220,12 @@ end # Connections in the pool are actually AbstractAdapter objects (or objects # compatible with AbstractAdapter's interface). # +# While a thread has a connection checked out from the pool using one of the +# above three methods, that connection will automatically be the one used +# by ActiveRecord queries executing on that thread. It is not required to +# explicitly pass the checked out connection to \Rails models or queries, for +# example. +# # == Options # # There are several connection-pooling-related options that you can add to @@ -11245,24 +12274,24 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#189 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#196 def active_connection?; end # Returns the value of attribute async_executor. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#108 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#110 def async_executor; end # Returns the value of attribute automatic_reconnect. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#107 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#109 def automatic_reconnect; end # Sets the attribute automatic_reconnect # # @param value the value to set the attribute automatic_reconnect to. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#107 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#109 def automatic_reconnect=(_arg0); end # Check-in a database connection back into the pool, indicating that you @@ -11271,7 +12300,7 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # +conn+: an AbstractAdapter object, which was obtained by earlier by # calling #checkout on this pool. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#349 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#363 def checkin(conn); end # Check-out a database connection from the pool, indicating that you want @@ -11289,19 +12318,19 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # Raises: # - ActiveRecord::ConnectionTimeoutError no connection can be obtained from the pool. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#340 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#352 def checkout(checkout_timeout = T.unsafe(nil)); end # Returns the value of attribute checkout_timeout. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#107 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#109 def checkout_timeout; end # Sets the attribute checkout_timeout # # @param value the value to set the attribute checkout_timeout to. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#107 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#109 def checkout_timeout=(_arg0); end # Clears the cache which maps classes and re-connects connections that @@ -11312,7 +12341,7 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # connections in the pool within a timeout interval (default duration is # spec.db_config.checkout_timeout * 2 seconds). # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#298 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#310 def clear_reloadable_connections(raise_on_acquisition_timeout = T.unsafe(nil)); end # Clears the cache which maps classes and re-connects connections that @@ -11324,14 +12353,14 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # clears the cache and reloads connections without any regard for other # connection owning threads. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#322 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#334 def clear_reloadable_connections!; end # Returns true if a connection has already been opened. # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#221 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#233 def connected?; end # Retrieve the connection associated with the current thread, or call @@ -11340,17 +12369,13 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # #connection can be called any number of times; the connection is # held in a cache keyed by a thread. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#180 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#181 def connection; end - # Returns the value of attribute connection_class. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#108 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#185 def connection_class; end - # Returns the value of attribute connection_class. - # - # source://activesupport/7.0.6/lib/active_support/deprecation/method_wrappers.rb#63 + # source://activesupport/7.1.3.2/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. @@ -11365,12 +12390,12 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # thread-safety guarantees of the underlying method. Many of the methods # on connection adapter classes are inherently multi-thread unsafe. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#236 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#248 def connections; end # Returns the value of attribute db_config. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#108 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#110 def db_config; end # Discards all connections in the pool (even if they're currently @@ -11379,12 +12404,12 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # # See AbstractAdapter#discard! # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#277 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#289 def discard!; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#287 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#299 def discarded?; end # Disconnects all connections in the pool, and clears the pool. @@ -11394,7 +12419,7 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # connections in the pool within a timeout interval (default duration is # spec.db_config.checkout_timeout * 2 seconds). # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#246 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#258 def disconnect(raise_on_acquisition_timeout = T.unsafe(nil)); end # Disconnects all connections in the pool, and clears the pool. @@ -11404,43 +12429,43 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # spec.db_config.checkout_timeout * 2 seconds), then the pool is forcefully # disconnected without any regard for other connection owning threads. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#268 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#280 def disconnect!; end # Disconnect all connections that have been idle for at least # +minimum_idle+ seconds. Connections currently checked out, or that were # checked in less than +minimum_idle+ seconds ago, are unaffected. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#420 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#435 def flush(minimum_idle = T.unsafe(nil)); end # Disconnect all currently idle connections. Connections currently checked # out are unaffected. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#442 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#457 def flush!; end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#167 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#164 def lock_thread=(lock_thread); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#447 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#462 def num_waiting_in_queue; end # Returns the value of attribute pool_config. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#108 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#110 def pool_config; end # Recover lost connections for the pool. A lost connection can occur if # a programmer forgets to checkin a connection at the end of a thread # or a thread dies unexpectedly. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#397 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#412 def reap; end # Returns the value of attribute reaper. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#108 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#110 def reaper; end # Signal that the thread is finished with the current connection. @@ -11451,53 +12476,57 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # #connection or #with_connection methods, connections obtained through # #checkout will not be automatically released. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#200 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#207 def release_connection(owner_thread = T.unsafe(nil)); end # Remove a connection from the connection pool. The connection will # remain open and active but will no longer be managed by this pool. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#365 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#380 def remove(conn); end # Returns the value of attribute role. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#108 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#110 def role; end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#469 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#483 def schedule_query(future_result); end # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#112 - def schema_cache(*_arg0, **_arg1, &_arg2); end + def schema_reflection(*_arg0, **_arg1, &_arg2); end # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#112 - def schema_cache=(arg); end + def schema_reflection=(arg); end # Returns the value of attribute shard. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#108 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#110 def shard; end # Returns the value of attribute size. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#108 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#110 def size; end - # Return connection pool's usage statistic - # Example: + # Returns the connection pool's usage statistic. # # ActiveRecord::Base.connection_pool.stat # => { size: 15, connections: 1, busy: 1, dead: 0, idle: 0, waiting: 0, checkout_timeout: 5 } # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#455 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#469 def stat; end - # If a connection obtained through #connection or #with_connection methods - # already exists yield it to the block. If no such connection - # exists checkout a connection, yield it to the block, and checkin the - # connection when finished. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#210 + # Yields a connection from the connection pool to the block. If no connection + # is already checked out by the current thread, a connection will be checked + # out from the pool, yielded to the block, and then returned to the pool when + # the block is finished. If a connection has already been checked out on the + # current thread, such as via #connection or #with_connection, that existing + # connection will be the one yielded and it will not be returned to the pool + # automatically at the end of the block; it is expected that such an existing + # connection will be properly returned to the pool by the code that checked + # it out. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#222 def with_connection; end private @@ -11514,36 +12543,36 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # Implementation detail: the connection returned by +acquire_connection+ # will already be "+connection.lease+ -ed" to the current thread. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#633 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#647 def acquire_connection(checkout_timeout); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#693 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#716 def adopt_connection(conn); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#527 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#541 def attempt_to_checkout_all_existing_connections(raise_on_acquisition_timeout = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#475 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#489 def build_async_executor; end # -- # this is unfortunately not concurrent # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#493 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#507 def bulk_make_new_connections(num_new_conns_needed); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#703 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#726 def checkout_and_verify(c); end # -- # Must be called in a synchronize block. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#573 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#587 def checkout_for_exclusive_access(checkout_timeout); end # @raise [ConnectionNotEstablished] # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#698 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#721 def checkout_new_connection; end # -- @@ -11552,25 +12581,25 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # This hook-in method allows for easier monkey-patching fixes needed by # JRuby users that use Fibers. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#508 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#522 def connection_cache_key(thread); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#512 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#526 def current_thread; end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#655 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#675 def new_connection; end # -- # if owner_thread param is omitted, this must be called in synchronize block # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#650 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#670 def release(conn, owner_thread = T.unsafe(nil)); end # -- # if owner_thread param is omitted, this must be called in synchronize block # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#650 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#670 def remove_connection_from_thread_cache(conn, owner_thread = T.unsafe(nil)); end # If the pool is not at a @size limit, establish new connection. Connecting @@ -11579,7 +12608,7 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # Implementation constraint: a newly established connection returned by this # method must be in the +.leased+ state. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#666 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#689 def try_to_checkout_new_connection; end # Take control of all existing connections so a "group" action such as @@ -11587,42 +12616,42 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # wrap it in +synchronize+ because some pool's actions are allowed # to be performed outside of the main +synchronize+ block. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#520 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#534 def with_exclusively_acquired_all_connections(raise_on_acquisition_timeout = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#593 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#607 def with_new_connections_blocked; end end # Adds the ability to turn a basic fair FIFO queue into one # biased to some thread. # -# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#136 +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#138 module ActiveRecord::ConnectionAdapters::ConnectionPool::BiasableQueue - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#176 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#178 def with_a_bias_for(thread); end end -# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#137 +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#139 class ActiveRecord::ConnectionAdapters::ConnectionPool::BiasableQueue::BiasedConditionVariable # semantics of condition variables guarantee that +broadcast+, +broadcast_on_biased+, # +signal+ and +wait+ methods are only called while holding a lock # # @return [BiasedConditionVariable] a new instance of BiasedConditionVariable # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#140 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#142 def initialize(lock, other_cond, preferred_thread); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#147 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#149 def broadcast; end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#152 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#154 def broadcast_on_biased; end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#157 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#159 def signal; end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#166 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#168 def wait(timeout); end end @@ -11632,52 +12661,54 @@ end # @lock as the main pool) so that a returned connection is already # leased and there is no need to re-enter synchronized block. # -# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#197 +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#199 class ActiveRecord::ConnectionAdapters::ConnectionPool::ConnectionLeasingQueue < ::ActiveRecord::ConnectionAdapters::ConnectionPool::Queue include ::ActiveRecord::ConnectionAdapters::ConnectionPool::BiasableQueue private - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#201 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#203 def internal_poll(timeout); end end +# = Active Record Connection Pool \Queue +# # Threadsafe, fair, LIFO queue. Meant to be used by ConnectionPool # with which it shares a Monitor. # -# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#11 +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#13 class ActiveRecord::ConnectionAdapters::ConnectionPool::Queue # @return [Queue] a new instance of Queue # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#12 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#14 def initialize(lock = T.unsafe(nil)); end # Add +element+ to the queue. Never blocks. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#35 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#37 def add(element); end # Test if any threads are currently waiting on the queue. # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#20 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#22 def any_waiting?; end # Remove all elements from the queue. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#50 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#52 def clear; end # If +element+ is in the queue, remove and return it, or +nil+. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#43 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#45 def delete(element); end # Returns the number of threads currently waiting on this # queue. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#28 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#30 def num_waiting; end # Remove the head of the queue. @@ -11695,7 +12726,7 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool::Queue # - ActiveRecord::ConnectionTimeoutError if +timeout+ is given and no element # becomes available within +timeout+ seconds, # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#70 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#72 def poll(timeout = T.unsafe(nil)); end private @@ -11704,7 +12735,7 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool::Queue # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#84 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#86 def any?; end # A thread can remove an element from the queue without @@ -11714,73 +12745,75 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool::Queue # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#92 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#94 def can_remove_no_wait?; end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#75 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#77 def internal_poll(timeout); end # Remove and return the head of the queue if the number of # available elements is strictly greater than the number of # threads currently waiting. Otherwise, return +nil+. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#104 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#106 def no_wait_poll; end # Removes and returns the head of the queue if possible, or +nil+. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#97 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#99 def remove; end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#79 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#81 def synchronize(&block); end # Waits on the queue up to +timeout+ seconds, then removes and # returns the head of the queue. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#110 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#112 def wait_poll(timeout); end end +# = Active Record Connection Pool \Reaper +# # Every +frequency+ seconds, the reaper will call +reap+ and +flush+ on # +pool+. A reaper instantiated with a zero frequency will never reap # the connection pool. # # Configure the frequency by setting +reaping_frequency+ in your database -# yaml file (default 60 seconds). +# YAML file (default 60 seconds). # -# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#15 +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#17 class ActiveRecord::ConnectionAdapters::ConnectionPool::Reaper # @return [Reaper] a new instance of Reaper # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#18 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#20 def initialize(pool, frequency); end # Returns the value of attribute frequency. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#16 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#18 def frequency; end # Returns the value of attribute pool. # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#16 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#18 def pool; end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#69 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#71 def run; end class << self - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#28 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#30 def register_pool(pool, frequency); end private - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#39 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#41 def spawn_thread(frequency); end end end -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#84 +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#120 class ActiveRecord::ConnectionAdapters::CreateIndexDefinition < ::Struct # Returns the value of attribute algorithm # @@ -11828,7 +12861,7 @@ end module ActiveRecord::ConnectionAdapters::DatabaseLimits # Returns the maximum length of an index name. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_limits.rb#16 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_limits.rb#21 def index_name_length; end # source://activerecord//lib/active_record/connection_adapters/abstract/database_limits.rb#6 @@ -11836,12 +12869,17 @@ module ActiveRecord::ConnectionAdapters::DatabaseLimits # Returns the maximum length of a table alias. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_limits.rb#11 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_limits.rb#16 def table_alias_length; end + # Returns the maximum length of a table name. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_limits.rb#11 + def table_name_length; end + private - # source://activerecord//lib/active_record/connection_adapters/abstract/database_limits.rb#21 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_limits.rb#26 def bind_params_length; end end @@ -11853,12 +12891,12 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # Register a record with the current transaction so that its after_commit and after_rollback callbacks # can be called. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#345 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#390 def add_transaction_record(record, ensure_finalize = T.unsafe(nil)); end # Begins the transaction (and turns off auto-committing). # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#350 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#395 def begin_db_transaction; end # Begins the transaction with the isolation level set. Raises an error by @@ -11867,24 +12905,24 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # # @raise [ActiveRecord::TransactionIsolationError] # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#364 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#409 def begin_isolated_db_transaction(isolation); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#352 def begin_transaction(*_arg0, **_arg1, &_arg2); end # This is used in the StatementCache object. It returns an object that # can be used to query the database repeatedly. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#49 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#54 def cacheable_query(klass, arel); end # Commits the transaction (and turns on auto-committing). # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#369 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#414 def commit_db_transaction; end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#352 def commit_transaction(*_arg0, **_arg1, &_arg2); end # Executes an INSERT query and returns the new record's ID @@ -11895,81 +12933,102 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # # If the next id was calculated in advance (as in Oracle), it should be # passed in as +id_value+. + # Some adapters support the `returning` keyword argument which allows defining the return value of the method: + # `nil` is the default value and maintains default behavior. If an array of column names is passed - + # an array of is returned from the method representing values of the specified columns from the inserted row. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#165 - def create(arel, name = T.unsafe(nil), pk = T.unsafe(nil), id_value = T.unsafe(nil), sequence_name = T.unsafe(nil), binds = T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#189 + def create(arel, name = T.unsafe(nil), pk = T.unsafe(nil), id_value = T.unsafe(nil), sequence_name = T.unsafe(nil), binds = T.unsafe(nil), returning: T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#352 def current_transaction(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#383 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#436 def default_sequence_name(table, column); end # Executes the delete statement and returns the number of rows affected. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#179 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#206 def delete(arel, name = T.unsafe(nil), binds = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#352 + def dirty_current_transaction(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#352 def disable_lazy_transactions!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#415 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#468 def empty_insert_statement_value(primary_key = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#352 def enable_lazy_transactions!(*_arg0, **_arg1, &_arg2); end # Executes delete +sql+ statement in the context of this connection using # +binds+ as the bind substitutes. +name+ is logged along with # the executed +sql+ statement. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#138 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#159 def exec_delete(sql, name = T.unsafe(nil), binds = T.unsafe(nil)); end # Executes insert +sql+ statement in the context of this connection using # +binds+ as the bind substitutes. +name+ is logged along with # the executed +sql+ statement. + # Some adapters support the `returning` keyword argument which allows to control the result of the query: + # `nil` is the default value and maintains default behavior. If an array of column names is passed - + # the result will contain values of the specified columns from the inserted row. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#130 - def exec_insert(sql, name = T.unsafe(nil), binds = T.unsafe(nil), pk = T.unsafe(nil), sequence_name = T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#151 + def exec_insert(sql, name = T.unsafe(nil), binds = T.unsafe(nil), pk = T.unsafe(nil), sequence_name = T.unsafe(nil), returning: T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#149 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#170 def exec_insert_all(sql, name); end # Executes +sql+ statement in the context of this connection using # +binds+ as the bind substitutes. +name+ is logged along with # the executed +sql+ statement. # - # @raise [NotImplementedError] + # Note: the query is assumed to have side effects and the query cache + # will be cleared. If the query is read-only, consider using #select_all + # instead. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#123 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#141 def exec_query(sql, name = T.unsafe(nil), binds = T.unsafe(nil), prepare: T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#377 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#430 + def exec_restart_db_transaction; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#424 def exec_rollback_db_transaction; end # Executes update +sql+ statement in the context of this connection using # +binds+ as the bind substitutes. +name+ is logged along with # the executed +sql+ statement. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#145 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#166 def exec_update(sql, name = T.unsafe(nil), binds = T.unsafe(nil)); end # Executes the SQL statement in the context of this connection and returns # the raw result from the connection adapter. + # + # Setting +allow_retry+ to true causes the db to reconnect and retry + # executing the SQL statement in case of a connection-related exception. + # This option should only be enabled for known idempotent queries. + # + # Note: the query is assumed to have side effects and the query cache + # will be cleared. If the query is read-only, consider using #select_all + # instead. + # # Note: depending on your database connector, the result returned by this - # method may be manually memory managed. Consider using the exec_query + # method may be manually memory managed. Consider using #exec_query # wrapper instead. # - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#116 - def execute(sql, name = T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#130 + def execute(sql, name = T.unsafe(nil), allow_retry: T.unsafe(nil)); end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#153 - def explain(arel, binds = T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#174 + def explain(arel, binds = T.unsafe(nil), options = T.unsafe(nil)); end # Returns an Arel SQL literal for the CURRENT_TIMESTAMP for usage with # arbitrary precision date/time columns. @@ -11977,7 +13036,7 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # Adapters supporting datetime with precision should override this to # provide as much precision as is available. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#453 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#506 def high_precision_current_timestamp; end # Executes an INSERT query and returns the new record's ID @@ -11988,58 +13047,69 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # # If the next id was calculated in advance (as in Oracle), it should be # passed in as +id_value+. + # Some adapters support the `returning` keyword argument which allows defining the return value of the method: + # `nil` is the default value and maintains default behavior. If an array of column names is passed - + # an array of is returned from the method representing values of the specified columns from the inserted row. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#165 - def insert(arel, name = T.unsafe(nil), pk = T.unsafe(nil), id_value = T.unsafe(nil), sequence_name = T.unsafe(nil), binds = T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#189 + def insert(arel, name = T.unsafe(nil), pk = T.unsafe(nil), id_value = T.unsafe(nil), sequence_name = T.unsafe(nil), binds = T.unsafe(nil), returning: T.unsafe(nil)); end # Inserts the given fixture into the table. Overridden in adapters that require # something beyond a simple insert (e.g. Oracle). # Most of adapters should implement +insert_fixtures_set+ that leverages bulk SQL insert. # We keep this method to provide fallback - # for databases like sqlite that do not support bulk inserts. + # for databases like SQLite that do not support bulk inserts. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#397 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#450 def insert_fixture(fixture, table_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#401 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#454 def insert_fixtures_set(fixture_set, tables_to_delete = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#328 + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#510 + def internal_exec_query(sql, name = T.unsafe(nil), binds = T.unsafe(nil), prepare: T.unsafe(nil), async: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#357 def mark_transaction_written_if_write(sql); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#352 def materialize_transactions(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#352 def open_transactions(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#102 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#107 def query(sql, name = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#94 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#99 def query_value(sql, name = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#98 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#103 def query_values(sql, name = T.unsafe(nil)); end # Set the sequence to the max value of the table's column. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#388 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#441 def reset_sequence!(table, column, sequence = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#339 - def reset_transaction; end + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#368 + def reset_transaction(restore: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#426 + def restart_db_transaction; end # Rolls back the transaction (and turns on auto-committing). Must be # done if the transaction block raises an exception or returns false. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#373 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#418 def rollback_db_transaction; end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#379 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#432 def rollback_to_savepoint(name = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#352 def rollback_transaction(*_arg0, **_arg1, &_arg2); end # Sanitizes the given LIMIT parameter in order to prevent SQL injection. @@ -12049,35 +13119,35 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # # Returns Integer and Arel::Nodes::SqlLiteral limits as is. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#425 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#478 def sanitize_limit(limit); end # Returns an ActiveRecord::Result instance. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#62 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#67 def select_all(arel, name = T.unsafe(nil), binds = T.unsafe(nil), preparable: T.unsafe(nil), async: T.unsafe(nil)); end # Returns a record hash with the column names as keys and column values # as values. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#73 - def select_one(arel, name = T.unsafe(nil), binds = T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#78 + def select_one(arel, name = T.unsafe(nil), binds = T.unsafe(nil), async: T.unsafe(nil)); end # Returns an array of arrays containing the field values. # Order is the same as that returned by +columns+. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#90 - def select_rows(arel, name = T.unsafe(nil), binds = T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#95 + def select_rows(arel, name = T.unsafe(nil), binds = T.unsafe(nil), async: T.unsafe(nil)); end # Returns a single value from a record # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#78 - def select_value(arel, name = T.unsafe(nil), binds = T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#83 + def select_value(arel, name = T.unsafe(nil), binds = T.unsafe(nil), async: T.unsafe(nil)); end # Returns an array of the values of the first column in a select: # select_values("SELECT id FROM companies LIMIT 3") => [1,2,3] # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#84 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#89 def select_values(arel, name = T.unsafe(nil), binds = T.unsafe(nil)); end # Converts an arel AST to SQL @@ -12190,44 +13260,45 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # * You are joining an existing open transaction # * You are creating a nested (savepoint) transaction # - # The mysql2 and postgresql adapters support setting the transaction + # The mysql2, trilogy, and postgresql adapters support setting the transaction # isolation level. + # :args: (requires_new: nil, isolation: nil, &block) # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#309 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#337 def transaction(requires_new: T.unsafe(nil), isolation: T.unsafe(nil), joinable: T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#352 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#397 def transaction_isolation_levels; end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#322 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#350 def transaction_manager; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#335 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#364 def transaction_open?; end # Executes the truncate statement. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#185 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#212 def truncate(table_name, name = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#189 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#216 def truncate_tables(*table_names); end # Executes the update statement and returns the number of rows affected. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#173 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#200 def update(arel, name = T.unsafe(nil), binds = T.unsafe(nil)); end # Fixture value is quoted by Arel, however scalar values # are not quotable. In this case we want to convert # the column value to YAML. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#436 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#489 def with_yaml_fallback(value); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#352 def within_new_transaction(*_arg0, **_arg1, &_arg2); end # Determines whether the SQL statement is a write query. @@ -12235,62 +13306,76 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # @raise [NotImplementedError] # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#107 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#112 def write_query?(sql); end private - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#576 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#668 def arel_from_relation(relation); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#471 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#541 def build_fixture_sql(fixtures, table_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#513 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#583 def build_fixture_statements(fixture_set); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#520 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#590 def build_truncate_statement(table_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#524 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#594 def build_truncate_statements(table_names); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#534 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#604 def combine_multi_statements(total_sql); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#467 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#537 def default_insert_value(column); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#458 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#524 def execute_batch(statements, name = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#567 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#676 + def extract_table_ref_from_insert_sql(sql); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#515 + def internal_execute(sql, name = T.unsafe(nil), allow_retry: T.unsafe(nil), materialize_transactions: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#655 def last_inserted_id(result); end + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#530 + def raw_execute(sql, name, async: T.unsafe(nil), allow_retry: T.unsafe(nil), materialize_transactions: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#659 + def returning_column_values(result); end + # Returns an ActiveRecord::Result instance. # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#539 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#609 def select(sql, name = T.unsafe(nil), binds = T.unsafe(nil), prepare: T.unsafe(nil), async: T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#571 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#663 def single_value_from_rows(rows); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#563 - def sql_for_insert(sql, pk, binds); end + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#638 + def sql_for_insert(sql, pk, binds, returning); end # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#17 def to_sql_and_binds(arel_or_sql_string, binds = T.unsafe(nil), preparable = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#530 + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#600 def with_multi_statements; end end -# source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#464 +# source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#534 ActiveRecord::ConnectionAdapters::DatabaseStatements::DEFAULT_INSERT_VALUE = T.let(T.unsafe(nil), Arel::Nodes::SqlLiteral) # This is a safe default, even if not high precision on all databases # -# source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#445 +# source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#498 ActiveRecord::ConnectionAdapters::DatabaseStatements::HIGH_PRECISION_CURRENT_TIMESTAMP = T.let(T.unsafe(nil), Arel::Nodes::SqlLiteral) # source://activerecord//lib/active_record/connection_adapters/deduplicable.rb#5 @@ -12320,27 +13405,27 @@ module ActiveRecord::ConnectionAdapters::Deduplicable::ClassMethods def registry; end end -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#88 +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#124 class ActiveRecord::ConnectionAdapters::ForeignKeyDefinition < ::Struct - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#93 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#129 def column; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#113 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#149 def custom_primary_key?; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#109 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#145 def deferrable; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#126 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#162 def defined_for?(to_table: T.unsafe(nil), validate: T.unsafe(nil), **options); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#122 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#158 def export_name_on_schema_dump?; end # Returns the value of attribute from_table @@ -12354,13 +13439,13 @@ class ActiveRecord::ConnectionAdapters::ForeignKeyDefinition < ::Struct # @return [Object] the newly set value def from_table=(_); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#89 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#125 def name; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#101 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#137 def on_delete; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#105 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#141 def on_update; end # Returns the value of attribute options @@ -12374,7 +13459,7 @@ class ActiveRecord::ConnectionAdapters::ForeignKeyDefinition < ::Struct # @return [Object] the newly set value def options=(_); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#97 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#133 def primary_key; end # Returns the value of attribute to_table @@ -12390,17 +13475,17 @@ class ActiveRecord::ConnectionAdapters::ForeignKeyDefinition < ::Struct # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#117 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#153 def validate?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#117 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#153 def validated?; end private - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#133 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#169 def default_primary_key; end class << self @@ -12416,141 +13501,161 @@ end # this type are typically created and returned by methods in database # adapters. e.g. ActiveRecord::ConnectionAdapters::MySQL::SchemaStatements#indexes # -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#8 +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 class ActiveRecord::ConnectionAdapters::IndexDefinition # @return [IndexDefinition] a new instance of IndexDefinition # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#11 - def initialize(table, name, unique = T.unsafe(nil), columns = T.unsafe(nil), lengths: T.unsafe(nil), orders: T.unsafe(nil), opclasses: T.unsafe(nil), where: T.unsafe(nil), type: T.unsafe(nil), using: T.unsafe(nil), comment: T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#12 + def initialize(table, name, unique = T.unsafe(nil), columns = T.unsafe(nil), lengths: T.unsafe(nil), orders: T.unsafe(nil), opclasses: T.unsafe(nil), where: T.unsafe(nil), type: T.unsafe(nil), using: T.unsafe(nil), include: T.unsafe(nil), nulls_not_distinct: T.unsafe(nil), comment: T.unsafe(nil), valid: T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#36 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#47 def column_options; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 def columns; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 def comment; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#55 + def defined_for?(columns = T.unsafe(nil), name: T.unsafe(nil), unique: T.unsafe(nil), valid: T.unsafe(nil), include: T.unsafe(nil), nulls_not_distinct: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def include; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 def lengths; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 def name; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def nulls_not_distinct; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 def opclasses; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 def orders; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 def table; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 def type; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 def unique; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 def using; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 - def where; end - - private + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def valid; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#45 - def concise_options(options); end -end - -# source://activerecord//lib/active_record/connection_adapters/legacy_pool_manager.rb#5 -class ActiveRecord::ConnectionAdapters::LegacyPoolManager - # @return [LegacyPoolManager] a new instance of LegacyPoolManager + # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/legacy_pool_manager.rb#6 - def initialize; end - - # source://activerecord//lib/active_record/connection_adapters/legacy_pool_manager.rb#22 - def get_pool_config(_, shard); end - - # source://activerecord//lib/active_record/connection_adapters/legacy_pool_manager.rb#14 - def pool_configs(_ = T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#43 + def valid?; end - # source://activerecord//lib/active_record/connection_adapters/legacy_pool_manager.rb#18 - def remove_pool_config(_, shard); end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def where; end - # source://activerecord//lib/active_record/connection_adapters/legacy_pool_manager.rb#26 - def set_pool_config(role, shard, pool_config); end + private - # source://activerecord//lib/active_record/connection_adapters/legacy_pool_manager.rb#10 - def shard_names; end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#66 + def concise_options(options); end end -# source://activerecord//lib/active_record/connection_adapters/column.rb#106 +# source://activerecord//lib/active_record/connection_adapters/column.rb#115 class ActiveRecord::ConnectionAdapters::NullColumn < ::ActiveRecord::ConnectionAdapters::Column # @return [NullColumn] a new instance of NullColumn # - # source://activerecord//lib/active_record/connection_adapters/column.rb#107 + # source://activerecord//lib/active_record/connection_adapters/column.rb#116 def initialize(name, **_arg1); end end -# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#31 +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#15 class ActiveRecord::ConnectionAdapters::NullPool include ::ActiveRecord::ConnectionAdapters::AbstractPool - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#39 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#32 def async_executor; end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#37 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#30 def checkin(_); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#36 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#29 def connection_class; end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#38 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#33 + def db_config; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#31 def remove(_); end - # Returns the value of attribute schema_cache. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#34 - def schema_cache; end + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#25 + def schema_reflection; end +end - # Sets the attribute schema_cache - # - # @param value the value to set the attribute schema_cache to. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#34 - def schema_cache=(_arg0); end +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#23 +ActiveRecord::ConnectionAdapters::NullPool::NULL_CONFIG = T.let(T.unsafe(nil), ActiveRecord::ConnectionAdapters::NullPool::NullConfig) + +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#18 +class ActiveRecord::ConnectionAdapters::NullPool::NullConfig + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#19 + def method_missing(*_arg0); end end -# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#76 +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#106 class ActiveRecord::ConnectionAdapters::NullTransaction # @return [NullTransaction] a new instance of NullTransaction # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#77 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#107 def initialize; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#82 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#112 def add_record(record, _ = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#79 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#109 def closed?; end + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#115 + def dirty!; end + # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#81 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#114 + def dirty?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#117 + def invalidate!; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#116 + def invalidated?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#111 def joinable?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#80 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#110 def open?; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#78 + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#113 + def restartable?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#108 def state; end end @@ -12560,35 +13665,42 @@ class ActiveRecord::ConnectionAdapters::PoolConfig # @return [PoolConfig] a new instance of PoolConfig # - # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#20 + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#29 def initialize(connection_class, db_config, role, shard); end # Returns the value of attribute connection_class. # - # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#8 + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#10 def connection_class; end - # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#30 - def connection_specification_name; end + # Sets the attribute connection_class + # + # @param value the value to set the attribute connection_class to. + # + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#10 + def connection_class=(_arg0); end + + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#39 + def connection_name; end # Returns the value of attribute db_config. # # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#8 def db_config; end - # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#59 + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#68 def discard_pool!; end - # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#38 - def disconnect!; end + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#47 + def disconnect!(automatic_reconnect: T.unsafe(nil)); end - # source://mutex_m/0.1.2/mutex_m.rb#93 + # source://mutex_m/0.2.0/lib/mutex_m.rb#91 def lock; end - # source://mutex_m/0.1.2/mutex_m.rb#83 + # source://mutex_m/0.2.0/lib/mutex_m.rb#81 def locked?; end - # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#53 + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#62 def pool; end # Returns the value of attribute role. @@ -12596,39 +13708,40 @@ class ActiveRecord::ConnectionAdapters::PoolConfig # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#8 def role; end - # Returns the value of attribute schema_cache. - # - # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#9 - def schema_cache; end + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#12 + def schema_reflection; end - # Sets the attribute schema_cache + # Sets the attribute schema_reflection # - # @param value the value to set the attribute schema_cache to. + # @param value the value to set the attribute schema_reflection to. # # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#9 - def schema_cache=(_arg0); end + def schema_reflection=(_arg0); end # Returns the value of attribute shard. # # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#8 def shard; end - # source://mutex_m/0.1.2/mutex_m.rb#78 + # source://mutex_m/0.2.0/lib/mutex_m.rb#76 def synchronize(&block); end - # source://mutex_m/0.1.2/mutex_m.rb#88 + # source://mutex_m/0.2.0/lib/mutex_m.rb#86 def try_lock; end - # source://mutex_m/0.1.2/mutex_m.rb#98 + # source://mutex_m/0.2.0/lib/mutex_m.rb#96 def unlock; end class << self - # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#15 + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#20 def discard_pools!; end + + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#24 + def disconnect_all!; end end end -# source://activerecord//lib/active_record/connection_adapters/pool_config.rb#11 +# source://activerecord//lib/active_record/connection_adapters/pool_config.rb#16 ActiveRecord::ConnectionAdapters::PoolConfig::INSTANCES = T.let(T.unsafe(nil), ObjectSpace::WeakMap) # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#5 @@ -12638,29 +13751,32 @@ class ActiveRecord::ConnectionAdapters::PoolManager # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#6 def initialize; end - # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#34 + # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#26 + def each_pool_config(role = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#44 def get_pool_config(role, shard); end # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#18 def pool_configs(role = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#30 + # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#40 def remove_pool_config(role, shard); end - # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#26 + # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#36 def remove_role(role); end # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#14 def role_names; end - # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#38 + # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#48 def set_pool_config(role, shard, pool_config); end # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#10 def shard_names; end end -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#86 +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#122 class ActiveRecord::ConnectionAdapters::PrimaryKeyDefinition < ::Struct # Returns the value of attribute name # @@ -12684,12 +13800,12 @@ end # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#7 module ActiveRecord::ConnectionAdapters::QueryCache - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#52 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#55 def initialize(*_arg0); end # Enable the query cache within the block. # - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#59 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#63 def cache; end # Clears the query cache. @@ -12699,31 +13815,31 @@ module ActiveRecord::ConnectionAdapters::QueryCache # the same SQL query and repeatedly return the same result each time, silently # undermining the randomness you were expecting. # - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#90 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#94 def clear_query_cache; end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#71 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#75 def disable_query_cache!; end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#67 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#71 def enable_query_cache!; end # Returns the value of attribute query_cache. # - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#50 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#53 def query_cache; end # Returns the value of attribute query_cache_enabled. # - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#50 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#53 def query_cache_enabled; end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#96 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#100 def select_all(arel, name = T.unsafe(nil), binds = T.unsafe(nil), preparable: T.unsafe(nil), async: T.unsafe(nil)); end # Disable the query cache within the block. # - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#77 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#81 def uncached; end private @@ -12731,48 +13847,60 @@ module ActiveRecord::ConnectionAdapters::QueryCache # Database adapters can override this method to # provide custom cache information. # - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#145 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#171 def cache_notification_info(sql, name, binds); end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#127 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#142 def cache_sql(sql, name, binds); end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#156 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#182 def configure_query_cache!; end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#115 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#120 def lookup_sql_cache(sql, name, binds); end class << self - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#17 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#20 def dirties_query_cache(base, *method_names); end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#9 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#11 def included(base); end end end -# source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#29 +# source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#32 module ActiveRecord::ConnectionAdapters::QueryCache::ConnectionPoolConfiguration - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#30 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#33 def initialize(*_arg0); end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#40 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#43 def disable_query_cache!; end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#35 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#38 def enable_query_cache!; end - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#45 + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#48 def query_cache_enabled; end end -# source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#8 +# source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#8 +ActiveRecord::ConnectionAdapters::QueryCache::DEFAULT_SIZE = T.let(T.unsafe(nil), Integer) + +# = Active Record Connection Adapters \Quoting +# +# source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#9 module ActiveRecord::ConnectionAdapters::Quoting - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#161 + # Cast a value to be used as a bound parameter of unknown type. For example, + # MySQL might perform dangerous castings when comparing a string to a number, + # so this method will cast numbers to string. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#69 + def cast_bound_value(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#180 def column_name_matcher; end - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#165 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#184 def column_name_with_order_matcher; end # If you are having to call this function, you are likely doing something @@ -12785,94 +13913,100 @@ module ActiveRecord::ConnectionAdapters::Quoting # (varchar vs binary) for example. The type used to get this primitive # should have been provided before reaching the connection adapter. # - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#63 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#82 def lookup_cast_type_from_column(column); end # Quotes the column value to help prevent # {SQL injection attacks}[https://en.wikipedia.org/wiki/SQL_injection]. # - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#11 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#12 def quote(value); end # Quote a value to be used as a bound parameter of unknown type. For example, # MySQL might perform dangerous castings when comparing a string to a number, # so this method will cast numbers to string. # - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#50 + # Deprecated: Consider `Arel.sql("... ? ...", value)` or + # +sanitize_sql+ instead. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#57 def quote_bound_value(value); end # Quotes the column name. Defaults to no quoting. # - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#74 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#93 def quote_column_name(column_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#95 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#114 def quote_default_expression(value, column); end # Quotes a string, escaping any ' (single quote) and \ (backslash) # characters. # - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#69 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#88 def quote_string(s); end # Quotes the table name. Defaults to column name quoting. # - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#79 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#98 def quote_table_name(table_name); end # Override to return the quoted table name for assignment. Defaults to # table quoting. # - # This works for mysql2 where table.column can be used to + # This works for MySQL where table.column can be used to # resolve ambiguity. # # We override this in the sqlite3 and postgresql adapters to use only # the column name (as per syntax requirements). # - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#91 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#110 def quote_table_name_for_assignment(table, attr); end - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#144 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#163 def quoted_binary(value); end # Quote date/time values for use in SQL input. Includes microseconds # if the value is a Time responding to usec. # - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#122 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#141 def quoted_date(value); end - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#112 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#131 def quoted_false; end - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#139 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#158 def quoted_time(value); end - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#104 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#123 def quoted_true; end - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#148 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#167 def sanitize_as_sql_comment(value); end # Cast a +value+ to a type that the database understands. For example, # SQLite does not understand dates, so this method will convert a Date # to a String. # - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#32 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#36 def type_cast(value); end - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#116 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#135 def unquoted_false; end - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#108 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#127 def unquoted_true; end private - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#225 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#244 def lookup_cast_type(sql_type); end - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#215 + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#234 def type_casted_binds(binds); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#248 + def warn_quote_duration_deprecated; end end # Regexp for column names (with or without a table name prefix). @@ -12881,7 +14015,7 @@ end # "#{table_name}.#{column_name}" # "#{column_name}" # -# source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#174 +# source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#193 ActiveRecord::ConnectionAdapters::Quoting::COLUMN_NAME = T.let(T.unsafe(nil), Regexp) # Regexp for column names with order (with or without a table name prefix, @@ -12896,257 +14030,302 @@ ActiveRecord::ConnectionAdapters::Quoting::COLUMN_NAME = T.let(T.unsafe(nil), Re # "#{column_name} #{direction} NULLS FIRST" # "#{column_name} NULLS LAST" # -# source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#198 +# source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#217 ActiveRecord::ConnectionAdapters::Quoting::COLUMN_NAME_WITH_ORDER = T.let(T.unsafe(nil), Regexp) -# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#202 +# = Active Record Real \Transaction +# +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#368 class ActiveRecord::ConnectionAdapters::RealTransaction < ::ActiveRecord::ConnectionAdapters::Transaction - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#218 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#399 def commit; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#203 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#369 def materialize!; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#213 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#379 + def restart; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#393 def rollback; end end -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#153 +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#195 class ActiveRecord::ConnectionAdapters::ReferenceDefinition # @return [ReferenceDefinition] a new instance of ReferenceDefinition # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#154 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#196 def initialize(name, polymorphic: T.unsafe(nil), index: T.unsafe(nil), foreign_key: T.unsafe(nil), type: T.unsafe(nil), **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#174 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#216 + def add(table_name, connection); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#230 def add_to(table); end private - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#191 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#247 def as_options(value); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#225 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#285 def column_name; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#229 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#289 def column_names; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#217 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#277 def columns; end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#251 + def conditional_options; end + # Returns the value of attribute foreign_key. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#189 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#245 def foreign_key; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#213 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#273 def foreign_key_options; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#233 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#293 def foreign_table_name; end # Returns the value of attribute index. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#189 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#245 def index; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#203 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#263 def index_options(table_name); end # Returns the value of attribute name. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#189 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#245 def name; end # Returns the value of attribute options. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#189 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#245 def options; end # Returns the value of attribute polymorphic. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#189 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#245 def polymorphic; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#199 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#259 def polymorphic_index_name(table_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#195 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#255 def polymorphic_options; end # Returns the value of attribute type. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#189 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#245 def type; end end -# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#171 +# = Active Record Restart Parent \Transaction +# +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#295 +class ActiveRecord::ConnectionAdapters::RestartParentTransaction < ::ActiveRecord::ConnectionAdapters::Transaction + # @return [RestartParentTransaction] a new instance of RestartParentTransaction + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#296 + def initialize(connection, parent_transaction, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#315 + def commit; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#319 + def full_rollback?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#308 + def materialize!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#308 + def materialized?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#308 + def restart(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#310 + def rollback; end +end + +# = Active Record Savepoint \Transaction +# +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#323 class ActiveRecord::ConnectionAdapters::SavepointTransaction < ::ActiveRecord::ConnectionAdapters::Transaction # @return [SavepointTransaction] a new instance of SavepointTransaction # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#172 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#324 def initialize(connection, savepoint_name, parent_transaction, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#194 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#358 def commit; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#199 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#364 def full_rollback?; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#184 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#336 def materialize!; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#189 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#341 + def restart; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#350 def rollback; end end -# source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#5 +# = Active Record Connection Adapters \Savepoints +# +# source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#6 module ActiveRecord::ConnectionAdapters::Savepoints - # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#10 + # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#11 def create_savepoint(name = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#6 + # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#7 def current_savepoint_name; end - # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#14 + # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#15 def exec_rollback_to_savepoint(name = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#18 + # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#19 def release_savepoint(name = T.unsafe(nil)); end end -# source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#7 +# = Active Record Connection Adapters Schema Cache +# +# source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#221 class ActiveRecord::ConnectionAdapters::SchemaCache # @return [SchemaCache] a new instance of SchemaCache # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#38 - def initialize(conn); end + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#261 + def initialize; end # Add internal cache for table with +table_name+. # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#97 - def add(table_name); end + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#325 + def add(connection, table_name); end - # Clears out internal caches + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#398 + def add_all(connection); end + + # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#149 - def clear!; end + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#303 + def cached?(table_name); end # Clear out internal caches for the data source +name+. # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#164 - def clear_data_source_cache!(name); end + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#390 + def clear_data_source_cache!(_connection, name); end # Get the columns for a table # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#111 - def columns(table_name); end + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#340 + def columns(connection, table_name); end # Get the columns for a table as a hash, key is the column name # value is the column object. # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#123 - def columns_hash(table_name); end + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#352 + def columns_hash(connection, table_name); end # Checks whether the columns hash is already cached for a table. # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#130 - def columns_hash?(table_name); end - - # Returns the value of attribute connection. - # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#36 - def connection; end - - # Sets the attribute connection - # - # @param value the value to set the attribute connection to. - # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#36 - def connection=(_arg0); end + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#359 + def columns_hash?(connection, table_name); end # A cached lookup for table existence. # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#88 - def data_source_exists?(name); end + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#316 + def data_source_exists?(connection, name); end - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#106 - def data_sources(name); end + # source://activesupport/7.1.3.2/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#144 - def database_version; end + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#373 + def database_version(connection); end - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#172 + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#407 def dump_to(filename); end - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#57 + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#280 def encode_with(coder); end - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#134 - def indexes(table_name); end + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#363 + def indexes(connection, table_name); end - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#68 + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#289 def init_with(coder); end - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#184 + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#417 def marshal_dump; end - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#190 + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#421 def marshal_load(array); end - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#79 - def primary_keys(table_name); end + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#307 + def primary_keys(connection, table_name); end - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#159 + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#381 + def schema_version; end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#385 def size; end - # Returns the value of attribute version. - # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#35 - def version; end + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#377 + def version(connection); end private - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#222 + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#449 def deep_deduplicate(value); end - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#214 + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#441 def derive_columns_hash_and_deduplicate_values; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#204 + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#435 def ignored_table?(table_name); end - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#48 + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#271 def initialize_dup(other); end - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#241 + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#468 def open(filename); end - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#235 - def prepare_data_sources; end + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#462 + def prepare_data_sources(connection); end - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#210 - def reset_version!; end - - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#198 - def tables_to_cache; end + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#429 + def tables_to_cache(connection); end class << self - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#8 - def load_from(filename); end + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#234 + def _load_from(filename); end + + # source://activesupport/7.1.3.2/lib/active_support/deprecation/method_wrappers.rb#46 + def load_from(*args, **_arg1, &block); end + + # source://activesupport/7.1.3.2/lib/active_support/deprecation/method_wrappers.rb#46 + def new(*args, **_arg1, &block); end private - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#24 + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#250 def read(filename, &block); end end end @@ -13163,16 +14342,16 @@ class ActiveRecord::ConnectionAdapters::SchemaCreation private - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#162 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#176 def action_sql(action, dependency); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#137 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#151 def add_column_options!(sql, options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#128 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#142 def add_table_options!(create_sql, o); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#133 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#147 def column_options(o); end # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 @@ -13187,7 +14366,7 @@ class ActiveRecord::ConnectionAdapters::SchemaCreation # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 def quote_table_name(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#120 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#134 def quoted_columns(o); end # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 @@ -13197,64 +14376,76 @@ class ActiveRecord::ConnectionAdapters::SchemaCreation def supports_check_constraints?(*_arg0, **_arg1, &_arg2); end # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 - def supports_foreign_keys?(*_arg0, **_arg1, &_arg2); end + def supports_exclusion_constraints?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 + def supports_index_include?(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#124 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#138 def supports_index_using?; end # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 def supports_indexes_in_create?(*_arg0, **_arg1, &_arg2); end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 + def supports_nulls_not_distinct?(*_arg0, **_arg1, &_arg2); end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 def supports_partial_index?(*_arg0, **_arg1, &_arg2); end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 + def supports_unique_constraints?(*_arg0, **_arg1, &_arg2); end + # Returns any SQL string to go between CREATE and TABLE. May be nil. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#158 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#172 def table_modifier_in_create(o); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#152 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#166 def to_sql(sql); end # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 def type_to_sql(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#112 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 + def use_foreign_keys?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#126 def visit_AddCheckConstraint(o); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#38 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#40 def visit_AddColumnDefinition(o); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#83 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#95 def visit_AddForeignKey(o); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#22 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#24 def visit_AlterTable(o); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#108 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#122 def visit_CheckConstraintDefinition(o); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#31 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#33 def visit_ColumnDefinition(o); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#91 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#103 def visit_CreateIndexDefinition(o); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#116 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#130 def visit_DropCheckConstraint(name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#87 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#99 def visit_DropForeignKey(name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#72 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#82 def visit_ForeignKeyDefinition(o); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#68 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#78 def visit_PrimaryKeyDefinition(o); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#42 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#44 def visit_TableDefinition(o); end end @@ -13314,6 +14505,113 @@ end # source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#6 ActiveRecord::ConnectionAdapters::SchemaDumper::DEFAULT_DATETIME_PRECISION = T.let(T.unsafe(nil), Integer) +# source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#7 +class ActiveRecord::ConnectionAdapters::SchemaReflection + # @return [SchemaReflection] a new instance of SchemaReflection + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#16 + def initialize(cache_path, cache = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#45 + def add(connection, name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#87 + def cached?(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#25 + def clear!; end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#81 + def clear_data_source_cache!(connection, name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#53 + def columns(connection, table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#57 + def columns_hash(connection, table_name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#61 + def columns_hash?(connection, table_name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#41 + def data_source_exists?(connection, name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#49 + def data_sources(connection, name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#69 + def database_version(connection); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#99 + def dump_to(connection, filename); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#65 + def indexes(connection, table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#31 + def load!(connection); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#37 + def primary_keys(connection, table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#21 + def set_schema_cache(cache); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#77 + def size(connection); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#73 + def version(connection); end + + private + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#114 + def cache(connection); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#108 + def empty_cache; end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#124 + def load_cache(connection); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#118 + def possible_cache_available?; end + + class << self + # Returns the value of attribute check_schema_cache_dump_version. + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#10 + def check_schema_cache_dump_version; end + + # Sets the attribute check_schema_cache_dump_version + # + # @param value the value to set the attribute check_schema_cache_dump_version to. + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#10 + def check_schema_cache_dump_version=(_arg0); end + + # Returns the value of attribute use_schema_cache_dump. + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#9 + def use_schema_cache_dump; end + + # Sets the attribute use_schema_cache_dump + # + # @param value the value to set the attribute use_schema_cache_dump to. + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#9 + def use_schema_cache_dump=(_arg0); end + end +end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#8 module ActiveRecord::ConnectionAdapters::SchemaStatements include ::ActiveRecord::Migration::JoinTable @@ -13321,7 +14619,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # Adds a reference. The reference column is a bigint by default, # the :type option can be used to specify a different type. # Optionally adds a +_type+ column, if :polymorphic option is provided. - # #add_reference and #add_belongs_to are acceptable. # # The +options+ hash can include the following keys: # [:type] @@ -13366,7 +14663,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # add_reference(:products, :supplier, foreign_key: { to_table: :firms }) # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#989 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1030 def add_belongs_to(table_name, ref_name, **options); end # Adds a new check constraint to the table. +expression+ is a String @@ -13381,11 +14678,13 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # The +options+ hash can include the following keys: # [:name] # The constraint name. Defaults to chk_rails_. + # [:if_not_exists] + # Silently ignore if the constraint already exists, rather than raise an error. # [:validate] # (PostgreSQL only) Specify whether or not the constraint should be validated. Defaults to +true+. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1186 - def add_check_constraint(table_name, expression, **options); end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1260 + def add_check_constraint(table_name, expression, if_not_exists: T.unsafe(nil), **options); end # Add a new +type+ column named +column_name+ to +table_name+. # @@ -13421,11 +14720,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # :datetime, and :time columns. # * :scale - # Specifies the scale for the :decimal and :numeric columns. - # * :collation - - # Specifies the collation for a :string or :text column. If not specified, the - # column will have the same collation as the table. - # * :comment - - # Specifies the comment for the column. This option is ignored by some backends. # * :if_not_exists - # Specifies if the column already exists to not try to re-add it. This will avoid # duplicate column errors. @@ -13441,7 +14735,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # * The SQL standard says the default scale should be 0, :scale <= # :precision, and makes no comments about the requirements of # :precision. - # * MySQL: :precision [1..63], :scale [0..30]. + # * MySQL: :precision [1..65], :scale [0..30]. # Default is (10,0). # * PostgreSQL: :precision [1..infinity], # :scale [0..infinity]. No default. @@ -13482,10 +14776,10 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # Ignores the method call if the column exists # add_column(:shapes, :triangle, 'polygon', if_not_exists: true) # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#617 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#620 def add_column(table_name, column_name, type, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#631 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#627 def add_columns(table_name, *column_names, type:, **options); end # Adds a new foreign key. +from_table+ is the table with the key column, @@ -13515,6 +14809,16 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # ALTER TABLE "articles" ADD CONSTRAINT fk_rails_58ca3d3a82 FOREIGN KEY ("author_id") REFERENCES "users" ("lng_id") # + # ====== Creating a composite foreign key + # + # Assuming "carts" table has "(shop_id, user_id)" as a primary key. + # + # add_foreign_key :orders, :carts, primary_key: [:shop_id, :user_id] + # + # generates: + # + # ALTER TABLE "orders" ADD CONSTRAINT fk_rails_6f5e4cb3a4 FOREIGN KEY ("cart_shop_id", "cart_user_id") REFERENCES "carts" ("shop_id", "user_id") + # # ====== Creating a cascading foreign key # # add_foreign_key :articles, :authors, on_delete: :cascade @@ -13525,9 +14829,11 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # The +options+ hash can include the following keys: # [:column] - # The foreign key column name on +from_table+. Defaults to to_table.singularize + "_id" + # The foreign key column name on +from_table+. Defaults to to_table.singularize + "_id". + # Pass an array to create a composite foreign key. # [:primary_key] # The primary key column name on +to_table+. Defaults to +id+. + # Pass an array to create a composite foreign key. # [:name] # The constraint name. Defaults to fk_rails_. # [:on_delete] @@ -13543,7 +14849,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # (PostgreSQL only) Specify whether or not the foreign key should be deferrable. Valid values are booleans or # +:deferred+ or +:immediate+ to specify the default behavior. Defaults to +false+. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1086 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1140 def add_foreign_key(from_table, to_table, **options); end # Adds a new index to the table. +column_name+ can be a single Symbol, or @@ -13624,6 +14930,16 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # Note: Partial indexes are only supported for PostgreSQL and SQLite. # + # ====== Creating an index that includes additional columns + # + # add_index(:accounts, :branch_id, include: :party_id) + # + # generates: + # + # CREATE INDEX index_accounts_on_branch_id ON accounts USING btree(branch_id) INCLUDE (party_id) + # + # Note: only supported by PostgreSQL. + # # ====== Creating an index with a specific method # # add_index(:developers, :name, using: 'btree') @@ -13669,16 +14985,15 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # For more information see the {"Transactional Migrations" section}[rdoc-ref:Migration]. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#852 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#886 def add_index(table_name, column_name, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1340 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1436 def add_index_options(table_name, column_name, name: T.unsafe(nil), if_not_exists: T.unsafe(nil), internal: T.unsafe(nil), **options); end # Adds a reference. The reference column is a bigint by default, # the :type option can be used to specify a different type. # Optionally adds a +_type+ column, if :polymorphic option is provided. - # #add_reference and #add_belongs_to are acceptable. # # The +options+ hash can include the following keys: # [:type] @@ -13723,7 +15038,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # add_reference(:products, :supplier, foreign_key: { to_table: :firms }) # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#989 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1030 def add_reference(table_name, ref_name, **options); end # Adds timestamps (+created_at+ and +updated_at+) columns to +table_name+. @@ -13731,12 +15046,62 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # add_timestamps(:suppliers, null: true) # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1317 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1419 def add_timestamps(table_name, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1229 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1325 def assume_migrated_upto_version(version); end + # Builds an AlterTable object for adding a column to a table. + # + # This definition object contains information about the column that would be created + # if the same arguments were passed to #add_column. See #add_column for information about + # passing a +table_name+, +column_name+, +type+ and other options that can be passed. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#638 + def build_add_column_definition(table_name, column_name, type, **options); end + + # Builds a ChangeColumnDefaultDefinition object. + # + # This definition object contains information about the column change that would occur + # if the same arguments were passed to #change_column_default. See #change_column_default for + # information about passing a +table_name+, +column_name+, +type+ and other options that can be passed. + # + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#722 + def build_change_column_default_definition(table_name, column_name, default_or_changes); end + + # Builds a CreateIndexDefinition object. + # + # This definition object contains information about the index that would be created + # if the same arguments were passed to #add_index. See #add_index for information about + # passing a +table_name+, +column_name+, and other additional options that can be passed. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#896 + def build_create_index_definition(table_name, column_name, **options); end + + # Builds a TableDefinition object for a join table. + # + # This definition object contains information about the table that would be created + # if the same arguments were passed to #create_join_table. See #create_join_table for + # information about what arguments should be passed. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#394 + def build_create_join_table_definition(table_1, table_2, column_options: T.unsafe(nil), **options); end + + # Returns a TableDefinition object containing information about the table that would be created + # if the same arguments were passed to #create_table. See #create_table for information about + # passing a +table_name+, and other additional options that can be passed. + # + # @yield [table_definition] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#328 + def build_create_table_definition(table_name, id: T.unsafe(nil), primary_key: T.unsafe(nil), force: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1515 + def bulk_change_table(table_name, operations); end + # Changes the column's definition according to the new options. # See TableDefinition#column for details of the options you can use. # @@ -13745,7 +15110,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#680 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#695 def change_column(table_name, column_name, type, **options); end # Changes the comment for a column or removes it if +nil+. @@ -13757,7 +15122,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1399 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1497 def change_column_comment(table_name, column_name, comment_or_changes); end # Sets a new default value for a column: @@ -13776,7 +15141,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#698 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#713 def change_column_default(table_name, column_name, default_or_changes); end # Sets or removes a NOT NULL constraint on a column. The +null+ flag @@ -13798,7 +15163,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#718 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#742 def change_column_null(table_name, column_name, null, default = T.unsafe(nil)); end # A block for changing columns in +table+. @@ -13880,8 +15245,8 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # See also Table for details on all of the various column transformations. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#488 - def change_table(table_name, **options); end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#496 + def change_table(table_name, base = T.unsafe(nil), **options); end # Changes the comment for a table or removes it if +nil+. # @@ -13892,10 +15257,19 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1389 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1487 def change_table_comment(table_name, comment_or_changes); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1196 + # Checks to see if a check constraint exists on a table for a given check constraint definition. + # + # check_constraint_exists?(:products, name: "price_check") + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1309 + def check_constraint_exists?(table_name, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1272 def check_constraint_options(table_name, expression, options); end # Returns an array of check constraints for the given table. @@ -13903,7 +15277,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1168 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1240 def check_constraints(table_name); end # Checks to see if a column exists in a given table. @@ -13925,12 +15299,12 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#139 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#132 def column_exists?(table_name, column_name, type = T.unsafe(nil), **options); end # Returns an array of +Column+ objects for the table specified by +table_name+. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#115 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#107 def columns(table_name); end # Given a set of columns and an ORDER BY clause, returns the columns for a SELECT DISTINCT. @@ -13939,7 +15313,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # columns_for_distinct("posts.id", ["posts.created_at desc"]) # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1289 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1385 def columns_for_distinct(columns, orders); end # Creates a new join table with the name created using the lexical order of the first two @@ -13980,10 +15354,10 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # part_id bigint NOT NULL, # ) ENGINE=InnoDB DEFAULT CHARSET=utf8 # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#385 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#375 def create_join_table(table_1, table_2, column_options: T.unsafe(nil), **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1403 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1501 def create_schema_dumper(options); end # Creates a new table with the name +table_name+. +table_name+ may either @@ -14129,10 +15503,8 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # See also TableDefinition#column for details on how to create columns. # - # @yield [td] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#300 - def create_table(table_name, id: T.unsafe(nil), primary_key: T.unsafe(nil), force: T.unsafe(nil), **options); end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#293 + def create_table(table_name, id: T.unsafe(nil), primary_key: T.unsafe(nil), force: T.unsafe(nil), **options, &block); end # Checks to see if the data source +name+ exists on the database. # @@ -14149,17 +15521,17 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#34 def data_sources; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1293 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1389 def distinct_relation_for_primary_key(relation); end # Drops the join table specified by the given arguments. - # See #create_join_table for details. + # See #create_join_table and #drop_table for details. # # Although this command ignores the block if one is given, it can be helpful # to provide one in a migration's +change+ method so it can be reverted. # In that case, the block will be used by #create_join_table. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#405 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#413 def drop_join_table(table_1, table_2, **options); end # Drops a table from the database. @@ -14175,14 +15547,14 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # it can be helpful to provide these in a migration's +change+ method so it can be reverted. # In that case, +options+ and the block will be used by #create_table. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#518 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#526 def drop_table(table_name, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1220 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1316 def dump_schema_information; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1154 - def foreign_key_column_for(table_name); end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1208 + def foreign_key_column_for(table_name, column_name); end # Checks to see if a foreign key exists on a table for a given foreign key definition. # @@ -14197,10 +15569,10 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1150 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1204 def foreign_key_exists?(from_table, to_table = T.unsafe(nil), **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1159 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1213 def foreign_key_options(from_table, to_table, options); end # Returns an array of foreign keys for the given table. @@ -14208,10 +15580,10 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1028 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1070 def foreign_keys(table_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1366 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1464 def index_algorithm(algorithm); end # Checks to see if an index exists on a table for a given index definition. @@ -14228,19 +15600,22 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # Check an index with a custom name exists # index_exists?(:suppliers, :company_id, name: "idx_company_id") # + # # Check a valid index exists (PostgreSQL only) + # index_exists?(:suppliers, :company_id, valid: true) + # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#99 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#102 def index_exists?(table_name, column_name, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#921 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#963 def index_name(table_name, options); end # Verifies the existence of an index with a given name. # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#936 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#978 def index_name_exists?(table_name, index_name); end # Returns an array of indexes for the given table. @@ -14250,9 +15625,14 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#81 def indexes(table_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1225 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1321 def internal_string_options_for_primary_key; end + # Returns the maximum length of an index name in bytes. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1553 + def max_index_name_size; end + # Returns a hash of mappings from the abstract data types to the native # database types. See TableDefinition#column for details on the recognized # abstract data types. @@ -14262,19 +15642,18 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1379 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1477 def options_include_default?(options); end # Returns just a table's primary key # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#152 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#145 def primary_key(table_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1372 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1470 def quoted_columns_for_index(column_names, options); end # Removes the reference(s). Also removes a +type+ column if one exists. - # #remove_reference and #remove_belongs_to are acceptable. # # ====== Remove the reference # @@ -14288,19 +15667,25 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # remove_reference(:products, :user, foreign_key: true) # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1009 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1049 def remove_belongs_to(table_name, ref_name, foreign_key: T.unsafe(nil), polymorphic: T.unsafe(nil), **options); end - # Removes the given check constraint from the table. + # Removes the given check constraint from the table. Removing a check constraint + # that does not exist will raise an error. # # remove_check_constraint :products, name: "price_check" # + # To silently ignore a non-existent check constraint rather than raise an error, + # use the +if_exists+ option. + # + # remove_check_constraint :products, name: "price_check", if_exists: true + # # The +expression+ parameter will be ignored if present. It can be helpful # to provide this in a migration's +change+ method so it can be reverted. # In that case, +expression+ will be used by #add_check_constraint. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1209 - def remove_check_constraint(table_name, expression = T.unsafe(nil), **options); end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1291 + def remove_check_constraint(table_name, expression = T.unsafe(nil), if_exists: T.unsafe(nil), **options); end # Removes the column from the table definition. # @@ -14318,7 +15703,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # remove_column(:suppliers, :qualification, if_exists: true) # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#668 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#683 def remove_column(table_name, column_name, type = T.unsafe(nil), **options); end # Removes the given columns from the table definition. @@ -14329,7 +15714,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # remove_columns(:suppliers, :qualification, :experience, type: :string, null: false) # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#644 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#659 def remove_columns(table_name, *column_names, type: T.unsafe(nil), **options); end # Removes the given foreign key from the table. Any option parameters provided @@ -14363,7 +15748,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # [:to_table] # The name of the table that contains the referenced primary key. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1127 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1181 def remove_foreign_key(from_table, to_table = T.unsafe(nil), **options); end # Removes the given index from the table. @@ -14403,11 +15788,10 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # For more information see the {"Transactional Migrations" section}[rdoc-ref:Migration]. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#895 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#937 def remove_index(table_name, column_name = T.unsafe(nil), **options); end # Removes the reference(s). Also removes a +type+ column if one exists. - # #remove_reference and #remove_belongs_to are acceptable. # # ====== Remove the reference # @@ -14421,14 +15805,14 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # remove_reference(:products, :user, foreign_key: true) # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1009 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1049 def remove_reference(table_name, ref_name, foreign_key: T.unsafe(nil), polymorphic: T.unsafe(nil), **options); end # Removes the timestamp columns (+created_at+ and +updated_at+) from the table definition. # # remove_timestamps(:suppliers) # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1332 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1428 def remove_timestamps(table_name, **options); end # Renames a column. @@ -14437,7 +15821,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#726 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#750 def rename_column(table_name, column_name, new_column_name); end # Renames an index. @@ -14446,7 +15830,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # rename_index :people, 'index_people_on_last_name', 'index_users_on_last_name' # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#909 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#951 def rename_index(table_name, old_name, new_name); end # Renames a table. @@ -14455,8 +15839,14 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#502 - def rename_table(table_name, new_name); end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#510 + def rename_table(table_name, new_name, **_arg2); end + + # Returns an instance of SchemaCreation, which can be used to visit a schema definition + # object and return DDL. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1511 + def schema_creation; end # Truncates a table alias according to the limits of the current adapter. # @@ -14485,12 +15875,26 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#51 def tables; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1249 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1345 def type_to_sql(type, limit: T.unsafe(nil), precision: T.unsafe(nil), scale: T.unsafe(nil), **_arg4); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1336 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1432 def update_table_definition(table_name, base); end + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1505 + def use_foreign_keys?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1544 + def valid_column_definition_options; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1548 + def valid_primary_key_options; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1540 + def valid_table_definition_options; end + # Checks to see if the view +view_name+ exists on the database. # # view_exists?(:ebooks) @@ -14507,131 +15911,145 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements private - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1637 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1797 def add_column_for_alter(table_name, column_name, type, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1412 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1582 def add_index_sort_order(quoted_columns, **options); end # Overridden by the MySQL adapter for supporting index lengths and by # the PostgreSQL adapter for supporting operator classes. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1429 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1599 def add_options_for_index_columns(quoted_columns, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1655 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1820 def add_timestamps_for_alter(table_name, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1612 - def bulk_change_table(table_name, operations); end - # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1608 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1789 def can_remove_index_by_name?(column_name, options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1582 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1803 + def change_column_default_for_alter(table_name, column_name, default_or_changes); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1757 def check_constraint_for(table_name, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1588 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1763 def check_constraint_for!(table_name, expression: T.unsafe(nil), **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1572 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1747 def check_constraint_name(table_name, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1408 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1578 def column_options_keys; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1499 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1665 def create_alter_table(name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1495 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1661 def create_table_definition(name, **options); end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1685 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1850 def data_source_sql(name = T.unsafe(nil), type: T.unsafe(nil)); end # Try to identify whether the given column name is an expression # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1535 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1705 def expression_column_name?(column_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1564 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1735 def extract_foreign_key_action(specifier); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1599 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1780 def extract_new_comment_value(default_or_changes); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1599 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1780 def extract_new_default_value(default_or_changes); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1503 - def extract_table_options!(options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1507 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1677 def fetch_type_metadata(sql_type); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1554 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1725 def foreign_key_for(from_table, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1559 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1730 def foreign_key_for!(from_table, to_table: T.unsafe(nil), **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1545 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1715 def foreign_key_name(table_name, options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1518 + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1743 + def foreign_keys_enabled?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1558 + def generate_index_name(table_name, column); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1688 def index_column_names(column_names); end # @raise [ArgumentError] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1437 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1607 def index_name_for_remove(table_name, column_name, options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1526 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1696 def index_name_options(column_names); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1672 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1837 def insert_versions_sql(versions); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1419 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1589 def options_for_index_columns(options); end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1689 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1854 def quoted_scope(name = T.unsafe(nil), type: T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1647 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1793 + def reference_name_for_table(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1812 def remove_column_for_alter(table_name, column_name, type = T.unsafe(nil), **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1651 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1816 def remove_columns_for_alter(table_name, *column_names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1668 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1833 def remove_timestamps_for_alter(table_name, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1478 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1648 def rename_column_indexes(table_name, column_name, new_column_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1643 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1808 def rename_column_sql(table_name, column_name, new_column_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1469 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1639 def rename_table_indexes(table_name, new_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1491 - def schema_creation; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1539 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1709 def strip_table_name_prefix_and_suffix(table_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1593 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1572 + def validate_change_column_null_argument!(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1669 + def validate_create_table_options!(options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1768 def validate_index_length!(table_name, new_name, internal = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1774 + def validate_table_length!(table_name); end end # source://activerecord//lib/active_record/connection_adapters/sql_type_metadata.rb#6 @@ -14684,6 +16102,8 @@ class ActiveRecord::ConnectionAdapters::SqlTypeMetadata def deduplicated; end end +# = Active Record Connection Adapters \Table +# # Represents an SQL table in an abstract way for updating a table. # Also see TableDefinition and {connection.create_table}[rdoc-ref:SchemaStatements#create_table] # @@ -14728,14 +16148,14 @@ end # t.remove_timestamps # end # -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#617 +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#706 class ActiveRecord::ConnectionAdapters::Table include ::ActiveRecord::ConnectionAdapters::ColumnMethods extend ::ActiveRecord::ConnectionAdapters::ColumnMethods::ClassMethods # @return [Table] a new instance of Table # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#622 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#711 def initialize(table_name, base); end # Adds a reference. @@ -14745,19 +16165,19 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.add_reference}[rdoc-ref:SchemaStatements#add_reference] for details of the options you can use. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#767 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#862 def belongs_to(*args, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def bigint(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def binary(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def blob(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def boolean(*names, **options); end # Changes the column's definition according to the new options. @@ -14767,7 +16187,7 @@ class ActiveRecord::ConnectionAdapters::Table # # See TableDefinition#column for details of the options you can use. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#696 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#788 def change(column_name, type, **options); end # Sets a new default value for a column. @@ -14778,7 +16198,7 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.change_column_default}[rdoc-ref:SchemaStatements#change_column_default] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#707 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#800 def change_default(column_name, default_or_changes); end # Sets or removes a NOT NULL constraint on a column. @@ -14788,7 +16208,7 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.change_column_null}[rdoc-ref:SchemaStatements#change_column_null] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#717 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#810 def change_null(column_name, null, default = T.unsafe(nil)); end # Adds a check constraint. @@ -14797,16 +16217,29 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.add_check_constraint}[rdoc-ref:SchemaStatements#add_check_constraint] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#821 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#920 def check_constraint(*args, **options); end + # Checks if a check_constraint exists on a table. + # + # unless t.check_constraint_exists?(name: "price_check") + # t.check_constraint("price > 0", name: "price_check") + # end + # + # See {connection.check_constraint_exists?}[rdoc-ref:SchemaStatements#check_constraint_exists?] + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#940 + def check_constraint_exists?(*args, **options); end + # Adds a new column to the named table. # # t.column(:name, :string) # # See TableDefinition#column for details of the options you can use. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#632 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#721 def column(column_name, type, index: T.unsafe(nil), **options); end # Checks to see if a column exists. @@ -14817,19 +16250,19 @@ class ActiveRecord::ConnectionAdapters::Table # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#645 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#735 def column_exists?(column_name, type = T.unsafe(nil), **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def date(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def datetime(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def decimal(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def float(*names, **options); end # Adds a foreign key to the table using a supplied table name. @@ -14839,7 +16272,7 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.add_foreign_key}[rdoc-ref:SchemaStatements#add_foreign_key] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#793 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#890 def foreign_key(*args, **options); end # Checks to see if a foreign key exists. @@ -14850,7 +16283,7 @@ class ActiveRecord::ConnectionAdapters::Table # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#812 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#911 def foreign_key_exists?(*args, **options); end # Adds a new index to the table. +column_name+ can be a single Symbol, or @@ -14862,7 +16295,7 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.add_index}[rdoc-ref:SchemaStatements#add_index] for details of the options you can use. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#657 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#747 def index(column_name, **options); end # Checks to see if an index exists. @@ -14875,21 +16308,21 @@ class ActiveRecord::ConnectionAdapters::Table # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#668 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#759 def index_exists?(column_name, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def integer(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def json(*names, **options); end # Returns the value of attribute name. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#620 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#709 def name; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def numeric(*names, **options); end # Adds a reference. @@ -14899,7 +16332,7 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.add_reference}[rdoc-ref:SchemaStatements#add_reference] for details of the options you can use. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#767 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#862 def references(*args, **options); end # Removes the column(s) from the table definition. @@ -14909,7 +16342,7 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.remove_columns}[rdoc-ref:SchemaStatements#remove_columns] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#727 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#820 def remove(*column_names, **options); end # Removes a reference. Optionally removes a +type+ column. @@ -14919,7 +16352,7 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.remove_reference}[rdoc-ref:SchemaStatements#remove_reference] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#780 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#876 def remove_belongs_to(*args, **options); end # Removes the given check constraint from the table. @@ -14928,7 +16361,7 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.remove_check_constraint}[rdoc-ref:SchemaStatements#remove_check_constraint] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#830 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#929 def remove_check_constraint(*args, **options); end # Removes the given foreign key from the table. @@ -14938,7 +16371,7 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.remove_foreign_key}[rdoc-ref:SchemaStatements#remove_foreign_key] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#803 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#901 def remove_foreign_key(*args, **options); end # Removes the given index from the table. @@ -14950,7 +16383,7 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.remove_index}[rdoc-ref:SchemaStatements#remove_index] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#739 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#833 def remove_index(column_name = T.unsafe(nil), **options); end # Removes a reference. Optionally removes a +type+ column. @@ -14960,7 +16393,7 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.remove_reference}[rdoc-ref:SchemaStatements#remove_reference] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#780 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#876 def remove_references(*args, **options); end # Removes the timestamp columns (+created_at+ and +updated_at+) from the table. @@ -14969,7 +16402,7 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.remove_timestamps}[rdoc-ref:SchemaStatements#remove_timestamps] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#748 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#843 def remove_timestamps(**options); end # Renames a column. @@ -14978,7 +16411,7 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.rename_column}[rdoc-ref:SchemaStatements#rename_column] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#757 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#852 def rename(column_name, new_column_name); end # Renames the given index on the table. @@ -14987,19 +16420,19 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.rename_index}[rdoc-ref:SchemaStatements#rename_index] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#677 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#768 def rename_index(index_name, new_index_name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def string(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def text(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def time(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def timestamp(*names, **options); end # Adds timestamps (+created_at+ and +updated_at+) columns to the table. @@ -15008,20 +16441,27 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.add_timestamps}[rdoc-ref:SchemaStatements#add_timestamps] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#686 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#777 def timestamps(**options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def virtual(*names, **options); end + + private + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#945 + def raise_on_if_exist_options(options); end end +# = Active Record Connection Adapters \Table \Definition +# # Represents the schema of an SQL table in an abstract way. This class # provides methods for manipulating the schema representation. # # Inside migration files, the +t+ object in {create_table}[rdoc-ref:SchemaStatements#create_table] # is actually of this type: # -# class SomeMigration < ActiveRecord::Migration[7.0] +# class SomeMigration < ActiveRecord::Migration[7.1] # def up # create_table :foo do |t| # puts t.class # => "ActiveRecord::ConnectionAdapters::TableDefinition" @@ -15033,24 +16473,24 @@ end # end # end # -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#301 +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#363 class ActiveRecord::ConnectionAdapters::TableDefinition include ::ActiveRecord::ConnectionAdapters::ColumnMethods extend ::ActiveRecord::ConnectionAdapters::ColumnMethods::ClassMethods # @return [TableDefinition] a new instance of TableDefinition # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#306 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#368 def initialize(conn, name, temporary: T.unsafe(nil), if_not_exists: T.unsafe(nil), options: T.unsafe(nil), as: T.unsafe(nil), comment: T.unsafe(nil), **_arg7); end # Returns a ColumnDefinition for the column with name +name+. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#339 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#418 def [](name); end # Returns the value of attribute as. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 def as; end # Adds a reference. @@ -15061,27 +16501,27 @@ class ActiveRecord::ConnectionAdapters::TableDefinition # # See {connection.add_reference}[rdoc-ref:SchemaStatements#add_reference] for details of the options you can use. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#469 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#548 def belongs_to(*args, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def bigint(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def binary(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def blob(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def boolean(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#443 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#522 def check_constraint(expression, **options); end # Returns the value of attribute check_constraints. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 def check_constraints; end # Instantiates a new column for the table. @@ -15152,42 +16592,42 @@ class ActiveRecord::ConnectionAdapters::TableDefinition # t.references :taggable, polymorphic: { default: 'Photo' }, index: false # end # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#410 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#489 def column(name, type, index: T.unsafe(nil), **options); end # Returns an array of ColumnDefinition objects for the columns of the table. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#336 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#415 def columns; end # Returns the value of attribute comment. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 def comment; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def date(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def datetime(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def decimal(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def float(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#439 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#518 def foreign_key(to_table, **options); end # Returns the value of attribute foreign_keys. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 def foreign_keys; end # Returns the value of attribute if_not_exists. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 def if_not_exists; end # Adds index options to the indexes hash, keyed by column name @@ -15195,43 +16635,43 @@ class ActiveRecord::ConnectionAdapters::TableDefinition # # index(:account_id, name: 'index_projects_on_account_id') # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#435 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#514 def index(column_name, **options); end # Returns the value of attribute indexes. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 def indexes; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def integer(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def json(*names, **options); end # Returns the value of attribute name. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 def name; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#501 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#580 def new_check_constraint_definition(expression, options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#476 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#555 def new_column_definition(name, type, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#493 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#572 def new_foreign_key_definition(to_table, options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def numeric(*names, **options); end # Returns the value of attribute options. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 def options; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#330 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#409 def primary_keys(name = T.unsafe(nil)); end # Adds a reference. @@ -15242,30 +16682,33 @@ class ActiveRecord::ConnectionAdapters::TableDefinition # # See {connection.add_reference}[rdoc-ref:SchemaStatements#add_reference] for details of the options you can use. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#469 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#548 def references(*args, **options); end # remove the column +name+ from the table. # remove_column(:account_id) # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#427 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#506 def remove_column(name); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#392 + def set_primary_key(table_name, id, primary_key, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def string(*names, **options); end # Returns the value of attribute temporary. # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 def temporary; end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def text(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def time(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def timestamp(*names, **options); end # Appends :datetime columns :created_at and @@ -15273,258 +16716,345 @@ class ActiveRecord::ConnectionAdapters::TableDefinition # # t.timestamps null: false # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#451 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#530 def timestamps(**options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def virtual(*names, **options); end private - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#511 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#598 def aliased_types(name, fallback); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#507 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#590 def create_column_definition(name, type, options); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#515 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#602 def integer_like_primary_key?(type, options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#519 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#606 def integer_like_primary_key_type(type, options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#523 + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#610 def raise_on_duplicate_column(name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#586 + def valid_column_definition_options; end end -# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#85 +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#120 class ActiveRecord::ConnectionAdapters::Transaction # @return [Transaction] a new instance of Transaction # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#89 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#126 def initialize(connection, isolation: T.unsafe(nil), joinable: T.unsafe(nil), run_commit_callbacks: T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#100 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#147 def add_record(record, ensure_finalize = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#142 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#208 def before_commit_records; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#167 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#251 def closed?; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#146 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#228 def commit_records; end # Returns the value of attribute connection. # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#86 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#121 def connection; end + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#139 + def dirty!; end + # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#165 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#143 + def dirty?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#249 def full_rollback?; end + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#171 + def incomplete!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#124 + def invalidate!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#124 + def invalidated?(*_arg0, **_arg1, &_arg2); end + # Returns the value of attribute isolation_level. # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#86 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#121 def isolation_level; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#166 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#250 def joinable?; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#118 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#175 def materialize!; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#122 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#180 def materialized?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#168 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#252 def open?; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#110 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#157 def records; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#126 + # Can this transaction's current state be recreated by + # rollback+begin ? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#167 + def restartable?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#184 + def restore!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#192 def rollback_records; end # Returns the value of attribute savepoint_name. # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#86 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#121 def savepoint_name; end # Returns the value of attribute state. # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#86 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#121 def state; end # Returns the value of attribute written. # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#87 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#122 def written; end # Sets the attribute written # # @param value the value to set the attribute written to. # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#87 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#122 def written=(_arg0); end + + private + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#267 + def prepare_instances_to_run_callbacks_on(records); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#259 + def run_action_on_records(records, instances_to_run_callbacks_on); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#255 + def unique_records; end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#77 +class ActiveRecord::ConnectionAdapters::TransactionInstrumenter + # @return [TransactionInstrumenter] a new instance of TransactionInstrumenter + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#78 + def initialize(payload = T.unsafe(nil)); end + + # @raise [InstrumentationNotStartedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#97 + def finish(outcome); end + + # @raise [InstrumentationAlreadyStartedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#88 + def start; end end -# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#224 +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#86 +class ActiveRecord::ConnectionAdapters::TransactionInstrumenter::InstrumentationAlreadyStartedError < ::ActiveRecord::ActiveRecordError; end + +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#85 +class ActiveRecord::ConnectionAdapters::TransactionInstrumenter::InstrumentationNotStartedError < ::ActiveRecord::ActiveRecordError; end + +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#406 class ActiveRecord::ConnectionAdapters::TransactionManager # @return [TransactionManager] a new instance of TransactionManager # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#225 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#407 def initialize(connection); end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#233 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#415 def begin_transaction(isolation: T.unsafe(nil), joinable: T.unsafe(nil), _lazy: T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#293 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#502 def commit_transaction; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#359 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#588 def current_transaction; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#265 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#470 + def dirty_current_transaction; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#457 def disable_lazy_transactions!; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#270 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#462 def enable_lazy_transactions!; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#274 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#466 def lazy_transactions_enabled?; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#278 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#486 def materialize_transactions; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#355 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#584 def open_transactions; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#308 + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#482 + def restorable?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#474 + def restore_transactions; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#519 def rollback_transaction(transaction = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#316 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#531 def within_new_transaction(isolation: T.unsafe(nil), joinable: T.unsafe(nil)); end private # Deallocate invalidated prepared statements outside of the transaction # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#367 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#596 def after_failure_actions(transaction, error); end end -# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#364 +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#593 ActiveRecord::ConnectionAdapters::TransactionManager::NULL_TRANSACTION = T.let(T.unsafe(nil), ActiveRecord::ConnectionAdapters::NullTransaction) -# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#5 +# = Active Record Connection Adapters Transaction State +# +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#6 class ActiveRecord::ConnectionAdapters::TransactionState # @return [TransactionState] a new instance of TransactionState # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#6 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#7 def initialize(state = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#11 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#12 def add_child(state); end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#63 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#64 def commit!; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#20 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#21 def committed?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#44 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#45 def completed?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#16 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#17 def finalized?; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#67 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#68 def full_commit!; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#53 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#54 def full_rollback!; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#24 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#25 def fully_committed?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#40 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#41 def fully_completed?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#32 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#33 def fully_rolledback?; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#58 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#59 def invalidate!; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#36 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#37 def invalidated?; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#71 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#72 def nullify!; end - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#48 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#49 def rollback!; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#28 + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#29 def rolledback?; end end -# source://activerecord//lib/active_record/connection_handling.rb#4 +# ConnectionFailed will be raised when the network connection to the +# database fails while sending a query or waiting for its result. +# +# source://activerecord//lib/active_record/errors.rb#555 +class ActiveRecord::ConnectionFailed < ::ActiveRecord::QueryAborted; end + +# = Active Record Connection Handling +# +# source://activerecord//lib/active_record/connection_handling.rb#5 module ActiveRecord::ConnectionHandling - # source://activerecord//lib/active_record/connection_handling.rb#337 - def clear_active_connections!(*_arg0, **_arg1, &_arg2); end + # source://activerecord//lib/active_record/connection_handling.rb#319 + def clear_active_connections!(role = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_handling.rb#337 - def clear_all_connections!(*_arg0, **_arg1, &_arg2); end + # source://activerecord//lib/active_record/connection_handling.rb#329 + def clear_all_connections!(role = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_handling.rb#333 + # source://activerecord//lib/active_record/connection_handling.rb#315 def clear_cache!; end # Clears the query cache for all connections associated with the current thread. # - # source://activerecord//lib/active_record/connection_handling.rb#266 + # source://activerecord//lib/active_record/connection_handling.rb#244 def clear_query_caches_for_current_thread; end - # source://activerecord//lib/active_record/connection_handling.rb#337 - def clear_reloadable_connections!(*_arg0, **_arg1, &_arg2); end + # source://activerecord//lib/active_record/connection_handling.rb#324 + def clear_reloadable_connections!(role = T.unsafe(nil)); end # Returns +true+ if Active Record is connected. # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_handling.rb#317 + # source://activerecord//lib/active_record/connection_handling.rb#291 def connected?; end # Connects to a role (e.g. writing, reading, or a custom role) and/or @@ -15554,19 +17084,27 @@ module ActiveRecord::ConnectionHandling # Dog.first # finds first Dog record stored on the shard one replica # end # - # source://activerecord//lib/active_record/connection_handling.rb#137 + # source://activerecord//lib/active_record/connection_handling.rb#134 def connected_to(role: T.unsafe(nil), shard: T.unsafe(nil), prevent_writes: T.unsafe(nil), &blk); end - # Returns true if role is the current connected role. + # Returns true if role is the current connected role and/or + # current connected shard. If no shard is passed, the default will be + # used. # # ActiveRecord::Base.connected_to(role: :writing) do # ActiveRecord::Base.connected_to?(role: :writing) #=> true # ActiveRecord::Base.connected_to?(role: :reading) #=> false # end # + # ActiveRecord::Base.connected_to(role: :reading, shard: :shard_one) do + # ActiveRecord::Base.connected_to?(role: :reading, shard: :shard_one) #=> true + # ActiveRecord::Base.connected_to?(role: :reading, shard: :default) #=> false + # ActiveRecord::Base.connected_to?(role: :writing, shard: :shard_one) #=> true + # end + # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_handling.rb#252 + # source://activerecord//lib/active_record/connection_handling.rb#239 def connected_to?(role:, shard: T.unsafe(nil)); end # Connects a role and/or shard to the provided connection names. Optionally +prevent_writes+ @@ -15583,7 +17121,7 @@ module ActiveRecord::ConnectionHandling # Person.first # Read from primary writer # end # - # source://activerecord//lib/active_record/connection_handling.rb#172 + # source://activerecord//lib/active_record/connection_handling.rb#163 def connected_to_many(*classes, role:, shard: T.unsafe(nil), prevent_writes: T.unsafe(nil)); end # Use a specified connection. @@ -15594,48 +17132,47 @@ module ActiveRecord::ConnectionHandling # It is not recommended to use this method in a request since it # does not yield to a block like +connected_to+. # - # source://activerecord//lib/active_record/connection_handling.rb#198 + # source://activerecord//lib/active_record/connection_handling.rb#185 def connecting_to(role: T.unsafe(nil), shard: T.unsafe(nil), prevent_writes: T.unsafe(nil)); end # Returns the connection currently associated with the class. This can # also be used to "borrow" the connection to do database work unrelated # to any of the specific Active Records. # - # source://activerecord//lib/active_record/connection_handling.rb#279 + # source://activerecord//lib/active_record/connection_handling.rb#253 def connection; end # Returns the db_config object from the associated connection: # # ActiveRecord::Base.connection_db_config # # + # @name="primary", @config={pool: 5, timeout: 5000, database: "storage/development.sqlite3", adapter: "sqlite3"}> # # Use only for reading. # - # source://activerecord//lib/active_record/connection_handling.rb#304 + # source://activerecord//lib/active_record/connection_handling.rb#278 def connection_db_config; end - # source://activerecord//lib/active_record/connection_handling.rb#308 + # source://activerecord//lib/active_record/connection_handling.rb#282 def connection_pool; end - # Return the connection specification name from the current class or its parent. + # Returns the connection specification name from the current class or its parent. # - # source://activerecord//lib/active_record/connection_handling.rb#286 + # source://activerecord//lib/active_record/connection_handling.rb#260 def connection_specification_name; end # Sets the attribute connection_specification_name # # @param value the value to set the attribute connection_specification_name to. # - # source://activerecord//lib/active_record/connection_handling.rb#283 + # source://activerecord//lib/active_record/connection_handling.rb#257 def connection_specification_name=(_arg0); end # Connects a model to the databases specified. The +database+ keyword # takes a hash consisting of a +role+ and a +database_key+. # - # This will create a connection handler for switching between connections, - # look up the config hash using the +database_key+ and finally - # establishes a connection to that config. + # This will look up the database config using the +database_key+ and + # establish a connection to that config. # # class AnimalsModel < ApplicationRecord # self.abstract_class = true @@ -15644,7 +17181,7 @@ module ActiveRecord::ConnectionHandling # end # # +connects_to+ also supports horizontal sharding. The horizontal sharding API - # also supports read replicas. Connect a model to a list of shards like this: + # supports read replicas as well. You can connect a model to a list of shards like this: # # class AnimalsModel < ApplicationRecord # self.abstract_class = true @@ -15695,7 +17232,7 @@ module ActiveRecord::ConnectionHandling # ) # # In case {ActiveRecord::Base.configurations}[rdoc-ref:Core.configurations] - # is set (Rails automatically loads the contents of config/database.yml into it), + # is set (\Rails automatically loads the contents of config/database.yml into it), # a symbol can also be given as argument, representing a key in the # configuration hash: # @@ -15704,18 +17241,15 @@ module ActiveRecord::ConnectionHandling # The exceptions AdapterNotSpecified, AdapterNotFound, and +ArgumentError+ # may be returned on an error. # - # source://activerecord//lib/active_record/connection_handling.rb#49 + # source://activerecord//lib/active_record/connection_handling.rb#50 def establish_connection(config_or_env = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_handling.rb#337 - def flush_idle_connections!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/connection_handling.rb#256 - def lookup_connection_handler(handler_key); end + # source://activerecord//lib/active_record/connection_handling.rb#334 + def flush_idle_connections!(role = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_handling.rb#293 + # source://activerecord//lib/active_record/connection_handling.rb#267 def primary_class?; end # Prohibit swapping shards while inside of the passed block. @@ -15725,20 +17259,20 @@ module ActiveRecord::ConnectionHandling # is useful in cases you're using sharding to provide per-request # database isolation. # - # source://activerecord//lib/active_record/connection_handling.rb#214 + # source://activerecord//lib/active_record/connection_handling.rb#197 def prohibit_shard_swapping(enabled = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_handling.rb#321 + # source://activerecord//lib/active_record/connection_handling.rb#295 def remove_connection(name = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_handling.rb#312 + # source://activerecord//lib/active_record/connection_handling.rb#286 def retrieve_connection; end # Determine whether or not shard swapping is currently prohibited # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_handling.rb#223 + # source://activerecord//lib/active_record/connection_handling.rb#206 def shard_swapping_prohibited?; end # Prevent writing to the database regardless of role. @@ -15753,52 +17287,57 @@ module ActiveRecord::ConnectionHandling # See +READ_QUERY+ for the queries that are blocked by this # method. # - # source://activerecord//lib/active_record/connection_handling.rb#238 + # source://activerecord//lib/active_record/connection_handling.rb#221 def while_preventing_writes(enabled = T.unsafe(nil), &block); end private - # source://activerecord//lib/active_record/connection_handling.rb#382 + # source://activerecord//lib/active_record/connection_handling.rb#368 def append_to_connected_to_stack(entry); end - # source://activerecord//lib/active_record/connection_handling.rb#341 - def clear_on_handler(handler); end + # source://activerecord//lib/active_record/connection_handling.rb#340 + def deprecation_for_delegation(method); end - # source://activerecord//lib/active_record/connection_handling.rb#347 + # source://activerecord//lib/active_record/connection_handling.rb#348 def resolve_config_for_connection(config_or_env); end - # source://activerecord//lib/active_record/connection_handling.rb#390 - def swap_connection_handler(handler, &blk); end - # source://activerecord//lib/active_record/connection_handling.rb#357 - def with_handler(handler_key, &blk); end - - # source://activerecord//lib/active_record/connection_handling.rb#362 def with_role_and_shard(role, shard, prevent_writes); end end -# source://activerecord//lib/active_record/connection_handling.rb#6 +# source://activerecord//lib/active_record/connection_handling.rb#7 ActiveRecord::ConnectionHandling::DEFAULT_ENV = T.let(T.unsafe(nil), Proc) -# source://activerecord//lib/active_record/connection_handling.rb#5 +# source://activerecord//lib/active_record/connection_handling.rb#6 ActiveRecord::ConnectionHandling::RAILS_ENV = T.let(T.unsafe(nil), Proc) # Raised when connection to the database could not been established (for example when # {ActiveRecord::Base.connection=}[rdoc-ref:ConnectionHandling#connection] # is given a +nil+ object). # -# source://activerecord//lib/active_record/errors.rb#57 -class ActiveRecord::ConnectionNotEstablished < ::ActiveRecord::ActiveRecordError; end +# source://activerecord//lib/active_record/errors.rb#71 +class ActiveRecord::ConnectionNotEstablished < ::ActiveRecord::AdapterError + # @return [ConnectionNotEstablished] a new instance of ConnectionNotEstablished + # + # source://activerecord//lib/active_record/errors.rb#72 + def initialize(message = T.unsafe(nil), connection_pool: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/errors.rb#76 + def set_pool(connection_pool); end +end # Raised when a connection could not be obtained within the connection # acquisition timeout period: because max connections in pool # are in use. # -# source://activerecord//lib/active_record/errors.rb#63 +# source://activerecord//lib/active_record/errors.rb#88 class ActiveRecord::ConnectionTimeoutError < ::ActiveRecord::ConnectionNotEstablished; end +# = Active Record \Core +# # source://activerecord//lib/active_record/core.rb#10 module ActiveRecord::Core + include ::ActiveModel::Access extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -15810,19 +17349,19 @@ module ActiveRecord::Core # In both instances, valid attribute keys are determined by the column names of the associated table -- # hence you can't have attributes that aren't part of the table columns. # - # ==== Example: + # ==== Example # # Instantiates a single new object # User.new(first_name: 'Jamie') # # @yield [_self] # @yieldparam _self [ActiveRecord::Core] the object that the method was called on # - # source://activerecord//lib/active_record/core.rb#461 + # source://activerecord//lib/active_record/core.rb#446 def initialize(attributes = T.unsafe(nil)); end # Allows sort on objects # - # source://activerecord//lib/active_record/core.rb#614 + # source://activerecord//lib/active_record/core.rb#633 def <=>(other_object); end # Returns true if +comparison_object+ is the same exact object, or +comparison_object+ @@ -15835,15 +17374,15 @@ module ActiveRecord::Core # Note also that destroying a record preserves its ID in the model instance, so deleted # models are still comparable. # - # source://activerecord//lib/active_record/core.rb#580 + # source://activerecord//lib/active_record/core.rb#599 def ==(comparison_object); end # @return [Boolean] # - # source://activerecord//lib/active_record/core.rb#626 + # source://activerecord//lib/active_record/core.rb#645 def blank?; end - # source://activerecord//lib/active_record/core.rb#682 + # source://activerecord//lib/active_record/core.rb#713 def connection_handler; end # Populate +coder+ with attributes about this record that should be @@ -15859,7 +17398,7 @@ module ActiveRecord::Core # Post.new.encode_with(coder) # coder # => {"attributes" => {"id" => nil, ... }} # - # source://activerecord//lib/active_record/core.rb#565 + # source://activerecord//lib/active_record/core.rb#555 def encode_with(coder); end # Returns true if +comparison_object+ is the same exact object, or +comparison_object+ @@ -15872,27 +17411,27 @@ module ActiveRecord::Core # Note also that destroying a record preserves its ID in the model instance, so deleted # models are still comparable. # - # source://activerecord//lib/active_record/core.rb#580 + # source://activerecord//lib/active_record/core.rb#599 def eql?(comparison_object); end # Clone and freeze the attributes hash such that associations are still # accessible, even on destroyed records, but cloned models will not be # frozen. # - # source://activerecord//lib/active_record/core.rb#603 + # source://activerecord//lib/active_record/core.rb#622 def freeze; end # Returns +true+ if the attributes hash has been frozen. # # @return [Boolean] # - # source://activerecord//lib/active_record/core.rb#609 + # source://activerecord//lib/active_record/core.rb#628 def frozen?; end # Delegates to id in order to allow two records of the same type and id to work with something like: # [ Person.find(1), Person.find(2), Person.find(3) ] & [ Person.find(1), Person.find(4) ] # => [ Person.find(1) ] # - # source://activerecord//lib/active_record/core.rb#590 + # source://activerecord//lib/active_record/core.rb#609 def hash; end # Initialize an empty model object from +coder+. +coder+ should be @@ -15910,7 +17449,7 @@ module ActiveRecord::Core # post.init_with(coder) # post.title # => 'hello world' # - # source://activerecord//lib/active_record/core.rb#488 + # source://activerecord//lib/active_record/core.rb#473 def init_with(coder, &block); end # Initialize an empty model object from +attributes+. @@ -15920,108 +17459,110 @@ module ActiveRecord::Core # @yield [_self] # @yieldparam _self [ActiveRecord::Core] the object that the method was called on # - # source://activerecord//lib/active_record/core.rb#498 + # source://activerecord//lib/active_record/core.rb#483 def init_with_attributes(attributes, new_record = T.unsafe(nil)); end # Returns the contents of the record as a nicely formatted string. # - # source://activerecord//lib/active_record/core.rb#687 + # source://activerecord//lib/active_record/core.rb#718 def inspect; end # @return [Boolean] # - # source://activerecord//lib/active_record/core.rb#622 + # source://activerecord//lib/active_record/core.rb#641 def present?; end # Takes a PP and prettily prints this record to it, allowing you to get a nice result from pp record # when pp is required. # - # source://activerecord//lib/active_record/core.rb#705 + # source://activerecord//lib/active_record/core.rb#736 def pretty_print(pp); end # Marks this record as read only. # - # source://activerecord//lib/active_record/core.rb#678 + # customer = Customer.first + # customer.readonly! + # customer.save # Raises an ActiveRecord::ReadOnlyRecord + # + # source://activerecord//lib/active_record/core.rb#709 def readonly!; end # Returns +true+ if the record is read only. # # @return [Boolean] # - # source://activerecord//lib/active_record/core.rb#631 + # source://activerecord//lib/active_record/core.rb#650 def readonly?; end - # Returns a hash of the given methods with their names as keys and returned values as values. - # - # source://activerecord//lib/active_record/core.rb#729 - def slice(*methods); end - # Sets the record to strict_loading mode. This will raise an error # if the record tries to lazily load an association. # # user = User.first # user.strict_loading! # => true - # user.comments + # user.address.city + # => ActiveRecord::StrictLoadingViolationError + # user.comments.to_a # => ActiveRecord::StrictLoadingViolationError # - # === Parameters: + # ==== Parameters # - # * value - Boolean specifying whether to enable or disable strict loading. - # * mode - Symbol specifying strict loading mode. Defaults to :all. Using - # :n_plus_one_only mode will only raise an error if an association - # that will lead to an n plus one query is lazily loaded. + # * +value+ - Boolean specifying whether to enable or disable strict loading. + # * :mode - Symbol specifying strict loading mode. Defaults to :all. Using + # :n_plus_one_only mode will only raise an error if an association that + # will lead to an n plus one query is lazily loaded. # - # === Example: + # ==== Examples # # user = User.first # user.strict_loading!(false) # => false - # user.comments - # => # + # user.address.city # => "Tatooine" + # user.comments.to_a # => [# "Tatooine" + # user.comments.to_a # => [# ActiveRecord::StrictLoadingViolationError + # + # source://activerecord//lib/active_record/core.rb#688 def strict_loading!(value = T.unsafe(nil), mode: T.unsafe(nil)); end # Returns +true+ if the record is in strict_loading mode. # # @return [Boolean] # - # source://activerecord//lib/active_record/core.rb#636 + # source://activerecord//lib/active_record/core.rb#655 def strict_loading?; end # Returns the value of attribute strict_loading_mode. # - # source://activerecord//lib/active_record/core.rb#670 + # source://activerecord//lib/active_record/core.rb#697 def strict_loading_mode; end # Returns +true+ if the record uses strict_loading with +:n_plus_one_only+ mode enabled. # # @return [Boolean] # - # source://activerecord//lib/active_record/core.rb#673 + # source://activerecord//lib/active_record/core.rb#700 def strict_loading_n_plus_one_only?; end - # Returns an array of the values returned by the given methods. - # - # source://activerecord//lib/active_record/core.rb#734 - def values_at(*methods); end - private # @return [Boolean] # - # source://activerecord//lib/active_record/core.rb#771 + # source://activerecord//lib/active_record/core.rb#793 def custom_inspect_method_defined?; end - # source://activerecord//lib/active_record/core.rb#751 + # source://activerecord//lib/active_record/core.rb#772 def init_internals; end - # source://activerecord//lib/active_record/core.rb#539 + # source://activerecord//lib/active_record/core.rb#525 def initialize_dup(other); end - # source://activerecord//lib/active_record/core.rb#768 + # source://activerecord//lib/active_record/core.rb#790 def initialize_internals_callback; end - # source://activerecord//lib/active_record/core.rb#782 + # source://activerecord//lib/active_record/core.rb#804 def inspection_filter; end # +Array#flatten+ will call +#to_ary+ (recursively) on each of the elements of @@ -16033,10 +17574,13 @@ module ActiveRecord::Core # # See also https://tenderlovemaking.com/2011/06/28/til-its-ok-to-return-nil-from-to_ary.html # - # source://activerecord//lib/active_record/core.rb#747 + # source://activerecord//lib/active_record/core.rb#768 def to_ary; end module GeneratedClassMethods + def _destroy_association_async_job; end + def _destroy_association_async_job=(value); end + def _destroy_association_async_job?; end def belongs_to_required_by_default; end def belongs_to_required_by_default=(value); end def belongs_to_required_by_default?; end @@ -16049,8 +17593,8 @@ module ActiveRecord::Core def default_shard; end def default_shard=(value); end def default_shard?; end - def destroy_association_async_job; end - def destroy_association_async_job=(value); end + def destroy_association_async_batch_size; end + def destroy_association_async_batch_size=(value); end def enumerate_columns_in_select_statements; end def enumerate_columns_in_select_statements=(value); end def enumerate_columns_in_select_statements?; end @@ -16060,6 +17604,9 @@ module ActiveRecord::Core def logger; end def logger=(value); end def logger?; end + def run_commit_callbacks_on_first_saved_instances_in_transaction; end + def run_commit_callbacks_on_first_saved_instances_in_transaction=(value); end + def run_commit_callbacks_on_first_saved_instances_in_transaction?; end def shard_selector; end def shard_selector=(value); end def shard_selector?; end @@ -16075,186 +17622,82 @@ module ActiveRecord::Core def default_role?; end def default_shard; end def default_shard?; end - def destroy_association_async_job; end + def destroy_association_async_batch_size; end def logger; end def logger?; end end end -# source://activerecord//lib/active_record/core.rb#250 +# source://activerecord//lib/active_record/core.rb#238 module ActiveRecord::Core::ClassMethods - # Override the default class equality method to provide support for decorated models. + # Returns an instance of +Arel::Table+ loaded with the current table name. # - # source://activerecord//lib/active_record/core.rb#415 - def ===(object); end - - # source://activerecord//lib/active_record/core.rb#340 - def action_on_strict_loading_violation; end - - # source://activerecord//lib/active_record/core.rb#348 - def action_on_strict_loading_violation=(value); end - - # source://activerecord//lib/active_record/core.rb#340 - def application_record_class; end - - # source://activerecord//lib/active_record/core.rb#348 - def application_record_class=(value); end - - # Returns an instance of Arel::Table loaded with the current table name. - # - # source://activerecord//lib/active_record/core.rb#420 + # source://activerecord//lib/active_record/core.rb#364 def arel_table; end - # source://activerecord//lib/active_record/core.rb#432 + # source://activerecord//lib/active_record/core.rb#376 def cached_find_by_statement(key, &block); end - # source://activerecord//lib/active_record/core.rb#340 - def default_timezone; end - - # source://activerecord//lib/active_record/core.rb#348 - def default_timezone=(value); end - - # source://activerecord//lib/active_record/core.rb#340 - def dump_schema_after_migration; end - - # source://activerecord//lib/active_record/core.rb#348 - def dump_schema_after_migration=(value); end - - # source://activerecord//lib/active_record/core.rb#340 - def dump_schemas; end - - # source://activerecord//lib/active_record/core.rb#348 - def dump_schemas=(value); end - - # source://activerecord//lib/active_record/core.rb#340 - def error_on_ignored_order; end - - # source://activerecord//lib/active_record/core.rb#348 - def error_on_ignored_order=(value); end - # Returns columns which shouldn't be exposed while calling +#inspect+. # - # source://activerecord//lib/active_record/core.rb#373 + # source://activerecord//lib/active_record/core.rb#322 def filter_attributes; end # Specifies columns which shouldn't be exposed while calling +#inspect+. # - # source://activerecord//lib/active_record/core.rb#382 + # source://activerecord//lib/active_record/core.rb#331 def filter_attributes=(filter_attributes); end - # source://activerecord//lib/active_record/core.rb#268 + # source://activerecord//lib/active_record/core.rb#243 def find(*ids); end - # source://activerecord//lib/active_record/core.rb#287 + # source://activerecord//lib/active_record/core.rb#256 def find_by(*args); end - # source://activerecord//lib/active_record/core.rb#329 + # source://activerecord//lib/active_record/core.rb#303 def find_by!(*args); end - # source://activerecord//lib/active_record/core.rb#362 + # source://activerecord//lib/active_record/core.rb#311 def generated_association_methods; end - # source://activerecord//lib/active_record/core.rb#340 - def index_nested_attribute_errors; end - - # source://activerecord//lib/active_record/core.rb#348 - def index_nested_attribute_errors=(value); end - - # source://activerecord//lib/active_record/core.rb#255 - def inherited(child_class); end - - # source://activerecord//lib/active_record/core.rb#251 + # source://activerecord//lib/active_record/core.rb#239 def initialize_find_by_cache; end - # source://activerecord//lib/active_record/core.rb#358 + # source://activerecord//lib/active_record/core.rb#307 def initialize_generated_modules; end # Returns a string like 'Post(id:integer, title:string, body:text)' # - # source://activerecord//lib/active_record/core.rb#399 + # source://activerecord//lib/active_record/core.rb#348 def inspect; end - # source://activerecord//lib/active_record/core.rb#387 + # source://activerecord//lib/active_record/core.rb#336 def inspection_filter; end - # source://activerecord//lib/active_record/core.rb#340 - def legacy_connection_handling; end - - # source://activerecord//lib/active_record/core.rb#348 - def legacy_connection_handling=(value); end - - # source://activerecord//lib/active_record/core.rb#340 - def maintain_test_schema; end - - # source://activerecord//lib/active_record/core.rb#348 - def maintain_test_schema=(value); end - - # source://activerecord//lib/active_record/core.rb#424 + # source://activerecord//lib/active_record/core.rb#368 def predicate_builder; end - # source://activerecord//lib/active_record/core.rb#340 - def queues; end - - # source://activerecord//lib/active_record/core.rb#348 - def queues=(value); end - - # source://activerecord//lib/active_record/core.rb#340 - def reading_role; end - - # source://activerecord//lib/active_record/core.rb#348 - def reading_role=(value); end - - # source://activerecord//lib/active_record/core.rb#340 - def schema_format; end - - # source://activerecord//lib/active_record/core.rb#348 - def schema_format=(value); end - - # source://activerecord//lib/active_record/core.rb#340 - def suppress_multiple_database_warning; end - - # source://activerecord//lib/active_record/core.rb#348 - def suppress_multiple_database_warning=(value); end - - # source://activerecord//lib/active_record/core.rb#340 - def timestamped_migrations; end - - # source://activerecord//lib/active_record/core.rb#348 - def timestamped_migrations=(value); end - - # source://activerecord//lib/active_record/core.rb#428 + # source://activerecord//lib/active_record/core.rb#372 def type_caster; end - # source://activerecord//lib/active_record/core.rb#340 - def verbose_query_logs; end - - # source://activerecord//lib/active_record/core.rb#348 - def verbose_query_logs=(value); end - - # source://activerecord//lib/active_record/core.rb#340 - def warn_on_records_fetched_greater_than; end - - # source://activerecord//lib/active_record/core.rb#348 - def warn_on_records_fetched_greater_than=(value); end + private - # source://activerecord//lib/active_record/core.rb#340 - def writing_role; end + # source://activerecord//lib/active_record/core.rb#418 + def cached_find_by(keys, values); end - # source://activerecord//lib/active_record/core.rb#348 - def writing_role=(value); end - - private + # source://activerecord//lib/active_record/core.rb#382 + def inherited(subclass); end - # source://activerecord//lib/active_record/core.rb#438 + # source://activerecord//lib/active_record/core.rb#404 def relation; end - # source://activerecord//lib/active_record/core.rb#448 + # source://activerecord//lib/active_record/core.rb#414 def table_metadata; end end -# source://activerecord//lib/active_record/core.rb#775 +# source://activerecord//lib/active_record/core.rb#797 class ActiveRecord::Core::InspectionMask - # source://activerecord//lib/active_record/core.rb#776 + # source://activerecord//lib/active_record/core.rb#798 def pretty_print(pp); end end @@ -16263,23 +17706,38 @@ end # source://activerecord//lib/active_record/counter_cache.rb#5 module ActiveRecord::CounterCache extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActiveRecord::CounterCache::ClassMethods private - # source://activerecord//lib/active_record/counter_cache.rb#165 + # source://activerecord//lib/active_record/counter_cache.rb#186 def _create_record(attribute_names = T.unsafe(nil)); end - # source://activerecord//lib/active_record/counter_cache.rb#175 + # source://activerecord//lib/active_record/counter_cache.rb#196 def destroy_row; end - # source://activerecord//lib/active_record/counter_cache.rb#190 + # source://activerecord//lib/active_record/counter_cache.rb#211 def each_counter_cached_associations; end + + module GeneratedClassMethods + def _counter_cache_columns; end + def _counter_cache_columns=(value); end + def _counter_cache_columns?; end + end + + module GeneratedInstanceMethods; end end -# source://activerecord//lib/active_record/counter_cache.rb#8 +# source://activerecord//lib/active_record/counter_cache.rb#12 module ActiveRecord::CounterCache::ClassMethods + # @return [Boolean] + # + # source://activerecord//lib/active_record/counter_cache.rb#180 + def counter_cache_column?(name); end + # Decrement a numeric field by one, via a direct SQL update. # # This works the same as #increment_counter but reduces the column value by @@ -16289,6 +17747,7 @@ module ActiveRecord::CounterCache::ClassMethods # # * +counter_name+ - The name of the field that should be decremented. # * +id+ - The id of the object that should be decremented or an array of ids. + # * :by - The amount by which to decrement the value. Defaults to +1+. # * :touch - Touch timestamp columns when updating. # Pass +true+ to touch +updated_at+ and/or +updated_on+. Pass a symbol to # touch that column or an array of symbols to touch just those ones. @@ -16299,11 +17758,15 @@ module ActiveRecord::CounterCache::ClassMethods # DiscussionBoard.decrement_counter(:posts_count, 5) # # # Decrement the posts_count column for the record with an id of 5 + # by a specific amount. + # DiscussionBoard.decrement_counter(:posts_count, 5, by: 3) + # + # # Decrement the posts_count column for the record with an id of 5 # # and update the updated_at value. # DiscussionBoard.decrement_counter(:posts_count, 5, touch: true) # - # source://activerecord//lib/active_record/counter_cache.rb#159 - def decrement_counter(counter_name, id, touch: T.unsafe(nil)); end + # source://activerecord//lib/active_record/counter_cache.rb#176 + def decrement_counter(counter_name, id, by: T.unsafe(nil), touch: T.unsafe(nil)); end # Increment a numeric field by one, via a direct SQL update. # @@ -16316,6 +17779,7 @@ module ActiveRecord::CounterCache::ClassMethods # # * +counter_name+ - The name of the field that should be incremented. # * +id+ - The id of the object that should be incremented or an array of ids. + # * :by - The amount by which to increment the value. Defaults to +1+. # * :touch - Touch timestamp columns when updating. # Pass +true+ to touch +updated_at+ and/or +updated_on+. Pass a symbol to # touch that column or an array of symbols to touch just those ones. @@ -16326,11 +17790,15 @@ module ActiveRecord::CounterCache::ClassMethods # DiscussionBoard.increment_counter(:posts_count, 5) # # # Increment the posts_count column for the record with an id of 5 + # # by a specific amount. + # DiscussionBoard.increment_counter(:posts_count, 5, by: 3) + # + # # Increment the posts_count column for the record with an id of 5 # # and update the updated_at value. # DiscussionBoard.increment_counter(:posts_count, 5, touch: true) # - # source://activerecord//lib/active_record/counter_cache.rb#134 - def increment_counter(counter_name, id, touch: T.unsafe(nil)); end + # source://activerecord//lib/active_record/counter_cache.rb#146 + def increment_counter(counter_name, id, by: T.unsafe(nil), touch: T.unsafe(nil)); end # Resets one or more counter caches to their correct value using an SQL # count query. This is useful when adding new counter caches, or if the @@ -16353,7 +17821,7 @@ module ActiveRecord::CounterCache::ClassMethods # # attributes. # Post.reset_counters(1, :comments, touch: true) # - # source://activerecord//lib/active_record/counter_cache.rb#29 + # source://activerecord//lib/active_record/counter_cache.rb#33 def reset_counters(id, *counters, touch: T.unsafe(nil)); end # A generic "counter updater" implementation, intended primarily to be @@ -16373,74 +17841,82 @@ module ActiveRecord::CounterCache::ClassMethods # # ==== Examples # - # # For the Post with id of 5, decrement the comment_count by 1, and - # # increment the action_count by 1 - # Post.update_counters 5, comment_count: -1, action_count: 1 + # # For the Post with id of 5, decrement the comments_count by 1, and + # # increment the actions_count by 1 + # Post.update_counters 5, comments_count: -1, actions_count: 1 # # Executes the following SQL: # # UPDATE posts - # # SET comment_count = COALESCE(comment_count, 0) - 1, - # # action_count = COALESCE(action_count, 0) + 1 + # # SET comments_count = COALESCE(comments_count, 0) - 1, + # # actions_count = COALESCE(actions_count, 0) + 1 # # WHERE id = 5 # - # # For the Posts with id of 10 and 15, increment the comment_count by 1 - # Post.update_counters [10, 15], comment_count: 1 + # # For the Posts with id of 10 and 15, increment the comments_count by 1 + # Post.update_counters [10, 15], comments_count: 1 # # Executes the following SQL: # # UPDATE posts - # # SET comment_count = COALESCE(comment_count, 0) + 1 + # # SET comments_count = COALESCE(comments_count, 0) + 1 # # WHERE id IN (10, 15) # - # # For the Posts with id of 10 and 15, increment the comment_count by 1 + # # For the Posts with id of 10 and 15, increment the comments_count by 1 # # and update the updated_at value for each counter. - # Post.update_counters [10, 15], comment_count: 1, touch: true + # Post.update_counters [10, 15], comments_count: 1, touch: true # # Executes the following SQL: # # UPDATE posts - # # SET comment_count = COALESCE(comment_count, 0) + 1, + # # SET comments_count = COALESCE(comments_count, 0) + 1, # # `updated_at` = '2016-10-13T09:59:23-05:00' # # WHERE id IN (10, 15) # - # source://activerecord//lib/active_record/counter_cache.rb#107 + # source://activerecord//lib/active_record/counter_cache.rb#114 def update_counters(id, counters); end end # Raised when attribute has a name reserved by Active Record (when attribute # has name of one of Active Record instance methods). # -# source://activerecord//lib/active_record/errors.rb#343 +# source://activerecord//lib/active_record/errors.rb#413 class ActiveRecord::DangerousAttributeError < ::ActiveRecord::ActiveRecordError; end # Raised when creating a database if it exists. # -# source://activerecord//lib/active_record/errors.rb#266 +# source://activerecord//lib/active_record/errors.rb#336 class ActiveRecord::DatabaseAlreadyExists < ::ActiveRecord::StatementInvalid; end -# ActiveRecord::DatabaseConfigurations returns an array of DatabaseConfig -# objects (either a HashConfig or UrlConfig) that are constructed from the -# application's database configuration hash or URL string. +# = Active Record Database Configurations +# +# +ActiveRecord::DatabaseConfigurations+ returns an array of +DatabaseConfig+ +# objects that are constructed from the application's database +# configuration hash or URL string. +# +# The array of +DatabaseConfig+ objects in an application default to either a +# HashConfig or UrlConfig. You can retrieve your application's config by using +# ActiveRecord::Base.configurations. +# +# If you register a custom handler, objects will be created according to the +# conditions of the handler. See ::register_db_config_handler for more on +# registering custom handlers. # # source://activerecord//lib/active_record/database_configurations/database_config.rb#4 class ActiveRecord::DatabaseConfigurations # @return [DatabaseConfigurations] a new instance of DatabaseConfigurations # - # source://activerecord//lib/active_record/database_configurations.rb#19 + # source://activerecord//lib/active_record/database_configurations.rb#73 def initialize(configurations = T.unsafe(nil)); end - # source://activerecord//lib/active_record/database_configurations.rb#17 + # source://activerecord//lib/active_record/database_configurations.rb#27 def any?(*_arg0, **_arg1, &_arg2); end # Checks if the application's configurations are empty. # - # Aliased to blank? - # # @return [Boolean] # - # source://activerecord//lib/active_record/database_configurations.rb#98 + # source://activerecord//lib/active_record/database_configurations.rb#150 def blank?; end # Collects the configs for the environment and optionally the specification # name passed in. To include replica configurations pass include_hidden: true. # - # If a name is provided a single DatabaseConfig object will be - # returned, otherwise an array of DatabaseConfig objects will be + # If a name is provided a single +DatabaseConfig+ object will be + # returned, otherwise an array of +DatabaseConfig+ objects will be # returned that corresponds with the environment and type requested. # # ==== Options @@ -16450,38 +17926,35 @@ class ActiveRecord::DatabaseConfigurations # * name: The db config name (i.e. primary, animals, etc.). Defaults # to +nil+. If no +env_name+ is specified the config for the default env and the # passed +name+ will be returned. - # * include_replicas: Deprecated. Determines whether to include replicas in - # the returned list. Most of the time we're only iterating over the write - # connection (i.e. migrations don't need to run for the write and read connection). - # Defaults to +false+. + # * config_key: Selects configs that contain a particular key in the configuration + # hash. Useful for selecting configs that use a custom db config handler or finding + # configs with hashes that contain a particular key. # * include_hidden: Determines whether to include replicas and configurations - # hidden by +database_tasks: false+ in the returned list. Most of the time we're only + # hidden by database_tasks: false in the returned list. Most of the time we're only # iterating over the primary connections (i.e. migrations don't need to run for the # write and read connection). Defaults to +false+. # - # source://activerecord//lib/active_record/database_configurations.rb#45 - def configs_for(env_name: T.unsafe(nil), name: T.unsafe(nil), include_replicas: T.unsafe(nil), include_hidden: T.unsafe(nil)); end + # source://activerecord//lib/active_record/database_configurations.rb#98 + def configs_for(env_name: T.unsafe(nil), name: T.unsafe(nil), config_key: T.unsafe(nil), include_hidden: T.unsafe(nil)); end # Returns the value of attribute configurations. # - # source://activerecord//lib/active_record/database_configurations.rb#16 + # source://activerecord//lib/active_record/database_configurations.rb#26 def configurations; end # Checks if the application's configurations are empty. # - # Aliased to blank? - # # @return [Boolean] # - # source://activerecord//lib/active_record/database_configurations.rb#98 + # source://activerecord//lib/active_record/database_configurations.rb#150 def empty?; end - # Returns a single DatabaseConfig object based on the requested environment. + # Returns a single +DatabaseConfig+ object based on the requested environment. # # If the application has multiple databases +find_db_config+ will return - # the first DatabaseConfig for the environment. + # the first +DatabaseConfig+ for the environment. # - # source://activerecord//lib/active_record/database_configurations.rb#73 + # source://activerecord//lib/active_record/database_configurations.rb#127 def find_db_config(env); end # A primary configuration is one that is named primary or if there is @@ -16493,7 +17966,7 @@ class ActiveRecord::DatabaseConfigurations # # @return [Boolean] # - # source://activerecord//lib/active_record/database_configurations.rb#88 + # source://activerecord//lib/active_record/database_configurations.rb#142 def primary?(name); end # Returns fully resolved connection, accepts hash, string or symbol. @@ -16516,46 +17989,87 @@ class ActiveRecord::DatabaseConfigurations # DatabaseConfigurations.new({}).resolve("postgresql://localhost/foo") # # => DatabaseConfigurations::UrlConfig.new(config: {"adapter" => "postgresql", "host" => "localhost", "database" => "foo"}) # - # source://activerecord//lib/active_record/database_configurations.rb#122 + # source://activerecord//lib/active_record/database_configurations.rb#174 def resolve(config); end private - # source://activerecord//lib/active_record/database_configurations.rb#148 + # source://activerecord//lib/active_record/database_configurations.rb#200 def build_configs(configs); end - # source://activerecord//lib/active_record/database_configurations.rb#187 + # source://activerecord//lib/active_record/database_configurations.rb#239 def build_configuration_sentence; end - # source://activerecord//lib/active_record/database_configurations.rb#221 + # source://activerecord//lib/active_record/database_configurations.rb#273 def build_db_config_from_hash(env_name, name, config); end - # source://activerecord//lib/active_record/database_configurations.rb#200 + # source://activerecord//lib/active_record/database_configurations.rb#252 def build_db_config_from_raw_config(env_name, name, config); end - # source://activerecord//lib/active_record/database_configurations.rb#211 + # source://activerecord//lib/active_record/database_configurations.rb#263 def build_db_config_from_string(env_name, name, config); end - # source://activerecord//lib/active_record/database_configurations.rb#136 + # source://activerecord//lib/active_record/database_configurations.rb#188 def default_env; end - # source://activerecord//lib/active_record/database_configurations.rb#140 + # source://activerecord//lib/active_record/database_configurations.rb#192 def env_with_configs(env = T.unsafe(nil)); end - # source://activerecord//lib/active_record/database_configurations.rb#242 + # source://activerecord//lib/active_record/database_configurations.rb#295 def environment_url_config(env, name, config); end - # source://activerecord//lib/active_record/database_configurations.rb#249 + # source://activerecord//lib/active_record/database_configurations.rb#302 def environment_value_for(name); end - # source://activerecord//lib/active_record/database_configurations.rb#233 + # source://activerecord//lib/active_record/database_configurations.rb#286 def merge_db_environment_variables(current_env, configs); end - # source://activerecord//lib/active_record/database_configurations.rb#173 + # source://activerecord//lib/active_record/database_configurations.rb#225 def resolve_symbol_connection(name); end - # source://activerecord//lib/active_record/database_configurations.rb#167 + # source://activerecord//lib/active_record/database_configurations.rb#219 def walk_configs(env_name, config); end + + class << self + # source://activerecord//lib/active_record/database_configurations.rb#29 + def db_config_handlers; end + + # source://activerecord//lib/active_record/database_configurations.rb#29 + def db_config_handlers=(_arg0); end + + # Allows an application to register a custom handler for database configuration + # objects. This is useful for creating a custom handler that responds to + # methods your application needs but Active Record doesn't implement. For + # example if you are using Vitess, you may want your Vitess configurations + # to respond to `sharded?`. To implement this define the following in an + # initializer: + # + # ActiveRecord::DatabaseConfigurations.register_db_config_handler do |env_name, name, url, config| + # next unless config.key?(:vitess) + # VitessConfig.new(env_name, name, config) + # end + # + # Note: applications must handle the condition in which custom config should be + # created in your handler registration otherwise all objects will use the custom + # handler. + # + # Then define your +VitessConfig+ to respond to the methods your application + # needs. It is recommended that you inherit from one of the existing + # database config classes to avoid having to reimplement all methods. Custom + # config handlers should only implement methods Active Record does not. + # + # class VitessConfig < ActiveRecord::DatabaseConfigurations::UrlConfig + # def sharded? + # configuration_hash.fetch("sharded", false) + # end + # end + # + # For configs that have a +:vitess+ key, a +VitessConfig+ object will be + # created instead of a +UrlConfig+. + # + # source://activerecord//lib/active_record/database_configurations.rb#61 + def register_db_config_handler(&block); end + end end # Expands a connection string into a hash. @@ -16620,37 +18134,40 @@ class ActiveRecord::DatabaseConfigurations::ConnectionUrlResolver end # ActiveRecord::Base.configurations will return either a HashConfig or -# UrlConfig respectively. It will never return a DatabaseConfig object, +# UrlConfig respectively. It will never return a +DatabaseConfig+ object, # as this is the parent class for the types of database configuration objects. # # source://activerecord//lib/active_record/database_configurations/database_config.rb#8 class ActiveRecord::DatabaseConfigurations::DatabaseConfig # @return [DatabaseConfig] a new instance of DatabaseConfig # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#13 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#11 def initialize(env_name, name); end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#30 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#32 def _database=(database); end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#34 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#36 def adapter; end - # source://activerecord//lib/active_record/database_configurations/database_config.rb#18 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#20 + def adapter_class_method; end + + # source://activerecord//lib/active_record/database_configurations/database_config.rb#16 def adapter_method; end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#54 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#60 def checkout_timeout; end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#26 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#28 def database; end # source://activerecord//lib/active_record/database_configurations/database_config.rb#9 @@ -16658,77 +18175,72 @@ class ActiveRecord::DatabaseConfigurations::DatabaseConfig # @return [Boolean] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#74 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#80 def for_current_env?; end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#22 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#24 def host; end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#62 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#68 def idle_timeout; end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#50 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#52 def max_queue; end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#46 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#48 def max_threads; end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#70 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#76 def migrations_paths; end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#42 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#44 def min_threads; end # source://activerecord//lib/active_record/database_configurations/database_config.rb#9 def name; end - # Returns the value of attribute owner_name. - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#11 - def owner_name; end - - # Sets the attribute owner_name - # - # @param value the value to set the attribute owner_name to. + # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#11 - def owner_name=(_arg0); end + # source://activerecord//lib/active_record/database_configurations/database_config.rb#40 + def pool; end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#38 - def pool; end + # source://activerecord//lib/active_record/database_configurations/database_config.rb#56 + def query_cache; end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#58 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#64 def reaping_frequency; end # @raise [NotImplementedError] # @return [Boolean] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#66 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#72 def replica?; end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#78 + # source://activerecord//lib/active_record/database_configurations/database_config.rb#84 def schema_cache_path; end end -# A HashConfig object is created for each database configuration entry that +# = Active Record Database Hash Config +# +# A +HashConfig+ object is created for each database configuration entry that # is created from a hash. # # A hash config: @@ -16740,86 +18252,93 @@ end # # # -# ==== Options -# -# * :env_name - The Rails environment, i.e. "development". -# * :name - The db config name. In a standard two-tier -# database configuration this will default to "primary". In a multiple -# database three-tier database configuration this corresponds to the name -# used in the second tier, for example "primary_readonly". -# * :config - The config hash. This is the hash that contains the -# database adapter, name, and other important information for database -# connections. +# See ActiveRecord::DatabaseConfigurations for more info. # -# source://activerecord//lib/active_record/database_configurations/hash_config.rb#27 +# source://activerecord//lib/active_record/database_configurations/hash_config.rb#20 class ActiveRecord::DatabaseConfigurations::HashConfig < ::ActiveRecord::DatabaseConfigurations::DatabaseConfig + # Initialize a new +HashConfig+ object + # + # ==== Options + # + # * :env_name - The \Rails environment, i.e. "development". + # * :name - The db config name. In a standard two-tier + # database configuration this will default to "primary". In a multiple + # database three-tier database configuration this corresponds to the name + # used in the second tier, for example "primary_readonly". + # * :config - The config hash. This is the hash that contains the + # database adapter, name, and other important information for database + # connections. + # # @return [HashConfig] a new instance of HashConfig # - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#30 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#36 def initialize(env_name, name, configuration_hash); end - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#61 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#67 def _database=(database); end - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#96 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#106 def adapter; end - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#81 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#91 def checkout_timeout; end # Returns the value of attribute configuration_hash. # - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#28 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#21 def configuration_hash; end - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#57 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#63 def database; end # @return [Boolean] # - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#139 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#149 def database_tasks?; end - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#107 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#117 def default_schema_cache_path; end - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#49 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#55 def host; end - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#91 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#101 def idle_timeout; end - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#111 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#121 def lazy_schema_cache_path; end - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#77 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#87 def max_queue; end - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#73 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#79 def max_threads; end # The migrations paths for a database configuration. If the # +migrations_paths+ key is present in the config, +migrations_paths+ # will return its value. # - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#45 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#51 def migrations_paths; end - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#69 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#75 def min_threads; end - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#65 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#71 def pool; end # @return [Boolean] # - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#115 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#125 def primary?; end + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#83 + def query_cache; end + # +reaping_frequency+ is configurable mostly for historical reasons, but it could # also be useful if someone wants a very low +idle_timeout+. # - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#87 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#97 def reaping_frequency; end # Determines whether a database configuration is for a replica / readonly @@ -16828,14 +18347,14 @@ class ActiveRecord::DatabaseConfigurations::HashConfig < ::ActiveRecord::Databas # # @return [Boolean] # - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#38 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#44 def replica?; end # The path to the schema cache dump file for a database. # If omitted, the filename will be read from ENV or a # default will be derived. # - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#103 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#113 def schema_cache_path; end # Determines whether to dump the schema/structure files and the @@ -16844,25 +18363,27 @@ class ActiveRecord::DatabaseConfigurations::HashConfig < ::ActiveRecord::Databas # If +configuration_hash[:schema_dump]+ is set to +false+ or +nil+ # the schema will not be dumped. # - # If the config option is set that will be used. Otherwise Rails + # If the config option is set that will be used. Otherwise \Rails # will generate the filename from the database config name. # - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#127 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#137 def schema_dump(format = T.unsafe(nil)); end - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#53 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#59 def socket; end private - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#144 + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#154 def schema_file_type(format); end end -# source://activerecord//lib/active_record/database_configurations.rb#14 +# source://activerecord//lib/active_record/database_configurations.rb#24 class ActiveRecord::DatabaseConfigurations::InvalidConfigurationError < ::StandardError; end -# A UrlConfig object is created for each database configuration +# = Active Record Database Url Config +# +# A +UrlConfig+ object is created for each database configuration # entry that is created from a URL. This can either be a URL string # or a hash with a URL in place of the config hash. # @@ -16877,28 +18398,32 @@ class ActiveRecord::DatabaseConfigurations::InvalidConfigurationError < ::Standa # @config={adapter: "postgresql", database: "foo", host: "localhost"}, # @url="postgres://localhost/foo"> # -# ==== Options +# See ActiveRecord::DatabaseConfigurations for more info. # -# * :env_name - The Rails environment, i.e. "development". -# * :name - The db config name. In a standard two-tier -# database configuration this will default to "primary". In a multiple -# database three-tier database configuration this corresponds to the name -# used in the second tier, for example "primary_readonly". -# * :url - The database URL. -# * :config - The config hash. This is the hash that contains the -# database adapter, name, and other important information for database -# connections. -# -# source://activerecord//lib/active_record/database_configurations/url_config.rb#31 +# source://activerecord//lib/active_record/database_configurations/url_config.rb#24 class ActiveRecord::DatabaseConfigurations::UrlConfig < ::ActiveRecord::DatabaseConfigurations::HashConfig + # Initialize a new +UrlConfig+ object + # + # ==== Options + # + # * :env_name - The \Rails environment, i.e. "development". + # * :name - The db config name. In a standard two-tier + # database configuration this will default to "primary". In a multiple + # database three-tier database configuration this corresponds to the name + # used in the second tier, for example "primary_readonly". + # * :url - The database URL. + # * :config - The config hash. This is the hash that contains the + # database adapter, name, and other important information for database + # connections. + # # @return [UrlConfig] a new instance of UrlConfig # - # source://activerecord//lib/active_record/database_configurations/url_config.rb#34 + # source://activerecord//lib/active_record/database_configurations/url_config.rb#40 def initialize(env_name, name, url, configuration_hash = T.unsafe(nil)); end # Returns the value of attribute url. # - # source://activerecord//lib/active_record/database_configurations/url_config.rb#32 + # source://activerecord//lib/active_record/database_configurations/url_config.rb#25 def url; end private @@ -16906,25 +18431,25 @@ class ActiveRecord::DatabaseConfigurations::UrlConfig < ::ActiveRecord::Database # Return a Hash that can be merged into the main config that represents # the passed in url # - # source://activerecord//lib/active_record/database_configurations/url_config.rb#44 + # source://activerecord//lib/active_record/database_configurations/url_config.rb#50 def build_url_hash; end end # Raised when connection to the database could not been established because it was not # able to connect to the host or when the authorization failed. # -# source://activerecord//lib/active_record/errors.rb#68 +# source://activerecord//lib/active_record/errors.rb#93 class ActiveRecord::DatabaseConnectionError < ::ActiveRecord::ConnectionNotEstablished # @return [DatabaseConnectionError] a new instance of DatabaseConnectionError # - # source://activerecord//lib/active_record/errors.rb#69 + # source://activerecord//lib/active_record/errors.rb#94 def initialize(message = T.unsafe(nil)); end class << self - # source://activerecord//lib/active_record/errors.rb#74 + # source://activerecord//lib/active_record/errors.rb#99 def hostname_error(hostname); end - # source://activerecord//lib/active_record/errors.rb#81 + # source://activerecord//lib/active_record/errors.rb#106 def username_error(username); end end end @@ -16932,10 +18457,13 @@ end # Deadlocked will be raised when a transaction is rolled # back by the database when a deadlock is encountered. # -# source://activerecord//lib/active_record/errors.rb#436 +# This is a subclass of TransactionRollbackError, please make sure to check +# its documentation to be aware of its caveats. +# +# source://activerecord//lib/active_record/errors.rb#525 class ActiveRecord::Deadlocked < ::ActiveRecord::TransactionRollbackError; end -# == Delegated types +# = Delegated types # # Class hierarchies can map to relational database tables in many ways. Active Record, for example, offers # purely abstract classes, where the superclass doesn't persist any attributes, and single-table inheritance, @@ -17070,7 +18598,7 @@ class ActiveRecord::Deadlocked < ::ActiveRecord::TransactionRollbackError; end # # Now you can list a bunch of entries, call Entry#title, and polymorphism will provide you with the answer. # -# == Nested Attributes +# == Nested \Attributes # # Enabling nested attributes on a delegated_type association allows you to # create the entry and message in one go: @@ -17126,6 +18654,11 @@ module ActiveRecord::DelegatedType # +role+ with an "_id" suffix. So a class that defines a # delegated_type :entryable, types: %w[ Message Comment ] association will use "entryable_id" as # the default :foreign_key. + # [:foreign_type] + # Specify the column used to store the associated object's type. By default this is inferred to be the passed + # +role+ with a "_type" suffix. A class that defines a + # delegated_type :entryable, types: %w[ Message Comment ] association will use "entryable_type" as + # the default :foreign_type. # [:primary_key] # Specify the method that returns the primary key of associated object used for the convenience methods. # By default this is +id+. @@ -17138,12 +18671,12 @@ module ActiveRecord::DelegatedType # Entry#message_uuid # => returns entryable_uuid, when entryable_type == "Message", otherwise nil # Entry#comment_uuid # => returns entryable_uuid, when entryable_type == "Comment", otherwise nil # - # source://activerecord//lib/active_record/delegated_type.rb#206 + # source://activerecord//lib/active_record/delegated_type.rb#211 def delegated_type(role, types:, **options); end private - # source://activerecord//lib/active_record/delegated_type.rb#212 + # source://activerecord//lib/active_record/delegated_type.rb#217 def define_delegated_type_methods(role, types:, options:); end end @@ -17153,107 +18686,121 @@ module ActiveRecord::Delegation mixes_in_class_methods ::ActiveRecord::Delegation::ClassMethods - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def &(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def +(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def -(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def [](*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def as_json(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def compact(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#93 + # source://activerecord//lib/active_record/relation/delegation.rb#105 def connection(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def each(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def encode_with(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def in_groups(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def in_groups_of(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def index(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 + def intersect?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#100 def join(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def length(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#93 + # source://activerecord//lib/active_record/relation/delegation.rb#105 def primary_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def reverse(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def rindex(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def rotate(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def sample(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def shuffle(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def slice(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def split(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def to_formatted_s(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def to_fs(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def to_sentence(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#100 def to_xml(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation/delegation.rb#88 + # source://activerecord//lib/active_record/relation/delegation.rb#105 + def transaction(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#100 def |(*_arg0, **_arg1, &_arg2); end private # @return [Boolean] # - # source://activerecord//lib/active_record/relation/delegation.rb#128 + # source://activerecord//lib/active_record/relation/delegation.rb#142 def respond_to_missing?(method, _); end + + class << self + # source://activerecord//lib/active_record/relation/delegation.rb#9 + def delegated_classes; end + + # source://activerecord//lib/active_record/relation/delegation.rb#18 + def uncacheable_methods; end + end end -# source://activerecord//lib/active_record/relation/delegation.rb#116 +# source://activerecord//lib/active_record/relation/delegation.rb#130 module ActiveRecord::Delegation::ClassMethods - # source://activerecord//lib/active_record/relation/delegation.rb#117 + # source://activerecord//lib/active_record/relation/delegation.rb#131 def create(klass, *args, **kwargs); end private - # source://activerecord//lib/active_record/relation/delegation.rb#122 + # source://activerecord//lib/active_record/relation/delegation.rb#136 def relation_class_for(klass); end end -# source://activerecord//lib/active_record/relation/delegation.rb#95 +# source://activerecord//lib/active_record/relation/delegation.rb#107 module ActiveRecord::Delegation::ClassSpecificRelation extend ::ActiveSupport::Concern @@ -17261,61 +18808,61 @@ module ActiveRecord::Delegation::ClassSpecificRelation private - # source://activerecord//lib/active_record/relation/delegation.rb#105 + # source://activerecord//lib/active_record/relation/delegation.rb#117 def method_missing(method, *args, **_arg2, &block); end end -# source://activerecord//lib/active_record/relation/delegation.rb#98 +# source://activerecord//lib/active_record/relation/delegation.rb#110 module ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods - # source://activerecord//lib/active_record/relation/delegation.rb#99 + # source://activerecord//lib/active_record/relation/delegation.rb#111 def name; end end -# source://activerecord//lib/active_record/relation/delegation.rb#8 +# source://activerecord//lib/active_record/relation/delegation.rb#25 module ActiveRecord::Delegation::DelegateCache - # source://activerecord//lib/active_record/relation/delegation.rb#38 + # source://activerecord//lib/active_record/relation/delegation.rb#50 def generate_relation_method(method); end - # source://activerecord//lib/active_record/relation/delegation.rb#33 + # source://activerecord//lib/active_record/relation/delegation.rb#45 def inherited(child_class); end - # source://activerecord//lib/active_record/relation/delegation.rb#13 + # source://activerecord//lib/active_record/relation/delegation.rb#30 def initialize_relation_delegate_cache; end - # source://activerecord//lib/active_record/relation/delegation.rb#9 + # source://activerecord//lib/active_record/relation/delegation.rb#26 def relation_delegate_class(klass); end protected - # source://activerecord//lib/active_record/relation/delegation.rb#43 + # source://activerecord//lib/active_record/relation/delegation.rb#55 def include_relation_methods(delegate); end private - # source://activerecord//lib/active_record/relation/delegation.rb#49 + # source://activerecord//lib/active_record/relation/delegation.rb#61 def generated_relation_methods; end end -# source://activerecord//lib/active_record/relation/delegation.rb#57 +# source://activerecord//lib/active_record/relation/delegation.rb#69 class ActiveRecord::Delegation::GeneratedRelationMethods < ::Module include ::Mutex_m - # source://activerecord//lib/active_record/relation/delegation.rb#60 + # source://activerecord//lib/active_record/relation/delegation.rb#72 def generate_method(method); end - # source://mutex_m/0.1.2/mutex_m.rb#93 + # source://mutex_m/0.2.0/lib/mutex_m.rb#91 def lock; end - # source://mutex_m/0.1.2/mutex_m.rb#83 + # source://mutex_m/0.2.0/lib/mutex_m.rb#81 def locked?; end - # source://mutex_m/0.1.2/mutex_m.rb#78 + # source://mutex_m/0.2.0/lib/mutex_m.rb#76 def synchronize(&block); end - # source://mutex_m/0.1.2/mutex_m.rb#88 + # source://mutex_m/0.2.0/lib/mutex_m.rb#86 def try_lock; end - # source://mutex_m/0.1.2/mutex_m.rb#98 + # source://mutex_m/0.2.0/lib/mutex_m.rb#96 def unlock; end end @@ -17323,36 +18870,41 @@ end # (has_many, has_one) when there is at least 1 child associated instance. # ex: if @project.tasks.size > 0, DeleteRestrictionError will be raised when trying to destroy @project # -# source://activerecord//lib/active_record/associations.rb#240 +# source://activerecord//lib/active_record/associations.rb#256 class ActiveRecord::DeleteRestrictionError < ::ActiveRecord::ActiveRecordError # @return [DeleteRestrictionError] a new instance of DeleteRestrictionError # - # source://activerecord//lib/active_record/associations.rb#241 + # source://activerecord//lib/active_record/associations.rb#257 def initialize(name = T.unsafe(nil)); end end +# source://activerecord//lib/active_record/errors.rb#13 +class ActiveRecord::DeprecatedActiveJobRequiredError < ::ActiveRecord::ActiveRecordError; end + # source://activerecord//lib/active_record/destroy_association_async_job.rb#4 class ActiveRecord::DestroyAssociationAsyncError < ::StandardError; end +# = Active Record Destroy Association Async Job +# # Job to destroy the records associated with a destroyed record in background. # -# source://activerecord//lib/active_record/destroy_association_async_job.rb#8 +# source://activerecord//lib/active_record/destroy_association_async_job.rb#10 class ActiveRecord::DestroyAssociationAsyncJob < ::ActiveJob::Base - # source://activerecord//lib/active_record/destroy_association_async_job.rb#13 + # source://activerecord//lib/active_record/destroy_association_async_job.rb#15 def perform(owner_model_name: T.unsafe(nil), owner_id: T.unsafe(nil), association_class: T.unsafe(nil), association_ids: T.unsafe(nil), association_primary_key_column: T.unsafe(nil), ensuring_owner_was_method: T.unsafe(nil)); end private # @return [Boolean] # - # source://activerecord//lib/active_record/destroy_association_async_job.rb#32 + # source://activerecord//lib/active_record/destroy_association_async_job.rb#34 def owner_destroyed?(owner, ensuring_owner_was_method); end class << self - # source://activejob/7.0.6/lib/active_job/queue_name.rb#55 + # source://activejob/7.1.3.2/lib/active_job/queue_name.rb#55 def queue_name; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end end end @@ -17384,19 +18936,19 @@ class ActiveRecord::DisableJoinsAssociationRelation < ::ActiveRecord::Relation def load; end end -# source://activerecord//lib/active_record/migration.rb#103 +# source://activerecord//lib/active_record/migration.rb#104 class ActiveRecord::DuplicateMigrationNameError < ::ActiveRecord::MigrationError # @return [DuplicateMigrationNameError] a new instance of DuplicateMigrationNameError # - # source://activerecord//lib/active_record/migration.rb#104 + # source://activerecord//lib/active_record/migration.rb#105 def initialize(name = T.unsafe(nil)); end end -# source://activerecord//lib/active_record/migration.rb#93 +# source://activerecord//lib/active_record/migration.rb#94 class ActiveRecord::DuplicateMigrationVersionError < ::ActiveRecord::MigrationError # @return [DuplicateMigrationVersionError] a new instance of DuplicateMigrationVersionError # - # source://activerecord//lib/active_record/migration.rb#94 + # source://activerecord//lib/active_record/migration.rb#95 def initialize(version = T.unsafe(nil)); end end @@ -17516,11 +19068,11 @@ end # Eager loading polymorphic associations is only possible with # {ActiveRecord::Relation#preload}[rdoc-ref:QueryMethods#preload]. # -# source://activerecord//lib/active_record/associations.rb#227 +# source://activerecord//lib/active_record/associations.rb#243 class ActiveRecord::EagerLoadPolymorphicError < ::ActiveRecord::ActiveRecordError # @return [EagerLoadPolymorphicError] a new instance of EagerLoadPolymorphicError # - # source://activerecord//lib/active_record/associations.rb#228 + # source://activerecord//lib/active_record/associations.rb#244 def initialize(reflection = T.unsafe(nil)); end end @@ -17535,15 +19087,18 @@ module ActiveRecord::Encryption # source://activerecord//lib/active_record/encryption/configurable.rb#10 def config; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#56 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#74 def custom_contexts; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#100 + # source://activesupport/7.1.3.2/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 def default_context; end + # source://activerecord//lib/active_record/encryption/contexts.rb#17 + def default_context=(val); end + # source://activerecord//lib/active_record/encryption/configurable.rb#11 def encrypted_attribute_declaration_listeners; end @@ -17554,16 +19109,19 @@ module ActiveRecord::Encryption # source://activerecord//lib/active_record/encryption/configurable.rb#10 def config; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#48 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 def custom_contexts; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#92 + # source://activesupport/7.1.3.2/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 def default_context; end - # source://activerecord//lib/active_record/encryption.rb#49 + # source://activerecord//lib/active_record/encryption/contexts.rb#17 + def default_context=(val); end + + # source://activerecord//lib/active_record/encryption.rb#50 def eager_load!; end # source://activerecord//lib/active_record/encryption/configurable.rb#11 @@ -17574,6 +19132,49 @@ module ActiveRecord::Encryption end end +# source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#5 +class ActiveRecord::Encryption::AutoFilteredParameters + # @return [AutoFilteredParameters] a new instance of AutoFilteredParameters + # + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#6 + def initialize(app); end + + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#14 + def enable; end + + private + + # Returns the value of attribute app. + # + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#20 + def app; end + + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#36 + def apply_collected_attributes; end + + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#53 + def apply_filter(klass, attribute); end + + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#28 + def attribute_was_declared(klass, attribute); end + + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#48 + def collect_for_later(klass, attribute); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#44 + def collecting?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#61 + def excluded_from_filter_parameters?(filter_parameter); end + + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#22 + def install_collecting_hook; end +end + # The algorithm used for encrypting and decrypting +Message+ objects. # # It uses AES-256-GCM. It will generate a random IV for non deterministic encryption (default) @@ -17620,40 +19221,43 @@ end # # See +Encryptor+ # -# source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#15 +# source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#14 class ActiveRecord::Encryption::Cipher::Aes256Gcm # When iv not provided, it will generate a random iv on each encryption operation (default and # recommended operation) # # @return [Aes256Gcm] a new instance of Aes256Gcm # - # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#30 + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#29 def initialize(secret, deterministic: T.unsafe(nil)); end - # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#56 + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#55 def decrypt(encrypted_message); end - # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#35 + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#34 def encrypt(clear_text); end + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#82 + def inspect; end + private - # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#92 + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#95 def generate_deterministic_iv(clear_text); end - # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#84 + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#87 def generate_iv(cipher, clear_text); end class << self - # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#23 + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#22 def iv_length; end - # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#19 + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#18 def key_length; end end end -# source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#16 +# source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#15 ActiveRecord::Encryption::Cipher::Aes256Gcm::CIPHER_TYPE = T.let(T.unsafe(nil), String) # source://activerecord//lib/active_record/encryption/cipher.rb#12 @@ -17661,170 +19265,194 @@ ActiveRecord::Encryption::Cipher::DEFAULT_ENCODING = T.let(T.unsafe(nil), Encodi # Container of configuration options # -# source://activerecord//lib/active_record/encryption/config.rb#6 +# source://activerecord//lib/active_record/encryption/config.rb#8 class ActiveRecord::Encryption::Config # @return [Config] a new instance of Config # - # source://activerecord//lib/active_record/encryption/config.rb#11 + # source://activerecord//lib/active_record/encryption/config.rb#13 def initialize; end # Returns the value of attribute add_to_filter_parameters. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def add_to_filter_parameters; end # Sets the attribute add_to_filter_parameters # # @param value the value to set the attribute add_to_filter_parameters to. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def add_to_filter_parameters=(_arg0); end # Returns the value of attribute deterministic_key. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#41 def deterministic_key; end # Sets the attribute deterministic_key # # @param value the value to set the attribute deterministic_key to. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def deterministic_key=(_arg0); end # Returns the value of attribute encrypt_fixtures. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def encrypt_fixtures; end # Sets the attribute encrypt_fixtures # # @param value the value to set the attribute encrypt_fixtures to. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def encrypt_fixtures=(_arg0); end # Returns the value of attribute excluded_from_filter_parameters. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def excluded_from_filter_parameters; end # Sets the attribute excluded_from_filter_parameters # # @param value the value to set the attribute excluded_from_filter_parameters to. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def excluded_from_filter_parameters=(_arg0); end # Returns the value of attribute extend_queries. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def extend_queries; end # Sets the attribute extend_queries # # @param value the value to set the attribute extend_queries to. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def extend_queries=(_arg0); end # Returns the value of attribute forced_encoding_for_deterministic_encryption. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def forced_encoding_for_deterministic_encryption; end # Sets the attribute forced_encoding_for_deterministic_encryption # # @param value the value to set the attribute forced_encoding_for_deterministic_encryption to. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def forced_encoding_for_deterministic_encryption=(_arg0); end + # source://activerecord//lib/active_record/encryption/config.rb#36 + def has_deterministic_key?; end + + # source://activerecord//lib/active_record/encryption/config.rb#36 + def has_key_derivation_salt?; end + + # source://activerecord//lib/active_record/encryption/config.rb#36 + def has_primary_key?; end + + # Returns the value of attribute hash_digest_class. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def hash_digest_class; end + + # Sets the attribute hash_digest_class + # + # @param value the value to set the attribute hash_digest_class to. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def hash_digest_class=(_arg0); end + # Returns the value of attribute key_derivation_salt. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#41 def key_derivation_salt; end # Sets the attribute key_derivation_salt # # @param value the value to set the attribute key_derivation_salt to. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def key_derivation_salt=(_arg0); end # Configure previous encryption schemes. # # config.active_record.encryption.previous = [ { key_provider: MyOldKeyProvider.new } ] # - # source://activerecord//lib/active_record/encryption/config.rb#18 + # source://activerecord//lib/active_record/encryption/config.rb#20 def previous=(previous_schemes_properties); end # Returns the value of attribute previous_schemes. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def previous_schemes; end # Sets the attribute previous_schemes # # @param value the value to set the attribute previous_schemes to. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def previous_schemes=(_arg0); end # Returns the value of attribute primary_key. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#41 def primary_key; end # Sets the attribute primary_key # # @param value the value to set the attribute primary_key to. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def primary_key=(_arg0); end # Returns the value of attribute store_key_references. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def store_key_references; end # Sets the attribute store_key_references # # @param value the value to set the attribute store_key_references to. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def store_key_references=(_arg0); end + # source://activerecord//lib/active_record/encryption/config.rb#26 + def support_sha1_for_non_deterministic_encryption=(value); end + # Returns the value of attribute support_unencrypted_data. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def support_unencrypted_data; end # Sets the attribute support_unencrypted_data # # @param value the value to set the attribute support_unencrypted_data to. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def support_unencrypted_data=(_arg0); end # Returns the value of attribute validate_column_size. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def validate_column_size; end # Sets the attribute validate_column_size # # @param value the value to set the attribute validate_column_size to. # - # source://activerecord//lib/active_record/encryption/config.rb#7 + # source://activerecord//lib/active_record/encryption/config.rb#9 def validate_column_size=(_arg0); end private - # source://activerecord//lib/active_record/encryption/config.rb#39 + # source://activerecord//lib/active_record/encryption/config.rb#63 def add_previous_scheme(**properties); end - # source://activerecord//lib/active_record/encryption/config.rb#25 + # source://activerecord//lib/active_record/encryption/config.rb#48 def set_defaults; end end @@ -17843,9 +19471,9 @@ module ActiveRecord::Encryption::Configurable::ClassMethods def cipher(*_arg0, **_arg1, &_arg2); end # source://activerecord//lib/active_record/encryption/configurable.rb#20 - def configure(primary_key:, deterministic_key:, key_derivation_salt:, **properties); end + def configure(primary_key: T.unsafe(nil), deterministic_key: T.unsafe(nil), key_derivation_salt: T.unsafe(nil), **properties); end - # source://activerecord//lib/active_record/encryption/configurable.rb#47 + # source://activerecord//lib/active_record/encryption/configurable.rb#52 def encrypted_attribute_was_declared(klass, name); end # source://activerecord//lib/active_record/encryption/configurable.rb#17 @@ -17854,9 +19482,6 @@ module ActiveRecord::Encryption::Configurable::ClassMethods # source://activerecord//lib/active_record/encryption/configurable.rb#17 def frozen_encryption(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/encryption/configurable.rb#53 - def install_auto_filtered_parameters_hook(application); end - # source://activerecord//lib/active_record/encryption/configurable.rb#17 def key_generator(*_arg0, **_arg1, &_arg2); end @@ -17866,13 +19491,8 @@ module ActiveRecord::Encryption::Configurable::ClassMethods # source://activerecord//lib/active_record/encryption/configurable.rb#17 def message_serializer(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/encryption/configurable.rb#42 + # source://activerecord//lib/active_record/encryption/configurable.rb#47 def on_encrypted_attribute_declared(&block); end - - private - - # source://activerecord//lib/active_record/encryption/configurable.rb#61 - def excluded_from_filter_parameters?(filter_parameter); end end # An encryption context configures the different entities used to perform encryption: @@ -17887,51 +19507,54 @@ end class ActiveRecord::Encryption::Context # @return [Context] a new instance of Context # - # source://activerecord//lib/active_record/encryption/context.rb#19 + # source://activerecord//lib/active_record/encryption/context.rb#17 def initialize; end - # source://activerecord//lib/active_record/encryption/context.rb#16 + # source://activerecord//lib/active_record/encryption/context.rb#15 def cipher; end - # source://activerecord//lib/active_record/encryption/context.rb#16 + # source://activerecord//lib/active_record/encryption/context.rb#15 def cipher=(_arg0); end - # source://activerecord//lib/active_record/encryption/context.rb#16 + # source://activerecord//lib/active_record/encryption/context.rb#15 def encryptor; end - # source://activerecord//lib/active_record/encryption/context.rb#16 + # source://activerecord//lib/active_record/encryption/context.rb#15 def encryptor=(_arg0); end - # source://activerecord//lib/active_record/encryption/context.rb#16 + # source://activerecord//lib/active_record/encryption/context.rb#15 def frozen_encryption; end - # source://activerecord//lib/active_record/encryption/context.rb#16 + # source://activerecord//lib/active_record/encryption/context.rb#15 def frozen_encryption=(_arg0); end - # source://activerecord//lib/active_record/encryption/context.rb#16 + # source://activerecord//lib/active_record/encryption/context.rb#15 def frozen_encryption?; end - # source://activerecord//lib/active_record/encryption/context.rb#16 + # source://activerecord//lib/active_record/encryption/context.rb#15 def key_generator; end - # source://activerecord//lib/active_record/encryption/context.rb#16 + # source://activerecord//lib/active_record/encryption/context.rb#15 def key_generator=(_arg0); end - # source://activerecord//lib/active_record/encryption/context.rb#16 + # source://activerecord//lib/active_record/encryption/context.rb#24 def key_provider; end - # source://activerecord//lib/active_record/encryption/context.rb#16 + # source://activerecord//lib/active_record/encryption/context.rb#15 def key_provider=(_arg0); end - # source://activerecord//lib/active_record/encryption/context.rb#16 + # source://activerecord//lib/active_record/encryption/context.rb#15 def message_serializer; end - # source://activerecord//lib/active_record/encryption/context.rb#16 + # source://activerecord//lib/active_record/encryption/context.rb#15 def message_serializer=(_arg0); end private - # source://activerecord//lib/active_record/encryption/context.rb#26 + # source://activerecord//lib/active_record/encryption/context.rb#37 + def build_default_key_provider; end + + # source://activerecord//lib/active_record/encryption/context.rb#29 def set_defaults; end end @@ -17965,6 +19588,9 @@ module ActiveRecord::Encryption::Contexts::ClassMethods # source://activerecord//lib/active_record/encryption/contexts.rb#57 def protecting_encrypted_data(&block); end + # source://activerecord//lib/active_record/encryption/contexts.rb#70 + def reset_default_context; end + # source://activerecord//lib/active_record/encryption/contexts.rb#33 def with_encryption_context(properties); end @@ -17979,7 +19605,12 @@ class ActiveRecord::Encryption::DerivedSecretKeyProvider < ::ActiveRecord::Encry # @return [DerivedSecretKeyProvider] a new instance of DerivedSecretKeyProvider # # source://activerecord//lib/active_record/encryption/derived_secret_key_provider.rb#7 - def initialize(passwords); end + def initialize(passwords, key_generator: T.unsafe(nil)); end + + private + + # source://activerecord//lib/active_record/encryption/derived_secret_key_provider.rb#12 + def derive_key_from(password, using: T.unsafe(nil)); end end # A KeyProvider that derives keys from passwords. @@ -18006,51 +19637,54 @@ module ActiveRecord::Encryption::EncryptableRecord # Returns the ciphertext for +attribute_name+. # - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#146 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#157 def ciphertext_for(attribute_name); end # Decrypts all the encryptable attributes and saves the changes. # - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#156 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#171 def decrypt; end # Encrypts all the encryptable attributes and saves the changes. # - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#151 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#166 def encrypt; end # Returns whether a given attribute is encrypted or not. # # @return [Boolean] # - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#141 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#146 def encrypted_attribute?(attribute_name); end private - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#190 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#178 + def _create_record(attribute_names = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#214 def build_decrypt_attribute_assignments; end - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#184 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#208 def build_encrypt_attribute_assignments; end - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#199 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#223 def cant_modify_encrypted_attributes_when_frozen; end - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#169 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#193 def decrypt_attributes; end - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#163 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#187 def encrypt_attributes; end # @return [Boolean] # - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#180 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#204 def has_encrypted_attributes?; end # @raise [ActiveRecord::Encryption::Errors::Configuration] # - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#176 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#200 def validate_encryption_allowed; end module GeneratedClassMethods @@ -18068,43 +19702,43 @@ end # source://activerecord//lib/active_record/encryption/encryptable_record.rb#0 module ActiveRecord::Encryption::EncryptableRecord::ClassMethods - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#56 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#58 def deterministic_encrypted_attributes; end - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#45 - def encrypts(*names, key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous: T.unsafe(nil), **context_properties); end + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#49 + def encrypts(*names, key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), support_unencrypted_data: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous: T.unsafe(nil), **context_properties); end - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#63 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#65 def source_attribute_from_preserved_attribute(attribute_name); end private - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#127 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#132 def add_length_validation_for_encrypted_columns; end - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#82 - def encrypt_attribute(name, attribute_scheme); end + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#84 + def encrypt_attribute(name, key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), support_unencrypted_data: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous: T.unsafe(nil), **context_properties); end - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#76 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#78 def global_previous_schemes_for(scheme); end - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#121 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#126 def load_schema!; end - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#104 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#109 def override_accessors_to_preserve_original(name, original_attribute_name); end - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#93 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#98 def preserve_original_encrypted(name); end - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#68 - def scheme_for(key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous: T.unsafe(nil), **context_properties); end + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#70 + def scheme_for(key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), support_unencrypted_data: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous: T.unsafe(nil), **context_properties); end - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#133 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#138 def validate_column_size(attribute_name); end end -# source://activerecord//lib/active_record/encryption/encryptable_record.rb#161 +# source://activerecord//lib/active_record/encryption/encryptable_record.rb#176 ActiveRecord::Encryption::EncryptableRecord::ORIGINAL_ATTRIBUTE_PREFIX = T.let(T.unsafe(nil), String) # An ActiveModel::Type::Value that encrypts/decrypts strings of text. @@ -18126,11 +19760,14 @@ class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveRecord::Type::T # @return [EncryptedAttributeType] a new instance of EncryptedAttributeType # # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#23 - def initialize(scheme:, cast_type: T.unsafe(nil), previous_type: T.unsafe(nil)); end + def initialize(scheme:, cast_type: T.unsafe(nil), previous_type: T.unsafe(nil), default: T.unsafe(nil)); end # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#16 def accessor(*_arg0, **_arg1, &_arg2); end + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#31 + def cast(value); end + # Returns the value of attribute cast_type. # # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#13 @@ -18138,10 +19775,10 @@ class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveRecord::Type::T # @return [Boolean] # - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#42 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#51 def changed_in_place?(raw_old_value, new_value); end - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#30 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#35 def deserialize(value); end # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#15 @@ -18150,6 +19787,11 @@ class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveRecord::Type::T # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#15 def downcase?(*_arg0, **_arg1, &_arg2); end + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#47 + def encrypted?(value); end + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#15 def fixed?(*_arg0, **_arg1, &_arg2); end @@ -18159,7 +19801,7 @@ class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveRecord::Type::T # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#15 def previous_schemes(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#47 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#56 def previous_types; end # Returns the value of attribute scheme. @@ -18167,66 +19809,66 @@ class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveRecord::Type::T # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#13 def scheme; end - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#34 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#39 def serialize(value); end + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#61 + def support_unencrypted_data?; end + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#15 def with_context(*_arg0, **_arg1, &_arg2); end private - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#61 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#74 def build_previous_types_for(schemes); end - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#135 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#150 def clean_text_scheme; end - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#71 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#84 def decrypt(value); end - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#131 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#146 def decryption_options; end - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#113 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#132 def encrypt(value); end - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#127 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#142 def encryption_options; end - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#119 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#138 def encryptor; end - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#91 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#110 def handle_deserialize_error(error, value); end - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#53 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#66 def previous_schemes_including_clean_text; end # @return [Boolean] # - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#67 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#80 def previous_type?; end - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#57 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#70 def previous_types_without_clean_text; end - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#107 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#126 def serialize_with_current(value); end - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#103 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#122 def serialize_with_oldest(value); end # @return [Boolean] # - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#99 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#118 def serialize_with_oldest?; end - # @return [Boolean] - # - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#123 - def support_unencrypted_data?; end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#83 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#102 def try_to_deserialize_with_previous_encrypted_types(value); end end @@ -18438,47 +20080,40 @@ class ActiveRecord::Encryption::Errors::ForbiddenClass < ::ActiveRecord::Encrypt # * ActiveRecord::Base - Used in Contact.find_by_email_address(...) # * ActiveRecord::Relation - Used in Contact.internal.find_by_email_address(...) # -# ActiveRecord::Base relies on ActiveRecord::Relation (ActiveRecord::QueryMethods) but it does -# some prepared statements caching. That's why we need to intercept +ActiveRecord::Base+ as soon -# as it's invoked (so that the proper prepared statement is cached). -# -# When modifying this file run performance tests in +test/performance/extended_deterministic_queries_performance_test.rb+ to -# make sure performance overhead is acceptable. +# This module is included if `config.active_record.encryption.extend_queries` is `true`. # -# We will extend this to support previous "encryption context" versions in future iterations -# -# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#33 +# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#23 module ActiveRecord::Encryption::ExtendedDeterministicQueries class << self - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#34 + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#24 def install_support; end end end -# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#121 +# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#132 class ActiveRecord::Encryption::ExtendedDeterministicQueries::AdditionalValue # @return [AdditionalValue] a new instance of AdditionalValue # - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#124 + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#135 def initialize(value, type); end # Returns the value of attribute type. # - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#122 + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#133 def type; end # Returns the value of attribute value. # - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#122 + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#133 def value; end private - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#130 + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#141 def process(value); end end -# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#108 +# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#122 module ActiveRecord::Encryption::ExtendedDeterministicQueries::CoreQueries extend ::ActiveSupport::Concern @@ -18487,65 +20122,48 @@ end # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#0 module ActiveRecord::Encryption::ExtendedDeterministicQueries::CoreQueries::ClassMethods - include ::ActiveRecord::Encryption::ExtendedDeterministicQueries::EncryptedQueryArgumentProcessor - - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#114 + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#126 def find_by(*args); end end +# When modifying this file run performance tests in +# +activerecord/test/cases/encryption/performance/extended_deterministic_queries_performance_test.rb+ +# to make sure performance overhead is acceptable. +# # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#41 -module ActiveRecord::Encryption::ExtendedDeterministicQueries::EncryptedQueryArgumentProcessor - extend ::ActiveSupport::Concern - - private +module ActiveRecord::Encryption::ExtendedDeterministicQueries::EncryptedQuery + class << self + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#43 + def process_arguments(owner, args, check_for_additional_values); end - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#74 - def additional_values_for(value, type); end + private - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#56 - def process_encrypted_query_argument(value, check_for_additional_values, type); end + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#87 + def additional_values_for(value, type); end - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#45 - def process_encrypted_query_arguments(args, check_for_additional_values); end + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#69 + def process_encrypted_query_argument(value, check_for_additional_values, type); end + end end -# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#135 +# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#146 module ActiveRecord::Encryption::ExtendedDeterministicQueries::ExtendedEncryptableType - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#136 + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#147 def serialize(data); end end -# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#145 -module ActiveRecord::Encryption::ExtendedDeterministicQueries::InWithAdditionalValues - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#150 - def encryption_aware_type_caster; end - - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#146 - def proc_for_binds; end -end - -# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#81 +# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#95 module ActiveRecord::Encryption::ExtendedDeterministicQueries::RelationQueries - include ::ActiveRecord::Encryption::ExtendedDeterministicQueries::EncryptedQueryArgumentProcessor - # @return [Boolean] # - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#89 + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#100 def exists?(*args); end - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#94 - def find_or_create_by(attributes, &block); end - - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#98 - def find_or_create_by!(attributes, &block); end + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#104 + def scope_for_create; end - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#84 + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#96 def where(*args); end - - private - - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#103 - def process_encrypted_query_arguments_if_needed(args); end end # source://activerecord//lib/active_record/encryption/extended_deterministic_uniqueness_validator.rb#5 @@ -18598,12 +20216,17 @@ end # # source://activerecord//lib/active_record/encryption/key_generator.rb#8 class ActiveRecord::Encryption::KeyGenerator + # @return [KeyGenerator] a new instance of KeyGenerator + # + # source://activerecord//lib/active_record/encryption/key_generator.rb#11 + def initialize(hash_digest_class: T.unsafe(nil)); end + # Derives a key from the given password. The key will have a size in bytes of +:length+ (configured +Cipher+'s length # by default) # # The generated key will be salted with the value of +ActiveRecord::Encryption.key_derivation_salt+ # - # source://activerecord//lib/active_record/encryption/key_generator.rb#32 + # source://activerecord//lib/active_record/encryption/key_generator.rb#38 def derive_key_from(password, length: T.unsafe(nil)); end # Returns a random key in hexadecimal format. The key will have a size in bytes of +:length+ (configured +Cipher+'s @@ -18617,17 +20240,25 @@ class ActiveRecord::Encryption::KeyGenerator # # [ value ].pack("H*") # - # source://activerecord//lib/active_record/encryption/key_generator.rb#24 + # source://activerecord//lib/active_record/encryption/key_generator.rb#30 def generate_random_hex_key(length: T.unsafe(nil)); end # Returns a random key. The key will have a size in bytes of +:length+ (configured +Cipher+'s length by default) # - # source://activerecord//lib/active_record/encryption/key_generator.rb#10 + # source://activerecord//lib/active_record/encryption/key_generator.rb#16 def generate_random_key(length: T.unsafe(nil)); end + # Returns the value of attribute hash_digest_class. + # + # source://activerecord//lib/active_record/encryption/key_generator.rb#9 + def hash_digest_class; end + private - # source://activerecord//lib/active_record/encryption/key_generator.rb#37 + # source://activerecord//lib/active_record/encryption/key_generator.rb#44 + def key_derivation_salt; end + + # source://activerecord//lib/active_record/encryption/key_generator.rb#48 def key_length; end end @@ -18731,37 +20362,37 @@ end # to prevent JSON parsing errors and encoding issues when # storing the resulting serialized data. # -# source://activerecord//lib/active_record/encryption/message_serializer.rb#21 +# source://activerecord//lib/active_record/encryption/message_serializer.rb#23 class ActiveRecord::Encryption::MessageSerializer # @raise [ActiveRecord::Encryption::Errors::ForbiddenClass] # - # source://activerecord//lib/active_record/encryption/message_serializer.rb#29 + # source://activerecord//lib/active_record/encryption/message_serializer.rb#31 def dump(message); end - # source://activerecord//lib/active_record/encryption/message_serializer.rb#22 + # source://activerecord//lib/active_record/encryption/message_serializer.rb#24 def load(serialized_content); end private - # source://activerecord//lib/active_record/encryption/message_serializer.rb#79 + # source://activerecord//lib/active_record/encryption/message_serializer.rb#81 def decode_if_needed(value); end - # source://activerecord//lib/active_record/encryption/message_serializer.rb#71 + # source://activerecord//lib/active_record/encryption/message_serializer.rb#73 def encode_if_needed(value); end - # source://activerecord//lib/active_record/encryption/message_serializer.rb#65 + # source://activerecord//lib/active_record/encryption/message_serializer.rb#67 def headers_to_json(headers); end - # source://activerecord//lib/active_record/encryption/message_serializer.rb#58 + # source://activerecord//lib/active_record/encryption/message_serializer.rb#60 def message_to_json(message); end - # source://activerecord//lib/active_record/encryption/message_serializer.rb#35 + # source://activerecord//lib/active_record/encryption/message_serializer.rb#37 def parse_message(data, level); end - # source://activerecord//lib/active_record/encryption/message_serializer.rb#50 + # source://activerecord//lib/active_record/encryption/message_serializer.rb#52 def parse_properties(headers, level); end - # source://activerecord//lib/active_record/encryption/message_serializer.rb#40 + # source://activerecord//lib/active_record/encryption/message_serializer.rb#42 def validate_message_data_format(data, level); end end @@ -18804,6 +20435,9 @@ class ActiveRecord::Encryption::Properties # source://activerecord//lib/active_record/encryption/properties.rb#20 def ==(arg); end + # source://activerecord//lib/active_record/encryption/properties.rb#20 + def [](*_arg0, **_arg1, &_arg2); end + # Set a value for a given key # # It will raise an +EncryptedContentIntegrity+ if the value exists @@ -18828,6 +20462,9 @@ class ActiveRecord::Encryption::Properties # source://activerecord//lib/active_record/encryption/properties.rb#37 def compressed=(value); end + # source://activerecord//lib/active_record/encryption/properties.rb#20 + def each(*_arg0, **_arg1, &_arg2); end + # source://activerecord//lib/active_record/encryption/properties.rb#33 def encoding; end @@ -18852,7 +20489,10 @@ class ActiveRecord::Encryption::Properties # source://activerecord//lib/active_record/encryption/properties.rb#37 def iv=(value); end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/delegation.rb#302 + # source://activerecord//lib/active_record/encryption/properties.rb#20 + def key?(*_arg0, **_arg1, &_arg2); end + + # source://activesupport/7.1.3.2/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 @@ -18868,7 +20508,7 @@ class ActiveRecord::Encryption::Properties # source://activerecord//lib/active_record/encryption/properties.rb#73 def data; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/delegation.rb#294 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/delegation.rb#323 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end @@ -18913,32 +20553,37 @@ class ActiveRecord::Encryption::Scheme # @return [Scheme] a new instance of Scheme # # source://activerecord//lib/active_record/encryption/scheme.rb#13 - def initialize(key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous_schemes: T.unsafe(nil), **context_properties); end + def initialize(key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), support_unencrypted_data: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous_schemes: T.unsafe(nil), **context_properties); end # @return [Boolean] # - # source://activerecord//lib/active_record/encryption/scheme.rb#38 + # source://activerecord//lib/active_record/encryption/scheme.rb#73 + def compatible_with?(other_scheme); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/scheme.rb#39 def deterministic?; end # @return [Boolean] # - # source://activerecord//lib/active_record/encryption/scheme.rb#34 + # source://activerecord//lib/active_record/encryption/scheme.rb#35 def downcase?; end # @return [Boolean] # - # source://activerecord//lib/active_record/encryption/scheme.rb#42 + # source://activerecord//lib/active_record/encryption/scheme.rb#47 def fixed?; end # @return [Boolean] # - # source://activerecord//lib/active_record/encryption/scheme.rb#30 + # source://activerecord//lib/active_record/encryption/scheme.rb#31 def ignore_case?; end - # source://activerecord//lib/active_record/encryption/scheme.rb#47 + # source://activerecord//lib/active_record/encryption/scheme.rb#52 def key_provider; end - # source://activerecord//lib/active_record/encryption/scheme.rb#54 + # source://activerecord//lib/active_record/encryption/scheme.rb#56 def merge(other_scheme); end # Returns the value of attribute previous_schemes. @@ -18953,27 +20598,29 @@ class ActiveRecord::Encryption::Scheme # source://activerecord//lib/active_record/encryption/scheme.rb#11 def previous_schemes=(_arg0); end - # source://activerecord//lib/active_record/encryption/scheme.rb#58 + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/scheme.rb#43 + def support_unencrypted_data?; end + + # source://activerecord//lib/active_record/encryption/scheme.rb#60 def to_h; end - # source://activerecord//lib/active_record/encryption/scheme.rb#63 + # source://activerecord//lib/active_record/encryption/scheme.rb#65 def with_context(&block); end private - # source://activerecord//lib/active_record/encryption/scheme.rb#90 + # source://activerecord//lib/active_record/encryption/scheme.rb#83 def build_key_provider; end + # source://activerecord//lib/active_record/encryption/scheme.rb#91 + def default_key_provider; end + # @raise [Errors::Configuration] # - # source://activerecord//lib/active_record/encryption/scheme.rb#72 + # source://activerecord//lib/active_record/encryption/scheme.rb#78 def validate_config!; end - - # source://activerecord//lib/active_record/encryption/scheme.rb#83 - def validate_credential(key, error_message = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/encryption/scheme.rb#77 - def validate_keys!; end end # Declare an enum attribute where the values map to integers in the database, @@ -19084,130 +20731,181 @@ end # conversation.comments_inactive! # conversation.comments_active? # => false # -# source://activerecord//lib/active_record/enum.rb#114 +# If you want to disable the auto-generated methods on the model, you can do +# so by setting the +:instance_methods+ option to false: +# +# class Conversation < ActiveRecord::Base +# enum :status, [ :active, :archived ], instance_methods: false +# end +# +# If you want the enum value to be validated before saving, use the option +:validate+: +# +# class Conversation < ActiveRecord::Base +# enum :status, [ :active, :archived ], validate: true +# end +# +# conversation = Conversation.new +# +# conversation.status = :unknown +# conversation.valid? # => false +# +# conversation.status = nil +# conversation.valid? # => false +# +# conversation.status = :active +# conversation.valid? # => true +# +# It is also possible to pass additional validation options: +# +# class Conversation < ActiveRecord::Base +# enum :status, [ :active, :archived ], validate: { allow_nil: true } +# end +# +# conversation = Conversation.new +# +# conversation.status = :unknown +# conversation.valid? # => false +# +# conversation.status = nil +# conversation.valid? # => true +# +# conversation.status = :active +# conversation.valid? # => true +# +# Otherwise +ArgumentError+ will raise: +# +# class Conversation < ActiveRecord::Base +# enum :status, [ :active, :archived ] +# end +# +# conversation = Conversation.new +# +# conversation.status = :unknown # 'unknown' is not a valid status (ArgumentError) +# +# source://activerecord//lib/active_record/enum.rb#165 module ActiveRecord::Enum - # source://activerecord//lib/active_record/enum.rb#167 + # source://activerecord//lib/active_record/enum.rb#216 def enum(name = T.unsafe(nil), values = T.unsafe(nil), **options); end - # source://activerecord//lib/active_record/enum.rb#119 - def inherited(base); end - private - # source://activerecord//lib/active_record/enum.rb#180 - def _enum(name, values, prefix: T.unsafe(nil), suffix: T.unsafe(nil), scopes: T.unsafe(nil), **options); end + # source://activerecord//lib/active_record/enum.rb#234 + def _enum(name, values, prefix: T.unsafe(nil), suffix: T.unsafe(nil), scopes: T.unsafe(nil), instance_methods: T.unsafe(nil), validate: T.unsafe(nil), **options); end - # source://activerecord//lib/active_record/enum.rb#261 + # source://activerecord//lib/active_record/enum.rb#329 def _enum_methods_module; end - # source://activerecord//lib/active_record/enum.rb#269 + # source://activerecord//lib/active_record/enum.rb#337 def assert_valid_enum_definition_values(values); end - # source://activerecord//lib/active_record/enum.rb#288 + # source://activerecord//lib/active_record/enum.rb#370 def detect_enum_conflict!(enum_name, method_name, klass_method = T.unsafe(nil)); end - # source://activerecord//lib/active_record/enum.rb#310 + # source://activerecord//lib/active_record/enum.rb#394 def detect_negative_enum_conditions!(method_names); end + # source://activerecord//lib/active_record/enum.rb#229 + def inherited(base); end + # @raise [ArgumentError] # - # source://activerecord//lib/active_record/enum.rb#300 + # source://activerecord//lib/active_record/enum.rb#384 def raise_conflict_error(enum_name, method_name, type: T.unsafe(nil), source: T.unsafe(nil)); end class << self - # source://activerecord//lib/active_record/enum.rb#115 + # source://activerecord//lib/active_record/enum.rb#166 def extended(base); end end end -# source://activerecord//lib/active_record/enum.rb#282 +# source://activerecord//lib/active_record/enum.rb#364 ActiveRecord::Enum::ENUM_CONFLICT_MESSAGE = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/enum.rb#231 +# source://activerecord//lib/active_record/enum.rb#297 class ActiveRecord::Enum::EnumMethods < ::Module # @return [EnumMethods] a new instance of EnumMethods # - # source://activerecord//lib/active_record/enum.rb#232 + # source://activerecord//lib/active_record/enum.rb#298 def initialize(klass); end private - # source://activerecord//lib/active_record/enum.rb#239 - def define_enum_methods(name, value_method_name, value, scopes); end + # source://activerecord//lib/active_record/enum.rb#305 + def define_enum_methods(name, value_method_name, value, scopes, instance_methods); end # Returns the value of attribute klass. # - # source://activerecord//lib/active_record/enum.rb#237 + # source://activerecord//lib/active_record/enum.rb#303 def klass; end end -# source://activerecord//lib/active_record/enum.rb#124 +# source://activerecord//lib/active_record/enum.rb#170 class ActiveRecord::Enum::EnumType < ::ActiveModel::Type::Value # @return [EnumType] a new instance of EnumType # - # source://activerecord//lib/active_record/enum.rb#127 - def initialize(name, mapping, subtype); end + # source://activerecord//lib/active_record/enum.rb#173 + def initialize(name, mapping, subtype, raise_on_invalid_values: T.unsafe(nil)); end - # source://activerecord//lib/active_record/enum.rb#155 + # source://activerecord//lib/active_record/enum.rb#202 def assert_valid_value(value); end - # source://activerecord//lib/active_record/enum.rb#133 + # source://activerecord//lib/active_record/enum.rb#180 def cast(value); end - # source://activerecord//lib/active_record/enum.rb#143 + # source://activerecord//lib/active_record/enum.rb#190 def deserialize(value); end # @return [Boolean] # - # source://activerecord//lib/active_record/enum.rb#151 + # source://activerecord//lib/active_record/enum.rb#198 def serializable?(value, &block); end - # source://activerecord//lib/active_record/enum.rb#147 + # source://activerecord//lib/active_record/enum.rb#194 def serialize(value); end # Returns the value of attribute subtype. # - # source://activerecord//lib/active_record/enum.rb#161 + # source://activerecord//lib/active_record/enum.rb#210 def subtype; end - # source://activerecord//lib/active_record/enum.rb#125 + # source://activerecord//lib/active_record/enum.rb#171 def type(*_arg0, **_arg1, &_arg2); end private # Returns the value of attribute mapping. # - # source://activerecord//lib/active_record/enum.rb#164 + # source://activerecord//lib/active_record/enum.rb#213 def mapping; end # Returns the value of attribute name. # - # source://activerecord//lib/active_record/enum.rb#164 + # source://activerecord//lib/active_record/enum.rb#213 def name; end end -# source://activerecord//lib/active_record/migration.rb#197 +# source://activerecord//lib/active_record/migration.rb#204 class ActiveRecord::EnvironmentMismatchError < ::ActiveRecord::ActiveRecordError # @return [EnvironmentMismatchError] a new instance of EnvironmentMismatchError # - # source://activerecord//lib/active_record/migration.rb#198 + # source://activerecord//lib/active_record/migration.rb#205 def initialize(current: T.unsafe(nil), stored: T.unsafe(nil)); end end -# source://activerecord//lib/active_record/migration.rb#211 +# source://activerecord//lib/active_record/migration.rb#218 class ActiveRecord::EnvironmentStorageError < ::ActiveRecord::ActiveRecordError # @return [EnvironmentStorageError] a new instance of EnvironmentStorageError # - # source://activerecord//lib/active_record/migration.rb#212 + # source://activerecord//lib/active_record/migration.rb#219 def initialize; end end # Raised when a pool was unable to get ahold of all its connections # to perform a "group" action such as # {ActiveRecord::Base.connection_pool.disconnect!}[rdoc-ref:ConnectionAdapters::ConnectionPool#disconnect!] -# or {ActiveRecord::Base.clear_reloadable_connections!}[rdoc-ref:ConnectionAdapters::ConnectionHandler#clear_reloadable_connections!]. +# or {ActiveRecord::Base.connection_handler.clear_reloadable_connections!}[rdoc-ref:ConnectionAdapters::ConnectionHandler#clear_reloadable_connections!]. # -# source://activerecord//lib/active_record/errors.rb#94 +# source://activerecord//lib/active_record/errors.rb#119 class ActiveRecord::ExclusiveConnectionTimeoutError < ::ActiveRecord::ConnectionTimeoutError; end # source://activerecord//lib/active_record/explain.rb#6 @@ -19222,10 +20920,16 @@ module ActiveRecord::Explain # Returns a formatted string ready to be logged. # # source://activerecord//lib/active_record/explain.rb#19 - def exec_explain(queries); end + def exec_explain(queries, options = T.unsafe(nil)); end private + # source://activerecord//lib/active_record/explain.rb#54 + def build_explain_clause(options = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/explain.rb#62 + def connection_explain(sql, binds, options); end + # source://activerecord//lib/active_record/explain.rb#39 def render_bind(attr); end end @@ -19350,7 +21054,7 @@ module ActiveRecord::FinderMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/relation/finder_methods.rb#326 + # source://activerecord//lib/active_record/relation/finder_methods.rb#349 def exists?(conditions = T.unsafe(nil)); end # Find the fifth record. @@ -19360,16 +21064,18 @@ module ActiveRecord::FinderMethods # Person.offset(3).fifth # returns the fifth object from OFFSET 3 (which is OFFSET 7) # Person.where(["user_name = :u", { u: user_name }]).fifth # - # source://activerecord//lib/active_record/relation/finder_methods.rb#240 + # source://activerecord//lib/active_record/relation/finder_methods.rb#263 def fifth; end # Same as #fifth but raises ActiveRecord::RecordNotFound if no record # is found. # - # source://activerecord//lib/active_record/relation/finder_methods.rb#246 + # source://activerecord//lib/active_record/relation/finder_methods.rb#269 def fifth!; end - # Find by id - This can either be a specific id (1), a list of ids (1, 5, 6), or an array of ids ([5, 6, 10]). + # Find by id - This can either be a specific id (ID), a list of ids (ID, ID, ID), or an array of ids ([ID, ID, ID]). + # `ID` refers to an "identifier". For models with a single-column primary key, `ID` will be a single value, + # and for models with a composite primary key, it will be an array of values. # If one or more records cannot be found for the requested ids, then ActiveRecord::RecordNotFound will be raised. # If the primary key is an integer, find by id coerces its arguments by using +to_i+. # @@ -19377,10 +21083,31 @@ module ActiveRecord::FinderMethods # Person.find("1") # returns the object for ID = 1 # Person.find("31-sarah") # returns the object for ID = 31 # Person.find(1, 2, 6) # returns an array for objects with IDs in (1, 2, 6) - # Person.find([7, 17]) # returns an array for objects with IDs in (7, 17) + # Person.find([7, 17]) # returns an array for objects with IDs in (7, 17), or with composite primary key [7, 17] # Person.find([1]) # returns an array for the object with ID = 1 # Person.where("administrator = 1").order("created_on DESC").find(1) # + # ==== Find a record for a composite primary key model + # TravelRoute.primary_key = [:origin, :destination] + # + # TravelRoute.find(["Ottawa", "London"]) + # => # + # + # TravelRoute.find([["Paris", "Montreal"]]) + # => [#] + # + # TravelRoute.find(["New York", "Las Vegas"], ["New York", "Portland"]) + # => [ + # #, + # # + # ] + # + # TravelRoute.find([["Berlin", "London"], ["Barcelona", "Lisbon"]]) + # => [ + # #, + # # + # ] + # # NOTE: The returned records are in the same order as the ids you provide. # If you want the results to be sorted by database, you can use ActiveRecord::QueryMethods#where # method and provide an explicit ActiveRecord::QueryMethods#order option. @@ -19428,7 +21155,7 @@ module ActiveRecord::FinderMethods # Person.where(name: 'Spartacus', rating: 4).pluck(:field1, :field2) # # returns an Array of the required fields. # - # source://activerecord//lib/active_record/relation/finder_methods.rb#67 + # source://activerecord//lib/active_record/relation/finder_methods.rb#90 def find(*args); end # Finds the first record matching the specified conditions. There @@ -19440,13 +21167,13 @@ module ActiveRecord::FinderMethods # Post.find_by name: 'Spartacus', rating: 4 # Post.find_by "published_at < ?", 2.weeks.ago # - # source://activerecord//lib/active_record/relation/finder_methods.rb#80 + # source://activerecord//lib/active_record/relation/finder_methods.rb#103 def find_by(arg, *args); end # Like #find_by, except that if no record is found, raises # an ActiveRecord::RecordNotFound error. # - # source://activerecord//lib/active_record/relation/finder_methods.rb#86 + # source://activerecord//lib/active_record/relation/finder_methods.rb#109 def find_by!(arg, *args); end # Finds the sole matching record. Raises ActiveRecord::RecordNotFound if no @@ -19455,7 +21182,7 @@ module ActiveRecord::FinderMethods # # Product.find_sole_by(["price = %?", price]) # - # source://activerecord//lib/active_record/relation/finder_methods.rb#129 + # source://activerecord//lib/active_record/relation/finder_methods.rb#152 def find_sole_by(arg, *args); end # Find the first record (or first N records if a parameter is supplied). @@ -19467,13 +21194,13 @@ module ActiveRecord::FinderMethods # Person.order("created_on DESC").offset(5).first # Person.first(3) # returns the first three objects fetched by SELECT * FROM people ORDER BY people.id LIMIT 3 # - # source://activerecord//lib/active_record/relation/finder_methods.rb#142 + # source://activerecord//lib/active_record/relation/finder_methods.rb#165 def first(limit = T.unsafe(nil)); end # Same as #first but raises ActiveRecord::RecordNotFound if no record # is found. Note that #first! accepts no arguments. # - # source://activerecord//lib/active_record/relation/finder_methods.rb#152 + # source://activerecord//lib/active_record/relation/finder_methods.rb#175 def first!; end # Find the forty-second record. Also known as accessing "the reddit". @@ -19483,13 +21210,13 @@ module ActiveRecord::FinderMethods # Person.offset(3).forty_two # returns the forty-second object from OFFSET 3 (which is OFFSET 44) # Person.where(["user_name = :u", { u: user_name }]).forty_two # - # source://activerecord//lib/active_record/relation/finder_methods.rb#256 + # source://activerecord//lib/active_record/relation/finder_methods.rb#279 def forty_two; end # Same as #forty_two but raises ActiveRecord::RecordNotFound if no record # is found. # - # source://activerecord//lib/active_record/relation/finder_methods.rb#262 + # source://activerecord//lib/active_record/relation/finder_methods.rb#285 def forty_two!; end # Find the fourth record. @@ -19499,13 +21226,13 @@ module ActiveRecord::FinderMethods # Person.offset(3).fourth # returns the fourth object from OFFSET 3 (which is OFFSET 6) # Person.where(["user_name = :u", { u: user_name }]).fourth # - # source://activerecord//lib/active_record/relation/finder_methods.rb#224 + # source://activerecord//lib/active_record/relation/finder_methods.rb#247 def fourth; end # Same as #fourth but raises ActiveRecord::RecordNotFound if no record # is found. # - # source://activerecord//lib/active_record/relation/finder_methods.rb#230 + # source://activerecord//lib/active_record/relation/finder_methods.rb#253 def fourth!; end # Returns true if the relation contains the given record or false otherwise. @@ -19516,7 +21243,7 @@ module ActiveRecord::FinderMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/relation/finder_methods.rb#352 + # source://activerecord//lib/active_record/relation/finder_methods.rb#377 def include?(record); end # Find the last record (or last N records if a parameter is supplied). @@ -19535,13 +21262,13 @@ module ActiveRecord::FinderMethods # # [#, #, #] # - # source://activerecord//lib/active_record/relation/finder_methods.rb#171 + # source://activerecord//lib/active_record/relation/finder_methods.rb#194 def last(limit = T.unsafe(nil)); end # Same as #last but raises ActiveRecord::RecordNotFound if no record # is found. Note that #last! accepts no arguments. # - # source://activerecord//lib/active_record/relation/finder_methods.rb#182 + # source://activerecord//lib/active_record/relation/finder_methods.rb#205 def last!; end # Returns true if the relation contains the given record or false otherwise. @@ -19552,7 +21279,7 @@ module ActiveRecord::FinderMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/relation/finder_methods.rb#352 + # source://activerecord//lib/active_record/relation/finder_methods.rb#377 def member?(record); end # This method is called whenever no records are found with either a single @@ -19564,7 +21291,7 @@ module ActiveRecord::FinderMethods # the expected number of results should be provided in the +expected_size+ # argument. # - # source://activerecord//lib/active_record/relation/finder_methods.rb#370 + # source://activerecord//lib/active_record/relation/finder_methods.rb#405 def raise_record_not_found_exception!(ids = T.unsafe(nil), result_size = T.unsafe(nil), expected_size = T.unsafe(nil), key = T.unsafe(nil), not_found_ids = T.unsafe(nil)); end # Find the second record. @@ -19574,13 +21301,13 @@ module ActiveRecord::FinderMethods # Person.offset(3).second # returns the second object from OFFSET 3 (which is OFFSET 4) # Person.where(["user_name = :u", { u: user_name }]).second # - # source://activerecord//lib/active_record/relation/finder_methods.rb#192 + # source://activerecord//lib/active_record/relation/finder_methods.rb#215 def second; end # Same as #second but raises ActiveRecord::RecordNotFound if no record # is found. # - # source://activerecord//lib/active_record/relation/finder_methods.rb#198 + # source://activerecord//lib/active_record/relation/finder_methods.rb#221 def second!; end # Find the second-to-last record. @@ -19590,13 +21317,13 @@ module ActiveRecord::FinderMethods # Person.offset(3).second_to_last # returns the second-to-last object from OFFSET 3 # Person.where(["user_name = :u", { u: user_name }]).second_to_last # - # source://activerecord//lib/active_record/relation/finder_methods.rb#288 + # source://activerecord//lib/active_record/relation/finder_methods.rb#311 def second_to_last; end # Same as #second_to_last but raises ActiveRecord::RecordNotFound if no record # is found. # - # source://activerecord//lib/active_record/relation/finder_methods.rb#294 + # source://activerecord//lib/active_record/relation/finder_methods.rb#317 def second_to_last!; end # Finds the sole matching record. Raises ActiveRecord::RecordNotFound if no @@ -19605,7 +21332,7 @@ module ActiveRecord::FinderMethods # # Product.where(["price = %?", price]).sole # - # source://activerecord//lib/active_record/relation/finder_methods.rb#112 + # source://activerecord//lib/active_record/relation/finder_methods.rb#135 def sole; end # Gives a record (or N records if a parameter is supplied) without any implied @@ -19616,13 +21343,13 @@ module ActiveRecord::FinderMethods # Person.take(5) # returns 5 objects fetched by SELECT * FROM people LIMIT 5 # Person.where(["name LIKE '%?'", name]).take # - # source://activerecord//lib/active_record/relation/finder_methods.rb#97 + # source://activerecord//lib/active_record/relation/finder_methods.rb#120 def take(limit = T.unsafe(nil)); end # Same as #take but raises ActiveRecord::RecordNotFound if no record # is found. Note that #take! accepts no arguments. # - # source://activerecord//lib/active_record/relation/finder_methods.rb#103 + # source://activerecord//lib/active_record/relation/finder_methods.rb#126 def take!; end # Find the third record. @@ -19632,13 +21359,13 @@ module ActiveRecord::FinderMethods # Person.offset(3).third # returns the third object from OFFSET 3 (which is OFFSET 5) # Person.where(["user_name = :u", { u: user_name }]).third # - # source://activerecord//lib/active_record/relation/finder_methods.rb#208 + # source://activerecord//lib/active_record/relation/finder_methods.rb#231 def third; end # Same as #third but raises ActiveRecord::RecordNotFound if no record # is found. # - # source://activerecord//lib/active_record/relation/finder_methods.rb#214 + # source://activerecord//lib/active_record/relation/finder_methods.rb#237 def third!; end # Find the third-to-last record. @@ -19648,997 +21375,236 @@ module ActiveRecord::FinderMethods # Person.offset(3).third_to_last # returns the third-to-last object from OFFSET 3 # Person.where(["user_name = :u", { u: user_name }]).third_to_last # - # source://activerecord//lib/active_record/relation/finder_methods.rb#272 + # source://activerecord//lib/active_record/relation/finder_methods.rb#295 def third_to_last; end # Same as #third_to_last but raises ActiveRecord::RecordNotFound if no record # is found. # - # source://activerecord//lib/active_record/relation/finder_methods.rb#278 + # source://activerecord//lib/active_record/relation/finder_methods.rb#301 def third_to_last!; end private - # source://activerecord//lib/active_record/relation/finder_methods.rb#410 + # source://activerecord//lib/active_record/relation/finder_methods.rb#634 + def _order_columns; end + + # source://activerecord//lib/active_record/relation/finder_methods.rb#445 def apply_join_dependency(eager_loading: T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/finder_methods.rb#391 + # source://activerecord//lib/active_record/relation/finder_methods.rb#426 def construct_relation_for_exists(conditions); end - # source://activerecord//lib/active_record/relation/finder_methods.rb#570 + # source://activerecord//lib/active_record/relation/finder_methods.rb#622 def find_last(limit); end - # source://activerecord//lib/active_record/relation/finder_methods.rb#532 + # source://activerecord//lib/active_record/relation/finder_methods.rb#584 def find_nth(index); end - # source://activerecord//lib/active_record/relation/finder_methods.rb#556 + # source://activerecord//lib/active_record/relation/finder_methods.rb#608 def find_nth_from_last(index); end - # source://activerecord//lib/active_record/relation/finder_methods.rb#537 + # source://activerecord//lib/active_record/relation/finder_methods.rb#589 def find_nth_with_limit(index, limit); end - # source://activerecord//lib/active_record/relation/finder_methods.rb#464 + # source://activerecord//lib/active_record/relation/finder_methods.rb#506 def find_one(id); end - # source://activerecord//lib/active_record/relation/finder_methods.rb#480 + # source://activerecord//lib/active_record/relation/finder_methods.rb#527 def find_some(ids); end - # source://activerecord//lib/active_record/relation/finder_methods.rb#504 + # source://activerecord//lib/active_record/relation/finder_methods.rb#553 def find_some_ordered(ids); end - # source://activerecord//lib/active_record/relation/finder_methods.rb#516 + # source://activerecord//lib/active_record/relation/finder_methods.rb#568 def find_take; end - # source://activerecord//lib/active_record/relation/finder_methods.rb#524 + # source://activerecord//lib/active_record/relation/finder_methods.rb#576 def find_take_with_limit(limit); end # @raise [UnknownPrimaryKey] # - # source://activerecord//lib/active_record/relation/finder_methods.rb#442 + # source://activerecord//lib/active_record/relation/finder_methods.rb#477 def find_with_ids(*ids); end - # source://activerecord//lib/active_record/relation/finder_methods.rb#574 + # source://activerecord//lib/active_record/relation/finder_methods.rb#626 def ordered_relation; end # @return [Boolean] # - # source://activerecord//lib/active_record/relation/finder_methods.rb#438 + # source://activerecord//lib/active_record/relation/finder_methods.rb#473 def using_limitable_reflections?(reflections); end end # source://activerecord//lib/active_record/relation/finder_methods.rb#7 ActiveRecord::FinderMethods::ONE_AS_ONE = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/fixtures.rb#739 +# source://activerecord//lib/active_record/fixtures.rb#802 class ActiveRecord::Fixture include ::Enumerable # @return [Fixture] a new instance of Fixture # - # source://activerecord//lib/active_record/fixtures.rb#750 + # source://activerecord//lib/active_record/fixtures.rb#813 def initialize(fixture, model_class); end - # source://activerecord//lib/active_record/fixtures.rb#763 + # source://activerecord//lib/active_record/fixtures.rb#826 def [](key); end - # source://activerecord//lib/active_record/fixtures.rb#755 + # source://activerecord//lib/active_record/fixtures.rb#818 def class_name; end - # source://activerecord//lib/active_record/fixtures.rb#759 + # source://activerecord//lib/active_record/fixtures.rb#822 def each(&block); end # @raise [FixtureClassNotFound] # - # source://activerecord//lib/active_record/fixtures.rb#769 + # source://activerecord//lib/active_record/fixtures.rb#832 def find; end # Returns the value of attribute fixture. # - # source://activerecord//lib/active_record/fixtures.rb#748 + # source://activerecord//lib/active_record/fixtures.rb#811 def fixture; end # Returns the value of attribute model_class. # - # source://activerecord//lib/active_record/fixtures.rb#748 + # source://activerecord//lib/active_record/fixtures.rb#811 def model_class; end # Returns the value of attribute fixture. # - # source://activerecord//lib/active_record/fixtures.rb#748 + # source://activerecord//lib/active_record/fixtures.rb#811 def to_hash; end end -# source://activerecord//lib/active_record/fixtures.rb#742 +# source://activerecord//lib/active_record/fixtures.rb#805 class ActiveRecord::Fixture::FixtureError < ::StandardError; end -# source://activerecord//lib/active_record/fixtures.rb#745 +# source://activerecord//lib/active_record/fixtures.rb#808 class ActiveRecord::Fixture::FormatError < ::ActiveRecord::Fixture::FixtureError; end -# source://activerecord//lib/active_record/fixtures.rb#15 +# source://activerecord//lib/active_record/fixtures.rb#12 class ActiveRecord::FixtureClassNotFound < ::ActiveRecord::ActiveRecordError; end -# \Fixtures are a way of organizing data that you want to test against; in short, sample data. -# -# They are stored in YAML files, one file per model, which are placed in the directory -# appointed by ActiveSupport::TestCase.fixture_path=(path) (this is automatically -# configured for Rails, so you can just put your files in /test/fixtures/). -# The fixture file ends with the +.yml+ file extension, for example: -# /test/fixtures/web_sites.yml). -# -# The format of a fixture file looks like this: -# -# rubyonrails: -# id: 1 -# name: Ruby on Rails -# url: http://www.rubyonrails.org -# -# google: -# id: 2 -# name: Google -# url: http://www.google.com -# -# This fixture file includes two fixtures. Each YAML fixture (i.e. record) is given a name and -# is followed by an indented list of key/value pairs in the "key: value" format. Records are -# separated by a blank line for your viewing pleasure. -# -# Note: Fixtures are unordered. If you want ordered fixtures, use the omap YAML type. -# See https://yaml.org/type/omap.html -# for the specification. You will need ordered fixtures when you have foreign key constraints -# on keys in the same table. This is commonly needed for tree structures. Example: -# -# --- !omap -# - parent: -# id: 1 -# parent_id: NULL -# title: Parent -# - child: -# id: 2 -# parent_id: 1 -# title: Child -# -# = Using Fixtures in Test Cases -# -# Since fixtures are a testing construct, we use them in our unit and functional tests. There -# are two ways to use the fixtures, but first let's take a look at a sample unit test: -# -# require "test_helper" -# -# class WebSiteTest < ActiveSupport::TestCase -# test "web_site_count" do -# assert_equal 2, WebSite.count -# end -# end -# -# By default, +test_helper.rb+ will load all of your fixtures into your test -# database, so this test will succeed. -# -# The testing environment will automatically load all the fixtures into the database before each -# test. To ensure consistent data, the environment deletes the fixtures before running the load. -# -# In addition to being available in the database, the fixture's data may also be accessed by -# using a special dynamic method, which has the same name as the model. -# -# Passing in a fixture name to this dynamic method returns the fixture matching this name: -# -# test "find one" do -# assert_equal "Ruby on Rails", web_sites(:rubyonrails).name -# end -# -# Passing in multiple fixture names returns all fixtures matching these names: -# -# test "find all by name" do -# assert_equal 2, web_sites(:rubyonrails, :google).length -# end -# -# Passing in no arguments returns all fixtures: -# -# test "find all" do -# assert_equal 2, web_sites.length -# end -# -# Passing in any fixture name that does not exist will raise StandardError: -# -# test "find by name that does not exist" do -# assert_raise(StandardError) { web_sites(:reddit) } -# end -# -# Alternatively, you may enable auto-instantiation of the fixture data. For instance, take the -# following tests: -# -# test "find_alt_method_1" do -# assert_equal "Ruby on Rails", @web_sites['rubyonrails']['name'] -# end -# -# test "find_alt_method_2" do -# assert_equal "Ruby on Rails", @rubyonrails.name -# end -# -# In order to use these methods to access fixtured data within your test cases, you must specify one of the -# following in your ActiveSupport::TestCase-derived class: -# -# - to fully enable instantiated fixtures (enable alternate methods #1 and #2 above) -# self.use_instantiated_fixtures = true -# -# - create only the hash for the fixtures, do not 'find' each instance (enable alternate method #1 only) -# self.use_instantiated_fixtures = :no_instances -# -# Using either of these alternate methods incurs a performance hit, as the fixtured data must be fully -# traversed in the database to create the fixture hash and/or instance variables. This is expensive for -# large sets of fixtured data. -# -# = Dynamic fixtures with ERB -# -# Sometimes you don't care about the content of the fixtures as much as you care about the volume. -# In these cases, you can mix ERB in with your YAML fixtures to create a bunch of fixtures for load -# testing, like: -# -# <% 1.upto(1000) do |i| %> -# fix_<%= i %>: -# id: <%= i %> -# name: guy_<%= i %> -# <% end %> -# -# This will create 1000 very simple fixtures. -# -# Using ERB, you can also inject dynamic values into your fixtures with inserts like -# <%= Date.today.strftime("%Y-%m-%d") %>. -# This is however a feature to be used with some caution. The point of fixtures are that they're -# stable units of predictable sample data. If you feel that you need to inject dynamic values, then -# perhaps you should reexamine whether your application is properly testable. Hence, dynamic values -# in fixtures are to be considered a code smell. -# -# Helper methods defined in a fixture will not be available in other fixtures, to prevent against -# unwanted inter-test dependencies. Methods used by multiple fixtures should be defined in a module -# that is included in ActiveRecord::FixtureSet.context_class. -# -# - define a helper method in test_helper.rb -# module FixtureFileHelpers -# def file_sha(path) -# OpenSSL::Digest::SHA256.hexdigest(File.read(Rails.root.join('test/fixtures', path))) -# end -# end -# ActiveRecord::FixtureSet.context_class.include FixtureFileHelpers -# -# - use the helper method in a fixture -# photo: -# name: kitten.png -# sha: <%= file_sha 'files/kitten.png' %> -# -# = Transactional Tests -# -# Test cases can use begin+rollback to isolate their changes to the database instead of having to -# delete+insert for every test case. -# -# class FooTest < ActiveSupport::TestCase -# self.use_transactional_tests = true -# -# test "godzilla" do -# assert_not_empty Foo.all -# Foo.destroy_all -# assert_empty Foo.all -# end -# -# test "godzilla aftermath" do -# assert_not_empty Foo.all -# end -# end -# -# If you preload your test database with all fixture data (probably by running bin/rails db:fixtures:load) -# and use transactional tests, then you may omit all fixtures declarations in your test cases since -# all the data's already there and every case rolls back its changes. -# -# In order to use instantiated fixtures with preloaded data, set +self.pre_loaded_fixtures+ to -# true. This will provide access to fixture data for every table that has been loaded through -# fixtures (depending on the value of +use_instantiated_fixtures+). -# -# When *not* to use transactional tests: -# -# 1. You're testing whether a transaction works correctly. Nested transactions don't commit until -# all parent transactions commit, particularly, the fixtures transaction which is begun in setup -# and rolled back in teardown. Thus, you won't be able to verify -# the results of your transaction until Active Record supports nested transactions or savepoints (in progress). -# 2. Your database does not support transactions. Every Active Record database supports transactions except MySQL MyISAM. -# Use InnoDB, MaxDB, or NDB instead. -# -# = Advanced Fixtures -# -# Fixtures that don't specify an ID get some extra features: -# -# * Stable, autogenerated IDs -# * Label references for associations (belongs_to, has_one, has_many) -# * HABTM associations as inline lists -# -# There are some more advanced features available even if the id is specified: -# -# * Autofilled timestamp columns -# * Fixture label interpolation -# * Support for YAML defaults -# -# == Stable, Autogenerated IDs -# -# Here, have a monkey fixture: -# -# george: -# id: 1 -# name: George the Monkey -# -# reginald: -# id: 2 -# name: Reginald the Pirate -# -# Each of these fixtures has two unique identifiers: one for the database -# and one for the humans. Why don't we generate the primary key instead? -# Hashing each fixture's label yields a consistent ID: -# -# george: # generated id: 503576764 -# name: George the Monkey -# -# reginald: # generated id: 324201669 -# name: Reginald the Pirate -# -# Active Record looks at the fixture's model class, discovers the correct -# primary key, and generates it right before inserting the fixture -# into the database. -# -# The generated ID for a given label is constant, so we can discover -# any fixture's ID without loading anything, as long as we know the label. -# -# == Label references for associations (+belongs_to+, +has_one+, +has_many+) -# -# Specifying foreign keys in fixtures can be very fragile, not to -# mention difficult to read. Since Active Record can figure out the ID of -# any fixture from its label, you can specify FK's by label instead of ID. -# -# === +belongs_to+ -# -# Let's break out some more monkeys and pirates. -# -# ### in pirates.yml -# -# reginald: -# id: 1 -# name: Reginald the Pirate -# monkey_id: 1 -# -# ### in monkeys.yml -# -# george: -# id: 1 -# name: George the Monkey -# pirate_id: 1 -# -# Add a few more monkeys and pirates and break this into multiple files, -# and it gets pretty hard to keep track of what's going on. Let's -# use labels instead of IDs: -# -# ### in pirates.yml -# -# reginald: -# name: Reginald the Pirate -# monkey: george -# -# ### in monkeys.yml -# -# george: -# name: George the Monkey -# pirate: reginald -# -# Pow! All is made clear. Active Record reflects on the fixture's model class, -# finds all the +belongs_to+ associations, and allows you to specify -# a target *label* for the *association* (monkey: george) rather than -# a target *id* for the *FK* (monkey_id: 1). -# -# ==== Polymorphic +belongs_to+ -# -# Supporting polymorphic relationships is a little bit more complicated, since -# Active Record needs to know what type your association is pointing at. Something -# like this should look familiar: -# -# ### in fruit.rb -# -# belongs_to :eater, polymorphic: true -# -# ### in fruits.yml -# -# apple: -# id: 1 -# name: apple -# eater_id: 1 -# eater_type: Monkey -# -# Can we do better? You bet! -# -# apple: -# eater: george (Monkey) -# -# Just provide the polymorphic target type and Active Record will take care of the rest. -# -# === +has_and_belongs_to_many+ or has_many :through -# -# Time to give our monkey some fruit. -# -# ### in monkeys.yml -# -# george: -# id: 1 -# name: George the Monkey -# -# ### in fruits.yml -# -# apple: -# id: 1 -# name: apple -# -# orange: -# id: 2 -# name: orange -# -# grape: -# id: 3 -# name: grape -# -# ### in fruits_monkeys.yml -# -# apple_george: -# fruit_id: 1 -# monkey_id: 1 -# -# orange_george: -# fruit_id: 2 -# monkey_id: 1 -# -# grape_george: -# fruit_id: 3 -# monkey_id: 1 -# -# Let's make the HABTM fixture go away. -# -# ### in monkeys.yml -# -# george: -# id: 1 -# name: George the Monkey -# fruits: apple, orange, grape -# -# ### in fruits.yml -# -# apple: -# name: apple -# -# orange: -# name: orange -# -# grape: -# name: grape -# -# Zap! No more fruits_monkeys.yml file. We've specified the list of fruits -# on George's fixture, but we could've just as easily specified a list -# of monkeys on each fruit. As with +belongs_to+, Active Record reflects on -# the fixture's model class and discovers the +has_and_belongs_to_many+ -# associations. -# -# == Autofilled Timestamp Columns -# -# If your table/model specifies any of Active Record's -# standard timestamp columns (+created_at+, +created_on+, +updated_at+, +updated_on+), -# they will automatically be set to Time.now. -# -# If you've set specific values, they'll be left alone. -# -# == Fixture label interpolation -# -# The label of the current fixture is always available as a column value: -# -# geeksomnia: -# name: Geeksomnia's Account -# subdomain: $LABEL -# email: $LABEL@email.com -# -# Also, sometimes (like when porting older join table fixtures) you'll need -# to be able to get a hold of the identifier for a given label. ERB -# to the rescue: -# -# george_reginald: -# monkey_id: <%= ActiveRecord::FixtureSet.identify(:reginald) %> -# pirate_id: <%= ActiveRecord::FixtureSet.identify(:george) %> -# -# == Support for YAML defaults -# -# You can set and reuse defaults in your fixtures YAML file. -# This is the same technique used in the +database.yml+ file to specify -# defaults: -# -# DEFAULTS: &DEFAULTS -# created_on: <%= 3.weeks.ago.to_fs(:db) %> -# -# first: -# name: Smurf -# <<: *DEFAULTS -# -# second: -# name: Fraggle -# <<: *DEFAULTS -# -# Any fixture labeled "DEFAULTS" is safely ignored. -# -# Besides using "DEFAULTS", you can also specify what fixtures will -# be ignored by setting "ignore" in "_fixture" section. -# -# # users.yml -# _fixture: -# ignore: -# - base -# # or use "ignore: base" when there is only one fixture that needs to be ignored. -# -# base: &base -# admin: false -# introduction: "This is a default description" -# -# admin: -# <<: *base -# admin: true -# -# visitor: -# <<: *base -# -# In the above example, 'base' will be ignored when creating fixtures. -# This can be used for common attributes inheriting. -# -# == Configure the fixture model class -# -# It's possible to set the fixture's model class directly in the YAML file. -# This is helpful when fixtures are loaded outside tests and -# +set_fixture_class+ is not available (e.g. -# when running bin/rails db:fixtures:load). -# -# _fixture: -# model_class: User -# david: -# name: David -# -# Any fixtures labeled "_fixture" are safely ignored. -# -# source://activerecord//lib/active_record/fixture_set/file.rb#6 -class ActiveRecord::FixtureSet - # @return [FixtureSet] a new instance of FixtureSet - # - # source://activerecord//lib/active_record/fixtures.rb#650 - def initialize(_, name, class_name, path, config = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/fixtures.rb#662 - def [](x); end - - # source://activerecord//lib/active_record/fixtures.rb#666 - def []=(k, v); end - - # source://activerecord//lib/active_record/fixtures.rb#468 - def all_loaded_fixtures; end - - # source://activerecord//lib/active_record/fixtures.rb#468 - def all_loaded_fixtures=(val); end - - # Returns the value of attribute config. - # - # source://activerecord//lib/active_record/fixtures.rb#648 - def config; end - - # source://activerecord//lib/active_record/fixtures.rb#670 - def each(&block); end - - # Returns the value of attribute fixtures. - # - # source://activerecord//lib/active_record/fixtures.rb#648 - def fixtures; end - - # Returns the value of attribute ignored_fixtures. - # - # source://activerecord//lib/active_record/fixtures.rb#648 - def ignored_fixtures; end - - # Returns the value of attribute model_class. - # - # source://activerecord//lib/active_record/fixtures.rb#648 - def model_class; end - - # Returns the value of attribute name. - # - # source://activerecord//lib/active_record/fixtures.rb#648 - def name; end - - # source://activerecord//lib/active_record/fixtures.rb#674 - def size; end - - # Returns the value of attribute table_name. - # - # source://activerecord//lib/active_record/fixtures.rb#648 - def table_name; end - - # Returns a hash of rows to be inserted. The key is the table, the value is - # a list of rows to insert to that table. - # - # source://activerecord//lib/active_record/fixtures.rb#680 - def table_rows; end - - private - - # source://activerecord//lib/active_record/fixtures.rb#700 - def ignored_fixtures=(base); end - - # source://activerecord//lib/active_record/fixtures.rb#692 - def model_class=(class_name); end - - # Loads the fixtures from the YAML file at +path+. - # If the file sets the +model_class+ and current instance value is not set, - # it uses the file value. - # - # source://activerecord//lib/active_record/fixtures.rb#718 - def read_fixture_files(path); end - - # source://activerecord//lib/active_record/fixtures.rb#734 - def yaml_file_path(path); end - - class << self - # source://activerecord//lib/active_record/fixtures.rb#468 - def all_loaded_fixtures; end - - # source://activerecord//lib/active_record/fixtures.rb#468 - def all_loaded_fixtures=(val); end - - # source://activerecord//lib/active_record/fixtures.rb#536 - def cache_fixtures(connection, fixtures_map); end - - # source://activerecord//lib/active_record/fixtures.rb#520 - def cache_for_connection(connection); end - - # source://activerecord//lib/active_record/fixtures.rb#528 - def cached_fixtures(connection, keys_to_fetch = T.unsafe(nil)); end - - # Superclass for the evaluation contexts used by ERB fixtures. - # - # source://activerecord//lib/active_record/fixtures.rb#589 - def context_class; end - - # source://activerecord//lib/active_record/fixtures.rb#555 - def create_fixtures(fixtures_directory, fixture_set_names, class_names = T.unsafe(nil), config = T.unsafe(nil), &block); end - - # source://activerecord//lib/active_record/fixtures.rb#504 - def default_fixture_model_name(fixture_set_name, config = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/fixtures.rb#510 - def default_fixture_table_name(fixture_set_name, config = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/fixtures.rb#524 - def fixture_is_cached?(connection, table_name); end - - # Returns a consistent, platform-independent identifier for +label+. - # Integer identifiers are values less than 2^30. UUIDs are RFC 4122 version 5 SHA-1 hashes. - # - # source://activerecord//lib/active_record/fixtures.rb#580 - def identify(label, column_type = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/fixtures.rb#549 - def instantiate_all_loaded_fixtures(object, load_instances = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/fixtures.rb#540 - def instantiate_fixtures(object, fixture_set, load_instances = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/fixtures.rb#516 - def reset_cache; end - - private - - # source://activerecord//lib/active_record/fixtures.rb#612 - def insert(fixture_sets, connection); end - - # source://activerecord//lib/active_record/fixtures.rb#594 - def read_and_insert(fixtures_directory, fixture_files, class_names, connection); end - - # source://activerecord//lib/active_record/fixtures.rb#643 - def update_all_loaded_fixtures(fixtures_map); end - end -end - -# source://activerecord//lib/active_record/fixtures.rb#470 -class ActiveRecord::FixtureSet::ClassCache - # @return [ClassCache] a new instance of ClassCache +# source://activerecord//lib/active_record/future_result.rb#4 +class ActiveRecord::FutureResult + # @return [FutureResult] a new instance of FutureResult # - # source://activerecord//lib/active_record/fixtures.rb#471 - def initialize(class_names, config); end - - # source://activerecord//lib/active_record/fixtures.rb#481 - def [](fs_name); end - - private - - # source://activerecord//lib/active_record/fixtures.rb#498 - def default_fixture_model(fs_name, config); end - - # source://activerecord//lib/active_record/fixtures.rb#489 - def insert_class(class_names, name, klass); end -end + # source://activerecord//lib/active_record/future_result.rb#55 + def initialize(pool, *args, **kwargs); end -# source://activerecord//lib/active_record/fixture_set/file.rb#7 -class ActiveRecord::FixtureSet::File - include ::Enumerable + # source://activerecord//lib/active_record/future_result.rb#83 + def cancel; end - # @return [File] a new instance of File + # @return [Boolean] # - # source://activerecord//lib/active_record/fixture_set/file.rb#19 - def initialize(file); end - - # source://activerecord//lib/active_record/fixture_set/file.rb#23 - def each(&block); end - - # source://activerecord//lib/active_record/fixture_set/file.rb#31 - def ignored_fixtures; end - - # source://activerecord//lib/active_record/fixture_set/file.rb#27 - def model_class; end - - private + # source://activerecord//lib/active_record/future_result.rb#124 + def canceled?; end - # source://activerecord//lib/active_record/fixture_set/file.rb#40 - def config_row; end + # source://activerecord//lib/active_record/future_result.rb#50 + def empty?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/fixture_set/file.rb#51 - def raw_rows; end + # source://activerecord//lib/active_record/future_result.rb#79 + def execute!(connection); end - # source://activerecord//lib/active_record/fixture_set/file.rb#36 - def rows; end + # source://activerecord//lib/active_record/future_result.rb#89 + def execute_or_skip; end - # Validate our unmarshalled data. + # Returns the value of attribute lock_wait. # - # source://activerecord//lib/active_record/fixture_set/file.rb#76 - def validate(data); end - - # source://activerecord//lib/active_record/fixture_set/file.rb#61 - def validate_config_row(data); end - - class << self - # Open a fixture file named +file+. When called with a block, the block - # is called with the filehandle and the filehandle is automatically closed - # when the block finishes. - # - # source://activerecord//lib/active_record/fixture_set/file.rb#14 - def open(file); end - end -end - -# -- -# An instance of FixtureSet is normally stored in a single YAML file and -# possibly in a folder with the same name. -# ++ -# -# source://activerecord//lib/active_record/fixtures.rb#464 -ActiveRecord::FixtureSet::MAX_ID = T.let(T.unsafe(nil), Integer) + # source://activerecord//lib/active_record/future_result.rb#53 + def lock_wait; end -# source://activerecord//lib/active_record/fixture_set/model_metadata.rb#5 -class ActiveRecord::FixtureSet::ModelMetadata - # @return [ModelMetadata] a new instance of ModelMetadata - # - # source://activerecord//lib/active_record/fixture_set/model_metadata.rb#6 - def initialize(model_class); end + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/delegation.rb#331 + def method_missing(method, *args, **_arg2, &block); end # @return [Boolean] # - # source://activerecord//lib/active_record/fixture_set/model_metadata.rb#18 - def has_primary_key_column?; end - - # source://activerecord//lib/active_record/fixture_set/model_metadata.rb#27 - def inheritance_column_name; end - - # source://activerecord//lib/active_record/fixture_set/model_metadata.rb#10 - def primary_key_name; end - - # source://activerecord//lib/active_record/fixture_set/model_metadata.rb#14 - def primary_key_type; end + # source://activerecord//lib/active_record/future_result.rb#120 + def pending?; end - # source://activerecord//lib/active_record/fixture_set/model_metadata.rb#23 - def timestamp_column_names; end -end + # source://activerecord//lib/active_record/future_result.rb#107 + def result; end -# NOTE: This class has to be defined in compact style in -# order for rendering context subclassing to work correctly. -# -# source://activerecord//lib/active_record/fixture_set/render_context.rb#5 -class ActiveRecord::FixtureSet::RenderContext - class << self - # source://activerecord//lib/active_record/fixture_set/render_context.rb#6 - def create_subclass; end - end -end + # source://activerecord//lib/active_record/future_result.rb#74 + def schedule!(session); end -# source://activerecord//lib/active_record/fixture_set/table_row.rb#5 -class ActiveRecord::FixtureSet::TableRow - # @return [TableRow] a new instance of TableRow - # - # source://activerecord//lib/active_record/fixture_set/table_row.rb#65 - def initialize(fixture, table_rows:, label:, now:); end + # source://activerecord//lib/active_record/future_result.rb#70 + def then(&block); end - # source://activerecord//lib/active_record/fixture_set/table_row.rb#73 - def to_hash; end + # source://activerecord//lib/active_record/future_result.rb#50 + def to_a(*_arg0, **_arg1, &_arg2); end private - # source://activerecord//lib/active_record/fixture_set/table_row.rb#165 - def add_join_records(association); end - - # source://activerecord//lib/active_record/fixture_set/table_row.rb#86 - def fill_row_model_attributes; end - - # source://activerecord//lib/active_record/fixture_set/table_row.rb#103 - def fill_timestamps; end - - # source://activerecord//lib/active_record/fixture_set/table_row.rb#119 - def generate_primary_key; end - - # source://activerecord//lib/active_record/fixture_set/table_row.rb#112 - def interpolate_label; end - - # source://activerecord//lib/active_record/fixture_set/table_row.rb#82 - def model_class; end - - # source://activerecord//lib/active_record/fixture_set/table_row.rb#78 - def model_metadata; end - - # source://activerecord//lib/active_record/fixture_set/table_row.rb#95 - def reflection_class; end - - # source://activerecord//lib/active_record/fixture_set/table_row.rb#128 - def resolve_enums; end - - # source://activerecord//lib/active_record/fixture_set/table_row.rb#136 - def resolve_sti_reflections; end -end - -# source://activerecord//lib/active_record/fixture_set/table_row.rb#24 -class ActiveRecord::FixtureSet::TableRow::HasManyThroughProxy < ::ActiveRecord::FixtureSet::TableRow::ReflectionProxy - # source://activerecord//lib/active_record/fixture_set/table_row.rb#33 - def join_table; end - - # source://activerecord//lib/active_record/fixture_set/table_row.rb#29 - def lhs_key; end - - # source://activerecord//lib/active_record/fixture_set/table_row.rb#25 - def rhs_key; end - - # source://activerecord//lib/active_record/fixture_set/table_row.rb#37 - def timestamp_column_names; end -end - -# source://activerecord//lib/active_record/fixture_set/table_row.rb#42 -class ActiveRecord::FixtureSet::TableRow::PrimaryKeyError < ::StandardError - # @return [PrimaryKeyError] a new instance of PrimaryKeyError - # - # source://activerecord//lib/active_record/fixture_set/table_row.rb#43 - def initialize(label, association, value); end -end - -# source://activerecord//lib/active_record/fixture_set/table_row.rb#6 -class ActiveRecord::FixtureSet::TableRow::ReflectionProxy - # @return [ReflectionProxy] a new instance of ReflectionProxy - # - # source://activerecord//lib/active_record/fixture_set/table_row.rb#7 - def initialize(association); end + # source://activerecord//lib/active_record/future_result.rb#152 + def exec_query(connection, *args, **kwargs); end - # source://activerecord//lib/active_record/fixture_set/table_row.rb#11 - def join_table; end + # source://activerecord//lib/active_record/future_result.rb#129 + def execute_or_wait; end - # source://activerecord//lib/active_record/fixture_set/table_row.rb#15 - def name; end + # source://activerecord//lib/active_record/future_result.rb#144 + def execute_query(connection, async: T.unsafe(nil)); end - # source://activerecord//lib/active_record/fixture_set/table_row.rb#19 - def primary_key_type; end + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/delegation.rb#323 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end end -# source://activerecord//lib/active_record/fixture_set/table_rows.rb#8 -class ActiveRecord::FixtureSet::TableRows - # @return [TableRows] a new instance of TableRows - # - # source://activerecord//lib/active_record/fixture_set/table_rows.rb#9 - def initialize(table_name, model_class:, fixtures:); end - - # Returns the value of attribute model_class. - # - # source://activerecord//lib/active_record/fixture_set/table_rows.rb#21 - def model_class; end - - # source://activerecord//lib/active_record/fixture_set/table_rows.rb#27 - def model_metadata; end +# source://activerecord//lib/active_record/future_result.rb#48 +class ActiveRecord::FutureResult::Canceled < ::ActiveRecord::ActiveRecordError; end - # Returns the value of attribute tables. +# source://activerecord//lib/active_record/future_result.rb#5 +class ActiveRecord::FutureResult::Complete + # @return [Complete] a new instance of Complete # - # source://activerecord//lib/active_record/fixture_set/table_rows.rb#21 - def tables; end - - # source://activerecord//lib/active_record/fixture_set/table_rows.rb#23 - def to_hash; end + # source://activerecord//lib/active_record/future_result.rb#9 + def initialize(result); end - private - - # source://activerecord//lib/active_record/fixture_set/table_rows.rb#32 - def build_table_rows_from(table_name, fixtures); end -end - -# source://activerecord//lib/active_record/future_result.rb#4 -class ActiveRecord::FutureResult - # @return [FutureResult] a new instance of FutureResult + # @return [Boolean] # - # source://activerecord//lib/active_record/future_result.rb#33 - def initialize(pool, *args, **kwargs); end - - # source://activerecord//lib/active_record/future_result.rb#57 - def cancel; end + # source://activerecord//lib/active_record/future_result.rb#17 + def canceled?; end - # source://activerecord//lib/active_record/future_result.rb#29 + # source://activerecord//lib/active_record/future_result.rb#7 def empty?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/future_result.rb#53 - def execute!(connection); end - - # source://activerecord//lib/active_record/future_result.rb#63 - def execute_or_skip; end - - # Returns the value of attribute lock_wait. - # - # source://activerecord//lib/active_record/future_result.rb#31 - def lock_wait; end - # @return [Boolean] # - # source://activerecord//lib/active_record/future_result.rb#94 + # source://activerecord//lib/active_record/future_result.rb#13 def pending?; end - # source://activerecord//lib/active_record/future_result.rb#81 + # Returns the value of attribute result. + # + # source://activerecord//lib/active_record/future_result.rb#6 def result; end - # source://activerecord//lib/active_record/future_result.rb#48 - def schedule!(session); end + # source://activerecord//lib/active_record/future_result.rb#21 + def then(&block); end - # source://activerecord//lib/active_record/future_result.rb#29 + # source://activerecord//lib/active_record/future_result.rb#7 def to_a(*_arg0, **_arg1, &_arg2); end - - private - - # @return [Boolean] - # - # source://activerecord//lib/active_record/future_result.rb#99 - def canceled?; end - - # source://activerecord//lib/active_record/future_result.rb#126 - def exec_query(connection, *args, **kwargs); end - - # source://activerecord//lib/active_record/future_result.rb#103 - def execute_or_wait; end - - # source://activerecord//lib/active_record/future_result.rb#118 - def execute_query(connection, async: T.unsafe(nil)); end end -# source://activerecord//lib/active_record/future_result.rb#27 -class ActiveRecord::FutureResult::Canceled < ::ActiveRecord::ActiveRecordError; end - -# source://activerecord//lib/active_record/future_result.rb#5 +# source://activerecord//lib/active_record/future_result.rb#26 class ActiveRecord::FutureResult::EventBuffer # @return [EventBuffer] a new instance of EventBuffer # - # source://activerecord//lib/active_record/future_result.rb#6 + # source://activerecord//lib/active_record/future_result.rb#27 def initialize(future_result, instrumenter); end - # source://activerecord//lib/active_record/future_result.rb#18 + # source://activerecord//lib/active_record/future_result.rb#39 def flush; end - # source://activerecord//lib/active_record/future_result.rb#12 + # source://activerecord//lib/active_record/future_result.rb#33 def instrument(name, payload = T.unsafe(nil), &block); end end -# source://activerecord//lib/active_record/future_result.rb#130 +# source://activerecord//lib/active_record/future_result.rb#156 class ActiveRecord::FutureResult::SelectAll < ::ActiveRecord::FutureResult private - # source://activerecord//lib/active_record/future_result.rb#132 + # source://activerecord//lib/active_record/future_result.rb#158 def exec_query(*_arg0, **_arg1); end end @@ -20689,10 +21655,10 @@ class ActiveRecord::HasManyThroughAssociationPolymorphicThroughError < ::ActiveR def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil)); end end -# source://activerecord//lib/active_record/associations.rb#202 +# source://activerecord//lib/active_record/associations.rb#218 class ActiveRecord::HasManyThroughCantAssociateThroughHasOneOrManyReflection < ::ActiveRecord::ThroughCantAssociateThroughHasOneOrManyReflection; end -# source://activerecord//lib/active_record/associations.rb#218 +# source://activerecord//lib/active_record/associations.rb#234 class ActiveRecord::HasManyThroughNestedAssociationsAreReadonly < ::ActiveRecord::ThroughNestedAssociationsAreReadonly; end # source://activerecord//lib/active_record/associations.rb#167 @@ -20727,17 +21693,17 @@ class ActiveRecord::HasOneThroughCantAssociateThroughCollection < ::ActiveRecord def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil), through_reflection = T.unsafe(nil)); end end -# source://activerecord//lib/active_record/associations.rb#205 +# source://activerecord//lib/active_record/associations.rb#221 class ActiveRecord::HasOneThroughCantAssociateThroughHasOneOrManyReflection < ::ActiveRecord::ThroughCantAssociateThroughHasOneOrManyReflection; end -# source://activerecord//lib/active_record/associations.rb#221 +# source://activerecord//lib/active_record/associations.rb#237 class ActiveRecord::HasOneThroughNestedAssociationsAreReadonly < ::ActiveRecord::ThroughNestedAssociationsAreReadonly; end -# source://activerecord//lib/active_record/migration.rb#123 +# source://activerecord//lib/active_record/migration.rb#124 class ActiveRecord::IllegalMigrationNameError < ::ActiveRecord::MigrationError # @return [IllegalMigrationNameError] a new instance of IllegalMigrationNameError # - # source://activerecord//lib/active_record/migration.rb#124 + # source://activerecord//lib/active_record/migration.rb#125 def initialize(name = T.unsafe(nil)); end end @@ -20753,10 +21719,10 @@ end # relation.where!(title: 'TODO') # => ActiveRecord::ImmutableRelation # relation.limit!(5) # => ActiveRecord::ImmutableRelation # -# source://activerecord//lib/active_record/errors.rb#401 +# source://activerecord//lib/active_record/errors.rb#471 class ActiveRecord::ImmutableRelation < ::ActiveRecord::ActiveRecordError; end -# == Single table inheritance +# = Single table inheritance # # Active Record allows inheritance by storing the name of the class in a column that by # default is named "type" (can be changed by overwriting Base.inheritance_column). @@ -20784,10 +21750,11 @@ class ActiveRecord::ImmutableRelation < ::ActiveRecord::ActiveRecordError; end # be triggered. In that case, it'll work just like normal subclasses with no special magic # for differentiating between them or reloading the right type with find. # -# Note, all the attributes for all the cases are kept in the same table. Read more: -# https://www.martinfowler.com/eaaCatalog/singleTableInheritance.html +# Note, all the attributes for all the cases are kept in the same table. +# Read more: +# * https://www.martinfowler.com/eaaCatalog/singleTableInheritance.html # -# source://activerecord//lib/active_record/inheritance.rb#38 +# source://activerecord//lib/active_record/inheritance.rb#39 module ActiveRecord::Inheritance extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -20802,13 +21769,13 @@ module ActiveRecord::Inheritance # do Reply.new without having to set Reply[Reply.inheritance_column] = "Reply" yourself. # No such attribute would be set for objects of the Message class in that example. # - # source://activerecord//lib/active_record/inheritance.rb#343 + # source://activerecord//lib/active_record/inheritance.rb#357 def ensure_proper_type; end - # source://activerecord//lib/active_record/inheritance.rb#327 + # source://activerecord//lib/active_record/inheritance.rb#341 def initialize_dup(other); end - # source://activerecord//lib/active_record/inheritance.rb#333 + # source://activerecord//lib/active_record/inheritance.rb#347 def initialize_internals_callback; end module GeneratedClassMethods @@ -20828,7 +21795,7 @@ module ActiveRecord::Inheritance end end -# source://activerecord//lib/active_record/inheritance.rb#51 +# source://activerecord//lib/active_record/inheritance.rb#52 module ActiveRecord::Inheritance::ClassMethods # Set this to +true+ if this is an abstract class (see # abstract_class?). @@ -20837,7 +21804,7 @@ module ActiveRecord::Inheritance::ClassMethods # true. # +ApplicationRecord+, for example, is generated as an abstract class. # - # Consider the following default behaviour: + # Consider the following default behavior: # # Shape = Class.new(ActiveRecord::Base) # Polygon = Class.new(Shape) @@ -20872,7 +21839,7 @@ module ActiveRecord::Inheritance::ClassMethods # stay in the hierarchy, and Active Record will continue to correctly # derive the table name. # - # source://activerecord//lib/active_record/inheritance.rb#153 + # source://activerecord//lib/active_record/inheritance.rb#164 def abstract_class; end # Set this to +true+ if this is an abstract class (see @@ -20882,7 +21849,7 @@ module ActiveRecord::Inheritance::ClassMethods # true. # +ApplicationRecord+, for example, is generated as an abstract class. # - # Consider the following default behaviour: + # Consider the following default behavior: # # Shape = Class.new(ActiveRecord::Base) # Polygon = Class.new(Shape) @@ -20917,26 +21884,36 @@ module ActiveRecord::Inheritance::ClassMethods # stay in the hierarchy, and Active Record will continue to correctly # derive the table name. # - # source://activerecord//lib/active_record/inheritance.rb#153 + # source://activerecord//lib/active_record/inheritance.rb#164 def abstract_class=(_arg0); end # Returns whether this class is an abstract class or not. # # @return [Boolean] # - # source://activerecord//lib/active_record/inheritance.rb#156 + # source://activerecord//lib/active_record/inheritance.rb#167 def abstract_class?; end - # Returns the class descending directly from ActiveRecord::Base, or - # an abstract class, if any, in the inheritance hierarchy. + # Returns the first class in the inheritance hierarchy that descends from either an + # abstract class or from ActiveRecord::Base. # - # If A extends ActiveRecord::Base, A.base_class will return A. If B descends from A - # through some arbitrarily deep hierarchy, B.base_class will return A. + # Consider the following behaviour: # - # If B < A and C < B and if A is an abstract_class then both B.base_class - # and C.base_class would return B as the answer since A is an abstract_class. + # class ApplicationRecord < ActiveRecord::Base + # self.abstract_class = true + # end + # class Shape < ApplicationRecord + # self.abstract_class = true + # end + # Polygon = Class.new(Shape) + # Square = Class.new(Polygon) # - # source://activerecord//lib/active_record/inheritance.rb#104 + # ApplicationRecord.base_class # => ApplicationRecord + # Shape.base_class # => Shape + # Polygon.base_class # => Polygon + # Square.base_class # => Polygon + # + # source://activerecord//lib/active_record/inheritance.rb#115 def base_class; end # Returns whether the class is a base class. @@ -20944,7 +21921,7 @@ module ActiveRecord::Inheritance::ClassMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/inheritance.rb#108 + # source://activerecord//lib/active_record/inheritance.rb#119 def base_class?; end # Returns +true+ if this does not need STI type condition. Returns @@ -20952,37 +21929,34 @@ module ActiveRecord::Inheritance::ClassMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/inheritance.rb#81 + # source://activerecord//lib/active_record/inheritance.rb#82 def descends_from_active_record?; end - # source://activerecord//lib/active_record/inheritance.rb#219 + # source://activerecord//lib/active_record/inheritance.rb#224 def dup; end # @return [Boolean] # - # source://activerecord//lib/active_record/inheritance.rb#91 + # source://activerecord//lib/active_record/inheritance.rb#92 def finder_needs_type_condition?; end - # source://activerecord//lib/active_record/inheritance.rb#213 - def inherited(subclass); end - # Determines if one of the attributes passed in is the inheritance column, # and if the inheritance column is attr accessible, it initializes an # instance of the given subclass instead of the base class. # - # source://activerecord//lib/active_record/inheritance.rb#55 + # source://activerecord//lib/active_record/inheritance.rb#56 def new(attributes = T.unsafe(nil), &block); end # Returns the class for the provided +name+. # # It is used to find the class correspondent to the value stored in the polymorphic type column. # - # source://activerecord//lib/active_record/inheritance.rb#205 + # source://activerecord//lib/active_record/inheritance.rb#216 def polymorphic_class_for(name); end # Returns the value to be stored in the polymorphic type column for Polymorphic Associations. # - # source://activerecord//lib/active_record/inheritance.rb#198 + # source://activerecord//lib/active_record/inheritance.rb#209 def polymorphic_name; end # Sets the application record class for Active Record @@ -20992,19 +21966,19 @@ module ActiveRecord::Inheritance::ClassMethods # will share a database connection with Active Record. It is the class # that connects to your primary database. # - # source://activerecord//lib/active_record/inheritance.rb#166 + # source://activerecord//lib/active_record/inheritance.rb#177 def primary_abstract_class; end # Returns the class for the provided +type_name+. # # It is used to find the class correspondent to the value stored in the inheritance column. # - # source://activerecord//lib/active_record/inheritance.rb#183 + # source://activerecord//lib/active_record/inheritance.rb#194 def sti_class_for(type_name); end # Returns the value to be stored in the inheritance column for STI. # - # source://activerecord//lib/active_record/inheritance.rb#176 + # source://activerecord//lib/active_record/inheritance.rb#187 def sti_name; end protected @@ -21012,10 +21986,10 @@ module ActiveRecord::Inheritance::ClassMethods # Returns the class type of the record using the current module as a prefix. So descendants of # MyApp::Business::Account would appear as MyApp::Business::AccountSubclass. # - # source://activerecord//lib/active_record/inheritance.rb#235 + # source://activerecord//lib/active_record/inheritance.rb#240 def compute_type(type_name); end - # source://activerecord//lib/active_record/inheritance.rb#263 + # source://activerecord//lib/active_record/inheritance.rb#268 def set_base_class; end private @@ -21024,33 +21998,35 @@ module ActiveRecord::Inheritance::ClassMethods # record instance. For single-table inheritance, we check the record # for a +type+ column and return the corresponding class. # - # source://activerecord//lib/active_record/inheritance.rb#283 + # source://activerecord//lib/active_record/inheritance.rb#297 def discriminate_class_for_record(record); end - # source://activerecord//lib/active_record/inheritance.rb#295 + # source://activerecord//lib/active_record/inheritance.rb#309 def find_sti_class(type_name); end - # source://activerecord//lib/active_record/inheritance.rb#227 + # source://activerecord//lib/active_record/inheritance.rb#285 + def inherited(subclass); end + + # source://activerecord//lib/active_record/inheritance.rb#232 def initialize_clone(other); end # Detect the subclass from the inheritance column of attrs. If the inheritance column value # is not self or a valid subclass, raises ActiveRecord::SubclassNotFound # - # source://activerecord//lib/active_record/inheritance.rb#315 + # source://activerecord//lib/active_record/inheritance.rb#329 def subclass_from_attributes(attrs); end - # source://activerecord//lib/active_record/inheritance.rb#306 + # source://activerecord//lib/active_record/inheritance.rb#320 def type_condition(table = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord//lib/active_record/inheritance.rb#291 + # source://activerecord//lib/active_record/inheritance.rb#305 def using_single_table_inheritance?(record); end end # source://activerecord//lib/active_record/insert_all.rb#6 class ActiveRecord::InsertAll - # @raise [ArgumentError] # @return [InsertAll] a new instance of InsertAll # # source://activerecord//lib/active_record/insert_all.rb#10 @@ -21061,7 +22037,7 @@ class ActiveRecord::InsertAll # source://activerecord//lib/active_record/insert_all.rb#7 def connection; end - # source://activerecord//lib/active_record/insert_all.rb#37 + # source://activerecord//lib/active_record/insert_all.rb#41 def execute; end # Returns the value of attribute inserts. @@ -21074,12 +22050,12 @@ class ActiveRecord::InsertAll # source://activerecord//lib/active_record/insert_all.rb#7 def keys; end - # TODO: Consider remaining this method, as it only conditionally extends keys, not always + # TODO: Consider renaming this method, as it only conditionally extends keys, not always # - # source://activerecord//lib/active_record/insert_all.rb#80 + # source://activerecord//lib/active_record/insert_all.rb#86 def keys_including_timestamps; end - # source://activerecord//lib/active_record/insert_all.rb#61 + # source://activerecord//lib/active_record/insert_all.rb#67 def map_key_with_value; end # Returns the value of attribute model. @@ -21092,12 +22068,12 @@ class ActiveRecord::InsertAll # source://activerecord//lib/active_record/insert_all.rb#8 def on_duplicate; end - # source://activerecord//lib/active_record/insert_all.rb#48 + # source://activerecord//lib/active_record/insert_all.rb#54 def primary_keys; end # @return [Boolean] # - # source://activerecord//lib/active_record/insert_all.rb#75 + # source://activerecord//lib/active_record/insert_all.rb#81 def record_timestamps?; end # Returns the value of attribute returning. @@ -21107,7 +22083,7 @@ class ActiveRecord::InsertAll # @return [Boolean] # - # source://activerecord//lib/active_record/insert_all.rb#53 + # source://activerecord//lib/active_record/insert_all.rb#59 def skip_duplicates?; end # Returns the value of attribute unique_by. @@ -21115,12 +22091,12 @@ class ActiveRecord::InsertAll # source://activerecord//lib/active_record/insert_all.rb#8 def unique_by; end - # source://activerecord//lib/active_record/insert_all.rb#44 + # source://activerecord//lib/active_record/insert_all.rb#50 def updatable_columns; end # @return [Boolean] # - # source://activerecord//lib/active_record/insert_all.rb#57 + # source://activerecord//lib/active_record/insert_all.rb#63 def update_duplicates?; end # Returns the value of attribute update_only. @@ -21135,129 +22111,146 @@ class ActiveRecord::InsertAll private - # source://activerecord//lib/active_record/insert_all.rb#91 + # source://activerecord//lib/active_record/insert_all.rb#125 def configure_on_duplicate_update_logic; end # @return [Boolean] # - # source://activerecord//lib/active_record/insert_all.rb#105 + # source://activerecord//lib/active_record/insert_all.rb#141 def custom_update_sql_provided?; end # @raise [ArgumentError] # - # source://activerecord//lib/active_record/insert_all.rb#172 + # source://activerecord//lib/active_record/insert_all.rb#209 def disallow_raw_sql!(value); end - # source://activerecord//lib/active_record/insert_all.rb#133 + # source://activerecord//lib/active_record/insert_all.rb#170 def ensure_valid_options_for_connection!; end - # source://activerecord//lib/active_record/insert_all.rb#109 + # source://activerecord//lib/active_record/insert_all.rb#145 def find_unique_index_for(unique_by); end - # source://activerecord//lib/active_record/insert_all.rb#157 + # @return [Boolean] + # + # source://activerecord//lib/active_record/insert_all.rb#97 + def has_attribute_aliases?(attributes); end + + # source://activerecord//lib/active_record/insert_all.rb#194 def readonly_columns; end + # source://activerecord//lib/active_record/insert_all.rb#121 + def resolve_attribute_alias(attribute); end + + # source://activerecord//lib/active_record/insert_all.rb#110 + def resolve_attribute_aliases; end + + # source://activerecord//lib/active_record/insert_all.rb#101 + def resolve_sti; end + # Returns the value of attribute scope_attributes. # - # source://activerecord//lib/active_record/insert_all.rb#89 + # source://activerecord//lib/active_record/insert_all.rb#95 def scope_attributes; end - # source://activerecord//lib/active_record/insert_all.rb#181 + # source://activerecord//lib/active_record/insert_all.rb#218 def timestamps_for_create; end - # source://activerecord//lib/active_record/insert_all.rb#152 + # source://activerecord//lib/active_record/insert_all.rb#189 def to_sql; end - # source://activerecord//lib/active_record/insert_all.rb#161 + # source://activerecord//lib/active_record/insert_all.rb#198 def unique_by_columns; end - # source://activerecord//lib/active_record/insert_all.rb#128 + # source://activerecord//lib/active_record/insert_all.rb#165 def unique_indexes; end - # source://activerecord//lib/active_record/insert_all.rb#166 + # source://activerecord//lib/active_record/insert_all.rb#203 def verify_attributes(attributes); end end -# source://activerecord//lib/active_record/insert_all.rb#185 +# source://activerecord//lib/active_record/insert_all.rb#222 class ActiveRecord::InsertAll::Builder # @return [Builder] a new instance of Builder # - # source://activerecord//lib/active_record/insert_all.rb#190 + # source://activerecord//lib/active_record/insert_all.rb#227 def initialize(insert_all); end - # source://activerecord//lib/active_record/insert_all.rb#219 + # source://activerecord//lib/active_record/insert_all.rb#262 def conflict_target; end - # source://activerecord//lib/active_record/insert_all.rb#194 + # source://activerecord//lib/active_record/insert_all.rb#231 def into; end - # source://activerecord//lib/active_record/insert_all.rb#188 + # source://activerecord//lib/active_record/insert_all.rb#225 def keys(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/insert_all.rb#188 + # source://activerecord//lib/active_record/insert_all.rb#225 def keys_including_timestamps(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute model. # - # source://activerecord//lib/active_record/insert_all.rb#186 + # source://activerecord//lib/active_record/insert_all.rb#223 def model; end - # source://activerecord//lib/active_record/insert_all.rb#243 + # source://activerecord//lib/active_record/insert_all.rb#286 def raw_update_sql; end - # source://activerecord//lib/active_record/insert_all.rb#243 + # source://activerecord//lib/active_record/insert_all.rb#286 def raw_update_sql?; end - # source://activerecord//lib/active_record/insert_all.rb#188 + # source://activerecord//lib/active_record/insert_all.rb#225 def record_timestamps?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/insert_all.rb#209 + # source://activerecord//lib/active_record/insert_all.rb#246 def returning; end - # source://activerecord//lib/active_record/insert_all.rb#188 + # source://activerecord//lib/active_record/insert_all.rb#225 def skip_duplicates?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/insert_all.rb#233 + # source://activerecord//lib/active_record/insert_all.rb#276 def touch_model_timestamps_unless(&block); end - # source://activerecord//lib/active_record/insert_all.rb#229 + # source://activerecord//lib/active_record/insert_all.rb#272 def updatable_columns; end - # source://activerecord//lib/active_record/insert_all.rb#188 + # source://activerecord//lib/active_record/insert_all.rb#225 def update_duplicates?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/insert_all.rb#198 + # source://activerecord//lib/active_record/insert_all.rb#235 def values_list; end private - # source://activerecord//lib/active_record/insert_all.rb#256 + # source://activerecord//lib/active_record/insert_all.rb#299 def columns_list; end # Returns the value of attribute connection. # - # source://activerecord//lib/active_record/insert_all.rb#250 + # source://activerecord//lib/active_record/insert_all.rb#293 def connection; end # @raise [UnknownAttributeError] # - # source://activerecord//lib/active_record/insert_all.rb#260 + # source://activerecord//lib/active_record/insert_all.rb#303 def extract_types_from_columns_on(table_name, keys:); end - # source://activerecord//lib/active_record/insert_all.rb#269 + # source://activerecord//lib/active_record/insert_all.rb#312 def format_columns(columns); end # Returns the value of attribute insert_all. # - # source://activerecord//lib/active_record/insert_all.rb#250 + # source://activerecord//lib/active_record/insert_all.rb#293 def insert_all; end - # source://activerecord//lib/active_record/insert_all.rb#273 + # source://activerecord//lib/active_record/insert_all.rb#320 + def quote_column(column); end + + # source://activerecord//lib/active_record/insert_all.rb#316 def quote_columns(columns); end # @return [Boolean] # - # source://activerecord//lib/active_record/insert_all.rb#252 + # source://activerecord//lib/active_record/insert_all.rb#295 def touch_timestamp_attribute?(column_name); end end @@ -21274,7 +22267,7 @@ module ActiveRecord::Integration # Product.new.cache_key # => "products/new" # Product.find(5).cache_key # => "products/5" # - # If ActiveRecord::Base.cache_versioning is turned off, as it was in Rails 5.1 and earlier, + # If ActiveRecord::Base.cache_versioning is turned off, as it was in \Rails 5.1 and earlier, # the cache key will also include a version. # # Product.cache_versioning = false @@ -21420,88 +22413,89 @@ end # `use_metadata_table` to false in your database configuration. # # source://activerecord//lib/active_record/internal_metadata.rb#12 -class ActiveRecord::InternalMetadata < ::ActiveRecord::Base - include ::ActiveRecord::InternalMetadata::GeneratedAttributeMethods - include ::ActiveRecord::InternalMetadata::GeneratedAssociationMethods +class ActiveRecord::InternalMetadata + # @return [InternalMetadata] a new instance of InternalMetadata + # + # source://activerecord//lib/active_record/internal_metadata.rb#18 + def initialize(connection); end - class << self - # source://activerecord//lib/active_record/internal_metadata.rb#34 - def [](key); end + # source://activerecord//lib/active_record/internal_metadata.rb#45 + def [](key); end - # source://activerecord//lib/active_record/internal_metadata.rb#28 - def []=(key, value); end + # source://activerecord//lib/active_record/internal_metadata.rb#39 + def []=(key, value); end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 - def _validators; end + # Returns the value of attribute arel_table. + # + # source://activerecord//lib/active_record/internal_metadata.rb#16 + def arel_table; end - # Creates an internal metadata table with columns +key+ and +value+ - # - # source://activerecord//lib/active_record/internal_metadata.rb#41 - def create_table; end + # Returns the value of attribute connection. + # + # source://activerecord//lib/active_record/internal_metadata.rb#16 + def connection; end - # source://activerecord//lib/active_record/enum.rb#116 - def defined_enums; end + # source://activerecord//lib/active_record/internal_metadata.rb#59 + def count; end - # source://activerecord//lib/active_record/internal_metadata.rb#53 - def drop_table; end + # Creates an internal metadata table with columns +key+ and +value+ + # + # source://activerecord//lib/active_record/internal_metadata.rb#75 + def create_table; end - # @return [Boolean] - # - # source://activerecord//lib/active_record/internal_metadata.rb#16 - def enabled?; end + # source://activerecord//lib/active_record/internal_metadata.rb#66 + def create_table_and_set_flags(environment, schema_sha1 = T.unsafe(nil)); end - # source://activerecord//lib/active_record/internal_metadata.rb#20 - def primary_key; end + # source://activerecord//lib/active_record/internal_metadata.rb#53 + def delete_all_entries; end - # source://activerecord//lib/active_record/timestamp.rb#47 - def record_timestamps; end + # source://activerecord//lib/active_record/internal_metadata.rb#87 + def drop_table; end - # source://activerecord//lib/active_record/internal_metadata.rb#24 - def table_name; end - end -end + # @return [Boolean] + # + # source://activerecord//lib/active_record/internal_metadata.rb#23 + def enabled?; end -# source://activerecord//lib/active_record/internal_metadata.rb#0 -class ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation < ::ActiveRecord::AssociationRelation - include ::ActiveRecord::Delegation::ClassSpecificRelation - include ::ActiveRecord::InternalMetadata::GeneratedRelationMethods - extend ::ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods -end + # source://activerecord//lib/active_record/internal_metadata.rb#27 + def primary_key; end -# source://activerecord//lib/active_record/internal_metadata.rb#0 -class ActiveRecord::InternalMetadata::ActiveRecord_Associations_CollectionProxy < ::ActiveRecord::Associations::CollectionProxy - include ::ActiveRecord::Delegation::ClassSpecificRelation - include ::ActiveRecord::InternalMetadata::GeneratedRelationMethods - extend ::ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods -end + # @return [Boolean] + # + # source://activerecord//lib/active_record/internal_metadata.rb#93 + def table_exists?; end -# source://activerecord//lib/active_record/internal_metadata.rb#0 -class ActiveRecord::InternalMetadata::ActiveRecord_DisableJoinsAssociationRelation < ::ActiveRecord::DisableJoinsAssociationRelation - include ::ActiveRecord::Delegation::ClassSpecificRelation - include ::ActiveRecord::InternalMetadata::GeneratedRelationMethods - extend ::ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods -end + # source://activerecord//lib/active_record/internal_metadata.rb#35 + def table_name; end -# source://activerecord//lib/active_record/internal_metadata.rb#0 -class ActiveRecord::InternalMetadata::ActiveRecord_Relation < ::ActiveRecord::Relation - include ::ActiveRecord::Delegation::ClassSpecificRelation - include ::ActiveRecord::InternalMetadata::GeneratedRelationMethods - extend ::ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods -end + # source://activerecord//lib/active_record/internal_metadata.rb#31 + def value_key; end + + private + + # source://activerecord//lib/active_record/internal_metadata.rb#116 + def create_entry(key, value); end -# source://activerecord//lib/active_record/internal_metadata.rb#0 -module ActiveRecord::InternalMetadata::GeneratedAssociationMethods; end + # source://activerecord//lib/active_record/internal_metadata.rb#112 + def current_time; end -# source://activerecord//lib/active_record/internal_metadata.rb#0 -module ActiveRecord::InternalMetadata::GeneratedAttributeMethods; end + # source://activerecord//lib/active_record/internal_metadata.rb#140 + def select_entry(key); end -# source://activerecord//lib/active_record/internal_metadata.rb#0 -module ActiveRecord::InternalMetadata::GeneratedRelationMethods; end + # source://activerecord//lib/active_record/internal_metadata.rb#128 + def update_entry(key, new_value); end + + # source://activerecord//lib/active_record/internal_metadata.rb#98 + def update_or_create_entry(key, value); end +end + +# source://activerecord//lib/active_record/internal_metadata.rb#13 +class ActiveRecord::InternalMetadata::NullInternalMetadata; end # Raised when a record cannot be inserted or updated because it references a non-existent record, # or when a record cannot be deleted because a parent record references it. # -# source://activerecord//lib/active_record/errors.rb#179 +# source://activerecord//lib/active_record/errors.rb#213 class ActiveRecord::InvalidForeignKey < ::ActiveRecord::WrappedDatabaseException; end # source://activerecord//lib/active_record/associations.rb#33 @@ -21544,7 +22538,7 @@ end # For example the following migration is not reversible. # Rolling back this migration will raise an ActiveRecord::IrreversibleMigration error. # -# class IrreversibleMigrationExample < ActiveRecord::Migration[7.0] +# class IrreversibleMigrationExample < ActiveRecord::Migration[7.1] # def change # create_table :distributors do |t| # t.string :zipcode @@ -21562,7 +22556,7 @@ end # # 1. Define #up and #down methods instead of #change: # -# class ReversibleMigrationExample < ActiveRecord::Migration[7.0] +# class ReversibleMigrationExample < ActiveRecord::Migration[7.1] # def up # create_table :distributors do |t| # t.string :zipcode @@ -21587,7 +22581,7 @@ end # # 2. Use the #reversible method in #change method: # -# class ReversibleMigrationExample < ActiveRecord::Migration[7.0] +# class ReversibleMigrationExample < ActiveRecord::Migration[7.1] # def change # create_table :distributors do |t| # t.string :zipcode @@ -21612,13 +22606,13 @@ end # end # end # -# source://activerecord//lib/active_record/migration.rb#90 +# source://activerecord//lib/active_record/migration.rb#91 class ActiveRecord::IrreversibleMigration < ::ActiveRecord::MigrationError; end # IrreversibleOrderError is raised when a relation's order is too complex for # +reverse_order+ to automatically reverse. # -# source://activerecord//lib/active_record/errors.rb#441 +# source://activerecord//lib/active_record/errors.rb#530 class ActiveRecord::IrreversibleOrderError < ::ActiveRecord::ActiveRecordError; end # source://activerecord//lib/active_record/legacy_yaml_adapter.rb#4 @@ -21631,10 +22625,10 @@ end # LockWaitTimeout will be raised when lock wait timeout exceeded. # -# source://activerecord//lib/active_record/errors.rb#449 +# source://activerecord//lib/active_record/errors.rb#538 class ActiveRecord::LockWaitTimeout < ::ActiveRecord::StatementInvalid; end -# source://activerecord//lib/active_record.rb#134 +# source://activerecord//lib/active_record.rb#143 module ActiveRecord::Locking extend ::ActiveSupport::Autoload end @@ -21808,6 +22802,8 @@ end # source://activerecord//lib/active_record/locking/optimistic.rb#155 ActiveRecord::Locking::Optimistic::ClassMethods::DEFAULT_LOCKING_COLUMN = T.let(T.unsafe(nil), String) +# = \Pessimistic \Locking +# # Locking::Pessimistic provides support for row-level locking using # SELECT ... FOR UPDATE and other lock types. # @@ -21866,25 +22862,25 @@ ActiveRecord::Locking::Optimistic::ClassMethods::DEFAULT_LOCKING_COLUMN = T.let( # [PostgreSQL] # https://www.postgresql.org/docs/current/interactive/sql-select.html#SQL-FOR-UPDATE-SHARE # -# source://activerecord//lib/active_record/locking/pessimistic.rb#62 +# source://activerecord//lib/active_record/locking/pessimistic.rb#64 module ActiveRecord::Locking::Pessimistic # Obtain a row lock on this record. Reloads the record to obtain the requested # lock. Pass an SQL locking clause to append the end of the SELECT statement # or pass true for "FOR UPDATE" (the default, an exclusive row lock). Returns # the locked record. # - # source://activerecord//lib/active_record/locking/pessimistic.rb#67 + # source://activerecord//lib/active_record/locking/pessimistic.rb#69 def lock!(lock = T.unsafe(nil)); end - # Wraps the passed block in a transaction, locking the object - # before yielding. You can pass the SQL locking clause + # Wraps the passed block in a transaction, reloading the object with a + # lock before yielding. You can pass the SQL locking clause # as an optional argument (see #lock!). # # You can also pass options like requires_new:, isolation:, # and joinable: to the wrapping transaction (see # ActiveRecord::ConnectionAdapters::DatabaseStatements#transaction). # - # source://activerecord//lib/active_record/locking/pessimistic.rb#89 + # source://activerecord//lib/active_record/locking/pessimistic.rb#92 def with_lock(*args); end end @@ -21899,39 +22895,39 @@ class ActiveRecord::LogSubscriber < ::ActiveSupport::LogSubscriber # source://activerecord//lib/active_record/log_subscriber.rb#7 def backtrace_cleaner?; end - # source://activerecord//lib/active_record/log_subscriber.rb#30 + # source://activerecord//lib/active_record/log_subscriber.rb#39 def sql(event); end - # source://activerecord//lib/active_record/log_subscriber.rb#22 + # source://activerecord//lib/active_record/log_subscriber.rb#30 def strict_loading_violation(event); end private - # source://activerecord//lib/active_record/log_subscriber.rb#94 + # source://activerecord//lib/active_record/log_subscriber.rb#101 def colorize_payload_name(name, payload_name); end - # source://activerecord//lib/active_record/log_subscriber.rb#127 + # source://activerecord//lib/active_record/log_subscriber.rb#134 def debug(progname = T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/log_subscriber.rb#143 - def extract_query_source_location(locations); end - - # source://activerecord//lib/active_record/log_subscriber.rb#147 + # source://activerecord//lib/active_record/log_subscriber.rb#164 def filter(name, value); end - # source://activerecord//lib/active_record/log_subscriber.rb#135 + # source://activerecord//lib/active_record/log_subscriber.rb#142 def log_query_source; end - # source://activerecord//lib/active_record/log_subscriber.rb#123 + # source://activerecord//lib/active_record/log_subscriber.rb#130 def logger; end - # source://activerecord//lib/active_record/log_subscriber.rb#79 + # source://activerecord//lib/active_record/log_subscriber.rb#151 + def query_source_location; end + + # source://activerecord//lib/active_record/log_subscriber.rb#86 def render_bind(attr, value); end - # source://activerecord//lib/active_record/log_subscriber.rb#102 + # source://activerecord//lib/active_record/log_subscriber.rb#109 def sql_color(sql); end - # source://activerecord//lib/active_record/log_subscriber.rb#75 + # source://activerecord//lib/active_record/log_subscriber.rb#82 def type_casted_binds(casted_binds); end class << self @@ -21944,10 +22940,13 @@ class ActiveRecord::LogSubscriber < ::ActiveSupport::LogSubscriber # source://activerecord//lib/active_record/log_subscriber.rb#7 def backtrace_cleaner?; end - # source://activerecord//lib/active_record/log_subscriber.rb#17 + # source://activesupport/7.1.3.2/lib/active_support/log_subscriber.rb#87 + def log_levels; end + + # source://activerecord//lib/active_record/log_subscriber.rb#23 def reset_runtime; end - # source://activerecord//lib/active_record/log_subscriber.rb#13 + # source://activerecord//lib/active_record/log_subscriber.rb#16 def runtime; end # source://activerecord//lib/active_record/log_subscriber.rb#9 @@ -21958,13 +22957,37 @@ end # source://activerecord//lib/active_record/log_subscriber.rb#5 ActiveRecord::LogSubscriber::IGNORE_PAYLOAD_NAMES = T.let(T.unsafe(nil), Array) -# source://activerecord//lib/active_record.rb#152 +# source://activerecord//lib/active_record/marshalling.rb#4 +module ActiveRecord::Marshalling + class << self + # Returns the value of attribute format_version. + # + # source://activerecord//lib/active_record/marshalling.rb#8 + def format_version; end + + # source://activerecord//lib/active_record/marshalling.rb#10 + def format_version=(version); end + end +end + +# source://activerecord//lib/active_record/marshalling.rb#23 +module ActiveRecord::Marshalling::Methods + # source://activerecord//lib/active_record/marshalling.rb#24 + def _marshal_dump_7_1; end + + # source://activerecord//lib/active_record/marshalling.rb#40 + def marshal_load(state); end +end + +# source://activerecord//lib/active_record.rb#161 module ActiveRecord::Middleware extend ::ActiveSupport::Autoload end +# = Database Selector \Middleware +# # The DatabaseSelector Middleware provides a framework for automatically -# swapping from the primary to the replica database connection. Rails +# swapping from the primary to the replica database connection. \Rails # provides a basic framework to determine when to swap and allows for # applications to write custom strategy classes to override the default # behavior. @@ -21974,14 +22997,14 @@ end # resolver context class that sets a value that helps the resolver class # decide when to switch. # -# Rails default middleware uses the request's session to set a timestamp +# \Rails default middleware uses the request's session to set a timestamp # that informs the application when to read from a primary or read from a # replica. # # To use the DatabaseSelector in your application with default settings, # run the provided generator. # -# bin/rails g active_record:multi_db +# $ bin/rails g active_record:multi_db # # This will create a file named +config/initializers/multi_db.rb+ with the # following contents: @@ -22010,38 +23033,33 @@ end class ActiveRecord::Middleware::DatabaseSelector # @return [DatabaseSelector] a new instance of DatabaseSelector # - # source://activerecord//lib/active_record/middleware/database_selector.rb#50 + # source://activerecord//lib/active_record/middleware/database_selector.rb#52 def initialize(app, resolver_klass = T.unsafe(nil), context_klass = T.unsafe(nil), options = T.unsafe(nil)); end # Middleware that determines which database connection to use in a multiple # database application. # - # source://activerecord//lib/active_record/middleware/database_selector.rb#61 + # source://activerecord//lib/active_record/middleware/database_selector.rb#63 def call(env); end # Returns the value of attribute context_klass. # - # source://activerecord//lib/active_record/middleware/database_selector.rb#57 + # source://activerecord//lib/active_record/middleware/database_selector.rb#59 def context_klass; end # Returns the value of attribute options. # - # source://activerecord//lib/active_record/middleware/database_selector.rb#57 + # source://activerecord//lib/active_record/middleware/database_selector.rb#59 def options; end # Returns the value of attribute resolver_klass. # - # source://activerecord//lib/active_record/middleware/database_selector.rb#57 + # source://activerecord//lib/active_record/middleware/database_selector.rb#59 def resolver_klass; end private - # @return [Boolean] - # - # source://activerecord//lib/active_record/middleware/database_selector.rb#84 - def reading_request?(request); end - - # source://activerecord//lib/active_record/middleware/database_selector.rb#70 + # source://activerecord//lib/active_record/middleware/database_selector.rb#72 def select_database(request, &blk); end end @@ -22081,6 +23099,11 @@ class ActiveRecord::Middleware::DatabaseSelector::Resolver # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#35 def read(&blk); end + # @return [Boolean] + # + # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#51 + def reading_request?(request); end + # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#47 def update_context(response); end @@ -22089,26 +23112,26 @@ class ActiveRecord::Middleware::DatabaseSelector::Resolver private - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#52 + # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#56 def read_from_primary(&blk); end # @return [Boolean] # - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#74 + # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#78 def read_from_primary?; end - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#58 + # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#62 def read_from_replica(&blk); end - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#78 + # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#82 def send_to_replica_delay; end # @return [Boolean] # - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#82 + # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#86 def time_since_last_write_ok?; end - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#64 + # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#68 def write_to_primary; end class << self @@ -22164,8 +23187,10 @@ class ActiveRecord::Middleware::DatabaseSelector::Resolver::Session end end +# = Shard Selector \Middleware +# # The ShardSelector Middleware provides a framework for automatically -# swapping shards. Rails provides a basic framework to determine which +# swapping shards. \Rails provides a basic framework to determine which # shard to switch to and allows for applications to write custom strategies # for swapping if needed. # @@ -22189,32 +23214,32 @@ end # tenant.shard # } # -# source://activerecord//lib/active_record/middleware/shard_selector.rb#29 +# source://activerecord//lib/active_record/middleware/shard_selector.rb#31 class ActiveRecord::Middleware::ShardSelector # @return [ShardSelector] a new instance of ShardSelector # - # source://activerecord//lib/active_record/middleware/shard_selector.rb#30 + # source://activerecord//lib/active_record/middleware/shard_selector.rb#32 def initialize(app, resolver, options = T.unsafe(nil)); end - # source://activerecord//lib/active_record/middleware/shard_selector.rb#38 + # source://activerecord//lib/active_record/middleware/shard_selector.rb#40 def call(env); end # Returns the value of attribute options. # - # source://activerecord//lib/active_record/middleware/shard_selector.rb#36 + # source://activerecord//lib/active_record/middleware/shard_selector.rb#38 def options; end # Returns the value of attribute resolver. # - # source://activerecord//lib/active_record/middleware/shard_selector.rb#36 + # source://activerecord//lib/active_record/middleware/shard_selector.rb#38 def resolver; end private - # source://activerecord//lib/active_record/middleware/shard_selector.rb#49 + # source://activerecord//lib/active_record/middleware/shard_selector.rb#51 def selected_shard(request); end - # source://activerecord//lib/active_record/middleware/shard_selector.rb#53 + # source://activerecord//lib/active_record/middleware/shard_selector.rb#55 def set_shard(shard, &block); end end @@ -22230,7 +23255,7 @@ end # # Example of a simple migration: # -# class AddSsl < ActiveRecord::Migration[7.0] +# class AddSsl < ActiveRecord::Migration[7.1] # def up # add_column :accounts, :ssl_enabled, :boolean, default: true # end @@ -22250,7 +23275,7 @@ end # # Example of a more complex migration that also needs to initialize data: # -# class AddSystemSettings < ActiveRecord::Migration[7.0] +# class AddSystemSettings < ActiveRecord::Migration[7.1] # def up # create_table :system_settings do |t| # t.string :name @@ -22358,15 +23383,16 @@ end # == Irreversible transformations # # Some transformations are destructive in a manner that cannot be reversed. -# Migrations of that kind should raise an ActiveRecord::IrreversibleMigration +# Migrations of that kind should raise an ActiveRecord::IrreversibleMigration # exception in their +down+ method. # -# == Running migrations from within Rails +# == Running migrations from within \Rails # -# The Rails package has several tools to help create and apply migrations. +# The \Rails package has several tools to help create and apply migrations. # # To generate a new migration, you can use -# bin/rails generate migration MyNewMigration +# +# $ bin/rails generate migration MyNewMigration # # where MyNewMigration is the name of your migration. The generator will # create an empty migration file timestamp_my_new_migration.rb @@ -22375,10 +23401,10 @@ end # # There is a special syntactic shortcut to generate migrations that add fields to a table. # -# bin/rails generate migration add_fieldname_to_tablename fieldname:string +# $ bin/rails generate migration add_fieldname_to_tablename fieldname:string # # This will generate the file timestamp_add_fieldname_to_tablename.rb, which will look like this: -# class AddFieldnameToTablename < ActiveRecord::Migration[7.0] +# class AddFieldnameToTablename < ActiveRecord::Migration[7.1] # def change # add_column :tablenames, :fieldname, :string # end @@ -22397,14 +23423,14 @@ end # wish to rollback last few migrations. bin/rails db:rollback STEP=2 will rollback # the latest two migrations. # -# If any of the migrations throw an ActiveRecord::IrreversibleMigration exception, +# If any of the migrations throw an ActiveRecord::IrreversibleMigration exception, # that step will fail and you'll have some manual work to do. # # == More examples # # Not all migrations change the schema. Some just fix the data: # -# class RemoveEmptyTags < ActiveRecord::Migration[7.0] +# class RemoveEmptyTags < ActiveRecord::Migration[7.1] # def up # Tag.all.each { |tag| tag.destroy if tag.pages.empty? } # end @@ -22417,7 +23443,7 @@ end # # Others remove columns when they migrate up instead of down: # -# class RemoveUnnecessaryItemAttributes < ActiveRecord::Migration[7.0] +# class RemoveUnnecessaryItemAttributes < ActiveRecord::Migration[7.1] # def up # remove_column :items, :incomplete_items_count # remove_column :items, :completed_items_count @@ -22431,7 +23457,7 @@ end # # And sometimes you need to do something in SQL not abstracted directly by migrations: # -# class MakeJoinUnique < ActiveRecord::Migration[7.0] +# class MakeJoinUnique < ActiveRecord::Migration[7.1] # def up # execute "ALTER TABLE `pages_linked_pages` ADD UNIQUE `page_id_linked_page_id` (`page_id`,`linked_page_id`)" # end @@ -22448,7 +23474,7 @@ end # Base#reset_column_information in order to ensure that the model has the # latest column data from after the new column was added. Example: # -# class AddPeopleSalary < ActiveRecord::Migration[7.0] +# class AddPeopleSalary < ActiveRecord::Migration[7.1] # def up # add_column :people, :salary, :integer # Person.reset_column_information @@ -22484,7 +23510,7 @@ end # # == Timestamped Migrations # -# By default, Rails generates migrations that look like: +# By default, \Rails generates migrations that look like: # # 20080717013526_your_migration_name.rb # @@ -22506,7 +23532,7 @@ end # To define a reversible migration, define the +change+ method in your # migration like this: # -# class TenderloveMigration < ActiveRecord::Migration[7.0] +# class TenderloveMigration < ActiveRecord::Migration[7.1] # def change # create_table(:horses) do |t| # t.column :content, :text @@ -22523,11 +23549,11 @@ end # as before. # # If a command cannot be reversed, an -# ActiveRecord::IrreversibleMigration exception will be raised when +# ActiveRecord::IrreversibleMigration exception will be raised when # the migration is moving down. # # For a list of commands that are reversible, please see -# ActiveRecord::Migration::CommandRecorder. +# +ActiveRecord::Migration::CommandRecorder+. # # == Transactional Migrations # @@ -22536,7 +23562,7 @@ end # can't execute inside a transaction though, and for these situations # you can turn the automatic transactions off. # -# class ChangeEnum < ActiveRecord::Migration[7.0] +# class ChangeEnum < ActiveRecord::Migration[7.1] # disable_ddl_transaction! # # def up @@ -22547,61 +23573,64 @@ end # Remember that you can still open your own transactions, even if you # are in a Migration with self.disable_ddl_transaction!. # -# source://activerecord//lib/active_record/migration.rb#547 +# source://activerecord//lib/active_record/migration.rb#555 class ActiveRecord::Migration # @return [Migration] a new instance of Migration # - # source://activerecord//lib/active_record/migration.rb#684 + # source://activerecord//lib/active_record/migration.rb#796 def initialize(name = T.unsafe(nil), version = T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration.rb#883 + # source://activerecord//lib/active_record/migration.rb#1000 def announce(message); end - # source://activerecord//lib/active_record/migration.rb#914 + # source://activerecord//lib/active_record/migration.rb#1031 def connection; end - # source://activerecord//lib/active_record/migration.rb#937 + # source://activerecord//lib/active_record/migration.rb#1052 def copy(destination, sources, options = T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration.rb#677 + # source://activerecord//lib/active_record/migration.rb#789 def disable_ddl_transaction; end - # source://activerecord//lib/active_record/migration.rb#836 + # source://activerecord//lib/active_record/migration.rb#952 def down; end - # source://activerecord//lib/active_record/migration.rb#864 + # source://activerecord//lib/active_record/migration.rb#980 def exec_migration(conn, direction); end - # source://activerecord//lib/active_record/migration.rb#918 + # source://activerecord//lib/active_record/migration.rb#802 + def execution_strategy; end + + # source://activerecord//lib/active_record/migration.rb#1035 def method_missing(method, *arguments, **_arg2, &block); end # Execute this migration in the named direction # - # source://activerecord//lib/active_record/migration.rb#843 + # source://activerecord//lib/active_record/migration.rb#959 def migrate(direction); end # Returns the value of attribute name. # - # source://activerecord//lib/active_record/migration.rb#682 + # source://activerecord//lib/active_record/migration.rb#794 def name; end # Sets the attribute name # # @param value the value to set the attribute name to. # - # source://activerecord//lib/active_record/migration.rb#682 + # source://activerecord//lib/active_record/migration.rb#794 def name=(_arg0); end # Determines the version number of the next migration. # - # source://activerecord//lib/active_record/migration.rb#1003 + # source://activerecord//lib/active_record/migration.rb#1119 def next_migration_number(number); end # Finds the correct table name given an Active Record object. # Uses the Active Record object's own table_name, or pre/suffix from the # options passed in. # - # source://activerecord//lib/active_record/migration.rb#994 + # source://activerecord//lib/active_record/migration.rb#1110 def proper_table_name(name, options = T.unsafe(nil)); end # Used to specify an operation that can be run in one direction or another. @@ -22613,7 +23642,7 @@ class ActiveRecord::Migration # when the three columns 'first_name', 'last_name' and 'full_name' exist, # even when migrating down: # - # class SplitNameMigration < ActiveRecord::Migration[7.0] + # class SplitNameMigration < ActiveRecord::Migration[7.1] # def change # add_column :users, :first_name, :string # add_column :users, :last_name, :string @@ -22631,7 +23660,7 @@ class ActiveRecord::Migration # end # end # - # source://activerecord//lib/active_record/migration.rb#788 + # source://activerecord//lib/active_record/migration.rb#904 def reversible; end # Reverses the migration commands for the given block and @@ -22641,7 +23670,7 @@ class ActiveRecord::Migration # and create the table 'apples' on the way up, and the reverse # on the way down. # - # class FixTLMigration < ActiveRecord::Migration[7.0] + # class FixTLMigration < ActiveRecord::Migration[7.1] # def change # revert do # create_table(:horses) do |t| @@ -22660,7 +23689,7 @@ class ActiveRecord::Migration # # require_relative "20121212123456_tenderlove_migration" # - # class FixupTLMigration < ActiveRecord::Migration[7.0] + # class FixupTLMigration < ActiveRecord::Migration[7.1] # def change # revert TenderloveMigration # @@ -22672,12 +23701,12 @@ class ActiveRecord::Migration # # This command can be nested. # - # source://activerecord//lib/active_record/migration.rb#731 + # source://activerecord//lib/active_record/migration.rb#847 def revert(*migration_classes, &block); end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#748 + # source://activerecord//lib/active_record/migration.rb#864 def reverting?; end # Runs the given migration classes. @@ -22686,33 +23715,33 @@ class ActiveRecord::Migration # - +:direction+ - Default is +:up+. # - +:revert+ - Default is +false+. # - # source://activerecord//lib/active_record/migration.rb#816 + # source://activerecord//lib/active_record/migration.rb#932 def run(*migration_classes); end # Takes a message argument and outputs it as is. # A second boolean argument can be passed to specify whether to indent or not. # - # source://activerecord//lib/active_record/migration.rb#891 + # source://activerecord//lib/active_record/migration.rb#1008 def say(message, subitem = T.unsafe(nil)); end # Outputs text along with how long it took to run its block. # If the block returns an integer it assumes it is the number of rows affected. # - # source://activerecord//lib/active_record/migration.rb#897 + # source://activerecord//lib/active_record/migration.rb#1014 def say_with_time(message); end # Takes a block as an argument and suppresses any output generated by the block. # - # source://activerecord//lib/active_record/migration.rb#907 + # source://activerecord//lib/active_record/migration.rb#1024 def suppress_messages; end # Builds a hash for use in ActiveRecord::Migration#proper_table_name using # the Active Record object's table_name prefix and suffix # - # source://activerecord//lib/active_record/migration.rb#1013 + # source://activerecord//lib/active_record/migration.rb#1129 def table_name_options(config = T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration.rb#830 + # source://activerecord//lib/active_record/migration.rb#946 def up; end # Used to specify an operation that is only run when migrating up @@ -22721,7 +23750,7 @@ class ActiveRecord::Migration # In the following example, the new column +published+ will be given # the value +true+ for all existing records. # - # class AddPublishedToPosts < ActiveRecord::Migration[7.0] + # class AddPublishedToPosts < ActiveRecord::Migration[7.1] # def change # add_column :posts, :published, :boolean, default: false # up_only do @@ -22730,59 +23759,76 @@ class ActiveRecord::Migration # end # end # - # source://activerecord//lib/active_record/migration.rb#807 + # source://activerecord//lib/active_record/migration.rb#923 def up_only(&block); end - # source://activerecord//lib/active_record/migration.rb#681 + # source://activerecord//lib/active_record/migration.rb#793 def verbose; end - # source://activerecord//lib/active_record/migration.rb#681 + # source://activerecord//lib/active_record/migration.rb#793 def verbose=(val); end # Returns the value of attribute version. # - # source://activerecord//lib/active_record/migration.rb#682 + # source://activerecord//lib/active_record/migration.rb#794 def version; end # Sets the attribute version # # @param value the value to set the attribute version to. # - # source://activerecord//lib/active_record/migration.rb#682 + # source://activerecord//lib/active_record/migration.rb#794 def version=(_arg0); end - # source://activerecord//lib/active_record/migration.rb#879 + # source://activerecord//lib/active_record/migration.rb#996 def write(text = T.unsafe(nil)); end private - # source://activerecord//lib/active_record/migration.rb#1029 + # source://activerecord//lib/active_record/migration.rb#1161 def command_recorder; end - # source://activerecord//lib/active_record/migration.rb#1021 + # source://activerecord//lib/active_record/migration.rb#1137 def execute_block; end + # source://activerecord//lib/active_record/migration.rb#1145 + def format_arguments(arguments); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#1157 + def internal_option?(option_name); end + class << self - # source://activerecord//lib/active_record/migration.rb#568 + # source://activerecord//lib/active_record/migration.rb#613 def [](version); end - # Raises ActiveRecord::PendingMigrationError error if any migrations are pending. + # Raises ActiveRecord::PendingMigrationError error if any migrations are pending + # for all database configurations in an environment. # - # @raise [ActiveRecord::PendingMigrationError] + # source://activerecord//lib/active_record/migration.rb#698 + def check_all_pending!; end + + # Raises ActiveRecord::PendingMigrationError error if any migrations are pending. + # + # This is deprecated in favor of +check_all_pending!+ # - # source://activerecord//lib/active_record/migration.rb#626 + # source://activerecord//lib/active_record/migration.rb#682 def check_pending!(connection = T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration.rb#572 + # source://activerecord//lib/active_record/migration.rb#751 + def check_pending_migrations; end + + # source://activerecord//lib/active_record/migration.rb#617 def current_version; end - # source://activerecord//lib/active_record/migration.rb#618 + # source://activerecord//lib/active_record/migration.rb#672 def delegate; end - # source://activerecord//lib/active_record/migration.rb#618 + # source://activerecord//lib/active_record/migration.rb#672 def delegate=(_arg0); end - # source://activerecord//lib/active_record/migration.rb#619 + # source://activerecord//lib/active_record/migration.rb#673 def disable_ddl_transaction; end # Disable the transaction wrapping this migration. @@ -22790,67 +23836,92 @@ class ActiveRecord::Migration # # For more details read the {"Transactional Migrations" section above}[rdoc-ref:Migration]. # - # source://activerecord//lib/active_record/migration.rb#672 + # source://activerecord//lib/active_record/migration.rb#747 def disable_ddl_transaction!; end - # source://activerecord//lib/active_record/migration.rb#619 + # source://activerecord//lib/active_record/migration.rb#673 def disable_ddl_transaction=(_arg0); end - # source://activerecord//lib/active_record/migration.rb#556 + # source://activerecord//lib/active_record/migration.rb#601 def inherited(subclass); end - # source://activerecord//lib/active_record/migration.rb#630 + # source://activerecord//lib/active_record/migration.rb#714 def load_schema_if_pending!; end - # source://activerecord//lib/active_record/migration.rb#653 + # source://activerecord//lib/active_record/migration.rb#728 def maintain_test_schema!; end - # source://activerecord//lib/active_record/migration.rb#659 + # source://activerecord//lib/active_record/migration.rb#734 def method_missing(name, *args, **_arg2, &block); end - # source://activerecord//lib/active_record/migration.rb#664 + # source://activerecord//lib/active_record/migration.rb#739 def migrate(direction); end - # source://activerecord//lib/active_record/migration.rb#621 + # source://activerecord//lib/active_record/migration.rb#675 def nearest_delegate; end - # source://activerecord//lib/active_record/migration.rb#681 + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#623 + def valid_version_format?(version_string); end + + # source://activerecord//lib/active_record/migration.rb#793 def verbose; end - # source://activerecord//lib/active_record/migration.rb#681 + # source://activerecord//lib/active_record/migration.rb#793 def verbose=(val); end + + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#760 + def any_schema_needs_update?; end + + # source://activerecord//lib/active_record/migration.rb#766 + def db_configs_in_current_env; end + + # source://activerecord//lib/active_record/migration.rb#784 + def env; end + + # source://activerecord//lib/active_record/migration.rb#770 + def pending_migrations; end end end # This class is used to verify that all migrations have been run before # loading a web page if config.active_record.migration_error is set to +:page_load+. # -# source://activerecord//lib/active_record/migration.rb#580 +# source://activerecord//lib/active_record/migration.rb#632 class ActiveRecord::Migration::CheckPending # @return [CheckPending] a new instance of CheckPending # - # source://activerecord//lib/active_record/migration.rb#581 + # source://activerecord//lib/active_record/migration.rb#633 def initialize(app, file_watcher: T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration.rb#588 + # source://activerecord//lib/active_record/migration.rb#640 def call(env); end private - # source://activerecord//lib/active_record/migration.rb#607 + # source://activerecord//lib/active_record/migration.rb#659 def build_watcher(&block); end - # source://activerecord//lib/active_record/migration.rb#612 + # source://activerecord//lib/active_record/migration.rb#666 def connection; end end -# ActiveRecord::Migration::CommandRecorder records commands done during +# = \Migration Command Recorder +# +# +ActiveRecord::Migration::CommandRecorder+ records commands done during # a migration and knows how to reverse those commands. The CommandRecorder # knows how to invert the following commands: # # * add_column # * add_foreign_key # * add_check_constraint +# * add_exclusion_constraint +# * add_unique_constraint # * add_index # * add_reference # * add_timestamps @@ -22858,9 +23929,11 @@ end # * change_column_null # * change_column_comment (must supply a +:from+ and +:to+ option) # * change_table_comment (must supply a +:from+ and +:to+ option) +# * create_enum # * create_join_table # * create_table # * disable_extension +# * drop_enum (must supply a list of values) # * drop_join_table # * drop_table (must supply a block) # * enable_extension @@ -22868,110 +23941,127 @@ end # * remove_columns (must supply a +:type+ option) # * remove_foreign_key (must supply a second table) # * remove_check_constraint +# * remove_exclusion_constraint +# * remove_unique_constraint # * remove_index # * remove_reference # * remove_timestamps # * rename_column +# * rename_enum (must supply a +:to+ option) +# * rename_enum_value (must supply a +:from+ and +:to+ option) # * rename_index # * rename_table # -# source://activerecord//lib/active_record/migration/command_recorder.rb#35 +# source://activerecord//lib/active_record/migration/command_recorder.rb#45 class ActiveRecord::Migration::CommandRecorder include ::ActiveRecord::Migration::JoinTable include ::ActiveRecord::Migration::CommandRecorder::StraightReversions # @return [CommandRecorder] a new instance of CommandRecorder # - # source://activerecord//lib/active_record/migration/command_recorder.rb#50 + # source://activerecord//lib/active_record/migration/command_recorder.rb#63 def initialize(delegate = T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def add_belongs_to(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def add_check_constraint(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def add_column(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 + def add_enum_value(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 + def add_exclusion_constraint(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def add_foreign_key(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def add_index(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def add_reference(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def add_timestamps(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 + def add_unique_constraint(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def change_column(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def change_column_comment(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def change_column_default(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def change_column_null(*args, **_arg1, &block); end - # @yield [delegate.update_table_definition(table_name, self)] - # - # source://activerecord//lib/active_record/migration/command_recorder.rb#119 + # source://activerecord//lib/active_record/migration/command_recorder.rb#132 def change_table(table_name, **options); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def change_table_comment(*args, **_arg1, &block); end # Returns the value of attribute commands. # - # source://activerecord//lib/active_record/migration/command_recorder.rb#48 + # source://activerecord//lib/active_record/migration/command_recorder.rb#61 def commands; end # Sets the attribute commands # # @param value the value to set the attribute commands to. # - # source://activerecord//lib/active_record/migration/command_recorder.rb#48 + # source://activerecord//lib/active_record/migration/command_recorder.rb#61 def commands=(_arg0); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 + def create_enum(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def create_join_table(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def create_table(*args, **_arg1, &block); end # Returns the value of attribute delegate. # - # source://activerecord//lib/active_record/migration/command_recorder.rb#48 + # source://activerecord//lib/active_record/migration/command_recorder.rb#61 def delegate; end # Sets the attribute delegate # # @param value the value to set the attribute delegate to. # - # source://activerecord//lib/active_record/migration/command_recorder.rb#48 + # source://activerecord//lib/active_record/migration/command_recorder.rb#61 def delegate=(_arg0); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def disable_extension(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 + def drop_enum(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def drop_join_table(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def drop_table(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def enable_extension(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def execute(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def execute_block(*args, **_arg1, &block); end # Returns the inverse of the given command. For example: @@ -22989,13 +24079,13 @@ class ActiveRecord::Migration::CommandRecorder # # @raise [IrreversibleMigration] # - # source://activerecord//lib/active_record/migration/command_recorder.rb#97 + # source://activerecord//lib/active_record/migration/command_recorder.rb#110 def inverse_of(command, args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_add_belongs_to(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_remove_belongs_to(args, &block); end # Record +command+. +command+ should be a method name and arguments. @@ -23003,43 +24093,55 @@ class ActiveRecord::Migration::CommandRecorder # # recorder.record(:method_name, [:arg1, :arg2]) # - # source://activerecord//lib/active_record/migration/command_recorder.rb#77 + # source://activerecord//lib/active_record/migration/command_recorder.rb#90 def record(*command, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def remove_belongs_to(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def remove_check_constraint(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def remove_column(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def remove_columns(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 + def remove_exclusion_constraint(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def remove_foreign_key(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def remove_index(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def remove_reference(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def remove_timestamps(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 + def remove_unique_constraint(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def rename_column(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 + def rename_enum(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 + def rename_enum_value(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def rename_index(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def rename_table(*args, **_arg1, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#123 + # source://activerecord//lib/active_record/migration/command_recorder.rb#144 def replay(migration); end # While executing the given block, the recorded will be in reverting mode. @@ -23050,146 +24152,199 @@ class ActiveRecord::Migration::CommandRecorder # recorder.revert{ recorder.record(:rename_table, [:old, :new]) } # # same effect as recorder.record(:rename_table, [:new, :old]) # - # source://activerecord//lib/active_record/migration/command_recorder.rb#63 + # source://activerecord//lib/active_record/migration/command_recorder.rb#76 def revert; end # Returns the value of attribute reverting. # - # source://activerecord//lib/active_record/migration/command_recorder.rb#48 + # source://activerecord//lib/active_record/migration/command_recorder.rb#61 def reverting; end # Sets the attribute reverting # # @param value the value to set the attribute reverting to. # - # source://activerecord//lib/active_record/migration/command_recorder.rb#48 + # source://activerecord//lib/active_record/migration/command_recorder.rb#61 def reverting=(_arg0); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#110 + # source://activerecord//lib/active_record/migration/command_recorder.rb#123 def transaction(*args, **_arg1, &block); end private - # source://activerecord//lib/active_record/migration/command_recorder.rb#251 + # source://activerecord//lib/active_record/migration/command_recorder.rb#313 + def invert_add_check_constraint(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#274 + def invert_add_foreign_key(args); end + + # @raise [ActiveRecord::IrreversibleMigration] + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#335 + def invert_add_unique_constraint(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#293 def invert_change_column_comment(args); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#222 + # source://activerecord//lib/active_record/migration/command_recorder.rb#259 def invert_change_column_default(args); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#232 + # source://activerecord//lib/active_record/migration/command_recorder.rb#269 def invert_change_column_null(args); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#261 + # source://activerecord//lib/active_record/migration/command_recorder.rb#303 def invert_change_table_comment(args); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#167 + # source://activerecord//lib/active_record/migration/command_recorder.rb#191 + def invert_create_table(args, &block); end + + # @raise [ActiveRecord::IrreversibleMigration] + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#349 + def invert_drop_enum(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#198 def invert_drop_table(args, &block); end # @raise [ActiveRecord::IrreversibleMigration] # - # source://activerecord//lib/active_record/migration/command_recorder.rb#271 + # source://activerecord//lib/active_record/migration/command_recorder.rb#321 def invert_remove_check_constraint(args); end # @raise [ActiveRecord::IrreversibleMigration] # - # source://activerecord//lib/active_record/migration/command_recorder.rb#178 + # source://activerecord//lib/active_record/migration/command_recorder.rb#215 def invert_remove_column(args); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#183 + # source://activerecord//lib/active_record/migration/command_recorder.rb#220 def invert_remove_columns(args); end # @raise [ActiveRecord::IrreversibleMigration] # - # source://activerecord//lib/active_record/migration/command_recorder.rb#237 + # source://activerecord//lib/active_record/migration/command_recorder.rb#330 + def invert_remove_exclusion_constraint(args); end + + # @raise [ActiveRecord::IrreversibleMigration] + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#279 def invert_remove_foreign_key(args); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#201 + # source://activerecord//lib/active_record/migration/command_recorder.rb#238 def invert_remove_index(args); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#196 + # @raise [ActiveRecord::IrreversibleMigration] + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#342 + def invert_remove_unique_constraint(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#233 def invert_rename_column(args); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#191 + # source://activerecord//lib/active_record/migration/command_recorder.rb#355 + def invert_rename_enum(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#365 + def invert_rename_enum_value(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#228 def invert_rename_index(args); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#174 + # source://activerecord//lib/active_record/migration/command_recorder.rb#208 def invert_rename_table(args); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#156 + # source://activerecord//lib/active_record/migration/command_recorder.rb#180 def invert_transaction(args, &block); end # Forwards any missing method call to the \target. # - # source://activerecord//lib/active_record/migration/command_recorder.rb#281 + # source://activerecord//lib/active_record/migration/command_recorder.rb#380 def method_missing(method, *args, **_arg2, &block); end # @return [Boolean] # - # source://activerecord//lib/active_record/migration/command_recorder.rb#276 + # source://activerecord//lib/active_record/migration/command_recorder.rb#375 def respond_to_missing?(method, _); end end -# source://activerecord//lib/active_record/migration/command_recorder.rb#36 +# source://activerecord//lib/active_record/migration/command_recorder.rb#46 ActiveRecord::Migration::CommandRecorder::ReversibleAndIrreversibleMethods = T.let(T.unsafe(nil), Array) -# source://activerecord//lib/active_record/migration/command_recorder.rb#130 +# source://activerecord//lib/active_record/migration/command_recorder.rb#151 module ActiveRecord::Migration::CommandRecorder::StraightReversions - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_add_check_constraint(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_add_column(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 + def invert_add_exclusion_constraint(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_add_foreign_key(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_add_index(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_add_reference(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_add_timestamps(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 + def invert_add_unique_constraint(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 + def invert_create_enum(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_create_join_table(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_create_table(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_disable_extension(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 + def invert_drop_enum(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_drop_join_table(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_drop_table(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_enable_extension(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_execute_block(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_remove_check_constraint(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_remove_column(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 + def invert_remove_exclusion_constraint(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_remove_foreign_key(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_remove_index(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_remove_reference(args, &block); end - # source://activerecord//lib/active_record/migration/command_recorder.rb#146 + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 def invert_remove_timestamps(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#170 + def invert_remove_unique_constraint(args, &block); end end # source://activerecord//lib/active_record/migration/compatibility.rb#5 @@ -23200,212 +24355,292 @@ module ActiveRecord::Migration::Compatibility end end -# source://activerecord//lib/active_record/migration/compatibility.rb#317 +# source://activerecord//lib/active_record/migration/compatibility.rb#405 class ActiveRecord::Migration::Compatibility::V4_2 < ::ActiveRecord::Migration::Compatibility::V5_0 - # source://activerecord//lib/active_record/migration/compatibility.rb#331 + # source://activerecord//lib/active_record/migration/compatibility.rb#423 def add_belongs_to(table_name, ref_name, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#331 + # source://activerecord//lib/active_record/migration/compatibility.rb#423 def add_reference(table_name, ref_name, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#337 + # source://activerecord//lib/active_record/migration/compatibility.rb#429 def add_timestamps(table_name, **options); end # @return [Boolean] # - # source://activerecord//lib/active_record/migration/compatibility.rb#342 + # source://activerecord//lib/active_record/migration/compatibility.rb#434 def index_exists?(table_name, column_name, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#353 + # source://activerecord//lib/active_record/migration/compatibility.rb#445 def remove_index(table_name, column_name = T.unsafe(nil), **options); end private - # source://activerecord//lib/active_record/migration/compatibility.rb#359 + # source://activerecord//lib/active_record/migration/compatibility.rb#451 def compatible_table_definition(t); end - # source://activerecord//lib/active_record/migration/compatibility.rb#366 + # source://activerecord//lib/active_record/migration/compatibility.rb#458 def index_name_for_remove(table_name, column_name, options); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#318 +# source://activerecord//lib/active_record/migration/compatibility.rb#406 module ActiveRecord::Migration::Compatibility::V4_2::TableDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#319 + # source://activerecord//lib/active_record/migration/compatibility.rb#407 def belongs_to(*_arg0, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#319 + # source://activerecord//lib/active_record/migration/compatibility.rb#407 def references(*_arg0, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#325 + # source://activerecord//lib/active_record/migration/compatibility.rb#413 def timestamps(**options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#419 + def raise_on_if_exist_options(options); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#252 +# source://activerecord//lib/active_record/migration/compatibility.rb#336 class ActiveRecord::Migration::Compatibility::V5_0 < ::ActiveRecord::Migration::Compatibility::V5_1 - # source://activerecord//lib/active_record/migration/compatibility.rb#303 + # source://activerecord//lib/active_record/migration/compatibility.rb#391 def add_belongs_to(table_name, ref_name, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#293 + # source://activerecord//lib/active_record/migration/compatibility.rb#381 def add_column(table_name, column_name, type, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#303 + # source://activerecord//lib/active_record/migration/compatibility.rb#391 def add_reference(table_name, ref_name, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#288 + # source://activerecord//lib/active_record/migration/compatibility.rb#376 def create_join_table(table_1, table_2, column_options: T.unsafe(nil), **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#265 + # source://activerecord//lib/active_record/migration/compatibility.rb#353 def create_table(table_name, **options); end private - # source://activerecord//lib/active_record/migration/compatibility.rb#309 + # source://activerecord//lib/active_record/migration/compatibility.rb#397 def compatible_table_definition(t); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#253 +# source://activerecord//lib/active_record/migration/compatibility.rb#337 module ActiveRecord::Migration::Compatibility::V5_0::TableDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#259 + # source://activerecord//lib/active_record/migration/compatibility.rb#343 def belongs_to(*args, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#254 + # source://activerecord//lib/active_record/migration/compatibility.rb#338 def primary_key(name, type = T.unsafe(nil), **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#259 + # source://activerecord//lib/active_record/migration/compatibility.rb#343 def references(*args, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#349 + def raise_on_if_exist_options(options); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#231 +# source://activerecord//lib/active_record/migration/compatibility.rb#315 class ActiveRecord::Migration::Compatibility::V5_1 < ::ActiveRecord::Migration::Compatibility::V5_2 - # source://activerecord//lib/active_record/migration/compatibility.rb#232 + # source://activerecord//lib/active_record/migration/compatibility.rb#316 def change_column(table_name, column_name, type, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#243 + # source://activerecord//lib/active_record/migration/compatibility.rb#327 def create_table(table_name, **options); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#151 +# source://activerecord//lib/active_record/migration/compatibility.rb#259 class ActiveRecord::Migration::Compatibility::V5_2 < ::ActiveRecord::Migration::Compatibility::V6_0 - # source://activerecord//lib/active_record/migration/compatibility.rb#209 + # source://activerecord//lib/active_record/migration/compatibility.rb#293 def add_timestamps(table_name, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#193 - def change_table(table_name, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#201 - def create_join_table(table_1, table_2, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#185 - def create_table(table_name, **options); end - private - # source://activerecord//lib/active_record/migration/compatibility.rb#222 + # source://activerecord//lib/active_record/migration/compatibility.rb#306 def command_recorder; end - # source://activerecord//lib/active_record/migration/compatibility.rb#215 + # source://activerecord//lib/active_record/migration/compatibility.rb#299 def compatible_table_definition(t); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#171 +# source://activerecord//lib/active_record/migration/compatibility.rb#279 module ActiveRecord::Migration::Compatibility::V5_2::CommandRecorder - # source://activerecord//lib/active_record/migration/compatibility.rb#176 + # source://activerecord//lib/active_record/migration/compatibility.rb#284 def invert_change_column_comment(args); end - # source://activerecord//lib/active_record/migration/compatibility.rb#180 + # source://activerecord//lib/active_record/migration/compatibility.rb#288 def invert_change_table_comment(args); end - # source://activerecord//lib/active_record/migration/compatibility.rb#172 + # source://activerecord//lib/active_record/migration/compatibility.rb#280 def invert_transaction(args, &block); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#152 +# source://activerecord//lib/active_record/migration/compatibility.rb#260 module ActiveRecord::Migration::Compatibility::V5_2::TableDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#158 + # source://activerecord//lib/active_record/migration/compatibility.rb#266 def column(name, type, index: T.unsafe(nil), **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#153 + # source://activerecord//lib/active_record/migration/compatibility.rb#261 def timestamps(**options); end private - # source://activerecord//lib/active_record/migration/compatibility.rb#167 + # source://activerecord//lib/active_record/migration/compatibility.rb#275 def raise_on_duplicate_column(name); end - # source://activerecord//lib/active_record/migration/compatibility.rb#164 + # source://activerecord//lib/active_record/migration/compatibility.rb#272 def raise_on_if_exist_options(options); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#88 +# source://activerecord//lib/active_record/migration/compatibility.rb#216 class ActiveRecord::Migration::Compatibility::V6_0 < ::ActiveRecord::Migration::Compatibility::V6_1 - # source://activerecord//lib/active_record/migration/compatibility.rb#132 + # source://activerecord//lib/active_record/migration/compatibility.rb#240 def add_belongs_to(table_name, ref_name, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#132 + # source://activerecord//lib/active_record/migration/compatibility.rb#240 def add_reference(table_name, ref_name, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#116 - def change_table(table_name, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#124 - def create_join_table(table_1, table_2, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#108 - def create_table(table_name, **options); end - private - # source://activerecord//lib/active_record/migration/compatibility.rb#143 + # source://activerecord//lib/active_record/migration/compatibility.rb#251 def compatible_table_definition(t); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#89 +# source://activerecord//lib/active_record/migration/compatibility.rb#217 class ActiveRecord::Migration::Compatibility::V6_0::ReferenceDefinition < ::ActiveRecord::ConnectionAdapters::ReferenceDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#90 + # source://activerecord//lib/active_record/migration/compatibility.rb#218 def index_options(table_name); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#95 +# source://activerecord//lib/active_record/migration/compatibility.rb#223 module ActiveRecord::Migration::Compatibility::V6_0::TableDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#96 + # source://activerecord//lib/active_record/migration/compatibility.rb#224 def belongs_to(*args, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#102 + # source://activerecord//lib/active_record/migration/compatibility.rb#230 def column(name, type, index: T.unsafe(nil), **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#96 + # source://activerecord//lib/active_record/migration/compatibility.rb#224 def references(*args, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#236 + def raise_on_if_exist_options(options); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#35 -class ActiveRecord::Migration::Compatibility::V6_1 < ::ActiveRecord::Migration::Current - # source://activerecord//lib/active_record/migration/compatibility.rb#50 +# source://activerecord//lib/active_record/migration/compatibility.rb#153 +class ActiveRecord::Migration::Compatibility::V6_1 < ::ActiveRecord::Migration::Compatibility::V7_0 + # source://activerecord//lib/active_record/migration/compatibility.rb#168 def add_column(table_name, column_name, type, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#59 - def create_table(table_name, **options); end + # source://activerecord//lib/active_record/migration/compatibility.rb#177 + def change_column(table_name, column_name, type, **options); end private - # source://activerecord//lib/active_record/migration/compatibility.rb#80 + # source://activerecord//lib/active_record/migration/compatibility.rb#208 def compatible_table_definition(t); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#36 +# source://activerecord//lib/active_record/migration/compatibility.rb#154 class ActiveRecord::Migration::Compatibility::V6_1::PostgreSQLCompat class << self - # source://activerecord//lib/active_record/migration/compatibility.rb#37 + # source://activerecord//lib/active_record/migration/compatibility.rb#155 def compatible_timestamp_type(type, connection); end end end -# source://activerecord//lib/active_record/migration/compatibility.rb#67 +# source://activerecord//lib/active_record/migration/compatibility.rb#186 module ActiveRecord::Migration::Compatibility::V6_1::TableDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#73 + # source://activerecord//lib/active_record/migration/compatibility.rb#192 + def change(name, type, index: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#197 def column(name, type, index: T.unsafe(nil), **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#68 + # source://activerecord//lib/active_record/migration/compatibility.rb#187 def new_column_definition(name, type, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#203 + def raise_on_if_exist_options(options); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#35 +class ActiveRecord::Migration::Compatibility::V7_0 < ::ActiveRecord::Migration::Current + include ::ActiveRecord::Migration::Compatibility::V7_0::LegacyIndexName + + # source://activerecord//lib/active_record/migration/compatibility.rb#100 + def add_belongs_to(table_name, ref_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#90 + def add_column(table_name, column_name, type, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#137 + def add_foreign_key(from_table, to_table, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#95 + def add_index(table_name, column_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#100 + def add_reference(table_name, ref_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#118 + def change_column(table_name, column_name, type, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#126 + def change_column_null(table_name, column_name, null, default = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#106 + def create_table(table_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#130 + def disable_extension(name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#113 + def rename_table(table_name, new_name, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#145 + def compatible_table_definition(t); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#36 +module ActiveRecord::Migration::Compatibility::V7_0::LegacyIndexName + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration/compatibility.rb#60 + def expression_column_name?(column_name); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#52 + def index_name_options(column_names); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#38 + def legacy_index_name(table_name, options); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#65 +module ActiveRecord::Migration::Compatibility::V7_0::TableDefinition + include ::ActiveRecord::Migration::Compatibility::V7_0::LegacyIndexName + + # source://activerecord//lib/active_record/migration/compatibility.rb#73 + def change(name, type, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#68 + def column(name, type, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#78 + def index(column_name, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#84 + def raise_on_if_exist_options(options); end end # This file exists to ensure that old migrations run the same way they did before a Rails upgrade. @@ -23416,8 +24651,8 @@ end # New migration functionality that will never be backward compatible should be added directly to `ActiveRecord::Migration`. # # There are classes for each prior Rails version. Each class descends from the *next* Rails version, so: -# 6.1 < 7.0 -# 5.2 < 6.0 < 6.1 < 7.0 +# 7.0 < 7.1 +# 5.2 < 6.0 < 6.1 < 7.0 < 7.1 # # If you are introducing new migration functionality that should only apply from Rails 7 onward, then you should # find the class that immediately precedes it (6.1), and override the relevant migration methods to undo your changes. @@ -23427,12 +24662,67 @@ end # for migrations written for 5.2, but will for migrations written for 6.0. # # source://activerecord//lib/active_record/migration/compatibility.rb#33 -ActiveRecord::Migration::Compatibility::V7_0 = ActiveRecord::Migration::Current +ActiveRecord::Migration::Compatibility::V7_1 = ActiveRecord::Migration::Current # This must be defined before the inherited hook, below # -# source://activerecord//lib/active_record/migration.rb#553 -class ActiveRecord::Migration::Current < ::ActiveRecord::Migration; end +# source://activerecord//lib/active_record/migration.rb#563 +class ActiveRecord::Migration::Current < ::ActiveRecord::Migration + # source://activerecord//lib/active_record/migration.rb#572 + def change_table(table_name, **options); end + + # source://activerecord//lib/active_record/migration.rb#596 + def compatible_table_definition(t); end + + # source://activerecord//lib/active_record/migration.rb#580 + def create_join_table(table_1, table_2, **options); end + + # source://activerecord//lib/active_record/migration.rb#564 + def create_table(table_name, **options); end + + # source://activerecord//lib/active_record/migration.rb#588 + def drop_table(table_name, **options); end +end + +# The default strategy for executing migrations. Delegates method calls +# to the connection adapter. +# +# source://activerecord//lib/active_record/migration/default_strategy.rb#7 +class ActiveRecord::Migration::DefaultStrategy < ::ActiveRecord::Migration::ExecutionStrategy + private + + # source://activerecord//lib/active_record/migration/default_strategy.rb#18 + def connection; end + + # source://activerecord//lib/active_record/migration/default_strategy.rb#9 + def method_missing(method, *arguments, **_arg2, &block); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration/default_strategy.rb#14 + def respond_to_missing?(method, *_arg1); end +end + +# ExecutionStrategy is used by the migration to respond to any method calls +# that the migration class does not implement directly. This is the base strategy. +# All strategies should inherit from this class. +# +# The ExecutionStrategy receives the current +migration+ when initialized. +# +# source://activerecord//lib/active_record/migration/execution_strategy.rb#10 +class ActiveRecord::Migration::ExecutionStrategy + # @return [ExecutionStrategy] a new instance of ExecutionStrategy + # + # source://activerecord//lib/active_record/migration/execution_strategy.rb#11 + def initialize(migration); end + + private + + # Returns the value of attribute migration. + # + # source://activerecord//lib/active_record/migration/execution_strategy.rb#16 + def migration; end +end # source://activerecord//lib/active_record/migration/join_table.rb#5 module ActiveRecord::Migration::JoinTable @@ -23445,12 +24735,12 @@ module ActiveRecord::Migration::JoinTable def join_table_name(table_1, table_2); end end -# source://activerecord//lib/active_record/migration.rb#576 +# source://activerecord//lib/active_record/migration.rb#621 ActiveRecord::Migration::MigrationFilenameRegexp = T.let(T.unsafe(nil), Regexp) -# source://activerecord//lib/active_record/migration.rb#752 +# source://activerecord//lib/active_record/migration.rb#868 class ActiveRecord::Migration::ReversibleBlockHelper < ::Struct - # source://activerecord//lib/active_record/migration.rb#757 + # source://activerecord//lib/active_record/migration.rb#873 def down; end # Returns the value of attribute reverting @@ -23464,7 +24754,7 @@ class ActiveRecord::Migration::ReversibleBlockHelper < ::Struct # @return [Object] the newly set value def reverting=(_); end - # source://activerecord//lib/active_record/migration.rb#753 + # source://activerecord//lib/active_record/migration.rb#869 def up; end class << self @@ -23476,39 +24766,46 @@ class ActiveRecord::Migration::ReversibleBlockHelper < ::Struct end end +# = \Migration \Context +# # MigrationContext sets the context in which a migration is run. # # A migration context requires the path to the migrations is set # in the +migrations_paths+ parameter. Optionally a +schema_migration+ -# class can be provided. For most applications, +SchemaMigration+ is -# sufficient. Multiple database applications need a +SchemaMigration+ -# per primary database. +# class can be provided. Multiple database applications will instantiate +# a +SchemaMigration+ object per database. From the Rake tasks, \Rails will +# handle this for you. # -# source://activerecord//lib/active_record/migration.rb#1068 +# source://activerecord//lib/active_record/migration.rb#1202 class ActiveRecord::MigrationContext # @return [MigrationContext] a new instance of MigrationContext # - # source://activerecord//lib/active_record/migration.rb#1071 - def initialize(migrations_paths, schema_migration = T.unsafe(nil)); end + # source://activerecord//lib/active_record/migration.rb#1205 + def initialize(migrations_paths, schema_migration = T.unsafe(nil), internal_metadata = T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration.rb#1190 + # source://activerecord//lib/active_record/migration.rb#1347 def current_environment; end - # source://activerecord//lib/active_record/migration.rb#1146 + # source://activerecord//lib/active_record/migration.rb#1303 def current_version; end - # source://activerecord//lib/active_record/migration.rb#1120 + # source://activerecord//lib/active_record/migration.rb#1277 def down(target_version = T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/migration.rb#1106 + # source://activerecord//lib/active_record/migration.rb#1263 def forward(steps = T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration.rb#1138 + # source://activerecord//lib/active_record/migration.rb#1295 def get_all_versions; end + # Returns the value of attribute internal_metadata. + # + # source://activerecord//lib/active_record/migration.rb#1203 + def internal_metadata; end + # @raise [NoEnvironmentInSchemaError] # - # source://activerecord//lib/active_record/migration.rb#1198 + # source://activerecord//lib/active_record/migration.rb#1355 def last_stored_environment; end # Runs the migrations in the +migrations_path+. @@ -23525,87 +24822,90 @@ class ActiveRecord::MigrationContext # If none of the conditions are met, +up+ will be run with # the +target_version+. # - # source://activerecord//lib/active_record/migration.rb#1089 + # source://activerecord//lib/active_record/migration.rb#1246 def migrate(target_version = T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/migration.rb#1159 + # source://activerecord//lib/active_record/migration.rb#1316 def migrations; end # Returns the value of attribute migrations_paths. # - # source://activerecord//lib/active_record/migration.rb#1069 + # source://activerecord//lib/active_record/migration.rb#1203 def migrations_paths; end - # source://activerecord//lib/active_record/migration.rb#1172 + # source://activerecord//lib/active_record/migration.rb#1329 def migrations_status; end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#1151 + # source://activerecord//lib/active_record/migration.rb#1308 def needs_migration?; end - # source://activerecord//lib/active_record/migration.rb#1134 + # source://activerecord//lib/active_record/migration.rb#1291 def open; end - # source://activerecord//lib/active_record/migration.rb#1155 + # source://activerecord//lib/active_record/migration.rb#1312 def pending_migration_versions; end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#1194 + # source://activerecord//lib/active_record/migration.rb#1351 def protected_environment?; end - # source://activerecord//lib/active_record/migration.rb#1102 + # source://activerecord//lib/active_record/migration.rb#1259 def rollback(steps = T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration.rb#1130 + # source://activerecord//lib/active_record/migration.rb#1287 def run(direction, target_version); end # Returns the value of attribute schema_migration. # - # source://activerecord//lib/active_record/migration.rb#1069 + # source://activerecord//lib/active_record/migration.rb#1203 def schema_migration; end - # source://activerecord//lib/active_record/migration.rb#1110 + # source://activerecord//lib/active_record/migration.rb#1267 def up(target_version = T.unsafe(nil), &block); end private - # source://activerecord//lib/active_record/migration.rb#1209 + # source://activerecord//lib/active_record/migration.rb#1366 + def connection; end + + # source://activerecord//lib/active_record/migration.rb#1370 def migration_files; end - # source://activerecord//lib/active_record/migration.rb#1218 + # source://activerecord//lib/active_record/migration.rb#1379 def move(direction, steps); end - # source://activerecord//lib/active_record/migration.rb#1214 + # source://activerecord//lib/active_record/migration.rb#1375 def parse_migration_filename(filename); end end -# source://activerecord//lib/active_record/migration.rb#12 +# source://activerecord//lib/active_record/migration.rb#13 class ActiveRecord::MigrationError < ::ActiveRecord::ActiveRecordError # @return [MigrationError] a new instance of MigrationError # - # source://activerecord//lib/active_record/migration.rb#13 + # source://activerecord//lib/active_record/migration.rb#14 def initialize(message = T.unsafe(nil)); end end # MigrationProxy is used to defer loading of the actual migration classes # until they are needed # -# source://activerecord//lib/active_record/migration.rb#1036 +# source://activerecord//lib/active_record/migration.rb#1168 class ActiveRecord::MigrationProxy < ::Struct # @return [MigrationProxy] a new instance of MigrationProxy # - # source://activerecord//lib/active_record/migration.rb#1037 + # source://activerecord//lib/active_record/migration.rb#1169 def initialize(name, version, filename, scope); end - # source://activerecord//lib/active_record/migration.rb#1046 + # source://activerecord//lib/active_record/migration.rb#1178 def announce(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/migration.rb#1042 + # source://activerecord//lib/active_record/migration.rb#1174 def basename; end - # source://activerecord//lib/active_record/migration.rb#1046 + # source://activerecord//lib/active_record/migration.rb#1178 def disable_ddl_transaction(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute filename @@ -23619,7 +24919,7 @@ class ActiveRecord::MigrationProxy < ::Struct # @return [Object] the newly set value def filename=(_); end - # source://activerecord//lib/active_record/migration.rb#1046 + # source://activerecord//lib/active_record/migration.rb#1178 def migrate(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute name @@ -23655,15 +24955,15 @@ class ActiveRecord::MigrationProxy < ::Struct # @return [Object] the newly set value def version=(_); end - # source://activerecord//lib/active_record/migration.rb#1046 + # source://activerecord//lib/active_record/migration.rb#1178 def write(*_arg0, **_arg1, &_arg2); end private - # source://activerecord//lib/active_record/migration.rb#1053 + # source://activerecord//lib/active_record/migration.rb#1185 def load_migration; end - # source://activerecord//lib/active_record/migration.rb#1049 + # source://activerecord//lib/active_record/migration.rb#1181 def migration; end class << self @@ -23675,159 +24975,162 @@ class ActiveRecord::MigrationProxy < ::Struct end end -# source://activerecord//lib/active_record/migration.rb#1238 +# source://activerecord//lib/active_record/migration.rb#1399 class ActiveRecord::Migrator # @return [Migrator] a new instance of Migrator # - # source://activerecord//lib/active_record/migration.rb#1250 - def initialize(direction, migrations, schema_migration, target_version = T.unsafe(nil)); end + # source://activerecord//lib/active_record/migration.rb#1415 + def initialize(direction, migrations, schema_migration, internal_metadata, target_version = T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration.rb#1267 + # source://activerecord//lib/active_record/migration.rb#1433 def current; end - # source://activerecord//lib/active_record/migration.rb#1267 + # source://activerecord//lib/active_record/migration.rb#1433 def current_migration; end - # source://activerecord//lib/active_record/migration.rb#1263 + # source://activerecord//lib/active_record/migration.rb#1429 def current_version; end - # source://activerecord//lib/active_record/migration.rb#1312 + # source://activerecord//lib/active_record/migration.rb#1478 def load_migrated; end - # source://activerecord//lib/active_record/migration.rb#1280 + # source://activerecord//lib/active_record/migration.rb#1446 def migrate; end - # source://activerecord//lib/active_record/migration.rb#1308 + # source://activerecord//lib/active_record/migration.rb#1474 def migrated; end - # source://activerecord//lib/active_record/migration.rb#1299 + # source://activerecord//lib/active_record/migration.rb#1465 def migrations; end - # source://activerecord//lib/active_record/migration.rb#1303 + # source://activerecord//lib/active_record/migration.rb#1469 def pending_migrations; end - # source://activerecord//lib/active_record/migration.rb#1272 + # source://activerecord//lib/active_record/migration.rb#1438 def run; end - # source://activerecord//lib/active_record/migration.rb#1288 + # source://activerecord//lib/active_record/migration.rb#1454 def runnable; end private + # source://activerecord//lib/active_record/migration.rb#1483 + def connection; end + # Wrap the migration in a transaction only if supported by the adapter. # - # source://activerecord//lib/active_record/migration.rb#1409 + # source://activerecord//lib/active_record/migration.rb#1578 def ddl_transaction(migration, &block); end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#1404 + # source://activerecord//lib/active_record/migration.rb#1573 def down?; end - # source://activerecord//lib/active_record/migration.rb#1353 + # source://activerecord//lib/active_record/migration.rb#1522 def execute_migration_in_transaction(migration); end - # source://activerecord//lib/active_record/migration.rb#1374 + # source://activerecord//lib/active_record/migration.rb#1543 def finish; end - # source://activerecord//lib/active_record/migration.rb#1453 + # source://activerecord//lib/active_record/migration.rb#1610 def generate_migrator_advisory_lock_id; end # Return true if a valid version is not provided. # # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#1349 + # source://activerecord//lib/active_record/migration.rb#1518 def invalid_target?; end # Used for running multiple migrations up to or down to a certain value. # - # source://activerecord//lib/active_record/migration.rb#1328 + # source://activerecord//lib/active_record/migration.rb#1497 def migrate_without_lock; end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#1344 + # source://activerecord//lib/active_record/migration.rb#1513 def ran?(migration); end # Stores the current environment in the database. # - # source://activerecord//lib/active_record/migration.rb#1339 + # source://activerecord//lib/active_record/migration.rb#1507 def record_environment; end - # source://activerecord//lib/active_record/migration.rb#1390 + # source://activerecord//lib/active_record/migration.rb#1559 def record_version_state_after_migrating(version); end # Used for running a specific migration. # # @raise [UnknownMigrationVersionError] # - # source://activerecord//lib/active_record/migration.rb#1318 + # source://activerecord//lib/active_record/migration.rb#1488 def run_without_lock; end - # source://activerecord//lib/active_record/migration.rb#1378 + # source://activerecord//lib/active_record/migration.rb#1547 def start; end - # source://activerecord//lib/active_record/migration.rb#1370 + # source://activerecord//lib/active_record/migration.rb#1539 def target; end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#1400 + # source://activerecord//lib/active_record/migration.rb#1569 def up?; end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#1421 + # source://activerecord//lib/active_record/migration.rb#1590 def use_advisory_lock?; end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#1417 + # source://activerecord//lib/active_record/migration.rb#1586 def use_transaction?(migration); end # @raise [DuplicateMigrationNameError] # - # source://activerecord//lib/active_record/migration.rb#1382 + # source://activerecord//lib/active_record/migration.rb#1551 def validate(migrations); end - # source://activerecord//lib/active_record/migration.rb#1425 + # source://activerecord//lib/active_record/migration.rb#1594 def with_advisory_lock; end - # source://activerecord//lib/active_record/migration.rb#1442 - def with_advisory_lock_connection(&block); end - class << self # For cases where a table doesn't exist like loading from schema cache # - # source://activerecord//lib/active_record/migration.rb#1243 + # source://activerecord//lib/active_record/migration.rb#1404 def current_version; end # Returns the value of attribute migrations_paths. # - # source://activerecord//lib/active_record/migration.rb#1240 + # source://activerecord//lib/active_record/migration.rb#1401 def migrations_paths; end # Sets the attribute migrations_paths # # @param value the value to set the attribute migrations_paths to. # - # source://activerecord//lib/active_record/migration.rb#1240 + # source://activerecord//lib/active_record/migration.rb#1401 def migrations_paths=(_arg0); end end end -# source://activerecord//lib/active_record/migration.rb#1452 +# source://activerecord//lib/active_record/migration.rb#1609 ActiveRecord::Migrator::MIGRATOR_SALT = T.let(T.unsafe(nil), Integer) # Raised when a foreign key constraint cannot be added because the column type does not match the referenced column type. # -# source://activerecord//lib/active_record/errors.rb#183 +# source://activerecord//lib/active_record/errors.rb#217 class ActiveRecord::MismatchedForeignKey < ::ActiveRecord::StatementInvalid # @return [MismatchedForeignKey] a new instance of MismatchedForeignKey # - # source://activerecord//lib/active_record/errors.rb#184 - def initialize(message: T.unsafe(nil), sql: T.unsafe(nil), binds: T.unsafe(nil), table: T.unsafe(nil), foreign_key: T.unsafe(nil), target_table: T.unsafe(nil), primary_key: T.unsafe(nil), primary_key_column: T.unsafe(nil)); end + # source://activerecord//lib/active_record/errors.rb#218 + def initialize(message: T.unsafe(nil), sql: T.unsafe(nil), binds: T.unsafe(nil), table: T.unsafe(nil), foreign_key: T.unsafe(nil), target_table: T.unsafe(nil), primary_key: T.unsafe(nil), primary_key_column: T.unsafe(nil), query_parser: T.unsafe(nil), connection_pool: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/errors.rb#254 + def set_query(sql, binds); end end # source://activerecord//lib/active_record/model_schema.rb#6 @@ -23846,8 +25149,9 @@ module ActiveRecord::ModelSchema # artists, records => artists_records # records, artists => artists_records # music_artists, music_records => music_artists_records + # music.artists, music.records => music.artists_records # - # source://activerecord//lib/active_record/model_schema.rb#183 + # source://activerecord//lib/active_record/model_schema.rb#191 def derive_join_table_name(first_table, second_table); end end @@ -23893,25 +25197,28 @@ module ActiveRecord::ModelSchema end end -# source://activerecord//lib/active_record/model_schema.rb#187 +# source://activerecord//lib/active_record/model_schema.rb#195 module ActiveRecord::ModelSchema::ClassMethods - # source://activerecord//lib/active_record/model_schema.rb#486 + # source://activerecord//lib/active_record/model_schema.rb#498 def _default_attributes; end - # source://activerecord//lib/active_record/model_schema.rb#428 + # source://activerecord//lib/active_record/model_schema.rb#434 + def _returning_columns_for_insert; end + + # source://activerecord//lib/active_record/model_schema.rb#440 def attribute_types; end - # source://activerecord//lib/active_record/model_schema.rb#410 + # source://activerecord//lib/active_record/model_schema.rb#416 def attributes_builder; end # Returns a hash where the keys are column names and the values are # default values when instantiating the Active Record object for this table. # - # source://activerecord//lib/active_record/model_schema.rb#481 + # source://activerecord//lib/active_record/model_schema.rb#493 def column_defaults; end # Returns the column object for the named attribute. - # Returns an +ActiveRecord::ConnectionAdapters::NullColumn+ if the + # Returns an ActiveRecord::ConnectionAdapters::NullColumn if the # named attribute does not exist. # # class Person < ActiveRecord::Base @@ -23924,36 +25231,36 @@ module ActiveRecord::ModelSchema::ClassMethods # person.column_for_attribute(:nothing) # # => #, ...> # - # source://activerecord//lib/active_record/model_schema.rb#472 + # source://activerecord//lib/active_record/model_schema.rb#484 def column_for_attribute(name); end # Returns an array of column names as strings. # - # source://activerecord//lib/active_record/model_schema.rb#492 + # source://activerecord//lib/active_record/model_schema.rb#504 def column_names; end - # source://activerecord//lib/active_record/model_schema.rb#423 + # source://activerecord//lib/active_record/model_schema.rb#429 def columns; end - # source://activerecord//lib/active_record/model_schema.rb#418 + # source://activerecord//lib/active_record/model_schema.rb#424 def columns_hash; end # Returns an array of column objects where the primary id, all columns ending in "_id" or "_count", # and columns used for single table inheritance have been removed. # - # source://activerecord//lib/active_record/model_schema.rb#503 + # source://activerecord//lib/active_record/model_schema.rb#515 def content_columns; end - # source://activerecord//lib/active_record/model_schema.rb#288 + # source://activerecord//lib/active_record/model_schema.rb#298 def full_table_name_prefix; end - # source://activerecord//lib/active_record/model_schema.rb#292 + # source://activerecord//lib/active_record/model_schema.rb#302 def full_table_name_suffix; end # The list of columns names the model should ignore. Ignored columns won't have attribute # accessors defined, and won't be referenced in SQL queries. # - # source://activerecord//lib/active_record/model_schema.rb#317 + # source://activerecord//lib/active_record/model_schema.rb#327 def ignored_columns; end # Sets the columns names the model should ignore. Ignored columns won't have attribute @@ -23974,7 +25281,7 @@ module ActiveRecord::ModelSchema::ClassMethods # # name :string, limit: 255 # # category :string, limit: 255 # - # self.ignored_columns = [:category] + # self.ignored_columns += [:category] # end # # The schema still contains "category", but now the model omits it, so any meta-driven code or @@ -23988,13 +25295,16 @@ module ActiveRecord::ModelSchema::ClassMethods # user = Project.create!(name: "First Project") # user.category # => raises NoMethodError # - # source://activerecord//lib/active_record/model_schema.rb#356 + # source://activerecord//lib/active_record/model_schema.rb#362 def ignored_columns=(columns); end + # source://activerecord//lib/active_record/model_schema.rb#558 + def load_schema; end + # Returns the next value that will be used as the primary key on # an insert statement. # - # source://activerecord//lib/active_record/model_schema.rb#401 + # source://activerecord//lib/active_record/model_schema.rb#407 def next_sequence_value; end # Determines if the primary key values should be selected from their @@ -24002,26 +25312,26 @@ module ActiveRecord::ModelSchema::ClassMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/model_schema.rb#395 + # source://activerecord//lib/active_record/model_schema.rb#401 def prefetch_primary_key?; end # The array of names of environments where destructive actions should be prohibited. By default, # the value is ["production"]. # - # source://activerecord//lib/active_record/model_schema.rb#298 + # source://activerecord//lib/active_record/model_schema.rb#308 def protected_environments; end # Sets an array of names of environments where destructive actions should be prohibited. # - # source://activerecord//lib/active_record/model_schema.rb#307 + # source://activerecord//lib/active_record/model_schema.rb#317 def protected_environments=(environments); end # Returns a quoted version of the table name, used to construct SQL statements. # - # source://activerecord//lib/active_record/model_schema.rb#273 + # source://activerecord//lib/active_record/model_schema.rb#281 def quoted_table_name; end - # source://activerecord//lib/active_record/model_schema.rb#311 + # source://activerecord//lib/active_record/model_schema.rb#321 def real_inheritance_column=(value); end # Resets all the cached information about columns, which will cause them @@ -24031,7 +25341,7 @@ module ActiveRecord::ModelSchema::ClassMethods # when just after creating a table you want to populate it with some default # values, e.g.: # - # class CreateJobLevels < ActiveRecord::Migration[7.0] + # class CreateJobLevels < ActiveRecord::Migration[7.1] # def up # create_table :job_levels do |t| # t.integer :id @@ -24051,18 +25361,18 @@ module ActiveRecord::ModelSchema::ClassMethods # end # end # - # source://activerecord//lib/active_record/model_schema.rb#537 + # source://activerecord//lib/active_record/model_schema.rb#549 def reset_column_information; end - # source://activerecord//lib/active_record/model_schema.rb#369 + # source://activerecord//lib/active_record/model_schema.rb#375 def reset_sequence_name; end # Computes the table name, (re)sets it internally, and returns it. # - # source://activerecord//lib/active_record/model_schema.rb#278 + # source://activerecord//lib/active_record/model_schema.rb#286 def reset_table_name; end - # source://activerecord//lib/active_record/model_schema.rb#361 + # source://activerecord//lib/active_record/model_schema.rb#367 def sequence_name; end # Sets the name of the sequence to use when generating ids to the given @@ -24080,17 +25390,17 @@ module ActiveRecord::ModelSchema::ClassMethods # self.sequence_name = "projectseq" # default would have been "project_seq" # end # - # source://activerecord//lib/active_record/model_schema.rb#388 + # source://activerecord//lib/active_record/model_schema.rb#394 def sequence_name=(value); end - # source://activerecord//lib/active_record/model_schema.rb#496 + # source://activerecord//lib/active_record/model_schema.rb#508 def symbol_column_to_string(name_symbol); end # Indicates whether the table associated with this class exists # # @return [Boolean] # - # source://activerecord//lib/active_record/model_schema.rb#406 + # source://activerecord//lib/active_record/model_schema.rb#412 def table_exists?; end # Guesses the table name (in forced lower-case) based on the name of the class in the @@ -24153,7 +25463,7 @@ module ActiveRecord::ModelSchema::ClassMethods # self.table_name = "mice" # end # - # source://activerecord//lib/active_record/model_schema.rb#247 + # source://activerecord//lib/active_record/model_schema.rb#255 def table_name; end # Sets the table name explicitly. Example: @@ -24162,7 +25472,7 @@ module ActiveRecord::ModelSchema::ClassMethods # self.table_name = "project" # end # - # source://activerecord//lib/active_record/model_schema.rb#257 + # source://activerecord//lib/active_record/model_schema.rb#265 def table_name=(value); end # Returns the type of the attribute with the given name, after applying @@ -24177,47 +25487,44 @@ module ActiveRecord::ModelSchema::ClassMethods # +attr_name+ The name of the attribute to retrieve the type for. Must be # a string or a symbol. # - # source://activerecord//lib/active_record/model_schema.rb#448 + # source://activerecord//lib/active_record/model_schema.rb#460 def type_for_attribute(attr_name, &block); end - # source://activerecord//lib/active_record/model_schema.rb#433 + # source://activerecord//lib/active_record/model_schema.rb#445 def yaml_encoder; end protected - # source://activerecord//lib/active_record/model_schema.rb#547 + # source://activerecord//lib/active_record/model_schema.rb#573 def initialize_load_schema_monitor; end + # source://activerecord//lib/active_record/model_schema.rb#577 + def reload_schema_from_cache(recursive = T.unsafe(nil)); end + private - # source://activerecord//lib/active_record/model_schema.rb#637 + # source://activerecord//lib/active_record/model_schema.rb#657 def _convert_type_from_options(type); end # Computes and returns a table name according to default conventions. # - # source://activerecord//lib/active_record/model_schema.rb#621 + # source://activerecord//lib/active_record/model_schema.rb#641 def compute_table_name; end - # source://activerecord//lib/active_record/model_schema.rb#552 + # source://activerecord//lib/active_record/model_schema.rb#600 def inherited(child_class); end - # source://activerecord//lib/active_record/model_schema.rb#561 - def load_schema; end - - # source://activerecord//lib/active_record/model_schema.rb#575 + # source://activerecord//lib/active_record/model_schema.rb#613 def load_schema!; end - # source://activerecord//lib/active_record/model_schema.rb#595 - def reload_schema_from_cache; end - # @return [Boolean] # - # source://activerecord//lib/active_record/model_schema.rb#557 + # source://activerecord//lib/active_record/model_schema.rb#609 def schema_loaded?; end # Guesses the table name, but does not decorate it with prefix and suffix information. # - # source://activerecord//lib/active_record/model_schema.rb#615 + # source://activerecord//lib/active_record/model_schema.rb#635 def undecorated_table_name(model_name); end end @@ -24226,16 +25533,16 @@ end # method. The exception has an +errors+ property that contains an array of AttributeAssignmentError # objects, each corresponding to the error while assigning to an attribute. # -# source://activerecord//lib/active_record/errors.rb#366 +# source://activerecord//lib/active_record/errors.rb#436 class ActiveRecord::MultiparameterAssignmentErrors < ::ActiveRecord::ActiveRecordError # @return [MultiparameterAssignmentErrors] a new instance of MultiparameterAssignmentErrors # - # source://activerecord//lib/active_record/errors.rb#369 + # source://activerecord//lib/active_record/errors.rb#439 def initialize(errors = T.unsafe(nil)); end # Returns the value of attribute errors. # - # source://activerecord//lib/active_record/errors.rb#367 + # source://activerecord//lib/active_record/errors.rb#437 def errors; end end @@ -24247,20 +25554,20 @@ module ActiveRecord::NestedAttributes mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActiveRecord::NestedAttributes::ClassMethods - # Returns ActiveRecord::AutosaveAssociation::marked_for_destruction? It's + # Returns ActiveRecord::AutosaveAssociation#marked_for_destruction? It's # used in conjunction with fields_for to build a form element for the # destruction of this association. # - # See ActionView::Helpers::FormHelper::fields_for for more info. + # See ActionView::Helpers::FormHelper#fields_for for more info. # - # source://activerecord//lib/active_record/nested_attributes.rb#383 + # source://activerecord//lib/active_record/nested_attributes.rb#401 def _destroy; end private # @return [Boolean] # - # source://activerecord//lib/active_record/nested_attributes.rb#588 + # source://activerecord//lib/active_record/nested_attributes.rb#606 def allow_destroy?(association_name); end # Assigns the given attributes to the collection association. @@ -24291,7 +25598,7 @@ module ActiveRecord::NestedAttributes # { id: '2', _destroy: true } # ]) # - # source://activerecord//lib/active_record/nested_attributes.rb#464 + # source://activerecord//lib/active_record/nested_attributes.rb#482 def assign_nested_attributes_for_collection_association(association_name, attributes_collection); end # Assigns the given attributes to the association. @@ -24308,13 +25615,13 @@ module ActiveRecord::NestedAttributes # update_only is true, and a :_destroy key set to a truthy value, # then the existing record will be marked for destruction. # - # source://activerecord//lib/active_record/nested_attributes.rb#405 + # source://activerecord//lib/active_record/nested_attributes.rb#423 def assign_nested_attributes_for_one_to_one_association(association_name, attributes); end # Updates a record with the +attributes+ or marks it for destruction if # +allow_destroy+ is +true+ and has_destroy_flag? returns +true+. # - # source://activerecord//lib/active_record/nested_attributes.rb#550 + # source://activerecord//lib/active_record/nested_attributes.rb#568 def assign_to_or_mark_for_destruction(record, attributes, allow_destroy); end # Determines if a record with the particular +attributes+ should be @@ -24323,7 +25630,7 @@ module ActiveRecord::NestedAttributes # # Returns false if there is a +destroy_flag+ on the attributes. # - # source://activerecord//lib/active_record/nested_attributes.rb#572 + # source://activerecord//lib/active_record/nested_attributes.rb#590 def call_reject_if(association_name, attributes); end # Takes in a limit and checks if the attributes_collection has too many @@ -24333,19 +25640,19 @@ module ActiveRecord::NestedAttributes # Raises TooManyRecords error if the attributes_collection is # larger than the limit. # - # source://activerecord//lib/active_record/nested_attributes.rb#530 + # source://activerecord//lib/active_record/nested_attributes.rb#548 def check_record_limit!(limit, attributes_collection); end # Determines if a hash contains a truthy _destroy key. # # @return [Boolean] # - # source://activerecord//lib/active_record/nested_attributes.rb#556 + # source://activerecord//lib/active_record/nested_attributes.rb#574 def has_destroy_flag?(hash); end # @raise [RecordNotFound] # - # source://activerecord//lib/active_record/nested_attributes.rb#592 + # source://activerecord//lib/active_record/nested_attributes.rb#610 def raise_nested_attributes_record_not_found!(association_name, record_id); end # Determines if a new record should be rejected by checking @@ -24354,14 +25661,14 @@ module ActiveRecord::NestedAttributes # # @return [Boolean] # - # source://activerecord//lib/active_record/nested_attributes.rb#563 + # source://activerecord//lib/active_record/nested_attributes.rb#581 def reject_new_record?(association_name, attributes); end # Only take into account the destroy flag if :allow_destroy is true # # @return [Boolean] # - # source://activerecord//lib/active_record/nested_attributes.rb#584 + # source://activerecord//lib/active_record/nested_attributes.rb#602 def will_be_destroyed?(association_name, attributes); end module GeneratedClassMethods @@ -24376,7 +25683,7 @@ module ActiveRecord::NestedAttributes end end -# = Active Record Nested Attributes +# = Active Record Nested \Attributes # # Nested attributes allow you to save attributes on associated records # through the parent. By default nested attribute updating is turned off @@ -24642,7 +25949,25 @@ end # member.avatar_attributes = {icon: 'sad'} # member.avatar.width # => 200 # -# source://activerecord//lib/active_record/nested_attributes.rb#283 +# === Creating forms with nested attributes +# +# Use ActionView::Helpers::FormHelper#fields_for to create form elements for +# nested attributes. +# +# Integration test params should reflect the structure of the form. For +# example: +# +# post members_path, params: { +# member: { +# name: 'joe', +# posts_attributes: { +# '0' => { title: 'Foo' }, +# '1' => { title: 'Bar' } +# } +# } +# } +# +# source://activerecord//lib/active_record/nested_attributes.rb#301 module ActiveRecord::NestedAttributes::ClassMethods # Defines an attributes writer for the specified association(s). # @@ -24650,7 +25975,7 @@ module ActiveRecord::NestedAttributes::ClassMethods # [:allow_destroy] # If true, destroys any members from the attributes hash with a # _destroy key and a value that evaluates to +true+ - # (e.g. 1, '1', true, or 'true'). This option is off by default. + # (e.g. 1, '1', true, or 'true'). This option is false by default. # [:reject_if] # Allows you to specify a Proc or a Symbol pointing to a method # that checks whether a record should be built for a certain attribute @@ -24675,11 +26000,11 @@ module ActiveRecord::NestedAttributes::ClassMethods # nested attributes are going to be used when an associated record already # exists. In general, an existing record may either be updated with the # new set of attribute values or be replaced by a wholly new record - # containing those values. By default the +:update_only+ option is +false+ + # containing those values. By default the +:update_only+ option is false # and the nested attributes are used to update the existing record only # if they include the record's :id value. Otherwise a new # record will be instantiated and used to replace the existing one. - # However if the +:update_only+ option is +true+, the nested attributes + # However if the +:update_only+ option is true, the nested attributes # are used to update the record's attributes always, regardless of # whether the :id is present. The option is ignored for collection # associations. @@ -24692,7 +26017,7 @@ module ActiveRecord::NestedAttributes::ClassMethods # # creates avatar_attributes= and posts_attributes= # accepts_nested_attributes_for :avatar, :posts, allow_destroy: true # - # source://activerecord//lib/active_record/nested_attributes.rb#333 + # source://activerecord//lib/active_record/nested_attributes.rb#351 def accepts_nested_attributes_for(*attr_names); end private @@ -24709,11 +26034,11 @@ module ActiveRecord::NestedAttributes::ClassMethods # the helper methods defined below. Makes it seem like the nested # associations are just regular associations. # - # source://activerecord//lib/active_record/nested_attributes.rb#368 + # source://activerecord//lib/active_record/nested_attributes.rb#386 def generate_association_writer(association_name, type); end end -# source://activerecord//lib/active_record/nested_attributes.rb#284 +# source://activerecord//lib/active_record/nested_attributes.rb#302 ActiveRecord::NestedAttributes::ClassMethods::REJECT_ALL_BLANK_PROC = T.let(T.unsafe(nil), Proc) # source://activerecord//lib/active_record/nested_attributes.rb#9 @@ -24722,50 +26047,50 @@ class ActiveRecord::NestedAttributes::TooManyRecords < ::ActiveRecord::ActiveRec # Attribute hash keys that should not be assigned as normal attributes. # These hash keys are nested attributes implementation details. # -# source://activerecord//lib/active_record/nested_attributes.rb#390 +# source://activerecord//lib/active_record/nested_attributes.rb#408 ActiveRecord::NestedAttributes::UNASSIGNABLE_KEYS = T.let(T.unsafe(nil), Array) # Raised when a given database does not exist. # -# source://activerecord//lib/active_record/errors.rb#238 +# source://activerecord//lib/active_record/errors.rb#307 class ActiveRecord::NoDatabaseError < ::ActiveRecord::StatementInvalid include ::ActiveSupport::ActionableError extend ::ActiveSupport::ActionableError::ClassMethods # @return [NoDatabaseError] a new instance of NoDatabaseError # - # source://activerecord//lib/active_record/errors.rb#245 - def initialize(message = T.unsafe(nil)); end + # source://activerecord//lib/active_record/errors.rb#314 + def initialize(message = T.unsafe(nil), connection_pool: T.unsafe(nil)); end - # source://activesupport/7.0.6/lib/active_support/actionable_error.rb#15 + # source://activesupport/7.1.3.2/lib/active_support/actionable_error.rb#17 def _actions; end - # source://activesupport/7.0.6/lib/active_support/actionable_error.rb#15 + # source://activesupport/7.1.3.2/lib/active_support/actionable_error.rb#17 def _actions=(_arg0); end - # source://activesupport/7.0.6/lib/active_support/actionable_error.rb#15 + # source://activesupport/7.1.3.2/lib/active_support/actionable_error.rb#17 def _actions?; end class << self - # source://activesupport/7.0.6/lib/active_support/actionable_error.rb#15 + # source://activesupport/7.1.3.2/lib/active_support/actionable_error.rb#17 def _actions; end - # source://activesupport/7.0.6/lib/active_support/actionable_error.rb#15 + # source://activesupport/7.1.3.2/lib/active_support/actionable_error.rb#17 def _actions=(value); end - # source://activesupport/7.0.6/lib/active_support/actionable_error.rb#15 + # source://activesupport/7.1.3.2/lib/active_support/actionable_error.rb#17 def _actions?; end - # source://activerecord//lib/active_record/errors.rb#250 + # source://activerecord//lib/active_record/errors.rb#319 def db_error(db_name); end end end -# source://activerecord//lib/active_record/migration.rb#177 +# source://activerecord//lib/active_record/migration.rb#184 class ActiveRecord::NoEnvironmentInSchemaError < ::ActiveRecord::MigrationError # @return [NoEnvironmentInSchemaError] a new instance of NoEnvironmentInSchemaError # - # source://activerecord//lib/active_record/migration.rb#178 + # source://activerecord//lib/active_record/migration.rb#185 def initialize; end end @@ -24831,68 +26156,205 @@ module ActiveRecord::NoTouching::ClassMethods def no_touching(&block); end end -# Raised when a record cannot be inserted or updated because it would violate a not null constraint. -# -# source://activerecord//lib/active_record/errors.rb#216 -class ActiveRecord::NotNullViolation < ::ActiveRecord::StatementInvalid; end +# source://activerecord//lib/active_record/normalization.rb#4 +module ActiveRecord::Normalization + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods -# source://activerecord//lib/active_record/null_relation.rb#4 -module ActiveRecord::NullRelation - # @return [Boolean] + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveRecord::Normalization::ClassMethods + + # Normalizes a specified attribute using its declared normalizations. # - # source://activerecord//lib/active_record/null_relation.rb#29 - def any?; end + # ==== Examples + # + # class User < ActiveRecord::Base + # normalizes :email, with: -> email { email.strip.downcase } + # end + # + # legacy_user = User.find(1) + # legacy_user.email # => " CRUISE-CONTROL@EXAMPLE.COM\n" + # legacy_user.normalize_attribute(:email) + # legacy_user.email # => "cruise-control@example.com" + # legacy_user.save + # + # source://activerecord//lib/active_record/normalization.rb#26 + def normalize_attribute(name); end - # source://activerecord//lib/active_record/null_relation.rb#41 - def calculate(operation, _column_name); end + private - # source://activerecord//lib/active_record/null_relation.rb#17 - def delete(_id_or_array); end + # source://activerecord//lib/active_record/normalization.rb#114 + def normalize_changed_in_place_attributes; end - # source://activerecord//lib/active_record/null_relation.rb#9 - def delete_all; end + module GeneratedClassMethods + def normalized_attributes; end + def normalized_attributes=(value); end + def normalized_attributes?; end + end - # @return [Boolean] + module GeneratedInstanceMethods + def normalized_attributes; end + def normalized_attributes=(value); end + def normalized_attributes?; end + end +end + +# source://activerecord//lib/active_record/normalization.rb#31 +module ActiveRecord::Normalization::ClassMethods + # Normalizes a given +value+ using normalizations declared for +name+. # - # source://activerecord//lib/active_record/null_relation.rb#21 - def empty?; end + # ==== Examples + # + # class User < ActiveRecord::Base + # normalizes :email, with: -> email { email.strip.downcase } + # end + # + # User.normalize_value_for(:email, " CRUISE-CONTROL@EXAMPLE.COM\n") + # # => "cruise-control@example.com" + # + # source://activerecord//lib/active_record/normalization.rb#108 + def normalize_value_for(name, value); end - # @return [Boolean] + # Declares a normalization for one or more attributes. The normalization + # is applied when the attribute is assigned or updated, and the normalized + # value will be persisted to the database. The normalization is also + # applied to the corresponding keyword argument of query methods. This + # allows a record to be created and later queried using unnormalized + # values. + # + # However, to prevent confusion, the normalization will not be applied + # when the attribute is fetched from the database. This means that if a + # record was persisted before the normalization was declared, the record's + # attribute will not be normalized until either it is assigned a new + # value, or it is explicitly migrated via Normalization#normalize_attribute. + # + # Because the normalization may be applied multiple times, it should be + # _idempotent_. In other words, applying the normalization more than once + # should have the same result as applying it only once. + # + # By default, the normalization will not be applied to +nil+ values. This + # behavior can be changed with the +:apply_to_nil+ option. # - # source://activerecord//lib/active_record/null_relation.rb#50 - def exists?(_conditions = T.unsafe(nil)); end + # Be aware that if your app was created before Rails 7.1, and your app + # marshals instances of the targeted model (for example, when caching), + # then you should set ActiveRecord.marshalling_format_version to +7.1+ or + # higher via either config.load_defaults 7.1 or + # config.active_record.marshalling_format_version = 7.1. + # Otherwise, +Marshal+ may attempt to serialize the normalization +Proc+ + # and raise +TypeError+. + # + # ==== Options + # + # * +:with+ - Any callable object that accepts the attribute's value as + # its sole argument, and returns it normalized. + # * +:apply_to_nil+ - Whether to apply the normalization to +nil+ values. + # Defaults to +false+. + # + # ==== Examples + # + # class User < ActiveRecord::Base + # normalizes :email, with: -> email { email.strip.downcase } + # normalizes :phone, with: -> phone { phone.delete("^0-9").delete_prefix("1") } + # end + # + # user = User.create(email: " CRUISE-CONTROL@EXAMPLE.COM\n") + # user.email # => "cruise-control@example.com" + # + # user = User.find_by(email: "\tCRUISE-CONTROL@EXAMPLE.COM ") + # user.email # => "cruise-control@example.com" + # user.email_before_type_cast # => "cruise-control@example.com" + # + # User.where(email: "\tCRUISE-CONTROL@EXAMPLE.COM ").count # => 1 + # User.where(["email = ?", "\tCRUISE-CONTROL@EXAMPLE.COM "]).count # => 0 + # + # User.exists?(email: "\tCRUISE-CONTROL@EXAMPLE.COM ") # => true + # User.exists?(["email = ?", "\tCRUISE-CONTROL@EXAMPLE.COM "]) # => false + # + # User.normalize_value_for(:phone, "+1 (555) 867-5309") # => "5558675309" + # + # source://activerecord//lib/active_record/normalization.rb#88 + def normalizes(*names, with:, apply_to_nil: T.unsafe(nil)); end +end - # @return [Boolean] +# source://activerecord//lib/active_record/normalization.rb#120 +class ActiveRecord::Normalization::NormalizedValueType + include ::ActiveModel::Type::SerializeCastValue + extend ::ActiveModel::Type::SerializeCastValue::ClassMethods + + # @return [NormalizedValueType] a new instance of NormalizedValueType # - # source://activerecord//lib/active_record/null_relation.rb#37 - def many?; end + # source://activerecord//lib/active_record/normalization.rb#126 + def initialize(cast_type:, normalizer:, normalize_nil:); end - # @return [Boolean] + # source://activerecord//lib/active_record/normalization.rb#145 + def ==(other); end + + # source://activerecord//lib/active_record/normalization.rb#133 + def cast(value); end + + # Returns the value of attribute cast_type. # - # source://activerecord//lib/active_record/null_relation.rb#25 - def none?; end + # source://activerecord//lib/active_record/normalization.rb#123 + def cast_type; end - # @return [Boolean] + # source://activerecord//lib/active_record/normalization.rb#145 + def eql?(other); end + + # source://activerecord//lib/active_record/normalization.rb#153 + def hash; end + + # source://activerecord//lib/active_record/normalization.rb#157 + def inspect; end + + # Returns the value of attribute normalize_nil. # - # source://activerecord//lib/active_record/null_relation.rb#33 - def one?; end + # source://activerecord//lib/active_record/normalization.rb#123 + def normalize_nil; end - # source://activerecord//lib/active_record/null_relation.rb#54 - def or(other); end + # Returns the value of attribute normalize_nil. + # + # source://activerecord//lib/active_record/normalization.rb#123 + def normalize_nil?; end - # source://activerecord//lib/active_record/null_relation.rb#5 - def pluck(*column_names); end + # Returns the value of attribute normalizer. + # + # source://activerecord//lib/active_record/normalization.rb#123 + def normalizer; end + + # source://activerecord//lib/active_record/normalization.rb#137 + def serialize(value); end - # source://activerecord//lib/active_record/null_relation.rb#13 - def update_all(_updates); end + # source://activerecord//lib/active_record/normalization.rb#141 + def serialize_cast_value(value); end private - # source://activerecord//lib/active_record/null_relation.rb#59 - def exec_main_query(async: T.unsafe(nil)); end + # source://activerecord//lib/active_record/normalization.rb#162 + def normalize(value); end end -# source://activerecord//lib/active_record/migration.rb#133 +# Raised when a record cannot be inserted or updated because it would violate a not null constraint. +# +# source://activerecord//lib/active_record/errors.rb#272 +class ActiveRecord::NotNullViolation < ::ActiveRecord::StatementInvalid; end + +# source://activerecord//lib/active_record/migration/pending_migration_connection.rb#4 +class ActiveRecord::PendingMigrationConnection + class << self + # source://activerecord//lib/active_record/migration/pending_migration_connection.rb#17 + def current_preventing_writes; end + + # source://activerecord//lib/active_record/migration/pending_migration_connection.rb#5 + def establish_temporary_connection(db_config, &block); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration/pending_migration_connection.rb#13 + def primary_class?; end + end +end + +# source://activerecord//lib/active_record/migration.rb#134 class ActiveRecord::PendingMigrationError < ::ActiveRecord::MigrationError include ::ActiveSupport::ActionableError extend ::ActiveSupport::ActionableError::ClassMethods @@ -24900,30 +26362,33 @@ class ActiveRecord::PendingMigrationError < ::ActiveRecord::MigrationError # @return [PendingMigrationError] a new instance of PendingMigrationError # # source://activerecord//lib/active_record/migration.rb#146 - def initialize(message = T.unsafe(nil)); end + def initialize(message = T.unsafe(nil), pending_migrations: T.unsafe(nil)); end - # source://activesupport/7.0.6/lib/active_support/actionable_error.rb#15 + # source://activesupport/7.1.3.2/lib/active_support/actionable_error.rb#17 def _actions; end - # source://activesupport/7.0.6/lib/active_support/actionable_error.rb#15 + # source://activesupport/7.1.3.2/lib/active_support/actionable_error.rb#17 def _actions=(_arg0); end - # source://activesupport/7.0.6/lib/active_support/actionable_error.rb#15 + # source://activesupport/7.1.3.2/lib/active_support/actionable_error.rb#17 def _actions?; end private - # source://activerecord//lib/active_record/migration.rb#151 - def detailed_migration_message; end + # source://activerecord//lib/active_record/migration.rb#170 + def connection; end + + # source://activerecord//lib/active_record/migration.rb#156 + def detailed_migration_message(pending_migrations); end class << self - # source://activesupport/7.0.6/lib/active_support/actionable_error.rb#15 + # source://activesupport/7.1.3.2/lib/active_support/actionable_error.rb#17 def _actions; end - # source://activesupport/7.0.6/lib/active_support/actionable_error.rb#15 + # source://activesupport/7.1.3.2/lib/active_support/actionable_error.rb#17 def _actions=(value); end - # source://activesupport/7.0.6/lib/active_support/actionable_error.rb#15 + # source://activesupport/7.1.3.2/lib/active_support/actionable_error.rb#17 def _actions?; end end end @@ -24947,9 +26412,11 @@ module ActiveRecord::Persistence # Note: The new instance will share a link to the same attributes as the original class. # Therefore the STI column value will still be the same. # Any change to the attributes on either instance will affect both instances. + # This includes any attribute initialization done by the new instance. + # # If you want to change the STI column as well, use #becomes! instead. # - # source://activerecord//lib/active_record/persistence.rb#711 + # source://activerecord//lib/active_record/persistence.rb#814 def becomes(klass); end # Wrapper around #becomes that also changes the instance's STI column value. @@ -24959,14 +26426,14 @@ module ActiveRecord::Persistence # Note: The old instance's STI column value will be changed too, as both objects # share the same set of attributes. # - # source://activerecord//lib/active_record/persistence.rb#731 + # source://activerecord//lib/active_record/persistence.rb#835 def becomes!(klass); end # Initializes +attribute+ to zero if +nil+ and subtracts the value passed as +by+ (default is 1). # The decrement is performed directly on the underlying attribute, no setter is invoked. # Only makes sense for number-based attributes. Returns +self+. # - # source://activerecord//lib/active_record/persistence.rb#856 + # source://activerecord//lib/active_record/persistence.rb#982 def decrement(attribute, by = T.unsafe(nil)); end # Wrapper around #decrement that writes the update to the database. @@ -24976,7 +26443,7 @@ module ActiveRecord::Persistence # +update_counters+, see that for more. # Returns +self+. # - # source://activerecord//lib/active_record/persistence.rb#866 + # source://activerecord//lib/active_record/persistence.rb#992 def decrement!(attribute, by = T.unsafe(nil), touch: T.unsafe(nil)); end # Deletes the record in the database and freezes this instance to @@ -24992,7 +26459,7 @@ module ActiveRecord::Persistence # callbacks or any :dependent association # options, use #destroy. # - # source://activerecord//lib/active_record/persistence.rb#663 + # source://activerecord//lib/active_record/persistence.rb#766 def delete; end # Deletes the record in the database and freezes this instance to reflect @@ -25003,7 +26470,7 @@ module ActiveRecord::Persistence # and #destroy returns +false+. # See ActiveRecord::Callbacks for further details. # - # source://activerecord//lib/active_record/persistence.rb#676 + # source://activerecord//lib/active_record/persistence.rb#780 def destroy; end # Deletes the record in the database and freezes this instance to reflect @@ -25014,21 +26481,21 @@ module ActiveRecord::Persistence # and #destroy! raises ActiveRecord::RecordNotDestroyed. # See ActiveRecord::Callbacks for further details. # - # source://activerecord//lib/active_record/persistence.rb#695 + # source://activerecord//lib/active_record/persistence.rb#796 def destroy!; end # Returns true if this object has been destroyed, otherwise returns false. # # @return [Boolean] # - # source://activerecord//lib/active_record/persistence.rb#579 + # source://activerecord//lib/active_record/persistence.rb#682 def destroyed?; end # Initializes +attribute+ to zero if +nil+ and adds the value passed as +by+ (default is 1). # The increment is performed directly on the underlying attribute, no setter is invoked. # Only makes sense for number-based attributes. Returns +self+. # - # source://activerecord//lib/active_record/persistence.rb#833 + # source://activerecord//lib/active_record/persistence.rb#959 def increment(attribute, by = T.unsafe(nil)); end # Wrapper around #increment that writes the update to the database. @@ -25038,7 +26505,7 @@ module ActiveRecord::Persistence # +update_counters+, see that for more. # Returns +self+. # - # source://activerecord//lib/active_record/persistence.rb#845 + # source://activerecord//lib/active_record/persistence.rb#971 def increment!(attribute, by = T.unsafe(nil), touch: T.unsafe(nil)); end # Returns true if this object hasn't been saved yet -- that is, a record @@ -25046,7 +26513,7 @@ module ActiveRecord::Persistence # # @return [Boolean] # - # source://activerecord//lib/active_record/persistence.rb#562 + # source://activerecord//lib/active_record/persistence.rb#665 def new_record?; end # Returns true if the record is persisted, i.e. it's not a new record and it was @@ -25054,23 +26521,23 @@ module ActiveRecord::Persistence # # @return [Boolean] # - # source://activerecord//lib/active_record/persistence.rb#585 + # source://activerecord//lib/active_record/persistence.rb#688 def persisted?; end # Returns true if this object was just created -- that is, prior to the last - # save, the object didn't exist in the database and new_record? would have + # update or delete, the object didn't exist in the database and new_record? would have # returned true. # # @return [Boolean] # - # source://activerecord//lib/active_record/persistence.rb#569 + # source://activerecord//lib/active_record/persistence.rb#672 def previously_new_record?; end # Returns true if this object was previously persisted but now it has been deleted. # # @return [Boolean] # - # source://activerecord//lib/active_record/persistence.rb#574 + # source://activerecord//lib/active_record/persistence.rb#677 def previously_persisted?; end # Reloads the record from the database. @@ -25121,7 +26588,7 @@ module ActiveRecord::Persistence # end # end # - # source://activerecord//lib/active_record/persistence.rb#943 + # source://activerecord//lib/active_record/persistence.rb#1069 def reload(options = T.unsafe(nil)); end # :call-seq: @@ -25149,7 +26616,7 @@ module ActiveRecord::Persistence # Attributes marked as readonly are silently ignored if the record is # being updated. # - # source://activerecord//lib/active_record/persistence.rb#614 + # source://activerecord//lib/active_record/persistence.rb#717 def save(**options, &block); end # :call-seq: @@ -25179,7 +26646,7 @@ module ActiveRecord::Persistence # # Unless an error is raised, returns true. # - # source://activerecord//lib/active_record/persistence.rb#647 + # source://activerecord//lib/active_record/persistence.rb#750 def save!(**options, &block); end # Assigns to +attribute+ the boolean opposite of attribute?. So @@ -25194,7 +26661,7 @@ module ActiveRecord::Persistence # user.toggle(:banned) # user.banned? # => true # - # source://activerecord//lib/active_record/persistence.rb#882 + # source://activerecord//lib/active_record/persistence.rb#1008 def toggle(attribute); end # Wrapper around #toggle that saves the record. This method differs from @@ -25202,7 +26669,7 @@ module ActiveRecord::Persistence # Saving is not subjected to validation checks. Returns +true+ if the # record could be saved. # - # source://activerecord//lib/active_record/persistence.rb#891 + # source://activerecord//lib/active_record/persistence.rb#1017 def toggle!(attribute); end # Saves the record with the updated_at/on attributes set to the current time @@ -25239,20 +26706,20 @@ module ActiveRecord::Persistence # ball = Ball.new # ball.touch(:updated_at) # => raises ActiveRecordError # - # source://activerecord//lib/active_record/persistence.rb#993 + # source://activerecord//lib/active_record/persistence.rb#1120 def touch(*names, time: T.unsafe(nil)); end # Updates the attributes of the model from the passed-in hash and saves the # record, all wrapped in a transaction. If the object is invalid, the saving # will fail and false will be returned. # - # source://activerecord//lib/active_record/persistence.rb#764 + # source://activerecord//lib/active_record/persistence.rb#890 def update(attributes); end # Updates its receiver just like #update but calls #save! instead # of +save+, so an exception is raised if the record is invalid and saving will fail. # - # source://activerecord//lib/active_record/persistence.rb#775 + # source://activerecord//lib/active_record/persistence.rb#901 def update!(attributes); end # Updates a single attribute and saves the record. @@ -25263,17 +26730,35 @@ module ActiveRecord::Persistence # * updated_at/updated_on column is updated if that column is available. # * Updates all the attributes that are dirty in this object. # - # This method raises an ActiveRecord::ActiveRecordError if the + # This method raises an ActiveRecord::ActiveRecordError if the # attribute is marked as readonly. # # Also see #update_column. # - # source://activerecord//lib/active_record/persistence.rb#753 + # source://activerecord//lib/active_record/persistence.rb#857 def update_attribute(name, value); end + # Updates a single attribute and saves the record. + # This is especially useful for boolean flags on existing records. Also note that + # + # * Validation is skipped. + # * \Callbacks are invoked. + # * updated_at/updated_on column is updated if that column is available. + # * Updates all the attributes that are dirty in this object. + # + # This method raises an ActiveRecord::ActiveRecordError if the + # attribute is marked as readonly. + # + # If any of the before_* callbacks throws +:abort+ the action is cancelled + # and #update_attribute! raises ActiveRecord::RecordNotSaved. See + # ActiveRecord::Callbacks for further details. + # + # source://activerecord//lib/active_record/persistence.rb#879 + def update_attribute!(name, value); end + # Equivalent to update_columns(name => value). # - # source://activerecord//lib/active_record/persistence.rb#785 + # source://activerecord//lib/active_record/persistence.rb#911 def update_column(name, value); end # Updates the attributes directly in the database issuing an UPDATE SQL @@ -25295,7 +26780,7 @@ module ActiveRecord::Persistence # # @raise [ActiveRecordError] # - # source://activerecord//lib/active_record/persistence.rb#805 + # source://activerecord//lib/active_record/persistence.rb#931 def update_columns(attributes); end private @@ -25306,32 +26791,35 @@ module ActiveRecord::Persistence # @yield [_self] # @yieldparam _self [ActiveRecord::Persistence] the object that the method was called on # - # source://activerecord//lib/active_record/persistence.rb#1093 + # source://activerecord//lib/active_record/persistence.rb#1247 def _create_record(attribute_names = T.unsafe(nil)); end - # source://activerecord//lib/active_record/persistence.rb#1043 + # source://activerecord//lib/active_record/persistence.rb#1197 def _delete_row; end - # source://activerecord//lib/active_record/persistence.rb#1018 + # source://activerecord//lib/active_record/persistence.rb#1153 def _find_record(options); end - # source://activerecord//lib/active_record/persistence.rb#1031 + # source://activerecord//lib/active_record/persistence.rb#1164 + def _in_memory_query_constraints_hash; end + + # source://activerecord//lib/active_record/persistence.rb#1179 def _query_constraints_hash; end # @raise [ReadOnlyRecord] # - # source://activerecord//lib/active_record/persistence.rb#1122 + # source://activerecord//lib/active_record/persistence.rb#1281 def _raise_readonly_record_error; end - # source://activerecord//lib/active_record/persistence.rb#1114 + # source://activerecord//lib/active_record/persistence.rb#1273 def _raise_record_not_destroyed; end # @raise [ActiveRecordError] # - # source://activerecord//lib/active_record/persistence.rb#1126 + # source://activerecord//lib/active_record/persistence.rb#1285 def _raise_record_not_touched_error; end - # source://activerecord//lib/active_record/persistence.rb#1047 + # source://activerecord//lib/active_record/persistence.rb#1201 def _touch_row(attribute_names, time); end # Updates the associated record with values matching those of the instance attributes. @@ -25340,54 +26828,84 @@ module ActiveRecord::Persistence # @yield [_self] # @yieldparam _self [ActiveRecord::Persistence] the object that the method was called on # - # source://activerecord//lib/active_record/persistence.rb#1073 + # source://activerecord//lib/active_record/persistence.rb#1227 def _update_record(attribute_names = T.unsafe(nil)); end - # source://activerecord//lib/active_record/persistence.rb#1057 + # source://activerecord//lib/active_record/persistence.rb#1211 def _update_row(attribute_names, attempted_action = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord//lib/active_record/persistence.rb#1026 + # source://activerecord//lib/active_record/persistence.rb#1174 def apply_scoping?(options); end - # The name of the method used to touch a +belongs_to+ association when the - # +:touch+ option is used. - # - # source://activerecord//lib/active_record/persistence.rb#1135 - def belongs_to_touch_method; end - - # source://activerecord//lib/active_record/persistence.rb#1064 + # source://activerecord//lib/active_record/persistence.rb#1218 def create_or_update(**_arg0, &block); end # A hook to be overridden by association modules. # - # source://activerecord//lib/active_record/persistence.rb#1036 + # source://activerecord//lib/active_record/persistence.rb#1190 def destroy_associations; end - # source://activerecord//lib/active_record/persistence.rb#1039 + # source://activerecord//lib/active_record/persistence.rb#1193 def destroy_row; end - # source://activerecord//lib/active_record/persistence.rb#1012 + # source://activerecord//lib/active_record/persistence.rb#1141 + def init_internals; end + + # source://activerecord//lib/active_record/persistence.rb#1147 def strict_loaded_associations; end # @raise [ActiveRecordError] # - # source://activerecord//lib/active_record/persistence.rb#1110 + # source://activerecord//lib/active_record/persistence.rb#1269 def verify_readonly_attribute(name); end end # source://activerecord//lib/active_record/persistence.rb#10 module ActiveRecord::Persistence::ClassMethods - # source://activerecord//lib/active_record/persistence.rb#516 + # source://activerecord//lib/active_record/persistence.rb#611 def _delete_record(constraints); end - # source://activerecord//lib/active_record/persistence.rb#477 - def _insert_record(values); end + # source://activerecord//lib/active_record/persistence.rb#569 + def _insert_record(values, returning); end - # source://activerecord//lib/active_record/persistence.rb#499 + # source://activerecord//lib/active_record/persistence.rb#594 def _update_record(values, constraints); end + # Builds an object (or multiple objects) and returns either the built object or a list of built + # objects. + # + # The +attributes+ parameter can be either a Hash or an Array of Hashes. These Hashes describe the + # attributes on the objects that are to be built. + # + # ==== Examples + # # Build a single new object + # User.build(first_name: 'Jamie') + # + # # Build an Array of new objects + # User.build([{ first_name: 'Jamie' }, { first_name: 'Jeremy' }]) + # + # # Build a single object and pass it into a block to set other attributes. + # User.build(first_name: 'Jamie') do |u| + # u.is_admin = false + # end + # + # # Building an Array of new objects using a block, where the block is executed for each object: + # User.build([{ first_name: 'Jamie' }, { first_name: 'Jeremy' }]) do |u| + # u.is_admin = false + # end + # + # source://activerecord//lib/active_record/persistence.rb#82 + def build(attributes = T.unsafe(nil), &block); end + + # Returns an array of column names to be used in queries. The source of column + # names is derived from +query_constraints_list+ or +primary_key+. This method + # is for internal use when the primary key is to be treated as an array. + # + # source://activerecord//lib/active_record/persistence.rb#510 + def composite_query_constraints_list; end + # Creates an object (or multiple objects) and saves it to the database, if validations pass. # The resulting object is returned whether the object was saved successfully to the database or not. # @@ -25444,7 +26962,7 @@ module ActiveRecord::Persistence::ClassMethods # # Delete multiple rows # Todo.delete([2,3,4]) # - # source://activerecord//lib/active_record/persistence.rb#473 + # source://activerecord//lib/active_record/persistence.rb#565 def delete(id_or_array); end # Destroy an object (or multiple objects) that has the given id. The object is instantiated first, @@ -25467,9 +26985,14 @@ module ActiveRecord::Persistence::ClassMethods # todos = [1,2,3] # Todo.destroy(todos) # - # source://activerecord//lib/active_record/persistence.rb#447 + # source://activerecord//lib/active_record/persistence.rb#533 def destroy(id); end + # @return [Boolean] + # + # source://activerecord//lib/active_record/persistence.rb#495 + def has_query_constraints?; end + # Inserts a single record into the database in a single SQL INSERT # statement. It does not instantiate any models nor does it trigger # Active Record callbacks or validations. Though passed values @@ -25477,7 +27000,7 @@ module ActiveRecord::Persistence::ClassMethods # # See #insert_all for documentation. # - # source://activerecord//lib/active_record/persistence.rb#66 + # source://activerecord//lib/active_record/persistence.rb#96 def insert(attributes, returning: T.unsafe(nil), unique_by: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end # Inserts a single record into the database in a single SQL INSERT @@ -25487,7 +27010,7 @@ module ActiveRecord::Persistence::ClassMethods # # See #insert_all! for more. # - # source://activerecord//lib/active_record/persistence.rb#155 + # source://activerecord//lib/active_record/persistence.rb#185 def insert!(attributes, returning: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end # Inserts multiple records into the database in a single SQL INSERT @@ -25508,14 +27031,14 @@ module ActiveRecord::Persistence::ClassMethods # ==== Options # # [:returning] - # (PostgreSQL only) An array of attributes to return for all successfully + # (PostgreSQL and SQLite3 only) An array of attributes to return for all successfully # inserted records, which by default is the primary key. # Pass returning: %w[ id name ] for both id and name # or returning: false to omit the underlying RETURNING SQL # clause entirely. # # You can also pass an SQL string if you need more control on the return values - # (for example, returning: "id, name as new_name"). + # (for example, returning: Arel.sql("id, name as new_name")). # # [:unique_by] # (PostgreSQL and SQLite only) By default rows are considered to be unique @@ -25525,7 +27048,7 @@ module ActiveRecord::Persistence::ClassMethods # # Consider a Book model where no duplicate ISBNs make sense, but if any # row has an existing id, or is not unique by another unique index, - # ActiveRecord::RecordNotUnique is raised. + # ActiveRecord::RecordNotUnique is raised. # # Unique indexes can be identified by columns or name: # @@ -25566,7 +27089,7 @@ module ActiveRecord::Persistence::ClassMethods # { id: 2, title: "Eloquent Ruby" } # ]) # - # source://activerecord//lib/active_record/persistence.rb#145 + # source://activerecord//lib/active_record/persistence.rb#175 def insert_all(attributes, returning: T.unsafe(nil), unique_by: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end # Inserts multiple records into the database in a single SQL INSERT @@ -25577,7 +27100,7 @@ module ActiveRecord::Persistence::ClassMethods # The +attributes+ parameter is an Array of Hashes. Every Hash determines # the attributes for a single row and must have the same keys. # - # Raises ActiveRecord::RecordNotUnique if any rows violate a + # Raises ActiveRecord::RecordNotUnique if any rows violate a # unique index on the table. In that case, no rows are inserted. # # To skip duplicate rows, see #insert_all. To replace them, see #upsert_all. @@ -25588,14 +27111,14 @@ module ActiveRecord::Persistence::ClassMethods # ==== Options # # [:returning] - # (PostgreSQL only) An array of attributes to return for all successfully + # (PostgreSQL and SQLite3 only) An array of attributes to return for all successfully # inserted records, which by default is the primary key. # Pass returning: %w[ id name ] for both id and name # or returning: false to omit the underlying RETURNING SQL # clause entirely. # # You can also pass an SQL string if you need more control on the return values - # (for example, returning: "id, name as new_name"). + # (for example, returning: Arel.sql("id, name as new_name")). # # [:record_timestamps] # By default, automatic setting of timestamp columns is controlled by @@ -25623,7 +27146,7 @@ module ActiveRecord::Persistence::ClassMethods # { id: 1, title: "Eloquent Ruby", author: "Russ" } # ]) # - # source://activerecord//lib/active_record/persistence.rb#212 + # source://activerecord//lib/active_record/persistence.rb#242 def insert_all!(attributes, returning: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end # Given an attributes hash, +instantiate+ returns a new instance of @@ -25637,9 +27160,48 @@ module ActiveRecord::Persistence::ClassMethods # See ActiveRecord::Inheritance#discriminate_class_for_record to see # how this "single-table" inheritance mapping is implemented. # - # source://activerecord//lib/active_record/persistence.rb#346 + # source://activerecord//lib/active_record/persistence.rb#376 def instantiate(attributes, column_types = T.unsafe(nil), &block); end + # Accepts a list of attribute names to be used in the WHERE clause + # of SELECT / UPDATE / DELETE queries and in the ORDER BY clause for `#first` and `#last` finder methods. + # + # class Developer < ActiveRecord::Base + # query_constraints :company_id, :id + # end + # + # developer = Developer.first + # # SELECT "developers".* FROM "developers" ORDER BY "developers"."company_id" ASC, "developers"."id" ASC LIMIT 1 + # developer.inspect # => # + # + # developer.update!(name: "Nikita") + # # UPDATE "developers" SET "name" = 'Nikita' WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 + # + # It is possible to update attribute used in the query_by clause: + # developer.update!(company_id: 2) + # # UPDATE "developers" SET "company_id" = 2 WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 + # + # developer.name = "Bob" + # developer.save! + # # UPDATE "developers" SET "name" = 'Bob' WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 + # + # developer.destroy! + # # DELETE FROM "developers" WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 + # + # developer.delete + # # DELETE FROM "developers" WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 + # + # developer.reload + # # SELECT "developers".* FROM "developers" WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 LIMIT 1 + # + # @raise [ArgumentError] + # + # source://activerecord//lib/active_record/persistence.rb#488 + def query_constraints(*columns_list); end + + # source://activerecord//lib/active_record/persistence.rb#499 + def query_constraints_list; end + # Updates an object (or multiple objects) and saves it to the database, if validations pass. # The resulting object is returned whether the object was saved successfully to the database or not. # @@ -25668,13 +27230,13 @@ module ActiveRecord::Persistence::ClassMethods # it is preferred to use {update_all}[rdoc-ref:Relation#update_all] # for updating all records in a single query. # - # source://activerecord//lib/active_record/persistence.rb#378 + # source://activerecord//lib/active_record/persistence.rb#408 def update(id = T.unsafe(nil), attributes); end # Updates the object (or multiple objects) just like #update but calls #update! instead # of +update+, so an exception is raised if the record is invalid and saving will fail. # - # source://activerecord//lib/active_record/persistence.rb#404 + # source://activerecord//lib/active_record/persistence.rb#434 def update!(id = T.unsafe(nil), attributes); end # Updates or inserts (upserts) a single record into the database in a @@ -25684,8 +27246,8 @@ module ActiveRecord::Persistence::ClassMethods # # See #upsert_all for documentation. # - # source://activerecord//lib/active_record/persistence.rb#222 - def upsert(attributes, on_duplicate: T.unsafe(nil), returning: T.unsafe(nil), unique_by: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end + # source://activerecord//lib/active_record/persistence.rb#252 + def upsert(attributes, **kwargs); end # Updates or inserts (upserts) multiple records into the database in a # single SQL INSERT statement. It does not instantiate any models nor does @@ -25705,14 +27267,14 @@ module ActiveRecord::Persistence::ClassMethods # ==== Options # # [:returning] - # (PostgreSQL only) An array of attributes to return for all successfully + # (PostgreSQL and SQLite3 only) An array of attributes to return for all successfully # inserted records, which by default is the primary key. # Pass returning: %w[ id name ] for both id and name # or returning: false to omit the underlying RETURNING SQL # clause entirely. # # You can also pass an SQL string if you need more control on the return values - # (for example, returning: "id, name as new_name"). + # (for example, returning: Arel.sql("id, name as new_name")). # # [:unique_by] # (PostgreSQL and SQLite only) By default rows are considered to be unique @@ -25722,7 +27284,7 @@ module ActiveRecord::Persistence::ClassMethods # # Consider a Book model where no duplicate ISBNs make sense, but if any # row has an existing id, or is not unique by another unique index, - # ActiveRecord::RecordNotUnique is raised. + # ActiveRecord::RecordNotUnique is raised. # # Unique indexes can be identified by columns or name: # @@ -25794,7 +27356,7 @@ module ActiveRecord::Persistence::ClassMethods # # Book.find_by(isbn: "1").title # => "Eloquent Ruby" # - # source://activerecord//lib/active_record/persistence.rb#332 + # source://activerecord//lib/active_record/persistence.rb#362 def upsert_all(attributes, on_duplicate: T.unsafe(nil), update_only: T.unsafe(nil), returning: T.unsafe(nil), unique_by: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end private @@ -25803,7 +27365,7 @@ module ActiveRecord::Persistence::ClassMethods # to build `where` clause from default scopes. # Skips empty scopes. # - # source://activerecord//lib/active_record/persistence.rb#552 + # source://activerecord//lib/active_record/persistence.rb#655 def build_default_constraint; end # Called by +instantiate+ to decide which class to use for a new @@ -25812,13 +27374,16 @@ module ActiveRecord::Persistence::ClassMethods # See +ActiveRecord::Inheritance#discriminate_class_for_record+ for # the single-table inheritance discriminator. # - # source://activerecord//lib/active_record/persistence.rb#545 + # source://activerecord//lib/active_record/persistence.rb#648 def discriminate_class_for_record(record); end + # source://activerecord//lib/active_record/persistence.rb#628 + def inherited(subclass); end + # Given a class, an attributes hash, +instantiate_instance_of+ returns a # new instance of the class. Accepts only keys as strings. # - # source://activerecord//lib/active_record/persistence.rb#535 + # source://activerecord//lib/active_record/persistence.rb#638 def instantiate_instance_of(klass, attributes, column_types = T.unsafe(nil), &block); end end @@ -25856,28 +27421,28 @@ class ActiveRecord::PredicateBuilder # source://activerecord//lib/active_record/relation/predicate_builder.rb#49 def register_handler(klass, handler); end - # source://activerecord//lib/active_record/relation/predicate_builder.rb#72 + # source://activerecord//lib/active_record/relation/predicate_builder.rb#71 def resolve_arel_attribute(table_name, column_name, &block); end protected - # source://activerecord//lib/active_record/relation/predicate_builder.rb#77 + # source://activerecord//lib/active_record/relation/predicate_builder.rb#76 def expand_from_hash(attributes, &block); end private - # source://activerecord//lib/active_record/relation/predicate_builder.rb#145 + # source://activerecord//lib/active_record/relation/predicate_builder.rb#150 def convert_dot_notation_to_hash(attributes); end - # source://activerecord//lib/active_record/relation/predicate_builder.rb#135 + # source://activerecord//lib/active_record/relation/predicate_builder.rb#140 def grouping_queries(queries); end - # source://activerecord//lib/active_record/relation/predicate_builder.rb#161 + # source://activerecord//lib/active_record/relation/predicate_builder.rb#172 def handler_for(object); end # Returns the value of attribute table. # - # source://activerecord//lib/active_record/relation/predicate_builder.rb#133 + # source://activerecord//lib/active_record/relation/predicate_builder.rb#138 def table; end class << self @@ -25926,37 +27491,37 @@ class ActiveRecord::PredicateBuilder::AssociationQueryValue # Returns the value of attribute associated_table. # - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#16 + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#23 def associated_table; end - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#52 + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#59 def convert_to_id(value); end - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#18 + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#25 def ids; end # @return [Boolean] # - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#48 + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#55 def polymorphic_clause?; end - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#40 + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#47 def polymorphic_name; end - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#32 + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#39 def primary_key; end - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#36 + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#43 def primary_type; end # @return [Boolean] # - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#44 + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#51 def select_clause?; end # Returns the value of attribute value. # - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#16 + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#23 def value; end end @@ -25995,7 +27560,7 @@ class ActiveRecord::PredicateBuilder::PolymorphicArrayValue # source://activerecord//lib/active_record/relation/predicate_builder/polymorphic_array_value.rb#23 def associated_table; end - # source://activerecord//lib/active_record/relation/predicate_builder/polymorphic_array_value.rb#45 + # source://activerecord//lib/active_record/relation/predicate_builder/polymorphic_array_value.rb#44 def convert_to_id(value); end # source://activerecord//lib/active_record/relation/predicate_builder/polymorphic_array_value.rb#36 @@ -26078,7 +27643,7 @@ end # Raised when PostgreSQL returns 'cached plan must not change result type' and # we cannot retry gracefully (e.g. inside a transaction) # -# source://activerecord//lib/active_record/errors.rb#271 +# source://activerecord//lib/active_record/errors.rb#341 class ActiveRecord::PreparedStatementCacheExpired < ::ActiveRecord::StatementInvalid; end # Raised when the number of placeholders in an SQL fragment passed to @@ -26089,20 +27654,94 @@ class ActiveRecord::PreparedStatementCacheExpired < ::ActiveRecord::StatementInv # # Location.where("lat = ? AND lng = ?", 53.7362) # -# source://activerecord//lib/active_record/errors.rb#234 +# source://activerecord//lib/active_record/errors.rb#303 class ActiveRecord::PreparedStatementInvalid < ::ActiveRecord::ActiveRecordError; end -# source://activerecord//lib/active_record/migration.rb#188 +# source://activerecord//lib/active_record/promise.rb#4 +class ActiveRecord::Promise < ::BasicObject + # @return [Promise] a new instance of Promise + # + # source://activerecord//lib/active_record/promise.rb#7 + def initialize(future_result, block); end + + def class; end + + # source://activerecord//lib/active_record/promise.rb#44 + def inspect; end + + def is_a?(_arg0); end + + # Returns whether the associated query is still being executed or not. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/promise.rb#13 + def pending?; end + + # source://activerecord//lib/active_record/promise.rb#48 + def pretty_print(q); end + + def respond_to?(*_arg0); end + + # Returns a new +ActiveRecord::Promise+ that will apply the passed block + # when the value is accessed: + # + # Post.async_pick(:title).then { |title| title.upcase }.value + # # => "POST TITLE" + # + # source://activerecord//lib/active_record/promise.rb#36 + def then(&block); end + + # Returns the query result. + # If the query wasn't completed yet, accessing +#value+ will block until the query completes. + # If the query failed, +#value+ will raise the corresponding error. + # + # source://activerecord//lib/active_record/promise.rb#20 + def value; end + + private + + # source://activerecord//lib/active_record/promise.rb#53 + def status; end +end + +# source://activerecord//lib/active_record/promise.rb#63 +class ActiveRecord::Promise::Complete < ::ActiveRecord::Promise + # @return [Complete] a new instance of Complete + # + # source://activerecord//lib/active_record/promise.rb#66 + def initialize(value); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/promise.rb#74 + def pending?; end + + # source://activerecord//lib/active_record/promise.rb#70 + def then; end + + # Returns the value of attribute value. + # + # source://activerecord//lib/active_record/promise.rb#64 + def value; end + + private + + # source://activerecord//lib/active_record/promise.rb#79 + def status; end +end + +# source://activerecord//lib/active_record/migration.rb#195 class ActiveRecord::ProtectedEnvironmentError < ::ActiveRecord::ActiveRecordError # @return [ProtectedEnvironmentError] a new instance of ProtectedEnvironmentError # - # source://activerecord//lib/active_record/migration.rb#189 + # source://activerecord//lib/active_record/migration.rb#196 def initialize(env = T.unsafe(nil)); end end # Superclass for errors that have been aborted (either by client or server). # -# source://activerecord//lib/active_record/errors.rb#445 +# source://activerecord//lib/active_record/errors.rb#534 class ActiveRecord::QueryAborted < ::ActiveRecord::StatementInvalid; end # = Active Record Query Cache @@ -26110,10 +27749,10 @@ class ActiveRecord::QueryAborted < ::ActiveRecord::StatementInvalid; end # source://activerecord//lib/active_record/query_cache.rb#5 class ActiveRecord::QueryCache class << self - # source://activerecord//lib/active_record/query_cache.rb#42 + # source://activerecord//lib/active_record/query_cache.rb#32 def complete(pools); end - # source://activerecord//lib/active_record/query_cache.rb#58 + # source://activerecord//lib/active_record/query_cache.rb#40 def install_executor_hooks(executor = T.unsafe(nil)); end # source://activerecord//lib/active_record/query_cache.rb#28 @@ -26138,14 +27777,25 @@ end # QueryCanceled will be raised when canceling statement due to user request. # -# source://activerecord//lib/active_record/errors.rb#457 +# source://activerecord//lib/active_record/errors.rb#546 class ActiveRecord::QueryCanceled < ::ActiveRecord::QueryAborted; end # = Active Record Query Logs # -# Automatically tag SQL queries with runtime information. +# Automatically append comments to SQL queries with runtime information tags. This can be used to trace troublesome +# SQL statements back to the application code that generated these statements. +# +# Query logs can be enabled via \Rails configuration in config/application.rb or an initializer: +# +# config.active_record.query_log_tags_enabled = true # -# Default tags available for use: +# By default the name of the application, the name and action of the controller, or the name of the job are logged. +# The default format is {SQLCommenter}[https://open-telemetry.github.io/opentelemetry-sqlcommenter/]. +# The tags shown in a query comment can be configured via \Rails configuration: +# +# config.active_record.query_log_tags = [ :application, :controller, :action, :job ] +# +# Active Record defines default tags available for use: # # * +application+ # * +pid+ @@ -26153,48 +27803,40 @@ class ActiveRecord::QueryCanceled < ::ActiveRecord::QueryAborted; end # * +db_host+ # * +database+ # -# _Action Controller and Active Job tags are also defined when used in Rails:_ +# Action Controller adds default tags when loaded: # # * +controller+ # * +action+ -# * +job+ -# -# The tags used in a query can be configured directly: +# * +namespaced_controller+ # -# ActiveRecord::QueryLogs.tags = [ :application, :controller, :action, :job ] +# Active Job adds default tags when loaded: # -# or via Rails configuration: -# -# config.active_record.query_log_tags = [ :application, :controller, :action, :job ] +# * +job+ # -# To add new comment tags, add a hash to the tags array containing the keys and values you -# want to add to the comment. Dynamic content can be created by setting a proc or lambda value in a hash, -# and can reference any value stored in the +context+ object. +# New comment tags can be defined by adding them in a +Hash+ to the tags +Array+. Tags can have dynamic content by +# setting a +Proc+ or lambda value in the +Hash+, and can reference any value stored by \Rails in the +context+ object. +# ActiveSupport::CurrentAttributes can be used to store application values. Tags with +nil+ values are +# omitted from the query comment. # # Escaping is performed on the string returned, however untrusted user input should not be used. # # Example: # -# tags = [ -# :application, -# { -# custom_tag: ->(context) { context[:controller]&.controller_name }, -# custom_value: -> { Custom.value }, -# } -# ] -# ActiveRecord::QueryLogs.tags = tags -# -# The QueryLogs +context+ can be manipulated via the +ActiveSupport::ExecutionContext.set+ method. -# -# Temporary updates limited to the execution of a block: -# -# ActiveSupport::ExecutionContext.set(foo: Bar.new) do -# posts = Post.all -# end -# -# Direct updates to a context value: +# config.active_record.query_log_tags = [ +# :namespaced_controller, +# :action, +# :job, +# { +# request_id: ->(context) { context[:controller]&.request&.request_id }, +# job_id: ->(context) { context[:job]&.job_id }, +# tenant_id: -> { Current.tenant&.id }, +# static: "value", +# }, +# ] # -# ActiveSupport::ExecutionContext[:foo] = Bar.new +# By default the name of the application, the name and action of the controller, or the name of the job are logged +# using the {SQLCommenter}[https://open-telemetry.github.io/opentelemetry-sqlcommenter/] format. This can be changed +# via {config.active_record.query_log_tags_format}[https://guides.rubyonrails.org/configuring.html#config-active-record-query-log-tags-format] # # Tag comments can be prepended to the query: # @@ -26203,13 +27845,9 @@ class ActiveRecord::QueryCanceled < ::ActiveRecord::QueryAborted; end # For applications where the content will not change during the lifetime of # the request or job execution, the tags can be cached for reuse in every query: # -# ActiveRecord::QueryLogs.cache_query_log_tags = true -# -# This option can be set during application configuration or in a Rails initializer: -# # config.active_record.cache_query_log_tags = true # -# source://activerecord//lib/active_record/query_logs.rb#73 +# source://activerecord//lib/active_record/query_logs_formatter.rb#4 module ActiveRecord::QueryLogs class << self # source://activerecord//lib/active_record/query_logs.rb#77 @@ -26218,16 +27856,16 @@ module ActiveRecord::QueryLogs # source://activerecord//lib/active_record/query_logs.rb#77 def cache_query_log_tags=(val); end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#48 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 def cached_comment; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#92 + # source://activesupport/7.1.3.2/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#81 - def call(sql); end + # source://activerecord//lib/active_record/query_logs.rb#82 + def call(sql, connection); end - # source://activerecord//lib/active_record/query_logs.rb#89 + # source://activerecord//lib/active_record/query_logs.rb#94 def clear_cache; end # source://activerecord//lib/active_record/query_logs.rb#76 @@ -26248,30 +27886,83 @@ module ActiveRecord::QueryLogs # source://activerecord//lib/active_record/query_logs.rb#75 def tags=(val); end + # source://activerecord//lib/active_record/query_logs.rb#78 + def tags_formatter; end + + # source://activerecord//lib/active_record/query_logs.rb#78 + def tags_formatter=(val); end + + # Updates the formatter to be what the passed in format is. + # + # source://activerecord//lib/active_record/query_logs.rb#99 + def update_formatter(format); end + private # Returns an SQL comment +String+ containing the query log tags. # Sets and returns a cached comment if cache_query_log_tags is +true+. # - # source://activerecord//lib/active_record/query_logs.rb#98 - def comment; end + # source://activerecord//lib/active_record/query_logs.rb#116 + def comment(connection); end - # source://activerecord//lib/active_record/query_logs.rb#113 + # source://activerecord//lib/active_record/query_logs.rb#136 def escape_sql_comment(content); end - # source://activerecord//lib/active_record/query_logs.rb#126 - def tag_content; end + # source://activerecord//lib/active_record/query_logs.rb#124 + def formatter; end - # source://activerecord//lib/active_record/query_logs.rb#106 - def uncached_comment; end + # source://activerecord//lib/active_record/query_logs.rb#149 + def tag_content(connection); end + + # source://activerecord//lib/active_record/query_logs.rb#128 + def uncached_comment(connection); end end end -# source://activerecord//lib/active_record/relation/query_methods.rb#10 +# source://activerecord//lib/active_record/query_logs_formatter.rb#5 +class ActiveRecord::QueryLogs::LegacyFormatter + # @return [LegacyFormatter] a new instance of LegacyFormatter + # + # source://activerecord//lib/active_record/query_logs_formatter.rb#6 + def initialize; end + + # Formats the key value pairs into a string. + # + # source://activerecord//lib/active_record/query_logs_formatter.rb#11 + def format(pairs); end + + private + + # source://activerecord//lib/active_record/query_logs_formatter.rb#20 + def format_value(value); end + + # Returns the value of attribute key_value_separator. + # + # source://activerecord//lib/active_record/query_logs_formatter.rb#18 + def key_value_separator; end +end + +# source://activerecord//lib/active_record/query_logs_formatter.rb#25 +class ActiveRecord::QueryLogs::SQLCommenter < ::ActiveRecord::QueryLogs::LegacyFormatter + # @return [SQLCommenter] a new instance of SQLCommenter + # + # source://activerecord//lib/active_record/query_logs_formatter.rb#26 + def initialize; end + + # source://activerecord//lib/active_record/query_logs_formatter.rb#30 + def format(pairs); end + + private + + # source://activerecord//lib/active_record/query_logs_formatter.rb#36 + def format_value(value); end +end + +# source://activerecord//lib/active_record/relation/query_methods.rb#9 module ActiveRecord::QueryMethods include ::ActiveModel::ForbiddenAttributesProtection - # source://activerecord//lib/active_record/relation/query_methods.rb#325 + # source://activerecord//lib/active_record/relation/query_methods.rb#405 def _select!(*fields); end # Returns a new relation, which is the logical intersection of this relation and the one passed @@ -26284,10 +27975,10 @@ module ActiveRecord::QueryMethods # Post.where(id: [1, 2]).and(Post.where(id: [2, 3])) # # SELECT `posts`.* FROM `posts` WHERE `posts`.`id` IN (1, 2) AND `posts`.`id` IN (2, 3) # - # source://activerecord//lib/active_record/relation/query_methods.rb#853 + # source://activerecord//lib/active_record/relation/query_methods.rb#1034 def and(other); end - # source://activerecord//lib/active_record/relation/query_methods.rb#861 + # source://activerecord//lib/active_record/relation/query_methods.rb#1042 def and!(other); end # Adds an SQL comment to queries generated from this relation. For example: @@ -26302,26 +27993,26 @@ module ActiveRecord::QueryMethods # # Some escaping is performed, however untrusted user input should not be used. # - # source://activerecord//lib/active_record/relation/query_methods.rb#1229 + # source://activerecord//lib/active_record/relation/query_methods.rb#1428 def annotate(*args); end # Like #annotate, but modifies relation in place. # - # source://activerecord//lib/active_record/relation/query_methods.rb#1235 + # source://activerecord//lib/active_record/relation/query_methods.rb#1434 def annotate!(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def annotate_values; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def annotate_values=(value); end # Returns the Arel object associated with the relation. # - # source://activerecord//lib/active_record/relation/query_methods.rb#1290 + # source://activerecord//lib/active_record/relation/query_methods.rb#1489 def arel(aliases = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1294 + # source://activerecord//lib/active_record/relation/query_methods.rb#1493 def construct_join_dependency(associations, join_type); end # Sets attributes to be used when creating new records from a @@ -26338,16 +28029,16 @@ module ActiveRecord::QueryMethods # users = users.create_with(nil) # users.new.name # => 'Oscar' # - # source://activerecord//lib/active_record/relation/query_methods.rb#1046 + # source://activerecord//lib/active_record/relation/query_methods.rb#1245 def create_with(value); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1050 + # source://activerecord//lib/active_record/relation/query_methods.rb#1249 def create_with!(value); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def create_with_value; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def create_with_value=(value); end # Specifies whether the records should be unique or not. For example: @@ -26361,37 +28052,57 @@ module ActiveRecord::QueryMethods # User.select(:name).distinct.distinct(false) # # You can also remove the uniqueness # - # source://activerecord//lib/active_record/relation/query_methods.rb#1110 + # source://activerecord//lib/active_record/relation/query_methods.rb#1309 def distinct(value = T.unsafe(nil)); end # Like #distinct, but modifies relation in place. # - # source://activerecord//lib/active_record/relation/query_methods.rb#1115 + # source://activerecord//lib/active_record/relation/query_methods.rb#1314 def distinct!(value = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def distinct_value; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def distinct_value=(value); end - # Forces eager loading by performing a LEFT OUTER JOIN on +args+: + # Specify associations +args+ to be eager loaded using a LEFT OUTER JOIN. + # Performs a single query joining all specified associations. For example: + # + # users = User.eager_load(:address).limit(5) + # users.each do |user| + # user.address.city + # end + # + # # SELECT "users"."id" AS t0_r0, "users"."name" AS t0_r1, ... FROM "users" + # # LEFT OUTER JOIN "addresses" ON "addresses"."id" = "users"."address_id" + # # LIMIT 5 + # + # Instead of loading the 5 addresses with 5 separate queries, all addresses + # are loaded with a single joined query. + # + # Loading multiple and nested associations is possible using Hashes and Arrays, + # similar to #includes: # - # User.eager_load(:posts) - # # SELECT "users"."id" AS t0_r0, "users"."name" AS t0_r1, ... - # # FROM "users" LEFT OUTER JOIN "posts" ON "posts"."user_id" = - # # "users"."id" + # User.eager_load(:address, friends: [:address, :followers]) + # # SELECT "users"."id" AS t0_r0, "users"."name" AS t0_r1, ... FROM "users" + # # LEFT OUTER JOIN "addresses" ON "addresses"."id" = "users"."address_id" + # # LEFT OUTER JOIN "friends" ON "friends"."user_id" = "users"."id" + # # ... # - # source://activerecord//lib/active_record/relation/query_methods.rb#215 + # NOTE: Loading the associations in a join can result in many rows that + # contain redundant data and it performs poorly at scale. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#267 def eager_load(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#220 + # source://activerecord//lib/active_record/relation/query_methods.rb#272 def eager_load!(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def eager_load_values; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def eager_load_values=(value); end # Excludes the specified record (or collection of records) from the resulting @@ -26418,10 +28129,10 @@ module ActiveRecord::QueryMethods # is passed in) are not instances of the same model that the relation is # scoping. # - # source://activerecord//lib/active_record/relation/query_methods.rb#1271 + # source://activerecord//lib/active_record/relation/query_methods.rb#1470 def excluding(*records); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1283 + # source://activerecord//lib/active_record/relation/query_methods.rb#1482 def excluding!(records); end # Used to extend a scope with additional methods, either through @@ -26429,7 +28140,7 @@ module ActiveRecord::QueryMethods # # The object returned is a relation, which can be further extended. # - # === Using a module + # === Using a \Module # # module Pagination # def page(number) @@ -26444,7 +28155,7 @@ module ActiveRecord::QueryMethods # # scope = Model.all.extending(Pagination, SomethingElse) # - # === Using a block + # === Using a Block # # scope = Model.all.extending do # def page(number) @@ -26461,19 +28172,19 @@ module ActiveRecord::QueryMethods # end # end # - # source://activerecord//lib/active_record/relation/query_methods.rb#1156 + # source://activerecord//lib/active_record/relation/query_methods.rb#1355 def extending(*modules, &block); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1164 + # source://activerecord//lib/active_record/relation/query_methods.rb#1363 def extending!(*modules, &block); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def extending_values; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def extending_values=(value); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def extensions; end # Extracts a named +association+ from the relation. The named association is first preloaded, @@ -26486,7 +28197,7 @@ module ActiveRecord::QueryMethods # # account.memberships.preload(:user).collect(&:user) # - # source://activerecord//lib/active_record/relation/query_methods.rb#248 + # source://activerecord//lib/active_record/relation/query_methods.rb#318 def extract_associated(association); end # Specifies the table from which the records will be fetched. For example: @@ -26520,16 +28231,16 @@ module ActiveRecord::QueryMethods # # FROM colors c, JSONB_ARRAY_ELEMENTS(colored_things) AS colorvalues(colorvalue) # # WHERE (colorvalue->>'color' = 'red') # - # source://activerecord//lib/active_record/relation/query_methods.rb#1091 + # source://activerecord//lib/active_record/relation/query_methods.rb#1290 def from(value, subquery_name = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1095 + # source://activerecord//lib/active_record/relation/query_methods.rb#1294 def from!(value, subquery_name = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def from_clause; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def from_clause=(value); end # Allows to specify a group attribute: @@ -26553,16 +28264,16 @@ module ActiveRecord::QueryMethods # User.select([:id, :first_name]).group(:id, :first_name).first(3) # # => [#, #, #] # - # source://activerecord//lib/active_record/relation/query_methods.rb#371 + # source://activerecord//lib/active_record/relation/query_methods.rb#512 def group(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#376 + # source://activerecord//lib/active_record/relation/query_methods.rb#517 def group!(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def group_values; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def group_values=(value); end # Allows to specify a HAVING clause. Note that you can't use HAVING @@ -26570,79 +28281,106 @@ module ActiveRecord::QueryMethods # # Order.having('SUM(price) > 30').group('user_id') # - # source://activerecord//lib/active_record/relation/query_methods.rb#911 + # source://activerecord//lib/active_record/relation/query_methods.rb#1096 def having(opts, *rest); end - # source://activerecord//lib/active_record/relation/query_methods.rb#915 + # source://activerecord//lib/active_record/relation/query_methods.rb#1100 def having!(opts, *rest); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def having_clause; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def having_clause=(value); end - # Allows to specify an order by a specific set of values. Depending on your - # adapter this will either use a CASE statement or a built-in function. + # Allows to specify an order by a specific set of values. # # User.in_order_of(:id, [1, 5, 3]) # # SELECT "users".* FROM "users" - # # ORDER BY FIELD("users"."id", 1, 5, 3) # # WHERE "users"."id" IN (1, 5, 3) + # # ORDER BY CASE + # # WHEN "users"."id" = 1 THEN 1 + # # WHEN "users"."id" = 5 THEN 2 + # # WHEN "users"."id" = 3 THEN 3 + # # END ASC # - # source://activerecord//lib/active_record/relation/query_methods.rb#455 + # source://activerecord//lib/active_record/relation/query_methods.rb#620 def in_order_of(column, values); end - # Specify relationships to be included in the result set. For - # example: + # Specify associations +args+ to be eager loaded to prevent N + 1 queries. + # A separate query is performed for each association, unless a join is + # required by conditions. # - # users = User.includes(:address) + # For example: + # + # users = User.includes(:address).limit(5) # users.each do |user| # user.address.city # end # - # allows you to access the +address+ attribute of the +User+ model without - # firing an additional query. This will often result in a - # performance improvement over a simple join. + # # SELECT "users".* FROM "users" LIMIT 5 + # # SELECT "addresses".* FROM "addresses" WHERE "addresses"."id" IN (1,2,3,4,5) + # + # Instead of loading the 5 addresses with 5 separate queries, all addresses + # are loaded with a single query. # - # You can also specify multiple relationships, like this: + # Loading the associations in a separate query will often result in a + # performance improvement over a simple join, as a join can result in many + # rows that contain redundant data and it performs poorly at scale. # - # users = User.includes(:address, :friends) + # You can also specify multiple associations. Each association will result + # in an additional query: + # + # User.includes(:address, :friends).to_a + # # SELECT "users".* FROM "users" + # # SELECT "addresses".* FROM "addresses" WHERE "addresses"."id" IN (1,2,3,4,5) + # # SELECT "friends".* FROM "friends" WHERE "friends"."user_id" IN (1,2,3,4,5) # - # Loading nested relationships is possible using a Hash: + # Loading nested associations is possible using a Hash: # - # users = User.includes(:address, friends: [:address, :followers]) + # User.includes(:address, friends: [:address, :followers]) # # === Conditions # # If you want to add string conditions to your included models, you'll have # to explicitly reference them. For example: # - # User.includes(:posts).where('posts.name = ?', 'example') + # User.includes(:posts).where('posts.name = ?', 'example').to_a # # Will throw an error, but this will work: # - # User.includes(:posts).where('posts.name = ?', 'example').references(:posts) + # User.includes(:posts).where('posts.name = ?', 'example').references(:posts).to_a + # # SELECT "users"."id" AS t0_r0, ... FROM "users" + # # LEFT OUTER JOIN "posts" ON "posts"."user_id" = "users"."id" + # # WHERE "posts"."name" = ? [["name", "example"]] + # + # As the LEFT OUTER JOIN already contains the posts, the second query for + # the posts is no longer performed. # # Note that #includes works with association names while #references needs # the actual table name. # - # If you pass the conditions via hash, you don't need to call #references + # If you pass the conditions via a Hash, you don't need to call #references # explicitly, as #where references the tables for you. For example, this # will work correctly: # # User.includes(:posts).where(posts: { name: 'example' }) # - # source://activerecord//lib/active_record/relation/query_methods.rb#199 + # NOTE: Conditions affect both sides of an association. For example, the + # above code will return only users that have a post named "example", + # and will only include posts named "example", even when a + # matching user has other additional posts. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#231 def includes(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#204 + # source://activerecord//lib/active_record/relation/query_methods.rb#236 def includes!(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def includes_values; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def includes_values=(value); end # Allows you to invert an entire where clause instead of manually applying conditions. @@ -26674,10 +28412,10 @@ module ActiveRecord::QueryMethods # User.where(role: 'admin').inactive # # WHERE NOT (`role` = 'admin' AND `accepted` = 1 AND `locked` = 0) # - # source://activerecord//lib/active_record/relation/query_methods.rb#819 + # source://activerecord//lib/active_record/relation/query_methods.rb#1000 def invert_where; end - # source://activerecord//lib/active_record/relation/query_methods.rb#823 + # source://activerecord//lib/active_record/relation/query_methods.rb#1004 def invert_where!; end # Performs JOINs on +args+. The given symbol(s) should match the name of @@ -26709,41 +28447,41 @@ module ActiveRecord::QueryMethods # User.joins("LEFT JOIN bookmarks ON bookmarks.bookmarkable_type = 'Post' AND bookmarks.user_id = users.id") # # SELECT "users".* FROM "users" LEFT JOIN bookmarks ON bookmarks.bookmarkable_type = 'Post' AND bookmarks.user_id = users.id # - # source://activerecord//lib/active_record/relation/query_methods.rb#594 + # source://activerecord//lib/active_record/relation/query_methods.rb#767 def joins(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#599 + # source://activerecord//lib/active_record/relation/query_methods.rb#772 def joins!(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def joins_values; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def joins_values=(value); end # Performs LEFT OUTER JOINs on +args+: # # User.left_outer_joins(:posts) - # => SELECT "users".* FROM "users" LEFT OUTER JOIN "posts" ON "posts"."user_id" = "users"."id" + # # SELECT "users".* FROM "users" LEFT OUTER JOIN "posts" ON "posts"."user_id" = "users"."id" # - # source://activerecord//lib/active_record/relation/query_methods.rb#609 + # source://activerecord//lib/active_record/relation/query_methods.rb#782 def left_joins(*args); end # Performs LEFT OUTER JOINs on +args+: # # User.left_outer_joins(:posts) - # => SELECT "users".* FROM "users" LEFT OUTER JOIN "posts" ON "posts"."user_id" = "users"."id" + # # SELECT "users".* FROM "users" LEFT OUTER JOIN "posts" ON "posts"."user_id" = "users"."id" # - # source://activerecord//lib/active_record/relation/query_methods.rb#609 + # source://activerecord//lib/active_record/relation/query_methods.rb#782 def left_outer_joins(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#615 + # source://activerecord//lib/active_record/relation/query_methods.rb#788 def left_outer_joins!(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def left_outer_joins_values; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def left_outer_joins_values=(value); end # Specifies a limit for the number of records to retrieve. @@ -26752,31 +28490,31 @@ module ActiveRecord::QueryMethods # # User.limit(10).limit(20) # generated SQL has 'LIMIT 20' # - # source://activerecord//lib/active_record/relation/query_methods.rb#925 + # source://activerecord//lib/active_record/relation/query_methods.rb#1110 def limit(value); end - # source://activerecord//lib/active_record/relation/query_methods.rb#929 + # source://activerecord//lib/active_record/relation/query_methods.rb#1114 def limit!(value); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def limit_value; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def limit_value=(value); end # Specifies locking settings (default to +true+). For more information # on locking, please see ActiveRecord::Locking. # - # source://activerecord//lib/active_record/relation/query_methods.rb#952 + # source://activerecord//lib/active_record/relation/query_methods.rb#1137 def lock(locks = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#956 + # source://activerecord//lib/active_record/relation/query_methods.rb#1141 def lock!(locks = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def lock_value; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def lock_value=(value); end # Returns a chainable relation with zero records. @@ -26807,12 +28545,17 @@ module ActiveRecord::QueryMethods # end # end # - # source://activerecord//lib/active_record/relation/query_methods.rb#995 + # source://activerecord//lib/active_record/relation/query_methods.rb#1180 def none; end - # source://activerecord//lib/active_record/relation/query_methods.rb#999 + # source://activerecord//lib/active_record/relation/query_methods.rb#1184 def none!; end + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1192 + def null_relation?; end + # Specifies the number of rows to skip before returning rows. # # User.offset(10) # generated SQL has "OFFSET 10" @@ -26821,16 +28564,16 @@ module ActiveRecord::QueryMethods # # User.offset(10).order("name ASC") # - # source://activerecord//lib/active_record/relation/query_methods.rb#941 + # source://activerecord//lib/active_record/relation/query_methods.rb#1126 def offset(value); end - # source://activerecord//lib/active_record/relation/query_methods.rb#945 + # source://activerecord//lib/active_record/relation/query_methods.rb#1130 def offset!(value); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def offset_value; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def offset_value=(value); end # Specify optimizer hints to be used in the SELECT statement. @@ -26845,16 +28588,16 @@ module ActiveRecord::QueryMethods # Topic.optimizer_hints("SeqScan(topics)", "Parallel(topics 8)") # # SELECT /*+ SeqScan(topics) Parallel(topics 8) */ "topics".* FROM "topics" # - # source://activerecord//lib/active_record/relation/query_methods.rb#1185 + # source://activerecord//lib/active_record/relation/query_methods.rb#1384 def optimizer_hints(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1190 + # source://activerecord//lib/active_record/relation/query_methods.rb#1389 def optimizer_hints!(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def optimizer_hints_values; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def optimizer_hints_values=(value); end # Returns a new relation, which is the logical union of this relation and the one passed as an @@ -26867,10 +28610,10 @@ module ActiveRecord::QueryMethods # Post.where("id = 1").or(Post.where("author_id = 3")) # # SELECT `posts`.* FROM `posts` WHERE ((id = 1) OR (author_id = 3)) # - # source://activerecord//lib/active_record/relation/query_methods.rb#885 + # source://activerecord//lib/active_record/relation/query_methods.rb#1066 def or(other); end - # source://activerecord//lib/active_record/relation/query_methods.rb#893 + # source://activerecord//lib/active_record/relation/query_methods.rb#1078 def or!(other); end # Applies an ORDER BY clause to a query. @@ -26921,63 +28664,87 @@ module ActiveRecord::QueryMethods # User.order(Arel.sql('end_date - start_date')) # # SELECT "users".* FROM "users" ORDER BY end_date - start_date # - # Custom query syntax, like JSON columns for Postgres, is supported in this way. + # Custom query syntax, like JSON columns for PostgreSQL, is supported in this way. # # User.order(Arel.sql("payload->>'kind'")) # # SELECT "users".* FROM "users" ORDER BY payload->>'kind' # - # source://activerecord//lib/active_record/relation/query_methods.rb#433 + # source://activerecord//lib/active_record/relation/query_methods.rb#595 def order(*args); end # Same as #order but operates on relation in-place instead of copying. # - # source://activerecord//lib/active_record/relation/query_methods.rb#441 + # source://activerecord//lib/active_record/relation/query_methods.rb#603 def order!(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def order_values; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def order_values=(value); end - # Allows preloading of +args+, in the same way that #includes does: + # Specify associations +args+ to be eager loaded using separate queries. + # A separate query is performed for each association. # - # User.preload(:posts) - # # SELECT "posts".* FROM "posts" WHERE "posts"."user_id" IN (1, 2, 3) + # users = User.preload(:address).limit(5) + # users.each do |user| + # user.address.city + # end + # + # # SELECT "users".* FROM "users" LIMIT 5 + # # SELECT "addresses".* FROM "addresses" WHERE "addresses"."id" IN (1,2,3,4,5) + # + # Instead of loading the 5 addresses with 5 separate queries, all addresses + # are loaded with a separate query. # - # source://activerecord//lib/active_record/relation/query_methods.rb#229 + # Loading multiple and nested associations is possible using Hashes and Arrays, + # similar to #includes: + # + # User.preload(:address, friends: [:address, :followers]) + # # SELECT "users".* FROM "users" + # # SELECT "addresses".* FROM "addresses" WHERE "addresses"."id" IN (1,2,3,4,5) + # # SELECT "friends".* FROM "friends" WHERE "friends"."user_id" IN (1,2,3,4,5) + # # SELECT ... + # + # source://activerecord//lib/active_record/relation/query_methods.rb#299 def preload(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#234 + # source://activerecord//lib/active_record/relation/query_methods.rb#304 def preload!(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def preload_values; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def preload_values=(value); end - # Sets readonly attributes for the returned relation. If value is - # true (default), attempting to update a record will result in an error. + # Mark a relation as readonly. Attempting to update a record will result in + # an error. # # users = User.readonly # users.first.save # => ActiveRecord::ReadOnlyRecord: User is marked as readonly # - # source://activerecord//lib/active_record/relation/query_methods.rb#1009 + # To make a readonly relation writable, pass +false+. + # + # users.readonly(false) + # users.first.save + # => true + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1208 def readonly(value = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1013 + # source://activerecord//lib/active_record/relation/query_methods.rb#1212 def readonly!(value = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def readonly_value; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def readonly_value=(value); end # Use to indicate that the given +table_names+ are referenced by an SQL string, - # and should therefore be JOINed in any query rather than loaded separately. + # and should therefore be +JOIN+ed in any query rather than loaded separately. # This method only works in conjunction with #includes. # See #includes for more details. # @@ -26987,18 +28754,37 @@ module ActiveRecord::QueryMethods # User.includes(:posts).where("posts.name = 'foo'").references(:posts) # # Query now knows the string references posts, so adds a JOIN # - # source://activerecord//lib/active_record/relation/query_methods.rb#262 + # source://activerecord//lib/active_record/relation/query_methods.rb#332 def references(*table_names); end - # source://activerecord//lib/active_record/relation/query_methods.rb#267 + # source://activerecord//lib/active_record/relation/query_methods.rb#337 def references!(*table_names); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def references_values; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def references_values=(value); end + # Allows you to change a previously set group statement. + # + # Post.group(:title, :body) + # # SELECT `posts`.`*` FROM `posts` GROUP BY `posts`.`title`, `posts`.`body` + # + # Post.group(:title, :body).regroup(:title) + # # SELECT `posts`.`*` FROM `posts` GROUP BY `posts`.`title` + # + # This is short-hand for unscope(:group).group(fields). + # Note that we're unscoping the entire group statement. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#532 + def regroup(*args); end + + # Same as #regroup but operates on relation in-place instead of copying. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#538 + def regroup!(*args); end + # Replaces any existing order defined on the relation with the specified order. # # User.order('email DESC').reorder('id ASC') # generated SQL has 'ORDER BY id ASC' @@ -27007,20 +28793,20 @@ module ActiveRecord::QueryMethods # # User.order('email DESC').reorder('id ASC').order('name ASC') # - # generates a query with 'ORDER BY id ASC, name ASC'. + # generates a query with ORDER BY id ASC, name ASC. # - # source://activerecord//lib/active_record/relation/query_methods.rb#479 + # source://activerecord//lib/active_record/relation/query_methods.rb#651 def reorder(*args); end # Same as #reorder but operates on relation in-place instead of copying. # - # source://activerecord//lib/active_record/relation/query_methods.rb#487 + # source://activerecord//lib/active_record/relation/query_methods.rb#659 def reorder!(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def reordering_value; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def reordering_value=(value); end # Allows you to change a previously set select statement. @@ -27034,28 +28820,28 @@ module ActiveRecord::QueryMethods # This is short-hand for unscope(:select).select(fields). # Note that we're unscoping the entire select statement. # - # source://activerecord//lib/active_record/relation/query_methods.rb#340 + # source://activerecord//lib/active_record/relation/query_methods.rb#480 def reselect(*args); end # Same as #reselect but operates on relation in-place instead of copying. # - # source://activerecord//lib/active_record/relation/query_methods.rb#346 + # source://activerecord//lib/active_record/relation/query_methods.rb#487 def reselect!(*args); end # Reverse the existing order clause on the relation. # # User.order('name ASC').reverse_order # generated SQL has 'ORDER BY name DESC' # - # source://activerecord//lib/active_record/relation/query_methods.rb#1198 + # source://activerecord//lib/active_record/relation/query_methods.rb#1397 def reverse_order; end - # source://activerecord//lib/active_record/relation/query_methods.rb#1202 + # source://activerecord//lib/active_record/relation/query_methods.rb#1401 def reverse_order!; end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def reverse_order_value; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def reverse_order_value=(value); end # Allows you to change a previously set where condition for a given attribute, instead of appending to that condition. @@ -27072,7 +28858,7 @@ module ActiveRecord::QueryMethods # This is short-hand for unscope(where: conditions.keys).where(conditions). # Note that unlike reorder, we're only unscoping the named conditions -- not the entire where statement. # - # source://activerecord//lib/active_record/relation/query_methods.rb#781 + # source://activerecord//lib/active_record/relation/query_methods.rb#960 def rewhere(conditions); end # Works in two unique ways. @@ -27100,6 +28886,14 @@ module ActiveRecord::QueryMethods # Model.select(:field, :other_field, :and_one_more) # # => [#] # + # The argument also can be a hash of fields and aliases. + # + # Model.select(models: { field: :alias, other_field: :other_alias }) + # # => [#] + # + # Model.select(models: [:field, :other_field]) + # # => [#] + # # You can also use one or more strings, which will be used unchanged as SELECT fields. # # Model.select('field AS field_one', 'other_field AS field_two') @@ -27114,27 +28908,27 @@ module ActiveRecord::QueryMethods # except +id+ will throw ActiveModel::MissingAttributeError: # # Model.select(:field).first.other_field - # # => ActiveModel::MissingAttributeError: missing attribute: other_field + # # => ActiveModel::MissingAttributeError: missing attribute 'other_field' for Model # - # source://activerecord//lib/active_record/relation/query_methods.rb#312 + # source://activerecord//lib/active_record/relation/query_methods.rb#390 def select(*fields); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def select_values; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def select_values=(value); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1213 + # source://activerecord//lib/active_record/relation/query_methods.rb#1412 def skip_preloading!; end - # source://activerecord//lib/active_record/relation/query_methods.rb#1208 + # source://activerecord//lib/active_record/relation/query_methods.rb#1407 def skip_query_cache!(value = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def skip_query_cache_value; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def skip_query_cache_value=(value); end # Sets the returned relation to strict_loading mode. This will raise an error @@ -27144,16 +28938,16 @@ module ActiveRecord::QueryMethods # user.comments.to_a # => ActiveRecord::StrictLoadingViolationError # - # source://activerecord//lib/active_record/relation/query_methods.rb#1024 + # source://activerecord//lib/active_record/relation/query_methods.rb#1223 def strict_loading(value = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1028 + # source://activerecord//lib/active_record/relation/query_methods.rb#1227 def strict_loading!(value = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def strict_loading_value; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def strict_loading_value=(value); end # Checks whether the given relation is structurally compatible with this relation, to determine @@ -27169,12 +28963,12 @@ module ActiveRecord::QueryMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/relation/query_methods.rb#839 + # source://activerecord//lib/active_record/relation/query_methods.rb#1020 def structurally_compatible?(other); end # Deduplicate multiple values. # - # source://activerecord//lib/active_record/relation/query_methods.rb#1241 + # source://activerecord//lib/active_record/relation/query_methods.rb#1440 def uniq!(name); end # Removes an unwanted relation that is already defined on a chain of relations. @@ -27210,16 +29004,16 @@ module ActiveRecord::QueryMethods # # has_many :comments, -> { unscope(where: :trashed) } # - # source://activerecord//lib/active_record/relation/query_methods.rb#532 + # source://activerecord//lib/active_record/relation/query_methods.rb#705 def unscope(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#537 + # source://activerecord//lib/active_record/relation/query_methods.rb#710 def unscope!(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def unscope_values; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def unscope_values=(value); end # Returns a new relation, which is the result of filtering the current relation @@ -27229,7 +29023,7 @@ module ActiveRecord::QueryMethods # SQL is given as an illustration; the actual query generated may be different depending # on the database adapter. # - # === string + # === \String # # A single string, without additional arguments, is passed to the query # constructor as an SQL fragment, and used in the where clause of the query. @@ -27241,7 +29035,7 @@ module ActiveRecord::QueryMethods # to injection attacks if not done properly. As an alternative, it is recommended # to use one of the following methods. # - # === array + # === \Array # # If an array is passed, then the first element of the array is treated as a template, and # the remaining elements are inserted into the template to generate the condition. @@ -27281,7 +29075,7 @@ module ActiveRecord::QueryMethods # dependencies on the underlying database. If your code is intended for general consumption, # test with multiple database backends. # - # === hash + # === \Hash # # #where will also accept a hash condition, in which the keys are fields and the values # are values to be searched for. @@ -27315,6 +29109,12 @@ module ActiveRecord::QueryMethods # PriceEstimate.where(estimate_of: treasure) # PriceEstimate.where(estimate_of_type: 'Treasure', estimate_of_id: treasure) # + # Hash conditions may also be specified in a tuple-like syntax. Hash keys may be + # an array of columns with an array of tuples as values. + # + # Article.where([:author_id, :id] => [[15, 1], [15, 2]]) + # # SELECT * FROM articles WHERE author_id = 15 AND id = 1 OR author_id = 15 AND id = 2 + # # === Joins # # If the relation is the result of a join, you may create a condition which uses any of the @@ -27327,7 +29127,7 @@ module ActiveRecord::QueryMethods # User.joins(:posts).where("posts.published" => true) # User.joins(:posts).where(posts: { published: true }) # - # === no argument + # === No Argument # # If no argument is passed, #where returns a new instance of WhereChain, that # can be chained with WhereChain#not, WhereChain#missing, or WhereChain#associated. @@ -27351,23 +29151,87 @@ module ActiveRecord::QueryMethods # # LEFT OUTER JOIN "authors" ON "authors"."id" = "posts"."author_id" # # WHERE "authors"."id" IS NULL # - # === blank condition + # === Blank Condition # # If the condition is any blank-ish object, then #where is a no-op and returns # the current relation. # - # source://activerecord//lib/active_record/relation/query_methods.rb#753 + # source://activerecord//lib/active_record/relation/query_methods.rb#932 def where(*args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#763 + # source://activerecord//lib/active_record/relation/query_methods.rb#942 def where!(opts, *rest); end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def where_clause; end - # source://activerecord//lib/active_record/relation/query_methods.rb#151 + # source://activerecord//lib/active_record/relation/query_methods.rb#159 def where_clause=(value); end + # Add a Common Table Expression (CTE) that you can then reference within another SELECT statement. + # + # Note: CTE's are only supported in MySQL for versions 8.0 and above. You will not be able to + # use CTE's with MySQL 5.7. + # + # Post.with(posts_with_tags: Post.where("tags_count > ?", 0)) + # # => ActiveRecord::Relation + # # WITH posts_with_tags AS ( + # # SELECT * FROM posts WHERE (tags_count > 0) + # # ) + # # SELECT * FROM posts + # + # Once you define Common Table Expression you can use custom +FROM+ value or +JOIN+ to reference it. + # + # Post.with(posts_with_tags: Post.where("tags_count > ?", 0)).from("posts_with_tags AS posts") + # # => ActiveRecord::Relation + # # WITH posts_with_tags AS ( + # # SELECT * FROM posts WHERE (tags_count > 0) + # # ) + # # SELECT * FROM posts_with_tags AS posts + # + # Post.with(posts_with_tags: Post.where("tags_count > ?", 0)).joins("JOIN posts_with_tags ON posts_with_tags.id = posts.id") + # # => ActiveRecord::Relation + # # WITH posts_with_tags AS ( + # # SELECT * FROM posts WHERE (tags_count > 0) + # # ) + # # SELECT * FROM posts JOIN posts_with_tags ON posts_with_tags.id = posts.id + # + # It is recommended to pass a query as ActiveRecord::Relation. If that is not possible + # and you have verified it is safe for the database, you can pass it as SQL literal + # using +Arel+. + # + # Post.with(popular_posts: Arel.sql("... complex sql to calculate posts popularity ...")) + # + # Great caution should be taken to avoid SQL injection vulnerabilities. This method should not + # be used with unsafe values that include unsanitized input. + # + # To add multiple CTEs just pass multiple key-value pairs + # + # Post.with( + # posts_with_comments: Post.where("comments_count > ?", 0), + # posts_with_tags: Post.where("tags_count > ?", 0) + # ) + # + # or chain multiple +.with+ calls + # + # Post + # .with(posts_with_comments: Post.where("comments_count > ?", 0)) + # .with(posts_with_tags: Post.where("tags_count > ?", 0)) + # + # source://activerecord//lib/active_record/relation/query_methods.rb#459 + def with(*args); end + + # Like #with, but modifies relation in place. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#465 + def with!(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#155 + def with_values; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#159 + def with_values=(value); end + # Excludes the specified record (or collection of records) from the resulting # relation. For example: # @@ -27392,57 +29256,75 @@ module ActiveRecord::QueryMethods # is passed in) are not instances of the same model that the relation is # scoping. # - # source://activerecord//lib/active_record/relation/query_methods.rb#1271 + # source://activerecord//lib/active_record/relation/query_methods.rb#1470 def without(*records); end protected - # source://activerecord//lib/active_record/relation/query_methods.rb#1309 + # source://activerecord//lib/active_record/relation/query_methods.rb#1539 + def async!; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1508 def build_having_clause(opts, rest = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1301 + # source://activerecord//lib/active_record/relation/query_methods.rb#1500 def build_subquery(subquery_alias, select_value); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1309 + # source://activerecord//lib/active_record/relation/query_methods.rb#1508 def build_where_clause(opts, rest = T.unsafe(nil)); end private - # source://activerecord//lib/active_record/relation/query_methods.rb#1530 + # source://activerecord//lib/active_record/relation/query_methods.rb#1792 def arel_column(field); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1513 + # source://activerecord//lib/active_record/relation/query_methods.rb#1775 def arel_columns(columns); end # @raise [ImmutableRelation] # - # source://activerecord//lib/active_record/relation/query_methods.rb#1361 + # source://activerecord//lib/active_record/relation/query_methods.rb#1573 def assert_mutability!; end - # source://activerecord//lib/active_record/relation/query_methods.rb#1366 + # source://activerecord//lib/active_record/relation/query_methods.rb#1545 + def async; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1578 def build_arel(aliases = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1394 + # source://activerecord//lib/active_record/relation/query_methods.rb#1936 + def build_case_for_value_position(column, values); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1607 def build_cast_value(name, value); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1398 + # source://activerecord//lib/active_record/relation/query_methods.rb#1611 def build_from; end - # source://activerecord//lib/active_record/relation/query_methods.rb#1431 + # source://activerecord//lib/active_record/relation/query_methods.rb#1653 def build_join_buckets; end - # source://activerecord//lib/active_record/relation/query_methods.rb#1350 + # source://activerecord//lib/active_record/relation/query_methods.rb#1562 def build_join_dependencies; end - # source://activerecord//lib/active_record/relation/query_methods.rb#1481 + # source://activerecord//lib/active_record/relation/query_methods.rb#1709 def build_joins(join_sources, aliases = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1592 + # source://activerecord//lib/active_record/relation/query_methods.rb#1854 def build_order(arel); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1503 + # source://activerecord//lib/active_record/relation/query_methods.rb#1731 def build_select(arel); end + # source://activerecord//lib/active_record/relation/query_methods.rb#1741 + def build_with(arel); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1767 + def build_with_join_node(name, kind = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1753 + def build_with_value_from_hash(hash); end + # Checks to make sure that the arguments are not blank. Note that if some # blank-like object were initially passed into the query method, then this # method will not raise an error. @@ -27460,76 +29342,98 @@ module ActiveRecord::QueryMethods # ... # end # - # source://activerecord//lib/active_record/relation/query_methods.rb#1712 + # source://activerecord//lib/active_record/relation/query_methods.rb#1985 def check_if_method_has_arguments!(method_name, args, message = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1649 + # source://activerecord//lib/active_record/relation/query_methods.rb#1911 def column_references(order_args); end # @return [Boolean] # - # source://activerecord//lib/active_record/relation/query_methods.rb#1581 + # source://activerecord//lib/active_record/relation/query_methods.rb#1843 def does_not_support_reverse?(order); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1344 + # source://activerecord//lib/active_record/relation/query_methods.rb#1556 def each_join_dependencies(join_dependencies = T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1337 + # source://activerecord//lib/active_record/relation/query_methods.rb#1549 def lookup_table_klass_from_join_dependencies(table_name); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1662 + # source://activerecord//lib/active_record/relation/query_methods.rb#1926 def order_column(field); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1612 + # source://activerecord//lib/active_record/relation/query_methods.rb#1874 def preprocess_order_args(order_args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1672 + # source://activerecord//lib/active_record/relation/query_methods.rb#1996 + def process_select_args(fields); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1945 def resolve_arel_attributes(attrs); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1552 + # source://activerecord//lib/active_record/relation/query_methods.rb#1814 def reverse_sql_order(order_query); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1643 + # source://activerecord//lib/active_record/relation/query_methods.rb#1905 def sanitize_order_arguments(order_args); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1413 + # source://activerecord//lib/active_record/relation/query_methods.rb#1638 def select_association_list(associations, stashed_joins = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1728 + # source://activerecord//lib/active_record/relation/query_methods.rb#1626 + def select_named_joins(join_names, stashed_joins = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#2036 def structurally_incompatible_values_for(other); end # @return [Boolean] # - # source://activerecord//lib/active_record/relation/query_methods.rb#1546 + # source://activerecord//lib/active_record/relation/query_methods.rb#1808 def table_name_matches?(from); end - # source://activerecord//lib/active_record/relation/query_methods.rb#1600 + # source://activerecord//lib/active_record/relation/query_methods.rb#2006 + def transform_select_hash_values(fields); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1862 def validate_order_args(args); end end +# A wrapper to distinguish CTE joins from other nodes. +# # source://activerecord//lib/active_record/relation/query_methods.rb#132 +class ActiveRecord::QueryMethods::CTEJoin + # @return [CTEJoin] a new instance of CTEJoin + # + # source://activerecord//lib/active_record/relation/query_methods.rb#135 + def initialize(name); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#133 + def name; end +end + +# source://activerecord//lib/active_record/relation/query_methods.rb#140 ActiveRecord::QueryMethods::FROZEN_EMPTY_ARRAY = T.let(T.unsafe(nil), Array) -# source://activerecord//lib/active_record/relation/query_methods.rb#133 +# source://activerecord//lib/active_record/relation/query_methods.rb#141 ActiveRecord::QueryMethods::FROZEN_EMPTY_HASH = T.let(T.unsafe(nil), Hash) -# source://activerecord//lib/active_record/relation/query_methods.rb#1723 +# source://activerecord//lib/active_record/relation/query_methods.rb#2031 ActiveRecord::QueryMethods::STRUCTURAL_VALUE_METHODS = T.let(T.unsafe(nil), Array) -# source://activerecord//lib/active_record/relation/query_methods.rb#1597 +# source://activerecord//lib/active_record/relation/query_methods.rb#1859 ActiveRecord::QueryMethods::VALID_DIRECTIONS = T.let(T.unsafe(nil), Set) -# source://activerecord//lib/active_record/relation/query_methods.rb#495 +# source://activerecord//lib/active_record/relation/query_methods.rb#667 ActiveRecord::QueryMethods::VALID_UNSCOPING_VALUES = T.let(T.unsafe(nil), Set) -# WhereChain objects act as placeholder for queries in which +where+ does not have any parameter. +# +WhereChain+ objects act as placeholder for queries in which +where+ does not have any parameter. # In this case, +where+ can be chained to return a new relation. # -# source://activerecord//lib/active_record/relation/query_methods.rb#15 +# source://activerecord//lib/active_record/relation/query_methods.rb#14 class ActiveRecord::QueryMethods::WhereChain # @return [WhereChain] a new instance of WhereChain # - # source://activerecord//lib/active_record/relation/query_methods.rb#16 + # source://activerecord//lib/active_record/relation/query_methods.rb#15 def initialize(scope); end # Returns a new relation with joins and where clause to identify @@ -27551,7 +29455,7 @@ class ActiveRecord::QueryMethods::WhereChain # # INNER JOIN "comments" ON "comments"."post_id" = "posts"."id" # # WHERE "authors"."id" IS NOT NULL AND "comments"."id" IS NOT NULL # - # source://activerecord//lib/active_record/relation/query_methods.rb#76 + # source://activerecord//lib/active_record/relation/query_methods.rb#75 def associated(*associations); end # Returns a new relation with left outer joins and where clause to identify @@ -27573,7 +29477,7 @@ class ActiveRecord::QueryMethods::WhereChain # # LEFT OUTER JOIN "comments" ON "comments"."post_id" = "posts"."id" # # WHERE "authors"."id" IS NULL AND "comments"."id" IS NULL # - # source://activerecord//lib/active_record/relation/query_methods.rb#108 + # source://activerecord//lib/active_record/relation/query_methods.rb#107 def missing(*associations); end # Returns a new relation expressing WHERE + NOT condition according to @@ -27598,7 +29502,7 @@ class ActiveRecord::QueryMethods::WhereChain # # SELECT * FROM users WHERE name NOT IN ('Ko1', 'Nobu') # # User.where.not(name: "Jon", role: "admin") - # # SELECT * FROM users WHERE NOT (name == 'Jon' AND role == 'admin') + # # SELECT * FROM users WHERE NOT (name = 'Jon' AND role = 'admin') # # If there is a non-nil condition on a nullable column in the hash condition, the records that have # nil values on the nullable column won't be returned. @@ -27607,39 +29511,73 @@ class ActiveRecord::QueryMethods::WhereChain # # SELECT * FROM users WHERE NOT (nullable_country = 'UK') # # => [] # - # source://activerecord//lib/active_record/relation/query_methods.rb#50 + # source://activerecord//lib/active_record/relation/query_methods.rb#49 def not(opts, *rest); end private - # source://activerecord//lib/active_record/relation/query_methods.rb#123 + # source://activerecord//lib/active_record/relation/query_methods.rb#122 def scope_association_reflection(association); end end # source://activerecord//lib/active_record/querying.rb#4 module ActiveRecord::Querying - # source://activerecord//lib/active_record/querying.rb#57 + # source://activerecord//lib/active_record/querying.rb#65 def _load_from_sql(result_set, &block); end - # source://activerecord//lib/active_record/querying.rb#53 + # source://activerecord//lib/active_record/querying.rb#61 def _query_by_sql(sql, binds = T.unsafe(nil), preparable: T.unsafe(nil), async: T.unsafe(nil)); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def and(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def annotate(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def any?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 + def async_average(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#23 + def async_count(*_arg0, **_arg1, &_arg2); end + + # Same as #count_by_sql but perform the query asynchronously and returns an ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/querying.rb#106 + def async_count_by_sql(sql); end + + # Same as #find_by_sql but perform the query asynchronously and returns an ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/querying.rb#55 + def async_find_by_sql(sql, binds = T.unsafe(nil), preparable: T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/querying.rb#23 + def async_ids(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#23 + def async_maximum(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#23 + def async_minimum(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#23 + def async_pick(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#23 + def async_pluck(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#23 + def async_sum(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#23 def average(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def calculate(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def count(*_arg0, **_arg1, &_arg2); end # Returns the result of an SQL statement that should only include a COUNT(*) in the SELECT part. @@ -27655,64 +29593,64 @@ module ActiveRecord::Querying # # * +sql+ - An SQL statement which should return a count query from the database, see the example above. # - # source://activerecord//lib/active_record/querying.rb#93 + # source://activerecord//lib/active_record/querying.rb#101 def count_by_sql(sql); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def create_or_find_by(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def create_or_find_by!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def create_with(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def delete_all(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def delete_by(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def destroy_all(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def destroy_by(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def distinct(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def eager_load(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def except(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def excluding(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def exists?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def extending(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def extract_associated(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def fifth(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def fifth!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def find(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def find_by(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def find_by!(*_arg0, **_arg1, &_arg2); end # Executes a custom SQL query against your database and returns all the results. The results will @@ -27741,214 +29679,220 @@ module ActiveRecord::Querying # Note that building your own SQL query string from user input may expose your application to # injection attacks (https://guides.rubyonrails.org/security.html#sql-injection). # - # source://activerecord//lib/active_record/querying.rb#49 + # source://activerecord//lib/active_record/querying.rb#50 def find_by_sql(sql, binds = T.unsafe(nil), preparable: T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def find_each(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def find_in_batches(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def find_or_create_by(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def find_or_create_by!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def find_or_initialize_by(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def find_sole_by(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def first(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def first!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def first_or_create(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def first_or_create!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def first_or_initialize(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def forty_two(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def forty_two!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def fourth(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def fourth!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def from(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def group(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def having(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def ids(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def in_batches(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def in_order_of(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def includes(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def invert_where(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def joins(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def last(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def last!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def left_joins(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def left_outer_joins(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def limit(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def lock(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def many?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def maximum(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def merge(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def minimum(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def none(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def none?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def offset(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def one?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def only(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def optimizer_hints(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def or(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def order(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def pick(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def pluck(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def preload(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def readonly(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def references(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 + def regroup(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#23 def reorder(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def reselect(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def rewhere(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def second(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def second!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def second_to_last(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def second_to_last!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def select(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def sole(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def strict_loading(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def sum(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def take(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def take!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def third(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def third!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def third_to_last(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def third_to_last!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def touch_all(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def unscope(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def update_all(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 def where(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/querying.rb#22 + # source://activerecord//lib/active_record/querying.rb#23 + def with(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#23 def without(*_arg0, **_arg1, &_arg2); end end @@ -27960,25 +29904,28 @@ ActiveRecord::Querying::QUERYING_METHODS = T.let(T.unsafe(nil), Array) # source://activerecord//lib/active_record/railtie.rb#16 class ActiveRecord::Railtie < ::Rails::Railtie; end -# source://activerecord//lib/active_record/railtie.rb#203 +# source://activerecord//lib/active_record/railtie.rb#230 ActiveRecord::Railtie::SQLITE3_PRODUCTION_WARN = T.let(T.unsafe(nil), String) # Raised when values that executed are out of range. # -# source://activerecord//lib/active_record/errors.rb#224 +# source://activerecord//lib/active_record/errors.rb#280 class ActiveRecord::RangeError < ::ActiveRecord::StatementInvalid; end # Raised when a write to the database is attempted on a read only connection. # -# source://activerecord//lib/active_record/errors.rb#98 +# source://activerecord//lib/active_record/errors.rb#123 class ActiveRecord::ReadOnlyError < ::ActiveRecord::ActiveRecordError; end # Raised on attempt to update record that is instantiated as read only. # -# source://activerecord//lib/active_record/errors.rb#303 +# source://activerecord//lib/active_record/errors.rb#373 class ActiveRecord::ReadOnlyRecord < ::ActiveRecord::ActiveRecordError; end # source://activerecord//lib/active_record/readonly_attributes.rb#4 +class ActiveRecord::ReadonlyAttributeError < ::ActiveRecord::ActiveRecordError; end + +# source://activerecord//lib/active_record/readonly_attributes.rb#7 module ActiveRecord::ReadonlyAttributes extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -27995,12 +29942,13 @@ module ActiveRecord::ReadonlyAttributes module GeneratedInstanceMethods; end end -# source://activerecord//lib/active_record/readonly_attributes.rb#11 +# source://activerecord//lib/active_record/readonly_attributes.rb#14 module ActiveRecord::ReadonlyAttributes::ClassMethods - # Attributes listed as readonly will be used to create a new record but update operations will - # ignore these fields. + # Attributes listed as readonly will be used to create a new record. + # Assigning a new value to a readonly attribute on a persisted record raises an error. # - # You can assign a new value to a readonly attribute, but it will be ignored when the record is updated. + # By setting +config.active_record.raise_on_assign_to_attr_readonly+ to +false+, it will + # not raise. The value will change in memory, but will not be persisted on +save+. # # ==== Examples # @@ -28009,22 +29957,32 @@ module ActiveRecord::ReadonlyAttributes::ClassMethods # end # # post = Post.create!(title: "Introducing Ruby on Rails!") - # post.update(title: "a different title") # change to title will be ignored + # post.title = "a different title" # raises ActiveRecord::ReadonlyAttributeError + # post.update(title: "a different title") # raises ActiveRecord::ReadonlyAttributeError # - # source://activerecord//lib/active_record/readonly_attributes.rb#25 + # source://activerecord//lib/active_record/readonly_attributes.rb#30 def attr_readonly(*attributes); end # @return [Boolean] # - # source://activerecord//lib/active_record/readonly_attributes.rb#34 + # source://activerecord//lib/active_record/readonly_attributes.rb#43 def readonly_attribute?(name); end # Returns an array of all the attributes that have been specified as readonly. # - # source://activerecord//lib/active_record/readonly_attributes.rb#30 + # source://activerecord//lib/active_record/readonly_attributes.rb#39 def readonly_attributes; end end +# source://activerecord//lib/active_record/readonly_attributes.rb#48 +module ActiveRecord::ReadonlyAttributes::HasReadonlyAttributes + # source://activerecord//lib/active_record/readonly_attributes.rb#57 + def _write_attribute(attr_name, value); end + + # source://activerecord//lib/active_record/readonly_attributes.rb#49 + def write_attribute(attr_name, value); end +end + # = Active Record \RecordInvalid # # Raised by {ActiveRecord::Base#save!}[rdoc-ref:Persistence#save!] and @@ -28060,41 +30018,41 @@ end # puts invalid.record.errors # end # -# source://activerecord//lib/active_record/errors.rb#136 +# source://activerecord//lib/active_record/errors.rb#161 class ActiveRecord::RecordNotDestroyed < ::ActiveRecord::ActiveRecordError # @return [RecordNotDestroyed] a new instance of RecordNotDestroyed # - # source://activerecord//lib/active_record/errors.rb#139 + # source://activerecord//lib/active_record/errors.rb#164 def initialize(message = T.unsafe(nil), record = T.unsafe(nil)); end # Returns the value of attribute record. # - # source://activerecord//lib/active_record/errors.rb#137 + # source://activerecord//lib/active_record/errors.rb#162 def record; end end # Raised when Active Record cannot find a record by given id or set of ids. # -# source://activerecord//lib/active_record/errors.rb#102 +# source://activerecord//lib/active_record/errors.rb#127 class ActiveRecord::RecordNotFound < ::ActiveRecord::ActiveRecordError # @return [RecordNotFound] a new instance of RecordNotFound # - # source://activerecord//lib/active_record/errors.rb#105 + # source://activerecord//lib/active_record/errors.rb#130 def initialize(message = T.unsafe(nil), model = T.unsafe(nil), primary_key = T.unsafe(nil), id = T.unsafe(nil)); end # Returns the value of attribute id. # - # source://activerecord//lib/active_record/errors.rb#103 + # source://activerecord//lib/active_record/errors.rb#128 def id; end # Returns the value of attribute model. # - # source://activerecord//lib/active_record/errors.rb#103 + # source://activerecord//lib/active_record/errors.rb#128 def model; end # Returns the value of attribute primary_key. # - # source://activerecord//lib/active_record/errors.rb#103 + # source://activerecord//lib/active_record/errors.rb#128 def primary_key; end end @@ -28102,22 +30060,22 @@ end # {ActiveRecord::Base.create!}[rdoc-ref:Persistence::ClassMethods#create!] # methods when a record is invalid and cannot be saved. # -# source://activerecord//lib/active_record/errors.rb#117 +# source://activerecord//lib/active_record/errors.rb#142 class ActiveRecord::RecordNotSaved < ::ActiveRecord::ActiveRecordError # @return [RecordNotSaved] a new instance of RecordNotSaved # - # source://activerecord//lib/active_record/errors.rb#120 + # source://activerecord//lib/active_record/errors.rb#145 def initialize(message = T.unsafe(nil), record = T.unsafe(nil)); end # Returns the value of attribute record. # - # source://activerecord//lib/active_record/errors.rb#118 + # source://activerecord//lib/active_record/errors.rb#143 def record; end end # Raised when a record cannot be inserted or updated because it would violate a uniqueness constraint. # -# source://activerecord//lib/active_record/errors.rb#174 +# source://activerecord//lib/active_record/errors.rb#208 class ActiveRecord::RecordNotUnique < ::ActiveRecord::WrappedDatabaseException; end # = Active Record Reflection @@ -28143,7 +30101,7 @@ module ActiveRecord::Reflection private - # source://activestorage/7.0.6/lib/active_storage/reflection.rb#37 + # source://activestorage/7.1.3.2/lib/active_storage/reflection.rb#37 def reflection_class_for(macro); end end @@ -28183,24 +30141,29 @@ end # PolymorphicReflection # RuntimeReflection # -# source://activerecord//lib/active_record/reflection.rb#146 +# source://activerecord//lib/active_record/reflection.rb#156 class ActiveRecord::Reflection::AbstractReflection - # source://activerecord//lib/active_record/reflection.rb#280 + # @return [AbstractReflection] a new instance of AbstractReflection + # + # source://activerecord//lib/active_record/reflection.rb#157 + def initialize; end + + # source://activerecord//lib/active_record/reflection.rb#308 def alias_candidate(name); end # Returns a new, unsaved instance of the associated class. +attributes+ will # be passed to the class's constructor. # - # source://activerecord//lib/active_record/reflection.rb#157 + # source://activerecord//lib/active_record/reflection.rb#175 def build_association(attributes, &block); end - # source://activerecord//lib/active_record/reflection.rb#288 + # source://activerecord//lib/active_record/reflection.rb#316 def build_scope(table, predicate_builder = T.unsafe(nil), klass = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#284 + # source://activerecord//lib/active_record/reflection.rb#312 def chain; end - # source://activerecord//lib/active_record/reflection.rb#233 + # source://activerecord//lib/active_record/reflection.rb#255 def check_validity_of_inverse!; end # Returns the class name for the macro. @@ -28208,18 +30171,18 @@ class ActiveRecord::Reflection::AbstractReflection # composed_of :balance, class_name: 'Money' returns 'Money' # has_many :clients returns 'Client' # - # source://activerecord//lib/active_record/reflection.rb#165 + # source://activerecord//lib/active_record/reflection.rb#183 def class_name; end - # source://activerecord//lib/active_record/reflection.rb#211 + # source://activerecord//lib/active_record/reflection.rb#233 def constraints; end - # source://activerecord//lib/active_record/reflection.rb#215 + # source://activerecord//lib/active_record/reflection.rb#237 def counter_cache_column; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#276 + # source://activerecord//lib/active_record/reflection.rb#304 def counter_must_be_updated_by_has_many?; end # Returns whether a counter cache should be used for this association. @@ -28229,10 +30192,10 @@ class ActiveRecord::Reflection::AbstractReflection # # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#270 + # source://activerecord//lib/active_record/reflection.rb#298 def has_cached_counter?; end - # source://activerecord//lib/active_record/reflection.rb#227 + # source://activerecord//lib/active_record/reflection.rb#249 def inverse_of; end # We need to avoid the following situation: @@ -28246,12 +30209,12 @@ class ActiveRecord::Reflection::AbstractReflection # # Hence this method. # - # source://activerecord//lib/active_record/reflection.rb#254 + # source://activerecord//lib/active_record/reflection.rb#276 def inverse_updates_counter_cache?; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#262 + # source://activerecord//lib/active_record/reflection.rb#290 def inverse_updates_counter_in_memory?; end # We need to avoid the following situation: @@ -28265,127 +30228,127 @@ class ActiveRecord::Reflection::AbstractReflection # # Hence this method. # - # source://activerecord//lib/active_record/reflection.rb#254 + # source://activerecord//lib/active_record/reflection.rb#276 def inverse_which_updates_counter_cache; end - # source://activerecord//lib/active_record/reflection.rb#175 + # source://activerecord//lib/active_record/reflection.rb#193 def join_scope(table, foreign_table, foreign_klass); end - # source://activerecord//lib/active_record/reflection.rb#198 + # source://activerecord//lib/active_record/reflection.rb#220 def join_scopes(table, predicate_builder, klass = T.unsafe(nil), record = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#206 + # source://activerecord//lib/active_record/reflection.rb#228 def klass_join_scope(table, predicate_builder); end # Returns a list of scopes that should be applied for this Reflection # object when querying the database. # - # source://activerecord//lib/active_record/reflection.rb#171 + # source://activerecord//lib/active_record/reflection.rb#189 def scopes; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#296 + # source://activerecord//lib/active_record/reflection.rb#324 def strict_loading?; end - # source://activerecord//lib/active_record/reflection.rb#300 + # source://activerecord//lib/active_record/reflection.rb#328 def strict_loading_violation_message(owner); end - # source://activerecord//lib/active_record/reflection.rb#151 + # source://activerecord//lib/active_record/reflection.rb#169 def table_name; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#147 + # source://activerecord//lib/active_record/reflection.rb#165 def through_reflection?; end protected # FIXME: this is a horrible name # - # source://activerecord//lib/active_record/reflection.rb#307 + # source://activerecord//lib/active_record/reflection.rb#335 def actual_source_reflection; end private - # source://activerecord//lib/active_record/reflection.rb#320 + # source://activerecord//lib/active_record/reflection.rb#348 def ensure_option_not_given_as_class!(option_name); end - # source://activerecord//lib/active_record/reflection.rb#312 + # source://activerecord//lib/active_record/reflection.rb#340 def predicate_builder(table); end - # source://activerecord//lib/active_record/reflection.rb#316 + # source://activerecord//lib/active_record/reflection.rb#344 def primary_key(klass); end end # Holds all the metadata about an aggregation as it was specified in the # Active Record class. # -# source://activerecord//lib/active_record/reflection.rb#411 +# source://activerecord//lib/active_record/reflection.rb#452 class ActiveRecord::Reflection::AggregateReflection < ::ActiveRecord::Reflection::MacroReflection - # source://activerecord//lib/active_record/reflection.rb#412 + # source://activerecord//lib/active_record/reflection.rb#453 def mapping; end end # Holds all the metadata about an association as it was specified in the # Active Record class. # -# source://activerecord//lib/active_record/reflection.rb#420 +# source://activerecord//lib/active_record/reflection.rb#461 class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflection::MacroReflection # @return [AssociationReflection] a new instance of AssociationReflection # - # source://activerecord//lib/active_record/reflection.rb#448 + # source://activerecord//lib/active_record/reflection.rb#489 def initialize(name, scope, options, active_record); end - # source://activerecord//lib/active_record/reflection.rb#480 + # source://activerecord//lib/active_record/reflection.rb#537 def active_record_primary_key; end - # source://activerecord//lib/active_record/reflection.rb#603 + # source://activerecord//lib/active_record/reflection.rb#683 def add_as_polymorphic_through(reflection, seed); end - # source://activerecord//lib/active_record/reflection.rb#599 + # source://activerecord//lib/active_record/reflection.rb#679 def add_as_source(seed); end - # source://activerecord//lib/active_record/reflection.rb#607 + # source://activerecord//lib/active_record/reflection.rb#687 def add_as_through(seed); end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/reflection.rb#589 + # source://activerecord//lib/active_record/reflection.rb#669 def association_class; end - # source://activerecord//lib/active_record/reflection.rb#472 + # source://activerecord//lib/active_record/reflection.rb#529 def association_foreign_key; end - # source://activerecord//lib/active_record/reflection.rb#476 + # source://activerecord//lib/active_record/reflection.rb#533 def association_primary_key(klass = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#456 + # source://activerecord//lib/active_record/reflection.rb#501 def association_scope_cache(klass, owner, &block); end # Returns +true+ if +self+ is a +belongs_to+ reflection. # # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#584 + # source://activerecord//lib/active_record/reflection.rb#664 def belongs_to?; end - # source://activerecord//lib/active_record/reflection.rb#500 + # source://activerecord//lib/active_record/reflection.rb#580 def check_eager_loadable!; end - # source://activerecord//lib/active_record/reflection.rb#496 + # source://activerecord//lib/active_record/reflection.rb#568 def check_validity!; end # This is for clearing cache on the reflection. Useful for tests that need to compare # SQL queries on associations. # - # source://activerecord//lib/active_record/reflection.rb#532 + # source://activerecord//lib/active_record/reflection.rb#612 def clear_association_scope_cache; end # A chain of reflections from this one back to the owner. For more see the explanation in # ThroughReflection. # - # source://activerecord//lib/active_record/reflection.rb#526 + # source://activerecord//lib/active_record/reflection.rb#606 def collect_join_chain; end # Returns whether or not this association reflection is for a collection @@ -28394,53 +30357,53 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#566 + # source://activerecord//lib/active_record/reflection.rb#646 def collection?; end - # source://activerecord//lib/active_record/reflection.rb#421 + # source://activerecord//lib/active_record/reflection.rb#462 def compute_class(name); end - # source://activerecord//lib/active_record/reflection.rb#611 + # source://activerecord//lib/active_record/reflection.rb#691 def extensions; end - # source://activerecord//lib/active_record/reflection.rb#468 - def foreign_key; end + # source://activerecord//lib/active_record/reflection.rb#513 + def foreign_key(infer_from_inverse_of: T.unsafe(nil)); end # Returns the value of attribute foreign_type. # - # source://activerecord//lib/active_record/reflection.rb#445 + # source://activerecord//lib/active_record/reflection.rb#486 def foreign_type; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#544 + # source://activerecord//lib/active_record/reflection.rb#624 def has_inverse?; end # Returns +true+ if +self+ is a +has_one+ reflection. # # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#587 + # source://activerecord//lib/active_record/reflection.rb#667 def has_one?; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#540 + # source://activerecord//lib/active_record/reflection.rb#620 def has_scope?; end - # source://activerecord//lib/active_record/reflection.rb#492 + # source://activerecord//lib/active_record/reflection.rb#564 def join_foreign_key; end - # source://activerecord//lib/active_record/reflection.rb#512 + # source://activerecord//lib/active_record/reflection.rb#592 def join_id_for(owner); end - # source://activerecord//lib/active_record/reflection.rb#484 + # source://activerecord//lib/active_record/reflection.rb#556 def join_primary_key(klass = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#488 + # source://activerecord//lib/active_record/reflection.rb#560 def join_primary_type; end - # source://activerecord//lib/active_record/reflection.rb#464 + # source://activerecord//lib/active_record/reflection.rb#509 def join_table; end # Returns the macro type. @@ -28449,44 +30412,44 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/reflection.rb#561 + # source://activerecord//lib/active_record/reflection.rb#641 def macro; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#536 + # source://activerecord//lib/active_record/reflection.rb#616 def nested?; end # Reflection # - # source://activerecord//lib/active_record/reflection.rb#446 + # source://activerecord//lib/active_record/reflection.rb#487 def parent_reflection; end # Reflection # - # source://activerecord//lib/active_record/reflection.rb#446 + # source://activerecord//lib/active_record/reflection.rb#487 def parent_reflection=(_arg0); end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#591 + # source://activerecord//lib/active_record/reflection.rb#671 def polymorphic?; end - # source://activerecord//lib/active_record/reflection.rb#548 + # source://activerecord//lib/active_record/reflection.rb#628 def polymorphic_inverse_of(associated_class); end - # source://activerecord//lib/active_record/reflection.rb#595 + # source://activerecord//lib/active_record/reflection.rb#675 def polymorphic_name; end - # source://activerecord//lib/active_record/reflection.rb#520 + # source://activerecord//lib/active_record/reflection.rb#600 def source_reflection; end - # source://activerecord//lib/active_record/reflection.rb#516 + # source://activerecord//lib/active_record/reflection.rb#596 def through_reflection; end # Returns the value of attribute type. # - # source://activerecord//lib/active_record/reflection.rb#445 + # source://activerecord//lib/active_record/reflection.rb#486 def type; end # Returns whether or not the association should be validated as part of @@ -28501,14 +30464,14 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#579 + # source://activerecord//lib/active_record/reflection.rb#659 def validate?; end private # returns either +nil+ or the inverse association name that it finds. # - # source://activerecord//lib/active_record/reflection.rb#628 + # source://activerecord//lib/active_record/reflection.rb#708 def automatic_inverse_of; end # Checks to see if the reflection doesn't have any options that prevent @@ -28520,23 +30483,26 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#664 + # source://activerecord//lib/active_record/reflection.rb#746 def can_find_inverse_of_automatically?(reflection, inverse_reflection = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#685 + # source://activerecord//lib/active_record/reflection.rb#767 def derive_class_name; end - # source://activerecord//lib/active_record/reflection.rb#691 - def derive_foreign_key; end + # source://activerecord//lib/active_record/reflection.rb#785 + def derive_fk_query_constraints(foreign_key); end + + # source://activerecord//lib/active_record/reflection.rb#773 + def derive_foreign_key(infer_from_inverse_of: T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#701 + # source://activerecord//lib/active_record/reflection.rb#823 def derive_join_table; end # Attempts to find the inverse association name automatically. # If it cannot find a suitable inverse association name, it returns # +nil+. # - # source://activerecord//lib/active_record/reflection.rb#619 + # source://activerecord//lib/active_record/reflection.rb#699 def inverse_name; end # Scopes on the potential inverse reflection prevent automatic @@ -28548,7 +30514,7 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#677 + # source://activerecord//lib/active_record/reflection.rb#759 def scope_allows_automatic_inverse_of?(reflection, inverse_reflection); end # Checks if the inverse reflection that is returned from the @@ -28558,45 +30524,47 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#650 + # source://activerecord//lib/active_record/reflection.rb#732 def valid_inverse_reflection?(reflection); end end -# source://activerecord//lib/active_record/reflection.rb#734 +# source://activerecord//lib/active_record/reflection.rb#856 class ActiveRecord::Reflection::BelongsToReflection < ::ActiveRecord::Reflection::AssociationReflection - # source://activerecord//lib/active_record/reflection.rb#739 + # source://activerecord//lib/active_record/reflection.rb#861 def association_class; end # klass option is necessary to support loading polymorphic associations # - # source://activerecord//lib/active_record/reflection.rb#748 + # source://activerecord//lib/active_record/reflection.rb#870 def association_primary_key(klass = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#737 + # source://activerecord//lib/active_record/reflection.rb#859 def belongs_to?; end - # source://activerecord//lib/active_record/reflection.rb#760 + # source://activerecord//lib/active_record/reflection.rb#888 def join_foreign_key; end - # source://activerecord//lib/active_record/reflection.rb#764 + # source://activerecord//lib/active_record/reflection.rb#892 def join_foreign_type; end - # source://activerecord//lib/active_record/reflection.rb#756 + # source://activerecord//lib/active_record/reflection.rb#884 def join_primary_key(klass = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#735 + # source://activerecord//lib/active_record/reflection.rb#857 def macro; end private # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#769 + # source://activerecord//lib/active_record/reflection.rb#897 def can_find_inverse_of_automatically?(*_arg0); end end +# = Active Record Reflection +# # \Reflection enables the ability to examine the associations and aggregations of # Active Record classes and objects. This information, for example, # can be used in a form builder that takes an Active Record object @@ -28606,24 +30574,24 @@ end # MacroReflection class has info for AggregateReflection and AssociationReflection # classes. # -# source://activerecord//lib/active_record/reflection.rb#57 +# source://activerecord//lib/active_record/reflection.rb#59 module ActiveRecord::Reflection::ClassMethods - # source://activerecord//lib/active_record/reflection.rb#119 + # source://activerecord//lib/active_record/reflection.rb#121 def _reflect_on_association(association); end - # source://activerecord//lib/active_record/reflection.rb#128 + # source://activerecord//lib/active_record/reflection.rb#130 def clear_reflections_cache; end # Returns the AggregateReflection object for the named +aggregation+ (use the symbol). # # Account.reflect_on_aggregation(:balance) # => the balance AggregateReflection # - # source://activerecord//lib/active_record/reflection.rb#67 + # source://activerecord//lib/active_record/reflection.rb#69 def reflect_on_aggregation(aggregation); end # Returns an array of AggregateReflection objects for all the aggregations in the class. # - # source://activerecord//lib/active_record/reflection.rb#59 + # source://activerecord//lib/active_record/reflection.rb#61 def reflect_on_all_aggregations; end # Returns an array of AssociationReflection objects for all the @@ -28636,12 +30604,12 @@ module ActiveRecord::Reflection::ClassMethods # Account.reflect_on_all_associations # returns an array of all associations # Account.reflect_on_all_associations(:has_many) # returns an array of all has_many associations # - # source://activerecord//lib/active_record/reflection.rb#104 + # source://activerecord//lib/active_record/reflection.rb#106 def reflect_on_all_associations(macro = T.unsafe(nil)); end # Returns an array of AssociationReflection objects for all associations which have :autosave enabled. # - # source://activerecord//lib/active_record/reflection.rb#124 + # source://activerecord//lib/active_record/reflection.rb#126 def reflect_on_all_autosave_associations; end # Returns the AssociationReflection object for the +association+ (use the symbol). @@ -28649,81 +30617,86 @@ module ActiveRecord::Reflection::ClassMethods # Account.reflect_on_association(:owner) # returns the owner AssociationReflection # Invoice.reflect_on_association(:line_items).macro # returns :has_many # - # source://activerecord//lib/active_record/reflection.rb#115 + # source://activerecord//lib/active_record/reflection.rb#117 def reflect_on_association(association); end # Returns a Hash of name of the reflection as the key and an AssociationReflection as the value. # # Account.reflections # => {"balance" => AggregateReflection} # - # source://activerecord//lib/active_record/reflection.rb#75 + # source://activerecord//lib/active_record/reflection.rb#77 def reflections; end + + private + + # source://activerecord//lib/active_record/reflection.rb#135 + def inherited(subclass); end end -# source://activerecord//lib/active_record/reflection.rb#774 +# source://activerecord//lib/active_record/reflection.rb#902 class ActiveRecord::Reflection::HasAndBelongsToManyReflection < ::ActiveRecord::Reflection::AssociationReflection # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#777 + # source://activerecord//lib/active_record/reflection.rb#905 def collection?; end - # source://activerecord//lib/active_record/reflection.rb#775 + # source://activerecord//lib/active_record/reflection.rb#903 def macro; end end -# source://activerecord//lib/active_record/reflection.rb#706 +# source://activerecord//lib/active_record/reflection.rb#828 class ActiveRecord::Reflection::HasManyReflection < ::ActiveRecord::Reflection::AssociationReflection - # source://activerecord//lib/active_record/reflection.rb#711 + # source://activerecord//lib/active_record/reflection.rb#833 def association_class; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#709 + # source://activerecord//lib/active_record/reflection.rb#831 def collection?; end - # source://activerecord//lib/active_record/reflection.rb#707 + # source://activerecord//lib/active_record/reflection.rb#829 def macro; end end -# source://activerecord//lib/active_record/reflection.rb#720 +# source://activerecord//lib/active_record/reflection.rb#842 class ActiveRecord::Reflection::HasOneReflection < ::ActiveRecord::Reflection::AssociationReflection - # source://activerecord//lib/active_record/reflection.rb#725 + # source://activerecord//lib/active_record/reflection.rb#847 def association_class; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#723 + # source://activerecord//lib/active_record/reflection.rb#845 def has_one?; end - # source://activerecord//lib/active_record/reflection.rb#721 + # source://activerecord//lib/active_record/reflection.rb#843 def macro; end end # Base class for AggregateReflection and AssociationReflection. Objects of # AggregateReflection and AssociationReflection are returned by the Reflection::ClassMethods. # -# source://activerecord//lib/active_record/reflection.rb#329 +# source://activerecord//lib/active_record/reflection.rb#357 class ActiveRecord::Reflection::MacroReflection < ::ActiveRecord::Reflection::AbstractReflection # @return [MacroReflection] a new instance of MacroReflection # - # source://activerecord//lib/active_record/reflection.rb#348 + # source://activerecord//lib/active_record/reflection.rb#376 def initialize(name, scope, options, active_record); end # Returns +true+ if +self+ and +other_aggregation+ have the same +name+ attribute, +active_record+ attribute, # and +other_aggregation+ has an options hash assigned to it. # - # source://activerecord//lib/active_record/reflection.rb#391 + # source://activerecord//lib/active_record/reflection.rb#421 def ==(other_aggregation); end # Returns the value of attribute active_record. # - # source://activerecord//lib/active_record/reflection.rb#344 + # source://activerecord//lib/active_record/reflection.rb#372 def active_record; end - # source://activerecord//lib/active_record/reflection.rb#358 + # source://activerecord//lib/active_record/reflection.rb#388 def autosave=(autosave); end - # source://activerecord//lib/active_record/reflection.rb#385 + # source://activerecord//lib/active_record/reflection.rb#415 def compute_class(name); end # Returns the class for the macro. @@ -28742,7 +30715,7 @@ class ActiveRecord::Reflection::MacroReflection < ::ActiveRecord::Reflection::Ab # a new association object. Use +build_association+ or +create_association+ # instead. This allows plugins to hook into association object creation. # - # source://activerecord//lib/active_record/reflection.rb#381 + # source://activerecord//lib/active_record/reflection.rb#411 def klass; end # Returns the name of the macro. @@ -28750,7 +30723,7 @@ class ActiveRecord::Reflection::MacroReflection < ::ActiveRecord::Reflection::Ab # composed_of :balance, class_name: 'Money' returns :balance # has_many :clients returns :clients # - # source://activerecord//lib/active_record/reflection.rb#334 + # source://activerecord//lib/active_record/reflection.rb#362 def name; end # Returns the hash of options used for the macro. @@ -28758,158 +30731,163 @@ class ActiveRecord::Reflection::MacroReflection < ::ActiveRecord::Reflection::Ab # composed_of :balance, class_name: 'Money' returns { class_name: "Money" } # has_many :clients returns {} # - # source://activerecord//lib/active_record/reflection.rb#342 + # source://activerecord//lib/active_record/reflection.rb#370 def options; end - # source://activerecord//lib/active_record/reflection.rb#346 + # source://activerecord//lib/active_record/reflection.rb#374 def plural_name; end # Returns the value of attribute scope. # - # source://activerecord//lib/active_record/reflection.rb#336 + # source://activerecord//lib/active_record/reflection.rb#364 def scope; end - # source://activerecord//lib/active_record/reflection.rb#399 + # source://activerecord//lib/active_record/reflection.rb#429 def scope_for(relation, owner = T.unsafe(nil)); end private - # source://activerecord//lib/active_record/reflection.rb#404 + # source://activerecord//lib/active_record/reflection.rb#434 def derive_class_name; end + + # @raise [ArgumentError] + # + # source://activerecord//lib/active_record/reflection.rb#438 + def validate_reflection!; end end -# source://activerecord//lib/active_record/reflection.rb#1038 +# source://activerecord//lib/active_record/reflection.rb#1166 class ActiveRecord::Reflection::PolymorphicReflection < ::ActiveRecord::Reflection::AbstractReflection # @return [PolymorphicReflection] a new instance of PolymorphicReflection # - # source://activerecord//lib/active_record/reflection.rb#1042 + # source://activerecord//lib/active_record/reflection.rb#1170 def initialize(reflection, previous_reflection); end - # source://activerecord//lib/active_record/reflection.rb#1052 + # source://activerecord//lib/active_record/reflection.rb#1181 def constraints; end - # source://activerecord//lib/active_record/reflection.rb#1039 + # source://activerecord//lib/active_record/reflection.rb#1167 def join_foreign_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1039 + # source://activerecord//lib/active_record/reflection.rb#1167 def join_primary_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1047 + # source://activerecord//lib/active_record/reflection.rb#1176 def join_scopes(table, predicate_builder, klass = T.unsafe(nil), record = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#1039 + # source://activerecord//lib/active_record/reflection.rb#1167 def klass(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1039 + # source://activerecord//lib/active_record/reflection.rb#1167 def name(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1039 + # source://activerecord//lib/active_record/reflection.rb#1167 def plural_name(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1039 + # source://activerecord//lib/active_record/reflection.rb#1167 def scope(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1039 + # source://activerecord//lib/active_record/reflection.rb#1167 def scope_for(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1039 + # source://activerecord//lib/active_record/reflection.rb#1167 def type(*_arg0, **_arg1, &_arg2); end private - # source://activerecord//lib/active_record/reflection.rb#1057 + # source://activerecord//lib/active_record/reflection.rb#1186 def source_type_scope; end end -# source://activerecord//lib/active_record/reflection.rb#1064 +# source://activerecord//lib/active_record/reflection.rb#1193 class ActiveRecord::Reflection::RuntimeReflection < ::ActiveRecord::Reflection::AbstractReflection # @return [RuntimeReflection] a new instance of RuntimeReflection # - # source://activerecord//lib/active_record/reflection.rb#1067 + # source://activerecord//lib/active_record/reflection.rb#1196 def initialize(reflection, association); end - # source://activerecord//lib/active_record/reflection.rb#1076 + # source://activerecord//lib/active_record/reflection.rb#1206 def aliased_table; end - # source://activerecord//lib/active_record/reflection.rb#1084 + # source://activerecord//lib/active_record/reflection.rb#1214 def all_includes; end - # source://activerecord//lib/active_record/reflection.rb#1065 + # source://activerecord//lib/active_record/reflection.rb#1194 def constraints(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1065 + # source://activerecord//lib/active_record/reflection.rb#1194 def join_foreign_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1080 + # source://activerecord//lib/active_record/reflection.rb#1210 def join_primary_key(klass = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#1072 + # source://activerecord//lib/active_record/reflection.rb#1202 def klass; end - # source://activerecord//lib/active_record/reflection.rb#1065 + # source://activerecord//lib/active_record/reflection.rb#1194 def scope(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1065 + # source://activerecord//lib/active_record/reflection.rb#1194 def type(*_arg0, **_arg1, &_arg2); end end # Holds all the metadata about a :through association as it was specified # in the Active Record class. # -# source://activerecord//lib/active_record/reflection.rb#784 +# source://activerecord//lib/active_record/reflection.rb#912 class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection::AbstractReflection # @return [ThroughReflection] a new instance of ThroughReflection # - # source://activerecord//lib/active_record/reflection.rb#788 + # source://activerecord//lib/active_record/reflection.rb#916 def initialize(delegate_reflection); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def active_record(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#785 + # source://activerecord//lib/active_record/reflection.rb#913 def active_record_primary_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1000 + # source://activerecord//lib/active_record/reflection.rb#1128 def add_as_polymorphic_through(reflection, seed); end - # source://activerecord//lib/active_record/reflection.rb#996 + # source://activerecord//lib/active_record/reflection.rb#1124 def add_as_source(seed); end - # source://activerecord//lib/active_record/reflection.rb#1004 + # source://activerecord//lib/active_record/reflection.rb#1132 def add_as_through(seed); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def association_class(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#785 + # source://activerecord//lib/active_record/reflection.rb#913 def association_foreign_key(*_arg0, **_arg1, &_arg2); end # We want to use the klass from this reflection, rather than just delegate straight to # the source_reflection, because the source_reflection may be polymorphic. We still # need to respect the source_reflection's :primary_key option, though. # - # source://activerecord//lib/active_record/reflection.rb#892 + # source://activerecord//lib/active_record/reflection.rb#1021 def association_primary_key(klass = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def association_scope_cache(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def autosave=(arg); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def belongs_to?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def check_eager_loadable!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#950 + # source://activerecord//lib/active_record/reflection.rb#1078 def check_validity!; end # This is for clearing cache on the reflection. Useful for tests that need to compare # SQL queries on associations. # - # source://activerecord//lib/active_record/reflection.rb#864 + # source://activerecord//lib/active_record/reflection.rb#993 def clear_association_scope_cache; end # Returns an array of reflections which are involved in this association. Each item in the @@ -28929,103 +30907,103 @@ class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection:: # # => [, # ] # - # source://activerecord//lib/active_record/reflection.rb#858 + # source://activerecord//lib/active_record/reflection.rb#987 def collect_join_chain; end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def collection?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def compute_class(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#990 + # source://activerecord//lib/active_record/reflection.rb#1118 def constraints; end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def extensions(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#785 + # source://activerecord//lib/active_record/reflection.rb#913 def foreign_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#785 + # source://activerecord//lib/active_record/reflection.rb#913 def foreign_type(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def has_inverse?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def has_one?(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#878 + # source://activerecord//lib/active_record/reflection.rb#1007 def has_scope?; end - # source://activerecord//lib/active_record/reflection.rb#785 + # source://activerecord//lib/active_record/reflection.rb#913 def join_foreign_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#785 + # source://activerecord//lib/active_record/reflection.rb#913 def join_id_for(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#902 + # source://activerecord//lib/active_record/reflection.rb#1031 def join_primary_key(klass = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def join_primary_type(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#874 + # source://activerecord//lib/active_record/reflection.rb#1003 def join_scopes(table, predicate_builder, klass = T.unsafe(nil), record = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def join_table(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#800 + # source://activerecord//lib/active_record/reflection.rb#929 def klass; end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def macro(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def name(*_arg0, **_arg1, &_arg2); end # A through association is nested if there would be more than one join table # # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#885 + # source://activerecord//lib/active_record/reflection.rb#1014 def nested?; end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def options(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def parent_reflection(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def parent_reflection=(arg); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def plural_name(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def polymorphic?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def polymorphic_inverse_of(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def polymorphic_name(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def scope(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def scope_for(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#870 + # source://activerecord//lib/active_record/reflection.rb#999 def scopes; end - # source://activerecord//lib/active_record/reflection.rb#942 + # source://activerecord//lib/active_record/reflection.rb#1070 def source_options; end # Returns the source of the through reflection. It checks both a singularized @@ -29045,10 +31023,10 @@ class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection:: # tags_reflection.source_reflection # # => # - # source://activerecord//lib/active_record/reflection.rb#821 + # source://activerecord//lib/active_record/reflection.rb#950 def source_reflection; end - # source://activerecord//lib/active_record/reflection.rb#921 + # source://activerecord//lib/active_record/reflection.rb#1050 def source_reflection_name; end # Gets an array of possible :through source reflection names in both singular and plural form. @@ -29062,10 +31040,10 @@ class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection:: # tags_reflection.source_reflection_names # # => [:tag, :tags] # - # source://activerecord//lib/active_record/reflection.rb#917 + # source://activerecord//lib/active_record/reflection.rb#1046 def source_reflection_names; end - # source://activerecord//lib/active_record/reflection.rb#946 + # source://activerecord//lib/active_record/reflection.rb#1074 def through_options; end # Returns the AssociationReflection object specified in the :through option @@ -29080,41 +31058,41 @@ class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection:: # tags_reflection.through_reflection # # => # - # source://activerecord//lib/active_record/reflection.rb#837 + # source://activerecord//lib/active_record/reflection.rb#966 def through_reflection; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#796 + # source://activerecord//lib/active_record/reflection.rb#925 def through_reflection?; end - # source://activerecord//lib/active_record/reflection.rb#785 + # source://activerecord//lib/active_record/reflection.rb#913 def type(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1163 def validate?(*_arg0, **_arg1, &_arg2); end protected # FIXME: this is a horrible name # - # source://activerecord//lib/active_record/reflection.rb#1009 + # source://activerecord//lib/active_record/reflection.rb#1137 def actual_source_reflection; end private - # source://activerecord//lib/active_record/reflection.rb#1016 + # source://activerecord//lib/active_record/reflection.rb#1144 def collect_join_reflections(seed); end # Returns the value of attribute delegate_reflection. # - # source://activerecord//lib/active_record/reflection.rb#1014 + # source://activerecord//lib/active_record/reflection.rb#1142 def delegate_reflection; end - # source://activerecord//lib/active_record/reflection.rb#1027 + # source://activerecord//lib/active_record/reflection.rb#1155 def derive_class_name; end - # source://activerecord//lib/active_record/reflection.rb#1025 + # source://activerecord//lib/active_record/reflection.rb#1153 def inverse_name; end end @@ -29135,37 +31113,42 @@ class ActiveRecord::Relation # @return [Relation] a new instance of Relation # - # source://activerecord//lib/active_record/relation.rb#27 + # source://activerecord//lib/active_record/relation.rb#28 def initialize(klass, table: T.unsafe(nil), predicate_builder: T.unsafe(nil), values: T.unsafe(nil)); end # Compares two relations for equality. # - # source://activerecord//lib/active_record/relation.rb#766 + # source://activerecord//lib/active_record/relation.rb#813 def ==(other); end - # source://activerecord//lib/active_record/relation.rb#432 + # source://activerecord//lib/active_record/relation.rb#471 def _exec_scope(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation.rb#811 + # source://activerecord//lib/active_record/relation.rb#863 def alias_tracker(joins = T.unsafe(nil), aliases = T.unsafe(nil)); end # Returns true if there are any records. # + # When a pattern argument is given, this method checks whether elements in + # the Enumerable match the pattern via the case-equality operator (===). + # + # posts.any?(Post) # => true or false + # # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#284 - def any?; end + # source://activerecord//lib/active_record/relation.rb#312 + def any?(*args); end # @yield [attr, bind] # - # source://activerecord//lib/active_record/relation.rb#43 + # source://activerecord//lib/active_record/relation.rb#46 def bind_attribute(name, value); end # Returns true if relation is blank. # # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#782 + # source://activerecord//lib/active_record/relation.rb#834 def blank?; end # Initializes new record from relation while maintaining the current @@ -29181,7 +31164,7 @@ class ActiveRecord::Relation # user = users.new { |user| user.name = 'Oscar' } # user.name # => Oscar # - # source://activerecord//lib/active_record/relation.rb#66 + # source://activerecord//lib/active_record/relation.rb#69 def build(attributes = T.unsafe(nil), &block); end # Returns a stable cache key that can be used to identify this query. @@ -29191,7 +31174,7 @@ class ActiveRecord::Relation # # => "products/query-1850ab3d302391b85b8693e941286659" # # If ActiveRecord::Base.collection_cache_versioning is turned off, as it was - # in Rails 6.0 and earlier, the cache key will also include a version. + # in \Rails 6.0 and earlier, the cache key will also include a version. # # ActiveRecord::Base.collection_cache_versioning = false # Product.where("name like ?", "%Cosmic Encounter%").cache_key @@ -29202,12 +31185,12 @@ class ActiveRecord::Relation # # Product.where("name like ?", "%Game%").cache_key(:last_reviewed_at) # - # source://activerecord//lib/active_record/relation.rb#320 + # source://activerecord//lib/active_record/relation.rb#359 def cache_key(timestamp_column = T.unsafe(nil)); end # Returns a cache key along with the version. # - # source://activerecord//lib/active_record/relation.rb#399 + # source://activerecord//lib/active_record/relation.rb#438 def cache_key_with_version; end # Returns a cache version that can be used together with the cache key to form @@ -29221,7 +31204,7 @@ class ActiveRecord::Relation # # SELECT COUNT(*), MAX("products"."updated_at") FROM "products" WHERE (name like '%Cosmic Encounter%') # - # source://activerecord//lib/active_record/relation.rb#347 + # source://activerecord//lib/active_record/relation.rb#386 def cache_version(timestamp_column = T.unsafe(nil)); end # Tries to create a new record with the same scoped attributes @@ -29244,7 +31227,7 @@ class ActiveRecord::Relation # users.create(name: nil) # validation on name # # => # # - # source://activerecord//lib/active_record/relation.rb#95 + # source://activerecord//lib/active_record/relation.rb#98 def create(attributes = T.unsafe(nil), &block); end # Similar to #create, but calls @@ -29254,7 +31237,7 @@ class ActiveRecord::Relation # Expects arguments in the same format as # {ActiveRecord::Base.create!}[rdoc-ref:Persistence::ClassMethods#create!]. # - # source://activerecord//lib/active_record/relation.rb#110 + # source://activerecord//lib/active_record/relation.rb#113 def create!(attributes = T.unsafe(nil), &block); end # Attempts to create a record with the given attributes in a table that has a unique database constraint @@ -29262,16 +31245,15 @@ class ActiveRecord::Relation # unique constraints, the exception such an insertion would normally raise is caught, # and the existing record with those attributes is found using #find_by!. # - # This is similar to #find_or_create_by, but avoids the problem of stale reads between the SELECT - # and the INSERT, as that method needs to first query the table, then attempt to insert a row - # if none is found. + # This is similar to #find_or_create_by, but tries to create the record first. As such it is + # better suited for cases where the record is most likely not to exist yet. # # There are several drawbacks to #create_or_find_by, though: # # * The underlying table must have the relevant columns defined with unique database constraints. # * A unique constraint violation may be triggered by only one, or at least less than all, # of the given attributes. This means that the subsequent #find_by! may fail to find a - # matching record, which will then raise an ActiveRecord::RecordNotFound exception, + # matching record, which will then raise an ActiveRecord::RecordNotFound exception, # rather than a record with the given attributes. # * While we avoid the race condition between SELECT -> INSERT from #find_or_create_by, # we actually have another race condition between INSERT -> SELECT, which can be triggered @@ -29280,7 +31262,7 @@ class ActiveRecord::Relation # * It relies on exception handling to handle control flow, which may be marginally slower. # * The primary key may auto-increment on each create, even if it fails. This can accelerate # the problem of running out of integers, if the underlying table is still stuck on a primary - # key of type int (note: All Rails apps since 5.1+ have defaulted to bigint, which is not liable + # key of type int (note: All \Rails apps since 5.1+ have defaulted to bigint, which is not liable # to this problem). # # This method will return a record if all given attributes are covered by unique constraints @@ -29288,14 +31270,14 @@ class ActiveRecord::Relation # and failed due to validation errors it won't be persisted, you get what #create returns in # such situation. # - # source://activerecord//lib/active_record/relation.rb#209 + # source://activerecord//lib/active_record/relation.rb#215 def create_or_find_by(attributes, &block); end # Like #create_or_find_by, but calls # {create!}[rdoc-ref:Persistence::ClassMethods#create!] so an exception # is raised if the created record is invalid. # - # source://activerecord//lib/active_record/relation.rb#218 + # source://activerecord//lib/active_record/relation.rb#228 def create_or_find_by!(attributes, &block); end # Deletes the records without instantiating the records @@ -29317,7 +31299,7 @@ class ActiveRecord::Relation # Post.distinct.delete_all # # => ActiveRecord::ActiveRecordError: delete_all doesn't support distinct # - # source://activerecord//lib/active_record/relation.rb#601 + # source://activerecord//lib/active_record/relation.rb#646 def delete_all; end # Finds and deletes all records matching the specified conditions. @@ -29330,7 +31312,7 @@ class ActiveRecord::Relation # Person.delete_by(name: 'Spartacus', rating: 4) # Person.delete_by("published_at < ?", 2.weeks.ago) # - # source://activerecord//lib/active_record/relation.rb#642 + # source://activerecord//lib/active_record/relation.rb#689 def delete_by(*args); end # Destroys the records by instantiating each @@ -29350,7 +31332,7 @@ class ActiveRecord::Relation # # Person.where(age: 0..18).destroy_all # - # source://activerecord//lib/active_record/relation.rb#579 + # source://activerecord//lib/active_record/relation.rb#624 def destroy_all; end # Finds and destroys all records matching the specified conditions. @@ -29363,31 +31345,31 @@ class ActiveRecord::Relation # Person.destroy_by(name: 'Spartacus', rating: 4) # Person.destroy_by("published_at < ?", 2.weeks.ago) # - # source://activerecord//lib/active_record/relation.rb#629 + # source://activerecord//lib/active_record/relation.rb#676 def destroy_by(*args); end # Returns true if relation needs eager loading. # # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#751 + # source://activerecord//lib/active_record/relation.rb#798 def eager_loading?; end # Returns true if there are no records. # # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#269 + # source://activerecord//lib/active_record/relation.rb#283 def empty?; end # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#803 + # source://activerecord//lib/active_record/relation.rb#855 def empty_scope?; end # Serializes the relation objects Array. # - # source://activerecord//lib/active_record/relation.rb#255 + # source://activerecord//lib/active_record/relation.rb#269 def encode_with(coder); end # Runs EXPLAIN on the query or queries triggered by this relation and @@ -29400,8 +31382,8 @@ class ActiveRecord::Relation # Please see further details in the # {Active Record Query Interface guide}[https://guides.rubyonrails.org/active_record_querying.html#running-explain]. # - # source://activerecord//lib/active_record/relation.rb#239 - def explain; end + # source://activerecord//lib/active_record/relation.rb#253 + def explain(*options); end # Finds the first record with the given attributes, or creates a record # with the attributes if one is not found: @@ -29434,44 +31416,48 @@ class ActiveRecord::Relation # failed due to validation errors it won't be persisted, you get what # #create returns in such situation. # - # Please note this method is not atomic, it runs first a SELECT, and if - # there are no results an INSERT is attempted. If there are other threads - # or processes there is a race condition between both calls and it could - # be the case that you end up with two similar records. + # If creation failed because of a unique constraint, this method will + # assume it encountered a race condition and will try finding the record + # once more. If somehow the second find still does not find a record + # because a concurrent DELETE happened, it will then raise an + # ActiveRecord::RecordNotFound exception. # - # If this might be a problem for your application, please see #create_or_find_by. + # Please note this method is not atomic, it runs first a SELECT, + # and if there are no results an INSERT is attempted. So if the table + # doesn't have a relevant unique constraint it could be the case that + # you end up with two or more similar records. # - # source://activerecord//lib/active_record/relation.rb#168 + # source://activerecord//lib/active_record/relation.rb#175 def find_or_create_by(attributes, &block); end # Like #find_or_create_by, but calls # {create!}[rdoc-ref:Persistence::ClassMethods#create!] so an exception # is raised if the created record is invalid. # - # source://activerecord//lib/active_record/relation.rb#175 + # source://activerecord//lib/active_record/relation.rb#182 def find_or_create_by!(attributes, &block); end # Like #find_or_create_by, but calls {new}[rdoc-ref:Core#new] # instead of {create}[rdoc-ref:Persistence::ClassMethods#create]. # - # source://activerecord//lib/active_record/relation.rb#226 + # source://activerecord//lib/active_record/relation.rb#240 def find_or_initialize_by(attributes, &block); end - # source://activerecord//lib/active_record/relation.rb#119 + # source://activerecord//lib/active_record/relation.rb#122 def first_or_create(attributes = T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/relation.rb#123 + # source://activerecord//lib/active_record/relation.rb#126 def first_or_create!(attributes = T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/relation.rb#127 + # source://activerecord//lib/active_record/relation.rb#130 def first_or_initialize(attributes = T.unsafe(nil), &block); end # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#807 + # source://activerecord//lib/active_record/relation.rb#859 def has_limit_or_offset?; end - # source://activerecord//lib/active_record/relation.rb#794 + # source://activerecord//lib/active_record/relation.rb#846 def inspect; end # Joins that are also marked for preloading. In which case we should just eager load them. @@ -29479,12 +31465,12 @@ class ActiveRecord::Relation # represent the same association, but that aren't matched by this. Also, we could have # nested hashes which partially match, e.g. { a: :b } & { a: [:b, :c] } # - # source://activerecord//lib/active_record/relation.rb#761 + # source://activerecord//lib/active_record/relation.rb#808 def joined_includes_values; end # Returns the value of attribute klass. # - # source://activerecord//lib/active_record/relation.rb#21 + # source://activerecord//lib/active_record/relation.rb#22 def klass; end # Causes the records to be loaded from the database if they have not @@ -29494,7 +31480,7 @@ class ActiveRecord::Relation # # Post.where(published: true).load # => # # - # source://activerecord//lib/active_record/relation.rb#693 + # source://activerecord//lib/active_record/relation.rb#740 def load(&block); end # Schedule the query to be performed from a background thread pool. @@ -29516,32 +31502,32 @@ class ActiveRecord::Relation # # ASYNC Post Load (0.0ms) (db time 2ms) SELECT "posts".* FROM "posts" LIMIT 100 # - # source://activerecord//lib/active_record/relation.rb#664 + # source://activerecord//lib/active_record/relation.rb#711 def load_async; end # Returns the value of attribute loaded. # - # source://activerecord//lib/active_record/relation.rb#21 + # source://activerecord//lib/active_record/relation.rb#22 def loaded; end # Returns the value of attribute loaded. # - # source://activerecord//lib/active_record/relation.rb#21 + # source://activerecord//lib/active_record/relation.rb#22 def loaded?; end - # source://activerecord//lib/active_record/relation/query_methods.rb#147 + # source://activerecord//lib/active_record/relation/query_methods.rb#155 def locked?; end # Returns true if there is more than one record. # # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#297 + # source://activerecord//lib/active_record/relation.rb#334 def many?; end # Returns the value of attribute klass. # - # source://activerecord//lib/active_record/relation.rb#21 + # source://activerecord//lib/active_record/relation.rb#22 def model; end # Initializes new record from relation while maintaining the current @@ -29557,43 +31543,53 @@ class ActiveRecord::Relation # user = users.new { |user| user.name = 'Oscar' } # user.name # => Oscar # - # source://activerecord//lib/active_record/relation.rb#66 + # source://activerecord//lib/active_record/relation.rb#69 def new(attributes = T.unsafe(nil), &block); end # Returns true if there are no records. # + # When a pattern argument is given, this method checks whether elements in + # the Enumerable match the pattern via the case-equality operator (===). + # + # posts.none?(Comment) # => true or false + # # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#278 - def none?; end + # source://activerecord//lib/active_record/relation.rb#299 + def none?(*args); end # Returns true if there is exactly one record. # + # When a pattern argument is given, this method checks whether elements in + # the Enumerable match the pattern via the case-equality operator (===). + # + # posts.one?(Post) # => true or false + # # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#290 - def one?; end + # source://activerecord//lib/active_record/relation.rb#325 + def one?(*args); end # Returns the value of attribute predicate_builder. # - # source://activerecord//lib/active_record/relation.rb#21 + # source://activerecord//lib/active_record/relation.rb#22 def predicate_builder; end - # source://activerecord//lib/active_record/relation.rb#825 + # source://activerecord//lib/active_record/relation.rb#877 def preload_associations(records); end - # source://activerecord//lib/active_record/relation.rb#777 - def pretty_print(q); end + # source://activerecord//lib/active_record/relation.rb#824 + def pretty_print(pp); end - # source://activerecord//lib/active_record/relation.rb#249 + # source://activerecord//lib/active_record/relation.rb#263 def records; end # Forces reloading of relation. # - # source://activerecord//lib/active_record/relation.rb#703 + # source://activerecord//lib/active_record/relation.rb#750 def reload; end - # source://activerecord//lib/active_record/relation.rb#708 + # source://activerecord//lib/active_record/relation.rb#755 def reset; end # Returns true if the relation was scheduled on the background @@ -29601,10 +31597,10 @@ class ActiveRecord::Relation # # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#683 + # source://activerecord//lib/active_record/relation.rb#730 def scheduled?; end - # source://activerecord//lib/active_record/relation.rb#744 + # source://activerecord//lib/active_record/relation.rb#791 def scope_for_create; end # Scope all queries to the current scope. @@ -29612,7 +31608,7 @@ class ActiveRecord::Relation # Comment.where(post_id: 1).scoping do # Comment.first # end - # # => SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 ORDER BY "comments"."id" ASC LIMIT 1 + # # SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 ORDER BY "comments"."id" ASC LIMIT 1 # # If all_queries: true is passed, scoping will apply to all queries # for the relation including +update+ and +delete+ on instances. @@ -29622,47 +31618,47 @@ class ActiveRecord::Relation # Please check unscoped if you want to remove all previous scopes (including # the default_scope) during the execution of a block. # - # source://activerecord//lib/active_record/relation.rb#421 + # source://activerecord//lib/active_record/relation.rb#460 def scoping(all_queries: T.unsafe(nil), &block); end # Returns size of the records. # - # source://activerecord//lib/active_record/relation.rb#260 + # source://activerecord//lib/active_record/relation.rb#274 def size; end # Returns the value of attribute skip_preloading_value. # - # source://activerecord//lib/active_record/relation.rb#22 + # source://activerecord//lib/active_record/relation.rb#23 def skip_preloading_value; end # Sets the attribute skip_preloading_value # # @param value the value to set the attribute skip_preloading_value to. # - # source://activerecord//lib/active_record/relation.rb#22 + # source://activerecord//lib/active_record/relation.rb#23 def skip_preloading_value=(_arg0); end # Returns the value of attribute table. # - # source://activerecord//lib/active_record/relation.rb#21 + # source://activerecord//lib/active_record/relation.rb#22 def table; end # Converts relation objects to Array. # - # source://activerecord//lib/active_record/relation.rb#244 + # source://activerecord//lib/active_record/relation.rb#258 def to_a; end # Converts relation objects to Array. # - # source://activerecord//lib/active_record/relation.rb#244 + # source://activerecord//lib/active_record/relation.rb#258 def to_ary; end # Returns sql statement for the relation. # # User.where(name: 'Oscar').to_sql - # # => SELECT "users".* FROM "users" WHERE "users"."name" = 'Oscar' + # # SELECT "users".* FROM "users" WHERE "users"."name" = 'Oscar' # - # source://activerecord//lib/active_record/relation.rb#724 + # source://activerecord//lib/active_record/relation.rb#771 def to_sql; end # Touches all records in the current relation, setting the +updated_at+/+updated_on+ attributes to the current time or the time specified. @@ -29689,13 +31685,13 @@ class ActiveRecord::Relation # Person.where(name: 'David').touch_all # # => "UPDATE \"people\" SET \"updated_at\" = '2018-01-04 22:55:23.132670' WHERE \"people\".\"name\" = 'David'" # - # source://activerecord//lib/active_record/relation.rb#559 + # source://activerecord//lib/active_record/relation.rb#604 def touch_all(*names, time: T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation.rb#488 + # source://activerecord//lib/active_record/relation.rb#533 def update(id = T.unsafe(nil), attributes); end - # source://activerecord//lib/active_record/relation.rb#496 + # source://activerecord//lib/active_record/relation.rb#541 def update!(id = T.unsafe(nil), attributes); end # Updates all records in the current relation with details given. This method constructs a single SQL UPDATE @@ -29707,7 +31703,8 @@ class ActiveRecord::Relation # # ==== Parameters # - # * +updates+ - A string, array, or hash representing the SET part of an SQL statement. + # * +updates+ - A string, array, or hash representing the SET part of an SQL statement. Any strings provided will + # be type cast, unless you use +Arel.sql+. (Don't pass user-provided values to +Arel.sql+.) # # ==== Examples # @@ -29723,9 +31720,12 @@ class ActiveRecord::Relation # # Update all invoices and set the number column to its id value. # Invoice.update_all('number = id') # + # # Update all books with 'Rails' in their title + # Book.where('title LIKE ?', '%Rails%').update_all(title: Arel.sql("title + ' - volume 1'")) + # # @raise [ArgumentError] # - # source://activerecord//lib/active_record/relation.rb#464 + # source://activerecord//lib/active_record/relation.rb#507 def update_all(updates); end # Updates the counters of the records in the current relation. @@ -29741,13 +31741,13 @@ class ActiveRecord::Relation # # For Posts by a given author increment the comment_count by 1. # Post.where(author_id: author.id).update_counters(comment_count: 1) # - # source://activerecord//lib/active_record/relation.rb#516 + # source://activerecord//lib/active_record/relation.rb#561 def update_counters(counters); end - # source://activerecord//lib/active_record/relation.rb#786 + # source://activerecord//lib/active_record/relation.rb#838 def values; end - # source://activerecord//lib/active_record/relation.rb#790 + # source://activerecord//lib/active_record/relation.rb#842 def values_for_queries; end # Returns a hash of where conditions. @@ -29755,86 +31755,81 @@ class ActiveRecord::Relation # User.where(name: 'Oscar').where_values_hash # # => {name: "Oscar"} # - # source://activerecord//lib/active_record/relation.rb#740 + # source://activerecord//lib/active_record/relation.rb#787 def where_values_hash(relation_table_name = T.unsafe(nil)); end protected - # source://activerecord//lib/active_record/relation.rb#835 + # source://activerecord//lib/active_record/relation.rb#887 def load_records(records); end - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation.rb#840 - def null_relation?; end - private - # source://activerecord//lib/active_record/relation.rb#865 + # source://activerecord//lib/active_record/relation.rb#913 def _create(attributes, &block); end - # source://activerecord//lib/active_record/relation.rb#869 + # source://activerecord//lib/active_record/relation.rb#917 def _create!(attributes, &block); end - # source://activerecord//lib/active_record/relation.rb#900 + # source://activerecord//lib/active_record/relation.rb#948 def _increment_attribute(attribute, value = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation.rb#861 + # source://activerecord//lib/active_record/relation.rb#909 def _new(attributes, &block); end - # source://activerecord//lib/active_record/relation.rb#873 + # source://activerecord//lib/active_record/relation.rb#921 def _scoping(scope, registry, all_queries = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation.rb#889 + # source://activerecord//lib/active_record/relation.rb#937 def _substitute_values(values); end # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#845 + # source://activerecord//lib/active_record/relation.rb#893 def already_in_scope?(registry); end - # source://activerecord//lib/active_record/relation.rb#325 + # source://activerecord//lib/active_record/relation.rb#364 def compute_cache_key(timestamp_column = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation.rb#354 + # source://activerecord//lib/active_record/relation.rb#393 def compute_cache_version(timestamp_column); end - # source://activerecord//lib/active_record/relation.rb#853 + # source://activerecord//lib/active_record/relation.rb#901 def current_scope_restoring_block(&block); end - # source://activerecord//lib/active_record/relation.rb#927 + # source://activerecord//lib/active_record/relation.rb#975 def exec_main_query(async: T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation.rb#907 + # source://activerecord//lib/active_record/relation.rb#955 def exec_queries(&block); end # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#849 + # source://activerecord//lib/active_record/relation.rb#897 def global_scope?(registry); end - # source://activerecord//lib/active_record/relation.rb#38 + # source://activerecord//lib/active_record/relation.rb#41 def initialize_copy(other); end - # source://activerecord//lib/active_record/relation.rb#947 + # source://activerecord//lib/active_record/relation.rb#1003 def instantiate_records(rows, &block); end - # source://activerecord//lib/active_record/relation.rb#990 + # source://activerecord//lib/active_record/relation.rb#1046 def limited_count; end # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#966 + # source://activerecord//lib/active_record/relation.rb#1022 def references_eager_loaded_tables?; end - # source://activerecord//lib/active_record/relation.rb#958 + # source://activerecord//lib/active_record/relation.rb#1014 def skip_query_cache_if_necessary(&block); end - # source://activerecord//lib/active_record/relation.rb#983 + # source://activerecord//lib/active_record/relation.rb#1039 def tables_in_string(string); end end -# source://activerecord//lib/active_record/relation.rb#13 +# source://activerecord//lib/active_record/relation.rb#14 ActiveRecord::Relation::CLAUSE_METHODS = T.let(T.unsafe(nil), Array) # source://activerecord//lib/active_record/relation/from_clause.rb#5 @@ -29900,7 +31895,7 @@ class ActiveRecord::Relation::HashMerger def relation; end end -# source://activerecord//lib/active_record/relation.rb#14 +# source://activerecord//lib/active_record/relation.rb#15 ActiveRecord::Relation::INVALID_METHODS_FOR_DELETE_ALL = T.let(T.unsafe(nil), Array) # source://activerecord//lib/active_record/relation.rb#6 @@ -29933,30 +31928,30 @@ class ActiveRecord::Relation::Merger private - # source://activerecord//lib/active_record/relation/merger.rb#176 + # source://activerecord//lib/active_record/relation/merger.rb#178 def merge_clauses; end - # source://activerecord//lib/active_record/relation/merger.rb#117 + # source://activerecord//lib/active_record/relation/merger.rb#119 def merge_joins; end - # source://activerecord//lib/active_record/relation/merger.rb#155 + # source://activerecord//lib/active_record/relation/merger.rb#157 def merge_multi_values; end - # source://activerecord//lib/active_record/relation/merger.rb#136 + # source://activerecord//lib/active_record/relation/merger.rb#138 def merge_outer_joins; end - # source://activerecord//lib/active_record/relation/merger.rb#96 + # source://activerecord//lib/active_record/relation/merger.rb#98 def merge_preloads; end - # source://activerecord//lib/active_record/relation/merger.rb#84 + # source://activerecord//lib/active_record/relation/merger.rb#86 def merge_select_values; end - # source://activerecord//lib/active_record/relation/merger.rb#168 + # source://activerecord//lib/active_record/relation/merger.rb#170 def merge_single_values; end # @return [Boolean] # - # source://activerecord//lib/active_record/relation/merger.rb#186 + # source://activerecord//lib/active_record/relation/merger.rb#188 def replace_from_clause?; end end @@ -29965,55 +31960,69 @@ ActiveRecord::Relation::Merger::NORMAL_VALUES = T.let(T.unsafe(nil), Array) # source://activerecord//lib/active_record/relation/query_attribute.rb#7 class ActiveRecord::Relation::QueryAttribute < ::ActiveModel::Attribute + # @return [QueryAttribute] a new instance of QueryAttribute + # + # source://activerecord//lib/active_record/relation/query_attribute.rb#8 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/query_attribute.rb#53 + def ==(other); end + + # source://activerecord//lib/active_record/relation/query_attribute.rb#53 + def eql?(other); end + + # source://activerecord//lib/active_record/relation/query_attribute.rb#58 + def hash; end + # @return [Boolean] # - # source://activerecord//lib/active_record/relation/query_attribute.rb#27 + # source://activerecord//lib/active_record/relation/query_attribute.rb#42 def infinite?; end # @return [Boolean] # - # source://activerecord//lib/active_record/relation/query_attribute.rb#20 + # source://activerecord//lib/active_record/relation/query_attribute.rb#35 def nil?; end - # source://activerecord//lib/active_record/relation/query_attribute.rb#8 + # source://activerecord//lib/active_record/relation/query_attribute.rb#22 def type_cast(value); end # @return [Boolean] # - # source://activerecord//lib/active_record/relation/query_attribute.rb#31 + # source://activerecord//lib/active_record/relation/query_attribute.rb#46 def unboundable?; end - # source://activerecord//lib/active_record/relation/query_attribute.rb#12 + # source://activerecord//lib/active_record/relation/query_attribute.rb#26 def value_for_database; end - # source://activerecord//lib/active_record/relation/query_attribute.rb#16 + # source://activerecord//lib/active_record/relation/query_attribute.rb#31 def with_cast_value(value); end private # @return [Boolean] # - # source://activerecord//lib/active_record/relation/query_attribute.rb#39 + # source://activerecord//lib/active_record/relation/query_attribute.rb#63 def infinity?(value); end end -# source://activerecord//lib/active_record/relation.rb#10 +# source://activerecord//lib/active_record/relation.rb#11 ActiveRecord::Relation::SINGLE_VALUE_METHODS = T.let(T.unsafe(nil), Array) -# source://activerecord//lib/active_record/relation.rb#815 +# source://activerecord//lib/active_record/relation.rb#867 class ActiveRecord::Relation::StrictLoadingScope class << self # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#816 + # source://activerecord//lib/active_record/relation.rb#868 def empty_scope?; end - # source://activerecord//lib/active_record/relation.rb#820 + # source://activerecord//lib/active_record/relation.rb#872 def strict_loading_value; end end end -# source://activerecord//lib/active_record/relation.rb#16 +# source://activerecord//lib/active_record/relation.rb#17 ActiveRecord::Relation::VALUE_METHODS = T.let(T.unsafe(nil), Array) # source://activerecord//lib/active_record/relation/where_clause.rb#7 @@ -30129,6 +32138,8 @@ end # source://activerecord//lib/active_record/relation/where_clause.rb#209 ActiveRecord::Relation::WhereClause::ARRAY_WITH_EMPTY_STRING = T.let(T.unsafe(nil), Array) +# = Active Record \Result +# # This class encapsulates a result returned from calling # {#exec_query}[rdoc-ref:ConnectionAdapters::DatabaseStatements#exec_query] # on any database connection adapter. For example: @@ -30159,32 +32170,32 @@ ActiveRecord::Relation::WhereClause::ARRAY_WITH_EMPTY_STRING = T.let(T.unsafe(ni # puts row['title'] + " " + row['body'] # end # -# source://activerecord//lib/active_record/result.rb#34 +# source://activerecord//lib/active_record/result.rb#36 class ActiveRecord::Result include ::Enumerable # @return [Result] a new instance of Result # - # source://activerecord//lib/active_record/result.rb#43 + # source://activerecord//lib/active_record/result.rb#49 def initialize(columns, rows, column_types = T.unsafe(nil)); end - # source://activerecord//lib/active_record/result.rb#87 + # source://activerecord//lib/active_record/result.rb#90 def [](idx); end - # source://activerecord//lib/active_record/result.rb#100 + # source://activerecord//lib/active_record/result.rb#103 def cancel; end - # source://activerecord//lib/active_record/result.rb#104 + # source://activerecord//lib/active_record/result.rb#107 def cast_values(type_overrides = T.unsafe(nil)); end # Returns the value of attribute column_types. # - # source://activerecord//lib/active_record/result.rb#37 + # source://activerecord//lib/active_record/result.rb#39 def column_types; end # Returns the value of attribute columns. # - # source://activerecord//lib/active_record/result.rb#37 + # source://activerecord//lib/active_record/result.rb#39 def columns; end # Calls the given block once for each element in row collection, passing @@ -30192,71 +32203,77 @@ class ActiveRecord::Result # # Returns an +Enumerator+ if no block is given. # - # source://activerecord//lib/active_record/result.rb#67 + # source://activerecord//lib/active_record/result.rb#70 def each(&block); end # Returns true if there are no records, otherwise false. # # @return [Boolean] # - # source://activerecord//lib/active_record/result.rb#76 + # source://activerecord//lib/active_record/result.rb#79 def empty?; end + # source://activerecord//lib/active_record/result.rb#140 + def freeze; end + # Returns true if this result set includes the column named +name+ # # @return [Boolean] # - # source://activerecord//lib/active_record/result.rb#54 + # source://activerecord//lib/active_record/result.rb#57 def includes_column?(name); end # Returns the last record from the rows collection. # - # source://activerecord//lib/active_record/result.rb#92 + # source://activerecord//lib/active_record/result.rb#95 def last(n = T.unsafe(nil)); end # Returns the number of elements in the rows array. # - # source://activerecord//lib/active_record/result.rb#59 + # source://activerecord//lib/active_record/result.rb#62 def length; end - # source://activerecord//lib/active_record/result.rb#96 + # source://activerecord//lib/active_record/result.rb#99 def result; end # Returns the value of attribute rows. # - # source://activerecord//lib/active_record/result.rb#37 + # source://activerecord//lib/active_record/result.rb#39 def rows; end # Returns an array of hashes representing each row record. # - # source://activerecord//lib/active_record/result.rb#81 + # source://activerecord//lib/active_record/result.rb#84 def to_a; end # Returns an array of hashes representing each row record. # - # source://activerecord//lib/active_record/result.rb#81 + # source://activerecord//lib/active_record/result.rb#84 def to_ary; end private - # source://activerecord//lib/active_record/result.rb#138 + # source://activerecord//lib/active_record/result.rb#146 def column_type(name, index, type_overrides); end - # source://activerecord//lib/active_record/result.rb#146 + # source://activerecord//lib/active_record/result.rb#154 def hash_rows; end - # source://activerecord//lib/active_record/result.rb#130 + # source://activerecord//lib/active_record/result.rb#133 def initialize_copy(other); end class << self - # source://activerecord//lib/active_record/result.rb#39 - def empty; end + # source://activerecord//lib/active_record/result.rb#41 + def empty(async: T.unsafe(nil)); end end end -# source://activerecord//lib/active_record/result.rb#50 +# source://activerecord//lib/active_record/result.rb#195 ActiveRecord::Result::EMPTY = T.let(T.unsafe(nil), ActiveRecord::Result) +# source://activerecord//lib/active_record/result.rb#198 +ActiveRecord::Result::EMPTY_ASYNC = T.let(T.unsafe(nil), ActiveRecord::FutureResult::Complete) + # {ActiveRecord::Base.transaction}[rdoc-ref:Transactions::ClassMethods#transaction] # uses this exception to distinguish a deliberate rollback from other exceptional situations. # Normally, raising an exception will cause the @@ -30286,7 +32303,7 @@ ActiveRecord::Result::EMPTY = T.let(T.unsafe(nil), ActiveRecord::Result) # end # end # -# source://activerecord//lib/active_record/errors.rb#338 +# source://activerecord//lib/active_record/errors.rb#408 class ActiveRecord::Rollback < ::ActiveRecord::ActiveRecordError; end # This is a thread locals registry for Active Record. For example: @@ -30299,6 +32316,15 @@ class ActiveRecord::Rollback < ::ActiveRecord::ActiveRecordError; end module ActiveRecord::RuntimeRegistry extend ::ActiveRecord::RuntimeRegistry + # source://activerecord//lib/active_record/runtime_registry.rb#20 + def async_sql_runtime; end + + # source://activerecord//lib/active_record/runtime_registry.rb#24 + def async_sql_runtime=(runtime); end + + # source://activerecord//lib/active_record/runtime_registry.rb#28 + def reset; end + # source://activerecord//lib/active_record/runtime_registry.rb#12 def sql_runtime; end @@ -30306,6 +32332,38 @@ module ActiveRecord::RuntimeRegistry def sql_runtime=(runtime); end end +# Raised when a statement produces an SQL warning. +# +# source://activerecord//lib/active_record/errors.rb#284 +class ActiveRecord::SQLWarning < ::ActiveRecord::AdapterError + # @return [SQLWarning] a new instance of SQLWarning + # + # source://activerecord//lib/active_record/errors.rb#288 + def initialize(message = T.unsafe(nil), code = T.unsafe(nil), level = T.unsafe(nil), sql = T.unsafe(nil), connection_pool = T.unsafe(nil)); end + + # Returns the value of attribute code. + # + # source://activerecord//lib/active_record/errors.rb#285 + def code; end + + # Returns the value of attribute level. + # + # source://activerecord//lib/active_record/errors.rb#285 + def level; end + + # Returns the value of attribute sql. + # + # source://activerecord//lib/active_record/errors.rb#286 + def sql; end + + # Sets the attribute sql + # + # @param value the value to set the attribute sql to. + # + # source://activerecord//lib/active_record/errors.rb#286 + def sql=(_arg0); end +end + # source://activerecord//lib/active_record/sanitization.rb#4 module ActiveRecord::Sanitization extend ::ActiveSupport::Concern @@ -30315,11 +32373,11 @@ end # source://activerecord//lib/active_record/sanitization.rb#7 module ActiveRecord::Sanitization::ClassMethods - # source://activerecord//lib/active_record/sanitization.rb#138 + # source://activerecord//lib/active_record/sanitization.rb#176 def disallow_raw_sql!(args, permit: T.unsafe(nil)); end - # Accepts an array or string of SQL conditions and sanitizes - # them into a valid SQL fragment for a WHERE clause. + # Accepts an array of SQL conditions and sanitizes them into a valid + # SQL fragment for a WHERE clause. # # sanitize_sql_for_conditions(["name=? and group_id=?", "foo'bar", 4]) # # => "name='foo''bar' and group_id=4" @@ -30330,14 +32388,27 @@ module ActiveRecord::Sanitization::ClassMethods # sanitize_sql_for_conditions(["name='%s' and group_id='%s'", "foo'bar", 4]) # # => "name='foo''bar' and group_id='4'" # + # This method will NOT sanitize a SQL string since it won't contain + # any conditions in it and will return the string as is. + # # sanitize_sql_for_conditions("name='foo''bar' and group_id='4'") # # => "name='foo''bar' and group_id='4'" # - # source://activerecord//lib/active_record/sanitization.rb#22 + # Note that this sanitization method is not schema-aware, hence won't do any type casting + # and will directly use the database adapter's +quote+ method. + # For MySQL specifically this means that numeric parameters will be quoted as strings + # to prevent query manipulation attacks. + # + # sanitize_sql_for_conditions(["role = ?", 0]) + # # => "role = '0'" + # + # source://activerecord//lib/active_record/sanitization.rb#33 def sanitize_sql(condition); end # Accepts an array of conditions. The array has each value - # sanitized and interpolated into the SQL statement. + # sanitized and interpolated into the SQL statement. If using named bind + # variables in SQL statements where a colon is required verbatim use a + # backslash to escape. # # sanitize_sql_array(["name=? and group_id=?", "foo'bar", 4]) # # => "name='foo''bar' and group_id=4" @@ -30345,14 +32416,25 @@ module ActiveRecord::Sanitization::ClassMethods # sanitize_sql_array(["name=:name and group_id=:group_id", name: "foo'bar", group_id: 4]) # # => "name='foo''bar' and group_id=4" # + # sanitize_sql_array(["TO_TIMESTAMP(:date, 'YYYY/MM/DD HH12\\:MI\\:SS')", date: "foo"]) + # # => "TO_TIMESTAMP('foo', 'YYYY/MM/DD HH12:MI:SS')" + # # sanitize_sql_array(["name='%s' and group_id='%s'", "foo'bar", 4]) # # => "name='foo''bar' and group_id='4'" # - # source://activerecord//lib/active_record/sanitization.rb#125 + # Note that this sanitization method is not schema-aware, hence won't do any type casting + # and will directly use the database adapter's +quote+ method. + # For MySQL specifically this means that numeric parameters will be quoted as strings + # to prevent query manipulation attacks. + # + # sanitize_sql_array(["role = ?", 0]) + # # => "role = '0'" + # + # source://activerecord//lib/active_record/sanitization.rb#163 def sanitize_sql_array(ary); end - # Accepts an array, hash, or string of SQL conditions and sanitizes - # them into a valid SQL fragment for a SET clause. + # Accepts an array or hash of SQL conditions and sanitizes them into + # a valid SQL fragment for a SET clause. # # sanitize_sql_for_assignment(["name=? and group_id=?", nil, 4]) # # => "name=NULL and group_id=4" @@ -30363,14 +32445,25 @@ module ActiveRecord::Sanitization::ClassMethods # Post.sanitize_sql_for_assignment({ name: nil, group_id: 4 }) # # => "`posts`.`name` = NULL, `posts`.`group_id` = 4" # + # This method will NOT sanitize a SQL string since it won't contain + # any conditions in it and will return the string as is. + # # sanitize_sql_for_assignment("name=NULL and group_id='4'") # # => "name=NULL and group_id='4'" # - # source://activerecord//lib/active_record/sanitization.rb#46 + # Note that this sanitization method is not schema-aware, hence won't do any type casting + # and will directly use the database adapter's +quote+ method. + # For MySQL specifically this means that numeric parameters will be quoted as strings + # to prevent query manipulation attacks. + # + # sanitize_sql_for_assignment(["role = ?", 0]) + # # => "role = '0'" + # + # source://activerecord//lib/active_record/sanitization.rb#68 def sanitize_sql_for_assignment(assignments, default_table_name = T.unsafe(nil)); end - # Accepts an array or string of SQL conditions and sanitizes - # them into a valid SQL fragment for a WHERE clause. + # Accepts an array of SQL conditions and sanitizes them into a valid + # SQL fragment for a WHERE clause. # # sanitize_sql_for_conditions(["name=? and group_id=?", "foo'bar", 4]) # # => "name='foo''bar' and group_id=4" @@ -30381,10 +32474,21 @@ module ActiveRecord::Sanitization::ClassMethods # sanitize_sql_for_conditions(["name='%s' and group_id='%s'", "foo'bar", 4]) # # => "name='foo''bar' and group_id='4'" # + # This method will NOT sanitize a SQL string since it won't contain + # any conditions in it and will return the string as is. + # # sanitize_sql_for_conditions("name='foo''bar' and group_id='4'") # # => "name='foo''bar' and group_id='4'" # - # source://activerecord//lib/active_record/sanitization.rb#22 + # Note that this sanitization method is not schema-aware, hence won't do any type casting + # and will directly use the database adapter's +quote+ method. + # For MySQL specifically this means that numeric parameters will be quoted as strings + # to prevent query manipulation attacks. + # + # sanitize_sql_for_conditions(["role = ?", 0]) + # # => "role = '0'" + # + # source://activerecord//lib/active_record/sanitization.rb#33 def sanitize_sql_for_conditions(condition); end # Accepts an array, or string of SQL conditions and sanitizes @@ -30396,7 +32500,7 @@ module ActiveRecord::Sanitization::ClassMethods # sanitize_sql_for_order("id ASC") # # => "id ASC" # - # source://activerecord//lib/active_record/sanitization.rb#62 + # source://activerecord//lib/active_record/sanitization.rb#84 def sanitize_sql_for_order(condition); end # Sanitizes a hash of attribute/value pairs into SQL conditions for a SET clause. @@ -30404,7 +32508,7 @@ module ActiveRecord::Sanitization::ClassMethods # sanitize_sql_hash_for_assignment({ status: nil, group_id: 1 }, "posts") # # => "`posts`.`status` = NULL, `posts`.`group_id` = 1" # - # source://activerecord//lib/active_record/sanitization.rb#85 + # source://activerecord//lib/active_record/sanitization.rb#107 def sanitize_sql_hash_for_assignment(attrs, table); end # Sanitizes a +string+ so that it is safe to use within an SQL @@ -30423,24 +32527,24 @@ module ActiveRecord::Sanitization::ClassMethods # sanitize_sql_like("snake_cased_string", "!") # # => "snake!_cased!_string" # - # source://activerecord//lib/active_record/sanitization.rb#109 + # source://activerecord//lib/active_record/sanitization.rb#131 def sanitize_sql_like(string, escape_character = T.unsafe(nil)); end private - # source://activerecord//lib/active_record/sanitization.rb#187 + # source://activerecord//lib/active_record/sanitization.rb#227 def quote_bound_value(value, c = T.unsafe(nil)); end - # source://activerecord//lib/active_record/sanitization.rb#201 + # source://activerecord//lib/active_record/sanitization.rb#241 def raise_if_bind_arity_mismatch(statement, expected, provided); end - # source://activerecord//lib/active_record/sanitization.rb#167 + # source://activerecord//lib/active_record/sanitization.rb#205 def replace_bind_variable(value, c = T.unsafe(nil)); end - # source://activerecord//lib/active_record/sanitization.rb#158 + # source://activerecord//lib/active_record/sanitization.rb#196 def replace_bind_variables(statement, values); end - # source://activerecord//lib/active_record/sanitization.rb#175 + # source://activerecord//lib/active_record/sanitization.rb#213 def replace_named_bind_variables(statement, bind_vars); end end @@ -30479,7 +32583,7 @@ class ActiveRecord::Schema < ::ActiveRecord::Migration::Current extend ::ActiveRecord::Schema::Definition::ClassMethods class << self - # source://activerecord//lib/active_record/schema.rb#69 + # source://activerecord//lib/active_record/schema.rb#68 def [](version); end end end @@ -30522,146 +32626,182 @@ end class ActiveRecord::SchemaDumper # @return [SchemaDumper] a new instance of SchemaDumper # - # source://activerecord//lib/active_record/schema_dumper.rb#59 + # source://activerecord//lib/active_record/schema_dumper.rb#71 def initialize(connection, options = T.unsafe(nil)); end # :singleton-method: # Specify a custom regular expression matching check constraints which name # should not be dumped to db/schema.rb. # - # source://activerecord//lib/active_record/schema_dumper.rb#30 + # source://activerecord//lib/active_record/schema_dumper.rb#29 def chk_ignore_pattern; end - # source://activerecord//lib/active_record/schema_dumper.rb#30 + # source://activerecord//lib/active_record/schema_dumper.rb#29 def chk_ignore_pattern=(val); end - # source://activerecord//lib/active_record/schema_dumper.rb#47 + # source://activerecord//lib/active_record/schema_dumper.rb#58 def dump(stream); end + # :singleton-method: + # Specify a custom regular expression matching exclusion constraints which name + # should not be dumped to db/schema.rb. + # + # source://activerecord//lib/active_record/schema_dumper.rb#35 + def excl_ignore_pattern; end + + # source://activerecord//lib/active_record/schema_dumper.rb#35 + def excl_ignore_pattern=(val); end + # :singleton-method: # Specify a custom regular expression matching foreign keys which name # should not be dumped to db/schema.rb. # - # source://activerecord//lib/active_record/schema_dumper.rb#24 + # source://activerecord//lib/active_record/schema_dumper.rb#23 def fk_ignore_pattern; end - # source://activerecord//lib/active_record/schema_dumper.rb#24 + # source://activerecord//lib/active_record/schema_dumper.rb#23 def fk_ignore_pattern=(val); end # :singleton-method: # A list of tables which should not be dumped to the schema. - # Acceptable values are strings as well as regexp if ActiveRecord.schema_format == :ruby. - # Only strings are accepted if ActiveRecord.schema_format == :sql. + # Acceptable values are strings and regexps. # - # source://activerecord//lib/active_record/schema_dumper.rb#18 + # source://activerecord//lib/active_record/schema_dumper.rb#17 def ignore_tables; end - # source://activerecord//lib/active_record/schema_dumper.rb#18 + # source://activerecord//lib/active_record/schema_dumper.rb#17 def ignore_tables=(val); end + # :singleton-method: + # Specify a custom regular expression matching unique constraints which name + # should not be dumped to db/schema.rb. + # + # source://activerecord//lib/active_record/schema_dumper.rb#41 + def unique_ignore_pattern; end + + # source://activerecord//lib/active_record/schema_dumper.rb#41 + def unique_ignore_pattern=(val); end + private - # source://activerecord//lib/active_record/schema_dumper.rb#227 + # source://activerecord//lib/active_record/schema_dumper.rb#263 def check_constraints_in_create(table, stream); end - # source://activerecord//lib/active_record/schema_dumper.rb#72 + # source://activerecord//lib/active_record/schema_dumper.rb#89 def define_params; end # extensions are only supported by PostgreSQL # - # source://activerecord//lib/active_record/schema_dumper.rb#99 + # source://activerecord//lib/active_record/schema_dumper.rb#116 def extensions(stream); end - # source://activerecord//lib/active_record/schema_dumper.rb#245 + # source://activerecord//lib/active_record/schema_dumper.rb#283 def foreign_keys(table, stream); end - # source://activerecord//lib/active_record/schema_dumper.rb#276 + # source://activerecord//lib/active_record/schema_dumper.rb#315 def format_colspec(colspec); end - # source://activerecord//lib/active_record/schema_dumper.rb#286 + # source://activerecord//lib/active_record/schema_dumper.rb#325 def format_index_parts(options); end - # source://activerecord//lib/active_record/schema_dumper.rb#282 + # source://activerecord//lib/active_record/schema_dumper.rb#321 def format_options(options); end # turns 20170404131909 into "2017_04_04_131909" # - # source://activerecord//lib/active_record/schema_dumper.rb#66 + # source://activerecord//lib/active_record/schema_dumper.rb#83 def formatted_version; end - # source://activerecord//lib/active_record/schema_dumper.rb#76 + # source://activerecord//lib/active_record/schema_dumper.rb#93 def header(stream); end # @return [Boolean] # - # source://activerecord//lib/active_record/schema_dumper.rb#304 + # source://activerecord//lib/active_record/schema_dumper.rb#343 def ignored?(table_name); end - # source://activerecord//lib/active_record/schema_dumper.rb#211 + # source://activerecord//lib/active_record/schema_dumper.rb#245 def index_parts(index); end # Keep it for indexing materialized views # - # source://activerecord//lib/active_record/schema_dumper.rb#190 + # source://activerecord//lib/active_record/schema_dumper.rb#212 def indexes(table, stream); end - # source://activerecord//lib/active_record/schema_dumper.rb#202 + # source://activerecord//lib/active_record/schema_dumper.rb#224 def indexes_in_create(table, stream); end - # source://activerecord//lib/active_record/schema_dumper.rb#294 + # source://activerecord//lib/active_record/schema_dumper.rb#333 def remove_prefix_and_suffix(table); end - # source://activerecord//lib/active_record/schema_dumper.rb#121 + # schemas are only supported by PostgreSQL + # + # source://activerecord//lib/active_record/schema_dumper.rb#124 + def schemas(stream); end + + # source://activerecord//lib/active_record/schema_dumper.rb#142 def table(table, stream); end # Returns the value of attribute table_name. # - # source://activerecord//lib/active_record/schema_dumper.rb#57 + # source://activerecord//lib/active_record/schema_dumper.rb#69 def table_name; end # Sets the attribute table_name # # @param value the value to set the attribute table_name to. # - # source://activerecord//lib/active_record/schema_dumper.rb#57 + # source://activerecord//lib/active_record/schema_dumper.rb#69 def table_name=(_arg0); end - # source://activerecord//lib/active_record/schema_dumper.rb#106 + # source://activerecord//lib/active_record/schema_dumper.rb#127 def tables(stream); end - # source://activerecord//lib/active_record/schema_dumper.rb#94 + # source://activerecord//lib/active_record/schema_dumper.rb#111 def trailer(stream); end # (enum) types are only supported by PostgreSQL # - # source://activerecord//lib/active_record/schema_dumper.rb#103 + # source://activerecord//lib/active_record/schema_dumper.rb#120 def types(stream); end class << self - # source://activerecord//lib/active_record/schema_dumper.rb#30 + # source://activerecord//lib/active_record/schema_dumper.rb#29 def chk_ignore_pattern; end - # source://activerecord//lib/active_record/schema_dumper.rb#30 + # source://activerecord//lib/active_record/schema_dumper.rb#29 def chk_ignore_pattern=(val); end - # source://activerecord//lib/active_record/schema_dumper.rb#33 + # source://activerecord//lib/active_record/schema_dumper.rb#44 def dump(connection = T.unsafe(nil), stream = T.unsafe(nil), config = T.unsafe(nil)); end - # source://activerecord//lib/active_record/schema_dumper.rb#24 + # source://activerecord//lib/active_record/schema_dumper.rb#35 + def excl_ignore_pattern; end + + # source://activerecord//lib/active_record/schema_dumper.rb#35 + def excl_ignore_pattern=(val); end + + # source://activerecord//lib/active_record/schema_dumper.rb#23 def fk_ignore_pattern; end - # source://activerecord//lib/active_record/schema_dumper.rb#24 + # source://activerecord//lib/active_record/schema_dumper.rb#23 def fk_ignore_pattern=(val); end - # source://activerecord//lib/active_record/schema_dumper.rb#18 + # source://activerecord//lib/active_record/schema_dumper.rb#17 def ignore_tables; end - # source://activerecord//lib/active_record/schema_dumper.rb#18 + # source://activerecord//lib/active_record/schema_dumper.rb#17 def ignore_tables=(val); end + # source://activerecord//lib/active_record/schema_dumper.rb#41 + def unique_ignore_pattern; end + + # source://activerecord//lib/active_record/schema_dumper.rb#41 + def unique_ignore_pattern=(val); end + private - # source://activerecord//lib/active_record/schema_dumper.rb#39 + # source://activerecord//lib/active_record/schema_dumper.rb#50 def generate_options(config); end def new(*_arg0); end @@ -30670,88 +32810,70 @@ end # This class is used to create a table that keeps track of which migrations # have been applied to a given database. When a migration is run, its schema -# number is inserted in to the `SchemaMigration.table_name` so it doesn't need +# number is inserted in to the schema migrations table so it doesn't need # to be executed the next time. # -# source://activerecord//lib/active_record/schema_migration.rb#11 -class ActiveRecord::SchemaMigration < ::ActiveRecord::Base - include ::ActiveRecord::SchemaMigration::GeneratedAttributeMethods - include ::ActiveRecord::SchemaMigration::GeneratedAssociationMethods +# source://activerecord//lib/active_record/schema_migration.rb#8 +class ActiveRecord::SchemaMigration + # @return [SchemaMigration] a new instance of SchemaMigration + # + # source://activerecord//lib/active_record/schema_migration.rb#14 + def initialize(connection); end - # source://activerecord//lib/active_record/schema_migration.rb#50 - def version; end + # Returns the value of attribute arel_table. + # + # source://activerecord//lib/active_record/schema_migration.rb#12 + def arel_table; end - class << self - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 - def _validators; end + # Returns the value of attribute connection. + # + # source://activerecord//lib/active_record/schema_migration.rb#12 + def connection; end - # source://activerecord//lib/active_record/schema_migration.rb#41 - def all_versions; end + # source://activerecord//lib/active_record/schema_migration.rb#78 + def count; end - # source://activerecord//lib/active_record/schema_migration.rb#21 - def create_table; end + # source://activerecord//lib/active_record/schema_migration.rb#46 + def create_table; end - # source://activerecord//lib/active_record/enum.rb#116 - def defined_enums; end + # source://activerecord//lib/active_record/schema_migration.rb#19 + def create_version(version); end - # source://activerecord//lib/active_record/schema_migration.rb#29 - def drop_table; end + # source://activerecord//lib/active_record/schema_migration.rb#32 + def delete_all_versions; end - # source://activerecord//lib/active_record/schema_migration.rb#33 - def normalize_migration_number(number); end + # source://activerecord//lib/active_record/schema_migration.rb#25 + def delete_version(version); end - # source://activerecord//lib/active_record/schema_migration.rb#37 - def normalized_versions; end + # source://activerecord//lib/active_record/schema_migration.rb#54 + def drop_table; end - # source://activerecord//lib/active_record/schema_migration.rb#13 - def primary_key; end + # source://activerecord//lib/active_record/schema_migration.rb#74 + def integer_versions; end - # @return [Boolean] - # - # source://activerecord//lib/active_record/schema_migration.rb#45 - def table_exists?; end + # source://activerecord//lib/active_record/schema_migration.rb#58 + def normalize_migration_number(number); end - # source://activerecord//lib/active_record/schema_migration.rb#17 - def table_name; end - end -end + # source://activerecord//lib/active_record/schema_migration.rb#62 + def normalized_versions; end -# source://activerecord//lib/active_record/schema_migration.rb#0 -class ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation < ::ActiveRecord::AssociationRelation - include ::ActiveRecord::Delegation::ClassSpecificRelation - include ::ActiveRecord::SchemaMigration::GeneratedRelationMethods - extend ::ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods -end + # source://activerecord//lib/active_record/schema_migration.rb#38 + def primary_key; end -# source://activerecord//lib/active_record/schema_migration.rb#0 -class ActiveRecord::SchemaMigration::ActiveRecord_Associations_CollectionProxy < ::ActiveRecord::Associations::CollectionProxy - include ::ActiveRecord::Delegation::ClassSpecificRelation - include ::ActiveRecord::SchemaMigration::GeneratedRelationMethods - extend ::ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods -end + # @return [Boolean] + # + # source://activerecord//lib/active_record/schema_migration.rb#85 + def table_exists?; end -# source://activerecord//lib/active_record/schema_migration.rb#0 -class ActiveRecord::SchemaMigration::ActiveRecord_DisableJoinsAssociationRelation < ::ActiveRecord::DisableJoinsAssociationRelation - include ::ActiveRecord::Delegation::ClassSpecificRelation - include ::ActiveRecord::SchemaMigration::GeneratedRelationMethods - extend ::ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods -end + # source://activerecord//lib/active_record/schema_migration.rb#42 + def table_name; end -# source://activerecord//lib/active_record/schema_migration.rb#0 -class ActiveRecord::SchemaMigration::ActiveRecord_Relation < ::ActiveRecord::Relation - include ::ActiveRecord::Delegation::ClassSpecificRelation - include ::ActiveRecord::SchemaMigration::GeneratedRelationMethods - extend ::ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods + # source://activerecord//lib/active_record/schema_migration.rb#66 + def versions; end end -# source://activerecord//lib/active_record/schema_migration.rb#0 -module ActiveRecord::SchemaMigration::GeneratedAssociationMethods; end - -# source://activerecord//lib/active_record/schema_migration.rb#0 -module ActiveRecord::SchemaMigration::GeneratedAttributeMethods; end - -# source://activerecord//lib/active_record/schema_migration.rb#0 -module ActiveRecord::SchemaMigration::GeneratedRelationMethods; end +# source://activerecord//lib/active_record/schema_migration.rb#9 +class ActiveRecord::SchemaMigration::NullSchemaMigration; end # = Active Record \Named \Scopes # @@ -30847,27 +32969,35 @@ module ActiveRecord::Scoping::Default::ClassMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/scoping/default.rb#54 + # source://activerecord//lib/active_record/scoping/default.rb#62 def default_scopes?(all_queries: T.unsafe(nil)); end # Are there attributes associated with this scope? # # @return [Boolean] # - # source://activerecord//lib/active_record/scoping/default.rb#47 + # source://activerecord//lib/active_record/scoping/default.rb#55 def scope_attributes?; end # Returns a scope for the model without the previously set scopes. # # class Post < ActiveRecord::Base + # belongs_to :user + # # def self.default_scope # where(published: true) # end # end # + # class User < ActiveRecord::Base + # has_many :posts + # end + # # Post.all # Fires "SELECT * FROM posts WHERE published = true" # Post.unscoped.all # Fires "SELECT * FROM posts" # Post.where(published: false).unscoped.all # Fires "SELECT * FROM posts" + # User.find(1).posts # Fires "SELECT * FROM posts WHERE published = true AND posts.user_id = 1" + # User.find(1).posts.unscoped # Fires "SELECT * FROM posts" # # This method also accepts a block. All queries inside the block will # not use the previously set scopes. @@ -30876,12 +33006,12 @@ module ActiveRecord::Scoping::Default::ClassMethods # Post.limit(10) # Fires "SELECT * FROM posts LIMIT 10" # } # - # source://activerecord//lib/active_record/scoping/default.rb#42 + # source://activerecord//lib/active_record/scoping/default.rb#50 def unscoped(&block); end private - # source://activerecord//lib/active_record/scoping/default.rb#135 + # source://activerecord//lib/active_record/scoping/default.rb#145 def build_default_scope(relation = T.unsafe(nil), all_queries: T.unsafe(nil)); end # Use this macro in your model to set a default scope for all operations on @@ -30891,7 +33021,8 @@ module ActiveRecord::Scoping::Default::ClassMethods # default_scope { where(published: true) } # end # - # Article.all # => SELECT * FROM articles WHERE published = true + # Article.all + # # SELECT * FROM articles WHERE published = true # # The #default_scope is also applied while creating/building a record. # It is not applied while updating or deleting a record. @@ -30912,7 +33043,7 @@ module ActiveRecord::Scoping::Default::ClassMethods # queries that return a single object by primary key. # # Article.find(1).destroy - # => DELETE ... FROM `articles` where ID = 1 AND blog_id = 1; + # # DELETE ... FROM `articles` where ID = 1 AND blog_id = 1; # # (You can also pass any object which responds to +call+ to the # +default_scope+ macro, and it will be called when building the @@ -30926,7 +33057,8 @@ module ActiveRecord::Scoping::Default::ClassMethods # default_scope { where(rating: 'G') } # end # - # Article.all # => SELECT * FROM articles WHERE published = true AND rating = 'G' + # Article.all + # # SELECT * FROM articles WHERE published = true AND rating = 'G' # # This is also the case with inheritance and module includes where the # parent or module defines a #default_scope and the child or including @@ -30941,33 +33073,33 @@ module ActiveRecord::Scoping::Default::ClassMethods # end # end # - # source://activerecord//lib/active_record/scoping/default.rb#119 + # source://activerecord//lib/active_record/scoping/default.rb#129 def default_scope(scope = T.unsafe(nil), all_queries: T.unsafe(nil), &block); end # The ignore_default_scope flag is used to prevent an infinite recursion # situation where a default scope references a scope which has a default # scope which references a scope... # - # source://activerecord//lib/active_record/scoping/default.rb#182 + # source://activerecord//lib/active_record/scoping/default.rb#192 def evaluate_default_scope; end # If all_queries is nil, only execute on select and insert queries. # # If all_queries is true, check if the default_scope object has - # all_queries set, then execute on all queries; select, insert, update - # and delete. + # all_queries set, then execute on all queries; select, insert, update, + # delete, and reload. # # @return [Boolean] # - # source://activerecord//lib/active_record/scoping/default.rb#167 + # source://activerecord//lib/active_record/scoping/default.rb#177 def execute_scope?(all_queries, default_scope_obj); end - # source://activerecord//lib/active_record/scoping/default.rb#175 + # source://activerecord//lib/active_record/scoping/default.rb#185 def ignore_default_scope=(ignore); end # @return [Boolean] # - # source://activerecord//lib/active_record/scoping/default.rb#171 + # source://activerecord//lib/active_record/scoping/default.rb#181 def ignore_default_scope?; end end @@ -31012,7 +33144,7 @@ module ActiveRecord::Scoping::Named::ClassMethods # {default_scope}[rdoc-ref:Scoping::Default::ClassMethods#default_scope]. # # source://activerecord//lib/active_record/scoping/named.rb#22 - def all; end + def all(all_queries: T.unsafe(nil)); end # source://activerecord//lib/active_record/scoping/named.rb#49 def default_extensions; end @@ -31179,7 +33311,7 @@ class ActiveRecord::Scoping::ScopeRegistry # Sets the +value+ for a given +scope_type+ and +model+. # - # source://activerecord//lib/active_record/scoping.rb#130 + # source://activerecord//lib/active_record/scoping.rb#131 def set_value_for(scope_type, model, value); end # Obtains the value for a given +scope_type+ and +model+. @@ -31211,6 +33343,55 @@ class ActiveRecord::Scoping::ScopeRegistry end end +# source://activerecord//lib/active_record/secure_password.rb#4 +module ActiveRecord::SecurePassword + extend ::ActiveSupport::Concern + include ::ActiveModel::SecurePassword + + mixes_in_class_methods ::ActiveModel::SecurePassword::ClassMethods + mixes_in_class_methods ::ActiveRecord::SecurePassword::ClassMethods +end + +# source://activerecord//lib/active_record/secure_password.rb#9 +module ActiveRecord::SecurePassword::ClassMethods + # Given a set of attributes, finds a record using the non-password + # attributes, and then authenticates that record using the password + # attributes. Returns the record if authentication succeeds; otherwise, + # returns +nil+. + # + # Regardless of whether a record is found, +authenticate_by+ will + # cryptographically digest the given password attributes. This behavior + # helps mitigate timing-based enumeration attacks, wherein an attacker can + # determine if a passworded record exists even without knowing the + # password. + # + # Raises an ArgumentError if the set of attributes doesn't contain at + # least one password and one non-password attribute. + # + # ==== Examples + # + # class User < ActiveRecord::Base + # has_secure_password + # end + # + # User.create(name: "John Doe", email: "jdoe@example.com", password: "abc123") + # + # User.authenticate_by(email: "jdoe@example.com", password: "abc123").name # => "John Doe" (in 373.4ms) + # User.authenticate_by(email: "jdoe@example.com", password: "wrong") # => nil (in 373.9ms) + # User.authenticate_by(email: "wrong@example.com", password: "abc123") # => nil (in 373.6ms) + # + # User.authenticate_by(email: "jdoe@example.com", password: nil) # => nil (no queries executed) + # User.authenticate_by(email: "jdoe@example.com", password: "") # => nil (no queries executed) + # + # User.authenticate_by(email: "jdoe@example.com") # => ArgumentError + # User.authenticate_by(password: "abc123") # => ArgumentError + # + # @raise [ArgumentError] + # + # source://activerecord//lib/active_record/secure_password.rb#41 + def authenticate_by(attributes); end +end + # source://activerecord//lib/active_record/secure_token.rb#4 module ActiveRecord::SecureToken extend ::ActiveSupport::Concern @@ -31220,7 +33401,7 @@ end # source://activerecord//lib/active_record/secure_token.rb#11 module ActiveRecord::SecureToken::ClassMethods - # source://activerecord//lib/active_record/secure_token.rb#43 + # source://activerecord//lib/active_record/secure_token.rb#61 def generate_unique_secure_token(length: T.unsafe(nil)); end # Example using #has_secure_token @@ -31238,14 +33419,28 @@ module ActiveRecord::SecureToken::ClassMethods # user.regenerate_token # => true # user.regenerate_auth_token # => true # - # SecureRandom::base58 is used to generate at minimum a 24-character unique token, so collisions are highly unlikely. + # +SecureRandom::base58+ is used to generate at minimum a 24-character unique token, so collisions are highly unlikely. # # Note that it's still possible to generate a race condition in the database in the same way that # {validates_uniqueness_of}[rdoc-ref:Validations::ClassMethods#validates_uniqueness_of] can. # You're encouraged to add a unique index in the database to deal with this even more unlikely scenario. # - # source://activerecord//lib/active_record/secure_token.rb#32 - def has_secure_token(attribute = T.unsafe(nil), length: T.unsafe(nil)); end + # === Options + # + # [:length] + # Length of the Secure Random, with a minimum of 24 characters. It will + # default to 24. + # + # [:on] + # The callback when the value is generated. When called with on: + # :initialize, the value is generated in an + # after_initialize callback, otherwise the value will be used + # in a before_ callback. When not specified, +:on+ will use the value of + # config.active_record.generate_secure_token_on, which defaults to +:initialize+ + # starting in \Rails 7.1. + # + # source://activerecord//lib/active_record/secure_token.rb#46 + def has_secure_token(attribute = T.unsafe(nil), length: T.unsafe(nil), on: T.unsafe(nil)); end end # source://activerecord//lib/active_record/secure_token.rb#7 @@ -31288,12 +33483,15 @@ end # SerializationFailure will be raised when a transaction is rolled # back by the database due to a serialization failure. # -# source://activerecord//lib/active_record/errors.rb#431 +# This is a subclass of TransactionRollbackError, please make sure to check +# its documentation to be aware of its caveats. +# +# source://activerecord//lib/active_record/errors.rb#517 class ActiveRecord::SerializationFailure < ::ActiveRecord::TransactionRollbackError; end # Raised when unserialized object's type mismatches one specified for serializable field. # -# source://activerecord//lib/active_record/errors.rb#37 +# source://activerecord//lib/active_record/errors.rb#41 class ActiveRecord::SerializationTypeMismatch < ::ActiveRecord::ActiveRecordError; end # = Active Record Signed Id @@ -31321,8 +33519,10 @@ module ActiveRecord::SignedId # And you then change your +find_signed+ calls to require this new purpose. Any old signed ids that were not # created with the purpose will no longer find the record. # + # @raise [ArgumentError] + # # source://activerecord//lib/active_record/signed_id.rb#112 - def signed_id(expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + def signed_id(expires_in: T.unsafe(nil), expires_at: T.unsafe(nil), purpose: T.unsafe(nil)); end module GeneratedClassMethods def signed_id_verifier_secret; end @@ -31389,7 +33589,7 @@ module ActiveRecord::SignedId::ClassMethods def find_signed!(signed_id, purpose: T.unsafe(nil)); end # The verifier instance that all signed ids are generated and verified from. By default, it'll be initialized - # with the class-level +signed_id_verifier_secret+, which within Rails comes from the + # with the class-level +signed_id_verifier_secret+, which within \Rails comes from the # Rails.application.key_generator. By default, it's SHA256 for the digest and JSON for the serialization. # # source://activerecord//lib/active_record/signed_id.rb#71 @@ -31405,16 +33605,16 @@ end # Raised when Active Record finds multiple records but only expected one. # -# source://activerecord//lib/active_record/errors.rb#146 +# source://activerecord//lib/active_record/errors.rb#171 class ActiveRecord::SoleRecordExceeded < ::ActiveRecord::ActiveRecordError # @return [SoleRecordExceeded] a new instance of SoleRecordExceeded # - # source://activerecord//lib/active_record/errors.rb#149 + # source://activerecord//lib/active_record/errors.rb#174 def initialize(record = T.unsafe(nil)); end # Returns the value of attribute record. # - # source://activerecord//lib/active_record/errors.rb#147 + # source://activerecord//lib/active_record/errors.rb#172 def record; end end @@ -31425,7 +33625,7 @@ module ActiveRecord::SpawnMethods # Post.order('id asc').except(:order) # discards the order condition # Post.where('id > 10').order('id asc').except(:where) # discards the where condition but keeps the order # - # source://activerecord//lib/active_record/relation/spawn_methods.rb#58 + # source://activerecord//lib/active_record/relation/spawn_methods.rb#75 def except(*skips); end # Merges in the conditions from other, if other is an ActiveRecord::Relation. @@ -31446,10 +33646,13 @@ module ActiveRecord::SpawnMethods # # This is mainly intended for sharing common conditions between multiple associations. # - # source://activerecord//lib/active_record/relation/spawn_methods.rb#31 + # For conditions that exist in both relations, those from other will take precedence. + # To find the intersection of two relations, use QueryMethods#and. + # + # source://activerecord//lib/active_record/relation/spawn_methods.rb#33 def merge(other, *rest); end - # source://activerecord//lib/active_record/relation/spawn_methods.rb#41 + # source://activerecord//lib/active_record/relation/spawn_methods.rb#43 def merge!(other, *rest); end # Removes any condition from the query other than the one(s) specified in +onlies+. @@ -31457,17 +33660,15 @@ module ActiveRecord::SpawnMethods # Post.order('id asc').only(:where) # discards the order condition # Post.order('id asc').only(:where, :order) # uses the specified order # - # source://activerecord//lib/active_record/relation/spawn_methods.rb#66 + # source://activerecord//lib/active_record/relation/spawn_methods.rb#83 def only(*onlies); end - # This is overridden by Associations::CollectionProxy - # - # source://activerecord//lib/active_record/relation/spawn_methods.rb#10 + # source://activerecord//lib/active_record/relation/spawn_methods.rb#9 def spawn; end private - # source://activerecord//lib/active_record/relation/spawn_methods.rb#71 + # source://activerecord//lib/active_record/relation/spawn_methods.rb#88 def relation_with(values); end end @@ -31478,21 +33679,21 @@ end # Read more about optimistic locking in ActiveRecord::Locking module # documentation. # -# source://activerecord//lib/active_record/errors.rb#280 +# source://activerecord//lib/active_record/errors.rb#350 class ActiveRecord::StaleObjectError < ::ActiveRecord::ActiveRecordError # @return [StaleObjectError] a new instance of StaleObjectError # - # source://activerecord//lib/active_record/errors.rb#283 + # source://activerecord//lib/active_record/errors.rb#353 def initialize(record = T.unsafe(nil), attempted_action = T.unsafe(nil)); end # Returns the value of attribute attempted_action. # - # source://activerecord//lib/active_record/errors.rb#281 + # source://activerecord//lib/active_record/errors.rb#351 def attempted_action; end # Returns the value of attribute record. # - # source://activerecord//lib/active_record/errors.rb#281 + # source://activerecord//lib/active_record/errors.rb#351 def record; end end @@ -31648,29 +33849,34 @@ class ActiveRecord::StatementCache::Substitute; end # # Wraps the underlying database error as +cause+. # -# source://activerecord//lib/active_record/errors.rb#158 -class ActiveRecord::StatementInvalid < ::ActiveRecord::ActiveRecordError +# source://activerecord//lib/active_record/errors.rb#183 +class ActiveRecord::StatementInvalid < ::ActiveRecord::AdapterError # @return [StatementInvalid] a new instance of StatementInvalid # - # source://activerecord//lib/active_record/errors.rb#159 - def initialize(message = T.unsafe(nil), sql: T.unsafe(nil), binds: T.unsafe(nil)); end + # source://activerecord//lib/active_record/errors.rb#184 + def initialize(message = T.unsafe(nil), sql: T.unsafe(nil), binds: T.unsafe(nil), connection_pool: T.unsafe(nil)); end # Returns the value of attribute binds. # - # source://activerecord//lib/active_record/errors.rb#165 + # source://activerecord//lib/active_record/errors.rb#190 def binds; end + # source://activerecord//lib/active_record/errors.rb#192 + def set_query(sql, binds); end + # Returns the value of attribute sql. # - # source://activerecord//lib/active_record/errors.rb#165 + # source://activerecord//lib/active_record/errors.rb#190 def sql; end end # StatementTimeout will be raised when statement timeout exceeded. # -# source://activerecord//lib/active_record/errors.rb#453 +# source://activerecord//lib/active_record/errors.rb#542 class ActiveRecord::StatementTimeout < ::ActiveRecord::QueryAborted; end +# = Active Record \Store +# # Store gives you a thin wrapper around serialize for the purpose of storing hashes in a single column. # It's like a simple key/value store baked into your record when you don't care about being able to # query that store outside the context of a single record. @@ -31760,7 +33966,7 @@ class ActiveRecord::StatementTimeout < ::ActiveRecord::QueryAborted; end # end # end # -# source://activerecord//lib/active_record/store.rb#94 +# source://activerecord//lib/active_record/store.rb#96 module ActiveRecord::Store extend ::ActiveSupport::Concern @@ -31768,41 +33974,41 @@ module ActiveRecord::Store private - # source://activerecord//lib/active_record/store.rb#206 + # source://activerecord//lib/active_record/store.rb#209 def read_store_attribute(store_attribute, key); end - # source://activerecord//lib/active_record/store.rb#216 + # source://activerecord//lib/active_record/store.rb#219 def store_accessor_for(store_attribute); end - # source://activerecord//lib/active_record/store.rb#211 + # source://activerecord//lib/active_record/store.rb#214 def write_store_attribute(store_attribute, key, value); end end -# source://activerecord//lib/active_record/store.rb#103 +# source://activerecord//lib/active_record/store.rb#105 module ActiveRecord::Store::ClassMethods - # source://activerecord//lib/active_record/store.rb#188 + # source://activerecord//lib/active_record/store.rb#191 def _store_accessors_module; end - # source://activerecord//lib/active_record/store.rb#104 + # source://activerecord//lib/active_record/store.rb#106 def store(store_attribute, options = T.unsafe(nil)); end - # source://activerecord//lib/active_record/store.rb#109 + # source://activerecord//lib/active_record/store.rb#112 def store_accessor(store_attribute, *keys, prefix: T.unsafe(nil), suffix: T.unsafe(nil)); end - # source://activerecord//lib/active_record/store.rb#196 + # source://activerecord//lib/active_record/store.rb#199 def stored_attributes; end end -# source://activerecord//lib/active_record/store.rb#220 +# source://activerecord//lib/active_record/store.rb#223 class ActiveRecord::Store::HashAccessor class << self # source://activerecord//lib/active_record/store.rb#234 def prepare(object, attribute); end - # source://activerecord//lib/active_record/store.rb#221 + # source://activerecord//lib/active_record/store.rb#224 def read(object, attribute, key); end - # source://activerecord//lib/active_record/store.rb#226 + # source://activerecord//lib/active_record/store.rb#229 def write(object, attribute, key, value); end end end @@ -31852,7 +34058,7 @@ end # Raised on attempt to lazily load records that are marked as strict loading. # -# source://activerecord//lib/active_record/errors.rb#307 +# source://activerecord//lib/active_record/errors.rb#377 class ActiveRecord::StrictLoadingViolationError < ::ActiveRecord::ActiveRecordError; end # Raised when the single-table inheritance mechanism fails to locate the subclass @@ -31860,9 +34066,11 @@ class ActiveRecord::StrictLoadingViolationError < ::ActiveRecord::ActiveRecordEr # {ActiveRecord::Base.inheritance_column}[rdoc-ref:ModelSchema::ClassMethods#inheritance_column] # points to). # -# source://activerecord//lib/active_record/errors.rb#18 +# source://activerecord//lib/active_record/errors.rb#22 class ActiveRecord::SubclassNotFound < ::ActiveRecord::ActiveRecordError; end +# = Active Record \Suppressor +# # ActiveRecord::Suppressor prevents the receiver from being saved during # a given block. # @@ -31890,27 +34098,27 @@ class ActiveRecord::SubclassNotFound < ::ActiveRecord::ActiveRecordError; end # end # end # -# source://activerecord//lib/active_record/suppressor.rb#30 +# source://activerecord//lib/active_record/suppressor.rb#32 module ActiveRecord::Suppressor extend ::ActiveSupport::Concern mixes_in_class_methods ::ActiveRecord::Suppressor::ClassMethods - # source://activerecord//lib/active_record/suppressor.rb#49 + # source://activerecord//lib/active_record/suppressor.rb#51 def save(**_arg0); end - # source://activerecord//lib/active_record/suppressor.rb#53 + # source://activerecord//lib/active_record/suppressor.rb#55 def save!(**_arg0); end class << self - # source://activerecord//lib/active_record/suppressor.rb#34 + # source://activerecord//lib/active_record/suppressor.rb#36 def registry; end end end -# source://activerecord//lib/active_record/suppressor.rb#39 +# source://activerecord//lib/active_record/suppressor.rb#41 module ActiveRecord::Suppressor::ClassMethods - # source://activerecord//lib/active_record/suppressor.rb#40 + # source://activerecord//lib/active_record/suppressor.rb#42 def suppress(&block); end end @@ -31921,15 +34129,15 @@ class ActiveRecord::TableMetadata # source://activerecord//lib/active_record/table_metadata.rb#7 def initialize(klass, arel_table, reflection = T.unsafe(nil)); end - # source://activerecord//lib/active_record/table_metadata.rb#65 + # source://activerecord//lib/active_record/table_metadata.rb#74 def aggregated_with?(aggregation_name); end # Returns the value of attribute arel_table. # - # source://activerecord//lib/active_record/table_metadata.rb#80 + # source://activerecord//lib/active_record/table_metadata.rb#89 def arel_table; end - # source://activerecord//lib/active_record/table_metadata.rb#29 + # source://activerecord//lib/active_record/table_metadata.rb#38 def associated_table(table_name); end # @return [Boolean] @@ -31956,24 +34164,24 @@ class ActiveRecord::TableMetadata # @return [Boolean] # - # source://activerecord//lib/active_record/table_metadata.rb#53 + # source://activerecord//lib/active_record/table_metadata.rb#62 def polymorphic_association?; end - # source://activerecord//lib/active_record/table_metadata.rb#57 + # source://activerecord//lib/active_record/table_metadata.rb#66 def polymorphic_name_association; end - # source://activerecord//lib/active_record/table_metadata.rb#70 + # source://activerecord//lib/active_record/table_metadata.rb#79 def predicate_builder; end # source://activerecord//lib/active_record/table_metadata.rb#13 def primary_key; end - # source://activerecord//lib/active_record/table_metadata.rb#65 + # source://activerecord//lib/active_record/table_metadata.rb#74 def reflect_on_aggregation(aggregation_name); end # @return [Boolean] # - # source://activerecord//lib/active_record/table_metadata.rb#61 + # source://activerecord//lib/active_record/table_metadata.rb#70 def through_association?; end # source://activerecord//lib/active_record/table_metadata.rb#17 @@ -31983,21 +34191,21 @@ class ActiveRecord::TableMetadata # Returns the value of attribute klass. # - # source://activerecord//lib/active_record/table_metadata.rb#83 + # source://activerecord//lib/active_record/table_metadata.rb#92 def klass; end # Returns the value of attribute reflection. # - # source://activerecord//lib/active_record/table_metadata.rb#83 + # source://activerecord//lib/active_record/table_metadata.rb#92 def reflection; end end # Raised when a model makes a query but it has not specified an associated table. # -# source://activerecord//lib/active_record/errors.rb#46 +# source://activerecord//lib/active_record/errors.rb#50 class ActiveRecord::TableNotSpecified < ::ActiveRecord::ActiveRecordError; end -# source://activerecord//lib/active_record.rb#159 +# source://activerecord//lib/active_record.rb#168 module ActiveRecord::Tasks extend ::ActiveSupport::Autoload end @@ -32005,14 +34213,16 @@ end # source://activerecord//lib/active_record/tasks/database_tasks.rb#7 class ActiveRecord::Tasks::DatabaseNotSupported < ::StandardError; end +# = Active Record \DatabaseTasks +# # ActiveRecord::Tasks::DatabaseTasks is a utility class, which encapsulates # logic behind common tasks used to manage database and migrations. # -# The tasks defined here are used with Rails commands provided by Active Record. +# The tasks defined here are used with \Rails commands provided by Active Record. # # In order to use DatabaseTasks, a few config values need to be set. All the needed -# config values are set by Rails already, so it's necessary to do it only if you -# want to change the defaults or when you want to use Active Record outside of Rails +# config values are set by \Rails already, so it's necessary to do it only if you +# want to change the defaults or when you want to use Active Record outside of \Rails # (in such case after configuring the database tasks, you can also use the rake tasks # defined in Active Record). # @@ -32026,7 +34236,7 @@ class ActiveRecord::Tasks::DatabaseNotSupported < ::StandardError; end # * +seed_loader+: an object which will load seeds, it needs to respond to the +load_seed+ method. # * +root+: a path to the root of the application. # -# Example usage of DatabaseTasks outside Rails could look as such: +# Example usage of DatabaseTasks outside \Rails could look as such: # # include ActiveRecord::Tasks # DatabaseTasks.database_configuration = YAML.load_file('my_database_config.yml') @@ -32035,302 +34245,311 @@ class ActiveRecord::Tasks::DatabaseNotSupported < ::StandardError; end # # DatabaseTasks.create_current('production') # -# source://activerecord//lib/active_record/tasks/database_tasks.rb#38 +# source://activerecord//lib/active_record/tasks/database_tasks.rb#40 module ActiveRecord::Tasks::DatabaseTasks extend ::ActiveRecord::Tasks::DatabaseTasks - # source://activerecord//lib/active_record/tasks/database_tasks.rb#470 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#440 def cache_dump_filename(db_config_name, schema_cache_path: T.unsafe(nil)); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#324 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#305 def charset(configuration, *arguments); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#319 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#300 def charset_current(env_name = T.unsafe(nil), db_name = T.unsafe(nil)); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#63 - def check_protected_environments!; end + # source://activerecord//lib/active_record/tasks/database_tasks.rb#65 + def check_protected_environments!(environment = T.unsafe(nil)); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#487 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#458 def check_schema_file(filename); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#309 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#290 def check_target_version; end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#513 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#484 def clear_schema_cache(filename); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#334 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#315 def collation(configuration, *arguments); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#329 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#310 def collation_current(env_name = T.unsafe(nil), db_name = T.unsafe(nil)); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#120 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#115 def create(configuration, *arguments); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#132 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#127 def create_all; end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#183 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#170 def create_current(environment = T.unsafe(nil), name = T.unsafe(nil)); end # Returns the value of attribute database_configuration. # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#59 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#61 def database_configuration; end # Sets the attribute database_configuration # # @param value the value to set the attribute database_configuration to. # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#59 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#61 def database_configuration=(_arg0); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#277 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#258 def db_configs_with_versions(db_configs); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#88 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#83 def db_dir; end # Sets the attribute db_dir # # @param value the value to set the attribute db_dir to. # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#58 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#60 def db_dir=(_arg0); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#222 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#204 def drop(configuration, *arguments); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#234 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#216 def drop_all; end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#238 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#220 def drop_current(environment = T.unsafe(nil)); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#423 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#403 def dump_schema(db_config, format = T.unsafe(nil)); end # Dumps the schema cache in YAML format for the connection into the file # - # ==== Examples: + # ==== Examples # ActiveRecord::Tasks::DatabaseTasks.dump_schema_cache(ActiveRecord::Base.connection, "tmp/schema_dump.yaml") # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#509 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#480 def dump_schema_cache(conn, filename); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#108 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#103 def env; end # Sets the attribute env # # @param value the value to set the attribute env to. # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#58 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#60 def env=(_arg0); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#96 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#91 def fixtures_path; end # Sets the attribute fixtures_path # # @param value the value to set the attribute fixtures_path to. # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#58 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#60 def fixtures_path=(_arg0); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#154 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#141 def for_each(databases); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#367 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#349 def load_schema(db_config, format = T.unsafe(nil), file = T.unsafe(nil)); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#480 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#450 def load_schema_current(format = T.unsafe(nil), file = T.unsafe(nil), environment = T.unsafe(nil)); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#495 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#466 def load_seed; end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#256 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#237 def migrate(version = T.unsafe(nil)); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#294 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#275 def migrate_status; end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#92 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#505 + def migration_class; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#509 + def migration_connection; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#87 def migrations_paths; end # Sets the attribute migrations_paths # # @param value the value to set the attribute migrations_paths to. # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#58 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#60 def migrations_paths=(_arg0); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#112 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#107 def name; end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#188 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#176 def prepare_all; end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#339 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#320 def purge(configuration); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#344 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#325 def purge_all; end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#348 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#329 def purge_current(environment = T.unsafe(nil)); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#169 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#156 def raise_for_multi_db(environment = T.unsafe(nil), command:); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#405 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#385 def reconstruct_from_schema(db_config, format = T.unsafe(nil), file = T.unsafe(nil)); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#79 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#73 def register_task(pattern, task); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#104 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#99 def root; end # Sets the attribute root # # @param value the value to set the attribute root to. # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#58 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#60 def root=(_arg0); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#457 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#427 def schema_dump_path(db_config, format = T.unsafe(nil)); end - # source://activesupport/7.0.6/lib/active_support/deprecation/method_wrappers.rb#63 - def schema_file_type(*args, **_arg1, &block); end - # @return [Boolean] # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#390 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#370 def schema_up_to_date?(configuration, format = T.unsafe(nil), file = T.unsafe(nil)); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#116 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#111 def seed_loader; end # Sets the attribute seed_loader # # @param value the value to set the attribute seed_loader to. # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#58 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#60 def seed_loader=(_arg0); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#140 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#135 def setup_initial_database_yaml; end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#353 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#335 def structure_dump(configuration, *arguments); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#360 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#342 def structure_load(configuration, *arguments); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#315 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#296 def target_version; end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#250 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#231 def truncate_all(environment = T.unsafe(nil)); end + # source://activerecord//lib/active_record/tasks/database_tasks.rb#499 + def with_temporary_connection(db_config, clobber: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#488 + def with_temporary_connection_for_each(env: T.unsafe(nil), name: T.unsafe(nil), clobber: T.unsafe(nil), &block); end + private - # source://activerecord//lib/active_record/tasks/database_tasks.rb#541 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#604 + def check_current_protected_environment!(db_config); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#546 def class_for_adapter(adapter); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#518 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#523 def configs_for(**options); end # Create a new instance for the specified db configuration object # For classes that have been converted to use db_config objects, pass a # `DatabaseConfig`, otherwise pass a `Hash` # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#533 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#538 def database_adapter_for(db_config, *arguments); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#549 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#554 def each_current_configuration(environment, name = T.unsafe(nil)); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#562 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#567 def each_local_configuration; end # @return [Boolean] # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#574 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#579 def local_database?(db_config); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#522 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#527 def resolve_configuration(configuration); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#579 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#584 def schema_sha1(file); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#583 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#588 def structure_dump_flags_for(adapter); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#591 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#596 def structure_load_flags_for(adapter); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#242 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#224 def truncate_tables(db_config); end # @return [Boolean] # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#526 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#531 def verbose?; end + # source://activerecord//lib/active_record/tasks/database_tasks.rb#514 + def with_temporary_pool(db_config, clobber: T.unsafe(nil)); end + class << self - # source://activerecord//lib/active_record/tasks/database_tasks.rb#48 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#50 def structure_dump_flags; end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#48 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#50 def structure_dump_flags=(val); end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#54 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#56 def structure_load_flags; end - # source://activerecord//lib/active_record/tasks/database_tasks.rb#54 + # source://activerecord//lib/active_record/tasks/database_tasks.rb#56 def structure_load_flags=(val); end end end -# source://activerecord//lib/active_record/tasks/database_tasks.rb#61 +# source://activerecord//lib/active_record/tasks/database_tasks.rb#63 ActiveRecord::Tasks::DatabaseTasks::LOCAL_HOSTS = T.let(T.unsafe(nil), Array) # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#5 class ActiveRecord::Tasks::MySQLDatabaseTasks # @return [MySQLDatabaseTasks] a new instance of MySQLDatabaseTasks # - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#14 + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#12 def initialize(db_config); end - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#35 + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#34 def charset; end - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#39 + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#38 def collation; end - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#8 - def connection(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#19 + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#17 def create; end - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#25 + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#23 def drop; end - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#8 - def establish_connection(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#30 + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#28 def purge; end - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#43 + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#42 def structure_dump(filename, extra_flags); end # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#61 @@ -32343,10 +34562,13 @@ class ActiveRecord::Tasks::MySQLDatabaseTasks # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#71 def configuration_hash; end - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#73 + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#81 def configuration_hash_without_database; end - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#77 + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#73 + def connection; end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#85 def creation_options; end # Returns the value of attribute db_config. @@ -32354,19 +34576,22 @@ class ActiveRecord::Tasks::MySQLDatabaseTasks # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#71 def db_config; end - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#84 + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#77 + def establish_connection(config = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#92 def prepare_command_options; end - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#102 + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#111 def run_cmd(cmd, args, action); end - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#106 + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#115 def run_cmd_error(cmd, args, action); end class << self # @return [Boolean] # - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#10 + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#8 def using_database_configurations?; end end end @@ -32378,73 +34603,70 @@ ActiveRecord::Tasks::MySQLDatabaseTasks::ER_DB_CREATE_EXISTS = T.let(T.unsafe(ni class ActiveRecord::Tasks::PostgreSQLDatabaseTasks # @return [PostgreSQLDatabaseTasks] a new instance of PostgreSQLDatabaseTasks # - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#19 + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#16 def initialize(db_config); end - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#35 + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#32 def charset; end - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#12 - def clear_active_connections!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#39 + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#36 def collation; end - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#12 - def connection(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#24 - def create(master_established = T.unsafe(nil)); end + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#21 + def create(connection_already_established = T.unsafe(nil)); end - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#30 + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#27 def drop; end - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#12 - def establish_connection(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#43 + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#40 def purge; end - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#49 + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#46 def structure_dump(filename, extra_flags); end - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#82 + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#80 def structure_load(filename, extra_flags); end private # Returns the value of attribute configuration_hash. # - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#90 + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#88 def configuration_hash; end + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#90 + def connection; end + # Returns the value of attribute db_config. # - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#90 + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#88 def db_config; end - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#92 + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#98 def encoding; end - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#96 - def establish_master_connection; end + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#94 + def establish_connection(config = T.unsafe(nil)); end - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#103 + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#106 def psql_env; end - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#127 + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#102 + def public_schema_config; end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#130 def remove_sql_header_comments(filename); end - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#116 + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#119 def run_cmd(cmd, args, action); end - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#120 + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#123 def run_cmd_error(cmd, args, action); end class << self # @return [Boolean] # - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#15 + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#12 def using_database_configurations?; end end end @@ -32462,30 +34684,24 @@ ActiveRecord::Tasks::PostgreSQLDatabaseTasks::SQL_COMMENT_BEGIN = T.let(T.unsafe class ActiveRecord::Tasks::SQLiteDatabaseTasks # @return [SQLiteDatabaseTasks] a new instance of SQLiteDatabaseTasks # - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#12 + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#10 def initialize(db_config, root = T.unsafe(nil)); end - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#41 + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#40 def charset; end - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#6 - def connection(*_arg0, **_arg1, &_arg2); end - # @raise [DatabaseAlreadyExists] # - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#17 + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#15 def create; end - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#24 + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#22 def drop; end - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#6 - def establish_connection(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#34 + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#31 def purge; end - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#45 + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#44 def structure_dump(filename, extra_flags); end # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#60 @@ -32493,26 +34709,32 @@ class ActiveRecord::Tasks::SQLiteDatabaseTasks private + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#68 + def connection; end + # Returns the value of attribute db_config. # # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#66 def db_config; end + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#72 + def establish_connection(config = T.unsafe(nil)); end + # Returns the value of attribute root. # # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#66 def root; end - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#68 + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#76 def run_cmd(cmd, args, out); end - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#72 + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#80 def run_cmd_error(cmd, args); end class << self # @return [Boolean] # - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#8 + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#6 def using_database_configurations?; end end end @@ -32533,11 +34755,11 @@ class ActiveRecord::ThroughCantAssociateThroughHasOneOrManyReflection < ::Active def initialize(owner = T.unsafe(nil), reflection = T.unsafe(nil)); end end -# source://activerecord//lib/active_record/associations.rb#208 +# source://activerecord//lib/active_record/associations.rb#224 class ActiveRecord::ThroughNestedAssociationsAreReadonly < ::ActiveRecord::ActiveRecordError # @return [ThroughNestedAssociationsAreReadonly] a new instance of ThroughNestedAssociationsAreReadonly # - # source://activerecord//lib/active_record/associations.rb#209 + # source://activerecord//lib/active_record/associations.rb#225 def initialize(owner = T.unsafe(nil), reflection = T.unsafe(nil)); end end @@ -32570,7 +34792,7 @@ end # # ActiveRecord::Base.time_zone_aware_types = [:datetime] # -# You can also add database specific timezone aware types. For example, for PostgreSQL: +# You can also add database-specific timezone aware types. For example, for PostgreSQL: # # ActiveRecord::Base.time_zone_aware_types += [:tsrange, :tstzrange] # @@ -32591,41 +34813,47 @@ module ActiveRecord::Timestamp private - # source://activerecord//lib/active_record/timestamp.rb#99 + # source://activerecord//lib/active_record/timestamp.rb#105 def _create_record; end - # source://activerecord//lib/active_record/timestamp.rb#111 + # source://activerecord//lib/active_record/timestamp.rb#117 def _update_record; end - # source://activerecord//lib/active_record/timestamp.rb#141 + # source://activerecord//lib/active_record/timestamp.rb#153 def all_timestamp_attributes_in_model; end # Clear attributes and changed_attributes # - # source://activerecord//lib/active_record/timestamp.rb#156 + # source://activerecord//lib/active_record/timestamp.rb#168 def clear_timestamp_attributes; end - # source://activerecord//lib/active_record/timestamp.rb#124 + # source://activerecord//lib/active_record/timestamp.rb#123 def create_or_update(touch: T.unsafe(nil), **_arg1); end - # source://activerecord//lib/active_record/timestamp.rb#145 + # source://activerecord//lib/active_record/timestamp.rb#157 def current_time_from_proper_timezone; end + # source://activerecord//lib/active_record/timestamp.rb#100 + def init_internals; end + # source://activerecord//lib/active_record/timestamp.rb#50 def initialize_dup(other); end - # source://activerecord//lib/active_record/timestamp.rb#149 + # source://activerecord//lib/active_record/timestamp.rb#161 def max_updated_column_timestamp; end + # source://activerecord//lib/active_record/timestamp.rb#128 + def record_update_timestamps; end + # @return [Boolean] # - # source://activerecord//lib/active_record/timestamp.rb#129 + # source://activerecord//lib/active_record/timestamp.rb#141 def should_record_timestamps?; end - # source://activerecord//lib/active_record/timestamp.rb#133 + # source://activerecord//lib/active_record/timestamp.rb#145 def timestamp_attributes_for_create_in_model; end - # source://activerecord//lib/active_record/timestamp.rb#137 + # source://activerecord//lib/active_record/timestamp.rb#149 def timestamp_attributes_for_update_in_model; end module GeneratedClassMethods @@ -32658,18 +34886,184 @@ module ActiveRecord::Timestamp::ClassMethods # source://activerecord//lib/active_record/timestamp.rb#56 def touch_attributes_with_time(*names, time: T.unsafe(nil)); end + protected + + # source://activerecord//lib/active_record/timestamp.rb#82 + def reload_schema_from_cache(recursive = T.unsafe(nil)); end + private # source://activerecord//lib/active_record/timestamp.rb#90 - def reload_schema_from_cache; end - - # source://activerecord//lib/active_record/timestamp.rb#82 def timestamp_attributes_for_create; end - # source://activerecord//lib/active_record/timestamp.rb#86 + # source://activerecord//lib/active_record/timestamp.rb#94 def timestamp_attributes_for_update; end end +# source://activerecord//lib/active_record/token_for.rb#6 +module ActiveRecord::TokenFor + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveRecord::TokenFor::ClassMethods + + # Generates a token for a predefined +purpose+. + # + # Use ClassMethods#generates_token_for to define a token purpose and + # behavior. + # + # source://activerecord//lib/active_record/token_for.rb#109 + def generate_token_for(purpose); end + + module GeneratedClassMethods + def generated_token_verifier; end + def generated_token_verifier=(value); end + def token_definitions; end + def token_definitions=(value); end + end + + module GeneratedInstanceMethods; end +end + +# source://activerecord//lib/active_record/token_for.rb#38 +module ActiveRecord::TokenFor::ClassMethods + # Finds a record using a given +token+ for a predefined +purpose+. Returns + # +nil+ if the token is invalid or the record was not found. + # + # @raise [UnknownPrimaryKey] + # + # source://activerecord//lib/active_record/token_for.rb#90 + def find_by_token_for(purpose, token); end + + # Finds a record using a given +token+ for a predefined +purpose+. Raises + # ActiveSupport::MessageVerifier::InvalidSignature if the token is invalid + # (e.g. expired, bad format, etc). Raises ActiveRecord::RecordNotFound if + # the token is valid but the record was not found. + # + # source://activerecord//lib/active_record/token_for.rb#99 + def find_by_token_for!(purpose, token); end + + # Defines the behavior of tokens generated for a specific +purpose+. + # A token can be generated by calling TokenFor#generate_token_for on a + # record. Later, that record can be fetched by calling #find_by_token_for + # (or #find_by_token_for!) with the same purpose and token. + # + # Tokens are signed so that they are tamper-proof. Thus they can be + # exposed to outside world as, for example, password reset tokens. + # + # By default, tokens do not expire. They can be configured to expire by + # specifying a duration via the +expires_in+ option. The duration becomes + # part of the token's signature, so changing the value of +expires_in+ + # will automatically invalidate previously generated tokens. + # + # A block may also be specified. When generating a token with + # TokenFor#generate_token_for, the block will be evaluated in the context + # of the record, and its return value will be embedded in the token as + # JSON. Later, when fetching the record with #find_by_token_for, the block + # will be evaluated again in the context of the fetched record. If the two + # JSON values do not match, the token will be treated as invalid. Note + # that the value returned by the block should not contain sensitive + # information because it will be embedded in the token as + # human-readable plaintext JSON. + # + # ==== Examples + # + # class User < ActiveRecord::Base + # has_secure_password + # + # generates_token_for :password_reset, expires_in: 15.minutes do + # # Last 10 characters of password salt, which changes when password is updated: + # password_salt&.last(10) + # end + # end + # + # user = User.first + # + # token = user.generate_token_for(:password_reset) + # User.find_by_token_for(:password_reset, token) # => user + # # 16 minutes later... + # User.find_by_token_for(:password_reset, token) # => nil + # + # token = user.generate_token_for(:password_reset) + # User.find_by_token_for(:password_reset, token) # => user + # user.update!(password: "new password") + # User.find_by_token_for(:password_reset, token) # => nil + # + # source://activerecord//lib/active_record/token_for.rb#84 + def generates_token_for(purpose, expires_in: T.unsafe(nil), &block); end +end + +# source://activerecord//lib/active_record/token_for.rb#14 +class ActiveRecord::TokenFor::TokenDefinition < ::Struct + # Returns the value of attribute block + # + # @return [Object] the current value of block + def block; end + + # Sets the attribute block + # + # @param value [Object] the value to set the attribute block to. + # @return [Object] the newly set value + def block=(_); end + + # Returns the value of attribute defining_class + # + # @return [Object] the current value of defining_class + def defining_class; end + + # Sets the attribute defining_class + # + # @param value [Object] the value to set the attribute defining_class to. + # @return [Object] the newly set value + def defining_class=(_); end + + # Returns the value of attribute expires_in + # + # @return [Object] the current value of expires_in + def expires_in; end + + # Sets the attribute expires_in + # + # @param value [Object] the value to set the attribute expires_in to. + # @return [Object] the newly set value + def expires_in=(_); end + + # source://activerecord//lib/active_record/token_for.rb#15 + def full_purpose; end + + # source://activerecord//lib/active_record/token_for.rb#27 + def generate_token(model); end + + # source://activerecord//lib/active_record/token_for.rb#19 + def message_verifier; end + + # source://activerecord//lib/active_record/token_for.rb#23 + def payload_for(model); end + + # Returns the value of attribute purpose + # + # @return [Object] the current value of purpose + def purpose; end + + # Sets the attribute purpose + # + # @param value [Object] the value to set the attribute purpose to. + # @return [Object] the newly set value + def purpose=(_); end + + # source://activerecord//lib/active_record/token_for.rb#31 + def resolve_token(token); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + # = Active Record Touch Later # # source://activerecord//lib/active_record/touch_later.rb#5 @@ -32677,7 +35071,7 @@ module ActiveRecord::TouchLater # source://activerecord//lib/active_record/touch_later.rb#6 def before_committed!; end - # source://activerecord//lib/active_record/touch_later.rb#34 + # source://activerecord//lib/active_record/touch_later.rb#38 def touch(*names, time: T.unsafe(nil)); end # source://activerecord//lib/active_record/touch_later.rb#11 @@ -32685,18 +35079,18 @@ module ActiveRecord::TouchLater private - # source://activerecord//lib/active_record/touch_later.rb#61 - def belongs_to_touch_method; end - # @return [Boolean] # - # source://activerecord//lib/active_record/touch_later.rb#57 + # source://activerecord//lib/active_record/touch_later.rb#66 def has_defer_touch_attrs?; end - # source://activerecord//lib/active_record/touch_later.rb#45 + # source://activerecord//lib/active_record/touch_later.rb#49 + def init_internals; end + + # source://activerecord//lib/active_record/touch_later.rb#54 def surreptitiously_touch(attr_names); end - # source://activerecord//lib/active_record/touch_later.rb#52 + # source://activerecord//lib/active_record/touch_later.rb#61 def touch_deferred_attributes; end end @@ -32706,20 +35100,33 @@ end # * You are joining an existing open transaction # * You are creating a nested (savepoint) transaction # -# The mysql2 and postgresql adapters support setting the transaction isolation level. +# The mysql2, trilogy, and postgresql adapters support setting the transaction isolation level. # -# source://activerecord//lib/active_record/errors.rb#411 +# source://activerecord//lib/active_record/errors.rb#481 class ActiveRecord::TransactionIsolationError < ::ActiveRecord::ActiveRecordError; end # TransactionRollbackError will be raised when a transaction is rolled # back by the database due to a serialization failure or a deadlock. # +# These exceptions should not be generally rescued in nested transaction +# blocks, because they have side-effects in the actual enclosing transaction +# and internal Active Record state. They can be rescued if you are above the +# root transaction block, though. +# +# In that case, beware of transactional tests, however, because they run test +# cases in their own umbrella transaction. If you absolutely need to handle +# these exceptions in tests please consider disabling transactional tests in +# the affected test class (self.use_transactional_tests = false). +# +# Due to the aforementioned side-effects, this exception should not be raised +# manually by users. +# # See the following: # # * https://www.postgresql.org/docs/current/static/transaction-iso.html # * https://dev.mysql.com/doc/mysql-errors/en/server-error-reference.html#error_er_lock_deadlock # -# source://activerecord//lib/active_record/errors.rb#421 +# source://activerecord//lib/active_record/errors.rb#504 class ActiveRecord::TransactionRollbackError < ::ActiveRecord::StatementInvalid; end # See ActiveRecord::Transactions::ClassMethods for documentation. @@ -32730,7 +35137,13 @@ module ActiveRecord::Transactions mixes_in_class_methods ::ActiveRecord::Transactions::ClassMethods - # source://activerecord//lib/active_record/transactions.rb#309 + # source://activerecord//lib/active_record/transactions.rb#16 + def _new_record_before_last_commit; end + + # source://activerecord//lib/active_record/transactions.rb#16 + def _new_record_before_last_commit=(_arg0); end + + # source://activerecord//lib/active_record/transactions.rb#320 def before_committed!; end # Call the #after_commit callbacks. @@ -32738,102 +35151,105 @@ module ActiveRecord::Transactions # Ensure that it is not called if the object was never persisted (failed create), # but call it after the commit of a destroyed object. # - # source://activerecord//lib/active_record/transactions.rb#317 + # source://activerecord//lib/active_record/transactions.rb#328 def committed!(should_run_callbacks: T.unsafe(nil)); end - # source://activerecord//lib/active_record/transactions.rb#293 + # source://activerecord//lib/active_record/transactions.rb#304 def destroy; end # Call the #after_rollback callbacks. The +force_restore_state+ argument indicates if the record # state should be rolled back to the beginning or just to the last savepoint. # - # source://activerecord//lib/active_record/transactions.rb#329 + # source://activerecord//lib/active_record/transactions.rb#340 def rolledback!(force_restore_state: T.unsafe(nil), should_run_callbacks: T.unsafe(nil)); end - # source://activerecord//lib/active_record/transactions.rb#297 + # source://activerecord//lib/active_record/transactions.rb#308 def save(**_arg0); end - # source://activerecord//lib/active_record/transactions.rb#301 + # source://activerecord//lib/active_record/transactions.rb#312 def save!(**_arg0); end - # source://activerecord//lib/active_record/transactions.rb#305 + # source://activerecord//lib/active_record/transactions.rb#316 def touch(*_arg0, **_arg1); end # See ActiveRecord::Transactions::ClassMethods for detailed documentation. # - # source://activerecord//lib/active_record/transactions.rb#289 + # source://activerecord//lib/active_record/transactions.rb#300 def transaction(**options, &block); end # @return [Boolean] # - # source://activerecord//lib/active_record/transactions.rb#360 + # source://activerecord//lib/active_record/transactions.rb#371 def trigger_transactional_callbacks?; end - # Executes +method+ within a transaction and captures its return value as a - # status flag. If the status is true the transaction is committed, otherwise - # a ROLLBACK is issued. In any case the status flag is returned. + # Executes a block within a transaction and captures its return value as a + # status flag. If the status is true, the transaction is committed, + # otherwise a ROLLBACK is issued. In any case, the status flag is returned. # # This method is available within the context of an ActiveRecord::Base # instance. # - # source://activerecord//lib/active_record/transactions.rb#345 + # source://activerecord//lib/active_record/transactions.rb#356 def with_transaction_returning_status; end private # Returns the value of attribute _committed_already_called. # - # source://activerecord//lib/active_record/transactions.rb#366 + # source://activerecord//lib/active_record/transactions.rb#377 def _committed_already_called; end # Returns the value of attribute _trigger_destroy_callback. # - # source://activerecord//lib/active_record/transactions.rb#366 + # source://activerecord//lib/active_record/transactions.rb#377 def _trigger_destroy_callback; end # Returns the value of attribute _trigger_update_callback. # - # source://activerecord//lib/active_record/transactions.rb#366 + # source://activerecord//lib/active_record/transactions.rb#377 def _trigger_update_callback; end # Add the record to the current transaction so that the #after_rollback and #after_commit # callbacks can be called. # - # source://activerecord//lib/active_record/transactions.rb#433 + # source://activerecord//lib/active_record/transactions.rb#459 def add_to_transaction(ensure_finalize = T.unsafe(nil)); end # Clear the new record state and id of a record. # - # source://activerecord//lib/active_record/transactions.rb#389 + # source://activerecord//lib/active_record/transactions.rb#407 def clear_transaction_record_state; end # @return [Boolean] # - # source://activerecord//lib/active_record/transactions.rb#437 + # source://activerecord//lib/active_record/transactions.rb#463 def has_transactional_callbacks?; end + # source://activerecord//lib/active_record/transactions.rb#379 + def init_internals; end + # Save the new record state and id of a record so it can be restored later if a transaction fails. # - # source://activerecord//lib/active_record/transactions.rb#369 + # source://activerecord//lib/active_record/transactions.rb#387 def remember_transaction_record_state; end # Restore the new record state and id of a record that was previously saved by a call to save_record_state. # - # source://activerecord//lib/active_record/transactions.rb#396 + # source://activerecord//lib/active_record/transactions.rb#414 def restore_transaction_record_state(force_restore_state = T.unsafe(nil)); end # Determine if a transaction included an action for :create, :update, or :destroy. Used in filtering callbacks. # # @return [Boolean] # - # source://activerecord//lib/active_record/transactions.rb#418 + # source://activerecord//lib/active_record/transactions.rb#444 def transaction_include_any_action?(actions); end end # source://activerecord//lib/active_record/transactions.rb#8 ActiveRecord::Transactions::ACTIONS = T.let(T.unsafe(nil), Array) -# = Active Record Transactions +# = Active Record \Transactions # # \Transactions are protective blocks where SQL statements are only permanent # if they can all succeed as one atomic action. The classic example is a @@ -32918,7 +35334,8 @@ ActiveRecord::Transactions::ACTIONS = T.let(T.unsafe(nil), Array) # catch those in your application code. # # One exception is the ActiveRecord::Rollback exception, which will trigger -# a ROLLBACK when raised, but not be re-raised by the transaction block. +# a ROLLBACK when raised, but not be re-raised by the transaction block. Any +# other exception will be re-raised. # # *Warning*: one should not catch ActiveRecord::StatementInvalid exceptions # inside a transaction block. ActiveRecord::StatementInvalid exceptions indicate that an @@ -33024,7 +35441,7 @@ ActiveRecord::Transactions::ACTIONS = T.let(T.unsafe(nil), Array) # # Note that "TRUNCATE" is also a MySQL DDL statement! # -# source://activerecord//lib/active_record/transactions.rb#206 +# source://activerecord//lib/active_record/transactions.rb#209 module ActiveRecord::Transactions::ClassMethods # This callback is called after a record has been created, updated, or destroyed. # @@ -33038,50 +35455,53 @@ module ActiveRecord::Transactions::ClassMethods # after_commit :do_foo_bar, on: [:create, :update] # after_commit :do_bar_baz, on: [:update, :destroy] # - # source://activerecord//lib/active_record/transactions.rb#229 + # source://activerecord//lib/active_record/transactions.rb#232 def after_commit(*args, &block); end # Shortcut for after_commit :hook, on: :create. # - # source://activerecord//lib/active_record/transactions.rb#241 + # source://activerecord//lib/active_record/transactions.rb#244 def after_create_commit(*args, &block); end # Shortcut for after_commit :hook, on: :destroy. # - # source://activerecord//lib/active_record/transactions.rb#253 + # source://activerecord//lib/active_record/transactions.rb#256 def after_destroy_commit(*args, &block); end # This callback is called after a create, update, or destroy are rolled back. # # Please check the documentation of #after_commit for options. # - # source://activerecord//lib/active_record/transactions.rb#261 + # source://activerecord//lib/active_record/transactions.rb#264 def after_rollback(*args, &block); end # Shortcut for after_commit :hook, on: [ :create, :update ]. # - # source://activerecord//lib/active_record/transactions.rb#235 + # source://activerecord//lib/active_record/transactions.rb#238 def after_save_commit(*args, &block); end # Shortcut for after_commit :hook, on: :update. # - # source://activerecord//lib/active_record/transactions.rb#247 + # source://activerecord//lib/active_record/transactions.rb#250 def after_update_commit(*args, &block); end - # source://activerecord//lib/active_record/transactions.rb#212 + # source://activerecord//lib/active_record/transactions.rb#215 def before_commit(*args, &block); end # See the ConnectionAdapters::DatabaseStatements#transaction API docs. # - # source://activerecord//lib/active_record/transactions.rb#208 + # source://activerecord//lib/active_record/transactions.rb#211 def transaction(**options, &block); end private - # source://activerecord//lib/active_record/transactions.rb#281 + # source://activerecord//lib/active_record/transactions.rb#292 def assert_valid_transaction_action(actions); end - # source://activerecord//lib/active_record/transactions.rb#267 + # source://activerecord//lib/active_record/transactions.rb#270 + def prepend_option; end + + # source://activerecord//lib/active_record/transactions.rb#278 def set_options_for_callbacks!(args, enforced_options = T.unsafe(nil)); end end @@ -33143,33 +35563,33 @@ module ActiveRecord::Type end end -# source://activerecord//lib/active_record/type/adapter_specific_registry.rb#8 +# source://activerecord//lib/active_record/type/adapter_specific_registry.rb#6 class ActiveRecord::Type::AdapterSpecificRegistry # @return [AdapterSpecificRegistry] a new instance of AdapterSpecificRegistry # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#9 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#7 def initialize; end - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#18 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#15 def add_modifier(options, klass, **args); end - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#30 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#27 def lookup(symbol, *args, **kwargs); end - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#22 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#19 def register(type_name, klass = T.unsafe(nil), **options, &block); end private - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#43 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#40 def find_registration(symbol, *args, **kwargs); end - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#13 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#11 def initialize_copy(other); end # Returns the value of attribute registrations. # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#41 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#38 def registrations; end end @@ -33204,39 +35624,39 @@ class ActiveRecord::Type::DecimalWithoutScale < ::ActiveModel::Type::BigInteger def type_cast_for_schema(value); end end -# source://activerecord//lib/active_record/type/adapter_specific_registry.rb#117 +# source://activerecord//lib/active_record/type/adapter_specific_registry.rb#110 class ActiveRecord::Type::DecorationRegistration < ::ActiveRecord::Type::Registration # @return [DecorationRegistration] a new instance of DecorationRegistration # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#118 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#111 def initialize(options, klass, adapter: T.unsafe(nil)); end - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#124 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#117 def call(registry, *args, **kwargs); end # @return [Boolean] # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#129 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#122 def matches?(*args, **kwargs); end - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#133 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#126 def priority; end private # Returns the value of attribute klass. # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#138 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#131 def klass; end # @return [Boolean] # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#140 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#133 def matches_options?(**kwargs); end # Returns the value of attribute options. # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#138 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#131 def options; end end @@ -33292,12 +35712,15 @@ module ActiveRecord::Type::Internal; end # source://activerecord//lib/active_record/type/internal/timezone.rb#6 module ActiveRecord::Type::Internal::Timezone - # source://activerecord//lib/active_record/type/internal/timezone.rb#11 + # source://activerecord//lib/active_record/type/internal/timezone.rb#7 + def initialize(timezone: T.unsafe(nil), **kwargs); end + + # source://activerecord//lib/active_record/type/internal/timezone.rb#16 def default_timezone; end # @return [Boolean] # - # source://activerecord//lib/active_record/type/internal/timezone.rb#7 + # source://activerecord//lib/active_record/type/internal/timezone.rb#12 def is_utc?; end end @@ -33323,72 +35746,72 @@ class ActiveRecord::Type::Json < ::ActiveModel::Type::Value def type; end end -# source://activerecord//lib/active_record/type/adapter_specific_registry.rb#50 +# source://activerecord//lib/active_record/type/adapter_specific_registry.rb#47 class ActiveRecord::Type::Registration # @return [Registration] a new instance of Registration # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#51 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#48 def initialize(name, block, adapter: T.unsafe(nil), override: T.unsafe(nil)); end - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#70 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#63 def <=>(other); end - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#58 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#55 def call(_registry, *args, adapter: T.unsafe(nil), **kwargs); end # @return [Boolean] # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#66 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#59 def matches?(type_name, *args, **kwargs); end protected # Returns the value of attribute adapter. # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#80 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#73 def adapter; end # Returns the value of attribute block. # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#80 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#73 def block; end # Returns the value of attribute name. # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#80 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#73 def name; end # Returns the value of attribute override. # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#80 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#73 def override; end - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#82 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#75 def priority; end - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#93 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#86 def priority_except_adapter; end private # @return [Boolean] # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#102 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#95 def conflicts_with?(other); end # @return [Boolean] # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#111 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#104 def has_adapter_conflict?(other); end # @return [Boolean] # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#98 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#91 def matches_adapter?(adapter: T.unsafe(nil), **_arg1); end # @return [Boolean] # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#107 + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#100 def same_priority_except_adapter?(other); end end @@ -33431,6 +35854,11 @@ class ActiveRecord::Type::Serialized # source://activerecord//lib/active_record/type/serialized.rb#26 def serialize(value); end + # @return [Boolean] + # + # source://activerecord//lib/active_record/type/serialized.rb#58 + def serialized?; end + # Returns the value of attribute subtype. # # source://activerecord//lib/active_record/type/serialized.rb#10 @@ -33440,10 +35868,10 @@ class ActiveRecord::Type::Serialized # @return [Boolean] # - # source://activerecord//lib/active_record/type/serialized.rb#59 + # source://activerecord//lib/active_record/type/serialized.rb#63 def default_value?(value); end - # source://activerecord//lib/active_record/type/serialized.rb#63 + # source://activerecord//lib/active_record/type/serialized.rb#67 def encoded(value); end end @@ -33463,9 +35891,12 @@ class ActiveRecord::Type::Time < ::ActiveModel::Type::Time # source://activerecord//lib/active_record/type/time.rb#11 def serialize(value); end + # source://activerecord//lib/active_record/type/time.rb#20 + def serialize_cast_value(value); end + private - # source://activerecord//lib/active_record/type/time.rb#21 + # source://activerecord//lib/active_record/type/time.rb#25 def cast_value(value); end end @@ -33561,12 +35992,12 @@ class ActiveRecord::TypeCaster::Map def klass; end end -# source://activerecord//lib/active_record/type/adapter_specific_registry.rb#148 +# source://activerecord//lib/active_record/type/adapter_specific_registry.rb#141 class ActiveRecord::TypeConflictError < ::StandardError; end # Raised when unknown attributes are supplied via mass assignment. # -# source://activerecord//lib/active_record/errors.rb#347 +# source://activerecord//lib/active_record/errors.rb#417 ActiveRecord::UnknownAttributeError = ActiveModel::UnknownAttributeError # UnknownAttributeReference is raised when an unknown and potentially unsafe @@ -33590,29 +36021,29 @@ ActiveRecord::UnknownAttributeError = ActiveModel::UnknownAttributeError # Again, such a workaround should *not* be used when passing user-provided # values, such as request parameters or model attributes to query methods. # -# source://activerecord//lib/active_record/errors.rb#484 +# source://activerecord//lib/active_record/errors.rb#578 class ActiveRecord::UnknownAttributeReference < ::ActiveRecord::ActiveRecordError; end -# source://activerecord//lib/active_record/migration.rb#113 +# source://activerecord//lib/active_record/migration.rb#114 class ActiveRecord::UnknownMigrationVersionError < ::ActiveRecord::MigrationError # @return [UnknownMigrationVersionError] a new instance of UnknownMigrationVersionError # - # source://activerecord//lib/active_record/migration.rb#114 + # source://activerecord//lib/active_record/migration.rb#115 def initialize(version = T.unsafe(nil)); end end # Raised when a primary key is needed, but not specified in the schema or model. # -# source://activerecord//lib/active_record/errors.rb#375 +# source://activerecord//lib/active_record/errors.rb#445 class ActiveRecord::UnknownPrimaryKey < ::ActiveRecord::ActiveRecordError # @return [UnknownPrimaryKey] a new instance of UnknownPrimaryKey # - # source://activerecord//lib/active_record/errors.rb#378 + # source://activerecord//lib/active_record/errors.rb#448 def initialize(model = T.unsafe(nil), description = T.unsafe(nil)); end # Returns the value of attribute model. # - # source://activerecord//lib/active_record/errors.rb#376 + # source://activerecord//lib/active_record/errors.rb#446 def model; end end @@ -33626,7 +36057,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) @@ -33636,13 +36067,15 @@ ActiveRecord::VERSION::TINY = T.let(T.unsafe(nil), Integer) # = Active Record \Validations # -# Active Record includes the majority of its validations from ActiveModel::Validations -# all of which accept the :on argument to define the context where the -# validations are active. Active Record will always supply either the context of -# :create or :update dependent on whether the model is a +# Active Record includes the majority of its validations from ActiveModel::Validations. +# +# In Active Record, all validations are performed on save by default. +# Validations accept the :on argument to define the context where +# the validations are active. Active Record will pass either the context of +# :create or :update depending on whether the model is a # {new_record?}[rdoc-ref:Persistence#new_record?]. # -# source://activerecord//lib/active_record/validations.rb#38 +# source://activerecord//lib/active_record/validations.rb#40 module ActiveRecord::Validations extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -33664,13 +36097,13 @@ module ActiveRecord::Validations # The regular {ActiveRecord::Base#save}[rdoc-ref:Persistence#save] method is replaced # with this when the validations module is mixed in, which it is by default. # - # source://activerecord//lib/active_record/validations.rb#46 + # source://activerecord//lib/active_record/validations.rb#48 def save(**options); end # Attempts to save the record just like {ActiveRecord::Base#save}[rdoc-ref:Base#save] but # will raise an ActiveRecord::RecordInvalid exception instead of returning +false+ if the record is not valid. # - # source://activerecord//lib/active_record/validations.rb#52 + # source://activerecord//lib/active_record/validations.rb#54 def save!(**options); end # Runs all the validations within the specified context. Returns +true+ if @@ -33680,13 +36113,15 @@ module ActiveRecord::Validations # # If the argument is +false+ (default is +nil+), the context is set to :create if # {new_record?}[rdoc-ref:Persistence#new_record?] is +true+, and to :update if it is not. + # If the argument is an array of contexts, post.valid?([:create, :update]), the validations are + # run within multiple contexts. # # \Validations with no :on option will run no matter the context. \Validations with # some :on option will only run in the specified context. # # @return [Boolean] # - # source://activerecord//lib/active_record/validations.rb#66 + # source://activerecord//lib/active_record/validations.rb#70 def valid?(context = T.unsafe(nil)); end # Runs all the validations within the specified context. Returns +true+ if @@ -33696,26 +36131,28 @@ module ActiveRecord::Validations # # If the argument is +false+ (default is +nil+), the context is set to :create if # {new_record?}[rdoc-ref:Persistence#new_record?] is +true+, and to :update if it is not. + # If the argument is an array of contexts, post.valid?([:create, :update]), the validations are + # run within multiple contexts. # # \Validations with no :on option will run no matter the context. \Validations with # some :on option will only run in the specified context. # # @return [Boolean] # - # source://activerecord//lib/active_record/validations.rb#66 + # source://activerecord//lib/active_record/validations.rb#70 def validate(context = T.unsafe(nil)); end private - # source://activerecord//lib/active_record/validations.rb#75 + # source://activerecord//lib/active_record/validations.rb#79 def default_validation_context; end - # source://activerecord//lib/active_record/validations.rb#83 + # source://activerecord//lib/active_record/validations.rb#87 def perform_validations(options = T.unsafe(nil)); end # @raise [RecordInvalid] # - # source://activerecord//lib/active_record/validations.rb#79 + # source://activerecord//lib/active_record/validations.rb#83 def raise_validation_error; end module GeneratedClassMethods @@ -33758,7 +36195,7 @@ end module ActiveRecord::Validations::ClassMethods # Validates that the specified attributes are not present (as defined by # Object#present?). If the attribute is an association, the associated object - # is considered absent if it was marked for destruction. + # is also considered not present if it is marked for destruction. # # See ActiveModel::Validations::HelperMethods.validates_absence_of for more information. # @@ -33813,20 +36250,20 @@ module ActiveRecord::Validations::ClassMethods def validates_length_of(*attr_names); end # Validates whether the value of the specified attribute is numeric by - # trying to convert it to a float with Kernel.Float (if only_integer - # is +false+) or applying it to the regular expression /\A[\+\-]?\d+\z/ - # (if only_integer is set to +true+). Kernel.Float precision - # defaults to the column's precision value or 15. + # trying to convert it to a float with +Kernel.Float+ (if + # only_integer is +false+) or applying it to the regular + # expression /\A[\+\-]?\d+\z/ (if only_integer is set to + # +true+). +Kernel.Float+ precision defaults to the column's precision + # value or 15. # # See ActiveModel::Validations::HelperMethods.validates_numericality_of for more information. # - # source://activerecord//lib/active_record/validations/numericality.rb#30 + # source://activerecord//lib/active_record/validations/numericality.rb#31 def validates_numericality_of(*attr_names); end # Validates that the specified attributes are not blank (as defined by - # Object#blank?), and, if the attribute is an association, that the - # associated object is not marked for destruction. Happens by default - # on save. + # Object#blank?). If the attribute is an association, the associated object + # is also considered blank if it is marked for destruction. # # class Person < ActiveRecord::Base # has_one :face @@ -33836,43 +36273,21 @@ module ActiveRecord::Validations::ClassMethods # The face attribute must be in the object and it cannot be blank or marked # for destruction. # - # If you want to validate the presence of a boolean field (where the real values - # are true and false), you will want to use - # validates_inclusion_of :field_name, in: [true, false]. - # - # This is due to the way Object#blank? handles boolean values: - # false.blank? # => true. - # # This validator defers to the Active Model validation for presence, adding the # check to see that an associated object is not marked for destruction. This # prevents the parent object from validating successfully and saving, which then # deletes the associated object, thus putting the parent object into an invalid # state. # + # See ActiveModel::Validations::HelperMethods.validates_presence_of for + # more information. + # # NOTE: This validation will not fail while using it with an association # if the latter was assigned but not valid. If you want to ensure that # it is both present and valid, you also need to use # {validates_associated}[rdoc-ref:Validations::ClassMethods#validates_associated]. # - # Configuration options: - # * :message - A custom error message (default is: "can't be blank"). - # * :on - Specifies the contexts where this validation is active. - # Runs in all validation contexts by default +nil+. You can pass a symbol - # or an array of symbols. (e.g. on: :create or - # on: :custom_validation_context or - # on: [:create, :custom_validation_context]) - # * :if - Specifies a method, proc, or string to call to determine if - # the validation should occur (e.g. if: :allow_validation, or - # if: Proc.new { |user| user.signup_step > 2 }). The method, proc - # or string should return or evaluate to a +true+ or +false+ value. - # * :unless - Specifies a method, proc, or string to call to determine - # if the validation should not occur (e.g. unless: :skip_validation, - # or unless: Proc.new { |user| user.signup_step <= 2 }). The method, - # proc or string should return or evaluate to a +true+ or +false+ value. - # * :strict - Specifies whether validation should be strict. - # See ActiveModel::Validations#validates! for more information. - # - # source://activerecord//lib/active_record/validations/presence.rb#63 + # source://activerecord//lib/active_record/validations/presence.rb#40 def validates_presence_of(*attr_names); end # Validates that the specified attributes match the length restrictions supplied. @@ -34001,7 +36416,7 @@ module ActiveRecord::Validations::ClassMethods # When the database catches such a duplicate insertion, # {ActiveRecord::Base#save}[rdoc-ref:Persistence#save] will raise an ActiveRecord::StatementInvalid # exception. You can either choose to let this error propagate (which - # will result in the default Rails exception page being shown), or you + # will result in the default \Rails exception page being shown), or you # can catch it and restart the transaction (e.g. by telling the user # that the title already exists, and asking them to re-enter the title). # This technique is also known as @@ -34016,10 +36431,11 @@ module ActiveRecord::Validations::ClassMethods # The following bundled adapters throw the ActiveRecord::RecordNotUnique exception: # # * ActiveRecord::ConnectionAdapters::Mysql2Adapter. + # * ActiveRecord::ConnectionAdapters::TrilogyAdapter. # * ActiveRecord::ConnectionAdapters::SQLite3Adapter. # * ActiveRecord::ConnectionAdapters::PostgreSQLAdapter. # - # source://activerecord//lib/active_record/validations/uniqueness.rb#241 + # source://activerecord//lib/active_record/validations/uniqueness.rb#286 def validates_uniqueness_of(*attr_names); end end @@ -34061,34 +36477,47 @@ class ActiveRecord::Validations::UniquenessValidator < ::ActiveModel::EachValida private - # source://activerecord//lib/active_record/validations/uniqueness.rb#67 + # source://activerecord//lib/active_record/validations/uniqueness.rb#111 def build_relation(klass, attribute, value); end + # @return [Boolean] + # + # source://activerecord//lib/active_record/validations/uniqueness.rb#82 + def covered_by_unique_index?(klass, record, attribute, scope); end + # The check for an existing value should be run from a class that # isn't abstract. This means working down from the current class # (self), to the first non-abstract class. Since classes don't know # their subclasses, we have to build the hierarchy between self and # the record's class. # - # source://activerecord//lib/active_record/validations/uniqueness.rb#57 + # source://activerecord//lib/active_record/validations/uniqueness.rb#59 def find_finder_class_for(record); end - # source://activerecord//lib/active_record/validations/uniqueness.rb#98 + # source://activerecord//lib/active_record/validations/uniqueness.rb#142 def map_enum_attribute(klass, attribute, value); end - # source://activerecord//lib/active_record/validations/uniqueness.rb#85 + # source://activerecord//lib/active_record/validations/uniqueness.rb#97 + def resolve_attributes(record, attributes); end + + # source://activerecord//lib/active_record/validations/uniqueness.rb#129 def scope_relation(record, relation); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/validations/uniqueness.rb#69 + def validation_needed?(klass, record, attribute); end end # Raised when a record cannot be inserted or updated because a value too long for a column type. # -# source://activerecord//lib/active_record/errors.rb#220 +# source://activerecord//lib/active_record/errors.rb#276 class ActiveRecord::ValueTooLong < ::ActiveRecord::StatementInvalid; end # Defunct wrapper class kept for compatibility. # StatementInvalid wraps the original exception now. # -# source://activerecord//lib/active_record/errors.rb#170 +# source://activerecord//lib/active_record/errors.rb#204 class ActiveRecord::WrappedDatabaseException < ::ActiveRecord::StatementInvalid; end # source://activerecord//lib/arel/errors.rb#3 @@ -34096,10 +36525,10 @@ module Arel class << self # @return [Boolean] # - # source://activerecord//lib/arel.rb#46 + # source://activerecord//lib/arel.rb#60 def arel_node?(value); end - # source://activerecord//lib/arel.rb#50 + # source://activerecord//lib/arel.rb#64 def fetch_attribute(value, &block); end # Wrap a known-safe SQL string for passing to query methods, e.g. @@ -34110,10 +36539,20 @@ module Arel # This method should not be used with unsafe values such as request # parameters or model attributes. # - # source://activerecord//lib/arel.rb#38 - def sql(raw_sql); end + # Take a look at the {security guide}[https://guides.rubyonrails.org/security.html#sql-injection] + # for more information. + # + # To construct a more complex query fragment, including the possible + # use of user-provided values, the +sql_string+ may contain ? and + # +:key+ placeholders, corresponding to the additional arguments. Note + # that this behavior only applies when bind value parameters are + # supplied in the call; without them, the placeholder tokens have no + # special meaning, and will be passed through to the query as-is. + # + # source://activerecord//lib/arel.rb#48 + def sql(sql_string, *positional_binds, **named_binds); end - # source://activerecord//lib/arel.rb#42 + # source://activerecord//lib/arel.rb#56 def star; end end end @@ -34158,6 +36597,14 @@ class Arel::Attributes::Attribute < ::Struct def type_caster; end end +# source://activerecord//lib/arel/errors.rb#10 +class Arel::BindError < ::Arel::ArelError + # @return [BindError] a new instance of BindError + # + # source://activerecord//lib/arel/errors.rb#11 + def initialize(message, sql = T.unsafe(nil)); end +end + # source://activerecord//lib/arel/collectors/plain_string.rb#4 module Arel::Collectors; end @@ -34373,6 +36820,9 @@ end # # source://activerecord//lib/arel/factory_methods.rb#6 module Arel::FactoryMethods + # source://activerecord//lib/arel/factory_methods.rb#49 + def cast(name, type); end + # source://activerecord//lib/arel/factory_methods.rb#45 def coalesce(*exprs); end @@ -34499,7 +36949,7 @@ class Arel::Nodes::And < ::Arel::Nodes::NodeExpression # @return [Boolean] # - # source://activerecord//lib/arel/nodes/and.rb#25 + # source://activerecord//lib/arel/nodes/and.rb#29 def ==(other); end # Returns the value of attribute children. @@ -34509,10 +36959,13 @@ class Arel::Nodes::And < ::Arel::Nodes::NodeExpression # @return [Boolean] # - # source://activerecord//lib/arel/nodes/and.rb#25 + # source://activerecord//lib/arel/nodes/and.rb#29 def eql?(other); end # source://activerecord//lib/arel/nodes/and.rb#21 + def fetch_attribute(&block); end + + # source://activerecord//lib/arel/nodes/and.rb#25 def hash; end # source://activerecord//lib/arel/nodes/and.rb#13 @@ -34522,8 +36975,11 @@ class Arel::Nodes::And < ::Arel::Nodes::NodeExpression def right; end end -# source://activerecord//lib/arel/nodes/binary.rb#123 -class Arel::Nodes::As < ::Arel::Nodes::Binary; end +# source://activerecord//lib/arel/nodes/binary.rb#42 +class Arel::Nodes::As < ::Arel::Nodes::Binary + # source://activerecord//lib/arel/nodes/binary.rb#43 + def to_cte; end +end # source://activerecord//lib/arel/nodes/ascending.rb#5 class Arel::Nodes::Ascending < ::Arel::Nodes::Ordering @@ -34544,13 +37000,13 @@ class Arel::Nodes::Ascending < ::Arel::Nodes::Ordering def reverse; end end -# source://activerecord//lib/arel/nodes/binary.rb#123 +# source://activerecord//lib/arel/nodes/binary.rb#128 class Arel::Nodes::Assignment < ::Arel::Nodes::Binary; end # source://activerecord//lib/arel/nodes/function.rb#42 class Arel::Nodes::Avg < ::Arel::Nodes::Function; end -# source://activerecord//lib/arel/nodes/binary.rb#42 +# source://activerecord//lib/arel/nodes/binary.rb#48 class Arel::Nodes::Between < ::Arel::Nodes::Binary include ::Arel::Nodes::FetchAttribute end @@ -34700,6 +37156,50 @@ class Arel::Nodes::BitwiseXor < ::Arel::Nodes::InfixOperation def initialize(left, right); end end +# source://activerecord//lib/arel/nodes/bound_sql_literal.rb#5 +class Arel::Nodes::BoundSqlLiteral < ::Arel::Nodes::NodeExpression + # @return [BoundSqlLiteral] a new instance of BoundSqlLiteral + # + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#8 + def initialize(sql_with_placeholders, positional_binds, named_binds); end + + # @raise [ArgumentError] + # + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#50 + def +(other); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#42 + def ==(other); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#42 + def eql?(other); end + + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#38 + def hash; end + + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#56 + def inspect; end + + # Returns the value of attribute named_binds. + # + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#6 + def named_binds; end + + # Returns the value of attribute positional_binds. + # + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#6 + def positional_binds; end + + # Returns the value of attribute sql_with_placeholders. + # + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#6 + def sql_with_placeholders; end +end + # source://activerecord//lib/arel/nodes/case.rb#5 class Arel::Nodes::Case < ::Arel::Nodes::NodeExpression # @return [Case] a new instance of Case @@ -34870,6 +37370,44 @@ class Arel::Nodes::Count < ::Arel::Nodes::Function def initialize(expr, distinct = T.unsafe(nil), aliaz = T.unsafe(nil)); end end +# source://activerecord//lib/arel/nodes/cte.rb#5 +class Arel::Nodes::Cte < ::Arel::Nodes::Binary + # @return [Cte] a new instance of Cte + # + # source://activerecord//lib/arel/nodes/cte.rb#10 + def initialize(name, relation, materialized: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/nodes/cte.rb#19 + def ==(other); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/nodes/cte.rb#19 + def eql?(other); end + + # source://activerecord//lib/arel/nodes/cte.rb#15 + def hash; end + + # Returns the value of attribute materialized. + # + # source://activerecord//lib/arel/nodes/cte.rb#8 + def materialized; end + + # source://activerecord//lib/arel/nodes/binary.rb#6 + def name; end + + # source://activerecord//lib/arel/nodes/binary.rb#6 + def relation; end + + # source://activerecord//lib/arel/nodes/cte.rb#27 + def to_cte; end + + # source://activerecord//lib/arel/nodes/cte.rb#31 + def to_table; end +end + # source://activerecord//lib/arel/nodes/unary.rb#41 class Arel::Nodes::Cube < ::Arel::Nodes::Unary; end @@ -35076,7 +37614,7 @@ class Arel::Nodes::Equality < ::Arel::Nodes::Binary def invert; end end -# source://activerecord//lib/arel/nodes/binary.rb#123 +# source://activerecord//lib/arel/nodes/binary.rb#128 class Arel::Nodes::Except < ::Arel::Nodes::Binary; end # source://activerecord//lib/arel/nodes/function.rb#42 @@ -35150,6 +37688,42 @@ class Arel::Nodes::Following < ::Arel::Nodes::Unary def initialize(expr = T.unsafe(nil)); end end +# source://activerecord//lib/arel/nodes/fragments.rb#5 +class Arel::Nodes::Fragments < ::Arel::Nodes::Node + # @return [Fragments] a new instance of Fragments + # + # source://activerecord//lib/arel/nodes/fragments.rb#8 + def initialize(values = T.unsafe(nil)); end + + # @raise [ArgumentError] + # + # source://activerecord//lib/arel/nodes/fragments.rb#22 + def +(other); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/nodes/fragments.rb#28 + def ==(other); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/nodes/fragments.rb#28 + def eql?(other); end + + # source://activerecord//lib/arel/nodes/fragments.rb#18 + def hash; end + + # Returns the value of attribute values. + # + # source://activerecord//lib/arel/nodes/fragments.rb#6 + def values; end + + private + + # source://activerecord//lib/arel/nodes/fragments.rb#13 + def initialize_copy(other); end +end + # source://activerecord//lib/arel/nodes/full_outer_join.rb#5 class Arel::Nodes::FullOuterJoin < ::Arel::Nodes::Join; end @@ -35216,19 +37790,19 @@ class Arel::Nodes::Function < ::Arel::Nodes::NodeExpression def hash; end end -# source://activerecord//lib/arel/nodes/binary.rb#44 +# source://activerecord//lib/arel/nodes/binary.rb#50 class Arel::Nodes::GreaterThan < ::Arel::Nodes::Binary include ::Arel::Nodes::FetchAttribute - # source://activerecord//lib/arel/nodes/binary.rb#47 + # source://activerecord//lib/arel/nodes/binary.rb#53 def invert; end end -# source://activerecord//lib/arel/nodes/binary.rb#52 +# source://activerecord//lib/arel/nodes/binary.rb#58 class Arel::Nodes::GreaterThanOrEqual < ::Arel::Nodes::Binary include ::Arel::Nodes::FetchAttribute - # source://activerecord//lib/arel/nodes/binary.rb#55 + # source://activerecord//lib/arel/nodes/binary.rb#61 def invert; end end @@ -35264,12 +37838,9 @@ class Arel::Nodes::HomogeneousIn < ::Arel::Nodes::Node # source://activerecord//lib/arel/nodes/homogeneous_in.rb#6 def attribute; end - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#47 + # source://activerecord//lib/arel/nodes/homogeneous_in.rb#39 def casted_values; end - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#43 - def column_name; end - # @return [Boolean] # # source://activerecord//lib/arel/nodes/homogeneous_in.rb#18 @@ -35280,7 +37851,7 @@ class Arel::Nodes::HomogeneousIn < ::Arel::Nodes::Node # source://activerecord//lib/arel/nodes/homogeneous_in.rb#23 def equality?; end - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#62 + # source://activerecord//lib/arel/nodes/homogeneous_in.rb#54 def fetch_attribute(&block); end # source://activerecord//lib/arel/nodes/homogeneous_in.rb#14 @@ -35292,15 +37863,12 @@ class Arel::Nodes::HomogeneousIn < ::Arel::Nodes::Node # source://activerecord//lib/arel/nodes/homogeneous_in.rb#31 def left; end - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#58 + # source://activerecord//lib/arel/nodes/homogeneous_in.rb#50 def proc_for_binds; end # source://activerecord//lib/arel/nodes/homogeneous_in.rb#35 def right; end - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#39 - def table_name; end - # Returns the value of attribute type. # # source://activerecord//lib/arel/nodes/homogeneous_in.rb#6 @@ -35313,7 +37881,7 @@ class Arel::Nodes::HomogeneousIn < ::Arel::Nodes::Node protected - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#71 + # source://activerecord//lib/arel/nodes/homogeneous_in.rb#63 def ivars; end end @@ -35420,26 +37988,26 @@ class Arel::Nodes::InsertStatement < ::Arel::Nodes::Node def initialize_copy(other); end end -# source://activerecord//lib/arel/nodes/binary.rb#123 +# source://activerecord//lib/arel/nodes/binary.rb#128 class Arel::Nodes::Intersect < ::Arel::Nodes::Binary; end -# source://activerecord//lib/arel/nodes/binary.rb#76 +# source://activerecord//lib/arel/nodes/binary.rb#82 class Arel::Nodes::IsDistinctFrom < ::Arel::Nodes::Binary include ::Arel::Nodes::FetchAttribute - # source://activerecord//lib/arel/nodes/binary.rb#79 + # source://activerecord//lib/arel/nodes/binary.rb#85 def invert; end end -# source://activerecord//lib/arel/nodes/binary.rb#84 +# source://activerecord//lib/arel/nodes/binary.rb#90 class Arel::Nodes::IsNotDistinctFrom < ::Arel::Nodes::Binary include ::Arel::Nodes::FetchAttribute - # source://activerecord//lib/arel/nodes/binary.rb#87 + # source://activerecord//lib/arel/nodes/binary.rb#93 def invert; end end -# source://activerecord//lib/arel/nodes/binary.rb#123 +# source://activerecord//lib/arel/nodes/binary.rb#128 class Arel::Nodes::Join < ::Arel::Nodes::Binary; end # Class that represents a join source @@ -35462,22 +38030,22 @@ end # source://activerecord//lib/arel/nodes/unary.rb#41 class Arel::Nodes::Lateral < ::Arel::Nodes::Unary; end -# source://activerecord//lib/active_record/relation/query_methods.rb#1428 +# source://activerecord//lib/arel/nodes/leading_join.rb#5 class Arel::Nodes::LeadingJoin < ::Arel::Nodes::InnerJoin; end -# source://activerecord//lib/arel/nodes/binary.rb#60 +# source://activerecord//lib/arel/nodes/binary.rb#66 class Arel::Nodes::LessThan < ::Arel::Nodes::Binary include ::Arel::Nodes::FetchAttribute - # source://activerecord//lib/arel/nodes/binary.rb#63 + # source://activerecord//lib/arel/nodes/binary.rb#69 def invert; end end -# source://activerecord//lib/arel/nodes/binary.rb#68 +# source://activerecord//lib/arel/nodes/binary.rb#74 class Arel::Nodes::LessThanOrEqual < ::Arel::Nodes::Binary include ::Arel::Nodes::FetchAttribute - # source://activerecord//lib/arel/nodes/binary.rb#71 + # source://activerecord//lib/arel/nodes/binary.rb#77 def invert; end end @@ -35597,38 +38165,148 @@ class Arel::Nodes::NamedWindow < ::Arel::Nodes::Window def initialize_copy(other); end end -# Abstract base class for all AST nodes +# = Using +Arel::Nodes::Node+ +# +# Active Record uses Arel to compose SQL statements. Instead of building SQL strings directly, it's building an +# abstract syntax tree (AST) of the statement using various types of Arel::Nodes::Node. Each node represents a +# fragment of a SQL statement. +# +# The intermediate representation allows Arel to compile the statement into the database's specific SQL dialect +# only before sending it without having to care about the nuances of each database when building the statement. +# It also allows easier composition of statements without having to resort to (brittle and unsafe) string manipulation. +# +# == Building constraints +# +# One of the most common use cases of Arel is generating constraints for +SELECT+ statements. To help with that, +# most nodes include a couple of useful factory methods to create subtree structures for common constraints. For +# a full list of those, please refer to Arel::Predications. +# +# The following example creates an equality constraint where the value of the name column on the users table +# matches the value DHH. +# +# users = Arel::Table.new(:users) +# constraint = users[:name].eq("DHH") +# +# # => Arel::Nodes::Equality.new( +# # Arel::Attributes::Attribute.new(users, "name"), +# # Arel::Nodes::Casted.new( +# # "DHH", +# # Arel::Attributes::Attribute.new(users, "name") +# # ) +# # ) +# +# The resulting SQL fragment will look like this: +# +# "users"."name" = 'DHH' +# +# The constraint fragments can be used with regular ActiveRecord::Relation objects instead of a Hash. The +# following two examples show two ways of creating the same query. +# +# User.where(name: 'DHH') +# +# # SELECT "users".* FROM "users" WHERE "users"."name" = 'DHH' +# +# users = User.arel_table +# +# User.where(users[:name].eq('DHH')) +# +# # SELECT "users".* FROM "users" WHERE "users"."name" = 'DHH' +# +# == Functions +# +# Arel comes with built-in support for SQL functions like +COUNT+, +SUM+, +MIN+, +MAX+, and +AVG+. The +# Arel::Expressions module includes factory methods for the default functions. +# +# employees = Employee.arel_table +# +# Employee.select(employees[:department_id], employees[:salary].average).group(employees[:department_id]) +# +# # SELECT "employees"."department_id", AVG("employees"."salary") +# # FROM "employees" GROUP BY "employees"."department_id" +# +# It’s also possible to use custom functions by using the Arel::Nodes::NamedFunction node type. It accepts a +# function name and an array of parameters. +# +# Arel::Nodes::NamedFunction.new('date_trunc', [Arel::Nodes.build_quoted('day'), User.arel_table[:created_at]]) +# +# # date_trunc('day', "users"."created_at") # -# source://activerecord//lib/arel/nodes/node.rb#7 +# == Quoting & bind params +# +# Values that you pass to Arel nodes need to be quoted or wrapped in bind params. This ensures they are properly +# converted into the correct format without introducing a possible SQL injection vulnerability. Most factory +# methods (like +eq+, +gt+, +lteq+, …) quote passed values automatically. When not using a factory method, it’s +# possible to convert a value and wrap it in an Arel::Nodes::Quoted node (if necessary) by calling +Arel::Nodes. +# build_quoted+. +# +# Arel::Nodes.build_quoted("foo") # 'foo' +# Arel::Nodes.build_quoted(12.3) # 12.3 +# +# Instead of quoting values and embedding them directly in the SQL statement, it’s also possible to create bind +# params. This keeps the actual values outside of the statement and allows using the prepared statement feature +# of some databases. +# +# attribute = ActiveRecord::Relation::QueryAttribute.new(:name, "DHH", ActiveRecord::Type::String.new) +# Arel::Nodes::BindParam.new(attribute) +# +# When ActiveRecord runs the query, bind params are replaced by placeholders (like +$1+) and the values are passed +# separately. +# +# == SQL Literals +# +# For cases where there is no way to represent a particular SQL fragment using Arel nodes, you can use an SQL +# literal. SQL literals are strings that Arel will treat “as is”. +# +# Arel.sql('LOWER("users"."name")').eq('dhh') +# +# # LOWER("users"."name") = 'dhh' +# +# Please keep in mind that passing data as raw SQL literals might introduce a possible SQL injection. However, +# `Arel.sql` supports binding parameters which will ensure proper quoting. This can be useful when you need to +# control the exact SQL you run, but you still have potentially user-supplied values. +# +# Arel.sql('LOWER("users"."name") = ?', 'dhh') +# +# # LOWER("users"."name") = 'dhh' +# +# You can also combine SQL literals. +# +# sql = Arel.sql('SELECT * FROM "users" WHERE ') +# sql += Arel.sql('LOWER("users"."name") = :name', name: 'dhh') +# sql += Arel.sql('AND "users"."age" > :age', age: 35) +# +# # SELECT * FROM "users" WHERE LOWER("users"."name") = 'dhh' AND "users"."age" > '35' +# +# source://activerecord//lib/arel/nodes/node.rb#116 class Arel::Nodes::Node include ::Arel::FactoryMethods # Factory method to create an Nodes::And node. # - # source://activerecord//lib/arel/nodes/node.rb#26 + # source://activerecord//lib/arel/nodes/node.rb#135 def and(right); end # @return [Boolean] # - # source://activerecord//lib/arel/nodes/node.rb#48 + # source://activerecord//lib/arel/nodes/node.rb#157 def equality?; end - # source://activerecord//lib/arel/nodes/node.rb#45 + # source://activerecord//lib/arel/nodes/node.rb#154 def fetch_attribute; end - # source://activerecord//lib/arel/nodes/node.rb#30 + # source://activerecord//lib/arel/nodes/node.rb#139 def invert; end # Factory method to create a Nodes::Not node that has the recipient of # the caller as a child. # - # source://activerecord//lib/arel/nodes/node.rb#13 + # source://activerecord//lib/arel/nodes/node.rb#122 def not; end # Factory method to create a Nodes::Grouping node that has an Nodes::Or # node as a child. # - # source://activerecord//lib/arel/nodes/node.rb#20 + # source://activerecord//lib/arel/nodes/node.rb#129 def or(right); end # FIXME: this method should go away. I don't like people calling @@ -35637,7 +38315,7 @@ class Arel::Nodes::Node # # Maybe we should just use `Table.engine`? :'( # - # source://activerecord//lib/arel/nodes/node.rb#39 + # source://activerecord//lib/arel/nodes/node.rb#148 def to_sql(engine = T.unsafe(nil)); end end @@ -35653,19 +38331,19 @@ end # source://activerecord//lib/arel/nodes/unary.rb#41 class Arel::Nodes::Not < ::Arel::Nodes::Unary; end -# source://activerecord//lib/arel/nodes/binary.rb#92 +# source://activerecord//lib/arel/nodes/binary.rb#98 class Arel::Nodes::NotEqual < ::Arel::Nodes::Binary include ::Arel::Nodes::FetchAttribute - # source://activerecord//lib/arel/nodes/binary.rb#95 + # source://activerecord//lib/arel/nodes/binary.rb#101 def invert; end end -# source://activerecord//lib/arel/nodes/binary.rb#100 +# source://activerecord//lib/arel/nodes/binary.rb#106 class Arel::Nodes::NotIn < ::Arel::Nodes::Binary include ::Arel::Nodes::FetchAttribute - # source://activerecord//lib/arel/nodes/binary.rb#103 + # source://activerecord//lib/arel/nodes/binary.rb#109 def invert; end end @@ -35693,9 +38371,9 @@ class Arel::Nodes::On < ::Arel::Nodes::Unary; end # source://activerecord//lib/arel/nodes/unary.rb#41 class Arel::Nodes::OptimizerHints < ::Arel::Nodes::Unary; end -# source://activerecord//lib/arel/nodes/binary.rb#108 +# source://activerecord//lib/arel/nodes/binary.rb#114 class Arel::Nodes::Or < ::Arel::Nodes::Binary - # source://activerecord//lib/arel/nodes/binary.rb#109 + # source://activerecord//lib/arel/nodes/binary.rb#115 def fetch_attribute(&block); end end @@ -36043,6 +38721,11 @@ class Arel::Nodes::SqlLiteral < ::String include ::Arel::AliasPredication include ::Arel::OrderPredications + # @raise [ArgumentError] + # + # source://activerecord//lib/arel/nodes/sql_literal.rb#18 + def +(other); end + # source://activerecord//lib/arel/nodes/sql_literal.rb#11 def encode_with(coder); end @@ -36091,6 +38774,9 @@ class Arel::Nodes::TableAlias < ::Arel::Nodes::Binary # source://activerecord//lib/arel/nodes/table_alias.rb#14 def table_name; end + # source://activerecord//lib/arel/nodes/table_alias.rb#30 + def to_cte; end + # source://activerecord//lib/arel/nodes/table_alias.rb#18 def type_cast_for_database(attr_name, value); end @@ -36165,10 +38851,10 @@ class Arel::Nodes::UnaryOperation < ::Arel::Nodes::Unary def operator; end end -# source://activerecord//lib/arel/nodes/binary.rb#123 +# source://activerecord//lib/arel/nodes/binary.rb#128 class Arel::Nodes::Union < ::Arel::Nodes::Binary; end -# source://activerecord//lib/arel/nodes/binary.rb#123 +# source://activerecord//lib/arel/nodes/binary.rb#128 class Arel::Nodes::UnionAll < ::Arel::Nodes::Binary; end # source://activerecord//lib/arel/nodes/unqualified_column.rb#5 @@ -36432,22 +39118,22 @@ module Arel::Predications # source://activerecord//lib/arel/predications.rb#37 def between(other); end - # source://activerecord//lib/arel/predications.rb#213 + # source://activerecord//lib/arel/predications.rb#215 def concat(other); end - # source://activerecord//lib/arel/predications.rb#217 + # source://activerecord//lib/arel/predications.rb#219 def contains(other); end - # source://activerecord//lib/arel/predications.rb#145 + # source://activerecord//lib/arel/predications.rb#147 def does_not_match(other, escape = T.unsafe(nil), case_sensitive = T.unsafe(nil)); end - # source://activerecord//lib/arel/predications.rb#157 + # source://activerecord//lib/arel/predications.rb#159 def does_not_match_all(others, escape = T.unsafe(nil)); end - # source://activerecord//lib/arel/predications.rb#153 + # source://activerecord//lib/arel/predications.rb#155 def does_not_match_any(others, escape = T.unsafe(nil)); end - # source://activerecord//lib/arel/predications.rb#149 + # source://activerecord//lib/arel/predications.rb#151 def does_not_match_regexp(other, case_sensitive = T.unsafe(nil)); end # source://activerecord//lib/arel/predications.rb#17 @@ -36459,31 +39145,31 @@ module Arel::Predications # source://activerecord//lib/arel/predications.rb#29 def eq_any(others); end - # source://activerecord//lib/arel/predications.rb#173 + # source://activerecord//lib/arel/predications.rb#175 def gt(right); end - # source://activerecord//lib/arel/predications.rb#181 + # source://activerecord//lib/arel/predications.rb#183 def gt_all(others); end - # source://activerecord//lib/arel/predications.rb#177 + # source://activerecord//lib/arel/predications.rb#179 def gt_any(others); end - # source://activerecord//lib/arel/predications.rb#161 + # source://activerecord//lib/arel/predications.rb#163 def gteq(right); end - # source://activerecord//lib/arel/predications.rb#169 + # source://activerecord//lib/arel/predications.rb#171 def gteq_all(others); end - # source://activerecord//lib/arel/predications.rb#165 + # source://activerecord//lib/arel/predications.rb#167 def gteq_any(others); end - # source://activerecord//lib/arel/predications.rb#63 + # source://activerecord//lib/arel/predications.rb#65 def in(other); end - # source://activerecord//lib/arel/predications.rb#78 + # source://activerecord//lib/arel/predications.rb#80 def in_all(others); end - # source://activerecord//lib/arel/predications.rb#74 + # source://activerecord//lib/arel/predications.rb#76 def in_any(others); end # source://activerecord//lib/arel/predications.rb#25 @@ -36492,37 +39178,37 @@ module Arel::Predications # source://activerecord//lib/arel/predications.rb#21 def is_not_distinct_from(other); end - # source://activerecord//lib/arel/predications.rb#185 + # source://activerecord//lib/arel/predications.rb#187 def lt(right); end - # source://activerecord//lib/arel/predications.rb#193 + # source://activerecord//lib/arel/predications.rb#195 def lt_all(others); end - # source://activerecord//lib/arel/predications.rb#189 + # source://activerecord//lib/arel/predications.rb#191 def lt_any(others); end - # source://activerecord//lib/arel/predications.rb#197 + # source://activerecord//lib/arel/predications.rb#199 def lteq(right); end - # source://activerecord//lib/arel/predications.rb#205 + # source://activerecord//lib/arel/predications.rb#207 def lteq_all(others); end - # source://activerecord//lib/arel/predications.rb#201 + # source://activerecord//lib/arel/predications.rb#203 def lteq_any(others); end - # source://activerecord//lib/arel/predications.rb#129 + # source://activerecord//lib/arel/predications.rb#131 def matches(other, escape = T.unsafe(nil), case_sensitive = T.unsafe(nil)); end - # source://activerecord//lib/arel/predications.rb#141 + # source://activerecord//lib/arel/predications.rb#143 def matches_all(others, escape = T.unsafe(nil), case_sensitive = T.unsafe(nil)); end - # source://activerecord//lib/arel/predications.rb#137 + # source://activerecord//lib/arel/predications.rb#139 def matches_any(others, escape = T.unsafe(nil), case_sensitive = T.unsafe(nil)); end - # source://activerecord//lib/arel/predications.rb#133 + # source://activerecord//lib/arel/predications.rb#135 def matches_regexp(other, case_sensitive = T.unsafe(nil)); end - # source://activerecord//lib/arel/predications.rb#82 + # source://activerecord//lib/arel/predications.rb#84 def not_between(other); end # source://activerecord//lib/arel/predications.rb#5 @@ -36534,48 +39220,48 @@ module Arel::Predications # source://activerecord//lib/arel/predications.rb#9 def not_eq_any(others); end - # source://activerecord//lib/arel/predications.rb#110 + # source://activerecord//lib/arel/predications.rb#112 def not_in(other); end - # source://activerecord//lib/arel/predications.rb#125 + # source://activerecord//lib/arel/predications.rb#127 def not_in_all(others); end - # source://activerecord//lib/arel/predications.rb#121 + # source://activerecord//lib/arel/predications.rb#123 def not_in_any(others); end - # source://activerecord//lib/arel/predications.rb#221 + # source://activerecord//lib/arel/predications.rb#223 def overlaps(other); end - # source://activerecord//lib/arel/predications.rb#225 + # source://activerecord//lib/arel/predications.rb#227 def quoted_array(others); end - # source://activerecord//lib/arel/predications.rb#209 + # source://activerecord//lib/arel/predications.rb#211 def when(right); end private - # source://activerecord//lib/arel/predications.rb#237 + # source://activerecord//lib/arel/predications.rb#239 def grouping_all(method_id, others, *extras); end - # source://activerecord//lib/arel/predications.rb#230 + # source://activerecord//lib/arel/predications.rb#232 def grouping_any(method_id, others, *extras); end # @return [Boolean] # - # source://activerecord//lib/arel/predications.rb#246 + # source://activerecord//lib/arel/predications.rb#248 def infinity?(value); end # @return [Boolean] # - # source://activerecord//lib/arel/predications.rb#254 + # source://activerecord//lib/arel/predications.rb#256 def open_ended?(value); end - # source://activerecord//lib/arel/predications.rb#242 + # source://activerecord//lib/arel/predications.rb#244 def quoted_node(other); end # @return [Boolean] # - # source://activerecord//lib/arel/predications.rb#250 + # source://activerecord//lib/arel/predications.rb#252 def unboundable?(value); end end @@ -36726,43 +39412,43 @@ class Arel::Table # @return [Table] a new instance of Table # - # source://activerecord//lib/arel/table.rb#16 + # source://activerecord//lib/arel/table.rb#14 def initialize(name, as: T.unsafe(nil), klass: T.unsafe(nil), type_caster: T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord//lib/arel/table.rb#95 + # source://activerecord//lib/arel/table.rb#99 def ==(other); end - # source://activerecord//lib/arel/table.rb#82 + # source://activerecord//lib/arel/table.rb#86 def [](name, table = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord//lib/arel/table.rb#110 + # source://activerecord//lib/arel/table.rb#114 def able_to_type_cast?; end - # source://activerecord//lib/arel/table.rb#30 + # source://activerecord//lib/arel/table.rb#34 def alias(name = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord//lib/arel/table.rb#95 + # source://activerecord//lib/arel/table.rb#99 def eql?(other); end - # source://activerecord//lib/arel/table.rb#34 + # source://activerecord//lib/arel/table.rb#38 def from; end - # source://activerecord//lib/arel/table.rb#54 + # source://activerecord//lib/arel/table.rb#58 def group(*columns); end - # source://activerecord//lib/arel/table.rb#88 + # source://activerecord//lib/arel/table.rb#92 def hash; end - # source://activerecord//lib/arel/table.rb#78 + # source://activerecord//lib/arel/table.rb#82 def having(expr); end - # source://activerecord//lib/arel/table.rb#38 + # source://activerecord//lib/arel/table.rb#42 def join(relation, klass = T.unsafe(nil)); end # Returns the value of attribute name. @@ -36777,53 +39463,40 @@ class Arel::Table # source://activerecord//lib/arel/table.rb#11 def name=(_arg0); end - # source://activerecord//lib/arel/table.rb#58 + # source://activerecord//lib/arel/table.rb#62 def order(*expr); end - # source://activerecord//lib/arel/table.rb#50 + # source://activerecord//lib/arel/table.rb#54 def outer_join(relation); end - # source://activerecord//lib/arel/table.rb#66 + # source://activerecord//lib/arel/table.rb#70 def project(*things); end - # source://activerecord//lib/arel/table.rb#74 + # source://activerecord//lib/arel/table.rb#78 def skip(amount); end # Returns the value of attribute table_alias. # - # source://activerecord//lib/arel/table.rb#11 + # source://activerecord//lib/arel/table.rb#12 def table_alias; end - # Sets the attribute table_alias - # - # @param value the value to set the attribute table_alias to. - # - # source://activerecord//lib/arel/table.rb#11 - def table_alias=(_arg0); end - - # Returns the value of attribute name. - # TableAlias and Table both have a #table_name which is the name of the underlying table - # - # source://activerecord//lib/arel/table.rb#11 - def table_name; end - - # source://activerecord//lib/arel/table.rb#70 + # source://activerecord//lib/arel/table.rb#74 def take(amount); end - # source://activerecord//lib/arel/table.rb#102 + # source://activerecord//lib/arel/table.rb#106 def type_cast_for_database(attr_name, value); end - # source://activerecord//lib/arel/table.rb#106 + # source://activerecord//lib/arel/table.rb#110 def type_for_attribute(name); end - # source://activerecord//lib/arel/table.rb#62 + # source://activerecord//lib/arel/table.rb#66 def where(condition); end private # Returns the value of attribute type_caster. # - # source://activerecord//lib/arel/table.rb#115 + # source://activerecord//lib/arel/table.rb#119 def type_caster; end class << self @@ -37156,47 +39829,50 @@ class Arel::Visitors::MySQL < ::Arel::Visitors::ToSql # MySQL doesn't automatically create a temporary table for use subquery, so we have # to give it some prompting in the form of a subsubquery. # - # source://activerecord//lib/arel/visitors/mysql.rb#81 + # source://activerecord//lib/arel/visitors/mysql.rb#88 def build_subselect(key, o); end # In the simple case, MySQL allows us to place JOINs directly into the UPDATE # query. However, this does not allow for LIMIT, OFFSET and ORDER. To support # these, we must use a subquery. # - # source://activerecord//lib/arel/visitors/mysql.rb#69 + # source://activerecord//lib/arel/visitors/mysql.rb#76 def prepare_delete_statement(o); end # In the simple case, MySQL allows us to place JOINs directly into the UPDATE # query. However, this does not allow for LIMIT, OFFSET and ORDER. To support # these, we must use a subquery. # - # source://activerecord//lib/arel/visitors/mysql.rb#69 + # source://activerecord//lib/arel/visitors/mysql.rb#76 def prepare_update_statement(o); end # source://activerecord//lib/arel/visitors/mysql.rb#7 def visit_Arel_Nodes_Bin(o, collector); end - # source://activerecord//lib/arel/visitors/mysql.rb#33 + # source://activerecord//lib/arel/visitors/mysql.rb#34 def visit_Arel_Nodes_Concat(o, collector); end - # source://activerecord//lib/arel/visitors/mysql.rb#48 + # source://activerecord//lib/arel/visitors/mysql.rb#67 + def visit_Arel_Nodes_Cte(o, collector); end + + # source://activerecord//lib/arel/visitors/mysql.rb#49 def visit_Arel_Nodes_IsDistinctFrom(o, collector); end - # source://activerecord//lib/arel/visitors/mysql.rb#42 + # source://activerecord//lib/arel/visitors/mysql.rb#43 def visit_Arel_Nodes_IsNotDistinctFrom(o, collector); end - # source://activerecord//lib/arel/visitors/mysql.rb#57 + # source://activerecord//lib/arel/visitors/mysql.rb#58 def visit_Arel_Nodes_NotRegexp(o, collector); end # no-op # - # source://activerecord//lib/arel/visitors/mysql.rb#62 + # source://activerecord//lib/arel/visitors/mysql.rb#63 def visit_Arel_Nodes_NullsFirst(o, collector); end - # source://activerecord//lib/arel/visitors/mysql.rb#53 + # source://activerecord//lib/arel/visitors/mysql.rb#54 def visit_Arel_Nodes_Regexp(o, collector); end - # source://activerecord//lib/arel/visitors/mysql.rb#28 + # source://activerecord//lib/arel/visitors/mysql.rb#29 def visit_Arel_Nodes_SelectCore(o, collector); end # :'( @@ -37204,10 +39880,10 @@ class Arel::Visitors::MySQL < ::Arel::Visitors::ToSql # you can use some large number for the second parameter. # https://dev.mysql.com/doc/refman/en/select.html # - # source://activerecord//lib/arel/visitors/mysql.rb#21 + # source://activerecord//lib/arel/visitors/mysql.rb#22 def visit_Arel_Nodes_SelectStatement(o, collector); end - # source://activerecord//lib/arel/visitors/mysql.rb#12 + # source://activerecord//lib/arel/visitors/mysql.rb#13 def visit_Arel_Nodes_UnqualifiedColumn(o, collector); end end @@ -37306,133 +39982,136 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor private - # source://activerecord//lib/arel/visitors/to_sql.rb#906 + # source://activerecord//lib/arel/visitors/to_sql.rb#982 def aggregate(name, o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#740 + # source://activerecord//lib/arel/visitors/to_sql.rb#759 def bind_block; end # FIXME: we should probably have a 2-pass visitor for this # - # source://activerecord//lib/arel/visitors/to_sql.rb#869 + # source://activerecord//lib/arel/visitors/to_sql.rb#945 def build_subselect(key, o); end - # source://activerecord//lib/arel/visitors/to_sql.rb#933 + # source://activerecord//lib/arel/visitors/to_sql.rb#1009 def collect_ctes(children, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#176 def collect_nodes_for(nodes, collector, spacer, connector = T.unsafe(nil)); end - # source://activerecord//lib/arel/visitors/to_sql.rb#814 + # source://activerecord//lib/arel/visitors/to_sql.rb#890 def collect_optimizer_hints(o, collector); end # @return [Boolean] # - # source://activerecord//lib/arel/visitors/to_sql.rb#844 + # source://activerecord//lib/arel/visitors/to_sql.rb#920 def has_group_by_and_having?(o); end # @return [Boolean] # - # source://activerecord//lib/arel/visitors/to_sql.rb#836 + # source://activerecord//lib/arel/visitors/to_sql.rb#912 def has_join_sources?(o); end # @return [Boolean] # - # source://activerecord//lib/arel/visitors/to_sql.rb#840 + # source://activerecord//lib/arel/visitors/to_sql.rb#916 def has_limit_or_offset_or_orders?(o); end - # source://activerecord//lib/arel/visitors/to_sql.rb#883 + # source://activerecord//lib/arel/visitors/to_sql.rb#959 def infix_value(o, collector, value); end - # source://activerecord//lib/arel/visitors/to_sql.rb#889 + # source://activerecord//lib/arel/visitors/to_sql.rb#965 def infix_value_with_paren(o, collector, value, suppress_parens = T.unsafe(nil)); end - # source://activerecord//lib/arel/visitors/to_sql.rb#824 + # source://activerecord//lib/arel/visitors/to_sql.rb#900 def inject_join(list, collector, join_str); end - # source://activerecord//lib/arel/visitors/to_sql.rb#920 + # source://activerecord//lib/arel/visitors/to_sql.rb#996 def is_distinct_from(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#818 + # source://activerecord//lib/arel/visitors/to_sql.rb#894 def maybe_visit(thing, collector); end # The default strategy for an UPDATE with joins is to use a subquery. This doesn't work # on MySQL (even when aliasing the tables), but MySQL allows using JOIN directly in # an UPDATE statement, so in the MySQL visitor we redefine this to do that. # - # source://activerecord//lib/arel/visitors/to_sql.rb#851 + # source://activerecord//lib/arel/visitors/to_sql.rb#927 def prepare_delete_statement(o); end # The default strategy for an UPDATE with joins is to use a subquery. This doesn't work # on MySQL (even when aliasing the tables), but MySQL allows using JOIN directly in # an UPDATE statement, so in the MySQL visitor we redefine this to do that. # - # source://activerecord//lib/arel/visitors/to_sql.rb#851 + # source://activerecord//lib/arel/visitors/to_sql.rb#927 def prepare_update_statement(o); end - # source://activerecord//lib/arel/visitors/to_sql.rb#794 + # source://activerecord//lib/arel/visitors/to_sql.rb#870 def quote(value); end - # source://activerecord//lib/arel/visitors/to_sql.rb#804 + # source://activerecord//lib/arel/visitors/to_sql.rb#880 def quote_column_name(name); end - # source://activerecord//lib/arel/visitors/to_sql.rb#799 + # source://activerecord//lib/arel/visitors/to_sql.rb#875 def quote_table_name(name); end - # source://activerecord//lib/arel/visitors/to_sql.rb#809 + # source://activerecord//lib/arel/visitors/to_sql.rb#885 def sanitize_as_sql_comment(value); end # @return [Boolean] # - # source://activerecord//lib/arel/visitors/to_sql.rb#832 + # source://activerecord//lib/arel/visitors/to_sql.rb#908 def unboundable?(value); end # @raise [UnsupportedVisitError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 + # source://activerecord//lib/arel/visitors/to_sql.rb#831 def unsupported(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#742 + # source://activerecord//lib/arel/visitors/to_sql.rb#761 def visit_ActiveModel_Attribute(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 + # source://activerecord//lib/arel/visitors/to_sql.rb#831 def visit_ActiveSupport_Multibyte_Chars(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 + # source://activerecord//lib/arel/visitors/to_sql.rb#831 def visit_ActiveSupport_StringInquirer(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#732 + # source://activerecord//lib/arel/visitors/to_sql.rb#751 def visit_Arel_Attributes_Attribute(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#611 + # source://activerecord//lib/arel/visitors/to_sql.rb#616 def visit_Arel_Nodes_And(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#693 + # source://activerecord//lib/arel/visitors/to_sql.rb#698 def visit_Arel_Nodes_As(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#361 + # source://activerecord//lib/arel/visitors/to_sql.rb#360 def visit_Arel_Nodes_Ascending(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#630 + # source://activerecord//lib/arel/visitors/to_sql.rb#635 def visit_Arel_Nodes_Assignment(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#418 + # source://activerecord//lib/arel/visitors/to_sql.rb#417 def visit_Arel_Nodes_Avg(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#428 + # source://activerecord//lib/arel/visitors/to_sql.rb#427 def visit_Arel_Nodes_Between(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#183 def visit_Arel_Nodes_Bin(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#746 + # source://activerecord//lib/arel/visitors/to_sql.rb#765 def visit_Arel_Nodes_BindParam(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#699 + # source://activerecord//lib/arel/visitors/to_sql.rb#774 + def visit_Arel_Nodes_BoundSqlLiteral(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#704 def visit_Arel_Nodes_Case(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#84 @@ -37441,16 +40120,19 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # source://activerecord//lib/arel/visitors/to_sql.rb#172 def visit_Arel_Nodes_Comment(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#402 + # source://activerecord//lib/arel/visitors/to_sql.rb#401 def visit_Arel_Nodes_Count(o, collector); end + # source://activerecord//lib/arel/visitors/to_sql.rb#737 + def visit_Arel_Nodes_Cte(o, collector); end + # source://activerecord//lib/arel/visitors/to_sql.rb#293 def visit_Arel_Nodes_CurrentRow(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#22 def visit_Arel_Nodes_DeleteStatement(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#365 + # source://activerecord//lib/arel/visitors/to_sql.rb#364 def visit_Arel_Nodes_Descending(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#187 @@ -37461,13 +40143,13 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # source://activerecord//lib/arel/visitors/to_sql.rb#191 def visit_Arel_Nodes_DistinctOn(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#494 + # source://activerecord//lib/arel/visitors/to_sql.rb#493 def visit_Arel_Nodes_DoesNotMatch(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#723 + # source://activerecord//lib/arel/visitors/to_sql.rb#728 def visit_Arel_Nodes_Else(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#643 + # source://activerecord//lib/arel/visitors/to_sql.rb#648 def visit_Arel_Nodes_Equality(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#218 @@ -37476,7 +40158,7 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # source://activerecord//lib/arel/visitors/to_sql.rb#73 def visit_Arel_Nodes_Exists(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#397 + # source://activerecord//lib/arel/visitors/to_sql.rb#396 def visit_Arel_Nodes_Extract(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#93 @@ -37488,16 +40170,19 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # source://activerecord//lib/arel/visitors/to_sql.rb#283 def visit_Arel_Nodes_Following(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#529 + # source://activerecord//lib/arel/visitors/to_sql.rb#866 + def visit_Arel_Nodes_Fragments(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#528 def visit_Arel_Nodes_FullOuterJoin(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#446 + # source://activerecord//lib/arel/visitors/to_sql.rb#445 def visit_Arel_Nodes_GreaterThan(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#434 + # source://activerecord//lib/arel/visitors/to_sql.rb#433 def visit_Arel_Nodes_GreaterThanOrEqual(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#380 + # source://activerecord//lib/arel/visitors/to_sql.rb#379 def visit_Arel_Nodes_Group(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#324 @@ -37506,13 +40191,13 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # source://activerecord//lib/arel/visitors/to_sql.rb#333 def visit_Arel_Nodes_HomogeneousIn(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#579 + # source://activerecord//lib/arel/visitors/to_sql.rb#584 def visit_Arel_Nodes_In(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#778 + # source://activerecord//lib/arel/visitors/to_sql.rb#850 def visit_Arel_Nodes_InfixOperation(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#550 + # source://activerecord//lib/arel/visitors/to_sql.rb#549 def visit_Arel_Nodes_InnerJoin(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#51 @@ -37521,19 +40206,19 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # source://activerecord//lib/arel/visitors/to_sql.rb#213 def visit_Arel_Nodes_Intersect(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#668 + # source://activerecord//lib/arel/visitors/to_sql.rb#673 def visit_Arel_Nodes_IsDistinctFrom(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#658 + # source://activerecord//lib/arel/visitors/to_sql.rb#663 def visit_Arel_Nodes_IsNotDistinctFrom(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#506 + # source://activerecord//lib/arel/visitors/to_sql.rb#505 def visit_Arel_Nodes_JoinSource(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#470 + # source://activerecord//lib/arel/visitors/to_sql.rb#469 def visit_Arel_Nodes_LessThan(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#458 + # source://activerecord//lib/arel/visitors/to_sql.rb#457 def visit_Arel_Nodes_LessThanOrEqual(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#315 @@ -37542,56 +40227,56 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # source://activerecord//lib/arel/visitors/to_sql.rb#320 def visit_Arel_Nodes_Lock(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#482 + # source://activerecord//lib/arel/visitors/to_sql.rb#481 def visit_Arel_Nodes_Matches(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#410 + # source://activerecord//lib/arel/visitors/to_sql.rb#409 def visit_Arel_Nodes_Max(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#414 + # source://activerecord//lib/arel/visitors/to_sql.rb#413 def visit_Arel_Nodes_Min(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#384 + # source://activerecord//lib/arel/visitors/to_sql.rb#383 def visit_Arel_Nodes_NamedFunction(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#223 def visit_Arel_Nodes_NamedWindow(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#566 + # source://activerecord//lib/arel/visitors/to_sql.rb#565 def visit_Arel_Nodes_Not(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#678 + # source://activerecord//lib/arel/visitors/to_sql.rb#683 def visit_Arel_Nodes_NotEqual(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#595 + # source://activerecord//lib/arel/visitors/to_sql.rb#600 def visit_Arel_Nodes_NotIn(o, collector); end # @raise [NotImplementedError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#521 + # source://activerecord//lib/arel/visitors/to_sql.rb#520 def visit_Arel_Nodes_NotRegexp(o, collector); end # NullsFirst is available on all but MySQL, where it is redefined. # - # source://activerecord//lib/arel/visitors/to_sql.rb#370 + # source://activerecord//lib/arel/visitors/to_sql.rb#369 def visit_Arel_Nodes_NullsFirst(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#375 + # source://activerecord//lib/arel/visitors/to_sql.rb#374 def visit_Arel_Nodes_NullsLast(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#310 def visit_Arel_Nodes_Offset(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#561 + # source://activerecord//lib/arel/visitors/to_sql.rb#560 def visit_Arel_Nodes_On(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#167 def visit_Arel_Nodes_OptimizerHints(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#615 + # source://activerecord//lib/arel/visitors/to_sql.rb#620 def visit_Arel_Nodes_Or(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#536 + # source://activerecord//lib/arel/visitors/to_sql.rb#535 def visit_Arel_Nodes_OuterJoin(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#297 @@ -37608,10 +40293,10 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # @raise [NotImplementedError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#517 + # source://activerecord//lib/arel/visitors/to_sql.rb#516 def visit_Arel_Nodes_Regexp(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#543 + # source://activerecord//lib/arel/visitors/to_sql.rb#542 def visit_Arel_Nodes_RightOuterJoin(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#255 @@ -37629,22 +40314,22 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # source://activerecord//lib/arel/visitors/to_sql.rb#117 def visit_Arel_Nodes_SelectStatement(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#750 + # source://activerecord//lib/arel/visitors/to_sql.rb#769 def visit_Arel_Nodes_SqlLiteral(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#525 + # source://activerecord//lib/arel/visitors/to_sql.rb#524 def visit_Arel_Nodes_StringJoin(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#406 + # source://activerecord//lib/arel/visitors/to_sql.rb#405 def visit_Arel_Nodes_Sum(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#422 + # source://activerecord//lib/arel/visitors/to_sql.rb#421 def visit_Arel_Nodes_TableAlias(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#89 def visit_Arel_Nodes_True(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#784 + # source://activerecord//lib/arel/visitors/to_sql.rb#856 def visit_Arel_Nodes_UnaryOperation(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#205 @@ -37653,7 +40338,7 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # source://activerecord//lib/arel/visitors/to_sql.rb#209 def visit_Arel_Nodes_UnionAll(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#728 + # source://activerecord//lib/arel/visitors/to_sql.rb#733 def visit_Arel_Nodes_UnqualifiedColumn(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#39 @@ -37662,7 +40347,7 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # source://activerecord//lib/arel/visitors/to_sql.rb#97 def visit_Arel_Nodes_ValuesList(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#716 + # source://activerecord//lib/arel/visitors/to_sql.rb#721 def visit_Arel_Nodes_When(o, collector); end # source://activerecord//lib/arel/visitors/to_sql.rb#229 @@ -37674,83 +40359,83 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # source://activerecord//lib/arel/visitors/to_sql.rb#200 def visit_Arel_Nodes_WithRecursive(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#356 + # source://activerecord//lib/arel/visitors/to_sql.rb#355 def visit_Arel_SelectManager(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#571 + # source://activerecord//lib/arel/visitors/to_sql.rb#570 def visit_Arel_Table(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#789 + # source://activerecord//lib/arel/visitors/to_sql.rb#861 def visit_Array(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 + # source://activerecord//lib/arel/visitors/to_sql.rb#831 def visit_BigDecimal(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 + # source://activerecord//lib/arel/visitors/to_sql.rb#831 def visit_Class(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 + # source://activerecord//lib/arel/visitors/to_sql.rb#831 def visit_Date(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 + # source://activerecord//lib/arel/visitors/to_sql.rb#831 def visit_DateTime(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 + # source://activerecord//lib/arel/visitors/to_sql.rb#831 def visit_FalseClass(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 + # source://activerecord//lib/arel/visitors/to_sql.rb#831 def visit_Float(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 + # source://activerecord//lib/arel/visitors/to_sql.rb#831 def visit_Hash(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#755 + # source://activerecord//lib/arel/visitors/to_sql.rb#827 def visit_Integer(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 + # source://activerecord//lib/arel/visitors/to_sql.rb#831 def visit_NilClass(o, collector); end - # source://activerecord//lib/arel/visitors/to_sql.rb#789 + # source://activerecord//lib/arel/visitors/to_sql.rb#861 def visit_Set(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 + # source://activerecord//lib/arel/visitors/to_sql.rb#831 def visit_String(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 + # source://activerecord//lib/arel/visitors/to_sql.rb#831 def visit_Symbol(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 + # source://activerecord//lib/arel/visitors/to_sql.rb#831 def visit_Time(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 + # source://activerecord//lib/arel/visitors/to_sql.rb#831 def visit_TrueClass(o, collector); end end -# source://activerecord//lib/arel/visitors/to_sql.rb#737 +# source://activerecord//lib/arel/visitors/to_sql.rb#756 Arel::Visitors::ToSql::BIND_BLOCK = T.let(T.unsafe(nil), Proc) # source://activerecord//lib/arel/visitors/to_sql.rb#5 diff --git a/sorbet/rbi/gems/activeresource@6.0.0.rbi b/sorbet/rbi/gems/activeresource@6.1.0.rbi similarity index 95% rename from sorbet/rbi/gems/activeresource@6.0.0.rbi rename to sorbet/rbi/gems/activeresource@6.1.0.rbi index 27dd975ed..8ee807238 100644 --- a/sorbet/rbi/gems/activeresource@6.0.0.rbi +++ b/sorbet/rbi/gems/activeresource@6.1.0.rbi @@ -614,10 +614,10 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/base.rb#1318 def ==(other); end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 def __callbacks?; end # source://activeresource//lib/active_resource/base.rb#331 @@ -629,10 +629,10 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/base.rb#331 def _collection_parser?; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 def _create_callbacks; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 def _destroy_callbacks; end # source://activeresource//lib/active_resource/base.rb#330 @@ -644,40 +644,40 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/base.rb#330 def _format?; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 def _run_create_callbacks(&block); end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 def _run_destroy_callbacks(&block); end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 def _run_save_callbacks(&block); end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 def _run_update_callbacks(&block); end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 def _run_validate_callbacks(&block); end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 def _run_validation_callbacks(&block); end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 def _save_callbacks; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 def _update_callbacks; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 def _validate_callbacks; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 def _validation_callbacks; end - # source://activemodel/7.0.4.3/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.4.3/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3/lib/active_model/validations.rb#71 def _validators?; end # source://activeresource//lib/active_resource/base.rb#1184 @@ -812,10 +812,10 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/base.rb#332 def include_format_in_path?; end - # source://activemodel/7.0.4.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 def include_root_in_json; end - # source://activemodel/7.0.4.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 def include_root_in_json?; end # This is a list of known attributes for this resource. Either @@ -856,8 +856,8 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/base.rb#323 def logger; end - # source://activemodel/7.0.4.3/lib/active_model/naming.rb#244 - def model_name(*_arg0, **_arg1, &_arg2); end + # source://activemodel/7.1.3/lib/active_model/naming.rb#255 + def model_name(&block); end # Returns +true+ if this object hasn't yet been saved, otherwise, returns +false+. # @@ -893,6 +893,9 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/base.rb#1265 def new_record?; end + # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + def param_delimiter=(_arg0); end + # Returns +true+ if this object has been saved, otherwise returns +false+. # # ==== Examples @@ -1025,7 +1028,7 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/base.rb#1532 def update_attributes(attributes); end - # source://activemodel/7.0.4.3/lib/active_model/validations.rb#48 + # source://activemodel/7.1.3/lib/active_model/validations.rb#67 def validation_context; end protected @@ -1113,17 +1116,17 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/base.rb#1697 def split_options(options = T.unsafe(nil)); end - # source://activemodel/7.0.4.3/lib/active_model/validations.rb#48 + # source://activemodel/7.1.3/lib/active_model/validations.rb#67 def validation_context=(_arg0); end class << self - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 def __callbacks?; end # source://activeresource//lib/active_resource/threadsafe_attributes.rb#15 @@ -1153,16 +1156,16 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/threadsafe_attributes.rb#23 def _connection_defined?; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 def _create_callbacks; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 def _create_callbacks=(value); end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 def _destroy_callbacks; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 def _destroy_callbacks=(value); end # source://activeresource//lib/active_resource/base.rb#330 @@ -1201,10 +1204,10 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/threadsafe_attributes.rb#23 def _proxy_defined?; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 def _save_callbacks; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 def _save_callbacks=(value); end # source://activeresource//lib/active_resource/threadsafe_attributes.rb#15 @@ -1216,10 +1219,10 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/threadsafe_attributes.rb#23 def _site_defined?; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 def _update_callbacks; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 def _update_callbacks=(value); end # source://activeresource//lib/active_resource/threadsafe_attributes.rb#15 @@ -1231,37 +1234,37 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/threadsafe_attributes.rb#23 def _user_defined?; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 def _validate_callbacks; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 def _validate_callbacks=(value); end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 def _validation_callbacks; end - # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 def _validation_callbacks=(value); end - # source://activemodel/7.0.4.3/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.4.3/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3/lib/active_model/validations.rb#71 def _validators=(value); end - # source://activemodel/7.0.4.3/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3/lib/active_model/validations.rb#71 def _validators?; end - # source://activemodel/7.0.4.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 def after_create(*args, **options, &block); end - # source://activemodel/7.0.4.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 def after_destroy(*args, **options, &block); end - # source://activemodel/7.0.4.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 def after_save(*args, **options, &block); end - # source://activemodel/7.0.4.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 def after_update(*args, **options, &block); end # This is an alias for find(:all). You can pass in all the same @@ -1270,16 +1273,16 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/base.rb#1039 def all(*args); end - # source://activemodel/7.0.4.3/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3/lib/active_model/callbacks.rb#137 def around_create(*args, **options, &block); end - # source://activemodel/7.0.4.3/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3/lib/active_model/callbacks.rb#137 def around_destroy(*args, **options, &block); end - # source://activemodel/7.0.4.3/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3/lib/active_model/callbacks.rb#137 def around_save(*args, **options, &block); end - # source://activemodel/7.0.4.3/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3/lib/active_model/callbacks.rb#137 def around_update(*args, **options, &block); end # source://activeresource//lib/active_resource/base.rb#562 @@ -1298,16 +1301,16 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/base.rb#557 def bearer_token=(bearer_token); end - # source://activemodel/7.0.4.3/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3/lib/active_model/callbacks.rb#130 def before_create(*args, **options, &block); end - # source://activemodel/7.0.4.3/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3/lib/active_model/callbacks.rb#130 def before_destroy(*args, **options, &block); end - # source://activemodel/7.0.4.3/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3/lib/active_model/callbacks.rb#130 def before_save(*args, **options, &block); end - # source://activemodel/7.0.4.3/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3/lib/active_model/callbacks.rb#130 def before_update(*args, **options, &block); end # Builds a new, unsaved record using the default values from the remote server so @@ -1623,13 +1626,13 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/base.rb#332 def include_format_in_path?; end - # source://activemodel/7.0.4.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 def include_root_in_json; end - # source://activemodel/7.0.4.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 def include_root_in_json=(value); end - # source://activemodel/7.0.4.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 def include_root_in_json?; end # Returns the list of known attributes for this resource, gathered @@ -1689,6 +1692,15 @@ class ActiveResource::Base # source://activeresource//lib/active_resource/base.rb#1063 def orig_delete(id, options = T.unsafe(nil)); end + # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + def param_delimiter; end + + # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + def param_delimiter=(value); end + + # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + def param_delimiter?; end + # Gets the \password for REST HTTP authentication. # # source://activeresource//lib/active_resource/base.rb#531 @@ -2753,13 +2765,13 @@ class ActiveResource::Connection # Creates new Net::HTTP instance for communication with the # remote service and resources. # - # source://activeresource//lib/active_resource/http_mock.rb#349 + # source://activeresource//lib/active_resource/http_mock.rb#364 def http; end # source://activeresource//lib/active_resource/connection.rb#287 def http_format_header(http_method); end - # source://activeresource//lib/active_resource/http_mock.rb#358 + # source://activeresource//lib/active_resource/http_mock.rb#373 def http_stub; end # source://activeresource//lib/active_resource/connection.rb#291 @@ -2776,10 +2788,10 @@ class ActiveResource::Connection # source://activeresource//lib/active_resource/connection.rb#217 def response_auth_header; end - # source://activeresource//lib/active_resource/http_mock.rb#366 + # source://activeresource//lib/active_resource/http_mock.rb#381 def stub_http?; end - # source://activeresource//lib/active_resource/http_mock.rb#362 + # source://activeresource//lib/active_resource/http_mock.rb#377 def unstub_http?; end # source://activeresource//lib/active_resource/connection.rb#221 @@ -3016,25 +3028,25 @@ class ActiveResource::HttpMock def initialize(site); end # source://activeresource//lib/active_resource/http_mock.rb#257 - def delete(path, headers); end + def delete(path, headers, options = T.unsafe(nil)); end # source://activeresource//lib/active_resource/http_mock.rb#257 - def get(path, headers); end + def get(path, headers, options = T.unsafe(nil)); end # source://activeresource//lib/active_resource/http_mock.rb#257 - def head(path, headers); end + def head(path, headers, options = T.unsafe(nil)); end # source://activeresource//lib/active_resource/http_mock.rb#274 def inspect_responses; end # source://activeresource//lib/active_resource/http_mock.rb#257 - def patch(path, body, headers); end + def patch(path, body, headers, options = T.unsafe(nil)); end # source://activeresource//lib/active_resource/http_mock.rb#257 - def post(path, body, headers); end + def post(path, body, headers, options = T.unsafe(nil)); end # source://activeresource//lib/active_resource/http_mock.rb#257 - def put(path, body, headers); end + def put(path, body, headers, options = T.unsafe(nil)); end class << self # source://activeresource//lib/active_resource/http_mock.rb#205 @@ -3190,22 +3202,22 @@ class ActiveResource::HttpMock::Responder def initialize(responses); end # source://activeresource//lib/active_resource/http_mock.rb#65 - def delete(path, request_headers = T.unsafe(nil), body = T.unsafe(nil), status = T.unsafe(nil), response_headers = T.unsafe(nil)); end + def delete(path, request_headers = T.unsafe(nil), body = T.unsafe(nil), status = T.unsafe(nil), response_headers = T.unsafe(nil), options = T.unsafe(nil)); end # source://activeresource//lib/active_resource/http_mock.rb#65 - def get(path, request_headers = T.unsafe(nil), body = T.unsafe(nil), status = T.unsafe(nil), response_headers = T.unsafe(nil)); end + def get(path, request_headers = T.unsafe(nil), body = T.unsafe(nil), status = T.unsafe(nil), response_headers = T.unsafe(nil), options = T.unsafe(nil)); end # source://activeresource//lib/active_resource/http_mock.rb#65 - def head(path, request_headers = T.unsafe(nil), body = T.unsafe(nil), status = T.unsafe(nil), response_headers = T.unsafe(nil)); end + def head(path, request_headers = T.unsafe(nil), body = T.unsafe(nil), status = T.unsafe(nil), response_headers = T.unsafe(nil), options = T.unsafe(nil)); end # source://activeresource//lib/active_resource/http_mock.rb#65 - def patch(path, request_headers = T.unsafe(nil), body = T.unsafe(nil), status = T.unsafe(nil), response_headers = T.unsafe(nil)); end + def patch(path, request_headers = T.unsafe(nil), body = T.unsafe(nil), status = T.unsafe(nil), response_headers = T.unsafe(nil), options = T.unsafe(nil)); end # source://activeresource//lib/active_resource/http_mock.rb#65 - def post(path, request_headers = T.unsafe(nil), body = T.unsafe(nil), status = T.unsafe(nil), response_headers = T.unsafe(nil)); end + def post(path, request_headers = T.unsafe(nil), body = T.unsafe(nil), status = T.unsafe(nil), response_headers = T.unsafe(nil), options = T.unsafe(nil)); end # source://activeresource//lib/active_resource/http_mock.rb#65 - def put(path, request_headers = T.unsafe(nil), body = T.unsafe(nil), status = T.unsafe(nil), response_headers = T.unsafe(nil)); end + def put(path, request_headers = T.unsafe(nil), body = T.unsafe(nil), status = T.unsafe(nil), response_headers = T.unsafe(nil), options = T.unsafe(nil)); end private @@ -3222,6 +3234,23 @@ class ActiveResource::InheritingHash < ::Hash # source://activeresource//lib/active_resource/inheriting_hash.rb#11 def [](key); end + + # source://activeresource//lib/active_resource/inheriting_hash.rb#26 + def inspect; end + + # So we can see the merged object in IRB or the Rails console + # + # source://activeresource//lib/active_resource/inheriting_hash.rb#22 + def pretty_print(pp); end + + # Merges the flattened parent hash (if it's an InheritingHash) + # with ourself + # + # source://activeresource//lib/active_resource/inheriting_hash.rb#17 + def to_hash; end + + # source://activeresource//lib/active_resource/inheriting_hash.rb#30 + def to_s; end end # source://activeresource//lib/active_resource/http_mock.rb#7 @@ -3357,7 +3386,7 @@ class ActiveResource::Request # @return [Request] a new instance of Request # # source://activeresource//lib/active_resource/http_mock.rb#282 - def initialize(method, path, body = T.unsafe(nil), headers = T.unsafe(nil)); end + def initialize(method, path, body = T.unsafe(nil), headers = T.unsafe(nil), options = T.unsafe(nil)); end # source://activeresource//lib/active_resource/http_mock.rb#286 def ==(req); end @@ -3410,6 +3439,13 @@ class ActiveResource::Request # source://activeresource//lib/active_resource/http_mock.rb#280 def path=(_arg0); end + # Removes query parameters from the path. + # + # @return [String] the path without query parameters + # + # source://activeresource//lib/active_resource/http_mock.rb#297 + def remove_query_params_from_path; end + # source://activeresource//lib/active_resource/http_mock.rb#290 def to_s; end @@ -3417,8 +3453,13 @@ class ActiveResource::Request # @return [Boolean] # - # source://activeresource//lib/active_resource/http_mock.rb#295 + # source://activeresource//lib/active_resource/http_mock.rb#310 def headers_match?(req); end + + # @return [Boolean] + # + # source://activeresource//lib/active_resource/http_mock.rb#302 + def same_path?(req); end end # 409 Conflict @@ -3439,71 +3480,71 @@ class ActiveResource::ResourceInvalid < ::ActiveResource::ClientError; end # source://activeresource//lib/active_resource/exceptions.rb#65 class ActiveResource::ResourceNotFound < ::ActiveResource::ClientError; end -# source://activeresource//lib/active_resource/http_mock.rb#306 +# source://activeresource//lib/active_resource/http_mock.rb#321 class ActiveResource::Response # @return [Response] a new instance of Response # - # source://activeresource//lib/active_resource/http_mock.rb#309 + # source://activeresource//lib/active_resource/http_mock.rb#324 def initialize(body, message = T.unsafe(nil), headers = T.unsafe(nil)); end # Returns true if the other is a Response with an equal body, equal message # and equal headers. Otherwise it returns false. # - # source://activeresource//lib/active_resource/http_mock.rb#337 + # source://activeresource//lib/active_resource/http_mock.rb#352 def ==(other); end - # source://activeresource//lib/active_resource/http_mock.rb#327 + # source://activeresource//lib/active_resource/http_mock.rb#342 def [](key); end - # source://activeresource//lib/active_resource/http_mock.rb#331 + # source://activeresource//lib/active_resource/http_mock.rb#346 def []=(key, value); end # Returns the value of attribute body. # - # source://activeresource//lib/active_resource/http_mock.rb#307 + # source://activeresource//lib/active_resource/http_mock.rb#322 def body; end # Sets the attribute body # # @param value the value to set the attribute body to. # - # source://activeresource//lib/active_resource/http_mock.rb#307 + # source://activeresource//lib/active_resource/http_mock.rb#322 def body=(_arg0); end # Returns the value of attribute code. # - # source://activeresource//lib/active_resource/http_mock.rb#307 + # source://activeresource//lib/active_resource/http_mock.rb#322 def code; end # Sets the attribute code # # @param value the value to set the attribute code to. # - # source://activeresource//lib/active_resource/http_mock.rb#307 + # source://activeresource//lib/active_resource/http_mock.rb#322 def code=(_arg0); end # Returns the value of attribute headers. # - # source://activeresource//lib/active_resource/http_mock.rb#307 + # source://activeresource//lib/active_resource/http_mock.rb#322 def headers; end # Sets the attribute headers # # @param value the value to set the attribute headers to. # - # source://activeresource//lib/active_resource/http_mock.rb#307 + # source://activeresource//lib/active_resource/http_mock.rb#322 def headers=(_arg0); end # Returns the value of attribute message. # - # source://activeresource//lib/active_resource/http_mock.rb#307 + # source://activeresource//lib/active_resource/http_mock.rb#322 def message; end # Sets the attribute message # # @param value the value to set the attribute message to. # - # source://activeresource//lib/active_resource/http_mock.rb#307 + # source://activeresource//lib/active_resource/http_mock.rb#322 def message=(_arg0); end # Returns true if code is 2xx, @@ -3511,7 +3552,7 @@ class ActiveResource::Response # # @return [Boolean] # - # source://activeresource//lib/active_resource/http_mock.rb#323 + # source://activeresource//lib/active_resource/http_mock.rb#338 def success?; end end @@ -3824,7 +3865,7 @@ module ActiveResource::Validations # @return [Boolean] # # source://activeresource//lib/active_resource/validations.rb#163 - def valid?; end + def valid?(context = T.unsafe(nil)); end module GeneratedClassMethods def __callbacks; end diff --git a/sorbet/rbi/gems/activestorage@7.0.6.rbi b/sorbet/rbi/gems/activestorage@7.1.3.2.rbi similarity index 62% rename from sorbet/rbi/gems/activestorage@7.0.6.rbi rename to sorbet/rbi/gems/activestorage@7.1.3.2.rbi index f096077d3..7c49b8161 100644 --- a/sorbet/rbi/gems/activestorage@7.0.6.rbi +++ b/sorbet/rbi/gems/activestorage@7.1.3.2.rbi @@ -5,104 +5,105 @@ # 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.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _before_commit_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _commit_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _create_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _destroy_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _find_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _initialize_callbacks; end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#11 def _reflections; end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#11 def _reflections?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _rollback_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_before_commit_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_commit_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_create_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_destroy_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_find_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_initialize_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_rollback_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_save_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_touch_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_update_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_validate_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_validation_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _save_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _touch_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _update_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _validate_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _validation_callbacks; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators?; end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#12 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#12 def aggregate_reflections; end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#12 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#12 def aggregate_reflections?; end # source://activestorage//lib/active_storage/reflection.rb#53 @@ -111,364 +112,397 @@ class ActiveRecord::Base # source://activestorage//lib/active_storage/reflection.rb#53 def attachment_reflections?; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#72 def attribute_aliases; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#72 def attribute_aliases?; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#73 - def attribute_method_matchers; end + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#73 + def attribute_method_patterns; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#73 - def attribute_method_matchers?; end + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#73 + def attribute_method_patterns?; end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#13 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#13 def automatic_scope_inversing; end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#13 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#13 def automatic_scope_inversing?; end - # source://activerecord/7.0.6/lib/active_record/integration.rb#16 + # source://activerecord/7.1.3.2/lib/active_record/integration.rb#16 def cache_timestamp_format; end - # source://activerecord/7.0.6/lib/active_record/integration.rb#16 + # source://activerecord/7.1.3.2/lib/active_record/integration.rb#16 def cache_timestamp_format?; end - # source://activerecord/7.0.6/lib/active_record/integration.rb#24 + # source://activerecord/7.1.3.2/lib/active_record/integration.rb#24 def cache_versioning; end - # source://activerecord/7.0.6/lib/active_record/integration.rb#24 + # source://activerecord/7.1.3.2/lib/active_record/integration.rb#24 def cache_versioning?; end - # source://activerecord/7.0.6/lib/active_record/integration.rb#32 + # source://activerecord/7.1.3.2/lib/active_record/integration.rb#32 def collection_cache_versioning; end - # source://activerecord/7.0.6/lib/active_record/integration.rb#32 + # source://activerecord/7.1.3.2/lib/active_record/integration.rb#32 def collection_cache_versioning?; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#171 - def column_for_attribute(*_arg0, **_arg1, &_arg2); end + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#178 + def column_for_attribute(name, &block); end - # source://activerecord/7.0.6/lib/active_record/core.rb#74 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#97 def default_connection_handler; end - # source://activerecord/7.0.6/lib/active_record/core.rb#74 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#97 def default_connection_handler?; end - # source://activerecord/7.0.6/lib/active_record/core.rb#76 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#99 def default_role; end - # source://activerecord/7.0.6/lib/active_record/core.rb#76 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#99 def default_role?; end - # source://activerecord/7.0.6/lib/active_record/scoping/default.rb#20 + # source://activerecord/7.1.3.2/lib/active_record/scoping/default.rb#20 def default_scope_override; end - # source://activerecord/7.0.6/lib/active_record/scoping/default.rb#19 + # source://activerecord/7.1.3.2/lib/active_record/scoping/default.rb#19 def default_scopes; end - # source://activerecord/7.0.6/lib/active_record/core.rb#78 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#101 def default_shard; end - # source://activerecord/7.0.6/lib/active_record/core.rb#78 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#101 def default_shard?; end - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 + # source://activerecord/7.1.3.2/lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 + # source://activerecord/7.1.3.2/lib/active_record/enum.rb#167 def defined_enums?; end - # source://activerecord/7.0.6/lib/active_record/core.rb#26 - def destroy_association_async_job; end + # source://activerecord/7.1.3.2/lib/active_record/core.rb#47 + def destroy_association_async_batch_size; end - # source://activerecord/7.0.6/lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#37 + def destroy_association_async_job(&block); end + + # source://activerecord/7.1.3.2/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes; end - # source://activerecord/7.0.6/lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes=(_arg0); end - # source://activerecord/7.0.6/lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes?; end - # source://activemodel/7.0.6/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.2/lib/active_model/serializers/json.rb#15 def include_root_in_json; end - # source://activemodel/7.0.6/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.2/lib/active_model/serializers/json.rb#15 def include_root_in_json?; end - # source://activerecord/7.0.6/lib/active_record/locking/optimistic.rb#56 + # source://activerecord/7.1.3.2/lib/active_record/locking/optimistic.rb#56 def lock_optimistically; end - # source://activerecord/7.0.6/lib/active_record/locking/optimistic.rb#56 + # source://activerecord/7.1.3.2/lib/active_record/locking/optimistic.rb#56 def lock_optimistically?; end - # source://activerecord/7.0.6/lib/active_record/core.rb#20 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#22 def logger; end - # source://activerecord/7.0.6/lib/active_record/core.rb#20 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#22 def logger?; end - # source://activemodel/7.0.6/lib/active_model/naming.rb#244 - def model_name(*_arg0, **_arg1, &_arg2); end + # source://activemodel/7.1.3.2/lib/active_model/naming.rb#255 + def model_name(&block); end - # source://activerecord/7.0.6/lib/active_record/nested_attributes.rb#15 + # source://activerecord/7.1.3.2/lib/active_record/nested_attributes.rb#15 def nested_attributes_options; end - # source://activerecord/7.0.6/lib/active_record/nested_attributes.rb#15 + # source://activerecord/7.1.3.2/lib/active_record/nested_attributes.rb#15 def nested_attributes_options?; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#18 + # source://activerecord/7.1.3.2/lib/active_record/normalization.rb#8 + def normalized_attributes; end + + # source://activerecord/7.1.3.2/lib/active_record/normalization.rb#8 + def normalized_attributes=(_arg0); end + + # source://activerecord/7.1.3.2/lib/active_record/normalization.rb#8 + def normalized_attributes?; end + + # source://activemodel/7.1.3.2/lib/active_model/conversion.rb#32 + def param_delimiter=(_arg0); end + + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#18 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts?; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#17 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/dirty.rb#49 def partial_updates; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#17 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/dirty.rb#49 def partial_updates?; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#156 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#163 def pluralize_table_names; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#156 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#163 def pluralize_table_names?; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#151 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#158 def primary_key_prefix_type; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#151 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#158 def primary_key_prefix_type?; end - # source://activerecord/7.0.6/lib/active_record/timestamp.rb#47 + # source://activerecord/7.1.3.2/lib/active_record/timestamp.rb#47 def record_timestamps; end - # source://activerecord/7.0.6/lib/active_record/timestamp.rb#47 + # source://activerecord/7.1.3.2/lib/active_record/timestamp.rb#47 def record_timestamps=(_arg0); end - # source://activerecord/7.0.6/lib/active_record/timestamp.rb#47 + # source://activerecord/7.1.3.2/lib/active_record/timestamp.rb#47 def record_timestamps?; end - # source://activerecord/7.0.6/lib/active_record/signed_id.rb#13 + # source://activerecord/7.1.3.2/lib/active_record/signed_id.rb#13 def signed_id_verifier_secret; end - # source://activerecord/7.0.6/lib/active_record/signed_id.rb#13 + # source://activerecord/7.1.3.2/lib/active_record/signed_id.rb#13 def signed_id_verifier_secret?; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/time_zone_conversion.rb#67 def skip_time_zone_conversion_for_attributes; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/time_zone_conversion.rb#67 def skip_time_zone_conversion_for_attributes?; end - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#42 + # source://activerecord/7.1.3.2/lib/active_record/inheritance.rb#43 def store_full_class_name; end - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#42 + # source://activerecord/7.1.3.2/lib/active_record/inheritance.rb#43 def store_full_class_name?; end - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#46 + # source://activerecord/7.1.3.2/lib/active_record/inheritance.rb#47 def store_full_sti_class; end - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#46 + # source://activerecord/7.1.3.2/lib/active_record/inheritance.rb#47 def store_full_sti_class?; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#152 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#159 def table_name_prefix; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#152 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#159 def table_name_prefix?; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#153 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#160 def table_name_suffix; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#153 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#160 def table_name_suffix?; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/time_zone_conversion.rb#66 def time_zone_aware_attributes; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/time_zone_conversion.rb#66 def time_zone_aware_attributes?; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/time_zone_conversion.rb#68 def time_zone_aware_types; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/time_zone_conversion.rb#68 def time_zone_aware_types?; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#171 - def type_for_attribute(*_arg0, **_arg1, &_arg2); end + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#178 + def type_for_attribute(attr_name, &block); end - # source://activemodel/7.0.6/lib/active_model/validations.rb#48 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#67 def validation_context; end private - # source://activemodel/7.0.6/lib/active_model/validations.rb#48 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#67 def validation_context=(_arg0); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activerecord/7.0.6/lib/active_record/readonly_attributes.rb#8 + # source://activerecord/7.1.3.2/lib/active_record/readonly_attributes.rb#11 def _attr_readonly; end - # source://activerecord/7.0.6/lib/active_record/readonly_attributes.rb#8 + # source://activerecord/7.1.3.2/lib/active_record/readonly_attributes.rb#11 def _attr_readonly=(value); end - # source://activerecord/7.0.6/lib/active_record/readonly_attributes.rb#8 + # source://activerecord/7.1.3.2/lib/active_record/readonly_attributes.rb#11 def _attr_readonly?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _before_commit_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _before_commit_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _commit_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _commit_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activerecord/7.1.3.2/lib/active_record/counter_cache.rb#9 + def _counter_cache_columns; end + + # source://activerecord/7.1.3.2/lib/active_record/counter_cache.rb#9 + def _counter_cache_columns=(value); end + + # source://activerecord/7.1.3.2/lib/active_record/counter_cache.rb#9 + def _counter_cache_columns?; end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _create_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _create_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#24 + def _destroy_association_async_job; end + + # source://activerecord/7.1.3.2/lib/active_record/core.rb#24 + def _destroy_association_async_job=(value); end + + # source://activerecord/7.1.3.2/lib/active_record/core.rb#24 + def _destroy_association_async_job?; end + + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _destroy_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _destroy_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _find_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _find_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _initialize_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _initialize_callbacks=(value); end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#11 def _reflections; end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#11 def _reflections=(value); end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#11 def _reflections?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _rollback_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _rollback_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _save_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _save_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _touch_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _touch_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _update_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _update_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _validate_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _validate_callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _validation_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _validation_callbacks=(value); end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators=(value); end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators?; end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#144 def after_create(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#144 def after_destroy(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#144 def after_find(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#144 def after_initialize(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#144 def after_save(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#144 def after_touch(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#144 def after_update(*args, **options, &block); end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#12 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#12 def aggregate_reflections; end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#12 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#12 def aggregate_reflections=(value); end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#12 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#12 def aggregate_reflections?; end - # source://activerecord/7.0.6/lib/active_record/core.rb#82 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#105 def application_record_class?; end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#137 def around_create(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#137 def around_destroy(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#137 def around_save(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#137 def around_update(*args, **options, &block); end - # source://activerecord/7.0.6/lib/active_record/core.rb#129 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#125 def asynchronous_queries_session; end - # source://activerecord/7.0.6/lib/active_record/core.rb#133 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#129 def asynchronous_queries_tracker; end # source://activestorage//lib/active_storage/reflection.rb#53 @@ -480,749 +514,791 @@ class ActiveRecord::Base # source://activestorage//lib/active_storage/reflection.rb#53 def attachment_reflections?; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#72 def attribute_aliases; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#72 def attribute_aliases=(value); end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#72 def attribute_aliases?; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#73 - def attribute_method_matchers; end + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#73 + def attribute_method_patterns; end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#73 - def attribute_method_matchers=(value); end + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#73 + def attribute_method_patterns=(value); end - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#73 - def attribute_method_matchers?; end + # source://activemodel/7.1.3.2/lib/active_model/attribute_methods.rb#73 + def attribute_method_patterns?; end - # source://activerecord/7.0.6/lib/active_record/attributes.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/attributes.rb#11 def attributes_to_define_after_schema_loads; end - # source://activerecord/7.0.6/lib/active_record/attributes.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/attributes.rb#11 def attributes_to_define_after_schema_loads=(value); end - # source://activerecord/7.0.6/lib/active_record/attributes.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/attributes.rb#11 def attributes_to_define_after_schema_loads?; end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#13 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#13 def automatic_scope_inversing; end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#13 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#13 def automatic_scope_inversing=(value); end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#13 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#13 def automatic_scope_inversing?; end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#130 def before_create(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#130 def before_destroy(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#130 def before_save(*args, **options, &block); end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.2/lib/active_model/callbacks.rb#130 def before_update(*args, **options, &block); end - # source://activerecord/7.0.6/lib/active_record/core.rb#68 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#89 def belongs_to_required_by_default; end - # source://activerecord/7.0.6/lib/active_record/core.rb#68 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#89 def belongs_to_required_by_default=(value); end - # source://activerecord/7.0.6/lib/active_record/core.rb#68 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#89 def belongs_to_required_by_default?; end - # source://activerecord/7.0.6/lib/active_record/integration.rb#16 + # source://activerecord/7.1.3.2/lib/active_record/integration.rb#16 def cache_timestamp_format; end - # source://activerecord/7.0.6/lib/active_record/integration.rb#16 + # source://activerecord/7.1.3.2/lib/active_record/integration.rb#16 def cache_timestamp_format=(value); end - # source://activerecord/7.0.6/lib/active_record/integration.rb#16 + # source://activerecord/7.1.3.2/lib/active_record/integration.rb#16 def cache_timestamp_format?; end - # source://activerecord/7.0.6/lib/active_record/integration.rb#24 + # source://activerecord/7.1.3.2/lib/active_record/integration.rb#24 def cache_versioning; end - # source://activerecord/7.0.6/lib/active_record/integration.rb#24 + # source://activerecord/7.1.3.2/lib/active_record/integration.rb#24 def cache_versioning=(value); end - # source://activerecord/7.0.6/lib/active_record/integration.rb#24 + # source://activerecord/7.1.3.2/lib/active_record/integration.rb#24 def cache_versioning?; end - # source://activerecord/7.0.6/lib/active_record/integration.rb#32 + # source://activerecord/7.1.3.2/lib/active_record/integration.rb#32 def collection_cache_versioning; end - # source://activerecord/7.0.6/lib/active_record/integration.rb#32 + # source://activerecord/7.1.3.2/lib/active_record/integration.rb#32 def collection_cache_versioning=(value); end - # source://activerecord/7.0.6/lib/active_record/integration.rb#32 + # source://activerecord/7.1.3.2/lib/active_record/integration.rb#32 def collection_cache_versioning?; end - # source://activerecord/7.0.6/lib/active_record/core.rb#56 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#77 def configurations; end - # source://activerecord/7.0.6/lib/active_record/core.rb#50 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#71 def configurations=(config); end - # source://activerecord/7.0.6/lib/active_record/core.rb#201 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#189 def connected_to_stack; end - # source://activerecord/7.0.6/lib/active_record/core.rb#215 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#203 def connection_class; end - # source://activerecord/7.0.6/lib/active_record/core.rb#211 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#199 def connection_class=(b); end - # source://activerecord/7.0.6/lib/active_record/core.rb#219 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#207 def connection_class?; end - # source://activerecord/7.0.6/lib/active_record/core.rb#223 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#211 def connection_class_for_self; end - # source://activerecord/7.0.6/lib/active_record/core.rb#94 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#117 def connection_handler; end - # source://activerecord/7.0.6/lib/active_record/core.rb#98 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#121 def connection_handler=(handler); end - # source://activerecord/7.0.6/lib/active_record/core.rb#102 - def connection_handlers; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#111 - def connection_handlers=(handlers); end - - # source://activerecord/7.0.6/lib/active_record/core.rb#188 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#180 def current_preventing_writes; end - # source://activerecord/7.0.6/lib/active_record/core.rb#147 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#143 def current_role; end - # source://activerecord/7.0.6/lib/active_record/core.rb#169 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#161 def current_shard; end - # source://activerecord/7.0.6/lib/active_record/core.rb#74 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/serialization.rb#20 + def default_column_serializer; end + + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/serialization.rb#20 + def default_column_serializer=(value); end + + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/serialization.rb#20 + def default_column_serializer?; end + + # source://activerecord/7.1.3.2/lib/active_record/core.rb#97 def default_connection_handler; end - # source://activerecord/7.0.6/lib/active_record/core.rb#74 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#97 def default_connection_handler=(value); end - # source://activerecord/7.0.6/lib/active_record/core.rb#74 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#97 def default_connection_handler?; end - # source://activerecord/7.0.6/lib/active_record/core.rb#76 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#99 def default_role; end - # source://activerecord/7.0.6/lib/active_record/core.rb#76 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#99 def default_role=(value); end - # source://activerecord/7.0.6/lib/active_record/core.rb#76 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#99 def default_role?; end - # source://activerecord/7.0.6/lib/active_record/scoping/default.rb#20 + # source://activerecord/7.1.3.2/lib/active_record/scoping/default.rb#20 def default_scope_override; end - # source://activerecord/7.0.6/lib/active_record/scoping/default.rb#20 + # source://activerecord/7.1.3.2/lib/active_record/scoping/default.rb#20 def default_scope_override=(value); end - # source://activerecord/7.0.6/lib/active_record/scoping/default.rb#19 + # source://activerecord/7.1.3.2/lib/active_record/scoping/default.rb#19 def default_scopes; end - # source://activerecord/7.0.6/lib/active_record/scoping/default.rb#19 + # source://activerecord/7.1.3.2/lib/active_record/scoping/default.rb#19 def default_scopes=(value); end - # source://activerecord/7.0.6/lib/active_record/core.rb#78 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#101 def default_shard; end - # source://activerecord/7.0.6/lib/active_record/core.rb#78 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#101 def default_shard=(value); end - # source://activerecord/7.0.6/lib/active_record/core.rb#78 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#101 def default_shard?; end - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 + # source://activerecord/7.1.3.2/lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 + # source://activerecord/7.1.3.2/lib/active_record/enum.rb#167 def defined_enums=(value); end - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 + # source://activerecord/7.1.3.2/lib/active_record/enum.rb#167 def defined_enums?; end - # source://activerecord/7.0.6/lib/active_record/core.rb#26 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#47 + def destroy_association_async_batch_size; end + + # source://activerecord/7.1.3.2/lib/active_record/core.rb#47 + def destroy_association_async_batch_size=(value); end + + # source://activerecord/7.1.3.2/lib/active_record/core.rb#27 def destroy_association_async_job; end - # source://activerecord/7.0.6/lib/active_record/core.rb#26 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#24 def destroy_association_async_job=(value); end - # source://activerecord/7.0.6/lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes; end - # source://activerecord/7.0.6/lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes=(value); end - # source://activerecord/7.0.6/lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes?; end - # source://activerecord/7.0.6/lib/active_record/core.rb#66 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#87 def enumerate_columns_in_select_statements; end - # source://activerecord/7.0.6/lib/active_record/core.rb#66 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#87 def enumerate_columns_in_select_statements=(value); end - # source://activerecord/7.0.6/lib/active_record/core.rb#66 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#87 def enumerate_columns_in_select_statements?; end - # source://activerecord/7.0.6/lib/active_record/core.rb#72 + # source://activerecord/7.1.3.2/lib/active_record/token_for.rb#11 + def generated_token_verifier; end + + # source://activerecord/7.1.3.2/lib/active_record/token_for.rb#11 + def generated_token_verifier=(value); end + + # source://activerecord/7.1.3.2/lib/active_record/core.rb#93 def has_many_inversing; end - # source://activerecord/7.0.6/lib/active_record/core.rb#72 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#93 def has_many_inversing=(value); end - # source://activerecord/7.0.6/lib/active_record/core.rb#72 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#93 def has_many_inversing?; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#158 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#165 def immutable_strings_by_default; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#158 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#165 def immutable_strings_by_default=(value); end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#158 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#165 def immutable_strings_by_default?; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#157 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#164 def implicit_order_column; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#157 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#164 def implicit_order_column=(value); end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#157 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#164 def implicit_order_column?; end - # source://activemodel/7.0.6/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.2/lib/active_model/serializers/json.rb#15 def include_root_in_json; end - # source://activemodel/7.0.6/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.2/lib/active_model/serializers/json.rb#15 def include_root_in_json=(value); end - # source://activemodel/7.0.6/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.2/lib/active_model/serializers/json.rb#15 def include_root_in_json?; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#167 def inheritance_column; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#311 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#321 def inheritance_column=(value); end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#167 def inheritance_column?; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#155 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#162 def internal_metadata_table_name; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#155 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#162 def internal_metadata_table_name=(value); end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#155 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#162 def internal_metadata_table_name?; end - # source://activerecord/7.0.6/lib/active_record/store.rb#99 + # source://activerecord/7.1.3.2/lib/active_record/store.rb#101 def local_stored_attributes; end - # source://activerecord/7.0.6/lib/active_record/store.rb#99 + # source://activerecord/7.1.3.2/lib/active_record/store.rb#101 def local_stored_attributes=(_arg0); end - # source://activerecord/7.0.6/lib/active_record/locking/optimistic.rb#56 + # source://activerecord/7.1.3.2/lib/active_record/locking/optimistic.rb#56 def lock_optimistically; end - # source://activerecord/7.0.6/lib/active_record/locking/optimistic.rb#56 + # source://activerecord/7.1.3.2/lib/active_record/locking/optimistic.rb#56 def lock_optimistically=(value); end - # source://activerecord/7.0.6/lib/active_record/locking/optimistic.rb#56 + # source://activerecord/7.1.3.2/lib/active_record/locking/optimistic.rb#56 def lock_optimistically?; end - # source://activerecord/7.0.6/lib/active_record/core.rb#20 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#22 def logger; end - # source://activerecord/7.0.6/lib/active_record/core.rb#20 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#22 def logger=(value); end - # source://activerecord/7.0.6/lib/active_record/core.rb#20 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#22 def logger?; end - # source://activerecord/7.0.6/lib/active_record/nested_attributes.rb#15 + # source://activerecord/7.1.3.2/lib/active_record/nested_attributes.rb#15 def nested_attributes_options; end - # source://activerecord/7.0.6/lib/active_record/nested_attributes.rb#15 + # source://activerecord/7.1.3.2/lib/active_record/nested_attributes.rb#15 def nested_attributes_options=(value); end - # source://activerecord/7.0.6/lib/active_record/nested_attributes.rb#15 + # source://activerecord/7.1.3.2/lib/active_record/nested_attributes.rb#15 def nested_attributes_options?; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#18 + # source://activerecord/7.1.3.2/lib/active_record/normalization.rb#8 + def normalized_attributes; end + + # source://activerecord/7.1.3.2/lib/active_record/normalization.rb#8 + def normalized_attributes=(value); end + + # source://activerecord/7.1.3.2/lib/active_record/normalization.rb#8 + def normalized_attributes?; end + + # source://activemodel/7.1.3.2/lib/active_model/conversion.rb#32 + def param_delimiter; end + + # source://activemodel/7.1.3.2/lib/active_model/conversion.rb#32 + def param_delimiter=(value); end + + # source://activemodel/7.1.3.2/lib/active_model/conversion.rb#32 + def param_delimiter?; end + + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#18 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts=(value); end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#18 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts?; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#17 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/dirty.rb#49 def partial_updates; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#17 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/dirty.rb#49 def partial_updates=(value); end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#17 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/dirty.rb#49 def partial_updates?; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#156 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#163 def pluralize_table_names; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#156 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#163 def pluralize_table_names=(value); end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#156 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#163 def pluralize_table_names?; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#151 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#158 def primary_key_prefix_type; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#151 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#158 def primary_key_prefix_type=(value); end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#151 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#158 def primary_key_prefix_type?; end - # source://activerecord/7.0.6/lib/active_record/timestamp.rb#47 + # source://activerecord/7.1.3.2/lib/active_record/timestamp.rb#47 def record_timestamps; end - # source://activerecord/7.0.6/lib/active_record/timestamp.rb#47 + # source://activerecord/7.1.3.2/lib/active_record/timestamp.rb#47 def record_timestamps=(value); end - # source://activerecord/7.0.6/lib/active_record/timestamp.rb#47 + # source://activerecord/7.1.3.2/lib/active_record/timestamp.rb#47 def record_timestamps?; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#154 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#95 + def run_commit_callbacks_on_first_saved_instances_in_transaction; end + + # source://activerecord/7.1.3.2/lib/active_record/core.rb#95 + def run_commit_callbacks_on_first_saved_instances_in_transaction=(value); end + + # source://activerecord/7.1.3.2/lib/active_record/core.rb#95 + def run_commit_callbacks_on_first_saved_instances_in_transaction?; end + + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#161 def schema_migrations_table_name; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#154 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#161 def schema_migrations_table_name=(value); end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#154 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#161 def schema_migrations_table_name?; end - # source://activerecord/7.0.6/lib/active_record/core.rb#80 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#103 def shard_selector; end - # source://activerecord/7.0.6/lib/active_record/core.rb#80 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#103 def shard_selector=(value); end - # source://activerecord/7.0.6/lib/active_record/core.rb#80 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#103 def shard_selector?; end - # source://activerecord/7.0.6/lib/active_record/signed_id.rb#13 + # source://activerecord/7.1.3.2/lib/active_record/signed_id.rb#13 def signed_id_verifier_secret; end - # source://activerecord/7.0.6/lib/active_record/signed_id.rb#13 + # source://activerecord/7.1.3.2/lib/active_record/signed_id.rb#13 def signed_id_verifier_secret=(value); end - # source://activerecord/7.0.6/lib/active_record/signed_id.rb#13 + # source://activerecord/7.1.3.2/lib/active_record/signed_id.rb#13 def signed_id_verifier_secret?; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/time_zone_conversion.rb#67 def skip_time_zone_conversion_for_attributes; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/time_zone_conversion.rb#67 def skip_time_zone_conversion_for_attributes=(value); end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/time_zone_conversion.rb#67 def skip_time_zone_conversion_for_attributes?; end - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#42 + # source://activerecord/7.1.3.2/lib/active_record/inheritance.rb#43 def store_full_class_name; end - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#42 + # source://activerecord/7.1.3.2/lib/active_record/inheritance.rb#43 def store_full_class_name=(value); end - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#42 + # source://activerecord/7.1.3.2/lib/active_record/inheritance.rb#43 def store_full_class_name?; end - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#46 + # source://activerecord/7.1.3.2/lib/active_record/inheritance.rb#47 def store_full_sti_class; end - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#46 + # source://activerecord/7.1.3.2/lib/active_record/inheritance.rb#47 def store_full_sti_class=(value); end - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#46 + # source://activerecord/7.1.3.2/lib/active_record/inheritance.rb#47 def store_full_sti_class?; end - # source://activerecord/7.0.6/lib/active_record/core.rb#70 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#91 def strict_loading_by_default; end - # source://activerecord/7.0.6/lib/active_record/core.rb#70 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#91 def strict_loading_by_default=(value); end - # source://activerecord/7.0.6/lib/active_record/core.rb#70 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#91 def strict_loading_by_default?; end - # source://activerecord/7.0.6/lib/active_record/core.rb#238 + # source://activerecord/7.1.3.2/lib/active_record/core.rb#226 def strict_loading_violation!(owner:, reflection:); end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#152 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#159 def table_name_prefix; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#152 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#159 def table_name_prefix=(value); end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#152 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#159 def table_name_prefix?; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#153 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#160 def table_name_suffix; end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#153 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#160 def table_name_suffix=(value); end - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#153 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#160 def table_name_suffix?; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/time_zone_conversion.rb#66 def time_zone_aware_attributes; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/time_zone_conversion.rb#66 def time_zone_aware_attributes=(value); end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/time_zone_conversion.rb#66 def time_zone_aware_attributes?; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/time_zone_conversion.rb#68 def time_zone_aware_types; end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/time_zone_conversion.rb#68 def time_zone_aware_types=(value); end - # source://activerecord/7.0.6/lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/7.1.3.2/lib/active_record/attribute_methods/time_zone_conversion.rb#68 def time_zone_aware_types?; end + # source://activerecord/7.1.3.2/lib/active_record/token_for.rb#10 + def token_definitions; end + + # source://activerecord/7.1.3.2/lib/active_record/token_for.rb#10 + def token_definitions=(value); end + private - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/model_schema.rb#167 def _inheritance_column=(value); end end end +# :markup: markdown +# :include: activestorage/README.md +# # source://activestorage//lib/active_storage/gem_version.rb#3 module ActiveStorage extend ::ActiveSupport::Autoload - # source://activestorage//lib/active_storage.rb#52 + # source://activestorage//lib/active_storage.rb#55 def analyzers; end - # source://activestorage//lib/active_storage.rb#52 + # source://activestorage//lib/active_storage.rb#55 def analyzers=(val); end - # source://activestorage//lib/active_storage.rb#58 + # source://activestorage//lib/active_storage.rb#61 def binary_content_type; end - # source://activestorage//lib/active_storage.rb#58 + # source://activestorage//lib/active_storage.rb#61 def binary_content_type=(val); end - # source://activestorage//lib/active_storage.rb#60 + # source://activestorage//lib/active_storage.rb#63 def content_types_allowed_inline; end - # source://activestorage//lib/active_storage.rb#60 + # source://activestorage//lib/active_storage.rb#63 def content_types_allowed_inline=(val); end - # source://activestorage//lib/active_storage.rb#59 + # source://activestorage//lib/active_storage.rb#62 def content_types_to_serve_as_binary; end - # source://activestorage//lib/active_storage.rb#59 + # source://activestorage//lib/active_storage.rb#62 def content_types_to_serve_as_binary=(val); end - # source://activestorage//lib/active_storage.rb#357 + # source://activestorage//lib/active_storage.rb#360 def draw_routes; end - # source://activestorage//lib/active_storage.rb#357 + # source://activestorage//lib/active_storage.rb#360 def draw_routes=(val); end - # source://activestorage//lib/active_storage.rb#45 + # source://activestorage//lib/active_storage.rb#48 def logger; end - # source://activestorage//lib/active_storage.rb#45 + # source://activestorage//lib/active_storage.rb#48 def logger=(val); end - # source://activestorage//lib/active_storage.rb#54 + # source://activestorage//lib/active_storage.rb#57 def paths; end - # source://activestorage//lib/active_storage.rb#54 + # source://activestorage//lib/active_storage.rb#57 def paths=(val); end - # source://activestorage//lib/active_storage.rb#51 + # source://activestorage//lib/active_storage.rb#54 def previewers; end - # source://activestorage//lib/active_storage.rb#51 + # source://activestorage//lib/active_storage.rb#54 def previewers=(val); end - # source://activestorage//lib/active_storage.rb#49 + # source://activestorage//lib/active_storage.rb#52 def queues; end - # source://activestorage//lib/active_storage.rb#49 + # source://activestorage//lib/active_storage.rb#52 def queues=(val); end - # source://activestorage//lib/active_storage.rb#360 - def replace_on_assign_to_many; end - - # source://activestorage//lib/active_storage.rb#360 - def replace_on_assign_to_many=(val); end - - # source://activestorage//lib/active_storage.rb#358 + # source://activestorage//lib/active_storage.rb#361 def resolve_model_to_route; end - # source://activestorage//lib/active_storage.rb#358 + # source://activestorage//lib/active_storage.rb#361 def resolve_model_to_route=(val); end - # source://activestorage//lib/active_storage.rb#356 + # source://activestorage//lib/active_storage.rb#359 def routes_prefix; end - # source://activestorage//lib/active_storage.rb#356 + # source://activestorage//lib/active_storage.rb#359 def routes_prefix=(val); end - # source://activestorage//lib/active_storage.rb#353 + # source://activestorage//lib/active_storage.rb#356 def service_urls_expire_in; end - # source://activestorage//lib/active_storage.rb#353 + # source://activestorage//lib/active_storage.rb#356 def service_urls_expire_in=(val); end - # source://activestorage//lib/active_storage.rb#365 - def silence_invalid_content_types_warning; end - - # source://activestorage//lib/active_storage.rb#365 - def silence_invalid_content_types_warning=(val); end - - # source://activestorage//lib/active_storage.rb#62 + # source://activestorage//lib/active_storage.rb#65 def supported_image_processing_methods; end - # source://activestorage//lib/active_storage.rb#62 + # source://activestorage//lib/active_storage.rb#65 def supported_image_processing_methods=(val); end - # source://activestorage//lib/active_storage.rb#361 + # source://activestorage//lib/active_storage.rb#363 def track_variants; end - # source://activestorage//lib/active_storage.rb#361 + # source://activestorage//lib/active_storage.rb#363 def track_variants=(val); end - # source://activestorage//lib/active_storage.rb#351 + # source://activestorage//lib/active_storage.rb#354 def unsupported_image_processing_arguments; end - # source://activestorage//lib/active_storage.rb#351 + # source://activestorage//lib/active_storage.rb#354 def unsupported_image_processing_arguments=(val); end - # source://activestorage//lib/active_storage.rb#354 + # source://activestorage//lib/active_storage.rb#357 def urls_expire_in; end - # source://activestorage//lib/active_storage.rb#354 + # source://activestorage//lib/active_storage.rb#357 def urls_expire_in=(val); end - # source://activestorage//lib/active_storage.rb#56 + # source://activestorage//lib/active_storage.rb#59 def variable_content_types; end - # source://activestorage//lib/active_storage.rb#56 + # source://activestorage//lib/active_storage.rb#59 def variable_content_types=(val); end - # source://activestorage//lib/active_storage.rb#47 + # source://activestorage//lib/active_storage.rb#50 def variant_processor; end - # source://activestorage//lib/active_storage.rb#47 + # source://activestorage//lib/active_storage.rb#50 def variant_processor=(val); end - # source://activestorage//lib/active_storage.rb#46 + # source://activestorage//lib/active_storage.rb#49 def verifier; end - # source://activestorage//lib/active_storage.rb#46 + # source://activestorage//lib/active_storage.rb#49 def verifier=(val); end - # source://activestorage//lib/active_storage.rb#363 + # source://activestorage//lib/active_storage.rb#365 def video_preview_arguments; end - # source://activestorage//lib/active_storage.rb#363 + # source://activestorage//lib/active_storage.rb#365 def video_preview_arguments=(val); end - # source://activestorage//lib/active_storage.rb#57 + # source://activestorage//lib/active_storage.rb#60 def web_image_content_types; end - # source://activestorage//lib/active_storage.rb#57 + # source://activestorage//lib/active_storage.rb#60 def web_image_content_types=(val); end class << self - # source://activestorage//lib/active_storage.rb#52 + # source://activestorage//lib/active_storage.rb#55 def analyzers; end - # source://activestorage//lib/active_storage.rb#52 + # source://activestorage//lib/active_storage.rb#55 def analyzers=(val); end - # source://activestorage//lib/active_storage.rb#58 + # source://activestorage//lib/active_storage.rb#61 def binary_content_type; end - # source://activestorage//lib/active_storage.rb#58 + # source://activestorage//lib/active_storage.rb#61 def binary_content_type=(val); end - # source://activestorage//lib/active_storage.rb#60 + # source://activestorage//lib/active_storage.rb#63 def content_types_allowed_inline; end - # source://activestorage//lib/active_storage.rb#60 + # source://activestorage//lib/active_storage.rb#63 def content_types_allowed_inline=(val); end - # source://activestorage//lib/active_storage.rb#59 + # source://activestorage//lib/active_storage.rb#62 def content_types_to_serve_as_binary; end - # source://activestorage//lib/active_storage.rb#59 + # source://activestorage//lib/active_storage.rb#62 def content_types_to_serve_as_binary=(val); end - # source://activestorage//lib/active_storage.rb#357 + # source://activestorage//lib/active_storage/deprecator.rb#4 + def deprecator; end + + # source://activestorage//lib/active_storage.rb#360 def draw_routes; end - # source://activestorage//lib/active_storage.rb#357 + # source://activestorage//lib/active_storage.rb#360 def draw_routes=(val); end - # Returns the currently loaded version of Active Storage as a Gem::Version. + # Returns the currently loaded version of Active Storage as a +Gem::Version+. # # source://activestorage//lib/active_storage/gem_version.rb#5 def gem_version; end - # source://activestorage//lib/active_storage.rb#45 + # source://activestorage//lib/active_storage.rb#48 def logger; end - # source://activestorage//lib/active_storage.rb#45 + # source://activestorage//lib/active_storage.rb#48 def logger=(val); end - # source://activestorage//lib/active_storage.rb#54 + # source://activestorage//lib/active_storage.rb#57 def paths; end - # source://activestorage//lib/active_storage.rb#54 + # source://activestorage//lib/active_storage.rb#57 def paths=(val); end - # source://activestorage//lib/active_storage.rb#51 + # source://activestorage//lib/active_storage.rb#54 def previewers; end - # source://activestorage//lib/active_storage.rb#51 + # source://activestorage//lib/active_storage.rb#54 def previewers=(val); end - # source://activestorage//lib/active_storage.rb#49 + # source://activestorage//lib/active_storage.rb#52 def queues; end - # source://activestorage//lib/active_storage.rb#49 + # source://activestorage//lib/active_storage.rb#52 def queues=(val); end - # source://railties/7.0.6/lib/rails/engine.rb#405 + # source://railties/7.1.3.2/lib/rails/engine.rb#412 def railtie_helpers_paths; end - # source://railties/7.0.6/lib/rails/engine.rb#394 + # source://railties/7.1.3.2/lib/rails/engine.rb#395 def railtie_namespace; end - # source://railties/7.0.6/lib/rails/engine.rb#409 + # source://railties/7.1.3.2/lib/rails/engine.rb#416 def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end - # source://activestorage//lib/active_storage.rb#360 + # source://activestorage//lib/active_storage.rb#367 def replace_on_assign_to_many; end - # source://activestorage//lib/active_storage.rb#360 - def replace_on_assign_to_many=(val); end + # source://activestorage//lib/active_storage.rb#371 + def replace_on_assign_to_many=(value); end - # source://activestorage//lib/active_storage.rb#358 + # source://activestorage//lib/active_storage.rb#361 def resolve_model_to_route; end - # source://activestorage//lib/active_storage.rb#358 + # source://activestorage//lib/active_storage.rb#361 def resolve_model_to_route=(val); end - # source://activestorage//lib/active_storage.rb#356 + # source://activestorage//lib/active_storage.rb#359 def routes_prefix; end - # source://activestorage//lib/active_storage.rb#356 + # source://activestorage//lib/active_storage.rb#359 def routes_prefix=(val); end - # source://activestorage//lib/active_storage.rb#353 + # source://activestorage//lib/active_storage.rb#356 def service_urls_expire_in; end - # source://activestorage//lib/active_storage.rb#353 + # source://activestorage//lib/active_storage.rb#356 def service_urls_expire_in=(val); end - # source://activestorage//lib/active_storage.rb#365 + # source://activestorage//lib/active_storage.rb#375 def silence_invalid_content_types_warning; end - # source://activestorage//lib/active_storage.rb#365 - def silence_invalid_content_types_warning=(val); end + # source://activestorage//lib/active_storage.rb#379 + def silence_invalid_content_types_warning=(value); end - # source://activestorage//lib/active_storage.rb#62 + # source://activestorage//lib/active_storage.rb#65 def supported_image_processing_methods; end - # source://activestorage//lib/active_storage.rb#62 + # source://activestorage//lib/active_storage.rb#65 def supported_image_processing_methods=(val); end - # source://railties/7.0.6/lib/rails/engine.rb#397 + # source://railties/7.1.3.2/lib/rails/engine.rb#401 def table_name_prefix; end - # source://activestorage//lib/active_storage.rb#361 + # source://activestorage//lib/active_storage.rb#363 def track_variants; end - # source://activestorage//lib/active_storage.rb#361 + # source://activestorage//lib/active_storage.rb#363 def track_variants=(val); end - # source://activestorage//lib/active_storage.rb#351 + # source://activestorage//lib/active_storage.rb#354 def unsupported_image_processing_arguments; end - # source://activestorage//lib/active_storage.rb#351 + # source://activestorage//lib/active_storage.rb#354 def unsupported_image_processing_arguments=(val); end - # source://activestorage//lib/active_storage.rb#354 + # source://activestorage//lib/active_storage.rb#357 def urls_expire_in; end - # source://activestorage//lib/active_storage.rb#354 + # source://activestorage//lib/active_storage.rb#357 def urls_expire_in=(val); end - # source://railties/7.0.6/lib/rails/engine.rb#401 + # source://railties/7.1.3.2/lib/rails/engine.rb#408 def use_relative_model_naming?; end - # source://activestorage//lib/active_storage.rb#56 + # source://activestorage//lib/active_storage.rb#59 def variable_content_types; end - # source://activestorage//lib/active_storage.rb#56 + # source://activestorage//lib/active_storage.rb#59 def variable_content_types=(val); end - # source://activestorage//lib/active_storage.rb#47 + # source://activestorage//lib/active_storage.rb#50 def variant_processor; end - # source://activestorage//lib/active_storage.rb#47 + # source://activestorage//lib/active_storage.rb#50 def variant_processor=(val); end - # source://activestorage//lib/active_storage.rb#46 + # source://activestorage//lib/active_storage.rb#49 def verifier; end - # source://activestorage//lib/active_storage.rb#46 + # source://activestorage//lib/active_storage.rb#49 def verifier=(val); end - # Returns the currently loaded version of Active Storage as a Gem::Version. + # Returns the currently loaded version of Active Storage as a +Gem::Version+. # # source://activestorage//lib/active_storage/version.rb#7 def version; end - # source://activestorage//lib/active_storage.rb#363 + # source://activestorage//lib/active_storage.rb#365 def video_preview_arguments; end - # source://activestorage//lib/active_storage.rb#363 + # source://activestorage//lib/active_storage.rb#365 def video_preview_arguments=(val); end - # source://activestorage//lib/active_storage.rb#57 + # source://activestorage//lib/active_storage.rb#60 def web_image_content_types; end - # source://activestorage//lib/active_storage.rb#57 + # source://activestorage//lib/active_storage.rb#60 def web_image_content_types=(val); end end end @@ -1231,50 +1307,52 @@ class ActiveStorage::AnalyzeJob < ::ActiveStorage::BaseJob def perform(blob); end class << self - # source://activejob/7.0.6/lib/active_job/queue_name.rb#55 + # source://activejob/7.1.3.2/lib/active_job/queue_name.rb#55 def queue_name; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end end end +# = Active Storage \Analyzer +# # This is an abstract base class for analyzers, which extract metadata from blobs. See # ActiveStorage::Analyzer::VideoAnalyzer for an example of a concrete subclass. # -# source://activestorage//lib/active_storage/analyzer.rb#6 +# source://activestorage//lib/active_storage/analyzer.rb#8 class ActiveStorage::Analyzer # @return [Analyzer] a new instance of Analyzer # - # source://activestorage//lib/active_storage/analyzer.rb#21 + # source://activestorage//lib/active_storage/analyzer.rb#23 def initialize(blob); end # Returns the value of attribute blob. # - # source://activestorage//lib/active_storage/analyzer.rb#7 + # source://activestorage//lib/active_storage/analyzer.rb#9 def blob; end # Override this method in a concrete subclass. Have it return a Hash of metadata. # # @raise [NotImplementedError] # - # source://activestorage//lib/active_storage/analyzer.rb#26 + # source://activestorage//lib/active_storage/analyzer.rb#28 def metadata; end private # Downloads the blob to a tempfile on disk. Yields the tempfile. # - # source://activestorage//lib/active_storage/analyzer.rb#32 + # source://activestorage//lib/active_storage/analyzer.rb#34 def download_blob_to_tempfile(&block); end - # source://activestorage//lib/active_storage/analyzer.rb#44 + # source://activestorage//lib/active_storage/analyzer.rb#46 def instrument(analyzer, &block); end - # source://activestorage//lib/active_storage/analyzer.rb#36 + # source://activestorage//lib/active_storage/analyzer.rb#38 def logger; end - # source://activestorage//lib/active_storage/analyzer.rb#40 + # source://activestorage//lib/active_storage/analyzer.rb#42 def tmpdir; end class << self @@ -1283,7 +1361,7 @@ class ActiveStorage::Analyzer # # @return [Boolean] # - # source://activestorage//lib/active_storage/analyzer.rb#11 + # source://activestorage//lib/active_storage/analyzer.rb#13 def accept?(blob); end # Implement this method in concrete subclasses. It will determine if blob analysis @@ -1291,52 +1369,58 @@ class ActiveStorage::Analyzer # # @return [Boolean] # - # source://activestorage//lib/active_storage/analyzer.rb#17 + # source://activestorage//lib/active_storage/analyzer.rb#19 def analyze_later?; end end end -# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#12 +# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#14 class ActiveStorage::Analyzer::AudioAnalyzer < ::ActiveStorage::Analyzer - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#17 + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#19 def metadata; end private - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#32 + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#44 def audio_stream; end - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#27 + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#29 def bit_rate; end - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#22 + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#24 def duration; end - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#61 + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#73 def ffprobe_path; end - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#40 + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#52 def probe; end - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#44 + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#56 def probe_from(file); end - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#36 + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#34 + def sample_rate; end + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#48 def streams; end + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#39 + def tags; end + class << self - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#13 + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#15 def accept?(blob); end end end -# source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#12 +# source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#14 class ActiveStorage::Analyzer::ImageAnalyzer < ::ActiveStorage::Analyzer - # source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#17 + # source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#19 def metadata; end class << self - # source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#13 + # source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#15 def accept?(blob); end end end @@ -1393,105 +1477,107 @@ class ActiveStorage::Analyzer::NullAnalyzer < ::ActiveStorage::Analyzer end end -# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#22 +# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#24 class ActiveStorage::Analyzer::VideoAnalyzer < ::ActiveStorage::Analyzer - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#27 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#29 def metadata; end private - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#53 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#55 def angle; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#76 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#78 def audio?; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#114 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#116 def audio_stream; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#84 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#86 def computed_height; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#122 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#124 def container; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#61 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#63 def display_aspect_ratio; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#98 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#100 def display_height_scale; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#48 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#50 def duration; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#94 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#96 def encoded_height; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#90 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#92 def encoded_width; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#147 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#149 def ffprobe_path; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#40 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#42 def height; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#126 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#128 def probe; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#130 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#132 def probe_from(file); end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#72 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#74 def rotated?; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#106 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#108 def side_data; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#118 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#120 def streams; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#102 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#104 def tags; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#80 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#82 def video?; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#110 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#112 def video_stream; end - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#32 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#34 def width; end class << self - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#23 + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#25 def accept?(blob); end end end +# = Active Storage \Attached +# # Abstract base class for the concrete ActiveStorage::Attached::One and ActiveStorage::Attached::Many # classes that both provide proxy access to the blob association for a record. # -# source://activestorage//lib/active_storage/attached.rb#8 +# source://activestorage//lib/active_storage/attached.rb#10 class ActiveStorage::Attached # @return [Attached] a new instance of Attached # - # source://activestorage//lib/active_storage/attached.rb#11 + # source://activestorage//lib/active_storage/attached.rb#13 def initialize(name, record); end # Returns the value of attribute name. # - # source://activestorage//lib/active_storage/attached.rb#9 + # source://activestorage//lib/active_storage/attached.rb#11 def name; end # Returns the value of attribute record. # - # source://activestorage//lib/active_storage/attached.rb#9 + # source://activestorage//lib/active_storage/attached.rb#11 def record; end private - # source://activestorage//lib/active_storage/attached.rb#16 + # source://activestorage//lib/active_storage/attached.rb#18 def change; end end @@ -1503,45 +1589,51 @@ end # source://activestorage//lib/active_storage/attached/changes/create_many.rb#4 class ActiveStorage::Attached::Changes::CreateMany # source://activestorage//lib/active_storage/attached/changes/create_many.rb#7 - def initialize(name, record, attachables); end + def initialize(name, record, attachables, pending_uploads: T.unsafe(nil)); end # source://activestorage//lib/active_storage/attached/changes/create_many.rb#5 def attachables; end - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#13 + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#14 def attachments; end - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#17 + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#18 def blobs; end # source://activestorage//lib/active_storage/attached/changes/create_many.rb#5 def name; end + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#5 + def pending_uploads; end + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#5 def record; end - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#25 + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#26 def save; end - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#21 + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#22 def upload; end private - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#39 + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#44 def assign_associated_attachments; end - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#35 + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#36 def build_subchange_from(attachable); end - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#47 + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#52 def persisted_or_new_attachments; end - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#43 + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#48 def reset_associated_blobs; end - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#31 + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#32 def subchanges; end + + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#40 + def subchanges_without_blobs; end end # source://activestorage//lib/active_storage/attached/changes/create_one.rb#7 @@ -1564,7 +1656,7 @@ class ActiveStorage::Attached::Changes::CreateOne # source://activestorage//lib/active_storage/attached/changes/create_one.rb#8 def record; end - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#32 + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#48 def save; end # source://activestorage//lib/active_storage/attached/changes/create_one.rb#23 @@ -1572,19 +1664,19 @@ class ActiveStorage::Attached::Changes::CreateOne private - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#78 + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#120 def attachment_service_name; end - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#48 + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#64 def build_attachment; end - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#42 + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#58 def find_attachment; end - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#38 + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#54 def find_or_build_attachment; end - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#52 + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#68 def find_or_build_blob; end end @@ -1731,114 +1823,117 @@ class ActiveStorage::Attached::Changes::PurgeOne def reset; end end -# source://activestorage//lib/active_storage/attached/many.rb#5 +# source://activestorage//lib/active_storage/attached/many.rb#7 class ActiveStorage::Attached::Many < ::ActiveStorage::Attached - # source://activestorage//lib/active_storage/attached/many.rb#49 + # source://activestorage//lib/active_storage/attached/many.rb#51 def attach(*attachables); end - # source://activestorage//lib/active_storage/attached/many.rb#65 + # source://activestorage//lib/active_storage/attached/many.rb#66 def attached?; end - # source://activestorage//lib/active_storage/attached/many.rb#30 + # source://activestorage//lib/active_storage/attached/many.rb#32 def attachments; end - # source://activestorage//lib/active_storage/attached/many.rb#35 + # source://activestorage//lib/active_storage/attached/many.rb#37 def blobs; end - # source://activestorage//lib/active_storage/attached/many.rb#23 + # source://activestorage//lib/active_storage/attached/many.rb#25 def detach(*_arg0, **_arg1, &_arg2); end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/delegation.rb#302 + # source://activesupport/7.1.3.2/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#11 + # source://activestorage//lib/active_storage/attached/many.rb#13 def purge(*_arg0, **_arg1, &_arg2); end - # source://activestorage//lib/active_storage/attached/many.rb#17 + # source://activestorage//lib/active_storage/attached/many.rb#19 def purge_later(*_arg0, **_arg1, &_arg2); end private - # source://activestorage//lib/active_storage/attached/many.rb#74 + # source://activestorage//lib/active_storage/attached/many.rb#75 def detach_many; end - # source://activestorage//lib/active_storage/attached/many.rb#70 + # source://activestorage//lib/active_storage/attached/many.rb#71 def purge_many; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/delegation.rb#294 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/delegation.rb#323 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end -# source://activestorage//lib/active_storage/attached/model.rb#7 +# source://activestorage//lib/active_storage/attached/model.rb#9 module ActiveStorage::Attached::Model extend ::ActiveSupport::Concern mixes_in_class_methods ::ActiveStorage::Attached::Model::ClassMethods - # source://activestorage//lib/active_storage/attached/model.rb#222 + # source://activestorage//lib/active_storage/attached/model.rb#251 def attachment_changes; end - # source://activestorage//lib/active_storage/attached/model.rb#226 + # source://activestorage//lib/active_storage/attached/model.rb#255 def changed_for_autosave?; end - # source://activestorage//lib/active_storage/attached/model.rb#236 + # source://activestorage//lib/active_storage/attached/model.rb#265 def reload(*_arg0); end private - # source://activestorage//lib/active_storage/attached/model.rb#230 + # source://activestorage//lib/active_storage/attached/model.rb#259 def initialize_dup(*_arg0); end end # source://activestorage//lib/active_storage/attached/model.rb#0 module ActiveStorage::Attached::Model::ClassMethods - # source://activestorage//lib/active_storage/attached/model.rb#129 + # source://activestorage//lib/active_storage/attached/model.rb#182 def has_many_attached(name, dependent: T.unsafe(nil), service: T.unsafe(nil), strict_loading: T.unsafe(nil)); end - # source://activestorage//lib/active_storage/attached/model.rb#50 + # source://activestorage//lib/active_storage/attached/model.rb#94 def has_one_attached(name, dependent: T.unsafe(nil), service: T.unsafe(nil), strict_loading: T.unsafe(nil)); end private - # source://activestorage//lib/active_storage/attached/model.rb#213 + # source://activestorage//lib/active_storage/attached/model.rb#244 + def validate_global_service_configuration; end + + # source://activestorage//lib/active_storage/attached/model.rb#234 def validate_service_configuration(association_name, service); end end -# source://activestorage//lib/active_storage/attached/one.rb#5 +# source://activestorage//lib/active_storage/attached/one.rb#7 class ActiveStorage::Attached::One < ::ActiveStorage::Attached - # source://activestorage//lib/active_storage/attached/one.rb#56 + # source://activestorage//lib/active_storage/attached/one.rb#58 def attach(attachable); end - # source://activestorage//lib/active_storage/attached/one.rb#72 + # source://activestorage//lib/active_storage/attached/one.rb#73 def attached?; end - # source://activestorage//lib/active_storage/attached/one.rb#31 + # source://activestorage//lib/active_storage/attached/one.rb#33 def attachment; end - # source://activestorage//lib/active_storage/attached/one.rb#42 + # source://activestorage//lib/active_storage/attached/one.rb#44 def blank?; end - # source://activestorage//lib/active_storage/attached/one.rb#23 + # source://activestorage//lib/active_storage/attached/one.rb#25 def detach(*_arg0, **_arg1, &_arg2); end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/delegation.rb#302 + # source://activesupport/7.1.3.2/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#11 + # source://activestorage//lib/active_storage/attached/one.rb#13 def purge(*_arg0, **_arg1, &_arg2); end - # source://activestorage//lib/active_storage/attached/one.rb#17 + # source://activestorage//lib/active_storage/attached/one.rb#19 def purge_later(*_arg0, **_arg1, &_arg2); end private - # source://activestorage//lib/active_storage/attached/one.rb#81 + # source://activestorage//lib/active_storage/attached/one.rb#82 def detach_one; end - # source://activestorage//lib/active_storage/attached/one.rb#77 + # source://activestorage//lib/active_storage/attached/one.rb#78 def purge_one; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/delegation.rb#294 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/delegation.rb#323 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end @@ -1846,20 +1941,22 @@ class ActiveStorage::Attachment < ::ActiveStorage::Record include ::ActiveStorage::Attachment::GeneratedAttributeMethods include ::ActiveStorage::Attachment::GeneratedAssociationMethods - # source://activerecord/7.0.6/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_blob(*args); end - # source://activerecord/7.0.6/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_record(*args); end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/delegation.rb#302 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/delegation.rb#331 def method_missing(method, *args, **_arg2, &block); end + def preview(transformations); end def purge; end def purge_later; end + def representation(transformations); end def signed_id(*_arg0, **_arg1, &_arg2); end - # source://activerecord/7.0.6/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/autosave_association.rb#160 def validate_associated_records_for_blob(*args); end def variant(transformations); end @@ -1869,70 +1966,78 @@ class ActiveStorage::Attachment < ::ActiveStorage::Record def analyze_blob_later; end def dependent; end def mirror_blob_later; end + def named_variants; end def purge_dependent_blob_later; end - # source://activesupport/7.0.6/lib/active_support/core_ext/module/delegation.rb#294 + # source://activesupport/7.1.3.2/lib/active_support/core_ext/module/delegation.rb#323 def respond_to_missing?(name, include_private = T.unsafe(nil)); end - def variants; end + def transform_variants_later; end + def transformations_by_name(transformations); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#11 def _reflections; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 + # source://activerecord/7.1.3.2/lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.2/lib/active_record/scoping/named.rb#174 def with_all_variant_records(*args, **_arg1); end end end module ActiveStorage::Attachment::GeneratedAssociationMethods - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#103 def blob; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#111 def blob=(value); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/belongs_to.rb#132 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/belongs_to.rb#145 def blob_changed?; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/belongs_to.rb#136 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/belongs_to.rb#149 def blob_previously_changed?; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#28 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#32 def build_blob(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#36 def create_blob(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#40 def create_blob!(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#103 def record; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#111 def record=(value); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/belongs_to.rb#132 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/belongs_to.rb#145 def record_changed?; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/belongs_to.rb#136 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/belongs_to.rb#149 def record_previously_changed?; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#19 def reload_blob; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#19 def reload_record; end + + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#23 + def reset_blob; end + + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#23 + def reset_record; end end module ActiveStorage::Attachment::GeneratedAttributeMethods; end @@ -1942,17 +2047,17 @@ class ActiveStorage::BaseController < ::ActionController::Base private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.0.6/lib/action_controller/metal/etag_with_template_digest.rb#27 + # source://actionpack/7.1.3.2/lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -1964,20 +2069,21 @@ class ActiveStorage::Blobs::ProxyController < ::ActiveStorage::BaseController include ::ActiveStorage::SetBlob include ::ActionController::Live include ::ActiveStorage::Streaming + include ::ActiveStorage::DisableSession extend ::ActionController::Live::ClassMethods def show; end private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -1989,27 +2095,24 @@ class ActiveStorage::Blobs::RedirectController < ::ActiveStorage::BaseController private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end class ActiveStorage::Current < ::ActiveSupport::CurrentAttributes - def host; end - def host=(host); end - class << self - # source://activesupport/7.0.6/lib/active_support/current_attributes.rb#118 + # source://activesupport/7.1.3.2/lib/active_support/current_attributes.rb#127 def url_options; end - # source://activesupport/7.0.6/lib/active_support/current_attributes.rb#118 + # source://activesupport/7.1.3.2/lib/active_support/current_attributes.rb#127 def url_options=(value); end end end @@ -2019,18 +2122,22 @@ class ActiveStorage::DirectUploadsController < ::ActiveStorage::BaseController private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/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.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end +module ActiveStorage::DisableSession + extend ::ActiveSupport::Concern +end + class ActiveStorage::DiskController < ::ActiveStorage::BaseController include ::ActiveStorage::FileServer @@ -2039,7 +2146,7 @@ class ActiveStorage::DiskController < ::ActiveStorage::BaseController private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def acceptable_content?(token); end @@ -2048,10 +2155,10 @@ class ActiveStorage::DiskController < ::ActiveStorage::BaseController def named_disk_service(name); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -2086,7 +2193,7 @@ end # source://activestorage//lib/active_storage/engine.rb#25 class ActiveStorage::Engine < ::Rails::Engine class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end end end @@ -2128,6 +2235,8 @@ class ActiveStorage::Filename end end +# = Active Storage \FixtureSet +# # Fixtures are a way of organizing data that you want to test against; in # short, sample data. # @@ -2148,9 +2257,13 @@ end # has_one_attached :thumbnail # end # +# +# # # fixtures/active_storage/blobs.yml # first_thumbnail_blob: <%= ActiveStorage::FixtureSet.blob filename: "first.png" %> # +# +# # # fixtures/active_storage/attachments.yml # first_thumbnail_attachment: # name: thumbnail @@ -2160,19 +2273,19 @@ end # When processed, Active Record will insert database records for each fixture # entry and will ensure the Active Storage relationship is intact. # -# source://activestorage//lib/active_storage/fixture_set.rb#38 +# source://activestorage//lib/active_storage/fixture_set.rb#44 class ActiveStorage::FixtureSet include ::ActiveSupport::Testing::FileFixtures include ::ActiveRecord::SecureToken extend ::ActiveRecord::SecureToken::ClassMethods - # source://activesupport/7.0.6/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/7.1.3.2/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path; end - # source://activesupport/7.0.6/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/7.1.3.2/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path?; end - # source://activestorage//lib/active_storage/fixture_set.rb#64 + # source://activestorage//lib/active_storage/fixture_set.rb#70 def prepare(instance, **attributes); end class << self @@ -2183,7 +2296,7 @@ class ActiveStorage::FixtureSet # # === Examples # - # # tests/fixtures/action_text/blobs.yml + # # tests/fixtures/active_storage/blobs.yml # second_thumbnail_blob: <%= ActiveStorage::FixtureSet.blob( # filename: "second.svg", # ) %> @@ -2194,16 +2307,16 @@ class ActiveStorage::FixtureSet # service_name: "public" # ) %> # - # source://activestorage//lib/active_storage/fixture_set.rb#60 + # source://activestorage//lib/active_storage/fixture_set.rb#66 def blob(filename:, **attributes); end - # source://activesupport/7.0.6/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/7.1.3.2/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path; end - # source://activesupport/7.0.6/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/7.1.3.2/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path=(value); end - # source://activesupport/7.0.6/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/7.1.3.2/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path?; end end end @@ -2222,101 +2335,97 @@ class ActiveStorage::InvariableError < ::ActiveStorage::Error; end # source://activestorage//lib/active_storage/log_subscriber.rb#6 class ActiveStorage::LogSubscriber < ::ActiveSupport::LogSubscriber - # source://activestorage//lib/active_storage/log_subscriber.rb#41 + # source://activestorage//lib/active_storage/log_subscriber.rb#53 def logger; end - # source://activestorage//lib/active_storage/log_subscriber.rb#19 + # source://activestorage//lib/active_storage/log_subscriber.rb#21 + def preview(event); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#26 def service_delete(event); end - # source://activestorage//lib/active_storage/log_subscriber.rb#23 + # source://activestorage//lib/active_storage/log_subscriber.rb#31 def service_delete_prefixed(event); end - # source://activestorage//lib/active_storage/log_subscriber.rb#13 + # source://activestorage//lib/active_storage/log_subscriber.rb#14 def service_download(event); end - # source://activestorage//lib/active_storage/log_subscriber.rb#27 + # source://activestorage//lib/active_storage/log_subscriber.rb#36 def service_exist(event); end - # source://activestorage//lib/active_storage/log_subscriber.rb#35 + # source://activestorage//lib/active_storage/log_subscriber.rb#46 def service_mirror(event); end - # source://activestorage//lib/active_storage/log_subscriber.rb#13 + # source://activestorage//lib/active_storage/log_subscriber.rb#14 def service_streaming_download(event); end # source://activestorage//lib/active_storage/log_subscriber.rb#7 def service_upload(event); end - # source://activestorage//lib/active_storage/log_subscriber.rb#31 + # source://activestorage//lib/active_storage/log_subscriber.rb#41 def service_url(event); end private - # source://activestorage//lib/active_storage/log_subscriber.rb#50 + # source://activestorage//lib/active_storage/log_subscriber.rb#62 def debug(event, colored_message); end - # source://activestorage//lib/active_storage/log_subscriber.rb#46 + # source://activestorage//lib/active_storage/log_subscriber.rb#58 def info(event, colored_message); end - # source://activestorage//lib/active_storage/log_subscriber.rb#58 + # source://activestorage//lib/active_storage/log_subscriber.rb#70 def key_in(event); end - # source://activestorage//lib/active_storage/log_subscriber.rb#54 + # source://activestorage//lib/active_storage/log_subscriber.rb#66 def log_prefix_for_service(event); end + + class << self + # source://activesupport/7.1.3.2/lib/active_support/log_subscriber.rb#87 + def log_levels; end + end end class ActiveStorage::MirrorJob < ::ActiveStorage::BaseJob def perform(key, checksum:); end class << self - # source://activejob/7.0.6/lib/active_job/queue_name.rb#55 + # source://activejob/7.1.3.2/lib/active_job/queue_name.rb#55 def queue_name; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end end end -class ActiveStorage::Preview - def initialize(blob, variation_or_variation_key); end - - def blob; end - def download(&block); end - def image; end - def key; end - def processed; end - def url(**options); end - def variation; end - - private +class ActiveStorage::NamedVariant + def initialize(transformations); end - def previewer; end - def previewer_class; end - def process; end - def processed?; end - def variant; end + def preprocessed; end + def preprocessed?(record); end + def transformations; end end -class ActiveStorage::Preview::UnprocessedError < ::StandardError; end - # Raised when a Previewer is unable to generate a preview image. # # source://activestorage//lib/active_storage/errors.rb#28 class ActiveStorage::PreviewError < ::ActiveStorage::Error; end +# = Active Storage \Previewer +# # This is an abstract base class for previewers, which generate images from blobs. See # ActiveStorage::Previewer::MuPDFPreviewer and ActiveStorage::Previewer::VideoPreviewer for # examples of concrete subclasses. # -# source://activestorage//lib/active_storage/previewer.rb#7 +# source://activestorage//lib/active_storage/previewer.rb#9 class ActiveStorage::Previewer # @return [Previewer] a new instance of Previewer # - # source://activestorage//lib/active_storage/previewer.rb#16 + # source://activestorage//lib/active_storage/previewer.rb#18 def initialize(blob); end # Returns the value of attribute blob. # - # source://activestorage//lib/active_storage/previewer.rb#8 + # source://activestorage//lib/active_storage/previewer.rb#10 def blob; end # Override this method in a concrete subclass. Have it yield an attachable preview image (i.e. @@ -2325,17 +2434,17 @@ class ActiveStorage::Previewer # # @raise [NotImplementedError] # - # source://activestorage//lib/active_storage/previewer.rb#23 + # source://activestorage//lib/active_storage/previewer.rb#25 def preview(**options); end private - # source://activestorage//lib/active_storage/previewer.rb#71 + # source://activestorage//lib/active_storage/previewer.rb#78 def capture(*argv, to:); end # Downloads the blob to a tempfile on disk. Yields the tempfile. # - # source://activestorage//lib/active_storage/previewer.rb#29 + # source://activestorage//lib/active_storage/previewer.rb#31 def download_blob_to_tempfile(&block); end # Executes a system command, capturing its binary output in a tempfile. Yields the tempfile. @@ -2353,19 +2462,22 @@ class ActiveStorage::Previewer # # The output tempfile is opened in the directory returned by #tmpdir. # - # source://activestorage//lib/active_storage/previewer.rb#47 + # source://activestorage//lib/active_storage/previewer.rb#49 def draw(*argv); end - # source://activestorage//lib/active_storage/previewer.rb#67 + # source://activestorage//lib/active_storage/previewer.rb#69 def instrument(operation, payload = T.unsafe(nil), &block); end - # source://activestorage//lib/active_storage/previewer.rb#86 + # source://activestorage//lib/active_storage/previewer.rb#93 def logger; end - # source://activestorage//lib/active_storage/previewer.rb#57 + # source://activestorage//lib/active_storage/previewer.rb#59 def open_tempfile; end - # source://activestorage//lib/active_storage/previewer.rb#90 + # source://activestorage//lib/active_storage/previewer.rb#73 + def service_name; end + + # source://activestorage//lib/active_storage/previewer.rb#97 def tmpdir; end class << self @@ -2374,7 +2486,7 @@ class ActiveStorage::Previewer # # @return [Boolean] # - # source://activestorage//lib/active_storage/previewer.rb#12 + # source://activestorage//lib/active_storage/previewer.rb#14 def accept?(blob); end end end @@ -2449,10 +2561,10 @@ class ActiveStorage::PurgeJob < ::ActiveStorage::BaseJob def perform(blob); end class << self - # source://activejob/7.0.6/lib/active_job/queue_name.rb#55 + # source://activejob/7.1.3.2/lib/active_job/queue_name.rb#55 def queue_name; end - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 def rescue_handlers; end end end @@ -2462,10 +2574,10 @@ class ActiveStorage::Record < ::ActiveRecord::Base include ::ActiveStorage::Record::GeneratedAssociationMethods class << self - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 + # source://activerecord/7.1.3.2/lib/active_record/enum.rb#167 def defined_enums; end end end @@ -2515,11 +2627,11 @@ end # source://activestorage//lib/active_storage/reflection.rb#5 class ActiveStorage::Reflection::HasAttachedReflection < ::ActiveRecord::Reflection::MacroReflection + # source://activestorage//lib/active_storage/reflection.rb#10 + def named_variants; end + # source://activestorage//lib/active_storage/reflection.rb#6 def variant(name, transformations); end - - # source://activestorage//lib/active_storage/reflection.rb#10 - def variants; end end # Holds all the metadata about a has_many_attached attachment as it was @@ -2558,17 +2670,17 @@ class ActiveStorage::Representations::BaseController < ::ActiveStorage::BaseCont private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/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.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -2576,17 +2688,21 @@ end class ActiveStorage::Representations::ProxyController < ::ActiveStorage::Representations::BaseController include ::ActionController::Live include ::ActiveStorage::Streaming + include ::ActiveStorage::DisableSession extend ::ActionController::Live::ClassMethods def show; end private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 + def __callbacks; end + + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -2596,15 +2712,17 @@ class ActiveStorage::Representations::RedirectController < ::ActiveStorage::Repr private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end +# = Active Storage \Service +# # Abstract class serving as an interface for concrete services. # # The available services are: @@ -2615,7 +2733,7 @@ end # * +AzureStorage+, to manage attachments through Microsoft Azure Storage. # * +Mirror+, to be able to use several services to manage attachments. # -# Inside a Rails application, you can set-up your services through the +# Inside a \Rails application, you can set-up your services through the # generated config/storage.yml file and reference one # of the aforementioned constant under the +service+ key. For example: # @@ -2630,7 +2748,7 @@ end # # config.active_storage.service = :local # -# If you are using Active Storage outside of a Ruby on Rails application, you +# If you are using Active Storage outside of a Ruby on \Rails application, you # can configure the service to use like this: # # ActiveStorage::Blob.service = ActiveStorage::Service.configure( @@ -2638,7 +2756,7 @@ end # { local: {service: "Disk", root: Pathname("/tmp/foo/storage") } } # ) # -# source://activestorage//lib/active_storage/service.rb#41 +# source://activestorage//lib/active_storage/service.rb#43 class ActiveStorage::Service extend ::ActiveSupport::Autoload @@ -2646,35 +2764,35 @@ class ActiveStorage::Service # # @raise [NotImplementedError] # - # source://activestorage//lib/active_storage/service.rb#94 + # source://activestorage//lib/active_storage/service.rb#96 def compose(source_keys, destination_key, filename: T.unsafe(nil), content_type: T.unsafe(nil), disposition: T.unsafe(nil), custom_metadata: T.unsafe(nil)); end # Delete the file at the +key+. # # @raise [NotImplementedError] # - # source://activestorage//lib/active_storage/service.rb#99 + # source://activestorage//lib/active_storage/service.rb#101 def delete(key); end # Delete files at keys starting with the +prefix+. # # @raise [NotImplementedError] # - # source://activestorage//lib/active_storage/service.rb#104 + # source://activestorage//lib/active_storage/service.rb#106 def delete_prefixed(prefix); end # Return the content of the file at the +key+. # # @raise [NotImplementedError] # - # source://activestorage//lib/active_storage/service.rb#80 + # source://activestorage//lib/active_storage/service.rb#82 def download(key); end # Return the partial content in the byte +range+ of the file at the +key+. # # @raise [NotImplementedError] # - # source://activestorage//lib/active_storage/service.rb#85 + # source://activestorage//lib/active_storage/service.rb#87 def download_chunk(key, range); end # Return +true+ if a file exists at the +key+. @@ -2682,39 +2800,39 @@ class ActiveStorage::Service # @raise [NotImplementedError] # @return [Boolean] # - # source://activestorage//lib/active_storage/service.rb#109 + # source://activestorage//lib/active_storage/service.rb#111 def exist?(key); end # Returns a Hash of headers for +url_for_direct_upload+ requests. # - # source://activestorage//lib/active_storage/service.rb#141 + # source://activestorage//lib/active_storage/service.rb#143 def headers_for_direct_upload(key, filename:, content_type:, content_length:, checksum:, custom_metadata: T.unsafe(nil)); end # Returns the value of attribute name. # - # source://activestorage//lib/active_storage/service.rb#44 + # source://activestorage//lib/active_storage/service.rb#46 def name; end # Sets the attribute name # # @param value the value to set the attribute name to. # - # source://activestorage//lib/active_storage/service.rb#44 + # source://activestorage//lib/active_storage/service.rb#46 def name=(_arg0); end - # source://activestorage//lib/active_storage/service.rb#89 + # source://activestorage//lib/active_storage/service.rb#91 def open(*args, **options, &block); end # @return [Boolean] # - # source://activestorage//lib/active_storage/service.rb#145 + # source://activestorage//lib/active_storage/service.rb#147 def public?; end # Update metadata for the file identified by +key+ in the service. # Override in subclasses only if the service needs to store specific # metadata that has to be updated upon identification. # - # source://activestorage//lib/active_storage/service.rb#76 + # source://activestorage//lib/active_storage/service.rb#78 def update_metadata(key, **metadata); end # Upload the +io+ to the +key+ specified. If a +checksum+ is provided, the service will @@ -2722,7 +2840,7 @@ class ActiveStorage::Service # # @raise [NotImplementedError] # - # source://activestorage//lib/active_storage/service.rb#69 + # source://activestorage//lib/active_storage/service.rb#71 def upload(key, io, checksum: T.unsafe(nil), **options); end # Returns the URL for the file at the +key+. This returns a permanent URL for public files, and returns a @@ -2730,7 +2848,7 @@ class ActiveStorage::Service # +filename+, and +content_type+ that you wish the file to be served with on request. Additionally, you can also provide # the amount of seconds the URL will be valid for, specified in +expires_in+. # - # source://activestorage//lib/active_storage/service.rb#117 + # source://activestorage//lib/active_storage/service.rb#119 def url(key, **options); end # Returns a signed, temporary URL that a direct upload file can be PUT to on the +key+. @@ -2740,33 +2858,33 @@ class ActiveStorage::Service # # @raise [NotImplementedError] # - # source://activestorage//lib/active_storage/service.rb#136 + # source://activestorage//lib/active_storage/service.rb#138 def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: T.unsafe(nil)); end private - # source://activestorage//lib/active_storage/service.rb#173 + # source://activestorage//lib/active_storage/service.rb#175 def content_disposition_with(filename:, type: T.unsafe(nil)); end # @raise [NotImplementedError] # - # source://activestorage//lib/active_storage/service.rb#158 + # source://activestorage//lib/active_storage/service.rb#160 def custom_metadata_headers(metadata); end - # source://activestorage//lib/active_storage/service.rb#162 + # source://activestorage//lib/active_storage/service.rb#164 def instrument(operation, payload = T.unsafe(nil), &block); end # @raise [NotImplementedError] # - # source://activestorage//lib/active_storage/service.rb#150 + # source://activestorage//lib/active_storage/service.rb#152 def private_url(key, expires_in:, filename:, disposition:, content_type:, **_arg5); end # @raise [NotImplementedError] # - # source://activestorage//lib/active_storage/service.rb#154 + # source://activestorage//lib/active_storage/service.rb#156 def public_url(key, **_arg1); end - # source://activestorage//lib/active_storage/service.rb#168 + # source://activestorage//lib/active_storage/service.rb#170 def service_name; end class << self @@ -2777,14 +2895,14 @@ class ActiveStorage::Service # # See MirrorService for an example. # - # source://activestorage//lib/active_storage/service.rb#60 + # source://activestorage//lib/active_storage/service.rb#62 def build(configurator:, name:, service: T.unsafe(nil), **service_config); end # Configure an Active Storage service by name from a set of configurations, # typically loaded from a YAML file. The Active Storage engine uses this # to set the global Active Storage service when the app boots. # - # source://activestorage//lib/active_storage/service.rb#50 + # source://activestorage//lib/active_storage/service.rb#52 def configure(service_name, configurations); end end end @@ -2864,11 +2982,25 @@ end ActiveStorage::Streaming::DEFAULT_BLOB_STREAMING_DISPOSITION = T.let(T.unsafe(nil), String) -# source://activestorage//lib/active_storage.rb#367 +class ActiveStorage::TransformJob < ::ActiveStorage::BaseJob + def perform(blob, transformations); end + + class << self + # source://activejob/7.1.3.2/lib/active_job/queue_name.rb#55 + def queue_name; end + + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 + def rescue_handlers; end + end +end + +# source://activestorage//lib/active_storage.rb#383 module ActiveStorage::Transformers extend ::ActiveSupport::Autoload end +# = Active Storage \Transformers \Transformer +# # A Transformer applies a set of transformations to an image. # # The following concrete subclasses are included in Active Storage: @@ -2876,23 +3008,23 @@ end # * ActiveStorage::Transformers::ImageProcessingTransformer: # backed by ImageProcessing, a common interface for MiniMagick and ruby-vips # -# source://activestorage//lib/active_storage/transformers/transformer.rb#11 +# source://activestorage//lib/active_storage/transformers/transformer.rb#13 class ActiveStorage::Transformers::Transformer # @return [Transformer] a new instance of Transformer # - # source://activestorage//lib/active_storage/transformers/transformer.rb#14 + # source://activestorage//lib/active_storage/transformers/transformer.rb#16 def initialize(transformations); end # Applies the transformations to the source image in +file+, producing a target image in the # specified +format+. Yields an open Tempfile containing the target image. Closes and unlinks # the output tempfile after yielding to the given block. Returns the result of the block. # - # source://activestorage//lib/active_storage/transformers/transformer.rb#21 + # source://activestorage//lib/active_storage/transformers/transformer.rb#23 def transform(file, format:); end # Returns the value of attribute transformations. # - # source://activestorage//lib/active_storage/transformers/transformer.rb#12 + # source://activestorage//lib/active_storage/transformers/transformer.rb#14 def transformations; end private @@ -2902,7 +3034,7 @@ class ActiveStorage::Transformers::Transformer # # @raise [NotImplementedError] # - # source://activestorage//lib/active_storage/transformers/transformer.rb#34 + # source://activestorage//lib/active_storage/transformers/transformer.rb#36 def process(file, format:); end end @@ -2928,7 +3060,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) @@ -2936,153 +3068,119 @@ ActiveStorage::VERSION::STRING = T.let(T.unsafe(nil), String) # source://activestorage//lib/active_storage/gem_version.rb#12 ActiveStorage::VERSION::TINY = T.let(T.unsafe(nil), Integer) -class ActiveStorage::Variant - def initialize(blob, variation_or_variation_key); end - - def blob; end - def content_type(*_arg0, **_arg1, &_arg2); end - def content_type_for_serving(*_arg0, **_arg1, &_arg2); end - def download(&block); end - def filename; end - def forced_disposition_for_serving; end - def image; end - def key; end - def processed; end - def service(*_arg0, **_arg1, &_arg2); end - def url(expires_in: T.unsafe(nil), disposition: T.unsafe(nil)); end - def variation; end - - private - - def process; end - def processed?; end -end - class ActiveStorage::VariantRecord < ::ActiveStorage::Record include ::ActiveStorage::VariantRecord::GeneratedAttributeMethods include ::ActiveStorage::VariantRecord::GeneratedAssociationMethods - # source://activerecord/7.0.6/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_blob(*args); end - # source://activerecord/7.0.6/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_image_attachment(*args); end - # source://activerecord/7.0.6/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.2/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_image_blob(*args); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.2/lib/active_record/reflection.rb#11 def _reflections; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.3.2/lib/active_model/validations.rb#71 def _validators; end # source://activestorage//lib/active_storage/reflection.rb#53 def attachment_reflections; end - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 + # source://activerecord/7.1.3.2/lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.2/lib/active_record/scoping/named.rb#174 def with_attached_image(*args, **_arg1); end end end module ActiveStorage::VariantRecord::GeneratedAssociationMethods - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#103 def blob; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#111 def blob=(value); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/belongs_to.rb#132 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/belongs_to.rb#145 def blob_changed?; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/belongs_to.rb#136 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/belongs_to.rb#149 def blob_previously_changed?; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#28 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#32 def build_blob(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#28 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#32 def build_image_attachment(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#28 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#32 def build_image_blob(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#36 def create_blob(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#40 def create_blob!(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#36 def create_image_attachment(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#40 def create_image_attachment!(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#36 def create_image_blob(*args, &block); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#40 def create_image_blob!(*args, &block); end - # source://activestorage//lib/active_storage/attached/model.rb#55 + # source://activestorage//lib/active_storage/attached/model.rb#99 def image; end - # source://activestorage//lib/active_storage/attached/model.rb#60 + # source://activestorage//lib/active_storage/attached/model.rb#104 def image=(attachable); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#103 def image_attachment; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#111 def image_attachment=(value); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#103 def image_blob; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/association.rb#111 def image_blob=(value); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#19 def reload_blob; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#19 def reload_image_attachment; end - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#19 def reload_image_blob; end -end - -module ActiveStorage::VariantRecord::GeneratedAttributeMethods; end -class ActiveStorage::VariantWithRecord - def initialize(blob, variation); end + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#23 + def reset_blob; end - def blob; end - def download(*_arg0, **_arg1, &_arg2); end - def image; end - def key(*_arg0, **_arg1, &_arg2); end - def process; end - def processed; end - def processed?; end - def service(*_arg0, **_arg1, &_arg2); end - def url(*_arg0, **_arg1, &_arg2); end - def variation; end - - private + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#23 + def reset_image_attachment; end - def create_or_find_record(image:); end - def record; end - def transform_blob; end + # source://activerecord/7.1.3.2/lib/active_record/associations/builder/singular_association.rb#23 + def reset_image_blob; end end +module ActiveStorage::VariantRecord::GeneratedAttributeMethods; end + class ActiveStorage::Variation def initialize(transformations); end diff --git a/sorbet/rbi/gems/activesupport@7.0.6.rbi b/sorbet/rbi/gems/activesupport@7.1.3.2.rbi similarity index 78% rename from sorbet/rbi/gems/activesupport@7.0.6.rbi rename to sorbet/rbi/gems/activesupport@7.1.3.2.rbi index a82a3765e..bd9458ba1 100644 --- a/sorbet/rbi/gems/activesupport@7.0.6.rbi +++ b/sorbet/rbi/gems/activesupport@7.1.3.2.rbi @@ -4,7 +4,9 @@ # This is an autogenerated file for types exported from the `activesupport` gem. # Please instead update this file by running `bin/tapioca gem activesupport`. -# source://activesupport//lib/active_support/lazy_load_hooks.rb#3 +# :include: activesupport/README.rdoc +# +# source://activesupport//lib/active_support/deep_mergeable.rb#3 module ActiveSupport extend ::ActiveSupport::LazyLoadHooks extend ::ActiveSupport::Autoload @@ -15,32 +17,35 @@ module ActiveSupport # source://activesupport//lib/active_support/json/decoding.rb#9 def parse_json_times=(val); end - # source://activesupport//lib/active_support.rb#94 + # source://activesupport//lib/active_support.rb#98 def test_order; end - # source://activesupport//lib/active_support.rb#94 + # source://activesupport//lib/active_support.rb#98 def test_order=(val); end - # source://activesupport//lib/active_support.rb#95 + # source://activesupport//lib/active_support.rb#99 def test_parallelization_threshold; end - # source://activesupport//lib/active_support.rb#95 + # source://activesupport//lib/active_support.rb#99 def test_parallelization_threshold=(val); end class << self - # source://activesupport//lib/active_support.rb#99 + # source://activesupport//lib/active_support.rb#104 def cache_format_version; end - # source://activesupport//lib/active_support.rb#103 + # source://activesupport//lib/active_support.rb#108 def cache_format_version=(value); end - # source://activesupport//lib/active_support.rb#88 + # source://activesupport//lib/active_support/deprecator.rb#4 + def deprecator; end + + # source://activesupport//lib/active_support.rb#92 def eager_load!; end - # source://activesupport//lib/active_support.rb#97 + # source://activesupport//lib/active_support.rb#102 def error_reporter; end - # source://activesupport//lib/active_support.rb#97 + # source://activesupport//lib/active_support.rb#102 def error_reporter=(_arg0); end # source://activesupport//lib/active_support/json/encoding.rb#8 @@ -49,7 +54,7 @@ module ActiveSupport # source://activesupport//lib/active_support/json/encoding.rb#8 def escape_html_entities_in_json=(arg); end - # Returns the currently loaded version of Active Support as a Gem::Version. + # Returns the currently loaded version of Active Support as a +Gem::Version+. # # source://activesupport//lib/active_support/gem_version.rb#5 def gem_version; end @@ -66,16 +71,16 @@ module ActiveSupport # source://activesupport//lib/active_support/json/decoding.rb#9 def parse_json_times=(val); end - # source://activesupport//lib/active_support.rb#94 + # source://activesupport//lib/active_support.rb#98 def test_order; end - # source://activesupport//lib/active_support.rb#94 + # source://activesupport//lib/active_support.rb#98 def test_order=(val); end - # source://activesupport//lib/active_support.rb#95 + # source://activesupport//lib/active_support.rb#99 def test_parallelization_threshold; end - # source://activesupport//lib/active_support.rb#95 + # source://activesupport//lib/active_support.rb#99 def test_parallelization_threshold=(val); end # source://activesupport//lib/active_support/json/encoding.rb#8 @@ -84,10 +89,10 @@ module ActiveSupport # source://activesupport//lib/active_support/json/encoding.rb#8 def time_precision=(arg); end - # source://activesupport//lib/active_support.rb#107 + # source://activesupport//lib/active_support.rb#112 def to_time_preserves_timezone; end - # source://activesupport//lib/active_support.rb#111 + # source://activesupport//lib/active_support.rb#116 def to_time_preserves_timezone=(value); end # source://activesupport//lib/active_support/json/encoding.rb#8 @@ -96,26 +101,28 @@ module ActiveSupport # source://activesupport//lib/active_support/json/encoding.rb#8 def use_standard_json_time_format=(arg); end - # source://activesupport//lib/active_support.rb#115 + # source://activesupport//lib/active_support.rb#126 def utc_to_local_returns_utc_offset_times; end - # source://activesupport//lib/active_support.rb#119 + # source://activesupport//lib/active_support.rb#130 def utc_to_local_returns_utc_offset_times=(value); end - # Returns the currently loaded version of Active Support as a Gem::Version. + # Returns the currently loaded version of Active Support as a +Gem::Version+. # # source://activesupport//lib/active_support/version.rb#7 def version; end end end +# = Actionable Errors +# # Actionable errors lets you define actions to resolve an error. # -# To make an error actionable, include the ActiveSupport::ActionableError +# To make an error actionable, include the +ActiveSupport::ActionableError+ # module and invoke the +action+ class macro to define the action. An action # needs a name and a block to execute. # -# source://activesupport//lib/active_support/actionable_error.rb#9 +# source://activesupport//lib/active_support/actionable_error.rb#11 module ActiveSupport::ActionableError extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -124,10 +131,10 @@ module ActiveSupport::ActionableError mixes_in_class_methods ::ActiveSupport::ActionableError::ClassMethods class << self - # source://activesupport//lib/active_support/actionable_error.rb#18 + # source://activesupport//lib/active_support/actionable_error.rb#20 def actions(error); end - # source://activesupport//lib/active_support/actionable_error.rb#27 + # source://activesupport//lib/active_support/actionable_error.rb#29 def dispatch(error, name); end end @@ -144,7 +151,7 @@ module ActiveSupport::ActionableError end end -# source://activesupport//lib/active_support/actionable_error.rb#33 +# source://activesupport//lib/active_support/actionable_error.rb#35 module ActiveSupport::ActionableError::ClassMethods # Defines an action that can resolve the error. # @@ -156,13 +163,15 @@ module ActiveSupport::ActionableError::ClassMethods # end # end # - # source://activesupport//lib/active_support/actionable_error.rb#43 + # source://activesupport//lib/active_support/actionable_error.rb#45 def action(name, &block); end end -# source://activesupport//lib/active_support/actionable_error.rb#12 +# source://activesupport//lib/active_support/actionable_error.rb#14 class ActiveSupport::ActionableError::NonActionable < ::StandardError; end +# = \Array Inquirer +# # Wrapping an array in an +ArrayInquirer+ gives a friendlier way to check # its string-like contents: # @@ -172,7 +181,7 @@ class ActiveSupport::ActionableError::NonActionable < ::StandardError; end # variants.tablet? # => true # variants.desktop? # => false # -# source://activesupport//lib/active_support/array_inquirer.rb#12 +# source://activesupport//lib/active_support/array_inquirer.rb#14 class ActiveSupport::ArrayInquirer < ::Array # Passes each element of +candidates+ collection to ArrayInquirer collection. # The method returns true if any element from the ArrayInquirer collection @@ -189,24 +198,26 @@ class ActiveSupport::ArrayInquirer < ::Array # # @return [Boolean] # - # source://activesupport//lib/active_support/array_inquirer.rb#25 + # source://activesupport//lib/active_support/array_inquirer.rb#27 def any?(*candidates); end private - # source://activesupport//lib/active_support/array_inquirer.rb#40 + # source://activesupport//lib/active_support/array_inquirer.rb#42 def method_missing(name, *args); end # @return [Boolean] # - # source://activesupport//lib/active_support/array_inquirer.rb#36 + # source://activesupport//lib/active_support/array_inquirer.rb#38 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end +# = Active Support \Autoload +# # Autoload and eager load conveniences for your library. # # This module allows you to define autoloads based on -# Rails conventions (i.e. no need to define the path +# \Rails conventions (i.e. no need to define the path # it is automatically guessed based on the filename) # and also define a set of constants that needs to be # eager loaded: @@ -225,32 +236,31 @@ end # # MyLib.eager_load! # -# source://activesupport//lib/active_support/dependencies/autoload.rb#27 +# source://activesupport//lib/active_support/dependencies/autoload.rb#29 module ActiveSupport::Autoload - # source://activesupport//lib/active_support/dependencies/autoload.rb#37 + # source://activesupport//lib/active_support/dependencies/autoload.rb#42 def autoload(const_name, path = T.unsafe(nil)); end - # source://activesupport//lib/active_support/dependencies/autoload.rb#57 + # source://activesupport//lib/active_support/dependencies/autoload.rb#63 def autoload_at(path); end - # source://activesupport//lib/active_support/dependencies/autoload.rb#50 + # source://activesupport//lib/active_support/dependencies/autoload.rb#56 def autoload_under(path); end - # source://activesupport//lib/active_support/dependencies/autoload.rb#75 - def autoloads; end - - # source://activesupport//lib/active_support/dependencies/autoload.rb#64 + # source://activesupport//lib/active_support/dependencies/autoload.rb#70 def eager_autoload; end - # source://activesupport//lib/active_support/dependencies/autoload.rb#71 + # source://activesupport//lib/active_support/dependencies/autoload.rb#77 def eager_load!; end class << self - # source://activesupport//lib/active_support/dependencies/autoload.rb#28 + # source://activesupport//lib/active_support/dependencies/autoload.rb#30 def extended(base); end end end +# = Backtrace Cleaner +# # Backtraces often include many lines that are not relevant for the context # under review. This makes it hard to find the signal amongst the backtrace # noise, and adds debugging time. With a BacktraceCleaner, filters and @@ -269,7 +279,7 @@ end # bc.add_silencer { |line| /puma|rubygems/.match?(line) } # skip any lines from puma or rubygems # bc.clean(exception.backtrace) # perform the cleanup # -# To reconfigure an existing BacktraceCleaner (like the default one in Rails) +# To reconfigure an existing BacktraceCleaner (like the default one in \Rails) # and show as much data as possible, you can always call # BacktraceCleaner#remove_silencers!, which will restore the # backtrace to a pristine state. If you need to reconfigure an existing @@ -279,20 +289,20 @@ end # # Inspired by the Quiet Backtrace gem by thoughtbot. # -# source://activesupport//lib/active_support/backtrace_cleaner.rb#31 +# source://activesupport//lib/active_support/backtrace_cleaner.rb#33 class ActiveSupport::BacktraceCleaner # @return [BacktraceCleaner] a new instance of BacktraceCleaner # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#32 + # source://activesupport//lib/active_support/backtrace_cleaner.rb#34 def initialize; end # Adds a filter from the block provided. Each line in the backtrace will be # mapped against this filter. # # # Will turn "/my/rails/root/app/models/person.rb" into "/app/models/person.rb" - # backtrace_cleaner.add_filter { |line| line.gsub(Rails.root, '') } + # backtrace_cleaner.add_filter { |line| line.gsub(Rails.root.to_s, '') } # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#60 + # source://activesupport//lib/active_support/backtrace_cleaner.rb#80 def add_filter(&block); end # Adds a silencer from the block provided. If the silencer returns +true+ @@ -301,60 +311,68 @@ class ActiveSupport::BacktraceCleaner # # Will reject all lines that include the word "puma", like "/gems/puma/server.rb" or "/app/my_puma_server/rb" # backtrace_cleaner.add_silencer { |line| /puma/.match?(line) } # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#69 + # source://activesupport//lib/active_support/backtrace_cleaner.rb#89 def add_silencer(&block); end # Returns the backtrace after all filters and silencers have been run # against it. Filters run first, then silencers. # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#41 + # source://activesupport//lib/active_support/backtrace_cleaner.rb#43 def clean(backtrace, kind = T.unsafe(nil)); end + # Returns the frame with all filters applied. + # returns +nil+ if the frame was silenced. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#59 + def clean_frame(frame, kind = T.unsafe(nil)); end + # Returns the backtrace after all filters and silencers have been run # against it. Filters run first, then silencers. # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#41 + # source://activesupport//lib/active_support/backtrace_cleaner.rb#43 def filter(backtrace, kind = T.unsafe(nil)); end # Removes all filters, but leaves in the silencers. Useful if you suddenly # need to see entire filepaths in the backtrace that you had already # filtered out. # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#83 + # source://activesupport//lib/active_support/backtrace_cleaner.rb#103 def remove_filters!; end # Removes all silencers, but leaves in the filters. Useful if your # context of debugging suddenly expands as you suspect a bug in one of # the libraries you use. # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#76 + # source://activesupport//lib/active_support/backtrace_cleaner.rb#96 def remove_silencers!; end private - # source://activesupport//lib/active_support/backtrace_cleaner.rb#90 + # source://activesupport//lib/active_support/backtrace_cleaner.rb#110 def add_gem_filter; end - # source://activesupport//lib/active_support/backtrace_cleaner.rb#99 + # source://activesupport//lib/active_support/backtrace_cleaner.rb#119 def add_gem_silencer; end - # source://activesupport//lib/active_support/backtrace_cleaner.rb#103 + # source://activesupport//lib/active_support/backtrace_cleaner.rb#123 def add_stdlib_silencer; end - # source://activesupport//lib/active_support/backtrace_cleaner.rb#107 + # source://activesupport//lib/active_support/backtrace_cleaner.rb#127 def filter_backtrace(backtrace); end - # source://activesupport//lib/active_support/backtrace_cleaner.rb#123 + # source://activesupport//lib/active_support/backtrace_cleaner.rb#143 def noise(backtrace); end - # source://activesupport//lib/active_support/backtrace_cleaner.rb#115 + # source://activesupport//lib/active_support/backtrace_cleaner.rb#135 def silence(backtrace); end end -# source://activesupport//lib/active_support/backtrace_cleaner.rb#88 +# source://activesupport//lib/active_support/backtrace_cleaner.rb#108 ActiveSupport::BacktraceCleaner::FORMATTED_GEMS_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://activesupport//lib/active_support/benchmarkable.rb#7 +# = \Benchmarkable +# +# source://activesupport//lib/active_support/benchmarkable.rb#8 module ActiveSupport::Benchmarkable # Allows you to measure the execution time of a block in a template and # records the result to the log. Wrap this block around expensive operations @@ -386,7 +404,7 @@ module ActiveSupport::Benchmarkable # <%= expensive_and_chatty_files_operation %> # <% end %> # - # source://activesupport//lib/active_support/benchmarkable.rb#37 + # source://activesupport//lib/active_support/benchmarkable.rb#38 def benchmark(message = T.unsafe(nil), options = T.unsafe(nil), &block); end end @@ -396,9 +414,272 @@ module ActiveSupport::BigDecimalWithDefaultFormat def to_s(format = T.unsafe(nil)); end end +# = Active Support Broadcast Logger +# +# The Broadcast logger is a logger used to write messages to multiple IO. It is commonly used +# in development to display messages on STDOUT and also write them to a file (development.log). +# With the Broadcast logger, you can broadcast your logs to a unlimited number of sinks. +# +# The BroadcastLogger acts as a standard logger and all methods you are used to are available. +# However, all the methods on this logger will propagate and be delegated to the other loggers +# that are part of the broadcast. +# +# Broadcasting your logs. +# +# stdout_logger = Logger.new(STDOUT) +# file_logger = Logger.new("development.log") +# broadcast = BroadcastLogger.new(stdout_logger, file_logger) +# +# broadcast.info("Hello world!") # Writes the log to STDOUT and the development.log file. +# +# Add a logger to the broadcast. +# +# stdout_logger = Logger.new(STDOUT) +# broadcast = BroadcastLogger.new(stdout_logger) +# file_logger = Logger.new("development.log") +# broadcast.broadcast_to(file_logger) +# +# broadcast.info("Hello world!") # Writes the log to STDOUT and the development.log file. +# +# Modifying the log level for all broadcasted loggers. +# +# stdout_logger = Logger.new(STDOUT) +# file_logger = Logger.new("development.log") +# broadcast = BroadcastLogger.new(stdout_logger, file_logger) +# +# broadcast.level = Logger::FATAL # Modify the log level for the whole broadcast. +# +# Stop broadcasting log to a sink. +# +# stdout_logger = Logger.new(STDOUT) +# file_logger = Logger.new("development.log") +# broadcast = BroadcastLogger.new(stdout_logger, file_logger) +# broadcast.info("Hello world!") # Writes the log to STDOUT and the development.log file. +# +# broadcast.stop_broadcasting_to(file_logger) +# broadcast.info("Hello world!") # Writes the log *only* to STDOUT. +# +# At least one sink has to be part of the broadcast. Otherwise, your logs will not +# be written anywhere. For instance: +# +# broadcast = BroadcastLogger.new +# broadcast.info("Hello world") # The log message will appear nowhere. +# +# If you are adding a custom logger with custom methods to the broadcast, +# the `BroadcastLogger` will proxy them and return the raw value, or an array +# of raw values, depending on how many loggers in the broadcasts responded to +# the method: +# +# class MyLogger < ::Logger +# def loggable? +# true +# end +# end +# +# logger = BroadcastLogger.new +# logger.loggable? # => A NoMethodError exception is raised because no loggers in the broadcasts could respond. +# +# logger.broadcast_to(MyLogger.new(STDOUT)) +# logger.loggable? # => true +# logger.broadcast_to(MyLogger.new(STDOUT)) +# puts logger.broadcasts # => [MyLogger, MyLogger] +# logger.loggable? # [true, true] +# +# source://activesupport//lib/active_support/broadcast_logger.rb#74 +class ActiveSupport::BroadcastLogger + include ::ActiveSupport::LoggerSilence + include ::ActiveSupport::LoggerThreadSafeLevel + + # @return [BroadcastLogger] a new instance of BroadcastLogger + # + # source://activesupport//lib/active_support/broadcast_logger.rb#82 + def initialize(*loggers); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#112 + def <<(message); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#116 + def add(*args, &block); end + + # Add logger(s) to the broadcast. + # + # broadcast_logger = ActiveSupport::BroadcastLogger.new + # broadcast_logger.broadcast_to(Logger.new(STDOUT), Logger.new(STDERR)) + # + # source://activesupport//lib/active_support/broadcast_logger.rb#93 + def broadcast_to(*loggers); end + + # Returns all the logger that are part of this broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#78 + def broadcasts; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#162 + def close; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#121 + def debug(*args, &block); end + + # Sets the log level to Logger::DEBUG for the whole broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#173 + def debug!; end + + # +True+ if the log level allows entries with severity Logger::DEBUG to be written + # to at least one broadcast. +False+ otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#168 + def debug?; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#133 + def error(*args, &block); end + + # Sets the log level to Logger::ERROR for the whole broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#206 + def error!; end + + # +True+ if the log level allows entries with severity Logger::ERROR to be written + # to at least one broadcast. +False+ otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#201 + def error?; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#137 + def fatal(*args, &block); end + + # Sets the log level to Logger::FATAL for the whole broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#217 + def fatal!; end + + # +True+ if the log level allows entries with severity Logger::FATAL to be written + # to at least one broadcast. +False+ otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#212 + def fatal?; end + + # Returns the value of attribute formatter. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#79 + def formatter; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#145 + def formatter=(formatter); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#125 + def info(*args, &block); end + + # Sets the log level to Logger::INFO for the whole broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#184 + def info!; end + + # +True+ if the log level allows entries with severity Logger::INFO to be written + # to at least one broadcast. +False+ otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#179 + def info?; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#108 + def level; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#151 + def level=(level); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#156 + def local_level=(level); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#116 + def log(*args, &block); end + + # Returns the value of attribute progname. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#80 + def progname; end + + # Sets the attribute progname + # + # @param value the value to set the attribute progname to. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#80 + def progname=(_arg0); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#151 + def sev_threshold=(level); end + + # source://activesupport//lib/active_support/logger_silence.rb#12 + def silencer; end + + # source://activesupport//lib/active_support/logger_silence.rb#12 + def silencer=(val); end + + # Remove a logger from the broadcast. When a logger is removed, messages sent to + # the broadcast will no longer be written to its sink. + # + # sink = Logger.new(STDOUT) + # broadcast_logger = ActiveSupport::BroadcastLogger.new + # + # broadcast_logger.stop_broadcasting_to(sink) + # + # source://activesupport//lib/active_support/broadcast_logger.rb#104 + def stop_broadcasting_to(logger); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#141 + def unknown(*args, &block); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#129 + def warn(*args, &block); end + + # Sets the log level to Logger::WARN for the whole broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#195 + def warn!; end + + # +True+ if the log level allows entries with severity Logger::WARN to be written + # to at least one broadcast. +False+ otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#190 + def warn?; end + + private + + # source://activesupport//lib/active_support/broadcast_logger.rb#230 + def dispatch(&block); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#221 + def initialize_copy(other); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#234 + def method_missing(name, *args, **kwargs, &block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#246 + def respond_to_missing?(method, include_all); end + + class << self + # source://activesupport//lib/active_support/logger_silence.rb#12 + def silencer; end + + # source://activesupport//lib/active_support/logger_silence.rb#12 + def silencer=(val); end + end +end + # See ActiveSupport::Cache::Store for documentation. # -# source://activesupport//lib/active_support/cache.rb#16 +# source://activesupport//lib/active_support/cache/entry.rb#6 module ActiveSupport::Cache class << self # Expands out the +key+ argument into a key that can be used for the @@ -414,19 +695,19 @@ module ActiveSupport::Cache # # The +key+ argument can also respond to +cache_key+ or +to_param+. # - # source://activesupport//lib/active_support/cache.rb#100 + # source://activesupport//lib/active_support/cache.rb#117 def expand_cache_key(key, namespace = T.unsafe(nil)); end # Returns the value of attribute format_version. # - # source://activesupport//lib/active_support/cache.rb#41 + # source://activesupport//lib/active_support/cache.rb#58 def format_version; end # Sets the attribute format_version # # @param value the value to set the attribute format_version to. # - # source://activesupport//lib/active_support/cache.rb#41 + # source://activesupport//lib/active_support/cache.rb#58 def format_version=(_arg0); end # Creates a new Store object according to the given options. @@ -455,87 +736,127 @@ module ActiveSupport::Cache # ActiveSupport::Cache.lookup_store(MyOwnCacheStore.new) # # => returns MyOwnCacheStore.new # - # source://activesupport//lib/active_support/cache.rb#68 + # source://activesupport//lib/active_support/cache.rb#85 def lookup_store(store = T.unsafe(nil), *parameters); end private - # source://activesupport//lib/active_support/cache.rb#112 + # source://activesupport//lib/active_support/cache.rb#129 def retrieve_cache_key(key); end # Obtains the specified cache store class, given the name of the +store+. # Raises an error when the store class cannot be found. # - # source://activesupport//lib/active_support/cache.rb#124 + # source://activesupport//lib/active_support/cache.rb#141 def retrieve_store_class(store); end end end -# source://activesupport//lib/active_support/cache.rb#833 -module ActiveSupport::Cache::Coders - class << self - # source://activesupport//lib/active_support/cache.rb#839 - def [](version); end - end -end +# source://activesupport//lib/active_support/cache/coder.rb#7 +class ActiveSupport::Cache::Coder + # @return [Coder] a new instance of Coder + # + # source://activesupport//lib/active_support/cache/coder.rb#8 + def initialize(serializer, compressor, legacy_serializer: T.unsafe(nil)); end -# source://activesupport//lib/active_support/cache.rb#851 -module ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Loader + # source://activesupport//lib/active_support/cache/coder.rb#14 + def dump(entry); end - # source://activesupport//lib/active_support/cache.rb#854 - def load(payload); end -end + # source://activesupport//lib/active_support/cache/coder.rb#20 + def dump_compressed(entry, threshold); end -# The one set by Marshal. -# -# source://activesupport//lib/active_support/cache.rb#834 -ActiveSupport::Cache::Coders::MARK_61 = T.let(T.unsafe(nil), String) + # source://activesupport//lib/active_support/cache/coder.rb#48 + def load(dumped); end -# source://activesupport//lib/active_support/cache.rb#836 -ActiveSupport::Cache::Coders::MARK_70_COMPRESSED = T.let(T.unsafe(nil), String) + private -# source://activesupport//lib/active_support/cache.rb#835 -ActiveSupport::Cache::Coders::MARK_70_UNCOMPRESSED = T.let(T.unsafe(nil), String) + # source://activesupport//lib/active_support/cache/coder.rb#136 + def dump_version(version); end -# source://activesupport//lib/active_support/cache.rb#874 -module ActiveSupport::Cache::Coders::Rails61Coder - include ::ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Rails61Coder + # source://activesupport//lib/active_support/cache/coder.rb#144 + def load_version(dumped_version); end - # source://activesupport//lib/active_support/cache.rb#878 - def dump(entry); end + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/coder.rb#121 + def signature?(dumped); end - # source://activesupport//lib/active_support/cache.rb#882 - def dump_compressed(entry, threshold); end + # source://activesupport//lib/active_support/cache/coder.rb#129 + def try_compress(string, threshold); end + + # source://activesupport//lib/active_support/cache/coder.rb#125 + def type_for_string(value); end end -# source://activesupport//lib/active_support/cache.rb#887 -module ActiveSupport::Cache::Coders::Rails70Coder - include ::ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Rails70Coder +# source://activesupport//lib/active_support/cache/coder.rb#76 +ActiveSupport::Cache::Coder::COMPRESSED_FLAG = T.let(T.unsafe(nil), Integer) - # source://activesupport//lib/active_support/cache.rb#891 - def dump(entry); end +# source://activesupport//lib/active_support/cache/coder.rb#98 +class ActiveSupport::Cache::Coder::LazyEntry < ::ActiveSupport::Cache::Entry + # @return [LazyEntry] a new instance of LazyEntry + # + # source://activesupport//lib/active_support/cache/coder.rb#99 + def initialize(serializer, compressor, payload, **options); end - # source://activesupport//lib/active_support/cache.rb#895 - def dump_compressed(entry, threshold); end + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/coder.rb#114 + def mismatched?(version); end + + # source://activesupport//lib/active_support/cache/coder.rb#106 + def value; end end -# source://activesupport//lib/active_support/cache/redis_cache_store.rb#26 -module ActiveSupport::Cache::ConnectionPoolLike - # @yield [_self] - # @yieldparam _self [ActiveSupport::Cache::ConnectionPoolLike] the object that the method was called on +# source://activesupport//lib/active_support/cache/coder.rb#84 +ActiveSupport::Cache::Coder::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#68 +ActiveSupport::Cache::Coder::OBJECT_DUMP_TYPE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/cache/coder.rb#80 +ActiveSupport::Cache::Coder::PACKED_EXPIRES_AT_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#78 +ActiveSupport::Cache::Coder::PACKED_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#79 +ActiveSupport::Cache::Coder::PACKED_TYPE_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#82 +ActiveSupport::Cache::Coder::PACKED_VERSION_INDEX = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/cache/coder.rb#81 +ActiveSupport::Cache::Coder::PACKED_VERSION_LENGTH_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#66 +ActiveSupport::Cache::Coder::SIGNATURE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#96 +ActiveSupport::Cache::Coder::STRING_DESERIALIZERS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/cache/coder.rb#70 +ActiveSupport::Cache::Coder::STRING_ENCODINGS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/cache/coder.rb#86 +class ActiveSupport::Cache::Coder::StringDeserializer + # @return [StringDeserializer] a new instance of StringDeserializer # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#27 - def with; end + # source://activesupport//lib/active_support/cache/coder.rb#87 + def initialize(encoding); end + + # source://activesupport//lib/active_support/cache/coder.rb#91 + def load(payload); end end -# source://activesupport//lib/active_support/cache.rb#27 +# source://activesupport//lib/active_support/cache.rb#45 ActiveSupport::Cache::DEFAULT_COMPRESS_LIMIT = T.let(T.unsafe(nil), Integer) +# Raised by coders when the cache entry can't be deserialized. +# This error is treated as a cache miss. +# +# source://activesupport//lib/active_support/cache.rb#49 +class ActiveSupport::Cache::DeserializationError < ::StandardError; end + # This class is used to represent cache entries. Cache entries have a value, an optional # expiration time, and an optional version. The expiration time is used to support the :race_condition_ttl option # on the cache. The version is used to support the :version option on the cache for rejecting @@ -544,34 +865,34 @@ ActiveSupport::Cache::DEFAULT_COMPRESS_LIMIT = T.let(T.unsafe(nil), Integer) # Since cache entries in most instances will be serialized, the internals of this class are highly optimized # using short instance variable names that are lazily defined. # -# source://activesupport//lib/active_support/cache.rb#916 +# source://activesupport//lib/active_support/cache/entry.rb#14 class ActiveSupport::Cache::Entry # Creates a new cache entry for the specified value. Options supported are # +:compressed+, +:version+, +:expires_at+ and +:expires_in+. # # @return [Entry] a new instance of Entry # - # source://activesupport//lib/active_support/cache.rb#927 + # source://activesupport//lib/active_support/cache/entry.rb#25 def initialize(value, compressed: T.unsafe(nil), version: T.unsafe(nil), expires_in: T.unsafe(nil), expires_at: T.unsafe(nil), **_arg5); end # Returns the size of the cached value. This could be less than # value.bytesize if the data is compressed. # - # source://activesupport//lib/active_support/cache.rb#963 + # source://activesupport//lib/active_support/cache/entry.rb#61 def bytesize; end - # source://activesupport//lib/active_support/cache.rb#978 + # source://activesupport//lib/active_support/cache/entry.rb#76 def compressed(compress_threshold); end # @return [Boolean] # - # source://activesupport//lib/active_support/cache.rb#974 + # source://activesupport//lib/active_support/cache/entry.rb#72 def compressed?; end # Duplicates the value in a class. This is used by cache implementations that don't natively # serialize entries to protect against accidental cache modifications. # - # source://activesupport//lib/active_support/cache.rb#1008 + # source://activesupport//lib/active_support/cache/entry.rb#106 def dup_value!; end # Checks if the entry is expired. The +expires_in+ parameter can override @@ -579,140 +900,162 @@ class ActiveSupport::Cache::Entry # # @return [Boolean] # - # source://activesupport//lib/active_support/cache.rb#945 + # source://activesupport//lib/active_support/cache/entry.rb#43 def expired?; end - # source://activesupport//lib/active_support/cache.rb#949 + # source://activesupport//lib/active_support/cache/entry.rb#47 def expires_at; end - # source://activesupport//lib/active_support/cache.rb#953 + # source://activesupport//lib/active_support/cache/entry.rb#51 def expires_at=(value); end # @return [Boolean] # - # source://activesupport//lib/active_support/cache.rb#1002 + # source://activesupport//lib/active_support/cache/entry.rb#100 def local?; end # @return [Boolean] # - # source://activesupport//lib/active_support/cache.rb#939 + # source://activesupport//lib/active_support/cache/entry.rb#37 def mismatched?(version); end - # source://activesupport//lib/active_support/cache.rb#1018 + # source://activesupport//lib/active_support/cache/entry.rb#116 def pack; end - # source://activesupport//lib/active_support/cache.rb#935 + # source://activesupport//lib/active_support/cache/entry.rb#33 def value; end # Returns the value of attribute version. # - # source://activesupport//lib/active_support/cache.rb#923 + # source://activesupport//lib/active_support/cache/entry.rb#21 def version; end private - # source://activesupport//lib/active_support/cache.rb#1025 + # source://activesupport//lib/active_support/cache/entry.rb#127 + def marshal_load(payload); end + + # source://activesupport//lib/active_support/cache/entry.rb#123 def uncompress(value); end class << self - # source://activesupport//lib/active_support/cache.rb#918 + # source://activesupport//lib/active_support/cache/entry.rb#16 def unpack(members); end end end -# A cache store implementation which stores everything on the filesystem. +# = \File \Cache \Store # -# FileStore implements the Strategy::LocalCache strategy which implements -# an in-memory cache inside of a block. +# A cache store implementation which stores everything on the filesystem. # -# source://activesupport//lib/active_support/cache/file_store.rb#13 +# source://activesupport//lib/active_support/cache/file_store.rb#12 class ActiveSupport::Cache::FileStore < ::ActiveSupport::Cache::Store # @return [FileStore] a new instance of FileStore # - # source://activesupport//lib/active_support/cache/file_store.rb#21 + # source://activesupport//lib/active_support/cache/file_store.rb#20 def initialize(cache_path, **options); end # Returns the value of attribute cache_path. # - # source://activesupport//lib/active_support/cache/file_store.rb#14 + # source://activesupport//lib/active_support/cache/file_store.rb#13 def cache_path; end # Preemptively iterates through all stored keys and removes the ones which have expired. # - # source://activesupport//lib/active_support/cache/file_store.rb#41 + # source://activesupport//lib/active_support/cache/file_store.rb#40 def cleanup(options = T.unsafe(nil)); end # Deletes all items from the cache. In this case it deletes all the entries in the specified # file store directory except for .keep or .gitkeep. Be careful which directory is specified in your # config file when using +FileStore+ because everything in that directory will be deleted. # - # source://activesupport//lib/active_support/cache/file_store.rb#34 + # source://activesupport//lib/active_support/cache/file_store.rb#33 def clear(options = T.unsafe(nil)); end - # Decrements an already existing integer value that is stored in the cache. - # If the key is not found nothing is done. + # Decrement a cached integer value. Returns the updated value. + # + # If the key is unset, it will be set to +-amount+. + # + # cache.decrement("foo") # => -1 # - # source://activesupport//lib/active_support/cache/file_store.rb#57 + # To set a specific value, call #write: + # + # cache.write("baz", 5) + # cache.decrement("baz") # => 4 + # + # source://activesupport//lib/active_support/cache/file_store.rb#75 def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache/file_store.rb#61 + # source://activesupport//lib/active_support/cache/file_store.rb#79 def delete_matched(matcher, options = T.unsafe(nil)); end - # Increments an already existing integer value that is stored in the cache. - # If the key is not found nothing is done. + # Increment a cached integer value. Returns the updated value. + # + # If the key is unset, it starts from +0+: + # + # cache.increment("foo") # => 1 + # cache.increment("bar", 100) # => 100 # - # source://activesupport//lib/active_support/cache/file_store.rb#51 + # To set a specific value, call #write: + # + # cache.write("baz", 5) + # cache.increment("baz") # => 6 + # + # source://activesupport//lib/active_support/cache/file_store.rb#60 def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + # source://activesupport//lib/active_support/cache/file_store.rb#90 + def inspect; end + private # Delete empty directories in the cache. # - # source://activesupport//lib/active_support/cache/file_store.rb#160 + # source://activesupport//lib/active_support/cache/file_store.rb#184 def delete_empty_directories(dir); end - # source://activesupport//lib/active_support/cache/file_store.rb#98 + # source://activesupport//lib/active_support/cache/file_store.rb#120 def delete_entry(key, **options); end # Make sure a file path's directories exist. # - # source://activesupport//lib/active_support/cache/file_store.rb#169 + # source://activesupport//lib/active_support/cache/file_store.rb#193 def ensure_cache_path(path); end # Translate a file path into a key. # - # source://activesupport//lib/active_support/cache/file_store.rb#154 + # source://activesupport//lib/active_support/cache/file_store.rb#178 def file_path_key(path); end # Lock a file for a block so only one process can modify it at a time. # - # source://activesupport//lib/active_support/cache/file_store.rb#113 + # source://activesupport//lib/active_support/cache/file_store.rb#137 def lock_file(file_name, &block); end - # Modifies the amount of an already existing integer value that is stored in the cache. - # If the key is not found nothing is done. + # Modifies the amount of an integer value that is stored in the cache. + # If the key is not found it is created and set to +amount+. # - # source://activesupport//lib/active_support/cache/file_store.rb#187 + # source://activesupport//lib/active_support/cache/file_store.rb#211 def modify_value(name, amount, options); end # Translate a key into a file path. # - # source://activesupport//lib/active_support/cache/file_store.rb#127 + # source://activesupport//lib/active_support/cache/file_store.rb#151 def normalize_key(key, options); end - # source://activesupport//lib/active_support/cache/file_store.rb#73 + # source://activesupport//lib/active_support/cache/file_store.rb#95 def read_entry(key, **options); end - # source://activesupport//lib/active_support/cache/file_store.rb#80 + # source://activesupport//lib/active_support/cache/file_store.rb#102 def read_serialized_entry(key, **_arg1); end - # source://activesupport//lib/active_support/cache/file_store.rb#173 + # source://activesupport//lib/active_support/cache/file_store.rb#197 def search_dir(dir, &callback); end - # source://activesupport//lib/active_support/cache/file_store.rb#87 + # source://activesupport//lib/active_support/cache/file_store.rb#109 def write_entry(key, entry, **options); end - # source://activesupport//lib/active_support/cache/file_store.rb#91 + # source://activesupport//lib/active_support/cache/file_store.rb#113 def write_serialized_entry(key, payload, **options); end class << self @@ -720,31 +1063,33 @@ class ActiveSupport::Cache::FileStore < ::ActiveSupport::Cache::Store # # @return [Boolean] # - # source://activesupport//lib/active_support/cache/file_store.rb#27 + # source://activesupport//lib/active_support/cache/file_store.rb#26 def supports_cache_versioning?; end end end -# source://activesupport//lib/active_support/cache/file_store.rb#16 +# source://activesupport//lib/active_support/cache/file_store.rb#15 ActiveSupport::Cache::FileStore::DIR_FORMATTER = T.let(T.unsafe(nil), String) # max filename size on file system is 255, minus room for timestamp, pid, and random characters appended by Tempfile (used by atomic write) # -# source://activesupport//lib/active_support/cache/file_store.rb#17 +# source://activesupport//lib/active_support/cache/file_store.rb#16 ActiveSupport::Cache::FileStore::FILENAME_MAX_SIZE = T.let(T.unsafe(nil), Integer) # max is 1024, plus some room # -# source://activesupport//lib/active_support/cache/file_store.rb#18 +# source://activesupport//lib/active_support/cache/file_store.rb#17 ActiveSupport::Cache::FileStore::FILEPATH_MAX_SIZE = T.let(T.unsafe(nil), Integer) -# source://activesupport//lib/active_support/cache/file_store.rb#19 +# source://activesupport//lib/active_support/cache/file_store.rb#18 ActiveSupport::Cache::FileStore::GITKEEP_FILES = T.let(T.unsafe(nil), Array) +# = Memory \Cache \Store +# # A cache store implementation which stores everything into memory in the -# same process. If you're running multiple Ruby on Rails server processes +# same process. If you're running multiple Ruby on \Rails server processes # (which is the case if you're using Phusion Passenger or puma clustered mode), -# then this means that Rails server process instances won't be able +# then this means that \Rails server process instances won't be able # to share cache data with each other and this may not be the most # appropriate cache in that scenario. # @@ -753,86 +1098,105 @@ ActiveSupport::Cache::FileStore::GITKEEP_FILES = T.let(T.unsafe(nil), Array) # a cleanup will occur which tries to prune the cache down to three quarters # of the maximum size by removing the least recently used entries. # -# Unlike other Cache store implementations, MemoryStore does not compress -# values by default. MemoryStore does not benefit from compression as much +# Unlike other Cache store implementations, +MemoryStore+ does not compress +# values by default. +MemoryStore+ does not benefit from compression as much # as other Store implementations, as it does not send data over a network. # However, when compression is enabled, it still pays the full cost of # compression in terms of cpu use. # -# MemoryStore is thread-safe. +# +MemoryStore+ is thread-safe. # -# source://activesupport//lib/active_support/cache/memory_store.rb#26 +# source://activesupport//lib/active_support/cache/memory_store.rb#28 class ActiveSupport::Cache::MemoryStore < ::ActiveSupport::Cache::Store # @return [MemoryStore] a new instance of MemoryStore # - # source://activesupport//lib/active_support/cache/memory_store.rb#48 + # source://activesupport//lib/active_support/cache/memory_store.rb#73 def initialize(options = T.unsafe(nil)); end # Preemptively iterates through all stored keys and removes the ones which have expired. # - # source://activesupport//lib/active_support/cache/memory_store.rb#75 + # source://activesupport//lib/active_support/cache/memory_store.rb#101 def cleanup(options = T.unsafe(nil)); end # Delete all data stored in a given cache store. # - # source://activesupport//lib/active_support/cache/memory_store.rb#67 + # source://activesupport//lib/active_support/cache/memory_store.rb#93 def clear(options = T.unsafe(nil)); end - # Decrement an integer value in the cache. + # Decrement a cached integer value. Returns the updated value. + # + # If the key is unset or has expired, it will be set to +-amount+. + # + # cache.decrement("foo") # => -1 + # + # To set a specific value, call #write: # - # source://activesupport//lib/active_support/cache/memory_store.rb#117 + # cache.write("baz", 5) + # cache.decrement("baz") # => 4 + # + # source://activesupport//lib/active_support/cache/memory_store.rb#164 def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end # Deletes cache entries if the cache key matches a given pattern. # - # source://activesupport//lib/active_support/cache/memory_store.rb#122 + # source://activesupport//lib/active_support/cache/memory_store.rb#169 def delete_matched(matcher, options = T.unsafe(nil)); end - # Increment an integer value in the cache. + # Increment a cached integer value. Returns the updated value. + # + # If the key is unset, it will be set to +amount+: + # + # cache.increment("foo") # => 1 + # cache.increment("bar", 100) # => 100 + # + # To set a specific value, call #write: # - # source://activesupport//lib/active_support/cache/memory_store.rb#112 + # cache.write("baz", 5) + # cache.increment("baz") # => 6 + # + # source://activesupport//lib/active_support/cache/memory_store.rb#149 def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache/memory_store.rb#133 + # source://activesupport//lib/active_support/cache/memory_store.rb#180 def inspect; end # To ensure entries fit within the specified memory prune the cache by removing the least # recently accessed entries. # - # source://activesupport//lib/active_support/cache/memory_store.rb#88 + # source://activesupport//lib/active_support/cache/memory_store.rb#114 def prune(target_size, max_time = T.unsafe(nil)); end # Returns true if the cache is currently being pruned. # # @return [Boolean] # - # source://activesupport//lib/active_support/cache/memory_store.rb#107 + # source://activesupport//lib/active_support/cache/memory_store.rb#133 def pruning?; end # Synchronize calls to the cache. This should be called wherever the underlying cache implementation # is not thread safe. # - # source://activesupport//lib/active_support/cache/memory_store.rb#139 + # source://activesupport//lib/active_support/cache/memory_store.rb#186 def synchronize(&block); end private - # source://activesupport//lib/active_support/cache/memory_store.rb#150 + # source://activesupport//lib/active_support/cache/memory_store.rb#193 def cached_size(key, payload); end - # source://activesupport//lib/active_support/cache/memory_store.rb#146 - def default_coder; end - - # source://activesupport//lib/active_support/cache/memory_store.rb#183 + # source://activesupport//lib/active_support/cache/memory_store.rb#226 def delete_entry(key, **options); end - # source://activesupport//lib/active_support/cache/memory_store.rb#191 + # Modifies the amount of an integer value that is stored in the cache. + # If the key is not found it is created and set to +amount+. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#236 def modify_value(name, amount, options); end - # source://activesupport//lib/active_support/cache/memory_store.rb#154 + # source://activesupport//lib/active_support/cache/memory_store.rb#197 def read_entry(key, **options); end - # source://activesupport//lib/active_support/cache/memory_store.rb#166 + # source://activesupport//lib/active_support/cache/memory_store.rb#209 def write_entry(key, entry, **options); end class << self @@ -840,42 +1204,41 @@ class ActiveSupport::Cache::MemoryStore < ::ActiveSupport::Cache::Store # # @return [Boolean] # - # source://activesupport//lib/active_support/cache/memory_store.rb#62 + # source://activesupport//lib/active_support/cache/memory_store.rb#88 def supports_cache_versioning?; end end end -# source://activesupport//lib/active_support/cache/memory_store.rb#27 +# source://activesupport//lib/active_support/cache/memory_store.rb#29 module ActiveSupport::Cache::MemoryStore::DupCoder extend ::ActiveSupport::Cache::MemoryStore::DupCoder - # source://activesupport//lib/active_support/cache/memory_store.rb#30 + # source://activesupport//lib/active_support/cache/memory_store.rb#32 def dump(entry); end - # source://activesupport//lib/active_support/cache/memory_store.rb#35 + # source://activesupport//lib/active_support/cache/memory_store.rb#40 def dump_compressed(entry, threshold); end - # source://activesupport//lib/active_support/cache/memory_store.rb#41 + # source://activesupport//lib/active_support/cache/memory_store.rb#45 def load(entry); end -end -# source://activesupport//lib/active_support/cache/memory_store.rb#144 -ActiveSupport::Cache::MemoryStore::PER_ENTRY_OVERHEAD = T.let(T.unsafe(nil), Integer) + private -# source://activesupport//lib/active_support/cache.rb#817 -module ActiveSupport::Cache::NullCoder - extend ::ActiveSupport::Cache::NullCoder + # source://activesupport//lib/active_support/cache/memory_store.rb#56 + def dump_value(value); end - # source://activesupport//lib/active_support/cache.rb#820 - def dump(entry); end + # source://activesupport//lib/active_support/cache/memory_store.rb#64 + def load_value(string); end +end - # source://activesupport//lib/active_support/cache.rb#824 - def dump_compressed(entry, threshold); end +# source://activesupport//lib/active_support/cache/memory_store.rb#54 +ActiveSupport::Cache::MemoryStore::DupCoder::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) - # source://activesupport//lib/active_support/cache.rb#828 - def load(payload); end -end +# source://activesupport//lib/active_support/cache/memory_store.rb#191 +ActiveSupport::Cache::MemoryStore::PER_ENTRY_OVERHEAD = T.let(T.unsafe(nil), Integer) +# = Null \Cache \Store +# # A cache store implementation which doesn't actually store anything. Useful in # development and test environments where you don't want caching turned on but # need to go through the caching interface. @@ -884,40 +1247,43 @@ end # be cached inside blocks that utilize this strategy. See # ActiveSupport::Cache::Strategy::LocalCache for more details. # -# source://activesupport//lib/active_support/cache/null_store.rb#12 +# source://activesupport//lib/active_support/cache/null_store.rb#14 class ActiveSupport::Cache::NullStore < ::ActiveSupport::Cache::Store include ::ActiveSupport::Cache::Strategy::LocalCache - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#81 - def cleanup(**options); end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#85 + def cleanup(options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#75 - def clear(**options); end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#79 + def clear(options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#100 - def decrement(name, amount = T.unsafe(nil), **options); end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 + def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#87 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#91 def delete_matched(matcher, options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#93 - def increment(name, amount = T.unsafe(nil), **options); end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#97 + def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/null_store.rb#37 + def inspect; end private - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#147 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#162 def delete_entry(key, **_arg1); end - # source://activesupport//lib/active_support/cache/null_store.rb#36 + # source://activesupport//lib/active_support/cache/null_store.rb#42 def read_entry(key, **s); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#120 def read_serialized_entry(key, raw: T.unsafe(nil), **options); end - # source://activesupport//lib/active_support/cache/null_store.rb#43 + # source://activesupport//lib/active_support/cache/null_store.rb#49 def write_entry(key, entry, **_arg2); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#138 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#153 def write_serialized_entry(key, payload, **_arg2); end class << self @@ -925,41 +1291,45 @@ class ActiveSupport::Cache::NullStore < ::ActiveSupport::Cache::Store # # @return [Boolean] # - # source://activesupport//lib/active_support/cache/null_store.rb#16 + # source://activesupport//lib/active_support/cache/null_store.rb#18 def supports_cache_versioning?; end end end # Mapping of canonical option names to aliases that a store will recognize. # -# source://activesupport//lib/active_support/cache.rb#30 +# source://activesupport//lib/active_support/cache.rb#41 ActiveSupport::Cache::OPTION_ALIASES = T.let(T.unsafe(nil), Hash) -# Redis cache store. +# = Redis \Cache \Store # -# Deployment note: Take care to use a *dedicated Redis cache* rather -# than pointing this at your existing Redis server. It won't cope well -# with mixed usage patterns and it won't expire cache entries by default. +# Deployment note: Take care to use a dedicated Redis cache rather +# than pointing this at a persistent Redis server (for example, one used as +# an Active Job queue). Redis won't cope well with mixed usage patterns and it +# won't expire cache entries by default. # # Redis cache server setup guide: https://redis.io/topics/lru-cache # -# * Supports vanilla Redis, hiredis, and Redis::Distributed. -# * Supports Memcached-like sharding across Redises with Redis::Distributed. +# * Supports vanilla Redis, hiredis, and +Redis::Distributed+. +# * Supports Memcached-like sharding across Redises with +Redis::Distributed+. # * Fault tolerant. If the Redis server is unavailable, no exceptions are # raised. Cache fetches are all misses and writes are dropped. # * Local cache. Hot in-memory primary cache within block/middleware scope. -# * +read_multi+ and +write_multi+ support for Redis mget/mset. Use Redis::Distributed -# 4.0.1+ for distributed mget support. +# * +read_multi+ and +write_multi+ support for Redis mget/mset. Use +# +Redis::Distributed+ 4.0.1+ for distributed mget support. # * +delete_matched+ support for Redis KEYS globs. # -# source://activesupport//lib/active_support/cache/redis_cache_store.rb#51 +# source://activesupport//lib/active_support/cache/redis_cache_store.rb#37 class ActiveSupport::Cache::RedisCacheStore < ::ActiveSupport::Cache::Store include ::ActiveSupport::Cache::Strategy::LocalCache # Creates a new Redis cache store. # - # Handles four options: :redis block, :redis instance, single :url - # string, and multiple :url strings. + # There are four ways to provide the Redis client used by the cache: the + # +:redis+ param can be a Redis instance or a block that returns a Redis + # instance, or the +:url+ param can be a string or an array of strings + # which will be used to create a Redis instance or a +Redis::Distributed+ + # instance. # # Option Class Result # :redis Proc -> options[:redis].call @@ -984,38 +1354,53 @@ class ActiveSupport::Cache::RedisCacheStore < ::ActiveSupport::Cache::Store # "thundering herd" cache writes when hot cache entries are expired. # See ActiveSupport::Cache::Store#fetch for more. # + # Setting skip_nil: true will not cache nil results: + # + # cache.fetch('foo') { nil } + # cache.fetch('bar', skip_nil: true) { nil } + # cache.exist?('foo') # => true + # cache.exist?('bar') # => false + # # @return [RedisCacheStore] a new instance of RedisCacheStore # # source://activesupport//lib/active_support/cache/redis_cache_store.rb#149 - def initialize(namespace: T.unsafe(nil), compress: T.unsafe(nil), compress_threshold: T.unsafe(nil), coder: T.unsafe(nil), expires_in: T.unsafe(nil), race_condition_ttl: T.unsafe(nil), error_handler: T.unsafe(nil), **redis_options); end + def initialize(error_handler: T.unsafe(nil), **redis_options); end # Cache Store API implementation. # # Removes expired entries. Handled natively by Redis least-recently-/ # least-frequently-used expiry, so manual cleanup is not supported. # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#81 - def cleanup(**options); end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#85 + def cleanup(options = T.unsafe(nil)); end # Clear the entire cache on all Redis servers. Safe to use on # shared servers if the cache is namespaced. # # Failsafe: Raises errors. # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#75 - def clear(**options); end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#79 + def clear(options = T.unsafe(nil)); end - # Cache Store API implementation. + # Decrement a cached integer value using the Redis decrby atomic operator. + # Returns the updated value. + # + # If the key is unset or has expired, it will be set to +-amount+: + # + # cache.decrement("foo") # => -1 + # + # To set a specific value, call #write passing raw: true: # - # Decrement a cached value. This method uses the Redis decr atomic - # operator and can only be used on values written with the +:raw+ option. - # Calling it on a value not stored with +:raw+ will initialize that value - # to zero. + # cache.write("baz", 5, raw: true) + # cache.decrement("baz") # => 4 + # + # Decrementing a non-numeric value, or a value written without + # raw: true, will fail and return +nil+. # # Failsafe: Raises errors. # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#100 - def decrement(name, amount = T.unsafe(nil), **options); end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 + def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end # Cache Store API implementation. # @@ -1033,126 +1418,124 @@ class ActiveSupport::Cache::RedisCacheStore < ::ActiveSupport::Cache::Store # # Failsafe: Raises errors. # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#87 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#91 def delete_matched(matcher, options = T.unsafe(nil)); end - # Cache Store API implementation. + # Increment a cached integer value using the Redis incrby atomic operator. + # Returns the updated value. # - # Increment a cached value. This method uses the Redis incr atomic - # operator and can only be used on values written with the +:raw+ option. - # Calling it on a value not stored with +:raw+ will initialize that value - # to zero. + # If the key is unset or has expired, it will be set to +amount+: + # + # cache.increment("foo") # => 1 + # cache.increment("bar", 100) # => 100 + # + # To set a specific value, call #write passing raw: true: + # + # cache.write("baz", 5, raw: true) + # cache.increment("baz") # => 6 + # + # Incrementing a non-numeric value, or a value written without + # raw: true, will fail and return +nil+. # # Failsafe: Raises errors. # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#93 - def increment(name, amount = T.unsafe(nil), **options); end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#97 + def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#174 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#164 def inspect; end # Returns the value of attribute max_key_bytesize. # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#120 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#109 def max_key_bytesize; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#304 - def mget_capable?; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#309 - def mset_capable?; end - # Cache Store API implementation. # # Read multiple values at once. Returns a hash of requested keys -> # fetched values. # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#183 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#172 def read_multi(*names); end - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#161 - def redis; end - - # Returns the value of attribute redis_options. + # Returns the value of attribute redis. # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#119 - def redis_options; end + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#110 + def redis; end # Get info from redis servers. # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#300 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#295 def stats; end private + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#444 + def change_counter(key, amount, options); end + # Delete an entry from the cache. # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#147 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#162 def delete_entry(key, **_arg1); end # Deletes multiple entries in the cache. Returns the number of entries deleted. # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#408 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#386 def delete_multi_entries(entries, **_options); end - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#443 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#422 def deserialize_entry(payload, raw: T.unsafe(nil), **_arg2); end - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#465 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#478 def failsafe(method, returning: T.unsafe(nil)); end # Truncate keys that exceed 1kB. # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#429 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#408 def normalize_key(key, options); end + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#300 + def pipeline_entries(entries, &block); end + # Store provider interface: # Read an entry from the cache. # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#328 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#314 def read_entry(key, **options); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#122 - def read_multi_entries(keys, **options); end - - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#346 - def read_multi_mget(*names); end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#134 + def read_multi_entries(names, **options); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#120 def read_serialized_entry(key, raw: T.unsafe(nil), **options); end - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#459 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#438 def serialize_entries(entries, **options); end - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#451 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#430 def serialize_entry(entry, raw: T.unsafe(nil), **options); end - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#315 - def set_redis_capabilities; end + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#471 + def supports_expire_nx?; end - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#433 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#412 def truncate_key(key); end # Write an entry to the cache. # # Requires Redis 2.6.12+ for extended SET options. # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#371 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#351 def write_entry(key, entry, raw: T.unsafe(nil), **options); end - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#394 - def write_key_expiry(client, key, options); end - # Nonstandard store provider API to write multiple values at once. # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#413 - def write_multi_entries(entries, expires_in: T.unsafe(nil), **options); end + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#393 + def write_multi_entries(entries, **options); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#138 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#153 def write_serialized_entry(key, payload, **_arg2); end class << self @@ -1167,42 +1550,181 @@ class ActiveSupport::Cache::RedisCacheStore < ::ActiveSupport::Cache::Store # :url String -> Redis.new(url: …) # :url Array -> Redis::Distributed.new([{ url: … }, { url: … }, …]) # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#91 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#81 def build_redis(redis: T.unsafe(nil), url: T.unsafe(nil), **redis_options); end # Advertise cache versioning support. # # @return [Boolean] # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#73 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#63 def supports_cache_versioning?; end private - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#114 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#104 def build_redis_client(**redis_options); end - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#108 + # source://activesupport//lib/active_support/cache/redis_cache_store.rb#98 def build_redis_distributed_client(urls:, **redis_options); end end end -# source://activesupport//lib/active_support/cache/redis_cache_store.rb#62 +# source://activesupport//lib/active_support/cache/redis_cache_store.rb#47 ActiveSupport::Cache::RedisCacheStore::DEFAULT_ERROR_HANDLER = T.let(T.unsafe(nil), Proc) -# source://activesupport//lib/active_support/cache/redis_cache_store.rb#55 +# source://activesupport//lib/active_support/cache/redis_cache_store.rb#41 ActiveSupport::Cache::RedisCacheStore::DEFAULT_REDIS_OPTIONS = T.let(T.unsafe(nil), Hash) -# Keys are truncated with the ActiveSupport digest if they exceed 1kB +# Keys are truncated with the Active Support digest if they exceed 1kB # -# source://activesupport//lib/active_support/cache/redis_cache_store.rb#53 +# source://activesupport//lib/active_support/cache/redis_cache_store.rb#39 ActiveSupport::Cache::RedisCacheStore::MAX_KEY_BYTESIZE = T.let(T.unsafe(nil), Integer) # The maximum number of entries to receive per SCAN call. # -# source://activesupport//lib/active_support/cache/redis_cache_store.rb#69 +# source://activesupport//lib/active_support/cache/redis_cache_store.rb#59 ActiveSupport::Cache::RedisCacheStore::SCAN_BATCH_SIZE = T.let(T.unsafe(nil), Integer) +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#8 +module ActiveSupport::Cache::SerializerWithFallback + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#17 + def load(dumped); end + + private + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#39 + def marshal_load(payload); end + + class << self + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#9 + def [](format); end + end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#66 +module ActiveSupport::Cache::SerializerWithFallback::Marshal61WithFallback + include ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback::Marshal61WithFallback + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#39 + def _load(payload); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#72 + def dump(entry); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#76 + def dump_compressed(entry, threshold); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#83 + def dumped?(dumped); end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#70 +ActiveSupport::Cache::SerializerWithFallback::Marshal61WithFallback::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#88 +module ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback + include ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#110 + def _load(marked); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#95 + def dump(entry); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#99 + def dump_compressed(entry, threshold); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#116 + def dumped?(dumped); end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#93 +ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback::MARK_COMPRESSED = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#92 +ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback::MARK_UNCOMPRESSED = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#121 +module ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback + include ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#131 + def _load(dumped); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#127 + def dump(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#135 + def dumped?(dumped); end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#125 +ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#140 +module ActiveSupport::Cache::SerializerWithFallback::MessagePackWithFallback + include ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback::MessagePackWithFallback + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#148 + def _load(dumped); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#144 + def dump(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#152 + def dumped?(dumped); end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#157 + def available?; end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#45 +module ActiveSupport::Cache::SerializerWithFallback::PassthroughWithFallback + include ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback::PassthroughWithFallback + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#57 + def _load(entry); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#49 + def dump(entry); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#53 + def dump_compressed(entry, threshold); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#61 + def dumped?(dumped); end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#166 +ActiveSupport::Cache::SerializerWithFallback::SERIALIZERS = T.let(T.unsafe(nil), Hash) + +# = Active Support \Cache \Store +# # An abstract cache store class. There are multiple cache store # implementations, each having its own additional features. See the classes # under the ActiveSupport::Cache module, e.g. @@ -1212,8 +1734,8 @@ ActiveSupport::Cache::RedisCacheStore::SCAN_BATCH_SIZE = T.let(T.unsafe(nil), In # Some implementations may not support all methods beyond the basic cache # methods of #fetch, #write, #read, #exist?, and #delete. # -# ActiveSupport::Cache::Store can store any Ruby object that is supported by -# its +coder+'s +dump+ and +load+ methods. +# +ActiveSupport::Cache::Store+ can store any Ruby object that is supported +# by its +coder+'s +dump+ and +load+ methods. # # cache = ActiveSupport::Cache::MemoryStore.new # @@ -1243,25 +1765,83 @@ ActiveSupport::Cache::RedisCacheStore::SCAN_BATCH_SIZE = T.let(T.unsafe(nil), In # cache.namespace = -> { @last_mod_time } # Set the namespace to a variable # @last_mod_time = Time.now # Invalidate the entire cache by changing namespace # -# source://activesupport//lib/active_support/cache.rb#175 +# source://activesupport//lib/active_support/cache.rb#194 class ActiveSupport::Cache::Store # Creates a new cache. # # ==== Options # - # * +:namespace+ - Sets the namespace for the cache. This option is - # especially useful if your application shares a cache with other - # applications. - # * +:coder+ - Replaces the default cache entry serialization mechanism - # with a custom one. The +coder+ must respond to +dump+ and +load+. - # Using a custom coder disables automatic compression. + # [+:namespace+] + # Sets the namespace for the cache. This option is especially useful if + # your application shares a cache with other applications. + # + # [+:serializer+] + # The serializer for cached values. Must respond to +dump+ and +load+. + # + # The default serializer depends on the cache format version (set via + # +config.active_support.cache_format_version+ when using Rails). The + # default serializer for each format version includes a fallback + # mechanism to deserialize values from any format version. This behavior + # makes it easy to migrate between format versions without invalidating + # the entire cache. + # + # You can also specify serializer: :message_pack to use a + # preconfigured serializer based on ActiveSupport::MessagePack. The + # +:message_pack+ serializer includes the same deserialization fallback + # mechanism, allowing easy migration from (or to) the default + # serializer. The +:message_pack+ serializer may improve performance, + # but it requires the +msgpack+ gem. + # + # [+:compressor+] + # The compressor for serialized cache values. Must respond to +deflate+ + # and +inflate+. + # + # The default compressor is +Zlib+. To define a new custom compressor + # that also decompresses old cache entries, you can check compressed + # values for Zlib's "\x78" signature: + # + # module MyCompressor + # def self.deflate(dumped) + # # compression logic... (make sure result does not start with "\x78"!) + # end + # + # def self.inflate(compressed) + # if compressed.start_with?("\x78") + # Zlib.inflate(compressed) + # else + # # decompression logic... + # end + # end + # end + # + # ActiveSupport::Cache.lookup_store(:redis_cache_store, compressor: MyCompressor) + # + # [+:coder+] + # The coder for serializing and (optionally) compressing cache entries. + # Must respond to +dump+ and +load+. + # + # The default coder composes the serializer and compressor, and includes + # some performance optimizations. If you only need to override the + # serializer or compressor, you should specify the +:serializer+ or + # +:compressor+ options instead. + # + # If the store can handle cache entries directly, you may also specify + # coder: nil to omit the serializer, compressor, and coder. For + # example, if you are using ActiveSupport::Cache::MemoryStore and can + # guarantee that cache values will not be mutated, you can specify + # coder: nil to avoid the overhead of safeguarding against + # mutation. + # + # The +:coder+ option is mutally exclusive with the +:serializer+ and + # +:compressor+ options. Specifying them together will raise an + # +ArgumentError+. # # Any other specified options are treated as default options for the # relevant cache operations, such as #read, #write, and #fetch. # # @return [Store] a new instance of Store # - # source://activesupport//lib/active_support/cache.rb#211 + # source://activesupport//lib/active_support/cache.rb#319 def initialize(options = T.unsafe(nil)); end # Cleans up the cache by removing expired entries. @@ -1272,7 +1852,7 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport//lib/active_support/cache.rb#582 + # source://activesupport//lib/active_support/cache.rb#747 def cleanup(options = T.unsafe(nil)); end # Clears the entire cache. Be careful with this method since it could @@ -1284,7 +1864,7 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport//lib/active_support/cache.rb#592 + # source://activesupport//lib/active_support/cache.rb#757 def clear(options = T.unsafe(nil)); end # Decrements an integer value in the cache. @@ -1295,14 +1875,15 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport//lib/active_support/cache.rb#573 + # source://activesupport//lib/active_support/cache.rb#738 def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - # Deletes an entry in the cache. Returns +true+ if an entry is deleted. + # Deletes an entry in the cache. Returns +true+ if an entry is deleted + # and +false+ otherwise. # # Options are passed to the underlying cache implementation. # - # source://activesupport//lib/active_support/cache.rb#514 + # source://activesupport//lib/active_support/cache.rb#676 def delete(name, options = T.unsafe(nil)); end # Deletes all entries with keys matching the pattern. @@ -1313,14 +1894,15 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport//lib/active_support/cache.rb#555 + # source://activesupport//lib/active_support/cache.rb#720 def delete_matched(matcher, options = T.unsafe(nil)); end - # Deletes multiple entries in the cache. + # Deletes multiple entries in the cache. Returns the number of deleted + # entries. # # Options are passed to the underlying cache implementation. # - # source://activesupport//lib/active_support/cache.rb#525 + # source://activesupport//lib/active_support/cache.rb#688 def delete_multi(names, options = T.unsafe(nil)); end # Returns +true+ if the cache contains an entry for the given key. @@ -1329,7 +1911,7 @@ class ActiveSupport::Cache::Store # # @return [Boolean] # - # source://activesupport//lib/active_support/cache.rb#537 + # source://activesupport//lib/active_support/cache.rb#702 def exist?(name, options = T.unsafe(nil)); end # Fetches data from the cache, using the given key. If there is data in @@ -1352,8 +1934,8 @@ class ActiveSupport::Cache::Store # # ==== Options # - # Internally, +fetch+ calls #read_entry, and calls #write_entry on a cache - # miss. Thus, +fetch+ supports the same options as #read and #write. + # Internally, +fetch+ calls +read_entry+, and calls +write_entry+ on a + # cache miss. Thus, +fetch+ supports the same options as #read and #write. # Additionally, +fetch+ supports the following options: # # * force: true - Forces a cache "miss," meaning we treat the @@ -1419,7 +2001,19 @@ class ActiveSupport::Cache::Store # val_1 # => "new value 1" # val_2 # => "original value" # - # source://activesupport//lib/active_support/cache.rb#321 + # ==== Dynamic Options + # + # In some cases it may be necessary to dynamically compute options based + # on the cached value. To support this, an ActiveSupport::Cache::WriteOptions + # instance is passed as the second argument to the block. For example: + # + # cache.fetch("authentication-token:#{user.id}") do |key, options| + # token = authenticate_to_service + # options.expires_at = token.expires_at + # token + # end + # + # source://activesupport//lib/active_support/cache.rb#452 def fetch(name, options = T.unsafe(nil), &block); end # Fetches data from the cache, using the given keys. If there is data in @@ -1439,7 +2033,8 @@ class ActiveSupport::Cache::Store # # => { "bim" => "bam", # # "unknown_key" => "Fallback value for key: unknown_key" } # - # Options are passed to the underlying cache implementation. For example: + # You may also specify additional options via the +options+ argument. See #fetch for details. + # Other options are passed to the underlying cache implementation. For example: # # cache.fetch_multi("fizz", expires_in: 5.seconds) do |key| # "buzz" @@ -1453,7 +2048,7 @@ class ActiveSupport::Cache::Store # # @raise [ArgumentError] # - # source://activesupport//lib/active_support/cache.rb#447 + # source://activesupport//lib/active_support/cache.rb#601 def fetch_multi(*names); end # Increments an integer value in the cache. @@ -1464,28 +2059,34 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport//lib/active_support/cache.rb#564 + # source://activesupport//lib/active_support/cache.rb#729 def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache.rb#176 + # source://activesupport//lib/active_support/cache.rb#195 def logger; end - # source://activesupport//lib/active_support/cache.rb#176 + # source://activesupport//lib/active_support/cache.rb#195 def logger=(val); end # Silences the logger within a block. # - # source://activesupport//lib/active_support/cache.rb#227 + # source://activesupport//lib/active_support/cache.rb#346 def mute; end - # source://activesupport//lib/active_support/cache.rb#546 + # source://activesupport//lib/active_support/cache.rb#711 def new_entry(value, options = T.unsafe(nil)); end # Returns the value of attribute options. # - # source://activesupport//lib/active_support/cache.rb#178 + # source://activesupport//lib/active_support/cache.rb#198 def options; end + # source://activesupport//lib/active_support/cache.rb#196 + def raise_on_invalid_cache_expiration_time; end + + # source://activesupport//lib/active_support/cache.rb#196 + def raise_on_invalid_cache_expiration_time=(val); end + # Reads data from the cache, using the given key. If there is data in # the cache with the given key, then that data is returned. Otherwise, # +nil+ is returned. @@ -1496,13 +2097,14 @@ class ActiveSupport::Cache::Store # # ==== Options # + # * +:namespace+ - Replace the store namespace for this call. # * +:version+ - Specifies a version for the cache entry. If the cached # version does not match the requested version, the read will be treated # as a cache miss. This feature is used to support recyclable cache keys. # # Other options will be handled by the specific cache store implementation. # - # source://activesupport//lib/active_support/cache.rb#362 + # source://activesupport//lib/active_support/cache.rb#506 def read(name, options = T.unsafe(nil)); end # Reads multiple values at once from the cache. Options can be passed @@ -1512,22 +2114,22 @@ class ActiveSupport::Cache::Store # # Returns a hash mapping the names provided to the values found. # - # source://activesupport//lib/active_support/cache.rb#395 + # source://activesupport//lib/active_support/cache.rb#544 def read_multi(*names); end # Returns the value of attribute silence. # - # source://activesupport//lib/active_support/cache.rb#178 + # source://activesupport//lib/active_support/cache.rb#198 def silence; end # Silences the logger. # - # source://activesupport//lib/active_support/cache.rb#221 + # source://activesupport//lib/active_support/cache.rb#340 def silence!; end # Returns the value of attribute silence. # - # source://activesupport//lib/active_support/cache.rb#178 + # source://activesupport//lib/active_support/cache.rb#198 def silence?; end # Writes the value to the cache with the key. The value must be supported @@ -1564,66 +2166,75 @@ class ActiveSupport::Cache::Store # # Other options will be handled by the specific cache store implementation. # - # source://activesupport//lib/active_support/cache.rb#502 + # source://activesupport//lib/active_support/cache.rb#663 def write(name, value, options = T.unsafe(nil)); end # Cache Storage API to write multiple values at once. # - # source://activesupport//lib/active_support/cache.rb#407 + # source://activesupport//lib/active_support/cache.rb#558 def write_multi(hash, options = T.unsafe(nil)); end private - # source://activesupport//lib/active_support/cache.rb#597 - def default_coder; end + # source://activesupport//lib/active_support/cache.rb#1013 + def _instrument(operation, multi: T.unsafe(nil), options: T.unsafe(nil), **payload, &block); end + + # source://activesupport//lib/active_support/cache.rb#762 + def default_serializer; end # Deletes an entry from the cache implementation. Subclasses must # implement this method. # # @raise [NotImplementedError] # - # source://activesupport//lib/active_support/cache.rb#674 + # source://activesupport//lib/active_support/cache.rb#856 def delete_entry(key, **options); end # Deletes multiples entries in the cache implementation. Subclasses MAY # implement this method. # - # source://activesupport//lib/active_support/cache.rb#680 + # source://activesupport//lib/active_support/cache.rb#862 def delete_multi_entries(entries, **options); end - # source://activesupport//lib/active_support/cache.rb#641 - def deserialize_entry(payload); end + # source://activesupport//lib/active_support/cache.rb#821 + def deserialize_entry(payload, **_arg1); end # Expands key to be a consistent string value. Invokes +cache_key+ if # object responds to +cache_key+. Otherwise, +to_param+ method will be # called. If the key is a Hash, then keys will be sorted alphabetically. # - # source://activesupport//lib/active_support/cache.rb#747 + # source://activesupport//lib/active_support/cache.rb#976 def expanded_key(key); end - # source://activesupport//lib/active_support/cache.rb#768 + # source://activesupport//lib/active_support/cache.rb#997 def expanded_version(key); end - # source://activesupport//lib/active_support/cache.rb#802 + # source://activesupport//lib/active_support/cache.rb#1050 def get_entry_value(entry, name, options); end - # source://activesupport//lib/active_support/cache.rb#786 + # source://activesupport//lib/active_support/cache.rb#1034 def handle_expired_entry(entry, key, options); end - # source://activesupport//lib/active_support/cache.rb#776 - def instrument(operation, key, options = T.unsafe(nil)); end + # source://activesupport//lib/active_support/cache.rb#896 + def handle_invalid_expires_in(message); end + + # source://activesupport//lib/active_support/cache.rb#1005 + def instrument(operation, key, options = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/cache.rb#1009 + def instrument_multi(operation, keys, options = T.unsafe(nil), &block); end # Adds the namespace defined in the options to a pattern designed to # match keys. Implementations that support delete_matched should call # this method to translate a pattern that matches names into one that # matches namespaced keys. # - # source://activesupport//lib/active_support/cache.rb#605 + # source://activesupport//lib/active_support/cache.rb#785 def key_matcher(pattern, options); end # Merges the default options with ones specific to a method call. # - # source://activesupport//lib/active_support/cache.rb#685 + # source://activesupport//lib/active_support/cache.rb#867 def merged_options(call_options); end # Prefix the key with a namespace string: @@ -1636,21 +2247,24 @@ class ActiveSupport::Cache::Store # namespace_key 'foo', namespace: -> { 'cache' } # # => 'cache:foo' # - # source://activesupport//lib/active_support/cache.rb#725 + # source://activesupport//lib/active_support/cache.rb#954 def namespace_key(key, options = T.unsafe(nil)); end - # Expands and namespaces the cache key. May be overridden by - # cache stores to do additional normalization. + # Expands and namespaces the cache key. + # Raises an exception when the key is +nil+ or an empty string. + # May be overridden by cache stores to do additional normalization. # - # source://activesupport//lib/active_support/cache.rb#712 + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/cache.rb#938 def normalize_key(key, options = T.unsafe(nil)); end # Normalize aliased options to their canonical form # - # source://activesupport//lib/active_support/cache.rb#699 + # source://activesupport//lib/active_support/cache.rb#907 def normalize_options(options); end - # source://activesupport//lib/active_support/cache.rb#764 + # source://activesupport//lib/active_support/cache.rb#993 def normalize_version(key, options = T.unsafe(nil)); end # Reads an entry from the cache implementation. Subclasses must implement @@ -1658,156 +2272,166 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport//lib/active_support/cache.rb#622 + # source://activesupport//lib/active_support/cache.rb#802 def read_entry(key, **options); end # Reads multiple entries from the cache implementation. Subclasses MAY # implement this method. # - # source://activesupport//lib/active_support/cache.rb#647 + # source://activesupport//lib/active_support/cache.rb#829 def read_multi_entries(names, **options); end - # source://activesupport//lib/active_support/cache.rb#807 + # source://activesupport//lib/active_support/cache.rb#1055 def save_block_result_to_cache(name, options); end - # source://activesupport//lib/active_support/cache.rb#632 + # source://activesupport//lib/active_support/cache.rb#812 def serialize_entry(entry, **options); end + # source://activesupport//lib/active_support/cache.rb#918 + def validate_options(options); end + # Writes an entry to the cache implementation. Subclasses must implement # this method. # # @raise [NotImplementedError] # - # source://activesupport//lib/active_support/cache.rb#628 + # source://activesupport//lib/active_support/cache.rb#808 def write_entry(key, entry, **options); end # Writes multiple entries to the cache implementation. Subclasses MAY # implement this method. # - # source://activesupport//lib/active_support/cache.rb#666 + # source://activesupport//lib/active_support/cache.rb#848 def write_multi_entries(hash, **options); end class << self - # source://activesupport//lib/active_support/cache.rb#176 + # source://activesupport//lib/active_support/cache.rb#195 def logger; end - # source://activesupport//lib/active_support/cache.rb#176 + # source://activesupport//lib/active_support/cache.rb#195 def logger=(val); end - private + # source://activesupport//lib/active_support/cache.rb#196 + def raise_on_invalid_cache_expiration_time; end + + # source://activesupport//lib/active_support/cache.rb#196 + def raise_on_invalid_cache_expiration_time=(val); end - # source://activesupport//lib/active_support/cache.rb#190 - def ensure_connection_pool_added!; end + private - # source://activesupport//lib/active_support/cache.rb#183 + # source://activesupport//lib/active_support/cache.rb#206 def retrieve_pool_options(options); end end end -# source://activesupport//lib/active_support/cache.rb#34 +# source://activesupport//lib/active_support/cache.rb#51 module ActiveSupport::Cache::Strategy; end +# = Local \Cache \Strategy +# # Caches that implement LocalCache will be backed by an in-memory cache for the # duration of a block. Repeated calls to the cache for the same key will hit the # in-memory cache for faster access. # -# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#11 +# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#13 module ActiveSupport::Cache::Strategy::LocalCache - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#81 - def cleanup(**options); end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#85 + def cleanup(options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#75 - def clear(**options); end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#79 + def clear(options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#100 - def decrement(name, amount = T.unsafe(nil), **options); end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 + def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#87 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#91 def delete_matched(matcher, options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#93 - def increment(name, amount = T.unsafe(nil), **options); end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#97 + def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end # Middleware class can be inserted as a Rack handler to be local cache for the # duration of request. # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#69 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#73 def middleware; end # Use a local cache for the duration of block. # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#63 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#67 def with_local_cache(&block); end private - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#170 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#185 def bypass_local_cache(&block); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#147 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#162 def delete_entry(key, **_arg1); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#166 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#181 def local_cache; end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#162 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#177 def local_cache_key; end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#122 - def read_multi_entries(keys, **options); end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#134 + def read_multi_entries(names, **options); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#120 def read_serialized_entry(key, raw: T.unsafe(nil), **options); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#174 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#189 def use_temporary_local_cache(temporary_cache); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#152 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#167 def write_cache_value(name, value, **options); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#138 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#153 def write_serialized_entry(key, payload, **_arg2); end end # Class for storing and registering the local caches. # -# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#15 +# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#17 module ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry extend ::ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#18 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#20 def cache_for(local_cache_key); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#23 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#25 def set_cache_for(local_cache_key, value); end end +# = Local \Cache \Store +# # Simple memory backed cache. This cache is not thread safe and is intended only # for serving as a temporary memory cache for a single thread. # -# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#31 +# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#35 class ActiveSupport::Cache::Strategy::LocalCache::LocalStore # @return [LocalStore] a new instance of LocalStore # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#32 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#36 def initialize; end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#36 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#40 def clear(options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#53 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#57 def delete_entry(key); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#57 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#61 def fetch_entry(key); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#40 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#44 def read_entry(key); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#44 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#48 def read_multi_entries(keys); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#48 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#52 def write_entry(key, entry); end end @@ -1838,27 +2462,70 @@ end # These options mean something to all cache implementations. Individual cache # implementations may support additional options. # -# source://activesupport//lib/active_support/cache.rb#25 +# source://activesupport//lib/active_support/cache.rb#26 ActiveSupport::Cache::UNIVERSAL_OPTIONS = T.let(T.unsafe(nil), Array) +# Enables the dynamic configuration of Cache entry options while ensuring +# that conflicting options are not both set. When a block is given to +# ActiveSupport::Cache::Store#fetch, the second argument will be an +# instance of +WriteOptions+. +# +# source://activesupport//lib/active_support/cache.rb#1071 +class ActiveSupport::Cache::WriteOptions + # @return [WriteOptions] a new instance of WriteOptions + # + # source://activesupport//lib/active_support/cache.rb#1072 + def initialize(options); end + + # source://activesupport//lib/active_support/cache.rb#1096 + def expires_at; end + + # Sets the Cache entry's +expires_at+ value. If an +expires_in+ option was + # previously set, this will unset it since +expires_at+ and +expires_in+ + # cannot both be set. + # + # source://activesupport//lib/active_support/cache.rb#1103 + def expires_at=(expires_at); end + + # source://activesupport//lib/active_support/cache.rb#1084 + def expires_in; end + + # Sets the Cache entry's +expires_in+ value. If an +expires_at+ option was + # previously set, this will unset it since +expires_in+ and +expires_at+ + # cannot both be set. + # + # source://activesupport//lib/active_support/cache.rb#1091 + def expires_in=(expires_in); end + + # source://activesupport//lib/active_support/cache.rb#1076 + def version; end + + # source://activesupport//lib/active_support/cache.rb#1080 + def version=(version); end +end + +# = Caching Key Generator +# # CachingKeyGenerator is a wrapper around KeyGenerator which allows users to avoid # re-executing the key generation process when it's called using the same +salt+ and # +key_size+. # -# source://activesupport//lib/active_support/key_generator.rb#47 +# source://activesupport//lib/active_support/key_generator.rb#55 class ActiveSupport::CachingKeyGenerator # @return [CachingKeyGenerator] a new instance of CachingKeyGenerator # - # source://activesupport//lib/active_support/key_generator.rb#48 + # source://activesupport//lib/active_support/key_generator.rb#56 def initialize(key_generator); end # Returns a derived key suitable for use. # - # source://activesupport//lib/active_support/key_generator.rb#54 + # source://activesupport//lib/active_support/key_generator.rb#62 def generate_key(*args); end end -# Callbacks are code hooks that are run at key points in an object's life cycle. +# = Active Support \Callbacks +# +# \Callbacks are code hooks that are run at key points in an object's life cycle. # The typical use case is to have a base class define a set of callbacks # relevant to the other functionality it supplies, so that subclasses can # install callbacks that enhance or modify the base functionality without @@ -1910,7 +2577,7 @@ end # - save # saved # -# source://activesupport//lib/active_support/callbacks.rb#63 +# source://activesupport//lib/active_support/callbacks.rb#65 module ActiveSupport::Callbacks extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -1942,8 +2609,8 @@ module ActiveSupport::Callbacks # smoothly through and into the supplied block, we want as little evidence # as possible that we were here. # - # source://activesupport//lib/active_support/callbacks.rb#95 - def run_callbacks(kind); end + # source://activesupport//lib/active_support/callbacks.rb#97 + def run_callbacks(kind, type = T.unsafe(nil)); end private @@ -1951,7 +2618,7 @@ module ActiveSupport::Callbacks # This can be overridden in ActiveSupport::Callbacks implementors in order # to provide better debugging/logging. # - # source://activesupport//lib/active_support/callbacks.rb#147 + # source://activesupport//lib/active_support/callbacks.rb#150 def halted_callback_hook(filter, name); end module GeneratedClassMethods @@ -1966,13 +2633,13 @@ module ActiveSupport::Callbacks end end -# source://activesupport//lib/active_support/callbacks.rb#71 +# source://activesupport//lib/active_support/callbacks.rb#73 ActiveSupport::Callbacks::CALLBACK_FILTER_TYPES = T.let(T.unsafe(nil), Array) # A future invocation of user-supplied code (either as a callback, # or a condition filter). # -# source://activesupport//lib/active_support/callbacks.rb#375 +# source://activesupport//lib/active_support/callbacks.rb#378 module ActiveSupport::Callbacks::CallTemplate class << self # Filters support: @@ -1984,69 +2651,69 @@ module ActiveSupport::Callbacks::CallTemplate # All of these objects are converted into a CallTemplate and handled # the same after this point. # - # source://activesupport//lib/active_support/callbacks.rb#533 + # source://activesupport//lib/active_support/callbacks.rb#536 def build(filter, callback); end end end -# source://activesupport//lib/active_support/callbacks.rb#434 +# source://activesupport//lib/active_support/callbacks.rb#437 class ActiveSupport::Callbacks::CallTemplate::InstanceExec0 # @return [InstanceExec0] a new instance of InstanceExec0 # - # source://activesupport//lib/active_support/callbacks.rb#435 + # source://activesupport//lib/active_support/callbacks.rb#438 def initialize(block); end - # source://activesupport//lib/active_support/callbacks.rb#439 + # source://activesupport//lib/active_support/callbacks.rb#442 def expand(target, value, block); end - # source://activesupport//lib/active_support/callbacks.rb#449 + # source://activesupport//lib/active_support/callbacks.rb#452 def inverted_lambda; end - # source://activesupport//lib/active_support/callbacks.rb#443 + # source://activesupport//lib/active_support/callbacks.rb#446 def make_lambda; end end -# source://activesupport//lib/active_support/callbacks.rb#456 +# source://activesupport//lib/active_support/callbacks.rb#459 class ActiveSupport::Callbacks::CallTemplate::InstanceExec1 # @return [InstanceExec1] a new instance of InstanceExec1 # - # source://activesupport//lib/active_support/callbacks.rb#457 + # source://activesupport//lib/active_support/callbacks.rb#460 def initialize(block); end - # source://activesupport//lib/active_support/callbacks.rb#461 + # source://activesupport//lib/active_support/callbacks.rb#464 def expand(target, value, block); end - # source://activesupport//lib/active_support/callbacks.rb#471 + # source://activesupport//lib/active_support/callbacks.rb#474 def inverted_lambda; end - # source://activesupport//lib/active_support/callbacks.rb#465 + # source://activesupport//lib/active_support/callbacks.rb#468 def make_lambda; end end -# source://activesupport//lib/active_support/callbacks.rb#478 +# source://activesupport//lib/active_support/callbacks.rb#481 class ActiveSupport::Callbacks::CallTemplate::InstanceExec2 # @return [InstanceExec2] a new instance of InstanceExec2 # - # source://activesupport//lib/active_support/callbacks.rb#479 + # source://activesupport//lib/active_support/callbacks.rb#482 def initialize(block); end # @raise [ArgumentError] # - # source://activesupport//lib/active_support/callbacks.rb#483 + # source://activesupport//lib/active_support/callbacks.rb#486 def expand(target, value, block); end - # source://activesupport//lib/active_support/callbacks.rb#495 + # source://activesupport//lib/active_support/callbacks.rb#498 def inverted_lambda; end - # source://activesupport//lib/active_support/callbacks.rb#488 + # source://activesupport//lib/active_support/callbacks.rb#491 def make_lambda; end end -# source://activesupport//lib/active_support/callbacks.rb#376 +# source://activesupport//lib/active_support/callbacks.rb#379 class ActiveSupport::Callbacks::CallTemplate::MethodCall # @return [MethodCall] a new instance of MethodCall # - # source://activesupport//lib/active_support/callbacks.rb#377 + # source://activesupport//lib/active_support/callbacks.rb#380 def initialize(method); end # Return the parts needed to make this call, with the given @@ -2063,199 +2730,199 @@ class ActiveSupport::Callbacks::CallTemplate::MethodCall # The actual invocation is left up to the caller to minimize # call stack pollution. # - # source://activesupport//lib/active_support/callbacks.rb#394 + # source://activesupport//lib/active_support/callbacks.rb#397 def expand(target, value, block); end - # source://activesupport//lib/active_support/callbacks.rb#404 + # source://activesupport//lib/active_support/callbacks.rb#407 def inverted_lambda; end - # source://activesupport//lib/active_support/callbacks.rb#398 + # source://activesupport//lib/active_support/callbacks.rb#401 def make_lambda; end end -# source://activesupport//lib/active_support/callbacks.rb#411 +# source://activesupport//lib/active_support/callbacks.rb#414 class ActiveSupport::Callbacks::CallTemplate::ObjectCall # @return [ObjectCall] a new instance of ObjectCall # - # source://activesupport//lib/active_support/callbacks.rb#412 + # source://activesupport//lib/active_support/callbacks.rb#415 def initialize(target, method); end - # source://activesupport//lib/active_support/callbacks.rb#417 + # source://activesupport//lib/active_support/callbacks.rb#420 def expand(target, value, block); end - # source://activesupport//lib/active_support/callbacks.rb#427 + # source://activesupport//lib/active_support/callbacks.rb#430 def inverted_lambda; end - # source://activesupport//lib/active_support/callbacks.rb#421 + # source://activesupport//lib/active_support/callbacks.rb#424 def make_lambda; end end -# source://activesupport//lib/active_support/callbacks.rb#503 +# source://activesupport//lib/active_support/callbacks.rb#506 class ActiveSupport::Callbacks::CallTemplate::ProcCall # @return [ProcCall] a new instance of ProcCall # - # source://activesupport//lib/active_support/callbacks.rb#504 + # source://activesupport//lib/active_support/callbacks.rb#507 def initialize(target); end - # source://activesupport//lib/active_support/callbacks.rb#508 + # source://activesupport//lib/active_support/callbacks.rb#511 def expand(target, value, block); end - # source://activesupport//lib/active_support/callbacks.rb#518 + # source://activesupport//lib/active_support/callbacks.rb#521 def inverted_lambda; end - # source://activesupport//lib/active_support/callbacks.rb#512 + # source://activesupport//lib/active_support/callbacks.rb#515 def make_lambda; end end -# source://activesupport//lib/active_support/callbacks.rb#280 +# source://activesupport//lib/active_support/callbacks.rb#283 class ActiveSupport::Callbacks::Callback # @return [Callback] a new instance of Callback # - # source://activesupport//lib/active_support/callbacks.rb#295 + # source://activesupport//lib/active_support/callbacks.rb#298 def initialize(name, filter, kind, options, chain_config); end # Wraps code with filter # - # source://activesupport//lib/active_support/callbacks.rb#330 + # source://activesupport//lib/active_support/callbacks.rb#333 def apply(callback_sequence); end # Returns the value of attribute chain_config. # - # source://activesupport//lib/active_support/callbacks.rb#293 + # source://activesupport//lib/active_support/callbacks.rb#296 def chain_config; end - # source://activesupport//lib/active_support/callbacks.rb#344 + # source://activesupport//lib/active_support/callbacks.rb#347 def current_scopes; end # @return [Boolean] # - # source://activesupport//lib/active_support/callbacks.rb#320 + # source://activesupport//lib/active_support/callbacks.rb#323 def duplicates?(other); end # Returns the value of attribute filter. # - # source://activesupport//lib/active_support/callbacks.rb#293 + # source://activesupport//lib/active_support/callbacks.rb#296 def filter; end # Returns the value of attribute kind. # - # source://activesupport//lib/active_support/callbacks.rb#292 + # source://activesupport//lib/active_support/callbacks.rb#295 def kind; end # Sets the attribute kind # # @param value the value to set the attribute kind to. # - # source://activesupport//lib/active_support/callbacks.rb#292 + # source://activesupport//lib/active_support/callbacks.rb#295 def kind=(_arg0); end # @return [Boolean] # - # source://activesupport//lib/active_support/callbacks.rb#316 + # source://activesupport//lib/active_support/callbacks.rb#319 def matches?(_kind, _filter); end - # source://activesupport//lib/active_support/callbacks.rb#304 + # source://activesupport//lib/active_support/callbacks.rb#307 def merge_conditional_options(chain, if_option:, unless_option:); end # Returns the value of attribute name. # - # source://activesupport//lib/active_support/callbacks.rb#292 + # source://activesupport//lib/active_support/callbacks.rb#295 def name; end # Sets the attribute name # # @param value the value to set the attribute name to. # - # source://activesupport//lib/active_support/callbacks.rb#292 + # source://activesupport//lib/active_support/callbacks.rb#295 def name=(_arg0); end private - # source://activesupport//lib/active_support/callbacks.rb#352 + # source://activesupport//lib/active_support/callbacks.rb#355 def check_conditionals(conditionals); end - # source://activesupport//lib/active_support/callbacks.rb#367 + # source://activesupport//lib/active_support/callbacks.rb#370 def conditions_lambdas; end class << self - # source://activesupport//lib/active_support/callbacks.rb#281 + # source://activesupport//lib/active_support/callbacks.rb#284 def build(chain, filter, kind, options); end end end -# source://activesupport//lib/active_support/callbacks.rb#349 +# source://activesupport//lib/active_support/callbacks.rb#352 ActiveSupport::Callbacks::Callback::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) -# source://activesupport//lib/active_support/callbacks.rb#603 +# source://activesupport//lib/active_support/callbacks.rb#606 class ActiveSupport::Callbacks::CallbackChain include ::Enumerable # @return [CallbackChain] a new instance of CallbackChain # - # source://activesupport//lib/active_support/callbacks.rb#608 + # source://activesupport//lib/active_support/callbacks.rb#611 def initialize(name, config); end - # source://activesupport//lib/active_support/callbacks.rb#654 + # source://activesupport//lib/active_support/callbacks.rb#671 def append(*callbacks); end - # source://activesupport//lib/active_support/callbacks.rb#633 + # source://activesupport//lib/active_support/callbacks.rb#639 def clear; end - # source://activesupport//lib/active_support/callbacks.rb#645 - def compile; end + # source://activesupport//lib/active_support/callbacks.rb#653 + def compile(type); end # Returns the value of attribute config. # - # source://activesupport//lib/active_support/callbacks.rb#606 + # source://activesupport//lib/active_support/callbacks.rb#609 def config; end - # source://activesupport//lib/active_support/callbacks.rb#628 + # source://activesupport//lib/active_support/callbacks.rb#633 def delete(o); end - # source://activesupport//lib/active_support/callbacks.rb#619 + # source://activesupport//lib/active_support/callbacks.rb#623 def each(&block); end # @return [Boolean] # - # source://activesupport//lib/active_support/callbacks.rb#621 + # source://activesupport//lib/active_support/callbacks.rb#625 def empty?; end - # source://activesupport//lib/active_support/callbacks.rb#620 + # source://activesupport//lib/active_support/callbacks.rb#624 def index(o); end - # source://activesupport//lib/active_support/callbacks.rb#623 + # source://activesupport//lib/active_support/callbacks.rb#627 def insert(index, o); end # Returns the value of attribute name. # - # source://activesupport//lib/active_support/callbacks.rb#606 + # source://activesupport//lib/active_support/callbacks.rb#609 def name; end - # source://activesupport//lib/active_support/callbacks.rb#658 + # source://activesupport//lib/active_support/callbacks.rb#675 def prepend(*callbacks); end protected # Returns the value of attribute chain. # - # source://activesupport//lib/active_support/callbacks.rb#663 + # source://activesupport//lib/active_support/callbacks.rb#680 def chain; end private - # source://activesupport//lib/active_support/callbacks.rb#666 + # source://activesupport//lib/active_support/callbacks.rb#683 def append_one(callback); end - # source://activesupport//lib/active_support/callbacks.rb#683 + # source://activesupport//lib/active_support/callbacks.rb#703 def default_terminator; end - # source://activesupport//lib/active_support/callbacks.rb#639 + # source://activesupport//lib/active_support/callbacks.rb#646 def initialize_copy(other); end - # source://activesupport//lib/active_support/callbacks.rb#672 + # source://activesupport//lib/active_support/callbacks.rb#690 def prepend_one(callback); end - # source://activesupport//lib/active_support/callbacks.rb#678 + # source://activesupport//lib/active_support/callbacks.rb#697 def remove_duplicates(callback); end end @@ -2263,53 +2930,53 @@ end # chaining them with nested lambda calls, see: # https://github.com/rails/rails/issues/18011 # -# source://activesupport//lib/active_support/callbacks.rb#556 +# source://activesupport//lib/active_support/callbacks.rb#559 class ActiveSupport::Callbacks::CallbackSequence # @return [CallbackSequence] a new instance of CallbackSequence # - # source://activesupport//lib/active_support/callbacks.rb#557 + # source://activesupport//lib/active_support/callbacks.rb#560 def initialize(nested = T.unsafe(nil), call_template = T.unsafe(nil), user_conditions = T.unsafe(nil)); end - # source://activesupport//lib/active_support/callbacks.rb#571 + # source://activesupport//lib/active_support/callbacks.rb#574 def after(&after); end - # source://activesupport//lib/active_support/callbacks.rb#576 + # source://activesupport//lib/active_support/callbacks.rb#579 def around(call_template, user_conditions); end - # source://activesupport//lib/active_support/callbacks.rb#566 + # source://activesupport//lib/active_support/callbacks.rb#569 def before(&before); end - # source://activesupport//lib/active_support/callbacks.rb#590 + # source://activesupport//lib/active_support/callbacks.rb#593 def expand_call_template(arg, block); end # @return [Boolean] # - # source://activesupport//lib/active_support/callbacks.rb#586 + # source://activesupport//lib/active_support/callbacks.rb#589 def final?; end - # source://activesupport//lib/active_support/callbacks.rb#598 + # source://activesupport//lib/active_support/callbacks.rb#601 def invoke_after(arg); end - # source://activesupport//lib/active_support/callbacks.rb#594 + # source://activesupport//lib/active_support/callbacks.rb#597 def invoke_before(arg); end # Returns the value of attribute nested. # - # source://activesupport//lib/active_support/callbacks.rb#584 + # source://activesupport//lib/active_support/callbacks.rb#587 def nested; end # @return [Boolean] # - # source://activesupport//lib/active_support/callbacks.rb#580 + # source://activesupport//lib/active_support/callbacks.rb#583 def skip?(arg); end end -# source://activesupport//lib/active_support/callbacks.rb#695 +# source://activesupport//lib/active_support/callbacks.rb#715 module ActiveSupport::Callbacks::ClassMethods # This is used internally to append, prepend and skip callbacks to the # CallbackChain. # - # source://activesupport//lib/active_support/callbacks.rb#705 + # source://activesupport//lib/active_support/callbacks.rb#725 def __update_callbacks(name); end # Define sets of events in the object life cycle that support callbacks. @@ -2389,17 +3056,17 @@ module ActiveSupport::Callbacks::ClassMethods # !, ? or =. # # Calling +define_callbacks+ multiple times with the same +names+ will - # overwrite previous callbacks registered with +set_callback+. + # overwrite previous callbacks registered with #set_callback. # - # source://activesupport//lib/active_support/callbacks.rb#917 + # source://activesupport//lib/active_support/callbacks.rb#940 def define_callbacks(*names); end - # source://activesupport//lib/active_support/callbacks.rb#696 + # source://activesupport//lib/active_support/callbacks.rb#716 def normalize_callback_params(filters, block); end # Remove all set callbacks for the given event. # - # source://activesupport//lib/active_support/callbacks.rb#827 + # source://activesupport//lib/active_support/callbacks.rb#850 def reset_callbacks(name); end # Install a callback for the given event. @@ -2416,7 +3083,7 @@ module ActiveSupport::Callbacks::ClassMethods # # The callback can be specified as a symbol naming an instance method; as a # proc, lambda, or block; or as an object that responds to a certain method - # determined by the :scope argument to +define_callbacks+. + # determined by the :scope argument to #define_callbacks. # # If a proc, lambda, or block is given, its body is evaluated in the context # of the current object. It can also optionally accept the current object as @@ -2447,13 +3114,16 @@ module ActiveSupport::Callbacks::ClassMethods # * :prepend - If +true+, the callback will be prepended to the # existing chain rather than appended. # - # source://activesupport//lib/active_support/callbacks.rb#756 + # source://activesupport//lib/active_support/callbacks.rb#776 def set_callback(name, *filter_list, &block); end - # Skip a previously set callback. Like +set_callback+, :if or + # Skip a previously set callback. Like #set_callback, :if or # :unless options may be passed in order to control when the # callback is skipped. # + # Note: this example uses +PersonRecord+ and +#saving_message+, which you + # can see defined here[rdoc-ref:ActiveSupport::Callbacks] + # # class Writer < PersonRecord # attr_accessor :age # skip_callback :save, :before, :saving_message, if: -> { age > 18 } @@ -2483,74 +3153,74 @@ module ActiveSupport::Callbacks::ClassMethods # An ArgumentError will be raised if the callback has not # already been set (unless the :raise option is set to false). # - # source://activesupport//lib/active_support/callbacks.rb#802 + # source://activesupport//lib/active_support/callbacks.rb#825 def skip_callback(name, *filter_list, &block); end protected - # source://activesupport//lib/active_support/callbacks.rb#948 + # source://activesupport//lib/active_support/callbacks.rb#971 def get_callbacks(name); end - # source://activesupport//lib/active_support/callbacks.rb#952 + # source://activesupport//lib/active_support/callbacks.rb#975 def set_callbacks(name, callbacks); end end -# source://activesupport//lib/active_support/callbacks.rb#150 +# source://activesupport//lib/active_support/callbacks.rb#153 module ActiveSupport::Callbacks::Conditionals; end -# source://activesupport//lib/active_support/callbacks.rb#151 +# source://activesupport//lib/active_support/callbacks.rb#154 class ActiveSupport::Callbacks::Conditionals::Value # @return [Value] a new instance of Value # - # source://activesupport//lib/active_support/callbacks.rb#152 + # source://activesupport//lib/active_support/callbacks.rb#155 def initialize(&block); end - # source://activesupport//lib/active_support/callbacks.rb#155 + # source://activesupport//lib/active_support/callbacks.rb#158 def call(target, value); end end -# source://activesupport//lib/active_support/callbacks.rb#159 +# source://activesupport//lib/active_support/callbacks.rb#162 module ActiveSupport::Callbacks::Filters; end -# source://activesupport//lib/active_support/callbacks.rb#212 +# source://activesupport//lib/active_support/callbacks.rb#215 class ActiveSupport::Callbacks::Filters::After class << self - # source://activesupport//lib/active_support/callbacks.rb#213 + # source://activesupport//lib/active_support/callbacks.rb#216 def build(callback_sequence, user_callback, user_conditions, chain_config); end private - # source://activesupport//lib/active_support/callbacks.rb#255 + # source://activesupport//lib/active_support/callbacks.rb#258 def conditional(callback_sequence, user_callback, user_conditions); end - # source://activesupport//lib/active_support/callbacks.rb#244 + # source://activesupport//lib/active_support/callbacks.rb#247 def halting(callback_sequence, user_callback); end - # source://activesupport//lib/active_support/callbacks.rb#229 + # source://activesupport//lib/active_support/callbacks.rb#232 def halting_and_conditional(callback_sequence, user_callback, user_conditions); end - # source://activesupport//lib/active_support/callbacks.rb#269 + # source://activesupport//lib/active_support/callbacks.rb#272 def simple(callback_sequence, user_callback); end end end -# source://activesupport//lib/active_support/callbacks.rb#162 +# source://activesupport//lib/active_support/callbacks.rb#165 class ActiveSupport::Callbacks::Filters::Before class << self - # source://activesupport//lib/active_support/callbacks.rb#163 + # source://activesupport//lib/active_support/callbacks.rb#166 def build(callback_sequence, user_callback, user_conditions, chain_config, filter, name); end private - # source://activesupport//lib/active_support/callbacks.rb#192 + # source://activesupport//lib/active_support/callbacks.rb#195 def halting(callback_sequence, user_callback, halted_lambda, filter, name); end - # source://activesupport//lib/active_support/callbacks.rb#173 + # source://activesupport//lib/active_support/callbacks.rb#176 def halting_and_conditional(callback_sequence, user_callback, user_conditions, halted_lambda, filter, name); end end end -# source://activesupport//lib/active_support/callbacks.rb#160 +# source://activesupport//lib/active_support/callbacks.rb#163 class ActiveSupport::Callbacks::Filters::Environment < ::Struct # Returns the value of attribute halted # @@ -2665,6 +3335,8 @@ module ActiveSupport::CompareWithRange def include?(value); end end +# = Active Support \Concern +# # A typical module looks like this: # # module M @@ -2680,7 +3352,7 @@ end # end # end # -# By using ActiveSupport::Concern the above module could instead be +# By using +ActiveSupport::Concern+ the above module could instead be # written as: # # require "active_support/concern" @@ -2737,7 +3409,7 @@ end # end # # Unfortunately this won't work, since when +Foo+ is included, its base -# is the +Bar+ module, not the +Host+ class. With ActiveSupport::Concern, +# is the +Bar+ module, not the +Host+ class. With +ActiveSupport::Concern+, # module dependencies are properly resolved: # # require "active_support/concern" @@ -2772,9 +3444,9 @@ end # # prepend is also used for any dependencies. # -# source://activesupport//lib/active_support/concern.rb#110 +# source://activesupport//lib/active_support/concern.rb#112 module ActiveSupport::Concern - # source://activesupport//lib/active_support/concern.rb#127 + # source://activesupport//lib/active_support/concern.rb#129 def append_features(base); end # Define class methods from given block. @@ -2798,45 +3470,45 @@ module ActiveSupport::Concern # Buzz.foo # => "foo" # Buzz.bar # => private method 'bar' called for Buzz:Class(NoMethodError) # - # source://activesupport//lib/active_support/concern.rb#207 + # source://activesupport//lib/active_support/concern.rb#209 def class_methods(&class_methods_module_definition); end # Evaluate given block in context of base class, # so that you can write class macros here. # When you define more than one +included+ block, it raises an exception. # - # source://activesupport//lib/active_support/concern.rb#156 + # source://activesupport//lib/active_support/concern.rb#158 def included(base = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/concern.rb#140 + # source://activesupport//lib/active_support/concern.rb#142 def prepend_features(base); end # Evaluate given block in context of base class, # so that you can write class macros here. # When you define more than one +prepended+ block, it raises an exception. # - # source://activesupport//lib/active_support/concern.rb#173 + # source://activesupport//lib/active_support/concern.rb#175 def prepended(base = T.unsafe(nil), &block); end class << self - # source://activesupport//lib/active_support/concern.rb#123 + # source://activesupport//lib/active_support/concern.rb#125 def extended(base); end end end -# source://activesupport//lib/active_support/concern.rb#111 +# source://activesupport//lib/active_support/concern.rb#113 class ActiveSupport::Concern::MultipleIncludedBlocks < ::StandardError # @return [MultipleIncludedBlocks] a new instance of MultipleIncludedBlocks # - # source://activesupport//lib/active_support/concern.rb#112 + # source://activesupport//lib/active_support/concern.rb#114 def initialize; end end -# source://activesupport//lib/active_support/concern.rb#117 +# source://activesupport//lib/active_support/concern.rb#119 class ActiveSupport::Concern::MultiplePrependBlocks < ::StandardError # @return [MultiplePrependBlocks] a new instance of MultiplePrependBlocks # - # source://activesupport//lib/active_support/concern.rb#118 + # source://activesupport//lib/active_support/concern.rb#120 def initialize; end end @@ -2846,22 +3518,35 @@ module ActiveSupport::Concurrency; end # A monitor that will permit dependency loading while blocked waiting for # the lock. # -# source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#9 +# source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#32 class ActiveSupport::Concurrency::LoadInterlockAwareMonitor < ::Monitor + include ::ActiveSupport::Concurrency::LoadInterlockAwareMonitorMixin +end + +# source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#7 +module ActiveSupport::Concurrency::LoadInterlockAwareMonitorMixin # Enters an exclusive section, but allows dependency loading while blocked # - # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#15 + # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#13 def mon_enter; end - # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#20 + # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#18 def synchronize(&block); end end -# source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#11 -ActiveSupport::Concurrency::LoadInterlockAwareMonitor::EXCEPTION_IMMEDIATE = T.let(T.unsafe(nil), Hash) +# source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#9 +ActiveSupport::Concurrency::LoadInterlockAwareMonitorMixin::EXCEPTION_IMMEDIATE = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#8 +ActiveSupport::Concurrency::LoadInterlockAwareMonitorMixin::EXCEPTION_NEVER = T.let(T.unsafe(nil), Hash) -# source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#10 -ActiveSupport::Concurrency::LoadInterlockAwareMonitor::EXCEPTION_NEVER = T.let(T.unsafe(nil), Hash) +# source://activesupport//lib/active_support/concurrency/null_lock.rb#5 +module ActiveSupport::Concurrency::NullLock + extend ::ActiveSupport::Concurrency::NullLock + + # source://activesupport//lib/active_support/concurrency/null_lock.rb#8 + def synchronize; end +end # A share/exclusive lock, otherwise known as a read/write lock. # @@ -2958,10 +3643,33 @@ class ActiveSupport::Concurrency::ShareLock def wait_for(method, &block); end end +# source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#36 +class ActiveSupport::Concurrency::ThreadLoadInterlockAwareMonitor + include ::ActiveSupport::Concurrency::LoadInterlockAwareMonitorMixin + + # @return [ThreadLoadInterlockAwareMonitor] a new instance of ThreadLoadInterlockAwareMonitor + # + # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#39 + def initialize; end + + # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#13 + def mon_enter; end + + private + + # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#60 + def mon_exit; end + + # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#46 + def mon_try_enter; end +end + +# = Active Support \Configurable +# # Configurable provides a config method to store and retrieve # configuration options as an OrderedOptions. # -# source://activesupport//lib/active_support/configurable.rb#9 +# source://activesupport//lib/active_support/configurable.rb#11 module ActiveSupport::Configurable extend ::ActiveSupport::Concern @@ -2983,18 +3691,18 @@ module ActiveSupport::Configurable # user.config.allowed_access # => true # user.config.level # => 1 # - # source://activesupport//lib/active_support/configurable.rb#145 + # source://activesupport//lib/active_support/configurable.rb#155 def config; end end -# source://activesupport//lib/active_support/configurable.rb#27 +# source://activesupport//lib/active_support/configurable.rb#29 module ActiveSupport::Configurable::ClassMethods - # source://activesupport//lib/active_support/configurable.rb#28 + # source://activesupport//lib/active_support/configurable.rb#30 def config; end # @yield [config] # - # source://activesupport//lib/active_support/configurable.rb#37 + # source://activesupport//lib/active_support/configurable.rb#39 def configure; end private @@ -3068,19 +3776,22 @@ module ActiveSupport::Configurable::ClassMethods # User.allowed_access # => false # User.hair_colors # => [:brown, :black, :blonde, :red] # - # source://activesupport//lib/active_support/configurable.rb#109 + # source://activesupport//lib/active_support/configurable.rb#111 def config_accessor(*names, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/configurable.rb#132 + def inherited(subclass); end end -# source://activesupport//lib/active_support/configurable.rb#12 +# source://activesupport//lib/active_support/configurable.rb#14 class ActiveSupport::Configurable::Configuration < ::ActiveSupport::InheritableOptions - # source://activesupport//lib/active_support/configurable.rb#13 + # source://activesupport//lib/active_support/configurable.rb#15 def compile_methods!; end class << self # Compiles reader methods so we don't have to go through method_missing. # - # source://activesupport//lib/active_support/configurable.rb#18 + # source://activesupport//lib/active_support/configurable.rb#20 def compile_methods!(keys); end end end @@ -3118,6 +3829,54 @@ end # source://activesupport//lib/active_support/configuration_file.rb#10 class ActiveSupport::ConfigurationFile::FormatError < ::StandardError; end +# source://activesupport//lib/active_support/core_ext/erb/util.rb#6 +module ActiveSupport::CoreExt; end + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#7 +module ActiveSupport::CoreExt::ERBUtil + # A utility method for escaping HTML tag characters. + # This method is also aliased as h. + # + # puts html_escape('is a > 0 & a < 10?') + # # => is a > 0 & a < 10? + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 + def h(s); end + + # A utility method for escaping HTML tag characters. + # This method is also aliased as h. + # + # puts html_escape('is a > 0 & a < 10?') + # # => is a > 0 & a < 10? + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 + def html_escape(s); end + + # HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer. + # This method is not for public consumption! Seriously! + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#10 + def unwrapped_html_escape(s); end +end + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#31 +module ActiveSupport::CoreExt::ERBUtilPrivate + include ::ActiveSupport::CoreExt::ERBUtil + + private + + # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 + def h(s); end + + # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 + def html_escape(s); end + + # source://activesupport//lib/active_support/core_ext/erb/util.rb#10 + def unwrapped_html_escape(s); end +end + +# = Current Attributes +# # Abstract super class that provides a thread-isolated attributes singleton, which resets automatically # before and after each request. This allows you to keep all the per-request attributes easily # available to the whole system. @@ -3200,7 +3959,7 @@ class ActiveSupport::ConfigurationFile::FormatError < ::StandardError; end # The attributes stuck in Current should be used by more or less all actions on all requests. If you start # sticking controller-specific attributes in there, you're going to create a mess. # -# source://activesupport//lib/active_support/current_attributes.rb#89 +# source://activesupport//lib/active_support/current_attributes.rb#91 class ActiveSupport::CurrentAttributes include ::ActiveSupport::Callbacks extend ::ActiveSupport::Callbacks::ClassMethods @@ -3208,36 +3967,36 @@ class ActiveSupport::CurrentAttributes # @return [CurrentAttributes] a new instance of CurrentAttributes # - # source://activesupport//lib/active_support/current_attributes.rb#188 + # source://activesupport//lib/active_support/current_attributes.rb#197 def initialize; end - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport//lib/active_support/callbacks.rb#940 + # source://activesupport//lib/active_support/callbacks.rb#963 def _reset_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#928 + # source://activesupport//lib/active_support/callbacks.rb#951 def _run_reset_callbacks(&block); end # Returns the value of attribute attributes. # - # source://activesupport//lib/active_support/current_attributes.rb#186 + # source://activesupport//lib/active_support/current_attributes.rb#195 def attributes; end # Sets the attribute attributes # # @param value the value to set the attribute attributes to. # - # source://activesupport//lib/active_support/current_attributes.rb#186 + # source://activesupport//lib/active_support/current_attributes.rb#195 def attributes=(_arg0); end # Reset all attributes. Should be called before and after actions, when used as a per-request singleton. # - # source://activesupport//lib/active_support/current_attributes.rb#211 + # source://activesupport//lib/active_support/current_attributes.rb#220 def reset; end # Expose one or more attributes within a block. Old values are returned after the block concludes. @@ -3251,91 +4010,139 @@ class ActiveSupport::CurrentAttributes # end # end # - # source://activesupport//lib/active_support/current_attributes.rb#202 + # source://activesupport//lib/active_support/current_attributes.rb#211 def set(set_attributes); end private - # source://activesupport//lib/active_support/current_attributes.rb#218 + # source://activesupport//lib/active_support/current_attributes.rb#227 def assign_attributes(new_attributes); end - # source://activesupport//lib/active_support/current_attributes.rb#222 + # source://activesupport//lib/active_support/current_attributes.rb#231 def compute_attributes(keys); end class << self - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport//lib/active_support/callbacks.rb#932 + # source://activesupport//lib/active_support/callbacks.rb#955 def _reset_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#936 + # source://activesupport//lib/active_support/callbacks.rb#959 def _reset_callbacks=(value); end - # Calls this block after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. + # Calls this callback after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. # - # source://activesupport//lib/active_support/current_attributes.rb#142 - def after_reset(&block); end + # source://activesupport//lib/active_support/current_attributes.rb#151 + def after_reset(*methods, &block); end # Declares one or more attributes that will be given both class and instance accessor methods. # - # source://activesupport//lib/active_support/current_attributes.rb#100 + # source://activesupport//lib/active_support/current_attributes.rb#104 def attribute(*names); end - # Calls this block before #reset is called on the instance. Used for resetting external collaborators that depend on current values. + # Calls this callback before #reset is called on the instance. Used for resetting external collaborators that depend on current values. # - # source://activesupport//lib/active_support/current_attributes.rb#137 - def before_reset(&block); end + # source://activesupport//lib/active_support/current_attributes.rb#146 + def before_reset(*methods, &block); end - # source://activesupport//lib/active_support/current_attributes.rb#153 + # source://activesupport//lib/active_support/current_attributes.rb#162 def clear_all; end # Returns singleton instance for this class in this thread. If none exists, one is created. # - # source://activesupport//lib/active_support/current_attributes.rb#95 + # source://activesupport//lib/active_support/current_attributes.rb#99 def instance; end - # source://activesupport//lib/active_support/current_attributes.rb#147 + # source://activesupport//lib/active_support/current_attributes.rb#156 def reset(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/current_attributes.rb#149 + # source://activesupport//lib/active_support/current_attributes.rb#158 def reset_all; end - # Calls this block after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. + # Calls this callback after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. # - # source://activesupport//lib/active_support/current_attributes.rb#142 - def resets(&block); end + # source://activesupport//lib/active_support/current_attributes.rb#151 + def resets(*methods, &block); end - # source://activesupport//lib/active_support/current_attributes.rb#147 + # source://activesupport//lib/active_support/current_attributes.rb#156 def set(*_arg0, **_arg1, &_arg2); end private - # source://activesupport//lib/active_support/current_attributes.rb#163 + # source://activesupport//lib/active_support/current_attributes.rb#172 def current_instances; end - # source://activesupport//lib/active_support/current_attributes.rb#167 + # source://activesupport//lib/active_support/current_attributes.rb#176 def current_instances_key; end - # source://activesupport//lib/active_support/current_attributes.rb#159 + # source://activesupport//lib/active_support/current_attributes.rb#168 def generated_attribute_methods; end - # source://activesupport//lib/active_support/current_attributes.rb#171 + # source://activesupport//lib/active_support/current_attributes.rb#180 def method_missing(name, *args, **_arg2, &block); end # @return [Boolean] # - # source://activesupport//lib/active_support/current_attributes.rb#181 + # source://activesupport//lib/active_support/current_attributes.rb#190 def respond_to_missing?(name, _); end end end +# source://activesupport//lib/active_support/current_attributes.rb#95 +ActiveSupport::CurrentAttributes::INVALID_ATTRIBUTE_NAMES = T.let(T.unsafe(nil), Array) + +# Provides +deep_merge+ and +deep_merge!+ methods. Expects the including class +# to provide a merge!(other, &block) method. +# +# source://activesupport//lib/active_support/deep_mergeable.rb#6 +module ActiveSupport::DeepMergeable + # Returns a new instance with the values from +other+ merged recursively. + # + # class Hash + # include ActiveSupport::DeepMergeable + # end + # + # hash_1 = { a: true, b: { c: [1, 2, 3] } } + # hash_2 = { a: false, b: { x: [3, 4, 5] } } + # + # hash_1.deep_merge(hash_2) + # # => { a: false, b: { c: [1, 2, 3], x: [3, 4, 5] } } + # + # A block can be provided to merge non-DeepMergeable values: + # + # hash_1 = { a: 100, b: 200, c: { c1: 100 } } + # hash_2 = { b: 250, c: { c1: 200 } } + # + # hash_1.deep_merge(hash_2) do |key, this_val, other_val| + # this_val + other_val + # end + # # => { a: 100, b: 450, c: { c1: 300 } } + # + # source://activesupport//lib/active_support/deep_mergeable.rb#29 + def deep_merge(other, &block); end + + # Same as #deep_merge, but modifies +self+. + # + # source://activesupport//lib/active_support/deep_mergeable.rb#34 + def deep_merge!(other, &block); end + + # Returns true if +other+ can be deep merged into +self+. Classes may + # override this method to restrict or expand the domain of deep mergeable + # values. Defaults to checking that +other+ is of type +self.class+. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/deep_mergeable.rb#49 + def deep_merge?(other); end +end + # source://activesupport//lib/active_support/dependencies/interlock.rb#6 module ActiveSupport::Dependencies class << self @@ -3467,122 +4274,129 @@ module ActiveSupport::Dependencies::RequireDependency def require_dependency(filename); end end -# source://activesupport//lib/active_support/core_ext/numeric/deprecated_conversions.rb#4 -module ActiveSupport::DeprecatedNumericWithFormat - # source://activesupport//lib/active_support/core_ext/numeric/deprecated_conversions.rb#5 - def to_s(format = T.unsafe(nil), options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/range/deprecated_conversions.rb#4 -module ActiveSupport::DeprecatedRangeWithFormat - # source://activesupport//lib/active_support/deprecation/method_wrappers.rb#63 - def to_default_s(*args, **_arg1, &block); end - - # source://activesupport//lib/active_support/core_ext/range/deprecated_conversions.rb#6 - def to_s(format = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/range/deprecated_conversions.rb#5 -ActiveSupport::DeprecatedRangeWithFormat::NOT_SET = T.let(T.unsafe(nil), Object) - -# \Deprecation specifies the API used by Rails to deprecate methods, instance -# variables, objects, and constants. +# = Active Support \Deprecation # -# source://activesupport//lib/active_support/deprecation.rb#8 -class ActiveSupport::Deprecation - include ::Singleton - include ::ActiveSupport::Deprecation::InstanceDelegator - include ::ActiveSupport::Deprecation::Behavior - include ::ActiveSupport::Deprecation::Reporting - include ::ActiveSupport::Deprecation::Disallowed - include ::ActiveSupport::Deprecation::MethodWrapper - extend ::Singleton::SingletonClassMethods - extend ::ActiveSupport::Deprecation::InstanceDelegator::ClassMethods - extend ::ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators - - # It accepts two parameters on initialization. The first is a version of library +# \Deprecation specifies the API used by \Rails to deprecate methods, instance variables, objects, and constants. It's +# also available for gems or applications. +# +# For a gem, use Deprecation.new to create a Deprecation object and store it in your module or class (in order for +# users to be able to configure it). +# +# module MyLibrary +# def self.deprecator +# @deprecator ||= ActiveSupport::Deprecation.new("2.0", "MyLibrary") +# end +# end +# +# For a Railtie or Engine, you may also want to add it to the application's deprecators, so that the application's +# configuration can be applied to it. +# +# module MyLibrary +# class Railtie < Rails::Railtie +# initializer "my_library.deprecator" do |app| +# app.deprecators[:my_library] = MyLibrary.deprecator +# end +# end +# end +# +# With the above initializer, configuration settings like the following will affect +MyLibrary.deprecator+: +# +# # in config/environments/test.rb +# config.active_support.deprecation = :raise +# +# source://activesupport//lib/active_support/deprecation.rb#35 +class ActiveSupport::Deprecation + include ::ActiveSupport::Deprecation::InstanceDelegator + include ::ActiveSupport::Deprecation::Behavior + include ::ActiveSupport::Deprecation::Reporting + include ::ActiveSupport::Deprecation::Disallowed + include ::ActiveSupport::Deprecation::MethodWrapper + extend ::ActiveSupport::Deprecation::InstanceDelegator::ClassMethods + extend ::ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators + + # It accepts two parameters on initialization. The first is a version of library # and the second is a library name. # # ActiveSupport::Deprecation.new('2.0', 'MyLibrary') # # @return [Deprecation] a new instance of Deprecation # - # source://activesupport//lib/active_support/deprecation.rb#41 + # source://activesupport//lib/active_support/deprecation.rb#68 def initialize(deprecation_horizon = T.unsafe(nil), gem_name = T.unsafe(nil)); end # The version number in which the deprecated behavior will be removed, by default. # - # source://activesupport//lib/active_support/deprecation.rb#35 + # source://activesupport//lib/active_support/deprecation.rb#62 def deprecation_horizon; end # The version number in which the deprecated behavior will be removed, by default. # - # source://activesupport//lib/active_support/deprecation.rb#35 + # source://activesupport//lib/active_support/deprecation.rb#62 def deprecation_horizon=(_arg0); end class << self - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def allow(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 + def begin_silence(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def behavior(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def behavior=(arg); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def debug(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def debug=(arg); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def deprecate_methods(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def deprecation_horizon(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def deprecation_horizon=(arg); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#31 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#58 def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def disallowed_behavior(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def disallowed_behavior=(arg); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def disallowed_warnings(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def disallowed_warnings=(arg); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 + def end_silence(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def gem_name(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def gem_name=(arg); end - def new(*_arg0); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def silence(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def silenced(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#34 def silenced=(arg); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#26 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#53 def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end - - private - - def allocate; end end end @@ -3590,20 +4404,21 @@ end # You can create a custom behavior or set any from the +DEFAULT_BEHAVIORS+ # constant. Available behaviors are: # -# [+raise+] Raise ActiveSupport::DeprecationException. -# [+stderr+] Log all deprecation warnings to $stderr. -# [+log+] Log all deprecation warnings to +Rails.logger+. -# [+notify+] Use +ActiveSupport::Notifications+ to notify +deprecation.rails+. -# [+silence+] Do nothing. On Rails, set config.active_support.report_deprecations = false to disable all behaviors. +# [+:raise+] Raise ActiveSupport::DeprecationException. +# [+:stderr+] Log all deprecation warnings to $stderr. +# [+:log+] Log all deprecation warnings to +Rails.logger+. +# [+:notify+] Use ActiveSupport::Notifications to notify +deprecation.rails+. +# [+:report+] Use ActiveSupport::ErrorReporter to report deprecations. +# [+:silence+] Do nothing. On \Rails, set config.active_support.report_deprecations = false to disable all behaviors. # # Setting behaviors only affects deprecations that happen after boot time. -# For more information you can read the documentation of the +behavior=+ method. +# For more information you can read the documentation of the #behavior= method. # -# source://activesupport//lib/active_support/deprecation/behaviors.rb#61 +# source://activesupport//lib/active_support/deprecation/behaviors.rb#69 module ActiveSupport::Deprecation::Behavior # Returns the current behavior or if one isn't set, defaults to +:stderr+. # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#66 + # source://activesupport//lib/active_support/deprecation/behaviors.rb#74 def behavior; end # Sets the behavior to the specified value. Can be a single value, array, @@ -3611,56 +4426,63 @@ module ActiveSupport::Deprecation::Behavior # # Available behaviors: # - # [+raise+] Raise ActiveSupport::DeprecationException. - # [+stderr+] Log all deprecation warnings to $stderr. - # [+log+] Log all deprecation warnings to +Rails.logger+. - # [+notify+] Use +ActiveSupport::Notifications+ to notify +deprecation.rails+. - # [+silence+] Do nothing. + # [+:raise+] Raise ActiveSupport::DeprecationException. + # [+:stderr+] Log all deprecation warnings to $stderr. + # [+:log+] Log all deprecation warnings to +Rails.logger+. + # [+:notify+] Use ActiveSupport::Notifications to notify +deprecation.rails+. + # [+:report+] Use ActiveSupport::ErrorReporter to report deprecations. + # [+:silence+] Do nothing. # # Setting behaviors only affects deprecations that happen after boot time. # Deprecation warnings raised by gems are not affected by this setting - # because they happen before Rails boots up. + # because they happen before \Rails boots up. # - # ActiveSupport::Deprecation.behavior = :stderr - # ActiveSupport::Deprecation.behavior = [:stderr, :log] - # ActiveSupport::Deprecation.behavior = MyCustomHandler - # ActiveSupport::Deprecation.behavior = ->(message, callstack, deprecation_horizon, gem_name) { + # deprecator = ActiveSupport::Deprecation.new + # deprecator.behavior = :stderr + # deprecator.behavior = [:stderr, :log] + # deprecator.behavior = MyCustomHandler + # deprecator.behavior = ->(message, callstack, deprecation_horizon, gem_name) { # # custom stuff # } # - # If you are using Rails, you can set config.active_support.report_deprecations = false to disable - # all deprecation behaviors. This is similar to the +silence+ option but more performant. + # If you are using \Rails, you can set + # config.active_support.report_deprecations = false to disable + # all deprecation behaviors. This is similar to the +:silence+ option but + # more performant. # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#99 + # source://activesupport//lib/active_support/deprecation/behaviors.rb#111 def behavior=(behavior); end # Whether to print a backtrace along with the warning. # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#63 + # source://activesupport//lib/active_support/deprecation/behaviors.rb#71 def debug; end # Whether to print a backtrace along with the warning. # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#63 + # source://activesupport//lib/active_support/deprecation/behaviors.rb#71 def debug=(_arg0); end # Returns the current behavior for disallowed deprecations or if one isn't set, defaults to +:raise+. # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#71 + # source://activesupport//lib/active_support/deprecation/behaviors.rb#79 def disallowed_behavior; end # Sets the behavior for disallowed deprecations (those configured by - # ActiveSupport::Deprecation.disallowed_warnings=) to the specified - # value. As with +behavior=+, this can be a single value, array, or an + # ActiveSupport::Deprecation#disallowed_warnings=) to the specified + # value. As with #behavior=, this can be a single value, array, or an # object that responds to +call+. # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#107 + # source://activesupport//lib/active_support/deprecation/behaviors.rb#119 def disallowed_behavior=(behavior); end private - # source://activesupport//lib/active_support/deprecation/behaviors.rb#112 + # source://activesupport//lib/active_support/deprecation/behaviors.rb#124 def arity_coerce(behavior); end + + # source://activesupport//lib/active_support/deprecation/behaviors.rb#143 + def arity_of_callable(callable); end end # Default warning behaviors per Rails.env. @@ -3672,8 +4494,7 @@ ActiveSupport::Deprecation::DEFAULT_BEHAVIORS = T.let(T.unsafe(nil), Hash) # hooking +const_missing+. # # It takes the names of an old (deprecated) constant and of a new constant -# (both in string form) and optionally a deprecator. The deprecator defaults -# to +ActiveSupport::Deprecator+ if none is specified. +# (both in string form) and a deprecator. # # The deprecated constant now returns the same object as the new one rather # than a proxy object, so it can be used transparently in +rescue+ blocks @@ -3685,48 +4506,49 @@ ActiveSupport::Deprecation::DEFAULT_BEHAVIORS = T.let(T.unsafe(nil), Hash) # # PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) # include ActiveSupport::Deprecation::DeprecatedConstantAccessor -# deprecate_constant 'PLANETS', 'PLANETS_POST_2006' +# deprecate_constant 'PLANETS', 'PLANETS_POST_2006', deprecator: ActiveSupport::Deprecation.new # # PLANETS.map { |planet| planet.capitalize } # # => DEPRECATION WARNING: PLANETS is deprecated! Use PLANETS_POST_2006 instead. # (Backtrace information…) # ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] # -# source://activesupport//lib/active_support/deprecation/constant_accessor.rb#28 +# source://activesupport//lib/active_support/deprecation/constant_accessor.rb#27 module ActiveSupport::Deprecation::DeprecatedConstantAccessor class << self # @private # - # source://activesupport//lib/active_support/deprecation/constant_accessor.rb#29 + # source://activesupport//lib/active_support/deprecation/constant_accessor.rb#28 def included(base); end end end -# DeprecatedConstantProxy transforms a constant into a deprecated one. It -# takes the names of an old (deprecated) constant and of a new constant -# (both in string form) and optionally a deprecator. The deprecator defaults -# to +ActiveSupport::Deprecator+ if none is specified. The deprecated constant -# now returns the value of the new one. +# DeprecatedConstantProxy transforms a constant into a deprecated one. It takes the full names of an old +# (deprecated) constant and of a new constant (both in string form) and a deprecator. The deprecated constant now +# returns the value of the new one. # # PLANETS = %w(mercury venus earth mars jupiter saturn uranus neptune pluto) # # # (In a later update, the original implementation of `PLANETS` has been removed.) # # PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) -# PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('PLANETS', 'PLANETS_POST_2006') +# PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new("PLANETS", "PLANETS_POST_2006", ActiveSupport::Deprecation.new) # # PLANETS.map { |planet| planet.capitalize } # # => DEPRECATION WARNING: PLANETS is deprecated! Use PLANETS_POST_2006 instead. # (Backtrace information…) # ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] # -# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#123 +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#122 class ActiveSupport::Deprecation::DeprecatedConstantProxy < ::Module # @return [DeprecatedConstantProxy] a new instance of DeprecatedConstantProxy # - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#131 + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#130 def initialize(old_const, new_const, deprecator = T.unsafe(nil), message: T.unsafe(nil)); end + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#161 + def append_features(base); end + # Returns the class of the new constant. # # PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) @@ -3736,6 +4558,9 @@ class ActiveSupport::Deprecation::DeprecatedConstantProxy < ::Module # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#157 def class; end + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#171 + def extended(base); end + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 def hash(*_arg0, **_arg1, &_arg2); end @@ -3751,35 +4576,38 @@ class ActiveSupport::Deprecation::DeprecatedConstantProxy < ::Module # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 def name(*_arg0, **_arg1, &_arg2); end + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#166 + def prepend_features(base); end + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 def respond_to?(*_arg0, **_arg1, &_arg2); end private - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#166 + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#181 def const_missing(name); end - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#171 + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#186 def method_missing(called, *args, &block); end - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#162 + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#177 def target; end class << self - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#124 + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#123 def new(*args, **options, &block); end end end -# DeprecatedInstanceVariableProxy transforms an instance variable into a -# deprecated one. It takes an instance of a class, a method on that class -# and an instance variable. It optionally takes a deprecator as the last -# argument. The deprecator defaults to +ActiveSupport::Deprecator+ if none -# is specified. +# DeprecatedInstanceVariableProxy transforms an instance variable into a deprecated one. It takes an instance of a +# class, a method on that class, an instance variable, and a deprecator as the last argument. +# +# Trying to use the deprecated instance variable will result in a deprecation warning, pointing to the method as a +# replacement. # # class Example # def initialize -# @request = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :request, :@request) +# @request = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :request, :@request, ActiveSupport::Deprecation.new) # @_request = :special_request # end # @@ -3813,18 +4641,17 @@ class ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy < ::ActiveSupp private - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#97 + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#98 def target; end - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#101 + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#102 def warn(callstack, called, args); end end -# DeprecatedObjectProxy transforms an object into a deprecated one. It -# takes an object, a deprecation message, and optionally a deprecator. The -# deprecator defaults to +ActiveSupport::Deprecator+ if none is specified. +# DeprecatedObjectProxy transforms an object into a deprecated one. It takes an object, a deprecation message, and +# a deprecator. # -# deprecated_object = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(Object.new, "This object is now deprecated") +# deprecated_object = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(Object.new, "This object is now deprecated", ActiveSupport::Deprecation.new) # # => # # # deprecated_object.to_s @@ -3832,11 +4659,11 @@ end # (Backtrace) # # => "#" # -# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#39 +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#38 class ActiveSupport::Deprecation::DeprecatedObjectProxy < ::ActiveSupport::Deprecation::DeprecationProxy # @return [DeprecatedObjectProxy] a new instance of DeprecatedObjectProxy # - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#40 + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#39 def initialize(object, message, deprecator = T.unsafe(nil)); end private @@ -3867,6 +4694,97 @@ class ActiveSupport::Deprecation::DeprecationProxy end end +# A managed collection of deprecators. Configuration methods, such as +# #behavior=, affect all deprecators in the collection. Additionally, the +# #silence method silences all deprecators in the collection for the +# duration of a given block. +# +# source://activesupport//lib/active_support/deprecation/deprecators.rb#9 +class ActiveSupport::Deprecation::Deprecators + # @return [Deprecators] a new instance of Deprecators + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#10 + def initialize; end + + # Returns a deprecator added to this collection via #[]=. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#16 + def [](name); end + + # Adds a given +deprecator+ to this collection. The deprecator will be + # immediately configured with any options previously set on this + # collection. + # + # deprecators = ActiveSupport::Deprecation::Deprecators.new + # deprecators.debug = true + # + # foo_deprecator = ActiveSupport::Deprecation.new("2.0", "Foo") + # foo_deprecator.debug # => false + # + # deprecators[:foo] = foo_deprecator + # deprecators[:foo].debug # => true + # foo_deprecator.debug # => true + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#34 + def []=(name, deprecator); end + + # Sets the deprecation warning behavior for all deprecators in this + # collection. + # + # See ActiveSupport::Deprecation#behavior=. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#60 + def behavior=(behavior); end + + # Sets the debug flag for all deprecators in this collection. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#52 + def debug=(debug); end + + # Sets the disallowed deprecation warning behavior for all deprecators in + # this collection. + # + # See ActiveSupport::Deprecation#disallowed_behavior=. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#68 + def disallowed_behavior=(disallowed_behavior); end + + # Sets the disallowed deprecation warnings for all deprecators in this + # collection. + # + # See ActiveSupport::Deprecation#disallowed_warnings=. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#76 + def disallowed_warnings=(disallowed_warnings); end + + # Iterates over all deprecators in this collection. If no block is given, + # returns an +Enumerator+. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#41 + def each(&block); end + + # Silences all deprecators in this collection for the duration of the + # given block. + # + # See ActiveSupport::Deprecation#silence. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#84 + def silence(&block); end + + # Sets the silenced flag for all deprecators in this collection. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#47 + def silenced=(silenced); end + + private + + # source://activesupport//lib/active_support/deprecation/deprecators.rb#97 + def apply_options(deprecator); end + + # source://activesupport//lib/active_support/deprecation/deprecators.rb#92 + def set_option(name, value); end +end + # source://activesupport//lib/active_support/deprecation/disallowed.rb#5 module ActiveSupport::Deprecation::Disallowed # Returns the configured criteria used to identify deprecation messages @@ -3899,11 +4817,11 @@ module ActiveSupport::Deprecation::Disallowed # @return [Boolean] # - # source://activesupport//lib/active_support/deprecation/disallowed.rb#40 + # source://activesupport//lib/active_support/deprecation/disallowed.rb#39 def explicitly_allowed?(message); end end -# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#7 +# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#5 module ActiveSupport::Deprecation::InstanceDelegator mixes_in_class_methods ::ActiveSupport::Deprecation::InstanceDelegator::ClassMethods mixes_in_class_methods ::ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators @@ -3911,26 +4829,35 @@ module ActiveSupport::Deprecation::InstanceDelegator class << self # @private # - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#8 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#6 def included(base); end end end -# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#14 +# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#11 module ActiveSupport::Deprecation::InstanceDelegator::ClassMethods + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#47 + def _instance; end + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#15 def include(included_module); end + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#42 + def instance; end + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#20 def method_added(method_name); end end -# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#25 +# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#12 +ActiveSupport::Deprecation::InstanceDelegator::ClassMethods::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) + +# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#52 module ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#31 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#58 def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#26 + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#53 def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end end @@ -3946,41 +4873,24 @@ module ActiveSupport::Deprecation::MethodWrapper # def eee; end # end # - # Using the default deprecator: - # ActiveSupport::Deprecation.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead') + # deprecator = ActiveSupport::Deprecation.new('next-release', 'MyGem') + # + # deprecator.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead') # # => Fred # # Fred.new.aaa - # # DEPRECATION WARNING: aaa is deprecated and will be removed from Rails 5.1. (called from irb_binding at (irb):10) + # # DEPRECATION WARNING: aaa is deprecated and will be removed from MyGem next-release. (called from irb_binding at (irb):10) # # => nil # # Fred.new.bbb - # # DEPRECATION WARNING: bbb is deprecated and will be removed from Rails 5.1 (use zzz instead). (called from irb_binding at (irb):11) + # # DEPRECATION WARNING: bbb is deprecated and will be removed from MyGem next-release (use zzz instead). (called from irb_binding at (irb):11) # # => nil # # Fred.new.ccc - # # DEPRECATION WARNING: ccc is deprecated and will be removed from Rails 5.1 (use Bar#ccc instead). (called from irb_binding at (irb):12) - # # => nil - # - # Passing in a custom deprecator: - # custom_deprecator = ActiveSupport::Deprecation.new('next-release', 'MyGem') - # ActiveSupport::Deprecation.deprecate_methods(Fred, ddd: :zzz, deprecator: custom_deprecator) - # # => [:ddd] - # - # Fred.new.ddd - # DEPRECATION WARNING: ddd is deprecated and will be removed from MyGem next-release (use zzz instead). (called from irb_binding at (irb):15) + # # DEPRECATION WARNING: ccc is deprecated and will be removed from MyGem next-release (use Bar#ccc instead). (called from irb_binding at (irb):12) # # => nil # - # Using a custom deprecator directly: - # custom_deprecator = ActiveSupport::Deprecation.new('next-release', 'MyGem') - # custom_deprecator.deprecate_methods(Fred, eee: :zzz) - # # => [:eee] - # - # Fred.new.eee - # DEPRECATION WARNING: eee is deprecated and will be removed from MyGem next-release (use zzz instead). (called from irb_binding at (irb):18) - # # => nil - # - # source://activesupport//lib/active_support/deprecation/method_wrappers.rb#52 + # source://activesupport//lib/active_support/deprecation/method_wrappers.rb#35 def deprecate_methods(target_module, *method_names); end end @@ -3991,36 +4901,43 @@ module ActiveSupport::Deprecation::Reporting # expressions. (Symbols are treated as strings). These are compared against # the text of deprecation warning messages generated within the block. # Matching warnings will be exempt from the rules set by - # +ActiveSupport::Deprecation.disallowed_warnings+ + # ActiveSupport::Deprecation#disallowed_warnings. # # The optional if: argument accepts a truthy/falsy value or an object that # responds to .call. If truthy, then matching warnings will be allowed. # If falsey then the method yields to the block without allowing the warning. # - # ActiveSupport::Deprecation.disallowed_behavior = :raise - # ActiveSupport::Deprecation.disallowed_warnings = [ + # deprecator = ActiveSupport::Deprecation.new + # deprecator.disallowed_behavior = :raise + # deprecator.disallowed_warnings = [ # "something broke" # ] # - # ActiveSupport::Deprecation.warn('something broke!') + # deprecator.warn('something broke!') # # => ActiveSupport::DeprecationException # - # ActiveSupport::Deprecation.allow ['something broke'] do - # ActiveSupport::Deprecation.warn('something broke!') + # deprecator.allow ['something broke'] do + # deprecator.warn('something broke!') # end # # => nil # - # ActiveSupport::Deprecation.allow ['something broke'], if: Rails.env.production? do - # ActiveSupport::Deprecation.warn('something broke!') + # deprecator.allow ['something broke'], if: Rails.env.production? do + # deprecator.warn('something broke!') # end # # => ActiveSupport::DeprecationException for dev/test, nil for production # - # source://activesupport//lib/active_support/deprecation/reporting.rb#72 + # source://activesupport//lib/active_support/deprecation/reporting.rb#89 def allow(allowed_warnings = T.unsafe(nil), if: T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/deprecation/reporting.rb#86 + # source://activesupport//lib/active_support/deprecation/reporting.rb#48 + def begin_silence; end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#99 def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end + # source://activesupport//lib/active_support/deprecation/reporting.rb#52 + def end_silence; end + # Name of gem where method is deprecated # # source://activesupport//lib/active_support/deprecation/reporting.rb#11 @@ -4033,18 +4950,19 @@ module ActiveSupport::Deprecation::Reporting # Silence deprecation warnings within the block. # - # ActiveSupport::Deprecation.warn('something broke!') + # deprecator = ActiveSupport::Deprecation.new + # deprecator.warn('something broke!') # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" # - # ActiveSupport::Deprecation.silence do - # ActiveSupport::Deprecation.warn('something broke!') + # deprecator.silence do + # deprecator.warn('something broke!') # end # # => nil # - # source://activesupport//lib/active_support/deprecation/reporting.rb#40 + # source://activesupport//lib/active_support/deprecation/reporting.rb#41 def silence(&block); end - # source://activesupport//lib/active_support/deprecation/reporting.rb#82 + # source://activesupport//lib/active_support/deprecation/reporting.rb#56 def silenced; end # Whether to print a message (silent mode) @@ -4053,9 +4971,9 @@ module ActiveSupport::Deprecation::Reporting def silenced=(_arg0); end # Outputs a deprecation warning to the output configured by - # ActiveSupport::Deprecation.behavior. + # ActiveSupport::Deprecation#behavior. # - # ActiveSupport::Deprecation.warn('something broke!') + # ActiveSupport::Deprecation.new.warn('something broke!') # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" # # source://activesupport//lib/active_support/deprecation/reporting.rb#18 @@ -4063,7 +4981,7 @@ module ActiveSupport::Deprecation::Reporting private - # source://activesupport//lib/active_support/deprecation/reporting.rb#137 + # source://activesupport//lib/active_support/deprecation/reporting.rb#153 def _extract_callstack(callstack); end # Outputs a deprecation warning message @@ -4075,23 +4993,28 @@ module ActiveSupport::Deprecation::Reporting # deprecated_method_warning(:method_name, "Optional message") # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon} (Optional message)" # - # source://activesupport//lib/active_support/deprecation/reporting.rb#102 + # source://activesupport//lib/active_support/deprecation/reporting.rb#115 def deprecated_method_warning(method_name, message = T.unsafe(nil)); end - # source://activesupport//lib/active_support/deprecation/reporting.rb#116 + # source://activesupport//lib/active_support/deprecation/reporting.rb#129 def deprecation_caller_message(callstack); end - # source://activesupport//lib/active_support/deprecation/reporting.rb#111 + # source://activesupport//lib/active_support/deprecation/reporting.rb#124 def deprecation_message(callstack, message = T.unsafe(nil)); end - # source://activesupport//lib/active_support/deprecation/reporting.rb#127 + # source://activesupport//lib/active_support/deprecation/reporting.rb#140 def extract_callstack(callstack); end - # source://activesupport//lib/active_support/deprecation/reporting.rb#152 - def ignored_callstack(path); end + # @return [Boolean] + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#169 + def ignored_callstack?(path); end end -# source://activesupport//lib/active_support/deprecation/reporting.rb#150 +# source://activesupport//lib/active_support/deprecation/reporting.rb#167 +ActiveSupport::Deprecation::Reporting::LIB_DIR = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/deprecation/reporting.rb#166 ActiveSupport::Deprecation::Reporting::RAILS_GEM_ROOT = T.let(T.unsafe(nil), String) # Raised when ActiveSupport::Deprecation::Behavior#behavior is set with :raise. @@ -4100,43 +5023,61 @@ ActiveSupport::Deprecation::Reporting::RAILS_GEM_ROOT = T.let(T.unsafe(nil), Str # source://activesupport//lib/active_support/deprecation/behaviors.rb#8 class ActiveSupport::DeprecationException < ::StandardError; end +# = Active Support Descendants Tracker +# # This module provides an internal implementation to track descendants -# which is faster than iterating through ObjectSpace. +# which is faster than iterating through +ObjectSpace+. +# +# However Ruby 3.1 provide a fast native +Class#subclasses+ method, +# so if you know your code won't be executed on older rubies, including +# +ActiveSupport::DescendantsTracker+ does not provide any benefit. # -# source://activesupport//lib/active_support/descendants_tracker.rb#9 +# source://activesupport//lib/active_support/descendants_tracker.rb#15 module ActiveSupport::DescendantsTracker - # source://activesupport//lib/active_support/descendants_tracker.rb#88 + # source://activesupport//lib/active_support/descendants_tracker.rb#109 def descendants; end - # source://activesupport//lib/active_support/descendants_tracker.rb#92 - def direct_descendants; end - - # source://activesupport//lib/active_support/descendants_tracker.rb#82 - def subclasses; end - class << self - # source://activesupport//lib/active_support/descendants_tracker.rb#66 + # source://activesupport//lib/active_support/descendants_tracker.rb#79 def clear(classes); end - # source://activesupport//lib/active_support/descendants_tracker.rb#62 + # source://activesupport//lib/active_support/descendants_tracker.rb#104 def descendants(klass); end - # source://activesupport//lib/active_support/descendants_tracker.rb#11 - def direct_descendants(klass); end - - # source://activesupport//lib/active_support/descendants_tracker.rb#50 + # source://activesupport//lib/active_support/descendants_tracker.rb#70 def disable_clear!; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/descendants_tracker.rb#77 - def native?; end + # source://activesupport//lib/active_support/descendants_tracker.rb#90 + def reject!(classes); end - # source://activesupport//lib/active_support/descendants_tracker.rb#58 + # source://activesupport//lib/active_support/descendants_tracker.rb#100 def subclasses(klass); end end end +# source://activesupport//lib/active_support/descendants_tracker.rb#59 +module ActiveSupport::DescendantsTracker::ReloadedClassesFiltering + # source://activesupport//lib/active_support/descendants_tracker.rb#64 + def descendants; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#60 + def subclasses; end +end + +# On TruffleRuby `ObjectSpace::WeakMap` keys are strong references. +# So we use `object_id` as a key and the actual object as a value. +# +# JRuby for now doesn't have Class#descendant, but when it will, it will likely +# have the same WeakMap semantic than Truffle so we future proof this as much as possible. +# +# source://activesupport//lib/active_support/descendants_tracker.rb#21 +class ActiveSupport::DescendantsTracker::WeakSet < ::ObjectSpace::WeakMap + # source://activesupport//lib/active_support/descendants_tracker.rb#24 + def <<(object); end + + def to_a; end +end + # source://activesupport//lib/active_support/digest.rb#6 class ActiveSupport::Digest class << self @@ -4153,92 +5094,94 @@ class ActiveSupport::Digest end end +# = Active Support \Duration +# # Provides accurate date and time measurements using Date#advance and # Time#advance, respectively. It mainly supports the methods on Numeric. # # 1.month.ago # equivalent to Time.now.advance(months: -1) # -# source://activesupport//lib/active_support/duration.rb#13 +# source://activesupport//lib/active_support/duration.rb#14 class ActiveSupport::Duration # @return [Duration] a new instance of Duration # - # source://activesupport//lib/active_support/duration.rb#223 + # source://activesupport//lib/active_support/duration.rb#224 def initialize(value, parts, variable = T.unsafe(nil)); end # Returns the modulo of this Duration by another Duration or Numeric. # Numeric values are treated as seconds. # - # source://activesupport//lib/active_support/duration.rb#306 + # source://activesupport//lib/active_support/duration.rb#307 def %(other); end # Multiplies this Duration by a Numeric and returns a new Duration. # - # source://activesupport//lib/active_support/duration.rb#281 + # source://activesupport//lib/active_support/duration.rb#282 def *(other); end # Adds another Duration or a Numeric to this Duration. Numeric values # are treated as seconds. # - # source://activesupport//lib/active_support/duration.rb#262 + # source://activesupport//lib/active_support/duration.rb#263 def +(other); end - # source://activesupport//lib/active_support/duration.rb#320 + # source://activesupport//lib/active_support/duration.rb#321 def +@; end # Subtracts another Duration or a Numeric from this Duration. Numeric # values are treated as seconds. # - # source://activesupport//lib/active_support/duration.rb#276 + # source://activesupport//lib/active_support/duration.rb#277 def -(other); end - # source://activesupport//lib/active_support/duration.rb#316 + # source://activesupport//lib/active_support/duration.rb#317 def -@; end # Divides this Duration by a Numeric and returns a new Duration. # - # source://activesupport//lib/active_support/duration.rb#292 + # source://activesupport//lib/active_support/duration.rb#293 def /(other); end # Compares one Duration with another or a Numeric to this Duration. # Numeric values are treated as seconds. # - # source://activesupport//lib/active_support/duration.rb#252 + # source://activesupport//lib/active_support/duration.rb#253 def <=>(other); end # Returns +true+ if +other+ is also a Duration instance with the # same +value+, or if other == value. # - # source://activesupport//lib/active_support/duration.rb#335 + # source://activesupport//lib/active_support/duration.rb#336 def ==(other); end - # source://activesupport//lib/active_support/duration.rb#475 + # source://activesupport//lib/active_support/duration.rb#476 def _parts; end # Calculates a new Time or Date that is as far in the future # as this Duration represents. # - # source://activesupport//lib/active_support/duration.rb#430 + # source://activesupport//lib/active_support/duration.rb#431 def after(time = T.unsafe(nil)); end # Calculates a new Time or Date that is as far in the past # as this Duration represents. # - # source://activesupport//lib/active_support/duration.rb#438 + # source://activesupport//lib/active_support/duration.rb#439 def ago(time = T.unsafe(nil)); end - # source://activesupport//lib/active_support/duration.rb#453 + # source://activesupport//lib/active_support/duration.rb#454 def as_json(options = T.unsafe(nil)); end # Calculates a new Time or Date that is as far in the past # as this Duration represents. # - # source://activesupport//lib/active_support/duration.rb#438 + # source://activesupport//lib/active_support/duration.rb#439 def before(time = T.unsafe(nil)); end - # source://activesupport//lib/active_support/duration.rb#239 + # source://activesupport//lib/active_support/duration.rb#240 def coerce(other); end - # source://activesupport//lib/active_support/duration.rb#461 + # source://activesupport//lib/active_support/duration.rb#462 def encode_with(coder); end # Returns +true+ if +other+ is also a Duration instance, which has the @@ -4246,44 +5189,44 @@ class ActiveSupport::Duration # # @return [Boolean] # - # source://activesupport//lib/active_support/duration.rb#420 + # source://activesupport//lib/active_support/duration.rb#421 def eql?(other); end # Calculates a new Time or Date that is as far in the future # as this Duration represents. # - # source://activesupport//lib/active_support/duration.rb#430 + # source://activesupport//lib/active_support/duration.rb#431 def from_now(time = T.unsafe(nil)); end - # source://activesupport//lib/active_support/duration.rb#424 + # source://activesupport//lib/active_support/duration.rb#425 def hash; end # Returns the amount of days a duration covers as a float # # 12.hours.in_days # => 0.5 # - # source://activesupport//lib/active_support/duration.rb#393 + # source://activesupport//lib/active_support/duration.rb#394 def in_days; end # Returns the amount of hours a duration covers as a float # # 1.day.in_hours # => 24.0 # - # source://activesupport//lib/active_support/duration.rb#386 + # source://activesupport//lib/active_support/duration.rb#387 def in_hours; end # Returns the amount of minutes a duration covers as a float # # 1.day.in_minutes # => 1440.0 # - # source://activesupport//lib/active_support/duration.rb#379 + # source://activesupport//lib/active_support/duration.rb#380 def in_minutes; end # Returns the amount of months a duration covers as a float # # 9.weeks.in_months # => 2.07 # - # source://activesupport//lib/active_support/duration.rb#407 + # source://activesupport//lib/active_support/duration.rb#408 def in_months; end # Returns the number of seconds that this Duration represents. @@ -4307,59 +5250,59 @@ class ActiveSupport::Duration # Time[https://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html] should be used for precision # date and time arithmetic. # - # source://activesupport//lib/active_support/duration.rb#371 + # source://activesupport//lib/active_support/duration.rb#372 def in_seconds; end # Returns the amount of weeks a duration covers as a float # # 2.months.in_weeks # => 8.696 # - # source://activesupport//lib/active_support/duration.rb#400 + # source://activesupport//lib/active_support/duration.rb#401 def in_weeks; end # Returns the amount of years a duration covers as a float # # 30.days.in_years # => 0.082 # - # source://activesupport//lib/active_support/duration.rb#414 + # source://activesupport//lib/active_support/duration.rb#415 def in_years; end - # source://activesupport//lib/active_support/duration.rb#457 + # source://activesupport//lib/active_support/duration.rb#458 def init_with(coder); end - # source://activesupport//lib/active_support/duration.rb#444 + # source://activesupport//lib/active_support/duration.rb#445 def inspect; end # @return [Boolean] # - # source://activesupport//lib/active_support/duration.rb#329 + # source://activesupport//lib/active_support/duration.rb#330 def instance_of?(klass); end # @return [Boolean] # - # source://activesupport//lib/active_support/duration.rb#324 + # source://activesupport//lib/active_support/duration.rb#325 def is_a?(klass); end # Build ISO 8601 Duration string for this duration. # The +precision+ parameter can be used to limit seconds' precision of duration. # - # source://activesupport//lib/active_support/duration.rb#467 + # source://activesupport//lib/active_support/duration.rb#468 def iso8601(precision: T.unsafe(nil)); end # @return [Boolean] # - # source://activesupport//lib/active_support/duration.rb#324 + # source://activesupport//lib/active_support/duration.rb#325 def kind_of?(klass); end # Returns a copy of the parts hash that defines the duration # - # source://activesupport//lib/active_support/duration.rb#235 + # source://activesupport//lib/active_support/duration.rb#236 def parts; end # Calculates a new Time or Date that is as far in the future # as this Duration represents. # - # source://activesupport//lib/active_support/duration.rb#430 + # source://activesupport//lib/active_support/duration.rb#431 def since(time = T.unsafe(nil)); end # Returns the number of seconds that this Duration represents. @@ -4383,7 +5326,7 @@ class ActiveSupport::Duration # Time[https://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html] should be used for precision # date and time arithmetic. # - # source://activesupport//lib/active_support/duration.rb#371 + # source://activesupport//lib/active_support/duration.rb#372 def to_i; end # Returns the amount of seconds a duration covers as a string. @@ -4391,45 +5334,45 @@ class ActiveSupport::Duration # # 1.day.to_s # => "86400" # - # source://activesupport//lib/active_support/duration.rb#347 + # source://activesupport//lib/active_support/duration.rb#348 def to_s; end # Calculates a new Time or Date that is as far in the past # as this Duration represents. # - # source://activesupport//lib/active_support/duration.rb#438 + # source://activesupport//lib/active_support/duration.rb#439 def until(time = T.unsafe(nil)); end # Returns the value of attribute value. # - # source://activesupport//lib/active_support/duration.rb#132 + # source://activesupport//lib/active_support/duration.rb#133 def value; end # @return [Boolean] # - # source://activesupport//lib/active_support/duration.rb#471 + # source://activesupport//lib/active_support/duration.rb#472 def variable?; end private - # source://activesupport//lib/active_support/duration.rb#506 + # source://activesupport//lib/active_support/duration.rb#507 def method_missing(method, *args, &block); end # @raise [TypeError] # - # source://activesupport//lib/active_support/duration.rb#510 + # source://activesupport//lib/active_support/duration.rb#511 def raise_type_error(other); end # @return [Boolean] # - # source://activesupport//lib/active_support/duration.rb#502 + # source://activesupport//lib/active_support/duration.rb#503 def respond_to_missing?(method, _); end - # source://activesupport//lib/active_support/duration.rb#480 + # source://activesupport//lib/active_support/duration.rb#481 def sum(sign, time = T.unsafe(nil)); end class << self - # source://activesupport//lib/active_support/duration.rb#148 + # source://activesupport//lib/active_support/duration.rb#149 def ===(other); end # Creates a new Duration from a seconds value that is converted @@ -4438,19 +5381,19 @@ class ActiveSupport::Duration # ActiveSupport::Duration.build(31556952).parts # => {:years=>1} # ActiveSupport::Duration.build(2716146).parts # => {:months=>1, :days=>1} # - # source://activesupport//lib/active_support/duration.rb#188 + # source://activesupport//lib/active_support/duration.rb#189 def build(value); end - # source://activesupport//lib/active_support/duration.rb#166 + # source://activesupport//lib/active_support/duration.rb#167 def days(value); end - # source://activesupport//lib/active_support/duration.rb#162 + # source://activesupport//lib/active_support/duration.rb#163 def hours(value); end - # source://activesupport//lib/active_support/duration.rb#158 + # source://activesupport//lib/active_support/duration.rb#159 def minutes(value); end - # source://activesupport//lib/active_support/duration.rb#174 + # source://activesupport//lib/active_support/duration.rb#175 def months(value); end # Creates a new Duration from string formatted according to ISO 8601 Duration. @@ -4459,21 +5402,21 @@ class ActiveSupport::Duration # This method allows negative parts to be present in pattern. # If invalid string is provided, it will raise +ActiveSupport::Duration::ISO8601Parser::ParsingError+. # - # source://activesupport//lib/active_support/duration.rb#143 + # source://activesupport//lib/active_support/duration.rb#144 def parse(iso8601duration); end - # source://activesupport//lib/active_support/duration.rb#154 + # source://activesupport//lib/active_support/duration.rb#155 def seconds(value); end - # source://activesupport//lib/active_support/duration.rb#170 + # source://activesupport//lib/active_support/duration.rb#171 def weeks(value); end - # source://activesupport//lib/active_support/duration.rb#178 + # source://activesupport//lib/active_support/duration.rb#179 def years(value); end private - # source://activesupport//lib/active_support/duration.rb#216 + # source://activesupport//lib/active_support/duration.rb#217 def calculate_total_seconds(parts); end end end @@ -4595,21 +5538,21 @@ ActiveSupport::Duration::ISO8601Parser::TIME_TO_PART = T.let(T.unsafe(nil), Hash # Serializes duration to string according to ISO 8601 Duration format. # -# source://activesupport//lib/active_support/duration/iso8601_serializer.rb#8 +# source://activesupport//lib/active_support/duration/iso8601_serializer.rb#6 class ActiveSupport::Duration::ISO8601Serializer # @return [ISO8601Serializer] a new instance of ISO8601Serializer # - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#11 + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#9 def initialize(duration, precision: T.unsafe(nil)); end # Builds and returns output string. # - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#17 + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#15 def serialize; end private - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#58 + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#56 def format_seconds(seconds); end # Return pair of duration's parts and whole duration sign. @@ -4617,108 +5560,108 @@ class ActiveSupport::Duration::ISO8601Serializer # Zero parts are removed as not significant. # If all parts are negative it will negate all of them and return minus as a sign. # - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#41 + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#39 def normalize; end # @return [Boolean] # - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#54 + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#52 def week_mixed_with_date?(parts); end end -# source://activesupport//lib/active_support/duration/iso8601_serializer.rb#9 +# source://activesupport//lib/active_support/duration/iso8601_serializer.rb#7 ActiveSupport::Duration::ISO8601Serializer::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) -# source://activesupport//lib/active_support/duration.rb#129 +# source://activesupport//lib/active_support/duration.rb#130 ActiveSupport::Duration::PARTS = T.let(T.unsafe(nil), Array) -# source://activesupport//lib/active_support/duration.rb#119 +# source://activesupport//lib/active_support/duration.rb#120 ActiveSupport::Duration::PARTS_IN_SECONDS = T.let(T.unsafe(nil), Hash) -# source://activesupport//lib/active_support/duration.rb#114 +# source://activesupport//lib/active_support/duration.rb#115 ActiveSupport::Duration::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) -# source://activesupport//lib/active_support/duration.rb#113 +# source://activesupport//lib/active_support/duration.rb#114 ActiveSupport::Duration::SECONDS_PER_HOUR = T.let(T.unsafe(nil), Integer) -# source://activesupport//lib/active_support/duration.rb#112 +# source://activesupport//lib/active_support/duration.rb#113 ActiveSupport::Duration::SECONDS_PER_MINUTE = T.let(T.unsafe(nil), Integer) # 1/12 of a gregorian year # -# source://activesupport//lib/active_support/duration.rb#116 +# source://activesupport//lib/active_support/duration.rb#117 ActiveSupport::Duration::SECONDS_PER_MONTH = T.let(T.unsafe(nil), Integer) -# source://activesupport//lib/active_support/duration.rb#115 +# source://activesupport//lib/active_support/duration.rb#116 ActiveSupport::Duration::SECONDS_PER_WEEK = T.let(T.unsafe(nil), Integer) # length of a gregorian year (365.2425 days) # -# source://activesupport//lib/active_support/duration.rb#117 +# source://activesupport//lib/active_support/duration.rb#118 ActiveSupport::Duration::SECONDS_PER_YEAR = T.let(T.unsafe(nil), Integer) -# source://activesupport//lib/active_support/duration.rb#14 +# source://activesupport//lib/active_support/duration.rb#15 class ActiveSupport::Duration::Scalar < ::Numeric # @return [Scalar] a new instance of Scalar # - # source://activesupport//lib/active_support/duration.rb#18 + # source://activesupport//lib/active_support/duration.rb#19 def initialize(value); end - # source://activesupport//lib/active_support/duration.rb#84 + # source://activesupport//lib/active_support/duration.rb#85 def %(other); end - # source://activesupport//lib/active_support/duration.rb#65 + # source://activesupport//lib/active_support/duration.rb#66 def *(other); end - # source://activesupport//lib/active_support/duration.rb#40 + # source://activesupport//lib/active_support/duration.rb#41 def +(other); end - # source://activesupport//lib/active_support/duration.rb#52 + # source://activesupport//lib/active_support/duration.rb#53 def -(other); end - # source://activesupport//lib/active_support/duration.rb#26 + # source://activesupport//lib/active_support/duration.rb#27 def -@; end - # source://activesupport//lib/active_support/duration.rb#76 + # source://activesupport//lib/active_support/duration.rb#77 def /(other); end - # source://activesupport//lib/active_support/duration.rb#30 + # source://activesupport//lib/active_support/duration.rb#31 def <=>(other); end - # source://activesupport//lib/active_support/duration.rb#22 + # source://activesupport//lib/active_support/duration.rb#23 def coerce(other); end - # source://activesupport//lib/active_support/duration.rb#16 + # source://activesupport//lib/active_support/duration.rb#17 def to_f(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/duration.rb#16 + # source://activesupport//lib/active_support/duration.rb#17 def to_i(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/duration.rb#16 + # source://activesupport//lib/active_support/duration.rb#17 def to_s(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute value. # - # source://activesupport//lib/active_support/duration.rb#15 + # source://activesupport//lib/active_support/duration.rb#16 def value; end # @return [Boolean] # - # source://activesupport//lib/active_support/duration.rb#92 + # source://activesupport//lib/active_support/duration.rb#93 def variable?; end private - # source://activesupport//lib/active_support/duration.rb#97 + # source://activesupport//lib/active_support/duration.rb#98 def calculate(op, other); end # @raise [TypeError] # - # source://activesupport//lib/active_support/duration.rb#107 + # source://activesupport//lib/active_support/duration.rb#108 def raise_type_error(other); end end -# source://activesupport//lib/active_support/duration.rb#130 +# source://activesupport//lib/active_support/duration.rb#131 ActiveSupport::Duration::VARIABLE_PARTS = T.let(T.unsafe(nil), Array) # source://activesupport//lib/active_support/core_ext/range/each.rb#6 @@ -4737,6 +5680,8 @@ module ActiveSupport::EachTimeWithZone def ensure_iteration_allowed; end end +# = Encrypted Configuration +# # Provides convenience methods on top of EncryptedFile to access values stored # as encrypted YAML. # @@ -4759,16 +5704,13 @@ end # my_config.foo! # # => KeyError # -# source://activesupport//lib/active_support/encrypted_configuration.rb#32 +# source://activesupport//lib/active_support/encrypted_configuration.rb#35 class ActiveSupport::EncryptedConfiguration < ::ActiveSupport::EncryptedFile # @return [EncryptedConfiguration] a new instance of EncryptedConfiguration # - # source://activesupport//lib/active_support/encrypted_configuration.rb#36 + # source://activesupport//lib/active_support/encrypted_configuration.rb#48 def initialize(config_path:, key_path:, env_key:, raise_if_missing_key:); end - # source://activesupport//lib/active_support/encrypted_configuration.rb#33 - def [](*_arg0, **_arg1, &_arg2); end - # Returns the decrypted content as a Hash with symbolized keys. # # my_config = ActiveSupport::EncryptedConfiguration.new(...) @@ -4777,38 +5719,49 @@ class ActiveSupport::EncryptedConfiguration < ::ActiveSupport::EncryptedFile # my_config.config # # => { some_secret: 123, some_namespace: { another_secret: 789 } } # - # source://activesupport//lib/active_support/encrypted_configuration.rb#63 + # source://activesupport//lib/active_support/encrypted_configuration.rb#75 def config; end - # source://activesupport//lib/active_support/encrypted_configuration.rb#33 - def fetch(*_arg0, **_arg1, &_arg2); end + # source://activesupport//lib/active_support/encrypted_configuration.rb#79 + def inspect; end - # source://activesupport//lib/active_support/core_ext/module/delegation.rb#302 + # source://activesupport//lib/active_support/core_ext/module/delegation.rb#331 def method_missing(method, *args, **_arg2, &block); end # Reads the file and returns the decrypted content. See EncryptedFile#read. # - # source://activesupport//lib/active_support/encrypted_configuration.rb#42 + # source://activesupport//lib/active_support/encrypted_configuration.rb#56 def read; end - # source://activesupport//lib/active_support/encrypted_configuration.rb#49 - def write(contents); end + # source://activesupport//lib/active_support/encrypted_configuration.rb#63 + def validate!; end private - # source://activesupport//lib/active_support/encrypted_configuration.rb#68 + # source://activesupport//lib/active_support/encrypted_configuration.rb#84 def deep_transform(hash); end - # source://activesupport//lib/active_support/encrypted_configuration.rb#82 - def deserialize(config); end + # source://activesupport//lib/active_support/encrypted_configuration.rb#98 + def deserialize(content); end - # source://activesupport//lib/active_support/encrypted_configuration.rb#78 + # source://activesupport//lib/active_support/encrypted_configuration.rb#94 def options; end - # source://activesupport//lib/active_support/core_ext/module/delegation.rb#294 + # source://activesupport//lib/active_support/core_ext/module/delegation.rb#323 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end +# source://activesupport//lib/active_support/encrypted_configuration.rb#36 +class ActiveSupport::EncryptedConfiguration::InvalidContentError < ::RuntimeError + # @return [InvalidContentError] a new instance of InvalidContentError + # + # source://activesupport//lib/active_support/encrypted_configuration.rb#37 + def initialize(content_path); end + + # source://activesupport//lib/active_support/encrypted_configuration.rb#41 + def message; end +end + # source://activesupport//lib/active_support/encrypted_file.rb#8 class ActiveSupport::EncryptedFile # @return [EncryptedFile] a new instance of EncryptedFile @@ -4816,7 +5769,7 @@ class ActiveSupport::EncryptedFile # source://activesupport//lib/active_support/encrypted_file.rb#42 def initialize(content_path:, key_path:, env_key:, raise_if_missing_key:); end - # source://activesupport//lib/active_support/encrypted_file.rb#77 + # source://activesupport//lib/active_support/encrypted_file.rb#83 def change(&block); end # Returns the value of attribute content_path. @@ -4837,6 +5790,14 @@ class ActiveSupport::EncryptedFile # source://activesupport//lib/active_support/encrypted_file.rb#52 def key; end + # Returns truthy if #key is truthy. Returns falsy otherwise. Unlike #key, + # does not raise MissingKeyError when +raise_if_missing_key+ is true. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/encrypted_file.rb#58 + def key?; end + # Returns the value of attribute key_path. # # source://activesupport//lib/active_support/encrypted_file.rb#40 @@ -4856,40 +5817,40 @@ class ActiveSupport::EncryptedFile # - ActiveSupport::MessageEncryptor::InvalidMessage if the content cannot be # decrypted or verified. # - # source://activesupport//lib/active_support/encrypted_file.rb#64 + # source://activesupport//lib/active_support/encrypted_file.rb#70 def read; end - # source://activesupport//lib/active_support/encrypted_file.rb#72 + # source://activesupport//lib/active_support/encrypted_file.rb#78 def write(contents); end private # @raise [InvalidKeyLengthError] # - # source://activesupport//lib/active_support/encrypted_file.rb#125 + # source://activesupport//lib/active_support/encrypted_file.rb#129 def check_key_length; end - # source://activesupport//lib/active_support/encrypted_file.rb#103 + # source://activesupport//lib/active_support/encrypted_file.rb#108 def decrypt(contents); end - # source://activesupport//lib/active_support/encrypted_file.rb#98 + # source://activesupport//lib/active_support/encrypted_file.rb#103 def encrypt(contents); end - # source://activesupport//lib/active_support/encrypted_file.rb#107 + # source://activesupport//lib/active_support/encrypted_file.rb#112 def encryptor; end # @raise [MissingKeyError] # - # source://activesupport//lib/active_support/encrypted_file.rb#121 + # source://activesupport//lib/active_support/encrypted_file.rb#125 def handle_missing_key; end - # source://activesupport//lib/active_support/encrypted_file.rb#112 + # source://activesupport//lib/active_support/encrypted_file.rb#117 def read_env_key; end - # source://activesupport//lib/active_support/encrypted_file.rb#116 + # source://activesupport//lib/active_support/encrypted_file.rb#121 def read_key_file; end - # source://activesupport//lib/active_support/encrypted_file.rb#83 + # source://activesupport//lib/active_support/encrypted_file.rb#89 def writing(contents); end class << self @@ -4945,24 +5906,47 @@ end # source://activesupport//lib/active_support/core_ext/enumerable.rb#25 ActiveSupport::EnumerableCoreExt::SoleItemExpectedError = Enumerable::SoleItemExpectedError -# source://activesupport//lib/active_support/environment_inquirer.rb#6 +# source://activesupport//lib/active_support/environment_inquirer.rb#9 class ActiveSupport::EnvironmentInquirer < ::ActiveSupport::StringInquirer + # @raise [ArgumentError] # @return [EnvironmentInquirer] a new instance of EnvironmentInquirer # - # source://activesupport//lib/active_support/environment_inquirer.rb#8 + # source://activesupport//lib/active_support/environment_inquirer.rb#15 def initialize(env); end + # source://activesupport//lib/active_support/environment_inquirer.rb#29 def development?; end + + # Returns true if we're in the development or test environment. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/environment_inquirer.rb#36 + def local?; end + + # source://activesupport//lib/active_support/environment_inquirer.rb#29 def production?; end + + # source://activesupport//lib/active_support/environment_inquirer.rb#29 def test?; end end -# source://activesupport//lib/active_support/environment_inquirer.rb#7 +# Optimization for the three default environments, so this inquirer doesn't need to rely on +# the slower delegation through method_missing that StringInquirer would normally entail. +# +# source://activesupport//lib/active_support/environment_inquirer.rb#10 ActiveSupport::EnvironmentInquirer::DEFAULT_ENVIRONMENTS = T.let(T.unsafe(nil), Array) +# Environments that'll respond true for #local? +# +# source://activesupport//lib/active_support/environment_inquirer.rb#13 +ActiveSupport::EnvironmentInquirer::LOCAL_ENVIRONMENTS = T.let(T.unsafe(nil), Array) + +# = Active Support \Error Reporter +# # +ActiveSupport::ErrorReporter+ is a common interface for error reporting services. # -# To rescue and report any unhandled error, you can use the +handle+ method: +# To rescue and report any unhandled error, you can use the #handle method: # # Rails.error.handle do # do_something! @@ -4970,92 +5954,160 @@ ActiveSupport::EnvironmentInquirer::DEFAULT_ENVIRONMENTS = T.let(T.unsafe(nil), # # If an error is raised, it will be reported and swallowed. # -# Alternatively if you want to report the error but not swallow it, you can use +record+ +# Alternatively, if you want to report the error but not swallow it, you can use #record: # # Rails.error.record do # do_something! # end # -# Both methods can be restricted to only handle a specific exception class +# Both methods can be restricted to handle only a specific error class: # # maybe_tags = Rails.error.handle(Redis::BaseError) { redis.get("tags") } # -# You can also pass some extra context information that may be used by the error subscribers: -# -# Rails.error.handle(context: { section: "admin" }) do -# # ... -# end -# -# Additionally a +severity+ can be passed along to communicate how important the error report is. -# +severity+ can be one of +:error+, +:warning+, or +:info+. Handled errors default to the +:warning+ -# severity, and unhandled ones to +:error+. -# -# Both +handle+ and +record+ pass through the return value from the block. In the case of +handle+ -# rescuing an error, a fallback can be provided. The fallback must be a callable whose result will -# be returned when the block raises and is handled: -# -# user = Rails.error.handle(fallback: -> { User.anonymous }) do -# User.find_by(params) -# end -# -# source://activesupport//lib/active_support/error_reporter.rb#41 +# source://activesupport//lib/active_support/error_reporter.rb#26 class ActiveSupport::ErrorReporter # @return [ErrorReporter] a new instance of ErrorReporter # - # source://activesupport//lib/active_support/error_reporter.rb#46 + # source://activesupport//lib/active_support/error_reporter.rb#32 def initialize(*subscribers, logger: T.unsafe(nil)); end - # Report any unhandled exception, and swallow it. + # Prevent a subscriber from being notified of errors for the + # duration of the block. You may pass in the subscriber itself, or its class. # + # This can be helpful for error reporting service integrations, when they wish + # to handle any errors higher in the stack. + # + # source://activesupport//lib/active_support/error_reporter.rb#147 + def disable(subscriber); end + + # Evaluates the given block, reporting and swallowing any unhandled error. + # If no error is raised, returns the return value of the block. Otherwise, + # returns the result of +fallback.call+, or +nil+ if +fallback+ is not + # specified. + # + # # Will report a TypeError to all subscribers and return nil. # Rails.error.handle do # 1 + '1' # end # - # source://activesupport//lib/active_support/error_reporter.rb#57 - def handle(error_class = T.unsafe(nil), severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil)); end + # Can be restricted to handle only specific error classes: + # + # maybe_tags = Rails.error.handle(Redis::BaseError) { redis.get("tags") } + # + # ==== Options + # + # * +:severity+ - This value is passed along to subscribers to indicate how + # important the error report is. Can be +:error+, +:warning+, or +:info+. + # Defaults to +:warning+. + # + # * +:context+ - Extra information that is passed along to subscribers. For + # example: + # + # Rails.error.handle(context: { section: "admin" }) do + # # ... + # end + # + # * +:fallback+ - A callable that provides +handle+'s return value when an + # unhandled error is raised. For example: + # + # user = Rails.error.handle(fallback: -> { User.anonymous }) do + # User.find_by(params) + # end + # + # * +:source+ - This value is passed along to subscribers to indicate the + # source of the error. Subscribers can use this value to ignore certain + # errors. Defaults to "application". + # + # source://activesupport//lib/active_support/error_reporter.rb#74 + def handle(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil), source: T.unsafe(nil)); end # Returns the value of attribute logger. # - # source://activesupport//lib/active_support/error_reporter.rb#44 + # source://activesupport//lib/active_support/error_reporter.rb#30 def logger; end # Sets the attribute logger # # @param value the value to set the attribute logger to. # - # source://activesupport//lib/active_support/error_reporter.rb#44 + # source://activesupport//lib/active_support/error_reporter.rb#30 def logger=(_arg0); end - # source://activesupport//lib/active_support/error_reporter.rb#64 - def record(error_class = T.unsafe(nil), severity: T.unsafe(nil), context: T.unsafe(nil)); end + # Evaluates the given block, reporting and re-raising any unhandled error. + # If no error is raised, returns the return value of the block. + # + # # Will report a TypeError to all subscribers and re-raise it. + # Rails.error.record do + # 1 + '1' + # end + # + # Can be restricted to handle only specific error classes: + # + # tags = Rails.error.record(Redis::BaseError) { redis.get("tags") } + # + # ==== Options + # + # * +:severity+ - This value is passed along to subscribers to indicate how + # important the error report is. Can be +:error+, +:warning+, or +:info+. + # Defaults to +:error+. + # + # * +:context+ - Extra information that is passed along to subscribers. For + # example: + # + # Rails.error.record(context: { section: "admin" }) do + # # ... + # end + # + # * +:source+ - This value is passed along to subscribers to indicate the + # source of the error. Subscribers can use this value to ignore certain + # errors. Defaults to "application". + # + # source://activesupport//lib/active_support/error_reporter.rb#110 + def record(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end - # When the block based +handle+ and +record+ methods are not suitable, you can directly use +report+ + # Report an error directly to subscribers. You can use this method when the + # block-based #handle and #record methods are not suitable. # - # Rails.error.report(error, handled: true) + # Rails.error.report(error) # - # source://activesupport//lib/active_support/error_reporter.rb#95 - def report(error, handled:, severity: T.unsafe(nil), context: T.unsafe(nil)); end + # source://activesupport//lib/active_support/error_reporter.rb#172 + def report(error, handled: T.unsafe(nil), severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end - # Update the execution context that is accessible to error subscribers + # Update the execution context that is accessible to error subscribers. Any + # context passed to #handle, #record, or #report will be merged with the + # context set here. # # Rails.error.set_context(section: "checkout", user_id: @user.id) # - # See +ActiveSupport::ExecutionContext.set+ - # - # source://activesupport//lib/active_support/error_reporter.rb#88 + # source://activesupport//lib/active_support/error_reporter.rb#163 def set_context(*_arg0, **_arg1, &_arg2); end # Register a new error subscriber. The subscriber must respond to # - # report(Exception, handled: Boolean, context: Hash) + # report(Exception, handled: Boolean, severity: (:error OR :warning OR :info), context: Hash, source: String) # - # The +report+ method +should+ never raise an error. + # The +report+ method should never raise an error. # - # source://activesupport//lib/active_support/error_reporter.rb#76 + # source://activesupport//lib/active_support/error_reporter.rb#123 def subscribe(subscriber); end + + # Unregister an error subscriber. Accepts either a subscriber or a class. + # + # subscriber = MyErrorSubscriber.new + # Rails.error.subscribe(subscriber) + # + # Rails.error.unsubscribe(subscriber) + # # or + # Rails.error.unsubscribe(MyErrorSubscriber) + # + # source://activesupport//lib/active_support/error_reporter.rb#138 + def unsubscribe(subscriber); end end -# source://activesupport//lib/active_support/error_reporter.rb#42 +# source://activesupport//lib/active_support/error_reporter.rb#28 +ActiveSupport::ErrorReporter::DEFAULT_SOURCE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/error_reporter.rb#27 ActiveSupport::ErrorReporter::SEVERITIES = T.let(T.unsafe(nil), Array) # source://activesupport//lib/active_support/execution_context.rb#4 @@ -5092,22 +6144,22 @@ class ActiveSupport::ExecutionWrapper extend ::ActiveSupport::Callbacks::ClassMethods extend ::ActiveSupport::DescendantsTracker - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport//lib/active_support/callbacks.rb#940 + # source://activesupport//lib/active_support/callbacks.rb#963 def _complete_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#940 + # source://activesupport//lib/active_support/callbacks.rb#963 def _run_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#928 + # source://activesupport//lib/active_support/callbacks.rb#951 def _run_complete_callbacks(&block); end - # source://activesupport//lib/active_support/callbacks.rb#928 + # source://activesupport//lib/active_support/callbacks.rb#951 def _run_run_callbacks(&block); end # source://activesupport//lib/active_support/execution_wrapper.rb#142 @@ -5133,25 +6185,25 @@ class ActiveSupport::ExecutionWrapper def hook_state; end class << self - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport//lib/active_support/callbacks.rb#932 + # source://activesupport//lib/active_support/callbacks.rb#955 def _complete_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#936 + # source://activesupport//lib/active_support/callbacks.rb#959 def _complete_callbacks=(value); end - # source://activesupport//lib/active_support/callbacks.rb#932 + # source://activesupport//lib/active_support/callbacks.rb#955 def _run_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#936 + # source://activesupport//lib/active_support/callbacks.rb#959 def _run_callbacks=(value); end # @return [Boolean] @@ -5199,7 +6251,7 @@ class ActiveSupport::ExecutionWrapper # Perform the work in the supplied block as an execution. # # source://activesupport//lib/active_support/execution_wrapper.rb#87 - def wrap; end + def wrap(source: T.unsafe(nil)); end end end @@ -5262,7 +6314,9 @@ end # source://activesupport//lib/active_support/executor.rb#6 class ActiveSupport::Executor < ::ActiveSupport::ExecutionWrapper; end -# FileUpdateChecker specifies the API used by Rails to watch files +# = \File Update Checker +# +# FileUpdateChecker specifies the API used by \Rails to watch files # and control reloading. The API depends on four methods: # # * +initialize+ which expects two parameters and one block as @@ -5279,7 +6333,7 @@ class ActiveSupport::Executor < ::ActiveSupport::ExecutionWrapper; end # After initialization, a call to +execute_if_updated+ must execute # the block only if there was really a change in the filesystem. # -# This class is used by Rails to reload the I18n framework whenever +# This class is used by \Rails to reload the I18n framework whenever # they are changed upon a new request. # # i18n_reloader = ActiveSupport::FileUpdateChecker.new(paths) do @@ -5290,7 +6344,7 @@ class ActiveSupport::Executor < ::ActiveSupport::ExecutionWrapper; end # i18n_reloader.execute_if_updated # end # -# source://activesupport//lib/active_support/file_update_checker.rb#33 +# source://activesupport//lib/active_support/file_update_checker.rb#35 class ActiveSupport::FileUpdateChecker # It accepts two parameters on initialization. The first is an array # of files and the second is an optional hash of directories. The hash must @@ -5303,18 +6357,18 @@ class ActiveSupport::FileUpdateChecker # # @return [FileUpdateChecker] a new instance of FileUpdateChecker # - # source://activesupport//lib/active_support/file_update_checker.rb#42 + # source://activesupport//lib/active_support/file_update_checker.rb#44 def initialize(files, dirs = T.unsafe(nil), &block); end # Executes the given block and updates the latest watched files and # timestamp. # - # source://activesupport//lib/active_support/file_update_checker.rb#80 + # source://activesupport//lib/active_support/file_update_checker.rb#82 def execute; end # Execute the block given if updated. # - # source://activesupport//lib/active_support/file_update_checker.rb#90 + # source://activesupport//lib/active_support/file_update_checker.rb#92 def execute_if_updated; end # Check if any of the entries were updated. If so, the watched and/or @@ -5323,18 +6377,18 @@ class ActiveSupport::FileUpdateChecker # # @return [Boolean] # - # source://activesupport//lib/active_support/file_update_checker.rb#61 + # source://activesupport//lib/active_support/file_update_checker.rb#63 def updated?; end private - # source://activesupport//lib/active_support/file_update_checker.rb#156 + # source://activesupport//lib/active_support/file_update_checker.rb#158 def compile_ext(array); end - # source://activesupport//lib/active_support/file_update_checker.rb#142 + # source://activesupport//lib/active_support/file_update_checker.rb#144 def compile_glob(hash); end - # source://activesupport//lib/active_support/file_update_checker.rb#152 + # source://activesupport//lib/active_support/file_update_checker.rb#154 def escape(key); end # This method returns the maximum mtime of the files in +paths+, or +nil+ @@ -5345,29 +6399,32 @@ class ActiveSupport::FileUpdateChecker # healthy to consider this edge case because with mtimes in the future # reloading is not triggered. # - # source://activesupport//lib/active_support/file_update_checker.rb#120 + # source://activesupport//lib/active_support/file_update_checker.rb#122 def max_mtime(paths); end - # source://activesupport//lib/active_support/file_update_checker.rb#109 + # source://activesupport//lib/active_support/file_update_checker.rb#111 def updated_at(paths); end - # source://activesupport//lib/active_support/file_update_checker.rb#101 + # source://activesupport//lib/active_support/file_update_checker.rb#103 def watched; end end # source://activesupport//lib/active_support/fork_tracker.rb#4 module ActiveSupport::ForkTracker class << self - # source://activesupport//lib/active_support/fork_tracker.rb#59 + # source://activesupport//lib/active_support/fork_tracker.rb#67 def after_fork(&block); end # source://activesupport//lib/active_support/fork_tracker.rb#40 + def after_fork_callback; end + + # source://activesupport//lib/active_support/fork_tracker.rb#49 def check!; end - # source://activesupport//lib/active_support/fork_tracker.rb#48 + # source://activesupport//lib/active_support/fork_tracker.rb#56 def hook!; end - # source://activesupport//lib/active_support/fork_tracker.rb#64 + # source://activesupport//lib/active_support/fork_tracker.rb#72 def unregister(callback); end end end @@ -5394,6 +6451,8 @@ module ActiveSupport::ForkTracker::ModernCoreExt def _fork; end end +# = Active Support \Gzip +# # A convenient wrapper for the zlib standard library that allows # compression/decompression of strings with gzip. # @@ -5403,32 +6462,34 @@ end # ActiveSupport::Gzip.decompress(gzip) # # => "compress me!" # -# source://activesupport//lib/active_support/gzip.rb#15 +# source://activesupport//lib/active_support/gzip.rb#17 module ActiveSupport::Gzip class << self # Compresses a string using gzip. # - # source://activesupport//lib/active_support/gzip.rb#30 + # source://activesupport//lib/active_support/gzip.rb#32 def compress(source, level = T.unsafe(nil), strategy = T.unsafe(nil)); end # Decompresses a gzipped string. # - # source://activesupport//lib/active_support/gzip.rb#25 + # source://activesupport//lib/active_support/gzip.rb#27 def decompress(source); end end end -# source://activesupport//lib/active_support/gzip.rb#16 +# source://activesupport//lib/active_support/gzip.rb#18 class ActiveSupport::Gzip::Stream < ::StringIO # @return [Stream] a new instance of Stream # - # source://activesupport//lib/active_support/gzip.rb#17 + # source://activesupport//lib/active_support/gzip.rb#19 def initialize(*_arg0); end - # source://activesupport//lib/active_support/gzip.rb#21 + # source://activesupport//lib/active_support/gzip.rb#23 def close; end end +# = \Hash With Indifferent Access +# # Implements a hash where keys :foo and "foo" are considered # to be the same. # @@ -5460,7 +6521,7 @@ end # # but this class is intended for use cases where strings or symbols are the # expected keys and it is convenient to understand both as the same. For -# example the +params+ hash in Ruby on Rails. +# example the +params+ hash in Ruby on \Rails. # # Note that core extensions define Hash#with_indifferent_access: # @@ -5468,17 +6529,17 @@ end # # which may be handy. # -# To access this class outside of Rails, require the core extension with: +# To access this class outside of \Rails, require the core extension with: # # require "active_support/core_ext/hash/indifferent_access" # # which will, in turn, require this file. # -# source://activesupport//lib/active_support/hash_with_indifferent_access.rb#53 +# source://activesupport//lib/active_support/hash_with_indifferent_access.rb#55 class ActiveSupport::HashWithIndifferentAccess < ::Hash # @return [HashWithIndifferentAccess] a new instance of HashWithIndifferentAccess # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#68 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#70 def initialize(constructor = T.unsafe(nil)); end # Same as Hash#[] where the key passed as argument can be @@ -5491,7 +6552,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # counters[:foo] # => 1 # counters[:zoo] # => nil # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#166 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#168 def [](key); end # Assigns a new value to the hash: @@ -5501,7 +6562,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # # This value can be later fetched using either +:key+ or 'key'. # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#96 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#98 def []=(key, value); end # Same as Hash#assoc where the key passed as argument can be @@ -5514,19 +6575,19 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # counters.assoc(:foo) # => ["foo", 1] # counters.assoc(:zoo) # => nil # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#179 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#181 def assoc(key); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#357 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#375 def compact; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#311 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#319 def deep_stringify_keys; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#309 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#317 def deep_stringify_keys!; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#316 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#324 def deep_symbolize_keys; end # Same as Hash#default where the key passed as argument can be @@ -5540,12 +6601,12 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash.default('foo') # => 'foo' # hash.default(:foo) # => 'foo' # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#221 - def default(*args); end + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#223 + def default(key = T.unsafe(nil)); end # Removes the specified key from the hash. # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#295 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#303 def delete(key); end # Same as Hash#dig where the key passed as argument can be @@ -5558,7 +6619,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # counters.dig(:foo, :bar) # => 1 # counters.dig(:zoo) # => nil # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#206 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#208 def dig(*args); end # Returns a shallow copy of the hash. @@ -5570,7 +6631,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash[:a][:c] # => "c" # dup[:a][:c] # => "c" # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#256 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#264 def dup; end # Returns a hash with indifferent access that includes everything except given keys. @@ -5578,7 +6639,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash.except(:a, "b") # => {c: 10}.with_indifferent_access # hash # => { a: "x", b: "y", c: 10 }.with_indifferent_access # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#303 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#311 def except(*keys); end # Returns +true+ so that Array#extract_options! finds members of @@ -5586,7 +6647,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # # @return [Boolean] # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#56 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#58 def extractable_options?; end # Same as Hash#fetch where the key passed as argument can be @@ -5600,7 +6661,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # counters.fetch(:bar) { |key| 0 } # => 0 # counters.fetch(:zoo) # => KeyError: key not found: "zoo" # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#193 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#195 def fetch(key, *extras); end # Returns an array of the values at the specified indices, but also @@ -5613,7 +6674,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash.fetch_values('a', 'c') { |key| 'z' } # => ["x", "z"] # hash.fetch_values('a', 'c') # => KeyError: key not found: "c" # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#244 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#251 def fetch_values(*indices, &block); end # Checks the hash for a key matching the argument passed in: @@ -5625,7 +6686,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # # @return [Boolean] # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#149 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#151 def has_key?(key); end # Checks the hash for a key matching the argument passed in: @@ -5637,7 +6698,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # # @return [Boolean] # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#149 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#151 def include?(key); end # Checks the hash for a key matching the argument passed in: @@ -5649,7 +6710,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # # @return [Boolean] # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#149 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#151 def key?(key); end # Checks the hash for a key matching the argument passed in: @@ -5661,14 +6722,14 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # # @return [Boolean] # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#149 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#151 def member?(key); end # This method has the same semantics of +update+, except it does not # modify the receiver but rather returns a new hash with indifferent # access with the result of the merge. # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#265 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#273 def merge(*hashes, &block); end # Updates the receiver in-place, merging in the hashes passed as arguments: @@ -5685,7 +6746,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash.update({ "a" => 1 }, { "b" => 2 }) # => { "a" => 1, "b" => 2 } # # The arguments can be either an - # ActiveSupport::HashWithIndifferentAccess or a regular +Hash+. + # +ActiveSupport::HashWithIndifferentAccess+ or a regular +Hash+. # In either case the merge respects the semantics of indifferent access. # # If the argument is a regular hash with keys +:key+ and "key" only one @@ -5700,16 +6761,16 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash_2['key'] = 12 # hash_1.update(hash_2) { |key, old, new| old + new } # => {"key"=>22} # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#130 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#132 def merge!(*other_hashes, &block); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#64 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#66 def nested_under_indifferent_access; end def regular_update(*_arg0); end def regular_writer(_arg0, _arg1); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#324 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#332 def reject(*args, &block); end # Replaces the contents of this hash with other_hash. @@ -5717,7 +6778,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # h = { "a" => 100, "b" => 200 } # h.replace({ "c" => 300, "d" => 400 }) # => {"c"=>300, "d"=>400} # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#290 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#298 def replace(other_hash); end # Like +merge+ but the other way around: Merges the receiver into the @@ -5727,21 +6788,21 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash['a'] = nil # hash.reverse_merge(a: 0, b: 1) # => {"a"=>nil, "b"=>1} # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#275 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#283 def reverse_merge(other_hash); end # Same semantics as +reverse_merge+ but modifies the receiver in-place. # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#281 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#289 def reverse_merge!(other_hash); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#319 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#327 def select(*args, &block); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#347 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#365 def slice(*keys); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#352 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#370 def slice!(*keys); end # Assigns a new value to the hash: @@ -5751,37 +6812,37 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # # This value can be later fetched using either +:key+ or 'key'. # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#96 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#98 def store(key, value); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#310 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#318 def stringify_keys; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#308 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#316 def stringify_keys!; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#314 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#322 def symbolize_keys; end # Convert to a regular hash with string keys. # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#362 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#380 def to_hash; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#314 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#322 def to_options; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#317 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#325 def to_options!; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#334 - def transform_keys(*args, &block); end + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#344 + def transform_keys(hash = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#339 - def transform_keys!; end + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#349 + def transform_keys!(hash = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#329 - def transform_values(*args, &block); end + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#337 + def transform_values(&block); end # Updates the receiver in-place, merging in the hashes passed as arguments: # @@ -5797,7 +6858,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash.update({ "a" => 1 }, { "b" => 2 }) # => { "a" => 1, "b" => 2 } # # The arguments can be either an - # ActiveSupport::HashWithIndifferentAccess or a regular +Hash+. + # +ActiveSupport::HashWithIndifferentAccess+ or a regular +Hash+. # In either case the merge respects the semantics of indifferent access. # # If the argument is a regular hash with keys +:key+ and "key" only one @@ -5812,7 +6873,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash_2['key'] = 12 # hash_1.update(hash_2) { |key, old, new| old + new } # => {"key"=>22} # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#130 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#132 def update(*other_hashes, &block); end # Returns an array of the values at the specified indices: @@ -5822,7 +6883,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash[:b] = 'y' # hash.values_at('a', 'b') # => ["x", "y"] # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#231 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#237 def values_at(*keys); end # Like +merge+ but the other way around: Merges the receiver into the @@ -5832,15 +6893,15 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash['a'] = nil # hash.reverse_merge(a: 0, b: 1) # => {"a"=>nil, "b"=>1} # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#275 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#283 def with_defaults(other_hash); end # Same semantics as +reverse_merge+ but modifies the receiver in-place. # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#281 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#289 def with_defaults!(other_hash); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#60 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#62 def with_indifferent_access; end # Returns a hash with indifferent access that includes everything except given keys. @@ -5848,29 +6909,32 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash.except(:a, "b") # => {c: 10}.with_indifferent_access # hash # => { a: "x", b: "y", c: 10 }.with_indifferent_access # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#303 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#311 def without(*keys); end private - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#374 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#392 def convert_key(key); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#383 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#401 def convert_value(value, conversion: T.unsafe(nil)); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#400 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#418 def set_defaults(target); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#408 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#426 def update_with_single_argument(other_hash, block); end class << self - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#83 + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#85 def [](*args); end end end +# source://activesupport//lib/active_support/hash_with_indifferent_access.rb#342 +ActiveSupport::HashWithIndifferentAccess::NOT_GIVEN = T.let(T.unsafe(nil), Object) + # source://activesupport//lib/active_support/html_safe_translation.rb#4 module ActiveSupport::HtmlSafeTranslation extend ::ActiveSupport::HtmlSafeTranslation @@ -5880,29 +6944,31 @@ 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 +# = Active Support \Inflector +# # The Inflector transforms words from singular to plural, class names to table # names, modularized class names to ones without, and class names to foreign # keys. The default inflections for pluralization, singularization, and # uncountable words are kept in inflections.rb. # -# The Rails core team has stated patches for the inflections library will not +# The \Rails core team has stated patches for the inflections library will not # be accepted in order to avoid breaking legacy applications which may be # relying on errant inflections. If you discover an incorrect inflection and # require it for your application or wish to define rules for languages other @@ -5929,10 +6995,10 @@ module ActiveSupport::Inflector # # camelize(underscore('SSLError')) # => "SslError" # - # source://activesupport//lib/active_support/inflector/methods.rb#69 + # source://activesupport//lib/active_support/inflector/methods.rb#70 def camelize(term, uppercase_first_letter = T.unsafe(nil)); end - # Creates a class name from a plural table name like Rails does for table + # Creates a class name from a plural table name like \Rails does for table # names to models. Note that this returns a string and not a Class. (To # convert to an actual class follow +classify+ with #constantize.) # @@ -5943,7 +7009,7 @@ module ActiveSupport::Inflector # # classify('calculus') # => "Calculu" # - # source://activesupport//lib/active_support/inflector/methods.rb#206 + # source://activesupport//lib/active_support/inflector/methods.rb#218 def classify(table_name); end # Tries to find a constant with the name specified in the argument string. @@ -5965,14 +7031,14 @@ module ActiveSupport::Inflector # NameError is raised when the name is not in CamelCase or the constant is # unknown. # - # source://activesupport//lib/active_support/inflector/methods.rb#277 + # source://activesupport//lib/active_support/inflector/methods.rb#289 def constantize(camel_cased_word); end # Replaces underscores with dashes in the string. # # dasherize('puni_puni') # => "puni-puni" # - # source://activesupport//lib/active_support/inflector/methods.rb#214 + # source://activesupport//lib/active_support/inflector/methods.rb#226 def dasherize(underscored_word); end # Removes the rightmost segment from the constant expression in the string. @@ -5985,7 +7051,7 @@ module ActiveSupport::Inflector # # See also #demodulize. # - # source://activesupport//lib/active_support/inflector/methods.rb#244 + # source://activesupport//lib/active_support/inflector/methods.rb#256 def deconstantize(path); end # Removes the module part from the expression in the string. @@ -5997,9 +7063,18 @@ module ActiveSupport::Inflector # # See also #deconstantize. # - # source://activesupport//lib/active_support/inflector/methods.rb#226 + # source://activesupport//lib/active_support/inflector/methods.rb#238 def demodulize(path); end + # Converts the first character in the string to lowercase. + # + # downcase_first('If they enjoyed The Matrix') # => "if they enjoyed The Matrix" + # downcase_first('I') # => "i" + # downcase_first('') # => "" + # + # source://activesupport//lib/active_support/inflector/methods.rb#175 + def downcase_first(string); end + # Creates a foreign key name from a class name. # +separate_class_name_and_id_with_underscore+ sets whether # the method should put '_' between the name and 'id'. @@ -6008,7 +7083,7 @@ module ActiveSupport::Inflector # foreign_key('Message', false) # => "messageid" # foreign_key('Admin::Post') # => "post_id" # - # source://activesupport//lib/active_support/inflector/methods.rb#255 + # source://activesupport//lib/active_support/inflector/methods.rb#267 def foreign_key(class_name, separate_class_name_and_id_with_underscore = T.unsafe(nil)); end # Tweaks an attribute name for display to end users. @@ -6037,7 +7112,7 @@ module ActiveSupport::Inflector # # humanize('ssl_error') # => "SSL error" # - # source://activesupport//lib/active_support/inflector/methods.rb#132 + # source://activesupport//lib/active_support/inflector/methods.rb#135 def humanize(lower_case_and_underscored_word, capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end # Yields a singleton instance of Inflector::Inflections so you can specify @@ -6049,7 +7124,7 @@ module ActiveSupport::Inflector # inflect.uncountable 'rails' # end # - # source://activesupport//lib/active_support/inflector/inflections.rb#263 + # source://activesupport//lib/active_support/inflector/inflections.rb#265 def inflections(locale = T.unsafe(nil)); end # Returns the suffix that should be added to a number to denote the position @@ -6062,7 +7137,7 @@ module ActiveSupport::Inflector # ordinal(-11) # => "th" # ordinal(-1021) # => "st" # - # source://activesupport//lib/active_support/inflector/methods.rb#322 + # source://activesupport//lib/active_support/inflector/methods.rb#334 def ordinal(number); end # Turns a number into an ordinal string used to denote the position in an @@ -6075,7 +7150,7 @@ module ActiveSupport::Inflector # ordinalize(-11) # => "-11th" # ordinalize(-1021) # => "-1021st" # - # source://activesupport//lib/active_support/inflector/methods.rb#335 + # source://activesupport//lib/active_support/inflector/methods.rb#347 def ordinalize(number); end # Replaces special characters in a string so that it may be used as part of @@ -6105,7 +7180,7 @@ module ActiveSupport::Inflector # By default, this parameter is set to nil and it will use # the configured I18n.locale. # - # source://activesupport//lib/active_support/inflector/transliterate.rb#121 + # source://activesupport//lib/active_support/inflector/transliterate.rb#123 def parameterize(string, separator: T.unsafe(nil), preserve_case: T.unsafe(nil), locale: T.unsafe(nil)); end # Returns the plural form of the word in the string. @@ -6121,7 +7196,7 @@ module ActiveSupport::Inflector # pluralize('CamelOctopus') # => "CamelOctopi" # pluralize('ley', :es) # => "leyes" # - # source://activesupport//lib/active_support/inflector/methods.rb#32 + # source://activesupport//lib/active_support/inflector/methods.rb#33 def pluralize(word, locale = T.unsafe(nil)); end # Tries to find a constant with the name specified in the argument string. @@ -6147,7 +7222,7 @@ module ActiveSupport::Inflector # safe_constantize('UnknownModule') # => nil # safe_constantize('UnknownModule::Foo::Bar') # => nil # - # source://activesupport//lib/active_support/inflector/methods.rb#303 + # source://activesupport//lib/active_support/inflector/methods.rb#315 def safe_constantize(camel_cased_word); end # The reverse of #pluralize, returns the singular form of a word in a @@ -6164,22 +7239,22 @@ module ActiveSupport::Inflector # singularize('CamelOctopi') # => "CamelOctopus" # singularize('leyes', :es) # => "ley" # - # source://activesupport//lib/active_support/inflector/methods.rb#49 + # source://activesupport//lib/active_support/inflector/methods.rb#50 def singularize(word, locale = T.unsafe(nil)); end - # Creates the name of a table like Rails does for models to table names. + # Creates the name of a table like \Rails does for models to table names. # This method uses the #pluralize method on the last word in the string. # # tableize('RawScaledScorer') # => "raw_scaled_scorers" # tableize('ham_and_egg') # => "ham_and_eggs" # tableize('fancyCategory') # => "fancy_categories" # - # source://activesupport//lib/active_support/inflector/methods.rb#192 + # source://activesupport//lib/active_support/inflector/methods.rb#204 def tableize(class_name); end # Capitalizes all the words and replaces some characters in the string to # create a nicer looking title. +titleize+ is meant for creating pretty - # output. It is not used in the Rails internals. + # output. It is not used in the \Rails internals. # # The trailing '_id','Id'.. can be kept and capitalized by setting the # optional parameter +keep_id_suffix+ to true. @@ -6191,7 +7266,7 @@ module ActiveSupport::Inflector # titleize('raiders_of_the_lost_ark') # => "Raiders Of The Lost Ark" # titleize('string_ending_with_id', keep_id_suffix: true) # => "String Ending With Id" # - # source://activesupport//lib/active_support/inflector/methods.rb#180 + # source://activesupport//lib/active_support/inflector/methods.rb#192 def titleize(word, keep_id_suffix: T.unsafe(nil)); end # Replaces non-ASCII characters with an ASCII approximation, or if none @@ -6266,16 +7341,16 @@ module ActiveSupport::Inflector # # camelize(underscore('SSLError')) # => "SslError" # - # source://activesupport//lib/active_support/inflector/methods.rb#96 + # source://activesupport//lib/active_support/inflector/methods.rb#99 def underscore(camel_cased_word); end - # Converts just the first character to uppercase. + # Converts the first character in the string to uppercase. # # upcase_first('what a Lovely Day') # => "What a Lovely Day" # upcase_first('w') # => "W" # upcase_first('') # => "" # - # source://activesupport//lib/active_support/inflector/methods.rb#163 + # source://activesupport//lib/active_support/inflector/methods.rb#166 def upcase_first(string); end private @@ -6288,7 +7363,7 @@ module ActiveSupport::Inflector # apply_inflections('post', inflections.plurals, :en) # => "posts" # apply_inflections('posts', inflections.singulars, :en) # => "post" # - # source://activesupport//lib/active_support/inflector/methods.rb#364 + # source://activesupport//lib/active_support/inflector/methods.rb#376 def apply_inflections(word, rules, locale = T.unsafe(nil)); end # Mounts a regular expression, returned as a string to ease interpolation, @@ -6297,13 +7372,15 @@ module ActiveSupport::Inflector # const_regexp("Foo::Bar::Baz") # => "Foo(::Bar(::Baz)?)?" # const_regexp("::") # => "::" # - # source://activesupport//lib/active_support/inflector/methods.rb#345 + # source://activesupport//lib/active_support/inflector/methods.rb#357 def const_regexp(camel_cased_word); end end # source://activesupport//lib/active_support/inflector/transliterate.rb#8 ActiveSupport::Inflector::ALLOWED_ENCODINGS_FOR_TRANSLITERATE = T.let(T.unsafe(nil), Array) +# = Active Support \Inflections +# # A singleton instance of this class is yielded by Inflector.inflections, # which can then be used to specify additional inflection rules. If passed # an optional locale, rules for other languages can be specified. The @@ -6323,11 +7400,11 @@ ActiveSupport::Inflector::ALLOWED_ENCODINGS_FOR_TRANSLITERATE = T.let(T.unsafe(n # singularization rules that is runs. This guarantees that your rules run # before any of the rules that may already have been loaded. # -# source://activesupport//lib/active_support/inflector/inflections.rb#28 +# source://activesupport//lib/active_support/inflector/inflections.rb#30 class ActiveSupport::Inflector::Inflections # @return [Inflections] a new instance of Inflections # - # source://activesupport//lib/active_support/inflector/inflections.rb#78 + # source://activesupport//lib/active_support/inflector/inflections.rb#80 def initialize; end # Specifies a new acronym. An acronym must be specified as it will appear @@ -6380,18 +7457,18 @@ class ActiveSupport::Inflector::Inflections # underscore 'McDonald' # => 'mcdonald' # camelize 'mcdonald' # => 'McDonald' # - # source://activesupport//lib/active_support/inflector/inflections.rb#140 + # source://activesupport//lib/active_support/inflector/inflections.rb#142 def acronym(word); end # Returns the value of attribute acronyms. # - # source://activesupport//lib/active_support/inflector/inflections.rb#74 + # source://activesupport//lib/active_support/inflector/inflections.rb#76 def acronyms; end - # source://activesupport//lib/active_support/inflector/inflections.rb#76 + # source://activesupport//lib/active_support/inflector/inflections.rb#78 def acronyms_camelize_regex; end - # source://activesupport//lib/active_support/inflector/inflections.rb#76 + # source://activesupport//lib/active_support/inflector/inflections.rb#78 def acronyms_underscore_regex; end # Clears the loaded inflections within a given scope (default is @@ -6402,7 +7479,7 @@ class ActiveSupport::Inflector::Inflections # clear :all # clear :plurals # - # source://activesupport//lib/active_support/inflector/inflections.rb#229 + # source://activesupport//lib/active_support/inflector/inflections.rb#231 def clear(scope = T.unsafe(nil)); end # Specifies a humanized form of a string by a regular expression rule or @@ -6414,12 +7491,12 @@ class ActiveSupport::Inflector::Inflections # human /_cnt$/i, '\1_count' # human 'legacy_col_person_name', 'Name' # - # source://activesupport//lib/active_support/inflector/inflections.rb#218 + # source://activesupport//lib/active_support/inflector/inflections.rb#220 def human(rule, replacement); end # Returns the value of attribute humans. # - # source://activesupport//lib/active_support/inflector/inflections.rb#74 + # source://activesupport//lib/active_support/inflector/inflections.rb#76 def humans; end # Specifies a new irregular that applies to both pluralization and @@ -6430,7 +7507,7 @@ class ActiveSupport::Inflector::Inflections # irregular 'cactus', 'cacti' # irregular 'person', 'people' # - # source://activesupport//lib/active_support/inflector/inflections.rb#172 + # source://activesupport//lib/active_support/inflector/inflections.rb#174 def irregular(singular, plural); end # Specifies a new pluralization rule and its replacement. The rule can @@ -6438,12 +7515,12 @@ class ActiveSupport::Inflector::Inflections # always be a string that may include references to the matched data from # the rule. # - # source://activesupport//lib/active_support/inflector/inflections.rb#149 + # source://activesupport//lib/active_support/inflector/inflections.rb#151 def plural(rule, replacement); end # Returns the value of attribute plurals. # - # source://activesupport//lib/active_support/inflector/inflections.rb#74 + # source://activesupport//lib/active_support/inflector/inflections.rb#76 def plurals; end # Specifies a new singularization rule and its replacement. The rule can @@ -6451,12 +7528,12 @@ class ActiveSupport::Inflector::Inflections # always be a string that may include references to the matched data from # the rule. # - # source://activesupport//lib/active_support/inflector/inflections.rb#159 + # source://activesupport//lib/active_support/inflector/inflections.rb#161 def singular(rule, replacement); end # Returns the value of attribute singulars. # - # source://activesupport//lib/active_support/inflector/inflections.rb#74 + # source://activesupport//lib/active_support/inflector/inflections.rb#76 def singulars; end # Specifies words that are uncountable and should not be inflected. @@ -6465,60 +7542,62 @@ class ActiveSupport::Inflector::Inflections # uncountable 'money', 'information' # uncountable %w( money information rice ) # - # source://activesupport//lib/active_support/inflector/inflections.rb#206 + # source://activesupport//lib/active_support/inflector/inflections.rb#208 def uncountable(*words); end # Returns the value of attribute uncountables. # - # source://activesupport//lib/active_support/inflector/inflections.rb#74 + # source://activesupport//lib/active_support/inflector/inflections.rb#76 def uncountables; end private - # source://activesupport//lib/active_support/inflector/inflections.rb#248 + # source://activesupport//lib/active_support/inflector/inflections.rb#250 def define_acronym_regex_patterns; end # Private, for the test suite. # - # source://activesupport//lib/active_support/inflector/inflections.rb#84 + # source://activesupport//lib/active_support/inflector/inflections.rb#86 def initialize_dup(orig); end class << self - # source://activesupport//lib/active_support/inflector/inflections.rb#63 + # source://activesupport//lib/active_support/inflector/inflections.rb#65 def instance(locale = T.unsafe(nil)); end - # source://activesupport//lib/active_support/inflector/inflections.rb#67 + # source://activesupport//lib/active_support/inflector/inflections.rb#69 def instance_or_fallback(locale); end end end -# source://activesupport//lib/active_support/inflector/inflections.rb#31 +# source://activesupport//lib/active_support/inflector/inflections.rb#33 class ActiveSupport::Inflector::Inflections::Uncountables < ::Array # @return [Uncountables] a new instance of Uncountables # - # source://activesupport//lib/active_support/inflector/inflections.rb#32 + # source://activesupport//lib/active_support/inflector/inflections.rb#34 def initialize; end - # source://activesupport//lib/active_support/inflector/inflections.rb#42 + # source://activesupport//lib/active_support/inflector/inflections.rb#44 def <<(*word); end - # source://activesupport//lib/active_support/inflector/inflections.rb#46 + # source://activesupport//lib/active_support/inflector/inflections.rb#48 def add(words); end - # source://activesupport//lib/active_support/inflector/inflections.rb#37 + # source://activesupport//lib/active_support/inflector/inflections.rb#39 def delete(entry); end # @return [Boolean] # - # source://activesupport//lib/active_support/inflector/inflections.rb#53 + # source://activesupport//lib/active_support/inflector/inflections.rb#55 def uncountable?(str); end private - # source://activesupport//lib/active_support/inflector/inflections.rb#58 + # source://activesupport//lib/active_support/inflector/inflections.rb#60 def to_regex(string); end end +# = Inheritable Options +# # +InheritableOptions+ provides a constructor to build an OrderedOptions # hash inherited from another hash. # @@ -6528,30 +7607,39 @@ end # h.girl # => 'Mary' # h.boy # => 'John' # -# source://activesupport//lib/active_support/ordered_options.rb#79 +# If the existing hash has string keys, call Hash#symbolize_keys on it. +# +# h = ActiveSupport::InheritableOptions.new({ 'girl' => 'Mary', 'boy' => 'John' }.symbolize_keys) +# h.girl # => 'Mary' +# h.boy # => 'John' +# +# source://activesupport//lib/active_support/ordered_options.rb#93 class ActiveSupport::InheritableOptions < ::ActiveSupport::OrderedOptions # @return [InheritableOptions] a new instance of InheritableOptions # - # source://activesupport//lib/active_support/ordered_options.rb#80 + # source://activesupport//lib/active_support/ordered_options.rb#94 def initialize(parent = T.unsafe(nil)); end - # source://activesupport//lib/active_support/ordered_options.rb#91 + # source://activesupport//lib/active_support/ordered_options.rb#105 def inheritable_copy; end end # source://activesupport//lib/active_support/isolated_execution_state.rb#6 module ActiveSupport::IsolatedExecutionState class << self - # source://activesupport//lib/active_support/isolated_execution_state.rb#32 + # source://activesupport//lib/active_support/isolated_execution_state.rb#37 def [](key); end - # source://activesupport//lib/active_support/isolated_execution_state.rb#36 + # source://activesupport//lib/active_support/isolated_execution_state.rb#41 def []=(key, value); end - # source://activesupport//lib/active_support/isolated_execution_state.rb#48 + # source://activesupport//lib/active_support/isolated_execution_state.rb#53 def clear; end - # source://activesupport//lib/active_support/isolated_execution_state.rb#44 + # source://activesupport//lib/active_support/isolated_execution_state.rb#57 + def context; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#49 def delete(key); end # Returns the value of attribute isolation_level. @@ -6564,25 +7652,24 @@ module ActiveSupport::IsolatedExecutionState # @return [Boolean] # - # source://activesupport//lib/active_support/isolated_execution_state.rb#40 + # source://activesupport//lib/active_support/isolated_execution_state.rb#45 def key?(key); end - # source://activesupport//lib/active_support/isolated_execution_state.rb#52 + # Returns the value of attribute scope. + # + # source://activesupport//lib/active_support/isolated_execution_state.rb#13 + def scope; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#61 def share_with(other); end - # source://activesupport//lib/active_support/isolated_execution_state.rb#28 + # source://activesupport//lib/active_support/isolated_execution_state.rb#33 def unique_id; end private - # source://activesupport//lib/active_support/isolated_execution_state.rb#61 - def current; end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#65 - def current_fiber; end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#61 - def current_thread; end + # source://activesupport//lib/active_support/isolated_execution_state.rb#69 + def state; end end end @@ -6598,14 +7685,20 @@ module ActiveSupport::JSON # source://activesupport//lib/active_support/json/decoding.rb#22 def decode(json); end - # Dumps objects in JSON (JavaScript Object Notation). + # source://activesupport//lib/active_support/json/encoding.rb#22 + def dump(value, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/json/encoding.rb#22 + def encode(value, options = T.unsafe(nil)); end + + # Parses a JSON string (JavaScript Object Notation) into a hash. # See http://www.json.org for more info. # - # ActiveSupport::JSON.encode({ team: 'rails', players: '36' }) - # # => "{\"team\":\"rails\",\"players\":\"36\"}" + # ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}") + # => {"team" => "rails", "players" => "36"} # - # source://activesupport//lib/active_support/json/encoding.rb#21 - def encode(value, options = T.unsafe(nil)); end + # source://activesupport//lib/active_support/json/decoding.rb#22 + def load(json); end # Returns the class of the error that will be raised when there is an # error in decoding JSON. Using this method means you won't directly @@ -6618,12 +7711,12 @@ module ActiveSupport::JSON # Rails.logger.warn("Attempted to decode invalid JSON: #{some_string}") # end # - # source://activesupport//lib/active_support/json/decoding.rb#42 + # source://activesupport//lib/active_support/json/decoding.rb#43 def parse_error; end private - # source://activesupport//lib/active_support/json/decoding.rb#47 + # source://activesupport//lib/active_support/json/decoding.rb#48 def convert_dates_from(data); end end end @@ -6636,80 +7729,80 @@ ActiveSupport::JSON::DATETIME_REGEX = T.let(T.unsafe(nil), Regexp) # source://activesupport//lib/active_support/json/decoding.rb#13 ActiveSupport::JSON::DATE_REGEX = T.let(T.unsafe(nil), Regexp) -# source://activesupport//lib/active_support/json/encoding.rb#25 +# source://activesupport//lib/active_support/json/encoding.rb#28 module ActiveSupport::JSON::Encoding class << self # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) # as a safety measure. # - # source://activesupport//lib/active_support/json/encoding.rb#121 + # source://activesupport//lib/active_support/json/encoding.rb#103 def escape_html_entities_in_json; end # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) # as a safety measure. # - # source://activesupport//lib/active_support/json/encoding.rb#121 + # source://activesupport//lib/active_support/json/encoding.rb#103 def escape_html_entities_in_json=(_arg0); end - # Sets the encoder used by Rails to encode Ruby objects into JSON strings + # Sets the encoder used by \Rails to encode Ruby objects into JSON strings # in +Object#to_json+ and +ActiveSupport::JSON.encode+. # - # source://activesupport//lib/active_support/json/encoding.rb#129 + # source://activesupport//lib/active_support/json/encoding.rb#111 def json_encoder; end - # Sets the encoder used by Rails to encode Ruby objects into JSON strings + # Sets the encoder used by \Rails to encode Ruby objects into JSON strings # in +Object#to_json+ and +ActiveSupport::JSON.encode+. # - # source://activesupport//lib/active_support/json/encoding.rb#129 + # source://activesupport//lib/active_support/json/encoding.rb#111 def json_encoder=(_arg0); end # Sets the precision of encoded time values. # Defaults to 3 (equivalent to millisecond precision) # - # source://activesupport//lib/active_support/json/encoding.rb#125 + # source://activesupport//lib/active_support/json/encoding.rb#107 def time_precision; end # Sets the precision of encoded time values. # Defaults to 3 (equivalent to millisecond precision) # - # source://activesupport//lib/active_support/json/encoding.rb#125 + # source://activesupport//lib/active_support/json/encoding.rb#107 def time_precision=(_arg0); end # If true, use ISO 8601 format for dates and times. Otherwise, fall back # to the Active Support legacy format. # - # source://activesupport//lib/active_support/json/encoding.rb#117 + # source://activesupport//lib/active_support/json/encoding.rb#99 def use_standard_json_time_format; end # If true, use ISO 8601 format for dates and times. Otherwise, fall back # to the Active Support legacy format. # - # source://activesupport//lib/active_support/json/encoding.rb#117 + # source://activesupport//lib/active_support/json/encoding.rb#99 def use_standard_json_time_format=(_arg0); end end end -# source://activesupport//lib/active_support/json/encoding.rb#26 +# source://activesupport//lib/active_support/json/encoding.rb#29 class ActiveSupport::JSON::Encoding::JSONGemEncoder # @return [JSONGemEncoder] a new instance of JSONGemEncoder # - # source://activesupport//lib/active_support/json/encoding.rb#29 + # source://activesupport//lib/active_support/json/encoding.rb#32 def initialize(options = T.unsafe(nil)); end # Encode the given object into a JSON string # - # source://activesupport//lib/active_support/json/encoding.rb#34 + # source://activesupport//lib/active_support/json/encoding.rb#37 def encode(value); end # Returns the value of attribute options. # - # source://activesupport//lib/active_support/json/encoding.rb#27 + # source://activesupport//lib/active_support/json/encoding.rb#30 def options; end private # Convert an object into a "JSON-ready" representation composed of - # primitives like Hash, Array, String, Numeric, + # primitives like Hash, Array, String, Symbol, Numeric, # and +true+/+false+/+nil+. # Recursively calls #as_json to the object to recursively build a # fully JSON-ready object. @@ -6722,72 +7815,55 @@ class ActiveSupport::JSON::Encoding::JSONGemEncoder # to +object.as_json+, not any of this method's recursive +#as_json+ # calls. # - # source://activesupport//lib/active_support/json/encoding.rb#89 + # source://activesupport//lib/active_support/json/encoding.rb#70 def jsonify(value); end # Encode a "jsonified" Ruby data structure using the JSON gem # - # source://activesupport//lib/active_support/json/encoding.rb#109 + # source://activesupport//lib/active_support/json/encoding.rb#91 def stringify(jsonified); end end -# Rails does more escaping than the JSON gem natively does (we -# escape \u2028 and \u2029 and optionally >, <, & to work around -# certain browser problems). +# = Key Generator # -# source://activesupport//lib/active_support/json/encoding.rb#42 -ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPED_CHARS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/json/encoding.rb#51 -ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPE_REGEX_WITHOUT_HTML_ENTITIES = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/json/encoding.rb#50 -ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPE_REGEX_WITH_HTML_ENTITIES = T.let(T.unsafe(nil), Regexp) - -# This class wraps all the strings we see and does the extra escaping -# -# source://activesupport//lib/active_support/json/encoding.rb#54 -class ActiveSupport::JSON::Encoding::JSONGemEncoder::EscapedString < ::String - # source://activesupport//lib/active_support/json/encoding.rb#55 - def to_json(*_arg0); end - - # source://activesupport//lib/active_support/json/encoding.rb#67 - def to_s; end -end - # KeyGenerator is a simple wrapper around OpenSSL's implementation of PBKDF2. # It can be used to derive a number of keys for various purposes from a given secret. -# This lets Rails applications have a single secure secret, but avoid reusing that +# This lets \Rails applications have a single secure secret, but avoid reusing that # key in multiple incompatible contexts. # -# source://activesupport//lib/active_support/key_generator.rb#11 +# source://activesupport//lib/active_support/key_generator.rb#13 class ActiveSupport::KeyGenerator # @return [KeyGenerator] a new instance of KeyGenerator # - # source://activesupport//lib/active_support/key_generator.rb#26 + # source://activesupport//lib/active_support/key_generator.rb#28 def initialize(secret, options = T.unsafe(nil)); end # Returns a derived key suitable for use. The default +key_size+ is chosen # to be compatible with the default settings of ActiveSupport::MessageVerifier. # i.e. OpenSSL::Digest::SHA1#block_length # - # source://activesupport//lib/active_support/key_generator.rb#39 + # source://activesupport//lib/active_support/key_generator.rb#41 def generate_key(salt, key_size = T.unsafe(nil)); end + # source://activesupport//lib/active_support/key_generator.rb#45 + def inspect; end + class << self - # source://activesupport//lib/active_support/key_generator.rb#21 + # source://activesupport//lib/active_support/key_generator.rb#23 def hash_digest_class; end - # source://activesupport//lib/active_support/key_generator.rb#13 + # source://activesupport//lib/active_support/key_generator.rb#15 def hash_digest_class=(klass); end end end -# LazyLoadHooks allows Rails to lazily load a lot of components and thus +# = Lazy Load Hooks +# +# LazyLoadHooks allows \Rails to lazily load a lot of components and thus # making the app boot faster. Because of this feature now there is no need to -# require ActiveRecord::Base at boot time purely to apply +# require +ActiveRecord::Base+ at boot time purely to apply # configuration. Instead a hook is registered that applies configuration once -# ActiveRecord::Base is loaded. Here ActiveRecord::Base is +# +ActiveRecord::Base+ is loaded. Here +ActiveRecord::Base+ is # used as example but this feature can be applied elsewhere too. # # Here is an example where on_load method is called to register a hook. @@ -6821,9 +7897,9 @@ end # end # end # -# source://activesupport//lib/active_support/lazy_load_hooks.rb#41 +# source://activesupport//lib/active_support/lazy_load_hooks.rb#43 module ActiveSupport::LazyLoadHooks - # Declares a block that will be executed when a Rails component is fully + # Declares a block that will be executed when a \Rails component is fully # loaded. If the component has already loaded, the block is executed # immediately. # @@ -6832,7 +7908,7 @@ module ActiveSupport::LazyLoadHooks # * :yield - Yields the object that run_load_hooks to +block+. # * :run_once - Given +block+ will run only once. # - # source://activesupport//lib/active_support/lazy_load_hooks.rb#58 + # source://activesupport//lib/active_support/lazy_load_hooks.rb#60 def on_load(name, options = T.unsafe(nil), &block); end # Executes all blocks registered to +name+ via on_load, using +base+ as the @@ -6843,24 +7919,26 @@ module ActiveSupport::LazyLoadHooks # In the case of the above example, it will execute all hooks registered # for +:active_record+ within the class +ActiveRecord::Base+. # - # source://activesupport//lib/active_support/lazy_load_hooks.rb#73 + # source://activesupport//lib/active_support/lazy_load_hooks.rb#75 def run_load_hooks(name, base = T.unsafe(nil)); end private - # source://activesupport//lib/active_support/lazy_load_hooks.rb#89 + # source://activesupport//lib/active_support/lazy_load_hooks.rb#91 def execute_hook(name, base, options, block); end - # source://activesupport//lib/active_support/lazy_load_hooks.rb#81 + # source://activesupport//lib/active_support/lazy_load_hooks.rb#83 def with_execution_control(name, block, once); end class << self - # source://activesupport//lib/active_support/lazy_load_hooks.rb#42 + # source://activesupport//lib/active_support/lazy_load_hooks.rb#44 def extended(base); end end end -# ActiveSupport::LogSubscriber is an object set to consume +# = Active Support Log \Subscriber +# +# +ActiveSupport::LogSubscriber+ is an object set to consume # ActiveSupport::Notifications with the sole purpose of logging them. # The log subscriber dispatches notifications to a registered object based # on its given namespace. @@ -6870,29 +7948,23 @@ end # # module ActiveRecord # class LogSubscriber < ActiveSupport::LogSubscriber +# attach_to :active_record +# # def sql(event) # info "#{event.payload[:name]} (#{event.duration}) #{event.payload[:sql]}" # end # end # end # -# And it's finally registered as: -# -# ActiveRecord::LogSubscriber.attach_to :active_record -# -# Since we need to know all instance methods before attaching the log -# subscriber, the line above should be called after your -# ActiveRecord::LogSubscriber definition. +# ActiveRecord::LogSubscriber.logger must be set as well, but it is assigned +# automatically in a \Rails environment. # -# A logger also needs to be set with ActiveRecord::LogSubscriber.logger=. -# This is assigned automatically in a Rails environment. -# -# After configured, whenever a "sql.active_record" notification is published, -# it will properly dispatch the event -# (ActiveSupport::Notifications::Event) to the sql method. +# After configured, whenever a "sql.active_record" notification is +# published, it will properly dispatch the event +# (ActiveSupport::Notifications::Event) to the +sql+ method. # # Being an ActiveSupport::Notifications consumer, -# ActiveSupport::LogSubscriber exposes a simple interface to check if +# +ActiveSupport::LogSubscriber+ exposes a simple interface to check if # instrumented code raises an exception. It is common to log a different # message in case of an error, and this can be achieved by extending # the previous example: @@ -6914,125 +7986,164 @@ end # end # end # -# Log subscriber also has some helpers to deal with logging and automatically -# flushes all logs when the request finishes -# (via action_dispatch.callback notification) in a Rails environment. +# +ActiveSupport::LogSubscriber+ also has some helpers to deal with +# logging. For example, ActiveSupport::LogSubscriber.flush_all! will ensure +# that all logs are flushed, and it is called in Rails::Rack::Logger after a +# request finishes. # -# source://activesupport//lib/active_support/log_subscriber.rb#65 +# source://activesupport//lib/active_support/log_subscriber.rb#63 class ActiveSupport::LogSubscriber < ::ActiveSupport::Subscriber - # source://activesupport//lib/active_support/log_subscriber.rb#80 + # @return [LogSubscriber] a new instance of LogSubscriber + # + # source://activesupport//lib/active_support/log_subscriber.rb#136 + def initialize; end + + # source://activesupport//lib/active_support/log_subscriber.rb#149 + def call(event); end + + # source://activesupport//lib/active_support/log_subscriber.rb#86 def colorize_logging; end - # source://activesupport//lib/active_support/log_subscriber.rb#80 + # source://activesupport//lib/active_support/log_subscriber.rb#86 def colorize_logging=(val); end - # source://activesupport//lib/active_support/log_subscriber.rb#129 + # source://activesupport//lib/active_support/log_subscriber.rb#166 def debug(progname = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/log_subscriber.rb#129 + # source://activesupport//lib/active_support/log_subscriber.rb#166 def error(progname = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/log_subscriber.rb#129 - def fatal(progname = T.unsafe(nil), &block); end + # source://activesupport//lib/active_support/log_subscriber.rb#161 + def event_levels=(_arg0); end - # source://activesupport//lib/active_support/log_subscriber.rb#114 - def finish(name, id, payload); end + # source://activesupport//lib/active_support/log_subscriber.rb#166 + def fatal(progname = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/log_subscriber.rb#129 + # source://activesupport//lib/active_support/log_subscriber.rb#166 def info(progname = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/log_subscriber.rb#106 + # source://activesupport//lib/active_support/log_subscriber.rb#141 def logger; end - # source://activesupport//lib/active_support/log_subscriber.rb#120 + # source://activesupport//lib/active_support/log_subscriber.rb#155 def publish_event(event); end - # source://activesupport//lib/active_support/log_subscriber.rb#110 - def start(name, id, payload); end + # @return [Boolean] + # + # source://activesupport//lib/active_support/log_subscriber.rb#145 + def silenced?(event); end - # source://activesupport//lib/active_support/log_subscriber.rb#129 + # source://activesupport//lib/active_support/log_subscriber.rb#166 def unknown(progname = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/log_subscriber.rb#129 + # source://activesupport//lib/active_support/log_subscriber.rb#166 def warn(progname = T.unsafe(nil), &block); end private - # Set color by using a symbol or one of the defined constants. If a third - # option is set to +true+, it also adds bold to the string. This is based - # on the Highline implementation and will automatically append CLEAR to the - # end of the returned String. + # Set color by using a symbol or one of the defined constants. Set modes + # by specifying bold, italic, or underline options. Inspired by Highline, + # this method will automatically clear formatting at the end of the returned String. # - # source://activesupport//lib/active_support/log_subscriber.rb#139 - def color(text, color, bold = T.unsafe(nil)); end + # source://activesupport//lib/active_support/log_subscriber.rb#175 + def color(text, color, mode_options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/log_subscriber.rb#146 + # source://activesupport//lib/active_support/log_subscriber.rb#197 def log_exception(name, e); end + # source://activesupport//lib/active_support/log_subscriber.rb#183 + def mode_from(options); end + class << self - # source://activesupport//lib/active_support/log_subscriber.rb#80 + # source://activesupport//lib/active_support/log_subscriber.rb#102 + def attach_to(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/log_subscriber.rb#86 def colorize_logging; end - # source://activesupport//lib/active_support/log_subscriber.rb#80 + # source://activesupport//lib/active_support/log_subscriber.rb#86 def colorize_logging=(val); end # Flush all log_subscribers' logger. # - # source://activesupport//lib/active_support/log_subscriber.rb#96 + # source://activesupport//lib/active_support/log_subscriber.rb#115 def flush_all!; end - # source://activesupport//lib/active_support/log_subscriber.rb#91 + # source://activesupport//lib/active_support/log_subscriber.rb#87 + def log_levels; end + + # source://activesupport//lib/active_support/log_subscriber.rb#87 + def log_levels=(value); end + + # source://activesupport//lib/active_support/log_subscriber.rb#87 + def log_levels?; end + + # source://activesupport//lib/active_support/log_subscriber.rb#110 def log_subscribers; end - # source://activesupport//lib/active_support/log_subscriber.rb#83 + # source://activesupport//lib/active_support/log_subscriber.rb#96 def logger; end # Sets the attribute logger # # @param value the value to set the attribute logger to. # - # source://activesupport//lib/active_support/log_subscriber.rb#89 + # source://activesupport//lib/active_support/log_subscriber.rb#108 def logger=(_arg0); end private - # source://activesupport//lib/active_support/log_subscriber.rb#101 + # source://activesupport//lib/active_support/log_subscriber.rb#120 def fetch_public_methods(subscriber, inherit_all); end + + # source://activesupport//lib/active_support/log_subscriber.rb#124 + def set_event_levels; end + + # source://activesupport//lib/active_support/log_subscriber.rb#130 + def subscribe_log_level(method, level); end end end -# Colors +# ANSI sequence colors # -# source://activesupport//lib/active_support/log_subscriber.rb#71 +# source://activesupport//lib/active_support/log_subscriber.rb#77 ActiveSupport::LogSubscriber::BLACK = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/log_subscriber.rb#75 +# source://activesupport//lib/active_support/log_subscriber.rb#81 ActiveSupport::LogSubscriber::BLUE = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/log_subscriber.rb#68 -ActiveSupport::LogSubscriber::BOLD = T.let(T.unsafe(nil), String) +# source://activesupport//lib/active_support/log_subscriber.rb#66 +ActiveSupport::LogSubscriber::BOLD = T.let(T.unsafe(nil), ActiveSupport::Deprecation::DeprecatedObjectProxy) # Embed in a String to clear all previous ANSI sequences. # -# source://activesupport//lib/active_support/log_subscriber.rb#67 -ActiveSupport::LogSubscriber::CLEAR = T.let(T.unsafe(nil), String) +# source://activesupport//lib/active_support/log_subscriber.rb#65 +ActiveSupport::LogSubscriber::CLEAR = T.let(T.unsafe(nil), ActiveSupport::Deprecation::DeprecatedObjectProxy) -# source://activesupport//lib/active_support/log_subscriber.rb#77 +# source://activesupport//lib/active_support/log_subscriber.rb#83 ActiveSupport::LogSubscriber::CYAN = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/log_subscriber.rb#73 +# source://activesupport//lib/active_support/log_subscriber.rb#79 ActiveSupport::LogSubscriber::GREEN = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/log_subscriber.rb#76 +# source://activesupport//lib/active_support/log_subscriber.rb#89 +ActiveSupport::LogSubscriber::LEVEL_CHECKS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/log_subscriber.rb#82 ActiveSupport::LogSubscriber::MAGENTA = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/log_subscriber.rb#72 -ActiveSupport::LogSubscriber::RED = T.let(T.unsafe(nil), String) +# ANSI sequence modes +# +# source://activesupport//lib/active_support/log_subscriber.rb#69 +ActiveSupport::LogSubscriber::MODES = T.let(T.unsafe(nil), Hash) # source://activesupport//lib/active_support/log_subscriber.rb#78 +ActiveSupport::LogSubscriber::RED = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#84 ActiveSupport::LogSubscriber::WHITE = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/log_subscriber.rb#74 +# source://activesupport//lib/active_support/log_subscriber.rb#80 ActiveSupport::LogSubscriber::YELLOW = T.let(T.unsafe(nil), String) # source://activesupport//lib/active_support/logger.rb#8 @@ -7042,7 +8153,7 @@ class ActiveSupport::Logger < ::Logger # @return [Logger] a new instance of Logger # - # source://activesupport//lib/active_support/logger.rb#80 + # source://activesupport//lib/active_support/logger.rb#29 def initialize(*args, **kwargs); end # source://activesupport//lib/active_support/logger_silence.rb#12 @@ -7052,11 +8163,6 @@ class ActiveSupport::Logger < ::Logger def silencer=(val); end class << self - # Broadcasts logs to multiple loggers. - # - # source://activesupport//lib/active_support/logger.rb#23 - def broadcast(logger); end - # Returns true if the logger destination matches one of the sources # # logger = Logger.new(STDOUT) @@ -7078,11 +8184,11 @@ end # Simple formatter which only displays the message. # -# source://activesupport//lib/active_support/logger.rb#86 +# source://activesupport//lib/active_support/logger.rb#35 class ActiveSupport::Logger::SimpleFormatter < ::Logger::Formatter # This method is invoked when a log event occurs # - # source://activesupport//lib/active_support/logger.rb#88 + # source://activesupport//lib/active_support/logger.rb#37 def call(severity, timestamp, progname, msg); end end @@ -7097,49 +8203,50 @@ module ActiveSupport::LoggerSilence def silence(severity = T.unsafe(nil)); end end -# source://activesupport//lib/active_support/logger_thread_safe_level.rb#9 +# source://activesupport//lib/active_support/logger_thread_safe_level.rb#7 module ActiveSupport::LoggerThreadSafeLevel extend ::ActiveSupport::Concern - # Redefined to check severity against #level, and thus the thread-local level, rather than +@level+. - # FIXME: Remove when the minimum Ruby version supports overriding Logger#level. - # - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#50 - def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#12 def debug?; end - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#12 def error?; end - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#12 def fatal?; end - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#12 def info?; end - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#36 + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#38 def level; end - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#20 + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#18 def local_level; end - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#24 + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#22 def local_level=(level); end # Change the thread-local level for the duration of the given block. # - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#41 + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#43 def log_at(level); end - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#12 def unknown?; end - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#12 def warn?; end + + private + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#51 + def local_level_key; end end +# = Active Support Message Encryptor +# # MessageEncryptor is a simple way to encrypt values which get stored # somewhere you don't trust. # @@ -7157,7 +8264,7 @@ end # crypt.decrypt_and_verify(encrypted_data) # => "my secret data" # # The +decrypt_and_verify+ method will raise an -# ActiveSupport::MessageEncryptor::InvalidMessage exception if the data +# +ActiveSupport::MessageEncryptor::InvalidMessage+ exception if the data # provided cannot be decrypted or verified. # # crypt.decrypt_and_verify('not encrypted data') # => ActiveSupport::MessageEncryptor::InvalidMessage @@ -7218,10 +8325,9 @@ end # # crypt.rotate old_secret, cipher: "aes-256-cbc" # -# source://activesupport//lib/active_support/message_encryptor.rb#87 -class ActiveSupport::MessageEncryptor +# source://activesupport//lib/active_support/message_encryptor.rb#90 +class ActiveSupport::MessageEncryptor < ::ActiveSupport::Messages::Codec include ::ActiveSupport::Messages::Rotator - include ::ActiveSupport::Messages::Rotator::Encryptor # Initialize a new MessageEncryptor. +secret+ must be at least as long as # the cipher key size. For the default 'aes-256-gcm' cipher, this is 256 @@ -7229,171 +8335,284 @@ class ActiveSupport::MessageEncryptor # key by using ActiveSupport::KeyGenerator or a similar key # derivation function. # - # First additional parameter is used as the signature key for MessageVerifier. - # This allows you to specify keys to encrypt and sign data. + # The first additional parameter is used as the signature key for + # MessageVerifier. This allows you to specify keys to encrypt and sign + # data. Ignored when using an AEAD cipher like 'aes-256-gcm'. # # ActiveSupport::MessageEncryptor.new('secret', 'signature_secret') # - # Options: - # * :cipher - Cipher to use. Can be any cipher returned by - # OpenSSL::Cipher.ciphers. Default is 'aes-256-gcm'. - # * :digest - String of digest to use for signing. Default is - # +SHA1+. Ignored when using an AEAD cipher like 'aes-256-gcm'. - # * :serializer - Object serializer to use. Default is +Marshal+. + # ==== Options + # + # [+:cipher+] + # Cipher to use. Can be any cipher returned by +OpenSSL::Cipher.ciphers+. + # Default is 'aes-256-gcm'. + # + # [+:digest+] + # Digest used for signing. Ignored when using an AEAD cipher like + # 'aes-256-gcm'. + # + # [+:serializer+] + # The serializer used to serialize message data. You can specify any + # object that responds to +dump+ and +load+, or you can choose from + # several preconfigured serializers: +:marshal+, +:json_allow_marshal+, + # +:json+, +:message_pack_allow_marshal+, +:message_pack+. + # + # The preconfigured serializers include a fallback mechanism to support + # multiple deserialization formats. For example, the +:marshal+ serializer + # will serialize using +Marshal+, but can deserialize using +Marshal+, + # ActiveSupport::JSON, or ActiveSupport::MessagePack. This makes it easy + # to migrate between serializers. + # + # The +:marshal+, +:json_allow_marshal+, and +:message_pack_allow_marshal+ + # serializers support deserializing using +Marshal+, but the others do + # not. Beware that +Marshal+ is a potential vector for deserialization + # attacks in cases where a message signing secret has been leaked. If + # possible, choose a serializer that does not support +Marshal+. + # + # The +:message_pack+ and +:message_pack_allow_marshal+ serializers use + # ActiveSupport::MessagePack, which can roundtrip some Ruby types that are + # not supported by JSON, and may provide improved performance. However, + # these require the +msgpack+ gem. + # + # When using \Rails, the default depends on +config.active_support.message_serializer+. + # Otherwise, the default is +:marshal+. + # + # [+:url_safe+] + # By default, MessageEncryptor generates RFC 4648 compliant strings + # which are not URL-safe. In other words, they can contain "+" and "/". + # If you want to generate URL-safe strings (in compliance with "Base 64 + # Encoding with URL and Filename Safe Alphabet" in RFC 4648), you can + # pass +true+. + # + # [+:force_legacy_metadata_serializer+] + # Whether to use the legacy metadata serializer, which serializes the + # message first, then wraps it in an envelope which is also serialized. This + # was the default in \Rails 7.0 and below. + # + # If you don't pass a truthy value, the default is set using + # +config.active_support.use_message_serializer_for_metadata+. # # @return [MessageEncryptor] a new instance of MessageEncryptor # # source://activesupport//lib/active_support/messages/rotator.rb#6 - def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end + def initialize(*args, on_rotation: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/message_encryptor.rb#256 + def create_message(value, **options); end # Decrypt and verify a message. We need to verify the message in order to # avoid padding attacks. Reference: https://www.limited-entropy.com/padding-oracle-attacks/. # - # source://activesupport//lib/active_support/messages/rotator.rb#21 - def decrypt_and_verify(*args, on_rotation: T.unsafe(nil), **options); end + # ==== Options + # + # [+:purpose+] + # The purpose that the message was generated with. If the purpose does not + # match, +decrypt_and_verify+ will return +nil+. + # + # message = encryptor.encrypt_and_sign("hello", purpose: "greeting") + # encryptor.decrypt_and_verify(message, purpose: "greeting") # => "hello" + # encryptor.decrypt_and_verify(message) # => nil + # + # message = encryptor.encrypt_and_sign("bye") + # encryptor.decrypt_and_verify(message) # => "bye" + # encryptor.decrypt_and_verify(message, purpose: "greeting") # => nil + # + # source://activesupport//lib/active_support/message_encryptor.rb#241 + def decrypt_and_verify(message, **options); end # Encrypt and sign a message. We need to sign the message in order to avoid # padding attacks. Reference: https://www.limited-entropy.com/padding-oracle-attacks/. # - # source://activesupport//lib/active_support/message_encryptor.rb#153 - def encrypt_and_sign(value, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + # ==== Options + # + # [+:expires_at+] + # The datetime at which the message expires. After this datetime, + # verification of the message will fail. + # + # message = encryptor.encrypt_and_sign("hello", expires_at: Time.now.tomorrow) + # encryptor.decrypt_and_verify(message) # => "hello" + # # 24 hours later... + # encryptor.decrypt_and_verify(message) # => nil + # + # [+:expires_in+] + # The duration for which the message is valid. After this duration has + # elapsed, verification of the message will fail. + # + # message = encryptor.encrypt_and_sign("hello", expires_in: 24.hours) + # encryptor.decrypt_and_verify(message) # => "hello" + # # 24 hours later... + # encryptor.decrypt_and_verify(message) # => nil + # + # [+:purpose+] + # The purpose of the message. If specified, the same purpose must be + # specified when verifying the message; otherwise, verification will fail. + # (See #decrypt_and_verify.) + # + # source://activesupport//lib/active_support/message_encryptor.rb#220 + def encrypt_and_sign(value, **options); end - private + # source://activesupport//lib/active_support/message_encryptor.rb#264 + def inspect; end - # source://activesupport//lib/active_support/message_encryptor.rb#186 - def _decrypt(encrypted_message, purpose); end + # source://activesupport//lib/active_support/messages/rotator.rb#23 + def read_message(message, on_rotation: T.unsafe(nil), **options); end - # source://activesupport//lib/active_support/message_encryptor.rb#169 - def _encrypt(value, **metadata_options); end + private - # @return [Boolean] + # Returns the value of attribute aead_mode. # - # source://activesupport//lib/active_support/message_encryptor.rb#218 + # source://activesupport//lib/active_support/message_encryptor.rb#371 + def aead_mode; end + + # Returns the value of attribute aead_mode. + # + # source://activesupport//lib/active_support/message_encryptor.rb#371 def aead_mode?; end - # source://activesupport//lib/active_support/message_encryptor.rb#212 + # source://activesupport//lib/active_support/message_encryptor.rb#295 + def decrypt(encrypted_message); end + + # source://activesupport//lib/active_support/message_encryptor.rb#277 + def encrypt(data); end + + # source://activesupport//lib/active_support/message_encryptor.rb#340 + def extract_part(encrypted_message, rindex, length); end + + # source://activesupport//lib/active_support/message_encryptor.rb#350 + def extract_parts(encrypted_message); end + + # source://activesupport//lib/active_support/message_encryptor.rb#336 + def join_parts(parts); end + + # source://activesupport//lib/active_support/message_encryptor.rb#320 + def length_after_encode(length_before_encode); end + + # source://activesupport//lib/active_support/message_encryptor.rb#332 + def length_of_encoded_auth_tag; end + + # source://activesupport//lib/active_support/message_encryptor.rb#328 + def length_of_encoded_iv; end + + # source://activesupport//lib/active_support/message_encryptor.rb#367 def new_cipher; end - # source://activesupport//lib/active_support/message_encryptor.rb#222 - def resolve_verifier; end + # source://activesupport//lib/active_support/message_encryptor.rb#269 + def sign(data); end - # Returns the value of attribute verifier. - # - # source://activesupport//lib/active_support/message_encryptor.rb#216 - def verifier; end + # source://activesupport//lib/active_support/message_encryptor.rb#273 + def verify(data); end class << self - # source://activesupport//lib/active_support/message_encryptor.rb#93 + # source://activesupport//lib/active_support/message_encryptor.rb#96 def default_cipher; end # Given a cipher, returns the key length of the cipher to help generate the key of desired size # - # source://activesupport//lib/active_support/message_encryptor.rb#164 + # source://activesupport//lib/active_support/message_encryptor.rb#252 def key_len(cipher = T.unsafe(nil)); end - # source://activesupport//lib/active_support/message_encryptor.rb#90 + # source://activesupport//lib/active_support/message_encryptor.rb#93 def use_authenticated_message_encryption; end - # source://activesupport//lib/active_support/message_encryptor.rb#90 + # source://activesupport//lib/active_support/message_encryptor.rb#93 def use_authenticated_message_encryption=(val); end end end -# source://activesupport//lib/active_support/message_encryptor.rb#122 +# source://activesupport//lib/active_support/message_encryptor.rb#118 +ActiveSupport::MessageEncryptor::AUTH_TAG_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/message_encryptor.rb#115 class ActiveSupport::MessageEncryptor::InvalidMessage < ::StandardError; end -# source://activesupport//lib/active_support/message_encryptor.rb#102 +# source://activesupport//lib/active_support/message_encryptor.rb#105 module ActiveSupport::MessageEncryptor::NullSerializer class << self - # source://activesupport//lib/active_support/message_encryptor.rb#107 + # source://activesupport//lib/active_support/message_encryptor.rb#110 def dump(value); end - # source://activesupport//lib/active_support/message_encryptor.rb#103 + # source://activesupport//lib/active_support/message_encryptor.rb#106 def load(value); end end end -# source://activesupport//lib/active_support/message_encryptor.rb#112 -module ActiveSupport::MessageEncryptor::NullVerifier - class << self - # source://activesupport//lib/active_support/message_encryptor.rb#117 - def generate(value); end +# source://activesupport//lib/active_support/message_encryptor.rb#116 +ActiveSupport::MessageEncryptor::OpenSSLCipherError = OpenSSL::Cipher::CipherError - # source://activesupport//lib/active_support/message_encryptor.rb#113 - def verify(value); end - end -end +# source://activesupport//lib/active_support/message_encryptor.rb#119 +ActiveSupport::MessageEncryptor::SEPARATOR = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/message_encryptor.rb#123 -ActiveSupport::MessageEncryptor::OpenSSLCipherError = OpenSSL::Cipher::CipherError +# source://activesupport//lib/active_support/message_encryptors.rb#6 +class ActiveSupport::MessageEncryptors < ::ActiveSupport::Messages::RotationCoordinator + private + + # source://activesupport//lib/active_support/message_encryptors.rb#135 + def build(salt, secret_generator:, secret_generator_options:, **options); end +end +# = Active Support Message Verifier +# # +MessageVerifier+ makes it easy to generate and verify messages which are # signed to prevent tampering. # +# In a \Rails application, you can use +Rails.application.message_verifier+ +# to manage unique instances of verifiers for each use case. +# {Learn more}[link:classes/Rails/Application.html#method-i-message_verifier]. +# # This is useful for cases like remember-me tokens and auto-unsubscribe links # where the session store isn't suitable or available. # -# Remember Me: -# cookies[:remember_me] = @verifier.generate([@user.id, 2.weeks.from_now]) +# First, generate a signed message: +# cookies[:remember_me] = Rails.application.message_verifier(:remember_me).generate([@user.id, 2.weeks.from_now]) # -# In the authentication filter: +# Later verify that message: # -# id, time = @verifier.verify(cookies[:remember_me]) -# if Time.now < time +# id, time = Rails.application.message_verifier(:remember_me).verify(cookies[:remember_me]) +# if time.future? # self.current_user = User.find(id) # end # -# By default it uses Marshal to serialize the message. If you want to use -# another serialization method, you can set the serializer in the options -# hash upon initialization: -# -# @verifier = ActiveSupport::MessageVerifier.new('s3Krit', serializer: YAML) -# -# +MessageVerifier+ creates HMAC signatures using SHA1 hash algorithm by default. -# If you want to use a different hash algorithm, you can change it by providing -# +:digest+ key as an option while initializing the verifier: +# === Confine messages to a specific purpose # -# @verifier = ActiveSupport::MessageVerifier.new('s3Krit', digest: 'SHA256') +# It's not recommended to use the same verifier for different purposes in your application. +# Doing so could allow a malicious actor to re-use a signed message to perform an unauthorized +# action. +# You can reduce this risk by confining signed messages to a specific +:purpose+. # -# === Confining messages to a specific purpose -# -# By default any message can be used throughout your app. But they can also be -# confined to a specific +:purpose+. -# -# token = @verifier.generate("this is the chair", purpose: :login) +# token = @verifier.generate("signed message", purpose: :login) # # Then that same purpose must be passed when verifying to get the data back out: # -# @verifier.verified(token, purpose: :login) # => "this is the chair" +# @verifier.verified(token, purpose: :login) # => "signed message" # @verifier.verified(token, purpose: :shipping) # => nil # @verifier.verified(token) # => nil # -# @verifier.verify(token, purpose: :login) # => "this is the chair" -# @verifier.verify(token, purpose: :shipping) # => ActiveSupport::MessageVerifier::InvalidSignature -# @verifier.verify(token) # => ActiveSupport::MessageVerifier::InvalidSignature +# @verifier.verify(token, purpose: :login) # => "signed message" +# @verifier.verify(token, purpose: :shipping) # => raises ActiveSupport::MessageVerifier::InvalidSignature +# @verifier.verify(token) # => raises ActiveSupport::MessageVerifier::InvalidSignature # # Likewise, if a message has no purpose it won't be returned when verifying with # a specific purpose. # -# token = @verifier.generate("the conversation is lively") -# @verifier.verified(token, purpose: :scare_tactics) # => nil -# @verifier.verified(token) # => "the conversation is lively" +# token = @verifier.generate("signed message") +# @verifier.verified(token, purpose: :redirect) # => nil +# @verifier.verified(token) # => "signed message" # -# @verifier.verify(token, purpose: :scare_tactics) # => ActiveSupport::MessageVerifier::InvalidSignature -# @verifier.verify(token) # => "the conversation is lively" +# @verifier.verify(token, purpose: :redirect) # => raises ActiveSupport::MessageVerifier::InvalidSignature +# @verifier.verify(token) # => "signed message" # -# === Making messages expire +# === Expiring messages # # By default messages last forever and verifying one year from now will still # return the original value. But messages can be set to expire at a given # time with +:expires_in+ or +:expires_at+. # -# @verifier.generate("parcel", expires_in: 1.month) -# @verifier.generate("doowad", expires_at: Time.now.end_of_year) +# @verifier.generate("signed message", expires_in: 1.month) +# @verifier.generate("signed message", expires_at: Time.now.end_of_year) # -# Then the messages can be verified and returned up to the expire time. +# Messages can then be verified and returned until expiry. # Thereafter, the +verified+ method returns +nil+ while +verify+ raises -# ActiveSupport::MessageVerifier::InvalidSignature. +# +ActiveSupport::MessageVerifier::InvalidSignature+. # # === Rotating keys # @@ -7411,41 +8630,124 @@ ActiveSupport::MessageEncryptor::OpenSSLCipherError = OpenSSL::Cipher::CipherErr # Then gradually rotate the old values out by adding them as fallbacks. Any message # generated with the old values will then work until the rotation is removed. # -# verifier.rotate old_secret # Fallback to an old secret instead of @secret. -# verifier.rotate digest: "SHA256" # Fallback to an old digest instead of SHA512. -# verifier.rotate serializer: Marshal # Fallback to an old serializer instead of JSON. +# verifier.rotate(old_secret) # Fallback to an old secret instead of @secret. +# verifier.rotate(digest: "SHA256") # Fallback to an old digest instead of SHA512. +# verifier.rotate(serializer: Marshal) # Fallback to an old serializer instead of JSON. # # Though the above would most likely be combined into one rotation: # -# verifier.rotate old_secret, digest: "SHA256", serializer: Marshal +# verifier.rotate(old_secret, digest: "SHA256", serializer: Marshal) # -# source://activesupport//lib/active_support/message_verifier.rb#102 -class ActiveSupport::MessageVerifier +# source://activesupport//lib/active_support/message_verifier.rb#98 +class ActiveSupport::MessageVerifier < ::ActiveSupport::Messages::Codec include ::ActiveSupport::Messages::Rotator - include ::ActiveSupport::Messages::Rotator::Verifier + # Initialize a new MessageVerifier with a secret for the signature. + # + # ==== Options + # + # [+:digest+] + # Digest used for signing. The default is "SHA1". See + # +OpenSSL::Digest+ for alternatives. + # + # [+:serializer+] + # The serializer used to serialize message data. You can specify any + # object that responds to +dump+ and +load+, or you can choose from + # several preconfigured serializers: +:marshal+, +:json_allow_marshal+, + # +:json+, +:message_pack_allow_marshal+, +:message_pack+. + # + # The preconfigured serializers include a fallback mechanism to support + # multiple deserialization formats. For example, the +:marshal+ serializer + # will serialize using +Marshal+, but can deserialize using +Marshal+, + # ActiveSupport::JSON, or ActiveSupport::MessagePack. This makes it easy + # to migrate between serializers. + # + # The +:marshal+, +:json_allow_marshal+, and +:message_pack_allow_marshal+ + # serializers support deserializing using +Marshal+, but the others do + # not. Beware that +Marshal+ is a potential vector for deserialization + # attacks in cases where a message signing secret has been leaked. If + # possible, choose a serializer that does not support +Marshal+. + # + # The +:message_pack+ and +:message_pack_allow_marshal+ serializers use + # ActiveSupport::MessagePack, which can roundtrip some Ruby types that are + # not supported by JSON, and may provide improved performance. However, + # these require the +msgpack+ gem. + # + # When using \Rails, the default depends on +config.active_support.message_serializer+. + # Otherwise, the default is +:marshal+. + # + # [+:url_safe+] + # By default, MessageVerifier generates RFC 4648 compliant strings which are + # not URL-safe. In other words, they can contain "+" and "/". If you want to + # generate URL-safe strings (in compliance with "Base 64 Encoding with URL + # and Filename Safe Alphabet" in RFC 4648), you can pass +true+. + # + # [+:force_legacy_metadata_serializer+] + # Whether to use the legacy metadata serializer, which serializes the + # message first, then wraps it in an envelope which is also serialized. This + # was the default in \Rails 7.0 and below. + # + # If you don't pass a truthy value, the default is set using + # +config.active_support.use_message_serializer_for_metadata+. + # # @raise [ArgumentError] # @return [MessageVerifier] a new instance of MessageVerifier # # source://activesupport//lib/active_support/messages/rotator.rb#6 - def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end + def initialize(*args, on_rotation: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/message_verifier.rb#296 + def create_message(value, **options); end # Generates a signed message for the provided value. # # The message is signed with the +MessageVerifier+'s secret. # Returns Base64-encoded message joined with the generated signature. # - # verifier = ActiveSupport::MessageVerifier.new 's3Krit' - # verifier.generate 'a private message' # => "BAhJIhRwcml2YXRlLW1lc3NhZ2UGOgZFVA==--e2d724331ebdee96a10fb99b089508d1c72bd772" + # verifier = ActiveSupport::MessageVerifier.new("secret") + # verifier.generate("signed message") # => "BAhJIhNzaWduZWQgbWVzc2FnZQY6BkVU--f67d5f27c3ee0b8483cebf2103757455e947493b" + # + # ==== Options # - # source://activesupport//lib/active_support/message_verifier.rb#188 - def generate(value, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + # [+:expires_at+] + # The datetime at which the message expires. After this datetime, + # verification of the message will fail. + # + # message = verifier.generate("hello", expires_at: Time.now.tomorrow) + # verifier.verified(message) # => "hello" + # # 24 hours later... + # verifier.verified(message) # => nil + # verifier.verify(message) # => raises ActiveSupport::MessageVerifier::InvalidSignature + # + # [+:expires_in+] + # The duration for which the message is valid. After this duration has + # elapsed, verification of the message will fail. + # + # message = verifier.generate("hello", expires_in: 24.hours) + # verifier.verified(message) # => "hello" + # # 24 hours later... + # verifier.verified(message) # => nil + # verifier.verify(message) # => raises ActiveSupport::MessageVerifier::InvalidSignature + # + # [+:purpose+] + # The purpose of the message. If specified, the same purpose must be + # specified when verifying the message; otherwise, verification will fail. + # (See #verified and #verify.) + # + # source://activesupport//lib/active_support/message_verifier.rb#292 + def generate(value, **options); end + + # source://activesupport//lib/active_support/message_verifier.rb#304 + def inspect; end + + # source://activesupport//lib/active_support/messages/rotator.rb#23 + def read_message(message, on_rotation: T.unsafe(nil), **options); end # Checks if a signed message could have been generated by signing an object # with the +MessageVerifier+'s secret. # - # verifier = ActiveSupport::MessageVerifier.new 's3Krit' - # signed_message = verifier.generate 'a private message' + # verifier = ActiveSupport::MessageVerifier.new("secret") + # signed_message = verifier.generate("signed message") # verifier.valid_message?(signed_message) # => true # # tampered_message = signed_message.chop # editing the message invalidates the signature @@ -7453,19 +8755,19 @@ class ActiveSupport::MessageVerifier # # @return [Boolean] # - # source://activesupport//lib/active_support/message_verifier.rb#126 - def valid_message?(signed_message); end + # source://activesupport//lib/active_support/message_verifier.rb#169 + def valid_message?(message); end # Decodes the signed message using the +MessageVerifier+'s secret. # - # verifier = ActiveSupport::MessageVerifier.new 's3Krit' + # verifier = ActiveSupport::MessageVerifier.new("secret") # - # signed_message = verifier.generate 'a private message' - # verifier.verified(signed_message) # => 'a private message' + # signed_message = verifier.generate("signed message") + # verifier.verified(signed_message) # => "signed message" # # Returns +nil+ if the message was not signed with the same secret. # - # other_verifier = ActiveSupport::MessageVerifier.new 'd1ff3r3nt-s3Krit' + # other_verifier = ActiveSupport::MessageVerifier.new("different_secret") # other_verifier.verified(signed_message) # => nil # # Returns +nil+ if the message is not Base64-encoded. @@ -7478,114 +8780,218 @@ class ActiveSupport::MessageVerifier # incompatible_message = "test--dad7b06c94abba8d46a15fafaef56c327665d5ff" # verifier.verified(incompatible_message) # => TypeError: incompatible marshal file format # - # source://activesupport//lib/active_support/messages/rotator.rb#36 - def verified(*args, on_rotation: T.unsafe(nil), **options); end + # ==== Options + # + # [+:purpose+] + # The purpose that the message was generated with. If the purpose does not + # match, +verified+ will return +nil+. + # + # message = verifier.generate("hello", purpose: "greeting") + # verifier.verified(message, purpose: "greeting") # => "hello" + # verifier.verified(message, purpose: "chatting") # => nil + # verifier.verified(message) # => nil + # + # message = verifier.generate("bye") + # verifier.verified(message) # => "bye" + # verifier.verified(message, purpose: "greeting") # => nil + # + # source://activesupport//lib/active_support/message_verifier.rb#210 + def verified(message, **options); end # Decodes the signed message using the +MessageVerifier+'s secret. # - # verifier = ActiveSupport::MessageVerifier.new 's3Krit' - # signed_message = verifier.generate 'a private message' + # verifier = ActiveSupport::MessageVerifier.new("secret") + # signed_message = verifier.generate("signed message") # - # verifier.verify(signed_message) # => 'a private message' + # verifier.verify(signed_message) # => "signed message" # # Raises +InvalidSignature+ if the message was not signed with the same # secret or was not Base64-encoded. # - # other_verifier = ActiveSupport::MessageVerifier.new 'd1ff3r3nt-s3Krit' + # other_verifier = ActiveSupport::MessageVerifier.new("different_secret") # other_verifier.verify(signed_message) # => ActiveSupport::MessageVerifier::InvalidSignature # - # source://activesupport//lib/active_support/message_verifier.rb#177 - def verify(*args, **options); end + # ==== Options + # + # [+:purpose+] + # The purpose that the message was generated with. If the purpose does not + # match, +verify+ will raise ActiveSupport::MessageVerifier::InvalidSignature. + # + # message = verifier.generate("hello", purpose: "greeting") + # verifier.verify(message, purpose: "greeting") # => "hello" + # verifier.verify(message, purpose: "chatting") # => raises InvalidSignature + # verifier.verify(message) # => raises InvalidSignature + # + # message = verifier.generate("bye") + # verifier.verify(message) # => "bye" + # verifier.verify(message, purpose: "greeting") # => raises InvalidSignature + # + # source://activesupport//lib/active_support/message_verifier.rb#248 + def verify(message, **options); end private - # source://activesupport//lib/active_support/message_verifier.rb#198 - def decode(data); end - - # source://activesupport//lib/active_support/message_verifier.rb#206 + # source://activesupport//lib/active_support/message_verifier.rb#335 def digest_length_in_hex; end # @return [Boolean] # - # source://activesupport//lib/active_support/message_verifier.rb#233 + # source://activesupport//lib/active_support/message_verifier.rb#352 def digest_matches_data?(digest, data); end - # source://activesupport//lib/active_support/message_verifier.rb#194 - def encode(data); end + # source://activesupport//lib/active_support/message_verifier.rb#314 + def extract_encoded(signed); end - # source://activesupport//lib/active_support/message_verifier.rb#202 + # source://activesupport//lib/active_support/message_verifier.rb#331 def generate_digest(data); end - # source://activesupport//lib/active_support/message_verifier.rb#221 - def get_data_and_digest_from(signed_message); end + # @return [Boolean] + # + # source://activesupport//lib/active_support/message_verifier.rb#343 + def separator_at?(signed_message, index); end - # source://activesupport//lib/active_support/message_verifier.rb#214 + # source://activesupport//lib/active_support/message_verifier.rb#347 def separator_index_for(signed_message); end + + # source://activesupport//lib/active_support/message_verifier.rb#309 + def sign_encoded(encoded); end end -# source://activesupport//lib/active_support/message_verifier.rb#105 +# source://activesupport//lib/active_support/message_verifier.rb#101 class ActiveSupport::MessageVerifier::InvalidSignature < ::StandardError; end -# source://activesupport//lib/active_support/message_verifier.rb#107 +# source://activesupport//lib/active_support/message_verifier.rb#103 ActiveSupport::MessageVerifier::SEPARATOR = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/message_verifier.rb#108 +# source://activesupport//lib/active_support/message_verifier.rb#104 ActiveSupport::MessageVerifier::SEPARATOR_LENGTH = T.let(T.unsafe(nil), Integer) -# source://activesupport//lib/active_support/messages/metadata.rb#6 +# source://activesupport//lib/active_support/message_verifiers.rb#6 +class ActiveSupport::MessageVerifiers < ::ActiveSupport::Messages::RotationCoordinator + private + + # source://activesupport//lib/active_support/message_verifiers.rb#131 + def build(salt, secret_generator:, secret_generator_options:, **options); end +end + +# source://activesupport//lib/active_support/messages/rotation_coordinator.rb#6 module ActiveSupport::Messages; end -# source://activesupport//lib/active_support/messages/metadata.rb#7 -class ActiveSupport::Messages::Metadata - # @return [Metadata] a new instance of Metadata +# source://activesupport//lib/active_support/messages/codec.rb#9 +class ActiveSupport::Messages::Codec + include ::ActiveSupport::Messages::Metadata + + # @return [Codec] a new instance of Codec # - # source://activesupport//lib/active_support/messages/metadata.rb#8 - def initialize(message, expires_at = T.unsafe(nil), purpose = T.unsafe(nil)); end + # source://activesupport//lib/active_support/messages/codec.rb#15 + def initialize(**options); end - # source://activesupport//lib/active_support/messages/metadata.rb#13 - def as_json(options = T.unsafe(nil)); end + private + + # source://activesupport//lib/active_support/messages/codec.rb#45 + def catch_and_ignore(throwable, &block); end + + # source://activesupport//lib/active_support/messages/codec.rb#52 + def catch_and_raise(throwable, as: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/messages/codec.rb#29 + def decode(encoded, url_safe: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/messages/codec.rb#39 + def deserialize(serialized); end + + # source://activesupport//lib/active_support/messages/codec.rb#25 + def encode(data, url_safe: T.unsafe(nil)); end - # source://activesupport//lib/active_support/messages/metadata.rb#58 - def verify(purpose); end + # source://activesupport//lib/active_support/messages/codec.rb#35 + def serialize(data); end + + # Returns the value of attribute serializer. + # + # source://activesupport//lib/active_support/messages/codec.rb#23 + def serializer; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/codec.rb#60 + def use_message_serializer_for_metadata?; end + + class << self + # source://activesupport//lib/active_support/messages/codec.rb#12 + def default_serializer; end + # source://activesupport//lib/active_support/messages/codec.rb#12 + def default_serializer=(value); end + end +end + +# source://activesupport//lib/active_support/messages/metadata.rb#9 +module ActiveSupport::Messages::Metadata private + # source://activesupport//lib/active_support/messages/metadata.rb#128 + def deserialize_from_json(serialized); end + + # source://activesupport//lib/active_support/messages/metadata.rb#141 + def deserialize_from_json_safe_string(string); end + + # source://activesupport//lib/active_support/messages/metadata.rb#43 + def deserialize_with_metadata(message, **expected_metadata); end + # @return [Boolean] # - # source://activesupport//lib/active_support/messages/metadata.rb#67 - def fresh?; end + # source://activesupport//lib/active_support/messages/metadata.rb#96 + def dual_serialized_metadata_envelope_json?(string); end + + # source://activesupport//lib/active_support/messages/metadata.rb#78 + def extract_from_metadata_envelope(envelope, purpose: T.unsafe(nil)); end # @return [Boolean] # - # source://activesupport//lib/active_support/messages/metadata.rb#63 - def match?(purpose); end + # source://activesupport//lib/active_support/messages/metadata.rb#92 + def metadata_envelope?(object); end - # source://activesupport//lib/active_support/messages/metadata.rb#71 - def parse_expires_at(expires_at); end + # source://activesupport//lib/active_support/messages/metadata.rb#114 + def parse_expiry(expires_at); end - class << self - # source://activesupport//lib/active_support/messages/metadata.rb#26 - def verify(message, purpose); end + # source://activesupport//lib/active_support/messages/metadata.rb#100 + def pick_expiry(expires_at, expires_in); end - # source://activesupport//lib/active_support/messages/metadata.rb#18 - def wrap(message, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + # source://activesupport//lib/active_support/messages/metadata.rb#124 + def serialize_to_json(data); end - private + # source://activesupport//lib/active_support/messages/metadata.rb#137 + def serialize_to_json_safe_string(data); end + + # source://activesupport//lib/active_support/messages/metadata.rb#30 + def serialize_with_metadata(data, **metadata); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/metadata.rb#60 + def use_message_serializer_for_metadata?; end - # source://activesupport//lib/active_support/messages/metadata.rb#53 - def decode(message); end + # source://activesupport//lib/active_support/messages/metadata.rb#64 + def wrap_in_metadata_envelope(hash, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end - # source://activesupport//lib/active_support/messages/metadata.rb#49 - def encode(message); end + # source://activesupport//lib/active_support/messages/metadata.rb#71 + def wrap_in_metadata_legacy_envelope(hash, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end - # source://activesupport//lib/active_support/messages/metadata.rb#39 - def extract_metadata(message); end + class << self + # source://activesupport//lib/active_support/messages/metadata.rb#10 + def use_message_serializer_for_metadata; end - # source://activesupport//lib/active_support/messages/metadata.rb#31 - def pick_expiry(expires_at, expires_in); end + # source://activesupport//lib/active_support/messages/metadata.rb#10 + def use_message_serializer_for_metadata=(_arg0); end end end +# source://activesupport//lib/active_support/messages/metadata.rb#12 +ActiveSupport::Messages::Metadata::ENVELOPE_SERIALIZERS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/messages/metadata.rb#19 +ActiveSupport::Messages::Metadata::TIMESTAMP_SERIALIZERS = T.let(T.unsafe(nil), Array) + # source://activesupport//lib/active_support/messages/rotation_configuration.rb#5 class ActiveSupport::Messages::RotationConfiguration # @return [RotationConfiguration] a new instance of RotationConfiguration @@ -7607,46 +9013,223 @@ class ActiveSupport::Messages::RotationConfiguration def signed; end end +# source://activesupport//lib/active_support/messages/rotation_coordinator.rb#7 +class ActiveSupport::Messages::RotationCoordinator + # @raise [ArgumentError] + # @return [RotationCoordinator] a new instance of RotationCoordinator + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#10 + def initialize(&secret_generator); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#18 + def [](salt); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#22 + def []=(salt, codec); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#39 + def clear_rotations; end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#45 + def on_rotation(&callback); end + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#26 + def rotate(**options, &block); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#35 + def rotate_defaults; end + + # Returns the value of attribute transitional. + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#8 + def transitional; end + + # Sets the attribute transitional + # + # @param value the value to set the attribute transitional to. + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#8 + def transitional=(_arg0); end + + private + + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#88 + def build(salt, secret_generator:, secret_generator_options:, **options); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#76 + def build_with_rotations(salt); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#51 + def changing_configuration!; end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#62 + def normalize_options(options); end +end + # source://activesupport//lib/active_support/messages/rotator.rb#5 module ActiveSupport::Messages::Rotator # source://activesupport//lib/active_support/messages/rotator.rb#6 - def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end + def initialize(*args, on_rotation: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/messages/rotator.rb#18 + def fall_back_to(fallback); end + + # source://activesupport//lib/active_support/messages/rotator.rb#23 + def read_message(message, on_rotation: T.unsafe(nil), **options); end # source://activesupport//lib/active_support/messages/rotator.rb#14 - def rotate(*secrets, **options); end + def rotate(*args, **options); end private - # source://activesupport//lib/active_support/messages/rotator.rb#47 - def run_rotations(on_rotation); end + # source://activesupport//lib/active_support/messages/rotator.rb#44 + def build_rotation(*args, **options); end + + # source://activesupport//lib/active_support/messages/rotator.rb#48 + def catch_rotation_error(&block); end end -# source://activesupport//lib/active_support/messages/rotator.rb#18 -module ActiveSupport::Messages::Rotator::Encryptor - include ::ActiveSupport::Messages::Rotator +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#8 +module ActiveSupport::Messages::SerializerWithFallback + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#17 + def load(dumped); end + + private + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#33 + def detect_format(dumped); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#44 + def fallback?(format); end - # source://activesupport//lib/active_support/messages/rotator.rb#21 - def decrypt_and_verify(*args, on_rotation: T.unsafe(nil), **options); end + class << self + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#9 + def [](format); end + end +end +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#48 +module ActiveSupport::Messages::SerializerWithFallback::AllowMarshal private - # source://activesupport//lib/active_support/messages/rotator.rb#28 - def build_rotation(secret = T.unsafe(nil), sign_secret = T.unsafe(nil), options); end + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#50 + def fallback?(format); end end -# source://activesupport//lib/active_support/messages/rotator.rb#33 -module ActiveSupport::Messages::Rotator::Verifier - include ::ActiveSupport::Messages::Rotator +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#78 +module ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#90 + def _load(dumped); end - # source://activesupport//lib/active_support/messages/rotator.rb#36 - def verified(*args, on_rotation: T.unsafe(nil), **options); end + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#86 + def dump(object); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#96 + def dumped?(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#82 + def format; end private - # source://activesupport//lib/active_support/messages/rotator.rb#41 - def build_rotation(secret = T.unsafe(nil), options); end + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#101 + def detect_format(dumped); end +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#94 +ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback::JSON_START_WITH = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#107 +module ActiveSupport::Messages::SerializerWithFallback::JsonWithFallbackAllowMarshal + include ::ActiveSupport::Messages::SerializerWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal + extend ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal + extend ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallbackAllowMarshal +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#55 +module ActiveSupport::Messages::SerializerWithFallback::MarshalWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::MarshalWithFallback + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#67 + def _load(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#63 + def dump(object); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#73 + def dumped?(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#59 + def format; end +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#71 +ActiveSupport::Messages::SerializerWithFallback::MarshalWithFallback::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#113 +module ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#125 + def _load(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#121 + def dump(object); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#129 + def dumped?(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#117 + def format; end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#134 + def available?; end +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#143 +module ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallbackAllowMarshal + include ::ActiveSupport::Messages::SerializerWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal + extend ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal + extend ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallbackAllowMarshal end +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#149 +ActiveSupport::Messages::SerializerWithFallback::SERIALIZERS = T.let(T.unsafe(nil), Hash) + # source://activesupport//lib/active_support/multibyte.rb#4 module ActiveSupport::Multibyte class << self @@ -7667,6 +9250,8 @@ module ActiveSupport::Multibyte end end +# = Active Support \Multibyte \Chars +# # Chars enables you to work transparently with UTF-8 encoding in the Ruby # String class without having extensive knowledge about the encoding. A # Chars object accepts a string upon initialization and proxies String @@ -7703,7 +9288,7 @@ end # # ActiveSupport::Multibyte.proxy_class = CharsForUTF32 # -# source://activesupport//lib/active_support/multibyte/chars.rb#45 +# source://activesupport//lib/active_support/multibyte/chars.rb#47 class ActiveSupport::Multibyte::Chars include ::Comparable @@ -7711,19 +9296,19 @@ class ActiveSupport::Multibyte::Chars # # @return [Chars] a new instance of Chars # - # source://activesupport//lib/active_support/multibyte/chars.rb#54 + # source://activesupport//lib/active_support/multibyte/chars.rb#56 def initialize(string); end - # source://activesupport//lib/active_support/multibyte/chars.rb#51 + # source://activesupport//lib/active_support/multibyte/chars.rb#53 def <=>(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/multibyte/chars.rb#51 + # source://activesupport//lib/active_support/multibyte/chars.rb#53 def =~(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/multibyte/chars.rb#51 + # source://activesupport//lib/active_support/multibyte/chars.rb#53 def acts_like_string?(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/multibyte/chars.rb#159 + # source://activesupport//lib/active_support/multibyte/chars.rb#161 def as_json(options = T.unsafe(nil)); end # Performs composition on all the characters. @@ -7731,7 +9316,7 @@ class ActiveSupport::Multibyte::Chars # 'é'.length # => 1 # 'é'.mb_chars.compose.to_s.length # => 1 # - # source://activesupport//lib/active_support/multibyte/chars.rb#138 + # source://activesupport//lib/active_support/multibyte/chars.rb#140 def compose; end # Performs canonical decomposition on all the characters. @@ -7739,7 +9324,7 @@ class ActiveSupport::Multibyte::Chars # 'é'.length # => 1 # 'é'.mb_chars.decompose.to_s.length # => 2 # - # source://activesupport//lib/active_support/multibyte/chars.rb#130 + # source://activesupport//lib/active_support/multibyte/chars.rb#132 def decompose; end # Returns the number of grapheme clusters in the string. @@ -7747,7 +9332,7 @@ class ActiveSupport::Multibyte::Chars # 'क्षि'.mb_chars.length # => 4 # 'क्षि'.mb_chars.grapheme_length # => 2 # - # source://activesupport//lib/active_support/multibyte/chars.rb#146 + # source://activesupport//lib/active_support/multibyte/chars.rb#148 def grapheme_length; end # Limits the byte size of the string to a number of bytes without breaking @@ -7756,25 +9341,25 @@ class ActiveSupport::Multibyte::Chars # # 'こんにちは'.mb_chars.limit(7).to_s # => "こん" # - # source://activesupport//lib/active_support/multibyte/chars.rb#113 + # source://activesupport//lib/active_support/multibyte/chars.rb#115 def limit(limit); end - # source://activesupport//lib/active_support/multibyte/chars.rb#51 + # source://activesupport//lib/active_support/multibyte/chars.rb#53 def match?(*_arg0, **_arg1, &_arg2); end # Forward all undefined methods to the wrapped string. # - # source://activesupport//lib/active_support/multibyte/chars.rb#60 + # source://activesupport//lib/active_support/multibyte/chars.rb#62 def method_missing(method, *args, &block); end # Reverses all characters in the string. # # 'Café'.mb_chars.reverse.to_s # => 'éfaC' # - # source://activesupport//lib/active_support/multibyte/chars.rb#104 + # source://activesupport//lib/active_support/multibyte/chars.rb#106 def reverse; end - # source://activesupport//lib/active_support/multibyte/chars.rb#164 + # source://activesupport//lib/active_support/multibyte/chars.rb#166 def reverse!(*args); end # Works like String#slice!, but returns an instance of @@ -7787,7 +9372,7 @@ class ActiveSupport::Multibyte::Chars # string.mb_chars.slice!(0..3) # => # # string # => 'me' # - # source://activesupport//lib/active_support/multibyte/chars.rb#94 + # source://activesupport//lib/active_support/multibyte/chars.rb#96 def slice!(*args); end # Works just like String#split, with the exception that the items @@ -7796,7 +9381,7 @@ class ActiveSupport::Multibyte::Chars # # 'Café périferôl'.mb_chars.split(/é/).map { |part| part.upcase.to_s } # => ["CAF", " P", "RIFERÔL"] # - # source://activesupport//lib/active_support/multibyte/chars.rb#81 + # source://activesupport//lib/active_support/multibyte/chars.rb#83 def split(*args); end # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent @@ -7805,10 +9390,10 @@ class ActiveSupport::Multibyte::Chars # Passing +true+ will forcibly tidy all bytes, assuming that the string's # encoding is entirely CP1252 or ISO-8859-1. # - # source://activesupport//lib/active_support/multibyte/chars.rb#155 + # source://activesupport//lib/active_support/multibyte/chars.rb#157 def tidy_bytes(force = T.unsafe(nil)); end - # source://activesupport//lib/active_support/multibyte/chars.rb#164 + # source://activesupport//lib/active_support/multibyte/chars.rb#166 def tidy_bytes!(*args); end # Capitalizes the first letter of every word, when possible. @@ -7816,7 +9401,7 @@ class ActiveSupport::Multibyte::Chars # "ÉL QUE SE ENTERÓ".mb_chars.titleize.to_s # => "Él Que Se Enteró" # "日本語".mb_chars.titleize.to_s # => "日本語" # - # source://activesupport//lib/active_support/multibyte/chars.rb#121 + # source://activesupport//lib/active_support/multibyte/chars.rb#123 def titlecase; end # Capitalizes the first letter of every word, when possible. @@ -7824,27 +9409,27 @@ class ActiveSupport::Multibyte::Chars # "ÉL QUE SE ENTERÓ".mb_chars.titleize.to_s # => "Él Que Se Enteró" # "日本語".mb_chars.titleize.to_s # => "日本語" # - # source://activesupport//lib/active_support/multibyte/chars.rb#121 + # source://activesupport//lib/active_support/multibyte/chars.rb#123 def titleize; end # Returns the value of attribute wrapped_string. # - # source://activesupport//lib/active_support/multibyte/chars.rb#47 + # source://activesupport//lib/active_support/multibyte/chars.rb#49 def to_s; end # Returns the value of attribute wrapped_string. # - # source://activesupport//lib/active_support/multibyte/chars.rb#47 + # source://activesupport//lib/active_support/multibyte/chars.rb#49 def to_str; end # Returns the value of attribute wrapped_string. # - # source://activesupport//lib/active_support/multibyte/chars.rb#47 + # source://activesupport//lib/active_support/multibyte/chars.rb#49 def wrapped_string; end private - # source://activesupport//lib/active_support/multibyte/chars.rb#171 + # source://activesupport//lib/active_support/multibyte/chars.rb#173 def chars(string); end # Returns +true+ if _obj_ responds to the given method. Private methods @@ -7853,7 +9438,7 @@ class ActiveSupport::Multibyte::Chars # # @return [Boolean] # - # source://activesupport//lib/active_support/multibyte/chars.rb#72 + # source://activesupport//lib/active_support/multibyte/chars.rb#74 def respond_to_missing?(method, include_private); end end @@ -7877,12 +9462,12 @@ module ActiveSupport::Multibyte::Unicode # Passing +true+ will forcibly tidy all bytes, assuming that the string's # encoding is entirely CP1252 or ISO-8859-1. # - # source://activesupport//lib/active_support/multibyte/unicode.rb#32 + # source://activesupport//lib/active_support/multibyte/unicode.rb#30 def tidy_bytes(string, force = T.unsafe(nil)); end private - # source://activesupport//lib/active_support/multibyte/unicode.rb#65 + # source://activesupport//lib/active_support/multibyte/unicode.rb#37 def recode_windows1252_chars(string); end end @@ -7893,7 +9478,7 @@ ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String # = \Notifications # -# ActiveSupport::Notifications provides an instrumentation API for +# +ActiveSupport::Notifications+ provides an instrumentation API for # Ruby. # # == Instrumenters @@ -8076,7 +9661,7 @@ ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String # Notifications ships with a queue implementation that consumes and publishes events # to all log subscribers. You can use any queue implementation you want. # -# source://activesupport//lib/active_support/notifications/instrumenter.rb#6 +# source://activesupport//lib/active_support/notifications/instrumenter.rb#7 module ActiveSupport::Notifications class << self # source://activesupport//lib/active_support/notifications.rb#204 @@ -8160,31 +9745,26 @@ module ActiveSupport::Notifications end end -# source://activesupport//lib/active_support/notifications/instrumenter.rb#58 +# source://activesupport//lib/active_support/notifications/instrumenter.rb#106 class ActiveSupport::Notifications::Event # @return [Event] a new instance of Event # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#62 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#110 def initialize(name, start, ending, transaction_id, payload); end - # source://activesupport//lib/active_support/notifications/instrumenter.rb#136 - def <<(event); end - - # Returns the number of allocations made since the call to +start!+ and - # the call to +finish!+ + # Returns the number of allocations made between the call to #start! and + # the call to #finish!. # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#116 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#164 def allocations; end - # Returns the value of attribute children. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#168 def children; end - # Returns the CPU time (in milliseconds) passed since the call to - # +start!+ and the call to +finish!+ + # Returns the CPU time (in milliseconds) passed between the call to + # #start! and the call to #finish!. # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#104 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#151 def cpu_time; end # Returns the difference in milliseconds between when the execution of the @@ -8200,76 +9780,76 @@ class ActiveSupport::Notifications::Event # # @event.duration # => 1000.138 # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#132 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#197 def duration; end # Returns the value of attribute end. # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#107 def end; end # Record information at the time this event finishes # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#96 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#143 def finish!; end - # Returns the idle time time (in milliseconds) passed since the call to - # +start!+ and the call to +finish!+ + # Returns the idle time time (in milliseconds) passed between the call to + # #start! and the call to #finish!. # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#110 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#157 def idle_time; end # Returns the value of attribute name. # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#107 def name; end # @return [Boolean] # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#140 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#176 def parent_of?(event); end # Returns the value of attribute payload. # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#60 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#108 def payload; end # Sets the attribute payload # # @param value the value to set the attribute payload to. # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#60 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#108 def payload=(_arg0); end - # source://activesupport//lib/active_support/notifications/instrumenter.rb#75 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#122 def record; end # Record information at the time this event starts # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#89 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#136 def start!; end # Returns the value of attribute time. # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#107 def time; end # Returns the value of attribute transaction_id. # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#107 def transaction_id; end private - # source://activesupport//lib/active_support/notifications/instrumenter.rb#145 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#202 def now; end # Likely on JRuby, TruffleRuby # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#162 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#219 def now_allocations; end - # source://activesupport//lib/active_support/notifications/instrumenter.rb#152 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#209 def now_cpu; end end @@ -8278,183 +9858,299 @@ end # # This class is thread safe. All methods are reentrant. # -# source://activesupport//lib/active_support/notifications/fanout.rb#24 +# source://activesupport//lib/active_support/notifications/fanout.rb#51 class ActiveSupport::Notifications::Fanout include ::Mutex_m + include ::ActiveSupport::Notifications::FanoutIteration # @return [Fanout] a new instance of Fanout # - # source://activesupport//lib/active_support/notifications/fanout.rb#27 + # source://activesupport//lib/active_support/notifications/fanout.rb#54 def initialize; end - # source://activesupport//lib/active_support/notifications/fanout.rb#75 + # source://activesupport//lib/active_support/notifications/fanout.rb#301 + def all_listeners_for(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#276 + def build_handle(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#105 + def clear_cache(key = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#287 def finish(name, id, payload, listeners = T.unsafe(nil)); end - # source://activesupport//lib/active_support/notifications/fanout.rb#87 - def iterate_guarding_exceptions(listeners); end + # source://activesupport//lib/active_support/notifications/fanout.rb#191 + def groups_for(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#63 + def inspect; end - # source://activesupport//lib/active_support/notifications/fanout.rb#108 + # source://activesupport//lib/active_support/notifications/fanout.rb#310 def listeners_for(name); end # @return [Boolean] # - # source://activesupport//lib/active_support/notifications/fanout.rb#117 + # source://activesupport//lib/active_support/notifications/fanout.rb#314 def listening?(name); end - # source://mutex_m/0.1.2/mutex_m.rb#93 + # source://mutex_m/0.2.0/lib/mutex_m.rb#91 def lock; end - # source://mutex_m/0.1.2/mutex_m.rb#83 + # source://mutex_m/0.2.0/lib/mutex_m.rb#81 def locked?; end - # source://activesupport//lib/active_support/notifications/fanout.rb#79 + # source://activesupport//lib/active_support/notifications/fanout.rb#293 def publish(name, *args); end - # source://activesupport//lib/active_support/notifications/fanout.rb#83 + # source://activesupport//lib/active_support/notifications/fanout.rb#297 def publish_event(event); end - # source://activesupport//lib/active_support/notifications/fanout.rb#71 + # source://activesupport//lib/active_support/notifications/fanout.rb#280 def start(name, id, payload); end - # source://activesupport//lib/active_support/notifications/fanout.rb#34 + # 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.1.2/mutex_m.rb#78 + # source://mutex_m/0.2.0/lib/mutex_m.rb#76 def synchronize(&block); end - # source://mutex_m/0.1.2/mutex_m.rb#88 + # source://mutex_m/0.2.0/lib/mutex_m.rb#86 def try_lock; end - # source://mutex_m/0.1.2/mutex_m.rb#98 + # source://mutex_m/0.2.0/lib/mutex_m.rb#96 def unlock; end - # source://activesupport//lib/active_support/notifications/fanout.rb#51 + # source://activesupport//lib/active_support/notifications/fanout.rb#85 def unsubscribe(subscriber_or_name); end # This is a sync queue, so there is no waiting. # - # source://activesupport//lib/active_support/notifications/fanout.rb#122 + # source://activesupport//lib/active_support/notifications/fanout.rb#319 def wait; end end -# source://activesupport//lib/active_support/notifications/fanout.rb#125 -module ActiveSupport::Notifications::Fanout::Subscribers - class << self - # source://activesupport//lib/active_support/notifications/fanout.rb#126 - def new(pattern, listener, monotonic); end - end +# source://activesupport//lib/active_support/notifications/fanout.rb#117 +class ActiveSupport::Notifications::Fanout::BaseGroup + include ::ActiveSupport::Notifications::FanoutIteration + + # @return [BaseGroup] a new instance of BaseGroup + # + # source://activesupport//lib/active_support/notifications/fanout.rb#120 + def initialize(listeners, name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#124 + def each(&block); end end -# source://activesupport//lib/active_support/notifications/fanout.rb#257 -class ActiveSupport::Notifications::Fanout::Subscribers::EventObject < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented - # source://activesupport//lib/active_support/notifications/fanout.rb#265 +# source://activesupport//lib/active_support/notifications/fanout.rb#129 +class ActiveSupport::Notifications::Fanout::BaseTimeGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup + # source://activesupport//lib/active_support/notifications/fanout.rb#134 def finish(name, id, payload); end - # source://activesupport//lib/active_support/notifications/fanout.rb#273 - def publish_event(event); end + # source://activesupport//lib/active_support/notifications/fanout.rb#130 + def start(name, id, payload); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#170 +class ActiveSupport::Notifications::Fanout::EventObjectGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup + # source://activesupport//lib/active_support/notifications/fanout.rb#176 + def finish(name, id, payload); end - # source://activesupport//lib/active_support/notifications/fanout.rb#258 + # source://activesupport//lib/active_support/notifications/fanout.rb#171 def start(name, id, payload); end private - # source://activesupport//lib/active_support/notifications/fanout.rb#278 + # source://activesupport//lib/active_support/notifications/fanout.rb#186 def build_event(name, id, payload); end end -# source://activesupport//lib/active_support/notifications/fanout.rb#182 +# source://activesupport//lib/active_support/notifications/fanout.rb#156 +class ActiveSupport::Notifications::Fanout::EventedGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup + # source://activesupport//lib/active_support/notifications/fanout.rb#163 + def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#157 + def start(name, id, payload); end +end + +# A +Handle+ is used to record the start and finish time of event. +# +# Both #start and #finish must each be called exactly once. +# +# Where possible, it's best to use the block form: ActiveSupport::Notifications.instrument. +# +Handle+ is a low-level API intended for cases where the block form can't be used. +# +# handle = ActiveSupport::Notifications.instrumenter.build_handle("my.event", {}) +# begin +# handle.start +# # work to be instrumented +# ensure +# handle.finish +# end +# +# source://activesupport//lib/active_support/notifications/fanout.rb#231 +class ActiveSupport::Notifications::Fanout::Handle + include ::ActiveSupport::Notifications::FanoutIteration + + # @return [Handle] a new instance of Handle + # + # source://activesupport//lib/active_support/notifications/fanout.rb#234 + def initialize(notifier, name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#253 + def finish; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#257 + def finish_with_values(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#244 + def start; end + + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#267 + def ensure_state!(expected); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#142 +class ActiveSupport::Notifications::Fanout::MonotonicTimedGroup < ::ActiveSupport::Notifications::Fanout::BaseTimeGroup + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#144 + def now; end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#322 +module ActiveSupport::Notifications::Fanout::Subscribers + class << self + # source://activesupport//lib/active_support/notifications/fanout.rb#323 + def new(pattern, listener, monotonic); end + end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#437 +class ActiveSupport::Notifications::Fanout::Subscribers::EventObject < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented + # source://activesupport//lib/active_support/notifications/fanout.rb#438 + def group_class; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#442 + def publish_event(event); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#379 class ActiveSupport::Notifications::Fanout::Subscribers::Evented # @return [Evented] a new instance of Evented # - # source://activesupport//lib/active_support/notifications/fanout.rb#185 + # source://activesupport//lib/active_support/notifications/fanout.rb#382 def initialize(pattern, delegate); end - # source://activesupport//lib/active_support/notifications/fanout.rb#210 - def finish(name, id, payload); end + # Returns the value of attribute delegate. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#380 + def delegate; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#390 + def group_class; end # Returns the value of attribute pattern. # - # source://activesupport//lib/active_support/notifications/fanout.rb#183 + # source://activesupport//lib/active_support/notifications/fanout.rb#380 def pattern; end - # source://activesupport//lib/active_support/notifications/fanout.rb#192 + # source://activesupport//lib/active_support/notifications/fanout.rb#394 def publish(name, *args); end - # source://activesupport//lib/active_support/notifications/fanout.rb#198 + # source://activesupport//lib/active_support/notifications/fanout.rb#400 def publish_event(event); end - # source://activesupport//lib/active_support/notifications/fanout.rb#206 - def start(name, id, payload); end + # Returns the value of attribute silenceable. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#380 + def silenceable; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/fanout.rb#408 + def silenced?(name); end # @return [Boolean] # - # source://activesupport//lib/active_support/notifications/fanout.rb#214 + # source://activesupport//lib/active_support/notifications/fanout.rb#412 def subscribed_to?(name); end - # source://activesupport//lib/active_support/notifications/fanout.rb#218 + # source://activesupport//lib/active_support/notifications/fanout.rb#416 def unsubscribe!(name); end end -# source://activesupport//lib/active_support/notifications/fanout.rb#145 +# source://activesupport//lib/active_support/notifications/fanout.rb#342 class ActiveSupport::Notifications::Fanout::Subscribers::Matcher # @return [Matcher] a new instance of Matcher # - # source://activesupport//lib/active_support/notifications/fanout.rb#158 + # source://activesupport//lib/active_support/notifications/fanout.rb#355 def initialize(pattern); end - # source://activesupport//lib/active_support/notifications/fanout.rb#167 + # source://activesupport//lib/active_support/notifications/fanout.rb#364 def ===(name); end # Returns the value of attribute exclusions. # - # source://activesupport//lib/active_support/notifications/fanout.rb#146 + # source://activesupport//lib/active_support/notifications/fanout.rb#343 def exclusions; end # Returns the value of attribute pattern. # - # source://activesupport//lib/active_support/notifications/fanout.rb#146 + # source://activesupport//lib/active_support/notifications/fanout.rb#343 def pattern; end - # source://activesupport//lib/active_support/notifications/fanout.rb#163 + # source://activesupport//lib/active_support/notifications/fanout.rb#360 def unsubscribe!(name); end class << self - # source://activesupport//lib/active_support/notifications/fanout.rb#148 + # source://activesupport//lib/active_support/notifications/fanout.rb#345 def wrap(pattern); end end end -# source://activesupport//lib/active_support/notifications/fanout.rb#171 +# source://activesupport//lib/active_support/notifications/fanout.rb#368 class ActiveSupport::Notifications::Fanout::Subscribers::Matcher::AllMessages - # source://activesupport//lib/active_support/notifications/fanout.rb#172 + # source://activesupport//lib/active_support/notifications/fanout.rb#369 def ===(name); end - # source://activesupport//lib/active_support/notifications/fanout.rb#176 + # source://activesupport//lib/active_support/notifications/fanout.rb#373 def unsubscribe!(*_arg0); end end -# source://activesupport//lib/active_support/notifications/fanout.rb#240 -class ActiveSupport::Notifications::Fanout::Subscribers::MonotonicTimed < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented - # source://activesupport//lib/active_support/notifications/fanout.rb#250 - def finish(name, id, payload); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#241 - def publish(name, *args); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#245 - def start(name, id, payload); end +# source://activesupport//lib/active_support/notifications/fanout.rb#431 +class ActiveSupport::Notifications::Fanout::Subscribers::MonotonicTimed < ::ActiveSupport::Notifications::Fanout::Subscribers::Timed + # source://activesupport//lib/active_support/notifications/fanout.rb#432 + def group_class; end end -# source://activesupport//lib/active_support/notifications/fanout.rb#223 +# source://activesupport//lib/active_support/notifications/fanout.rb#421 class ActiveSupport::Notifications::Fanout::Subscribers::Timed < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented - # source://activesupport//lib/active_support/notifications/fanout.rb#233 - def finish(name, id, payload); end + # source://activesupport//lib/active_support/notifications/fanout.rb#422 + def group_class; end - # source://activesupport//lib/active_support/notifications/fanout.rb#224 + # source://activesupport//lib/active_support/notifications/fanout.rb#426 def publish(name, *args); end +end - # source://activesupport//lib/active_support/notifications/fanout.rb#228 - def start(name, id, payload); end +# source://activesupport//lib/active_support/notifications/fanout.rb#149 +class ActiveSupport::Notifications::Fanout::TimedGroup < ::ActiveSupport::Notifications::Fanout::BaseTimeGroup + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#151 + def now; end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#20 +module ActiveSupport::Notifications::FanoutIteration + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#22 + def iterate_guarding_exceptions(collection); end end # source://activesupport//lib/active_support/notifications/fanout.rb#10 @@ -8472,24 +10168,38 @@ end # Instrumenters are stored in a thread local. # -# source://activesupport//lib/active_support/notifications/instrumenter.rb#8 +# source://activesupport//lib/active_support/notifications/instrumenter.rb#9 class ActiveSupport::Notifications::Instrumenter # @return [Instrumenter] a new instance of Instrumenter # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#11 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#12 def initialize(notifier); end + # Returns a "handle" for an event with the given +name+ and +payload+. + # + # #start and #finish must each be called exactly once on the returned object. + # + # Where possible, it's best to use #instrument, which will record the + # start and finish of the event and correctly handle any exceptions. + # +build_handle+ is a low-level API intended for cases where using + # +instrument+ isn't possible. + # + # See ActiveSupport::Notifications::Fanout::Handle. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#78 + def build_handle(name, payload); end + # Send a finish notification with +name+ and +payload+. # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#44 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#92 def finish(name, payload); end - # source://activesupport//lib/active_support/notifications/instrumenter.rb#48 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#96 def finish_with_state(listeners_state, name, payload); end # Returns the value of attribute id. # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#9 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#10 def id; end # Given a block, instrument it by measuring the time taken to execute @@ -8497,495 +10207,578 @@ class ActiveSupport::Notifications::Instrumenter # notifier. Notice that events get sent even if an error occurs in the # passed-in block. # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#20 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#54 def instrument(name, payload = T.unsafe(nil)); end - # source://activesupport//lib/active_support/notifications/instrumenter.rb#34 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#82 def new_event(name, payload = T.unsafe(nil)); end # Send a start notification with +name+ and +payload+. # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#39 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#87 def start(name, payload); end private - # source://activesupport//lib/active_support/notifications/instrumenter.rb#53 + # source://activesupport//lib/active_support/notifications/instrumenter.rb#101 def unique_id; end end +# source://activesupport//lib/active_support/notifications/instrumenter.rb#21 +class ActiveSupport::Notifications::Instrumenter::LegacyHandle + # @return [LegacyHandle] a new instance of LegacyHandle + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#34 + def initialize(notifier, name, id, payload); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#45 + def finish; end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#41 + def start; end +end + +# source://activesupport//lib/active_support/notifications/instrumenter.rb#22 +class ActiveSupport::Notifications::Instrumenter::LegacyHandle::Wrapper + # @return [Wrapper] a new instance of Wrapper + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#23 + def initialize(notifier); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#27 + def build_handle(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#31 + def finish(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#31 + def start(*_arg0, **_arg1, &_arg2); end +end + # source://activesupport//lib/active_support/number_helper.rb#4 module ActiveSupport::NumberHelper extend ::ActiveSupport::Autoload extend ::ActiveSupport::NumberHelper - # Formats a +number+ into a currency string (e.g., $13.65). You - # can customize the format in the +options+ hash. + # Formats a +number+ into a currency string. + # + # number_to_currency(1234567890.50) # => "$1,234,567,890.50" + # number_to_currency(1234567890.506) # => "$1,234,567,890.51" + # number_to_currency("12x34") # => "$12x34" + # + # number_to_currency(1234567890.50, unit: "£", separator: ",", delimiter: "") + # # => "£1234567890,50" + # + # The currency unit and number formatting of the current locale will be used + # unless otherwise specified via options. No currency conversion is + # performed. If the user is given a way to change their locale, they will + # also be able to change the relative value of the currency displayed with + # this helper. If your application will ever support multiple locales, you + # may want to specify a constant +:locale+ option or consider using a + # library capable of currency conversion. + # + # ==== Options + # + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. + # + # number_to_currency(1234567890.506, locale: :fr) + # # => "1 234 567 890,51 €" + # + # [+:precision+] + # The level of precision. Defaults to 2. + # + # number_to_currency(1234567890.123, precision: 3) # => "$1,234,567,890.123" + # number_to_currency(0.456789, precision: 0) # => "$0" + # + # [+:round_mode+] + # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to + # +:default+. + # + # number_to_currency(1234567890.01, precision: 0, round_mode: :up) + # # => "$1,234,567,891" + # + # [+:unit+] + # The denomination of the currency. Defaults to "$". + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # [+:format+] + # The format for non-negative numbers. %u represents the currency, + # and %n represents the number. Defaults to "%u%n". + # + # number_to_currency(1234567890.50, format: "%n %u") + # # => "1,234,567,890.50 $" + # + # [+:negative_format+] + # The format for negative numbers. %u and %n behave the + # same as in +:format+, but %n represents the absolute value of + # the number. Defaults to the value of +:format+ prepended with -. + # + # number_to_currency(-1234567890.50, negative_format: "(%u%n)") + # # => "($1,234,567,890.50)" + # + # [+:strip_insignificant_zeros+] + # Whether to remove insignificant zeros after the decimal separator. + # Defaults to false. + # + # number_to_currency(1234567890.50, strip_insignificant_zeros: true) + # # => "$1,234,567,890.5" + # + # source://activesupport//lib/active_support/number_helper.rb#139 + def number_to_currency(number, options = T.unsafe(nil)); end + + # Formats +number+ by grouping thousands with a delimiter. + # + # number_to_delimited(12345678) # => "12,345,678" + # number_to_delimited("123456") # => "123,456" + # number_to_delimited(12345678.9876) # => "12,345,678.9876" + # number_to_delimited("12x34") # => "12x34" + # + # number_to_delimited(12345678.9876, delimiter: ".", separator: ",") + # # => "12.345.678,9876" + # + # ==== Options + # + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. + # + # number_to_delimited(12345678.05, locale: :fr) + # # => "12 345 678,05" + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # number_to_delimited(12345678, delimiter: ".") + # # => "12.345.678" + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # number_to_delimited(12345678.05, separator: " ") + # # => "12,345,678 05" + # + # [+:delimiter_pattern+] + # A regexp to determine the placement of delimiters. Helpful when using + # currency formats like INR. + # + # number_to_delimited("123456.78", delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/) + # # => "1,23,456.78" + # + # source://activesupport//lib/active_support/number_helper.rb#242 + def number_to_delimited(number, options = T.unsafe(nil)); end + + # Formats +number+ into a more human-friendly representation. Useful for + # numbers that can become very large and too hard to read. + # + # number_to_human(123) # => "123" + # number_to_human(1234) # => "1.23 Thousand" + # number_to_human(12345) # => "12.3 Thousand" + # number_to_human(1234567) # => "1.23 Million" + # number_to_human(1234567890) # => "1.23 Billion" + # number_to_human(1234567890123) # => "1.23 Trillion" + # number_to_human(1234567890123456) # => "1.23 Quadrillion" + # number_to_human(1234567890123456789) # => "1230 Quadrillion" + # + # See #number_to_human_size if you want to pretty-print a file size. + # + # ==== Options + # + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. + # + # [+:precision+] + # The level of precision. Defaults to 3. + # + # number_to_human(123456, precision: 2) # => "120 Thousand" + # number_to_human(123456, precision: 4) # => "123.5 Thousand" + # + # [+:round_mode+] + # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to + # +:default+. + # + # number_to_human(123456, precision: 2, round_mode: :up) + # # => "130 Thousand" + # + # [+:significant+] + # Whether +:precision+ should be applied to significant digits instead of + # fractional digits. Defaults to true. + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # number_to_human(123456, precision: 4, separator: ",") + # # => "123,5 Thousand" + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # [+:strip_insignificant_zeros+] + # Whether to remove insignificant zeros after the decimal separator. + # Defaults to true. + # + # number_to_human(1000000) # => "1 Million" + # number_to_human(1000000, strip_insignificant_zeros: false) # => "1.00 Million" + # number_to_human(10.01) # => "10" + # number_to_human(10.01, strip_insignificant_zeros: false) # => "10.0" + # + # [+:format+] + # The format of the output. %n represents the number, and + # %u represents the quantifier (e.g., "Thousand"). Defaults to + # "%n %u". + # + # [+:units+] + # A Hash of custom unit quantifier names. + # + # number_to_human(1, units: { unit: "m", thousand: "km" }) # => "1 m" + # number_to_human(100, units: { unit: "m", thousand: "km" }) # => "100 m" + # number_to_human(1000, units: { unit: "m", thousand: "km" }) # => "1 km" + # number_to_human(100000, units: { unit: "m", thousand: "km" }) # => "100 km" + # number_to_human(10000000, units: { unit: "m", thousand: "km" }) # => "10000 km" + # + # The following keys are supported for integer units: +:unit+, +:ten+, + # +:hundred+, +:thousand+, +:million+, +:billion+, +:trillion+, + # +:quadrillion+. Additionally, the following keys are supported for + # fractional units: +:deci+, +:centi+, +:mili+, +:micro+, +:nano+, + # +:pico+, +:femto+. + # + # The Hash can also be defined as a scope in an I18n locale. For example: + # + # en: + # distance: + # centi: + # one: "centimeter" + # other: "centimeters" + # unit: + # one: "meter" + # other: "meters" + # thousand: + # one: "kilometer" + # other: "kilometers" + # + # Then it can be specified by name: + # + # number_to_human(1, units: :distance) # => "1 meter" + # number_to_human(100, units: :distance) # => "100 meters" + # number_to_human(1000, units: :distance) # => "1 kilometer" + # number_to_human(100000, units: :distance) # => "100 kilometers" + # number_to_human(10000000, units: :distance) # => "10000 kilometers" + # number_to_human(0.1, units: :distance) # => "10 centimeters" + # number_to_human(0.01, units: :distance) # => "1 centimeter" + # + # source://activesupport//lib/active_support/number_helper.rb#453 + def number_to_human(number, options = T.unsafe(nil)); end + + # Formats +number+ as bytes into a more human-friendly representation. + # Useful for reporting file sizes to users. # - # The currency unit and number formatting of the current locale will be used - # unless otherwise specified in the provided options. No currency conversion - # is performed. If the user is given a way to change their locale, they will - # also be able to change the relative value of the currency displayed with - # this helper. If your application will ever support multiple locales, you - # may want to specify a constant :locale option or consider - # using a library capable of currency conversion. + # number_to_human_size(123) # => "123 Bytes" + # number_to_human_size(1234) # => "1.21 KB" + # number_to_human_size(12345) # => "12.1 KB" + # number_to_human_size(1234567) # => "1.18 MB" + # number_to_human_size(1234567890) # => "1.15 GB" + # number_to_human_size(1234567890123) # => "1.12 TB" + # number_to_human_size(1234567890123456) # => "1.1 PB" + # number_to_human_size(1234567890123456789) # => "1.07 EB" + # + # See #number_to_human if you want to pretty-print a generic number. # # ==== Options # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the level of precision (defaults - # to 2). - # * :round_mode - Determine how rounding is performed - # (defaults to :default. See BigDecimal::mode) - # * :unit - Sets the denomination of the currency - # (defaults to "$"). - # * :separator - Sets the separator between the units - # (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ","). - # * :format - Sets the format for non-negative numbers - # (defaults to "%u%n"). Fields are %u for the - # currency, and %n for the number. - # * :negative_format - Sets the format for negative - # numbers (defaults to prepending a hyphen to the formatted - # number given by :format). Accepts the same fields - # than :format, except %n is here the - # absolute value of the number. - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. # - # ==== Examples + # [+:precision+] + # The level of precision. Defaults to 3. # - # number_to_currency(1234567890.50) # => "$1,234,567,890.50" - # number_to_currency(1234567890.506) # => "$1,234,567,890.51" - # number_to_currency(1234567890.506, precision: 3) # => "$1,234,567,890.506" - # number_to_currency(1234567890.506, locale: :fr) # => "1 234 567 890,51 €" - # number_to_currency('123a456') # => "$123a456" - # - # number_to_currency(-0.456789, precision: 0) - # # => "$0" - # number_to_currency(-1234567890.50, negative_format: '(%u%n)') - # # => "($1,234,567,890.50)" - # number_to_currency(1234567890.50, unit: '£', separator: ',', delimiter: '') - # # => "£1234567890,50" - # number_to_currency(1234567890.50, unit: '£', separator: ',', delimiter: '', format: '%n %u') - # # => "1234567890,50 £" - # number_to_currency(1234567890.50, strip_insignificant_zeros: true) - # # => "$1,234,567,890.5" - # number_to_currency(1234567890.50, precision: 0, round_mode: :up) - # # => "$1,234,567,891" - # - # source://activesupport//lib/active_support/number_helper.rb#114 - def number_to_currency(number, options = T.unsafe(nil)); end - - # Formats a +number+ with grouped thousands using +delimiter+ - # (e.g., 12,324). You can customize the format in the +options+ - # hash. + # number_to_human_size(123456, precision: 2) # => "120 KB" + # number_to_human_size(1234567, precision: 2) # => "1.2 MB" # - # ==== Options + # [+:round_mode+] + # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to + # +:default+. # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :delimiter - Sets the thousands delimiter (defaults - # to ","). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter_pattern - Sets a custom regular expression used for - # deriving the placement of delimiter. Helpful when using currency formats - # like INR. + # number_to_human_size(123456, precision: 2, round_mode: :up) + # # => "130 KB" # - # ==== Examples + # [+:significant+] + # Whether +:precision+ should be applied to significant digits instead of + # fractional digits. Defaults to true. # - # number_to_delimited(12345678) # => "12,345,678" - # number_to_delimited('123456') # => "123,456" - # number_to_delimited(12345678.05) # => "12,345,678.05" - # number_to_delimited(12345678, delimiter: '.') # => "12.345.678" - # number_to_delimited(12345678, delimiter: ',') # => "12,345,678" - # number_to_delimited(12345678.05, separator: ' ') # => "12,345,678 05" - # number_to_delimited(12345678.05, locale: :fr) # => "12 345 678,05" - # number_to_delimited('112a') # => "112a" - # number_to_delimited(98765432.98, delimiter: ' ', separator: ',') - # # => "98 765 432,98" - # number_to_delimited("123456.78", - # delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/) - # # => "1,23,456.78" - # - # source://activesupport//lib/active_support/number_helper.rb#189 - def number_to_delimited(number, options = T.unsafe(nil)); end + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # number_to_human_size(1234567, separator: ",") + # # => "1,18 MB" + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # [+:strip_insignificant_zeros+] + # Whether to remove insignificant zeros after the decimal separator. + # Defaults to true. + # + # source://activesupport//lib/active_support/number_helper.rb#351 + def number_to_human_size(number, options = T.unsafe(nil)); end - # Pretty prints (formats and approximates) a number in a way it - # is more readable by humans (e.g.: 1200000000 becomes "1.2 - # Billion"). This is useful for numbers that can get very large - # (and too hard to read). + # Formats +number+ as a percentage string. # - # See number_to_human_size if you want to print a file - # size. + # number_to_percentage(100) # => "100.000%" + # number_to_percentage("99") # => "99.000%" + # number_to_percentage("99x") # => "99x%" # - # You can also define your own unit-quantifier names if you want - # to use other decimal units (e.g.: 1500 becomes "1.5 - # kilometers", 0.150 becomes "150 milliliters", etc). You may - # define a wide range of unit quantifiers, even fractional ones - # (centi, deci, mili, etc). + # number_to_percentage(12345.6789, delimiter: ".", separator: ",", precision: 2) + # # => "12.345,68%" # # ==== Options # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :round_mode - Determine how rounding is performed - # (defaults to :default. See BigDecimal::mode) - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +true+) - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +true+) - # * :units - A Hash of unit quantifier names. Or a - # string containing an i18n scope where to find this hash. It - # might have the following keys: - # * *integers*: :unit, :ten, - # :hundred, :thousand, :million, - # :billion, :trillion, - # :quadrillion - # * *fractionals*: :deci, :centi, - # :mili, :micro, :nano, - # :pico, :femto - # * :format - Sets the format of the output string - # (defaults to "%n %u"). The field types are: - # * %u - The quantifier (ex.: 'thousand') - # * %n - The number + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. # - # ==== Examples + # number_to_percentage(1000, locale: :fr) + # # => "1000,000%" # - # number_to_human(123) # => "123" - # number_to_human(1234) # => "1.23 Thousand" - # number_to_human(12345) # => "12.3 Thousand" - # number_to_human(1234567) # => "1.23 Million" - # number_to_human(1234567890) # => "1.23 Billion" - # number_to_human(1234567890123) # => "1.23 Trillion" - # number_to_human(1234567890123456) # => "1.23 Quadrillion" - # number_to_human(1234567890123456789) # => "1230 Quadrillion" - # number_to_human(489939, precision: 2) # => "490 Thousand" - # number_to_human(489939, precision: 4) # => "489.9 Thousand" - # number_to_human(489939, precision: 2 - # , round_mode: :down) # => "480 Thousand" - # number_to_human(1234567, precision: 4, - # significant: false) # => "1.2346 Million" - # number_to_human(1234567, precision: 1, - # separator: ',', - # significant: false) # => "1,2 Million" - # - # number_to_human(500000000, precision: 5) # => "500 Million" - # number_to_human(12345012345, significant: false) # => "12.345 Billion" - # - # Non-significant zeros after the decimal separator are stripped - # out by default (set :strip_insignificant_zeros to - # +false+ to change that): - # - # number_to_human(12.00001) # => "12" - # number_to_human(12.00001, strip_insignificant_zeros: false) # => "12.0" - # - # ==== Custom Unit Quantifiers - # - # You can also use your own custom unit quantifiers: - # - # number_to_human(500000, units: { unit: 'ml', thousand: 'lt' }) # => "500 lt" - # - # If in your I18n locale you have: - # - # distance: - # centi: - # one: "centimeter" - # other: "centimeters" - # unit: - # one: "meter" - # other: "meters" - # thousand: - # one: "kilometer" - # other: "kilometers" - # billion: "gazillion-distance" - # - # Then you could do: - # - # number_to_human(543934, units: :distance) # => "544 kilometers" - # number_to_human(54393498, units: :distance) # => "54400 kilometers" - # number_to_human(54393498000, units: :distance) # => "54.4 gazillion-distance" - # number_to_human(343, units: :distance, precision: 1) # => "300 meters" - # number_to_human(1, units: :distance) # => "1 meter" - # number_to_human(0.34, units: :distance) # => "34 centimeters" - # - # source://activesupport//lib/active_support/number_helper.rb#392 - def number_to_human(number, options = T.unsafe(nil)); end - - # Formats the bytes in +number+ into a more understandable - # representation (e.g., giving it 1500 yields 1.46 KB). This - # method is useful for reporting file sizes to users. You can - # customize the format in the +options+ hash. + # [+:precision+] + # The level of precision, or +nil+ to preserve +number+'s precision. + # Defaults to 2. # - # See number_to_human if you want to pretty-print a - # generic number. + # number_to_percentage(12.3456789, precision: 4) # => "12.3457%" + # number_to_percentage(99.999, precision: 0) # => "100%" + # number_to_percentage(99.999, precision: nil) # => "99.999%" # - # ==== Options + # [+:round_mode+] + # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to + # +:default+. # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :round_mode - Determine how rounding is performed - # (defaults to :default. See BigDecimal::mode) - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +true+) - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +true+) + # number_to_percentage(12.3456789, precision: 4, round_mode: :down) + # # => "12.3456%" # - # ==== Examples + # [+:significant+] + # Whether +:precision+ should be applied to significant digits instead of + # fractional digits. Defaults to false. # - # number_to_human_size(123) # => "123 Bytes" - # number_to_human_size(1234) # => "1.21 KB" - # number_to_human_size(12345) # => "12.1 KB" - # number_to_human_size(1234567) # => "1.18 MB" - # number_to_human_size(1234567890) # => "1.15 GB" - # number_to_human_size(1234567890123) # => "1.12 TB" - # number_to_human_size(1234567890123456) # => "1.1 PB" - # number_to_human_size(1234567890123456789) # => "1.07 EB" - # number_to_human_size(1234567, precision: 2) # => "1.2 MB" - # number_to_human_size(483989, precision: 2) # => "470 KB" - # number_to_human_size(483989, precision: 2, round_mode: :up) # => "480 KB" - # number_to_human_size(1234567, precision: 2, separator: ',') # => "1,2 MB" - # number_to_human_size(1234567890123, precision: 5) # => "1.1228 TB" - # number_to_human_size(524288000, precision: 5) # => "500 MB" - # - # source://activesupport//lib/active_support/number_helper.rb#283 - def number_to_human_size(number, options = T.unsafe(nil)); end - - # Formats a +number+ as a percentage string (e.g., 65%). You can - # customize the format in the +options+ hash. + # number_to_percentage(12345.6789) # => "12345.679%" + # number_to_percentage(12345.6789, significant: true) # => "12300%" + # number_to_percentage(12345.6789, precision: 2) # => "12345.68%" + # number_to_percentage(12345.6789, precision: 2, significant: true) # => "12000%" # - # ==== Options + # [+:separator+] + # The decimal separator. Defaults to ".". # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). Keeps the number's precision if +nil+. - # * :round_mode - Determine how rounding is performed - # (defaults to :default. See BigDecimal::mode) - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +false+). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). - # * :format - Specifies the format of the percentage - # string The number field is %n (defaults to "%n%"). + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". # - # ==== Examples + # [+:strip_insignificant_zeros+] + # Whether to remove insignificant zeros after the decimal separator. + # Defaults to false. + # + # [+:format+] + # The format of the output. %n represents the number. Defaults to + # "%n%". # - # number_to_percentage(100) # => "100.000%" - # number_to_percentage('98') # => "98.000%" - # number_to_percentage(100, precision: 0) # => "100%" - # number_to_percentage(1000, delimiter: '.', separator: ',') # => "1.000,000%" - # number_to_percentage(302.24398923423, precision: 5) # => "302.24399%" - # number_to_percentage(1000, locale: :fr) # => "1000,000%" - # number_to_percentage(1000, precision: nil) # => "1000%" - # number_to_percentage('98a') # => "98a%" - # number_to_percentage(100, format: '%n %') # => "100.000 %" - # number_to_percentage(302.24398923423, precision: 5, round_mode: :down) # => "302.24398%" - # - # source://activesupport//lib/active_support/number_helper.rb#154 + # number_to_percentage(100, format: "%n %") + # # => "100.000 %" + # + # source://activesupport//lib/active_support/number_helper.rb#201 def number_to_percentage(number, options = T.unsafe(nil)); end - # Formats a +number+ into a phone number (US by default e.g., (555) - # 123-9876). You can customize the format in the +options+ hash. + # Formats +number+ into a phone number. + # + # number_to_phone(5551234) # => "555-1234" + # number_to_phone("5551234") # => "555-1234" + # number_to_phone(1235551234) # => "123-555-1234" + # number_to_phone("12x34") # => "12x34" + # + # number_to_phone(1235551234, delimiter: ".", country_code: 1, extension: 1343) + # # => "+1.123.555.1234 x 1343" # # ==== Options # - # * :area_code - Adds parentheses around the area code. - # * :delimiter - Specifies the delimiter to use - # (defaults to "-"). - # * :extension - Specifies an extension to add to the - # end of the generated number. - # * :country_code - Sets the country code for the phone - # number. - # * :pattern - Specifies how the number is divided into three - # groups with the custom regexp to override the default format. - # ==== Examples + # [+:area_code+] + # Whether to use parentheses for the area code. Defaults to false. # - # number_to_phone(5551234) # => "555-1234" - # number_to_phone('5551234') # => "555-1234" - # number_to_phone(1235551234) # => "123-555-1234" - # number_to_phone(1235551234, area_code: true) # => "(123) 555-1234" - # number_to_phone(1235551234, delimiter: ' ') # => "123 555 1234" - # number_to_phone(1235551234, area_code: true, extension: 555) # => "(123) 555-1234 x 555" - # number_to_phone(1235551234, country_code: 1) # => "+1-123-555-1234" - # number_to_phone('123a456') # => "123a456" + # number_to_phone(1235551234, area_code: true) + # # => "(123) 555-1234" # - # number_to_phone(1235551234, country_code: 1, extension: 1343, delimiter: '.') - # # => "+1.123.555.1234 x 1343" + # [+:delimiter+] + # The digit group delimiter to use. Defaults to "-". # - # number_to_phone(75561234567, pattern: /(\d{1,4})(\d{4})(\d{4})$/, area_code: true) - # # => "(755) 6123-4567" - # number_to_phone(13312345678, pattern: /(\d{3})(\d{4})(\d{4})$/) - # # => "133-1234-5678" + # number_to_phone(1235551234, delimiter: " ") + # # => "123 555 1234" # - # source://activesupport//lib/active_support/number_helper.rb#53 + # [+:country_code+] + # A country code to prepend. + # + # number_to_phone(1235551234, country_code: 1) + # # => "+1-123-555-1234" + # + # [+:extension+] + # An extension to append. + # + # number_to_phone(1235551234, extension: 555) + # # => "123-555-1234 x 555" + # + # [+:pattern+] + # A regexp that specifies how the digits should be grouped. The first + # three captures from the regexp are treated as digit groups. + # + # number_to_phone(13312345678, pattern: /(\d{3})(\d{4})(\d{4})$/) + # # => "133-1234-5678" + # number_to_phone(75561234567, pattern: /(\d{1,4})(\d{4})(\d{4})$/, area_code: true) + # # => "(755) 6123-4567" + # + # source://activesupport//lib/active_support/number_helper.rb#66 def number_to_phone(number, options = T.unsafe(nil)); end - # Formats a +number+ with the specified level of - # :precision (e.g., 112.32 has a precision of 2 if - # +:significant+ is +false+, and 5 if +:significant+ is +true+). - # You can customize the format in the +options+ hash. + # Formats +number+ to a specific level of precision. + # + # number_to_rounded(12345.6789) # => "12345.679" + # number_to_rounded(12345.6789, precision: 2) # => "12345.68" + # number_to_rounded(12345.6789, precision: 0) # => "12345" + # number_to_rounded(12345, precision: 5) # => "12345.00000" # # ==== Options # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). Keeps the number's precision if +nil+. - # * :round_mode - Determine how rounding is performed - # (defaults to :default. See BigDecimal::mode) - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +false+). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. # - # ==== Examples + # number_to_rounded(111.234, locale: :fr) + # # => "111,234" + # + # [+:precision+] + # The level of precision, or +nil+ to preserve +number+'s precision. + # Defaults to 3. + # + # number_to_rounded(12345.6789, precision: nil) + # # => "12345.6789" + # + # [+:round_mode+] + # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to + # +:default+. + # + # number_to_rounded(12.34, precision: 0, round_mode: :up) + # # => "13" + # + # [+:significant+] + # Whether +:precision+ should be applied to significant digits instead of + # fractional digits. Defaults to false. + # + # number_to_rounded(12345.6789) # => "12345.679" + # number_to_rounded(12345.6789, significant: true) # => "12300" + # number_to_rounded(12345.6789, precision: 2) # => "12345.68" + # number_to_rounded(12345.6789, precision: 2, significant: true) # => "12000" + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". # - # number_to_rounded(111.2345) # => "111.235" - # number_to_rounded(111.2345, precision: 2) # => "111.23" - # number_to_rounded(13, precision: 5) # => "13.00000" - # number_to_rounded(389.32314, precision: 0) # => "389" - # number_to_rounded(111.2345, significant: true) # => "111" - # number_to_rounded(111.2345, precision: 1, significant: true) # => "100" - # number_to_rounded(13, precision: 5, significant: true) # => "13.000" - # number_to_rounded(13, precision: nil) # => "13" - # number_to_rounded(389.32314, precision: 0, round_mode: :up) # => "390" - # number_to_rounded(111.234, locale: :fr) # => "111,234" - # - # number_to_rounded(13, precision: 5, significant: true, strip_insignificant_zeros: true) - # # => "13" - # - # number_to_rounded(389.32314, precision: 4, significant: true) # => "389.3" - # number_to_rounded(1111.2345, precision: 2, separator: ',', delimiter: '.') - # # => "1.111,23" - # - # source://activesupport//lib/active_support/number_helper.rb#236 + # [+:strip_insignificant_zeros+] + # Whether to remove insignificant zeros after the decimal separator. + # Defaults to false. + # + # number_to_rounded(12.34, strip_insignificant_zeros: false) # => "12.340" + # number_to_rounded(12.34, strip_insignificant_zeros: true) # => "12.34" + # number_to_rounded(12.3456, strip_insignificant_zeros: true) # => "12.346" + # + # source://activesupport//lib/active_support/number_helper.rb#298 def number_to_rounded(number, options = T.unsafe(nil)); end end -# source://activesupport//lib/active_support/number_helper/number_converter.rb#11 +# source://activesupport//lib/active_support/number_helper/number_converter.rb#12 class ActiveSupport::NumberHelper::NumberConverter # @return [NumberConverter] a new instance of NumberConverter # - # source://activesupport//lib/active_support/number_helper/number_converter.rb#123 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#124 def initialize(number, options); end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#128 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#130 def execute; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 def namespace; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 def namespace=(_arg0); end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 def namespace?; end # Returns the value of attribute number. # - # source://activesupport//lib/active_support/number_helper/number_converter.rb#18 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#19 def number; end # Returns the value of attribute opts. # - # source://activesupport//lib/active_support/number_helper/number_converter.rb#18 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#19 def opts; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 def validate_float; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 def validate_float=(_arg0); end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 def validate_float?; end private - # source://activesupport//lib/active_support/number_helper/number_converter.rb#147 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#149 def default_format_options; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#172 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#174 def default_value(key); end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#143 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#145 def format_options; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#153 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#155 def i18n_format_options; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#139 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#141 def options; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#168 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#170 def translate_in_locale(key, **i18n_options); end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#164 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#166 def translate_number_value_with_default(key, **i18n_options); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/number_helper/number_converter.rb#176 - def valid_float?; end + # source://activesupport//lib/active_support/number_helper/number_converter.rb#178 + def valid_bigdecimal; end class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#119 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#120 def convert(number, options); end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 def namespace; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 def namespace=(value); end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 def namespace?; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 def validate_float; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 def validate_float=(value); end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 def validate_float?; end end end -# source://activesupport//lib/active_support/number_helper/number_converter.rb#20 +# source://activesupport//lib/active_support/number_helper/number_converter.rb#21 ActiveSupport::NumberHelper::NumberConverter::DEFAULTS = T.let(T.unsafe(nil), Hash) # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#7 @@ -9002,7 +10795,7 @@ class ActiveSupport::NumberHelper::NumberToCurrencyConverter < ::ActiveSupport:: def options; end class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 def namespace; end end end @@ -9021,7 +10814,7 @@ class ActiveSupport::NumberHelper::NumberToDelimitedConverter < ::ActiveSupport: def parts; end class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 def validate_float; end end end @@ -9049,10 +10842,10 @@ class ActiveSupport::NumberHelper::NumberToHumanConverter < ::ActiveSupport::Num def unit_exponents(units); end class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 def namespace; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 def validate_float; end end end @@ -9091,10 +10884,10 @@ class ActiveSupport::NumberHelper::NumberToHumanSizeConverter < ::ActiveSupport: def unit; end class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 def namespace; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 def validate_float; end end end @@ -9108,42 +10901,42 @@ class ActiveSupport::NumberHelper::NumberToPercentageConverter < ::ActiveSupport def convert; end class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 def namespace; end end end -# source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#7 +# source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#8 class ActiveSupport::NumberHelper::NumberToPhoneConverter < ::ActiveSupport::NumberHelper::NumberConverter - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#8 + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#9 def convert; end private - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#15 + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#16 def convert_to_phone_number(number); end - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#23 + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#24 def convert_with_area_code(number); end - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#30 + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#31 def convert_without_area_code(number); end - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#46 + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#47 def country_code(code); end - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#42 + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#43 def delimiter; end - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#50 + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#51 def phone_ext(ext); end - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#54 + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#55 def regexp_pattern(default_pattern); end # @return [Boolean] # - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#38 + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#39 def start_with_delimiter?(number); end end @@ -9161,10 +10954,10 @@ class ActiveSupport::NumberHelper::NumberToRoundedConverter < ::ActiveSupport::N def strip_insignificant_zeros; end class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 def namespace; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 def validate_float; end end end @@ -9198,6 +10991,8 @@ end # source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#7 module ActiveSupport::NumericWithFormat + # \Numeric With Format + # # Provides options for converting numbers into formatted strings. # Options are provided for phone numbers, currency, percentage, # precision, positional notation, file size, and pretty printing. @@ -9302,9 +11097,11 @@ module ActiveSupport::NumericWithFormat # separator: ',', # significant: false) # => "1,2 Million" # - # source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#111 + # source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#113 def to_formatted_s(format = T.unsafe(nil), options = T.unsafe(nil)); end + # \Numeric With Format + # # Provides options for converting numbers into formatted strings. # Options are provided for phone numbers, currency, percentage, # precision, positional notation, file size, and pretty printing. @@ -9409,7 +11206,7 @@ module ActiveSupport::NumericWithFormat # separator: ',', # significant: false) # => "1,2 Million" # - # source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#111 + # source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#113 def to_fs(format = T.unsafe(nil), options = T.unsafe(nil)); end end @@ -9431,7 +11228,7 @@ class ActiveSupport::OptionMerger def respond_to_missing?(*arguments); end end -# DEPRECATED: ActiveSupport::OrderedHash implements a hash that preserves +# DEPRECATED: +ActiveSupport::OrderedHash+ implements a hash that preserves # insertion order. # # oh = ActiveSupport::OrderedHash.new @@ -9441,9 +11238,9 @@ end # # Also, maps the +omap+ feature for YAML files # (See https://yaml.org/type/omap.html) to support ordered items -# when loading from yaml. +# when loading from YAML. # -# ActiveSupport::OrderedHash is namespaced to prevent conflicts +# +ActiveSupport::OrderedHash+ is namespaced to prevent conflicts # with other implementations. # # source://activesupport//lib/active_support/ordered_hash.rb#24 @@ -9471,6 +11268,8 @@ class ActiveSupport::OrderedHash < ::Hash def to_yaml_type; end end +# = Ordered Options +# # +OrderedOptions+ inherits from +Hash+ and provides dynamic accessor methods. # # With a +Hash+, key-value pairs are typically managed like this: @@ -9496,23 +11295,26 @@ end # # h.dog! # => raises KeyError: :dog is blank # -# source://activesupport//lib/active_support/ordered_options.rb#31 +# source://activesupport//lib/active_support/ordered_options.rb#33 class ActiveSupport::OrderedOptions < ::Hash - # source://activesupport//lib/active_support/ordered_options.rb#39 + # source://activesupport//lib/active_support/ordered_options.rb#41 def [](key); end - # source://activesupport//lib/active_support/ordered_options.rb#35 + # source://activesupport//lib/active_support/ordered_options.rb#37 def []=(key, value); end + # source://activesupport//lib/active_support/ordered_options.rb#45 + def dig(key, *identifiers); end + # @return [Boolean] # - # source://activesupport//lib/active_support/ordered_options.rb#62 + # source://activesupport//lib/active_support/ordered_options.rb#68 def extractable_options?; end - # source://activesupport//lib/active_support/ordered_options.rb#66 + # source://activesupport//lib/active_support/ordered_options.rb#72 def inspect; end - # source://activesupport//lib/active_support/ordered_options.rb#43 + # source://activesupport//lib/active_support/ordered_options.rb#49 def method_missing(name, *args); end protected @@ -9524,10 +11326,12 @@ class ActiveSupport::OrderedOptions < ::Hash # @return [Boolean] # - # source://activesupport//lib/active_support/ordered_options.rb#58 + # source://activesupport//lib/active_support/ordered_options.rb#64 def respond_to_missing?(name, include_private); end end +# = Active Support Parameter Filter +# # +ParameterFilter+ replaces values in a Hash-like object if their # keys match one of the specified filters. # @@ -9558,7 +11362,7 @@ end # v.reverse! if /secret/i.match?(k) # end]) # -# source://activesupport//lib/active_support/parameter_filter.rb#36 +# source://activesupport//lib/active_support/parameter_filter.rb#39 class ActiveSupport::ParameterFilter # Create instance with given filters. Supported type of filters are +String+, +Regexp+, and +Proc+. # Other types of filters are treated as +String+ using +to_s+. @@ -9570,131 +11374,71 @@ class ActiveSupport::ParameterFilter # # @return [ParameterFilter] a new instance of ParameterFilter # - # source://activesupport//lib/active_support/parameter_filter.rb#46 + # source://activesupport//lib/active_support/parameter_filter.rb#77 def initialize(filters = T.unsafe(nil), mask: T.unsafe(nil)); end # Mask value of +params+ if key matches one of filters. # - # source://activesupport//lib/active_support/parameter_filter.rb#52 + # source://activesupport//lib/active_support/parameter_filter.rb#83 def filter(params); end # Returns filtered value for given key. For +Proc+ filters, third block argument is not populated. # - # source://activesupport//lib/active_support/parameter_filter.rb#57 + # source://activesupport//lib/active_support/parameter_filter.rb#88 def filter_param(key, value); end private - # source://activesupport//lib/active_support/parameter_filter.rb#62 - def compiled_filter; end -end - -# source://activesupport//lib/active_support/parameter_filter.rb#66 -class ActiveSupport::ParameterFilter::CompiledFilter - # @return [CompiledFilter] a new instance of CompiledFilter - # - # source://activesupport//lib/active_support/parameter_filter.rb#100 - def initialize(regexps, deep_regexps, blocks, mask:); end - - # Returns the value of attribute blocks. - # - # source://activesupport//lib/active_support/parameter_filter.rb#98 - def blocks; end - - # source://activesupport//lib/active_support/parameter_filter.rb#107 - def call(params, parents = T.unsafe(nil), original_params = T.unsafe(nil)); end - - # Returns the value of attribute deep_regexps. - # - # source://activesupport//lib/active_support/parameter_filter.rb#98 - def deep_regexps; end + # source://activesupport//lib/active_support/parameter_filter.rb#125 + def call(params, full_parent_key = T.unsafe(nil), original_params = T.unsafe(nil)); end - # Returns the value of attribute regexps. - # - # source://activesupport//lib/active_support/parameter_filter.rb#98 - def regexps; end + # source://activesupport//lib/active_support/parameter_filter.rb#93 + def compile_filters!(filters); end - # source://activesupport//lib/active_support/parameter_filter.rb#117 - def value_for_key(key, value, parents = T.unsafe(nil), original_params = T.unsafe(nil)); end + # source://activesupport//lib/active_support/parameter_filter.rb#135 + def value_for_key(key, value, full_parent_key = T.unsafe(nil), original_params = T.unsafe(nil)); end class << self - # source://activesupport//lib/active_support/parameter_filter.rb#67 - def compile(filters, mask:); end + # Precompiles an array of filters that otherwise would be passed directly to + # #initialize. Depending on the quantity and types of filters, + # precompilation can improve filtering performance, especially in the case + # where the ParameterFilter instance itself cannot be retained (but the + # precompiled filters can be retained). + # + # filters = [/foo/, :bar, "nested.baz", /nested\.qux/] + # + # precompiled = ActiveSupport::ParameterFilter.precompile_filters(filters) + # # => [/(?-mix:foo)|(?i:bar)/, /(?i:nested\.baz)|(?-mix:nested\.qux)/] + # + # ActiveSupport::ParameterFilter.new(precompiled) + # + # source://activesupport//lib/active_support/parameter_filter.rb#55 + def precompile_filters(filters); end end end -# source://activesupport//lib/active_support/parameter_filter.rb#37 +# source://activesupport//lib/active_support/parameter_filter.rb#40 ActiveSupport::ParameterFilter::FILTERED = T.let(T.unsafe(nil), String) -# NOTE: This approach has been deprecated for end-user code in favor of {thread_mattr_accessor}[rdoc-ref:Module#thread_mattr_accessor] and friends. -# Please use that approach instead. -# -# This module is used to encapsulate access to thread local variables. -# -# Instead of polluting the thread locals namespace: -# -# Thread.current[:connection_handler] -# -# you define a class that extends this module: -# -# module ActiveRecord -# class RuntimeRegistry -# extend ActiveSupport::PerThreadRegistry -# -# attr_accessor :connection_handler -# end -# end -# -# and invoke the declared instance accessors as class methods. So +# = Active Support Proxy \Object # -# ActiveRecord::RuntimeRegistry.connection_handler = connection_handler -# -# sets a connection handler local to the current thread, and -# -# ActiveRecord::RuntimeRegistry.connection_handler -# -# returns a connection handler local to the current thread. -# -# This feature is accomplished by instantiating the class and storing the -# instance as a thread local keyed by the class name. In the example above -# a key "ActiveRecord::RuntimeRegistry" is stored in Thread.current. -# The class methods proxy to said thread local instance. -# -# If the class has an initializer, it must accept no arguments. -# -# source://activesupport//lib/active_support/per_thread_registry.rb#41 -module ActiveSupport::PerThreadRegistry - # source://activesupport//lib/active_support/per_thread_registry.rb#50 - def instance; end - - private - - # source://activesupport//lib/active_support/per_thread_registry.rb#55 - def method_missing(name, *args, **_arg2, &block); end - - class << self - # @private - # - # source://activesupport//lib/active_support/per_thread_registry.rb#42 - def extended(object); end - end -end - # A class with no predefined methods that behaves similarly to Builder's # BlankSlate. Used for proxy classes. # -# source://activesupport//lib/active_support/proxy_object.rb#6 +# source://activesupport//lib/active_support/proxy_object.rb#8 class ActiveSupport::ProxyObject < ::BasicObject # Let ActiveSupport::ProxyObject at least raise exceptions. # - # source://activesupport//lib/active_support/proxy_object.rb#11 + # source://activesupport//lib/active_support/proxy_object.rb#13 def raise(*args); end end # source://activesupport//lib/active_support/railtie.rb#7 class ActiveSupport::Railtie < ::Rails::Railtie; end -# source://activesupport//lib/active_support/core_ext/range/conversions.rb#4 +# = \Range With Format +# +# source://activesupport//lib/active_support/core_ext/range/conversions.rb#5 module ActiveSupport::RangeWithFormat # Convert range to a formatted string. See RANGE_FORMATS for predefined formats. # @@ -9703,16 +11447,22 @@ module ActiveSupport::RangeWithFormat # range = (1..100) # => 1..100 # # range.to_s # => "1..100" - # range.to_fs(:db) # => "BETWEEN '1' AND '100'" + # range.to_fs(:db) # => "BETWEEN '1' AND '100'" + # + # range = (1..) # => 1.. + # range.to_fs(:db) # => ">= '1'" # - # == Adding your own range formats to to_s + # range = (..100) # => ..100 + # range.to_fs(:db) # => "<= '100'" + # + # == Adding your own range formats to to_fs # You can add your own formats to the Range::RANGE_FORMATS hash. # Use the format name as the hash key and a Proc instance. # # # config/initializers/range_formats.rb # Range::RANGE_FORMATS[:short] = ->(start, stop) { "Between #{start.to_fs(:db)} and #{stop.to_fs(:db)}" } # - # source://activesupport//lib/active_support/core_ext/range/conversions.rb#30 + # source://activesupport//lib/active_support/core_ext/range/conversions.rb#51 def to_formatted_s(format = T.unsafe(nil)); end # Convert range to a formatted string. See RANGE_FORMATS for predefined formats. @@ -9722,23 +11472,30 @@ module ActiveSupport::RangeWithFormat # range = (1..100) # => 1..100 # # range.to_s # => "1..100" - # range.to_fs(:db) # => "BETWEEN '1' AND '100'" + # range.to_fs(:db) # => "BETWEEN '1' AND '100'" + # + # range = (1..) # => 1.. + # range.to_fs(:db) # => ">= '1'" # - # == Adding your own range formats to to_s + # range = (..100) # => ..100 + # range.to_fs(:db) # => "<= '100'" + # + # == Adding your own range formats to to_fs # You can add your own formats to the Range::RANGE_FORMATS hash. # Use the format name as the hash key and a Proc instance. # # # config/initializers/range_formats.rb # Range::RANGE_FORMATS[:short] = ->(start, stop) { "Between #{start.to_fs(:db)} and #{stop.to_fs(:db)}" } # - # source://activesupport//lib/active_support/core_ext/range/conversions.rb#30 + # source://activesupport//lib/active_support/core_ext/range/conversions.rb#51 def to_fs(format = T.unsafe(nil)); end end -# source://activesupport//lib/active_support/core_ext/range/conversions.rb#5 +# source://activesupport//lib/active_support/core_ext/range/conversions.rb#6 ActiveSupport::RangeWithFormat::RANGE_FORMATS = T.let(T.unsafe(nil), Hash) -# -- +# = Active Support \Reloader +# # This class defines several callbacks: # # to_prepare -- Run once at application startup, and also from @@ -9758,139 +11515,141 @@ ActiveSupport::RangeWithFormat::RANGE_FORMATS = T.let(T.unsafe(nil), Hash) # after_class_unload -- Run immediately after the classes are # unloaded. # -# source://activesupport//lib/active_support/reloader.rb#27 +# source://activesupport//lib/active_support/reloader.rb#28 class ActiveSupport::Reloader < ::ActiveSupport::ExecutionWrapper # @return [Reloader] a new instance of Reloader # - # source://activesupport//lib/active_support/reloader.rb#91 + # source://activesupport//lib/active_support/reloader.rb#99 def initialize; end - # source://activesupport//lib/active_support/callbacks.rb#940 + # source://activesupport//lib/active_support/callbacks.rb#963 def _class_unload_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#940 + # source://activesupport//lib/active_support/callbacks.rb#963 def _prepare_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#928 + # source://activesupport//lib/active_support/callbacks.rb#951 def _run_class_unload_callbacks(&block); end - # source://activesupport//lib/active_support/callbacks.rb#928 + # source://activesupport//lib/active_support/callbacks.rb#951 def _run_prepare_callbacks(&block); end - # source://activesupport//lib/active_support/reloader.rb#77 + # source://activesupport//lib/active_support/reloader.rb#85 def check; end - # source://activesupport//lib/active_support/reloader.rb#77 + # source://activesupport//lib/active_support/reloader.rb#85 def check=(_arg0); end - # source://activesupport//lib/active_support/reloader.rb#77 + # source://activesupport//lib/active_support/reloader.rb#85 def check?; end - # source://activesupport//lib/active_support/reloader.rb#118 + # source://activesupport//lib/active_support/reloader.rb#126 def class_unload!(&block); end - # source://activesupport//lib/active_support/reloader.rb#123 + # source://activesupport//lib/active_support/reloader.rb#131 def complete!; end - # source://activesupport//lib/active_support/reloader.rb#76 + # source://activesupport//lib/active_support/reloader.rb#84 def executor; end - # source://activesupport//lib/active_support/reloader.rb#76 + # source://activesupport//lib/active_support/reloader.rb#84 def executor=(_arg0); end - # source://activesupport//lib/active_support/reloader.rb#76 + # source://activesupport//lib/active_support/reloader.rb#84 def executor?; end # Release the unload lock if it has been previously obtained # - # source://activesupport//lib/active_support/reloader.rb#106 + # source://activesupport//lib/active_support/reloader.rb#114 def release_unload_lock!; end # Acquire the ActiveSupport::Dependencies::Interlock unload lock, # ensuring it will be released automatically # - # source://activesupport//lib/active_support/reloader.rb#98 + # source://activesupport//lib/active_support/reloader.rb#106 def require_unload_lock!; end - # source://activesupport//lib/active_support/reloader.rb#113 + # source://activesupport//lib/active_support/reloader.rb#121 def run!; end class << self - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#932 + # source://activesupport//lib/active_support/callbacks.rb#955 def _class_unload_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#936 + # source://activesupport//lib/active_support/callbacks.rb#959 def _class_unload_callbacks=(value); end - # source://activesupport//lib/active_support/callbacks.rb#932 + # source://activesupport//lib/active_support/callbacks.rb#955 def _prepare_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#936 + # source://activesupport//lib/active_support/callbacks.rb#959 def _prepare_callbacks=(value); end # Registers a callback that will run immediately after the classes are unloaded. # - # source://activesupport//lib/active_support/reloader.rb#43 + # source://activesupport//lib/active_support/reloader.rb#44 def after_class_unload(*args, &block); end # Registers a callback that will run immediately before the classes are unloaded. # - # source://activesupport//lib/active_support/reloader.rb#38 + # source://activesupport//lib/active_support/reloader.rb#39 def before_class_unload(*args, &block); end - # source://activesupport//lib/active_support/reloader.rb#77 + # source://activesupport//lib/active_support/reloader.rb#85 def check; end - # source://activesupport//lib/active_support/reloader.rb#79 + # source://activesupport//lib/active_support/reloader.rb#87 def check!; end - # source://activesupport//lib/active_support/reloader.rb#77 + # source://activesupport//lib/active_support/reloader.rb#85 def check=(value); end - # source://activesupport//lib/active_support/reloader.rb#77 + # source://activesupport//lib/active_support/reloader.rb#85 def check?; end - # source://activesupport//lib/active_support/reloader.rb#76 + # source://activesupport//lib/active_support/reloader.rb#84 def executor; end - # source://activesupport//lib/active_support/reloader.rb#76 + # source://activesupport//lib/active_support/reloader.rb#84 def executor=(value); end - # source://activesupport//lib/active_support/reloader.rb#76 + # source://activesupport//lib/active_support/reloader.rb#84 def executor?; end - # source://activesupport//lib/active_support/reloader.rb#87 + # source://activesupport//lib/active_support/reloader.rb#95 def prepare!; end # Initiate a manual reload # - # source://activesupport//lib/active_support/reloader.rb#50 + # source://activesupport//lib/active_support/reloader.rb#51 def reload!; end - # source://activesupport//lib/active_support/reloader.rb#83 + # source://activesupport//lib/active_support/reloader.rb#91 def reloaded!; end - # source://activesupport//lib/active_support/reloader.rb#61 + # source://activesupport//lib/active_support/reloader.rb#62 def run!(reset: T.unsafe(nil)); end # Registers a callback that will run once at application startup and every time the code is reloaded. # - # source://activesupport//lib/active_support/reloader.rb#33 + # source://activesupport//lib/active_support/reloader.rb#34 def to_prepare(*args, &block); end # Run the supplied block as a work unit, reloading code as needed # - # source://activesupport//lib/active_support/reloader.rb#70 - def wrap; end + # source://activesupport//lib/active_support/reloader.rb#71 + def wrap(**kwargs); end end end +# = Active Support \Rescuable +# # Rescuable module adds support for easier exception handling. # -# source://activesupport//lib/active_support/rescuable.rb#9 +# source://activesupport//lib/active_support/rescuable.rb#11 module ActiveSupport::Rescuable extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -9901,13 +11660,13 @@ module ActiveSupport::Rescuable # Internal handler lookup. Delegates to class method. Some libraries call # this directly, so keeping it around for compatibility. # - # source://activesupport//lib/active_support/rescuable.rb#170 + # source://activesupport//lib/active_support/rescuable.rb#172 def handler_for_rescue(exception); end # Delegates to the class method, but uses the instance as the subject for # rescue_from handlers (method calls, +instance_exec+ blocks). # - # source://activesupport//lib/active_support/rescuable.rb#164 + # source://activesupport//lib/active_support/rescuable.rb#166 def rescue_with_handler(exception); end module GeneratedClassMethods @@ -9923,9 +11682,9 @@ module ActiveSupport::Rescuable end end -# source://activesupport//lib/active_support/rescuable.rb#16 +# source://activesupport//lib/active_support/rescuable.rb#18 module ActiveSupport::Rescuable::ClassMethods - # source://activesupport//lib/active_support/rescuable.rb#103 + # source://activesupport//lib/active_support/rescuable.rb#105 def handler_for_rescue(exception, object: T.unsafe(nil)); end # Registers exception classes with a handler to be called by rescue_with_handler. @@ -9963,7 +11722,7 @@ module ActiveSupport::Rescuable::ClassMethods # # Exceptions raised inside exception handlers are not propagated up. # - # source://activesupport//lib/active_support/rescuable.rb#51 + # source://activesupport//lib/active_support/rescuable.rb#53 def rescue_from(*klasses, with: T.unsafe(nil), &block); end # Matches an exception to a handler based on the exception class. @@ -9981,15 +11740,15 @@ module ActiveSupport::Rescuable::ClassMethods # # Returns the exception if it was handled and +nil+ if it was not. # - # source://activesupport//lib/active_support/rescuable.rb#88 + # source://activesupport//lib/active_support/rescuable.rb#90 def rescue_with_handler(exception, object: T.unsafe(nil), visited_exceptions: T.unsafe(nil)); end private - # source://activesupport//lib/active_support/rescuable.rb#137 + # source://activesupport//lib/active_support/rescuable.rb#139 def constantize_rescue_handler_class(class_or_name); end - # source://activesupport//lib/active_support/rescuable.rb#122 + # source://activesupport//lib/active_support/rescuable.rb#124 def find_rescue_handler(exception); end end @@ -10001,239 +11760,247 @@ module ActiveSupport::RubyFeatures; end # source://activesupport//lib/active_support/ruby_features.rb#5 ActiveSupport::RubyFeatures::CLASS_SUBCLASSES = T.let(T.unsafe(nil), TrueClass) -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#162 +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#19 class ActiveSupport::SafeBuffer < ::String # @return [SafeBuffer] a new instance of SafeBuffer # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#200 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#70 def initialize(str = T.unsafe(nil)); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#257 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#130 def %(args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#250 - def *(*_arg0); end + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#123 + def *(_); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#246 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#119 def +(other); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#214 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#87 def <<(value); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#181 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#38 def [](*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#238 - def []=(*args); end + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#111 + def []=(arg1, arg2, arg3 = T.unsafe(nil)); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#222 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#95 def bytesplice(*args, value); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def capitalize(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def capitalize!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def chomp(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def chomp!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def chop(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def chop!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#210 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#59 + def chr; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#80 def clone_empty; end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#214 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#87 def concat(value); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def delete(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def delete!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def delete_prefix(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def delete_prefix!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def delete_suffix(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def delete_suffix!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def downcase(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def downcase!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#280 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 def encode_with(coder); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#301 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#174 def gsub(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#312 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#185 def gsub!(*args, &block); end - # @return [Boolean] + # Returns the value of attribute html_safe. # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#268 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#141 def html_safe?; end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#226 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#99 def insert(index, value); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def lstrip(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def lstrip!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def next(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def next!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#230 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#103 def prepend(value); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#234 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#107 def replace(value); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def reverse(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def reverse!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def rstrip(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def rstrip!(*args); end # @raise [SafeConcatError] # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#195 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#65 def safe_concat(value); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def scrub(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def scrub!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def slice(*args, &block); end + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#38 + def slice(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#51 def slice!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def squeeze(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def squeeze!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def strip(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def strip!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#301 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#174 def sub(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#312 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#185 def sub!(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def succ(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def succ!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def swapcase(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def swapcase!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#276 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#149 def to_param; end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#272 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#145 def to_s; end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def tr(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def tr!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def tr_s(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def tr_s!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def unicode_normalize(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def unicode_normalize!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#160 def upcase(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#164 def upcase!(*args); end private - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#327 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#200 def explicit_html_escape_interpolated_argument(arg); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#331 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#204 def implicit_html_escape_interpolated_argument(arg); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#205 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#75 def initialize_copy(other); end def original_concat(*_arg0); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#354 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#212 def set_block_back_references(block, match_data); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#218 + def string_into_safe_buffer(new_string, is_html_safe); end end # Raised when ActiveSupport::SafeBuffer#safe_concat is called on unsafe buffers. # -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#175 +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#32 class ActiveSupport::SafeBuffer::SafeConcatError < ::StandardError # @return [SafeConcatError] a new instance of SafeConcatError # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#176 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#33 def initialize; end end -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#163 +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#20 ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS = T.let(T.unsafe(nil), Array) -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#169 +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#26 ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS_WITH_BACKREF = T.let(T.unsafe(nil), Array) +# = Secure Compare Rotator +# # The ActiveSupport::SecureCompareRotator is a wrapper around ActiveSupport::SecurityUtils.secure_compare # and allows you to rotate a previously defined value to a new one. # @@ -10258,26 +12025,23 @@ ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS_WITH_BACKREF = T.let(T.unsafe(n # end # end # -# source://activesupport//lib/active_support/secure_compare_rotator.rb#30 +# source://activesupport//lib/active_support/secure_compare_rotator.rb#32 class ActiveSupport::SecureCompareRotator - include ::ActiveSupport::Messages::Rotator include ::ActiveSupport::SecurityUtils # @return [SecureCompareRotator] a new instance of SecureCompareRotator # - # source://activesupport//lib/active_support/messages/rotator.rb#6 - def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end - - # source://activesupport//lib/active_support/secure_compare_rotator.rb#40 - def secure_compare!(other_value, on_rotation: T.unsafe(nil)); end + # source://activesupport//lib/active_support/secure_compare_rotator.rb#37 + def initialize(value, on_rotation: T.unsafe(nil)); end - private + # source://activesupport//lib/active_support/secure_compare_rotator.rb#43 + def rotate(previous_value); end # source://activesupport//lib/active_support/secure_compare_rotator.rb#47 - def build_rotation(previous_value, _options); end + def secure_compare!(other_value, on_rotation: T.unsafe(nil)); end end -# source://activesupport//lib/active_support/secure_compare_rotator.rb#34 +# source://activesupport//lib/active_support/secure_compare_rotator.rb#35 class ActiveSupport::SecureCompareRotator::InvalidMatch < ::StandardError; end # source://activesupport//lib/active_support/security_utils.rb#4 @@ -10317,6 +12081,8 @@ module ActiveSupport::SecurityUtils end end +# = \String Inquirer +# # Wrapping a string in this class gives you a prettier way to test # for equality. The value returned by Rails.env is wrapped # in a StringInquirer object, so instead of calling this: @@ -10327,26 +12093,28 @@ end # # Rails.env.production? # -# == Instantiating a new StringInquirer +# == Instantiating a new \StringInquirer # # vehicle = ActiveSupport::StringInquirer.new('car') # vehicle.car? # => true # vehicle.bike? # => false # -# source://activesupport//lib/active_support/string_inquirer.rb#19 +# source://activesupport//lib/active_support/string_inquirer.rb#21 class ActiveSupport::StringInquirer < ::String private - # source://activesupport//lib/active_support/string_inquirer.rb#25 + # source://activesupport//lib/active_support/string_inquirer.rb#27 def method_missing(method_name, *arguments); end # @return [Boolean] # - # source://activesupport//lib/active_support/string_inquirer.rb#21 + # source://activesupport//lib/active_support/string_inquirer.rb#23 def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end end -# ActiveSupport::Subscriber is an object set to consume +# = Active Support \Subscriber +# +# +ActiveSupport::Subscriber+ is an object set to consume # ActiveSupport::Notifications. The subscriber dispatches notifications to # a registered object based on its given namespace. # @@ -10363,109 +12131,149 @@ end # end # end # -# After configured, whenever a "sql.active_record" notification is published, -# it will properly dispatch the event (ActiveSupport::Notifications::Event) to -# the +sql+ method. +# After configured, whenever a "sql.active_record" notification is +# published, it will properly dispatch the event +# (ActiveSupport::Notifications::Event) to the +sql+ method. # # We can detach a subscriber as well: # # ActiveRecord::StatsSubscriber.detach_from(:active_record) # -# source://activesupport//lib/active_support/subscriber.rb#30 +# source://activesupport//lib/active_support/subscriber.rb#32 class ActiveSupport::Subscriber # @return [Subscriber] a new instance of Subscriber # - # source://activesupport//lib/active_support/subscriber.rb#128 + # source://activesupport//lib/active_support/subscriber.rb#130 def initialize; end - # source://activesupport//lib/active_support/subscriber.rb#143 - def finish(name, id, payload); end + # source://activesupport//lib/active_support/subscriber.rb#135 + def call(event); end - # source://activesupport//lib/active_support/subscriber.rb#126 + # source://activesupport//lib/active_support/subscriber.rb#128 def patterns; end - # source://activesupport//lib/active_support/subscriber.rb#152 + # source://activesupport//lib/active_support/subscriber.rb#140 def publish_event(event); end - # source://activesupport//lib/active_support/subscriber.rb#134 - def start(name, id, payload); end - - private - - # source://activesupport//lib/active_support/subscriber.rb#158 - def event_stack; end - class << self # Attach the subscriber to a namespace. # - # source://activesupport//lib/active_support/subscriber.rb#33 + # source://activesupport//lib/active_support/subscriber.rb#35 def attach_to(namespace, subscriber = T.unsafe(nil), notifier = T.unsafe(nil), inherit_all: T.unsafe(nil)); end # Detach the subscriber from a namespace. # - # source://activesupport//lib/active_support/subscriber.rb#48 + # source://activesupport//lib/active_support/subscriber.rb#50 def detach_from(namespace, notifier = T.unsafe(nil)); end # Adds event subscribers for all new methods added to the class. # - # source://activesupport//lib/active_support/subscriber.rb#67 + # source://activesupport//lib/active_support/subscriber.rb#69 def method_added(event); end - # source://activesupport//lib/active_support/subscriber.rb#76 + # source://activesupport//lib/active_support/subscriber.rb#78 def subscribers; end private - # source://activesupport//lib/active_support/subscriber.rb#83 + # source://activesupport//lib/active_support/subscriber.rb#85 def add_event_subscriber(event); end - # source://activesupport//lib/active_support/subscriber.rb#121 + # source://activesupport//lib/active_support/subscriber.rb#123 def fetch_public_methods(subscriber, inherit_all); end - # source://activesupport//lib/active_support/subscriber.rb#105 + # source://activesupport//lib/active_support/subscriber.rb#107 def find_attached_subscriber; end # @return [Boolean] # - # source://activesupport//lib/active_support/subscriber.rb#109 + # source://activesupport//lib/active_support/subscriber.rb#111 def invalid_event?(event); end # Returns the value of attribute namespace. # - # source://activesupport//lib/active_support/subscriber.rb#81 + # source://activesupport//lib/active_support/subscriber.rb#83 def namespace; end # Returns the value of attribute notifier. # - # source://activesupport//lib/active_support/subscriber.rb#81 + # source://activesupport//lib/active_support/subscriber.rb#83 def notifier; end # @return [Boolean] # - # source://activesupport//lib/active_support/subscriber.rb#117 + # source://activesupport//lib/active_support/subscriber.rb#119 def pattern_subscribed?(pattern); end - # source://activesupport//lib/active_support/subscriber.rb#113 + # source://activesupport//lib/active_support/subscriber.rb#115 def prepare_pattern(event); end - # source://activesupport//lib/active_support/subscriber.rb#94 + # source://activesupport//lib/active_support/subscriber.rb#96 def remove_event_subscriber(event); end # Returns the value of attribute subscriber. # - # source://activesupport//lib/active_support/subscriber.rb#81 + # source://activesupport//lib/active_support/subscriber.rb#83 def subscriber; end end end +# This is a class for wrapping syntax errors. The purpose of this class +# is to enhance the backtraces on SyntaxError exceptions to include the +# source location of the syntax error. That way we can display the error +# source on error pages in development. +# +# source://activesupport//lib/active_support/syntax_error_proxy.rb#10 +class ActiveSupport::SyntaxErrorProxy + # source://activesupport//lib/active_support/syntax_error_proxy.rb#11 + def backtrace; end + + # source://activesupport//lib/active_support/syntax_error_proxy.rb#34 + def backtrace_locations; end + + private + + # source://activesupport//lib/active_support/syntax_error_proxy.rb#47 + def parse_message_for_trace; end + + # 3.2 and older versions of Ruby + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/syntax_error_proxy.rb#61 + def source_location_eval?; end +end + +# source://activesupport//lib/active_support/syntax_error_proxy.rb#15 +class ActiveSupport::SyntaxErrorProxy::BacktraceLocation < ::Struct + # source://activesupport//lib/active_support/syntax_error_proxy.rb#19 + def label; end + + # source://activesupport//lib/active_support/syntax_error_proxy.rb#16 + def spot(_); end +end + +# source://activesupport//lib/active_support/syntax_error_proxy.rb#23 +class ActiveSupport::SyntaxErrorProxy::BacktraceLocationProxy + # @return [BacktraceLocationProxy] a new instance of BacktraceLocationProxy + # + # source://activesupport//lib/active_support/syntax_error_proxy.rb#24 + def initialize(loc, ex); end + + # source://activesupport//lib/active_support/syntax_error_proxy.rb#29 + def spot(_); end +end + +# = Active Support Tagged Logging +# # Wraps any standard Logger object to provide tagging capabilities. # # May be called with a block: # # logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) -# logger.tagged('BCX') { logger.info 'Stuff' } # Logs "[BCX] Stuff" -# logger.tagged('BCX', "Jason") { logger.info 'Stuff' } # Logs "[BCX] [Jason] Stuff" -# logger.tagged('BCX') { logger.tagged('Jason') { logger.info 'Stuff' } } # Logs "[BCX] [Jason] Stuff" +# logger.tagged('BCX') { logger.info 'Stuff' } # Logs "[BCX] Stuff" +# logger.tagged('BCX', "Jason") { |tagged_logger| tagged_logger.info 'Stuff' } # Logs "[BCX] [Jason] Stuff" +# logger.tagged('BCX') { logger.tagged('Jason') { logger.info 'Stuff' } } # Logs "[BCX] [Jason] Stuff" # # If called without a block, a new logger will be returned with applied tags: # @@ -10478,84 +12286,114 @@ end # it easy to stamp log lines with subdomains, request ids, and anything else # to aid debugging of multi-user production applications. # -# source://activesupport//lib/active_support/tagged_logging.rb#28 +# source://activesupport//lib/active_support/tagged_logging.rb#30 module ActiveSupport::TaggedLogging - # source://activesupport//lib/active_support/tagged_logging.rb#95 + # source://activesupport//lib/active_support/tagged_logging.rb#131 def clear_tags!(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/tagged_logging.rb#108 + # source://activesupport//lib/active_support/tagged_logging.rb#144 def flush; end - # source://activesupport//lib/active_support/tagged_logging.rb#95 + # source://activesupport//lib/active_support/tagged_logging.rb#131 def pop_tags(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/tagged_logging.rb#95 + # source://activesupport//lib/active_support/tagged_logging.rb#131 def push_tags(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/tagged_logging.rb#97 + # source://activesupport//lib/active_support/tagged_logging.rb#133 def tagged(*tags); end class << self - # source://activesupport//lib/active_support/tagged_logging.rb#81 + # source://activesupport//lib/active_support/tagged_logging.rb#117 def new(logger); end end end -# source://activesupport//lib/active_support/tagged_logging.rb#29 +# source://activesupport//lib/active_support/tagged_logging.rb#31 module ActiveSupport::TaggedLogging::Formatter # This method is invoked when a log event occurs. # - # source://activesupport//lib/active_support/tagged_logging.rb#31 + # source://activesupport//lib/active_support/tagged_logging.rb#33 def call(severity, timestamp, progname, msg); end - # source://activesupport//lib/active_support/tagged_logging.rb#53 + # source://activesupport//lib/active_support/tagged_logging.rb#52 def clear_tags!; end - # source://activesupport//lib/active_support/tagged_logging.rb#57 + # source://activesupport//lib/active_support/tagged_logging.rb#62 def current_tags; end - # source://activesupport//lib/active_support/tagged_logging.rb#49 - def pop_tags(size = T.unsafe(nil)); end + # source://activesupport//lib/active_support/tagged_logging.rb#48 + def pop_tags(count = T.unsafe(nil)); end - # source://activesupport//lib/active_support/tagged_logging.rb#42 + # source://activesupport//lib/active_support/tagged_logging.rb#44 def push_tags(*tags); end - # source://activesupport//lib/active_support/tagged_logging.rb#35 + # source://activesupport//lib/active_support/tagged_logging.rb#56 + def tag_stack; end + + # source://activesupport//lib/active_support/tagged_logging.rb#37 def tagged(*tags); end - # source://activesupport//lib/active_support/tagged_logging.rb#63 + # source://activesupport//lib/active_support/tagged_logging.rb#66 def tags_text; end end -# source://activesupport//lib/active_support/tagged_logging.rb#73 +# source://activesupport//lib/active_support/tagged_logging.rb#109 module ActiveSupport::TaggedLogging::LocalTagStorage - # Returns the value of attribute current_tags. + # Returns the value of attribute tag_stack. # - # source://activesupport//lib/active_support/tagged_logging.rb#74 - def current_tags; end + # source://activesupport//lib/active_support/tagged_logging.rb#110 + def tag_stack; end - # Sets the attribute current_tags + # Sets the attribute tag_stack # - # @param value the value to set the attribute current_tags to. + # @param value the value to set the attribute tag_stack to. # - # source://activesupport//lib/active_support/tagged_logging.rb#74 - def current_tags=(_arg0); end + # source://activesupport//lib/active_support/tagged_logging.rb#110 + def tag_stack=(_arg0); end class << self # @private # - # source://activesupport//lib/active_support/tagged_logging.rb#76 + # source://activesupport//lib/active_support/tagged_logging.rb#112 def extended(base); end end end -# source://activesupport//lib/active_support/test_case.rb#19 +# source://activesupport//lib/active_support/tagged_logging.rb#71 +class ActiveSupport::TaggedLogging::TagStack + # @return [TagStack] a new instance of TagStack + # + # source://activesupport//lib/active_support/tagged_logging.rb#74 + def initialize; end + + # source://activesupport//lib/active_support/tagged_logging.rb#92 + def clear; end + + # source://activesupport//lib/active_support/tagged_logging.rb#97 + def format_message(message); end + + # source://activesupport//lib/active_support/tagged_logging.rb#87 + def pop_tags(count); end + + # source://activesupport//lib/active_support/tagged_logging.rb#79 + def push_tags(tags); end + + # Returns the value of attribute tags. + # + # source://activesupport//lib/active_support/tagged_logging.rb#72 + def tags; end +end + +# source://activesupport//lib/active_support/test_case.rb#20 class ActiveSupport::TestCase < ::Minitest::Test include ::ActiveSupport::Testing::SetupAndTeardown include ::ActiveSupport::Testing::TaggedLogging include ::ActiveSupport::Callbacks include ::ActiveSupport::Testing::Assertions + include ::ActiveSupport::Testing::ErrorReporterAssertions include ::ActiveSupport::Testing::Deprecation + include ::ActiveSupport::Testing::ConstantStubbing include ::ActiveSupport::Testing::TimeHelpers include ::ActiveSupport::Testing::FileFixtures extend ::ActiveSupport::Callbacks::ClassMethods @@ -10563,100 +12401,95 @@ class ActiveSupport::TestCase < ::Minitest::Test extend ::ActiveSupport::Testing::SetupAndTeardown::ClassMethods extend ::ActiveSupport::Testing::Declarative - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport//lib/active_support/callbacks.rb#928 + # source://activesupport//lib/active_support/callbacks.rb#951 def _run_setup_callbacks(&block); end - # source://activesupport//lib/active_support/callbacks.rb#928 + # source://activesupport//lib/active_support/callbacks.rb#951 def _run_teardown_callbacks(&block); end - # source://activesupport//lib/active_support/callbacks.rb#940 + # source://activesupport//lib/active_support/callbacks.rb#963 def _setup_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#940 + # source://activesupport//lib/active_support/callbacks.rb#963 def _teardown_callbacks; end - # source://minitest/5.18.1/lib/minitest/assertions.rb#735 + # source://minitest/5.22.2/lib/minitest/assertions.rb#736 def assert_no_match(matcher, obj, msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#664 + # source://minitest/5.22.2/lib/minitest/assertions.rb#665 def assert_not_empty(obj, msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#675 + # source://minitest/5.22.2/lib/minitest/assertions.rb#676 def assert_not_equal(exp, act, msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#687 + # source://minitest/5.22.2/lib/minitest/assertions.rb#688 def assert_not_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#699 + # source://minitest/5.22.2/lib/minitest/assertions.rb#700 def assert_not_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#706 + # source://minitest/5.22.2/lib/minitest/assertions.rb#707 def assert_not_includes(collection, obj, msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#717 + # source://minitest/5.22.2/lib/minitest/assertions.rb#718 def assert_not_instance_of(cls, obj, msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#727 + # source://minitest/5.22.2/lib/minitest/assertions.rb#728 def assert_not_kind_of(cls, obj, msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#745 + # source://minitest/5.22.2/lib/minitest/assertions.rb#746 def assert_not_nil(obj, msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#780 + # source://minitest/5.22.2/lib/minitest/assertions.rb#781 def assert_not_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#803 + # source://minitest/5.22.2/lib/minitest/assertions.rb#804 def assert_not_predicate(o1, op, msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#811 - def assert_not_respond_to(obj, meth, msg = T.unsafe(nil)); end + # source://minitest/5.22.2/lib/minitest/assertions.rb#813 + def assert_not_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#820 + # source://minitest/5.22.2/lib/minitest/assertions.rb#822 def assert_not_same(exp, act, msg = T.unsafe(nil)); end - # test/unit backwards compatibility methods - # - # source://minitest/5.18.1/lib/minitest/assertions.rb#422 - def assert_raise(*exp); end - # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path; end # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path?; end - # source://activesupport//lib/active_support/test_case.rb#151 + # source://activesupport//lib/active_support/test_case.rb#298 def inspect; end - # source://minitest/5.18.1/lib/minitest.rb#304 + # source://minitest/5.22.2/lib/minitest.rb#332 def method_name; end class << self - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport//lib/active_support/callbacks.rb#68 + # source://activesupport//lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport//lib/active_support/callbacks.rb#932 + # source://activesupport//lib/active_support/callbacks.rb#955 def _setup_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#936 + # source://activesupport//lib/active_support/callbacks.rb#959 def _setup_callbacks=(value); end - # source://activesupport//lib/active_support/callbacks.rb#932 + # source://activesupport//lib/active_support/callbacks.rb#955 def _teardown_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#936 + # source://activesupport//lib/active_support/callbacks.rb#959 def _teardown_callbacks=(value); end # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 @@ -10691,7 +12524,7 @@ class ActiveSupport::TestCase < ::Minitest::Test # The default parallelization method is to fork processes. If you'd like to # use threads instead you can pass with: :threads to the +parallelize+ # method. Note the threaded parallelization does not create multiple - # database and will not work with system tests at this time. + # databases and will not work with system tests. # # parallelize(workers: :number_of_processors, with: :threads) # @@ -10702,7 +12535,7 @@ class ActiveSupport::TestCase < ::Minitest::Test # number of tests to run is above the +threshold+ param. The default value is # 50, and it's configurable via +config.active_support.test_parallelization_threshold+. # - # source://activesupport//lib/active_support/test_case.rb#79 + # source://activesupport//lib/active_support/test_case.rb#80 def parallelize(workers: T.unsafe(nil), with: T.unsafe(nil), threshold: T.unsafe(nil)); end # Set up hook for parallel testing. This can be used if you have multiple @@ -10719,7 +12552,7 @@ class ActiveSupport::TestCase < ::Minitest::Test # end # end # - # source://activesupport//lib/active_support/test_case.rb#101 + # source://activesupport//lib/active_support/test_case.rb#100 def parallelize_setup(&block); end # Clean up hook for parallel testing. This can be used to drop databases @@ -10736,7 +12569,7 @@ class ActiveSupport::TestCase < ::Minitest::Test # end # end # - # source://activesupport//lib/active_support/test_case.rb#118 + # source://activesupport//lib/active_support/test_case.rb#117 def parallelize_teardown(&block); end # Returns the order in which test cases are run. @@ -10746,7 +12579,7 @@ class ActiveSupport::TestCase < ::Minitest::Test # Possible values are +:random+, +:parallel+, +:alpha+, +:sorted+. # Defaults to +:random+. # - # source://activesupport//lib/active_support/test_case.rb#42 + # source://activesupport//lib/active_support/test_case.rb#43 def test_order; end # Sets the order in which test cases are run. @@ -10759,12 +12592,12 @@ class ActiveSupport::TestCase < ::Minitest::Test # * +:sorted+ (to run tests alphabetically by method name) # * +:alpha+ (equivalent to +:sorted+) # - # source://activesupport//lib/active_support/test_case.rb#32 + # source://activesupport//lib/active_support/test_case.rb#33 def test_order=(new_order); end end end -# source://activesupport//lib/active_support/test_case.rb#20 +# source://activesupport//lib/active_support/test_case.rb#21 ActiveSupport::TestCase::Assertion = Minitest::Assertion # source://activesupport//lib/active_support/testing/tagged_logging.rb#4 @@ -10807,7 +12640,7 @@ module ActiveSupport::Testing::Assertions # post :create, params: { status: { incident: true } } # end # - # source://activesupport//lib/active_support/testing/assertions.rb#175 + # source://activesupport//lib/active_support/testing/assertions.rb#191 def assert_changes(expression, message = T.unsafe(nil), from: T.unsafe(nil), to: T.unsafe(nil), &block); end # Test numeric difference between the return value of an expression as a @@ -10824,7 +12657,7 @@ module ActiveSupport::Testing::Assertions # end # # An arbitrary positive or negative difference can be specified. - # The default is 1. + # The default is +1+. # # assert_difference 'Article.count', -1 do # post :delete, params: { id: ... } @@ -10858,7 +12691,7 @@ module ActiveSupport::Testing::Assertions # post :delete, params: { id: ... } # end # - # source://activesupport//lib/active_support/testing/assertions.rb#86 + # source://activesupport//lib/active_support/testing/assertions.rb#101 def assert_difference(expression, *args, &block); end # Assertion that the result of evaluating an expression is not changed before @@ -10868,7 +12701,7 @@ module ActiveSupport::Testing::Assertions # post :create, params: { status: { ok: true } } # end # - # Provide the optional keyword argument :from to specify the expected + # Provide the optional keyword argument +:from+ to specify the expected # initial value. # # assert_no_changes -> { Status.all_good? }, from: true do @@ -10881,7 +12714,7 @@ module ActiveSupport::Testing::Assertions # post :create, params: { status: { ok: false } } # end # - # source://activesupport//lib/active_support/testing/assertions.rb#222 + # source://activesupport//lib/active_support/testing/assertions.rb#238 def assert_no_changes(expression, message = T.unsafe(nil), from: T.unsafe(nil), &block); end # Assertion that the numeric result of evaluating an expression is not @@ -10909,12 +12742,12 @@ module ActiveSupport::Testing::Assertions # post :create, params: { article: invalid_attributes } # end # - # source://activesupport//lib/active_support/testing/assertions.rb#137 + # source://activesupport//lib/active_support/testing/assertions.rb#153 def assert_no_difference(expression, message = T.unsafe(nil), &block); end - # Asserts that an expression is not truthy. Passes if object is - # +nil+ or +false+. "Truthy" means "considered true in a conditional" - # like if foo. + # Asserts that an expression is not truthy. Passes if +object+ is +nil+ or + # +false+. "Truthy" means "considered true in a conditional" like if + # foo. # # assert_not nil # => true # assert_not false # => true @@ -10935,12 +12768,34 @@ module ActiveSupport::Testing::Assertions # perform_service(param: 'no_exception') # end # - # source://activesupport//lib/active_support/testing/assertions.rb#33 + # source://activesupport//lib/active_support/testing/assertions.rb#48 def assert_nothing_raised; end + # Asserts that a block raises one of +exp+. This is an enhancement of the + # standard Minitest assertion method with the ability to test error + # messages. + # + # assert_raises(ArgumentError, match: /incorrect param/i) do + # perform_service(param: 'exception') + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#34 + def assert_raise(*exp, match: T.unsafe(nil), &block); end + + # Asserts that a block raises one of +exp+. This is an enhancement of the + # standard Minitest assertion method with the ability to test error + # messages. + # + # assert_raises(ArgumentError, match: /incorrect param/i) do + # perform_service(param: 'exception') + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#34 + def assert_raises(*exp, match: T.unsafe(nil), &block); end + private - # source://activesupport//lib/active_support/testing/assertions.rb#249 + # source://activesupport//lib/active_support/testing/assertions.rb#265 def _assert_nothing_raised_or_warn(assertion, &block); end end @@ -10985,6 +12840,28 @@ module ActiveSupport::Testing::ConstantLookup::ClassMethods def determine_constant_from_test_name(test_name); end end +# source://activesupport//lib/active_support/testing/constant_stubbing.rb#5 +module ActiveSupport::Testing::ConstantStubbing + # Changes the value of a constant for the duration of a block. Example: + # + # # World::List::Import::LARGE_IMPORT_THRESHOLD = 5000 + # stub_const(World::List::Import, :LARGE_IMPORT_THRESHOLD, 1) do + # assert_equal 1, World::List::Import::LARGE_IMPORT_THRESHOLD + # end + # + # assert_equal 5000, World::List::Import::LARGE_IMPORT_THRESHOLD + # + # Using this method rather than forcing World::List::Import::LARGE_IMPORT_THRESHOLD = 5000 prevents + # warnings from being thrown, and ensures that the old value is returned after the test has completed. + # + # Note: Stubbing a const will stub it across all threads. So if you have concurrent threads + # (like separate test suites running in parallel) that all depend on the same constant, it's possible + # divergent stubbing will trample on each other. + # + # source://activesupport//lib/active_support/testing/constant_stubbing.rb#21 + def stub_const(mod, constant, new_value); end +end + # source://activesupport//lib/active_support/testing/declarative.rb#5 module ActiveSupport::Testing::Declarative # Helper to define a test method using a String. Under the hood, it replaces @@ -11000,6 +12877,10 @@ end # source://activesupport//lib/active_support/testing/deprecation.rb#7 module ActiveSupport::Testing::Deprecation + # :call-seq: + # assert_deprecated(deprecator, &block) + # assert_deprecated(match, deprecator, &block) + # # Asserts that a matching deprecation warning was emitted by the given deprecator during the execution of the yielded block. # # assert_deprecated(/foo/, CustomDeprecator) do @@ -11014,17 +12895,11 @@ module ActiveSupport::Testing::Deprecation # # If the +match+ is omitted (or explicitly +nil+), any deprecation warning will match. # - # assert_deprecated(nil, CustomDeprecator) do + # assert_deprecated(CustomDeprecator) do # CustomDeprecator.warn "foo should no longer be used" # end # - # If no +deprecator+ is given, defaults to ActiveSupport::Deprecation. - # - # assert_deprecated do - # ActiveSupport::Deprecation.warn "foo should no longer be used" - # end - # - # source://activesupport//lib/active_support/testing/deprecation.rb#31 + # source://activesupport//lib/active_support/testing/deprecation.rb#30 def assert_deprecated(match = T.unsafe(nil), deprecator = T.unsafe(nil), &block); end # Asserts that no deprecation warnings are emitted by the given deprecator during the execution of the yielded block. @@ -11033,35 +12908,149 @@ module ActiveSupport::Testing::Deprecation # CustomDeprecator.warn "message" # fails assertion # end # - # If no +deprecator+ is given, defaults to ActiveSupport::Deprecation. - # - # assert_not_deprecated do - # ActiveSupport::Deprecation.warn "message" # fails assertion - # end - # - # assert_not_deprecated do - # CustomDeprecator.warn "message" # passes assertion + # assert_not_deprecated(ActiveSupport::Deprecation.new) do + # CustomDeprecator.warn "message" # passes assertion, different deprecator # end # - # source://activesupport//lib/active_support/testing/deprecation.rb#56 + # source://activesupport//lib/active_support/testing/deprecation.rb#54 def assert_not_deprecated(deprecator = T.unsafe(nil), &block); end - # Returns an array of all the deprecation warnings emitted by the given + # Returns the return value of the block and an array of all the deprecation warnings emitted by the given # +deprecator+ during the execution of the yielded block. # # collect_deprecations(CustomDeprecator) do # CustomDeprecator.warn "message" - # end # => ["message"] + # ActiveSupport::Deprecation.new.warn "other message" + # :result + # end # => [:result, ["message"]] + # + # source://activesupport//lib/active_support/testing/deprecation.rb#72 + def collect_deprecations(deprecator = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#5 +module ActiveSupport::Testing::ErrorReporterAssertions + # Assertion that the block should cause at least one exception to be reported + # to +Rails.error+. + # + # Passes if the evaluated code in the yielded block reports a matching exception. + # + # assert_error_reported(IOError) do + # Rails.error.report(IOError.new("Oops")) + # end + # + # To test further details about the reported exception, you can use the return + # value. + # + # report = assert_error_reported(IOError) do + # # ... + # end + # assert_equal "Oops", report.error.message + # assert_equal "admin", report.context[:section] + # assert_equal :warning, report.severity + # assert_predicate report, :handled? + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#88 + def assert_error_reported(error_class = T.unsafe(nil), &block); end + + # Assertion that the block should not cause an exception to be reported + # to +Rails.error+. + # + # Passes if evaluated code in the yielded block reports no exception. + # + # assert_no_error_reported do + # perform_service(param: 'no_exception') + # end + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#62 + def assert_no_error_reported(&block); end +end + +# source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#6 +module ActiveSupport::Testing::ErrorReporterAssertions::ErrorCollector + class << self + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#16 + def record; end + + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#29 + def report(error, **kwargs); end + + private + + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#38 + def subscribe; end + end +end + +# source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 +class ActiveSupport::Testing::ErrorReporterAssertions::ErrorCollector::Report < ::Struct + # Returns the value of attribute context + # + # @return [Object] the current value of context + def context; end + + # Sets the attribute context + # + # @param value [Object] the value to set the attribute context to. + # @return [Object] the newly set value + def context=(_); end + + # Returns the value of attribute error + # + # @return [Object] the current value of error + def error; end + + # Sets the attribute error + # + # @param value [Object] the value to set the attribute error to. + # @return [Object] the newly set value + def error=(_); end + + # Returns the value of attribute handled + # + # @return [Object] the current value of handled + def handled; end + + # Sets the attribute handled + # + # @param value [Object] the value to set the attribute handled to. + # @return [Object] the newly set value + def handled=(_); end + + # Returns the value of attribute handled + # + # @return [Object] the current value of handled + def handled?; end + + # Returns the value of attribute severity + # + # @return [Object] the current value of severity + def severity; end + + # Sets the attribute severity # - # If no +deprecator+ is given, defaults to ActiveSupport::Deprecation. + # @param value [Object] the value to set the attribute severity to. + # @return [Object] the newly set value + def severity=(_); end + + # Returns the value of attribute source # - # collect_deprecations do - # CustomDeprecator.warn "custom message" - # ActiveSupport::Deprecation.warn "message" - # end # => ["message"] + # @return [Object] the current value of source + def source; end + + # Sets the attribute source # - # source://activesupport//lib/active_support/testing/deprecation.rb#75 - def collect_deprecations(deprecator = T.unsafe(nil)); end + # @param value [Object] the value to set the attribute source to. + # @return [Object] the newly set value + def source=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end end # Adds simple access to sample files called file fixtures. @@ -11126,7 +13115,7 @@ end # source://activesupport//lib/active_support/testing/isolation.rb#64 module ActiveSupport::Testing::Isolation::Subprocess - # Complicated H4X to get this working in windows / jruby with + # Complicated H4X to get this working in Windows / JRuby with # no forking. # # source://activesupport//lib/active_support/testing/isolation.rb#69 @@ -11255,7 +13244,7 @@ class ActiveSupport::Testing::ParallelizeExecutor # source://activesupport//lib/active_support/testing/parallelize_executor.rb#8 def initialize(size:, with:, threshold: T.unsafe(nil)); end - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#21 + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#22 def <<(work); end # Returns the value of attribute parallelize_with. @@ -11263,7 +13252,7 @@ class ActiveSupport::Testing::ParallelizeExecutor # source://activesupport//lib/active_support/testing/parallelize_executor.rb#6 def parallelize_with; end - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#25 + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#26 def shutdown; end # Returns the value of attribute size. @@ -11271,7 +13260,7 @@ class ActiveSupport::Testing::ParallelizeExecutor # source://activesupport//lib/active_support/testing/parallelize_executor.rb#6 def size; end - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#14 + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#15 def start; end # Returns the value of attribute threshold. @@ -11281,32 +13270,37 @@ class ActiveSupport::Testing::ParallelizeExecutor private - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#34 + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#35 def build_parallel_executor; end - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#67 + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#72 def execution_info; end - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#30 + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#60 + def many_workers?; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#31 def parallel_executor; end - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#46 + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#47 def parallelize; end # @return [Boolean] # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#51 + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#52 def parallelized?; end # @return [Boolean] # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#55 + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#56 def should_parallelize?; end - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#63 + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#68 def show_execution_info; end - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#59 + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#64 def tests_count; end end @@ -11353,11 +13347,11 @@ end # Manages stubs for TimeHelpers # -# source://activesupport//lib/active_support/testing/time_helpers.rb#10 +# source://activesupport//lib/active_support/testing/time_helpers.rb#9 class ActiveSupport::Testing::SimpleStubs # @return [SimpleStubs] a new instance of SimpleStubs # - # source://activesupport//lib/active_support/testing/time_helpers.rb#13 + # source://activesupport//lib/active_support/testing/time_helpers.rb#12 def initialize; end # Stubs object.method_name with the given block @@ -11368,36 +13362,36 @@ class ActiveSupport::Testing::SimpleStubs # simple_stubs.stub_object(Time, :now) { at(target.to_i) } # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 # - # source://activesupport//lib/active_support/testing/time_helpers.rb#24 + # source://activesupport//lib/active_support/testing/time_helpers.rb#23 def stub_object(object, method_name, &block); end # Returns true if any stubs are set, false if there are none # # @return [Boolean] # - # source://activesupport//lib/active_support/testing/time_helpers.rb#54 + # source://activesupport//lib/active_support/testing/time_helpers.rb#53 def stubbed?; end # Returns the Stub for object#method_name # (nil if it is not stubbed) # - # source://activesupport//lib/active_support/testing/time_helpers.rb#49 + # source://activesupport//lib/active_support/testing/time_helpers.rb#48 def stubbing(object, method_name); end # Remove all object-method stubs held by this instance # - # source://activesupport//lib/active_support/testing/time_helpers.rb#38 + # source://activesupport//lib/active_support/testing/time_helpers.rb#37 def unstub_all!; end private # Restores the original object.method described by the Stub # - # source://activesupport//lib/active_support/testing/time_helpers.rb#60 + # source://activesupport//lib/active_support/testing/time_helpers.rb#59 def unstub_object(stub); end end -# source://activesupport//lib/active_support/testing/time_helpers.rb#11 +# source://activesupport//lib/active_support/testing/time_helpers.rb#10 class ActiveSupport::Testing::SimpleStubs::Stub < ::Struct # Returns the value of attribute method_name # @@ -11474,12 +13468,12 @@ end # Contains helpers that help you test passage of time. # -# source://activesupport//lib/active_support/testing/time_helpers.rb#69 +# source://activesupport//lib/active_support/testing/time_helpers.rb#68 module ActiveSupport::Testing::TimeHelpers - # source://activesupport//lib/active_support/testing/time_helpers.rb#70 + # source://activesupport//lib/active_support/testing/time_helpers.rb#69 def after_teardown; end - # Calls +travel_to+ with +Time.now+. + # Calls +travel_to+ with +Time.now+. Forwards optional with_usec argument. # # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 # freeze_time @@ -11496,13 +13490,18 @@ module ActiveSupport::Testing::TimeHelpers # end # Time.current # => Sun, 09 Jul 2017 15:34:50 EST -05:00 # - # source://activesupport//lib/active_support/testing/time_helpers.rb#234 - def freeze_time(&block); end + # source://activesupport//lib/active_support/testing/time_helpers.rb#256 + def freeze_time(with_usec: T.unsafe(nil), &block); end # Changes current time to the time in the future or in the past by a given time difference by # stubbing +Time.now+, +Date.today+, and +DateTime.now+. The stubs are automatically removed # at the end of the test. # + # Note that the usec for the resulting time will be set to 0 to prevent rounding + # errors with external services, like MySQL (which will round instead of floor, + # leading to off-by-one-second errors), unless the with_usec argument + # is set to true. + # # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 # travel 1.day # Time.current # => Sun, 10 Nov 2013 15:34:49 EST -05:00 @@ -11518,8 +13517,8 @@ module ActiveSupport::Testing::TimeHelpers # end # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 # - # source://activesupport//lib/active_support/testing/time_helpers.rb#93 - def travel(duration, &block); end + # source://activesupport//lib/active_support/testing/time_helpers.rb#97 + def travel(duration, with_usec: T.unsafe(nil), &block); end # Returns the current time back to its original state, by removing the stubs added by # +travel+, +travel_to+, and +freeze_time+. @@ -11545,10 +13544,10 @@ module ActiveSupport::Testing::TimeHelpers # # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 # - # source://activesupport//lib/active_support/testing/time_helpers.rb#208 + # source://activesupport//lib/active_support/testing/time_helpers.rb#230 def travel_back; end - # Changes current time to the given time by stubbing +Time.now+, + # Changes current time to the given time by stubbing +Time.now+, +Time.new+, # +Date.today+, and +DateTime.now+ to return the time or date passed into this method. # The stubs are automatically removed at the end of the test. # @@ -11569,7 +13568,8 @@ module ActiveSupport::Testing::TimeHelpers # # Note that the usec for the time passed will be set to 0 to prevent rounding # errors with external services, like MySQL (which will round instead of floor, - # leading to off-by-one-second errors). + # leading to off-by-one-second errors), unless the with_usec argument + # is set to true. # # This method also accepts a block, which will return the current time back to its original # state at the end of the block: @@ -11580,8 +13580,8 @@ module ActiveSupport::Testing::TimeHelpers # end # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 # - # source://activesupport//lib/active_support/testing/time_helpers.rb#128 - def travel_to(date_or_time); end + # source://activesupport//lib/active_support/testing/time_helpers.rb#133 + def travel_to(date_or_time, with_usec: T.unsafe(nil)); end # Returns the current time back to its original state, by removing the stubs added by # +travel+, +travel_to+, and +freeze_time+. @@ -11607,27 +13607,29 @@ module ActiveSupport::Testing::TimeHelpers # # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 # - # source://activesupport//lib/active_support/testing/time_helpers.rb#208 + # source://activesupport//lib/active_support/testing/time_helpers.rb#230 def unfreeze_time; end private # Returns the value of attribute in_block. # - # source://activesupport//lib/active_support/testing/time_helpers.rb#243 + # source://activesupport//lib/active_support/testing/time_helpers.rb#265 def in_block; end # Sets the attribute in_block # # @param value the value to set the attribute in_block to. # - # source://activesupport//lib/active_support/testing/time_helpers.rb#243 + # source://activesupport//lib/active_support/testing/time_helpers.rb#265 def in_block=(_arg0); end - # source://activesupport//lib/active_support/testing/time_helpers.rb#239 + # source://activesupport//lib/active_support/testing/time_helpers.rb#261 def simple_stubs; end end +# = Active Support \Time With Zone +# # A Time-like class that can represent a time in any time zone. Necessary # because standard Ruby Time instances are limited to UTC and the # system's ENV['TZ'] zone. @@ -11660,14 +13662,14 @@ end # t.is_a?(Time) # => true # t.is_a?(ActiveSupport::TimeWithZone) # => true # -# source://activesupport//lib/active_support/time_with_zone.rb#42 +# source://activesupport//lib/active_support/time_with_zone.rb#44 class ActiveSupport::TimeWithZone include ::DateAndTime::Compatibility include ::Comparable # @return [TimeWithZone] a new instance of TimeWithZone # - # source://activesupport//lib/active_support/time_with_zone.rb#61 + # source://activesupport//lib/active_support/time_with_zone.rb#51 def initialize(utc_time, time_zone, local_time = T.unsafe(nil), period = T.unsafe(nil)); end # Adds an interval of time to the current object's time and returns that @@ -11687,7 +13689,7 @@ class ActiveSupport::TimeWithZone # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 # - # source://activesupport//lib/active_support/time_with_zone.rb#328 + # source://activesupport//lib/active_support/time_with_zone.rb#299 def +(other); end # Subtracts an interval of time and returns a new TimeWithZone object unless @@ -11713,19 +13715,19 @@ class ActiveSupport::TimeWithZone # # Time.zone.now - 1.day.ago # => 86399.999967 # - # source://activesupport//lib/active_support/time_with_zone.rb#362 + # source://activesupport//lib/active_support/time_with_zone.rb#333 def -(other); end # Use the time in UTC for comparisons. # - # source://activesupport//lib/active_support/time_with_zone.rb#261 + # source://activesupport//lib/active_support/time_with_zone.rb#232 def <=>(other); end # So that +self+ acts_like?(:time). # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#523 + # source://activesupport//lib/active_support/time_with_zone.rb#494 def acts_like_time?; end # Uses Date to provide precise Time calculations for years, months, and days @@ -11750,7 +13752,7 @@ class ActiveSupport::TimeWithZone # now.advance(months: 1) # => Tue, 02 Dec 2014 01:26:28.558049687 EST -05:00 # now.advance(years: 1) # => Mon, 02 Nov 2015 01:26:28.558049687 EST -05:00 # - # source://activesupport//lib/active_support/time_with_zone.rb#451 + # source://activesupport//lib/active_support/time_with_zone.rb#422 def advance(options); end def after?(_arg0); end @@ -11773,7 +13775,7 @@ class ActiveSupport::TimeWithZone # now.ago(24.hours) # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 # now.ago(1.day) # => Sun, 02 Nov 2014 00:26:28.725182881 EDT -04:00 # - # source://activesupport//lib/active_support/time_with_zone.rb#390 + # source://activesupport//lib/active_support/time_with_zone.rb#361 def ago(other); end # Coerces time to a string for JSON encoding. The default format is ISO 8601. @@ -11789,7 +13791,7 @@ class ActiveSupport::TimeWithZone # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").to_json # # => "2005/02/01 05:15:10 -1000" # - # source://activesupport//lib/active_support/time_with_zone.rb#176 + # source://activesupport//lib/active_support/time_with_zone.rb#166 def as_json(options = T.unsafe(nil)); end def before?(_arg0); end @@ -11799,14 +13801,14 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#269 + # source://activesupport//lib/active_support/time_with_zone.rb#240 def between?(min, max); end # An instance of ActiveSupport::TimeWithZone is never blank # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#534 + # source://activesupport//lib/active_support/time_with_zone.rb#505 def blank?; end # Returns a new +ActiveSupport::TimeWithZone+ where one or more of the elements have @@ -11827,15 +13829,15 @@ class ActiveSupport::TimeWithZone # t.change(offset: "-10:00") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00 # t.change(zone: "Hawaii") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00 # - # source://activesupport//lib/active_support/time_with_zone.rb#411 + # source://activesupport//lib/active_support/time_with_zone.rb#382 def change(options); end # Returns a Time instance of the simultaneous time in the UTC timezone. # - # source://activesupport//lib/active_support/time_with_zone.rb#73 + # source://activesupport//lib/active_support/time_with_zone.rb#63 def comparable_time; end - # source://activesupport//lib/active_support/time_with_zone.rb#463 + # source://activesupport//lib/active_support/time_with_zone.rb#434 def day; end # Returns true if the current time is within Daylight Savings Time for the @@ -11847,17 +13849,17 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#104 + # source://activesupport//lib/active_support/time_with_zone.rb#94 def dst?; end - # source://activesupport//lib/active_support/time_with_zone.rb#188 + # source://activesupport//lib/active_support/time_with_zone.rb#178 def encode_with(coder); end # Returns +true+ if +other+ is equal to current object. # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#304 + # source://activesupport//lib/active_support/time_with_zone.rb#275 def eql?(other); end # Returns a formatted string of the offset from UTC, or an alternative @@ -11869,32 +13871,32 @@ class ActiveSupport::TimeWithZone # Time.zone = 'UTC' # => "UTC" # Time.zone.now.formatted_offset(true, "0") # => "0" # - # source://activesupport//lib/active_support/time_with_zone.rb#135 + # source://activesupport//lib/active_support/time_with_zone.rb#125 def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - # source://activesupport//lib/active_support/time_with_zone.rb#538 + # source://activesupport//lib/active_support/time_with_zone.rb#509 def freeze; end # Returns true if the current object's time is in the future. # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#299 + # source://activesupport//lib/active_support/time_with_zone.rb#270 def future?; end # Returns a Time instance of the simultaneous time in the UTC timezone. # - # source://activesupport//lib/active_support/time_with_zone.rb#73 + # source://activesupport//lib/active_support/time_with_zone.rb#63 def getgm; end # Returns a Time instance of the simultaneous time in the system timezone. # - # source://activesupport//lib/active_support/time_with_zone.rb#93 + # source://activesupport//lib/active_support/time_with_zone.rb#83 def getlocal(utc_offset = T.unsafe(nil)); end # Returns a Time instance of the simultaneous time in the UTC timezone. # - # source://activesupport//lib/active_support/time_with_zone.rb#73 + # source://activesupport//lib/active_support/time_with_zone.rb#63 def getutc; end # Returns true if the current time zone is set to UTC. @@ -11906,28 +13908,28 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#115 + # source://activesupport//lib/active_support/time_with_zone.rb#105 def gmt?; end # Returns the offset from current time to UTC time in seconds. # - # source://activesupport//lib/active_support/time_with_zone.rb#121 + # source://activesupport//lib/active_support/time_with_zone.rb#111 def gmt_offset; end # Returns a Time instance of the simultaneous time in the UTC timezone. # - # source://activesupport//lib/active_support/time_with_zone.rb#73 + # source://activesupport//lib/active_support/time_with_zone.rb#63 def gmtime; end # Returns the offset from current time to UTC time in seconds. # - # source://activesupport//lib/active_support/time_with_zone.rb#121 + # source://activesupport//lib/active_support/time_with_zone.rb#111 def gmtoff; end - # source://activesupport//lib/active_support/time_with_zone.rb#308 + # source://activesupport//lib/active_support/time_with_zone.rb#279 def hash; end - # source://activesupport//lib/active_support/time_with_zone.rb#463 + # source://activesupport//lib/active_support/time_with_zone.rb#434 def hour; end # Returns a string of the object's date and time in the format used by @@ -11935,7 +13937,7 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.httpdate # => "Tue, 01 Jan 2013 04:39:43 GMT" # - # source://activesupport//lib/active_support/time_with_zone.rb#196 + # source://activesupport//lib/active_support/time_with_zone.rb#186 def httpdate; end # Adds an interval of time to the current object's time and returns that @@ -11955,29 +13957,29 @@ class ActiveSupport::TimeWithZone # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 # - # source://activesupport//lib/active_support/time_with_zone.rb#328 + # source://activesupport//lib/active_support/time_with_zone.rb#299 def in(other); end # Returns the simultaneous time in Time.zone, or the specified zone. # - # source://activesupport//lib/active_support/time_with_zone.rb#87 + # source://activesupport//lib/active_support/time_with_zone.rb#77 def in_time_zone(new_zone = T.unsafe(nil)); end - # source://activesupport//lib/active_support/time_with_zone.rb#184 + # source://activesupport//lib/active_support/time_with_zone.rb#174 def init_with(coder); end # Returns a string of the object's date, time, zone, and offset from UTC. # # Time.zone.now.inspect # => "Thu, 04 Dec 2014 11:00:25.624541392 EST -05:00" # - # source://activesupport//lib/active_support/time_with_zone.rb#150 + # source://activesupport//lib/active_support/time_with_zone.rb#140 def inspect; end # Say we're a Time to thwart type checking. # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#528 + # source://activesupport//lib/active_support/time_with_zone.rb#499 def is_a?(klass); end # Returns true if the current time is within Daylight Savings Time for the @@ -11989,7 +13991,7 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#104 + # source://activesupport//lib/active_support/time_with_zone.rb#94 def isdst; end # Returns a string of the object's date and time in the ISO 8601 standard @@ -11997,43 +13999,43 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" # - # source://activesupport//lib/active_support/time_with_zone.rb#158 + # source://activesupport//lib/active_support/time_with_zone.rb#148 def iso8601(fraction_digits = T.unsafe(nil)); end # Say we're a Time to thwart type checking. # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#528 + # source://activesupport//lib/active_support/time_with_zone.rb#499 def kind_of?(klass); end # Returns a Time instance of the simultaneous time in the system timezone. # - # source://activesupport//lib/active_support/time_with_zone.rb#93 + # source://activesupport//lib/active_support/time_with_zone.rb#83 def localtime(utc_offset = T.unsafe(nil)); end - # source://activesupport//lib/active_support/time_with_zone.rb#544 + # source://activesupport//lib/active_support/time_with_zone.rb#515 def marshal_dump; end - # source://activesupport//lib/active_support/time_with_zone.rb#548 + # source://activesupport//lib/active_support/time_with_zone.rb#519 def marshal_load(variables); end - # source://activesupport//lib/active_support/time_with_zone.rb#463 + # source://activesupport//lib/active_support/time_with_zone.rb#434 def mday; end # Send the missing method to +time+ instance, and wrap result in a new # TimeWithZone with the existing +time_zone+. # - # source://activesupport//lib/active_support/time_with_zone.rb#569 + # source://activesupport//lib/active_support/time_with_zone.rb#540 def method_missing(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/time_with_zone.rb#463 + # source://activesupport//lib/active_support/time_with_zone.rb#434 def min; end - # source://activesupport//lib/active_support/time_with_zone.rb#463 + # source://activesupport//lib/active_support/time_with_zone.rb#434 def mon; end - # source://activesupport//lib/active_support/time_with_zone.rb#463 + # source://activesupport//lib/active_support/time_with_zone.rb#434 def month; end # Returns true if the current object's time falls within @@ -12041,22 +14043,22 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#286 + # source://activesupport//lib/active_support/time_with_zone.rb#257 def next_day?; end - # source://activesupport//lib/active_support/time_with_zone.rb#463 + # source://activesupport//lib/active_support/time_with_zone.rb#434 def nsec; end # Returns true if the current object's time is in the past. # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#274 + # source://activesupport//lib/active_support/time_with_zone.rb#245 def past?; end - # Returns the underlying TZInfo::TimezonePeriod. + # Returns the underlying +TZInfo::TimezonePeriod+. # - # source://activesupport//lib/active_support/time_with_zone.rb#82 + # source://activesupport//lib/active_support/time_with_zone.rb#72 def period; end # Returns true if the current object's time falls within @@ -12064,7 +14066,7 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#293 + # source://activesupport//lib/active_support/time_with_zone.rb#264 def prev_day?; end # respond_to_missing? is not called in some cases, such as when type conversion is @@ -12072,7 +14074,7 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#554 + # source://activesupport//lib/active_support/time_with_zone.rb#525 def respond_to?(sym, include_priv = T.unsafe(nil)); end # Returns a string of the object's date and time in the RFC 2822 standard @@ -12080,7 +14082,7 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.rfc2822 # => "Tue, 01 Jan 2013 04:51:39 +0000" # - # source://activesupport//lib/active_support/time_with_zone.rb#204 + # source://activesupport//lib/active_support/time_with_zone.rb#194 def rfc2822; end # Returns a string of the object's date and time in the ISO 8601 standard @@ -12088,7 +14090,7 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" # - # source://activesupport//lib/active_support/time_with_zone.rb#158 + # source://activesupport//lib/active_support/time_with_zone.rb#148 def rfc3339(fraction_digits = T.unsafe(nil)); end # Returns a string of the object's date and time in the RFC 2822 standard @@ -12096,10 +14098,10 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.rfc2822 # => "Tue, 01 Jan 2013 04:51:39 +0000" # - # source://activesupport//lib/active_support/time_with_zone.rb#204 + # source://activesupport//lib/active_support/time_with_zone.rb#194 def rfc822; end - # source://activesupport//lib/active_support/time_with_zone.rb#463 + # source://activesupport//lib/active_support/time_with_zone.rb#434 def sec; end # Adds an interval of time to the current object's time and returns that @@ -12119,23 +14121,23 @@ class ActiveSupport::TimeWithZone # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 # - # source://activesupport//lib/active_support/time_with_zone.rb#328 + # source://activesupport//lib/active_support/time_with_zone.rb#299 def since(other); end # Replaces %Z directive with +zone before passing to Time#strftime, # so that zone information is correct. # - # source://activesupport//lib/active_support/time_with_zone.rb#255 + # source://activesupport//lib/active_support/time_with_zone.rb#226 def strftime(format); end # Returns a Time instance that represents the time in +time_zone+. # - # source://activesupport//lib/active_support/time_with_zone.rb#68 + # source://activesupport//lib/active_support/time_with_zone.rb#58 def time; end # Returns the value of attribute time_zone. # - # source://activesupport//lib/active_support/time_with_zone.rb#59 + # source://activesupport//lib/active_support/time_with_zone.rb#49 def time_zone; end # Returns Array of parts of Time in sequence of @@ -12144,10 +14146,10 @@ class ActiveSupport::TimeWithZone # now = Time.zone.now # => Tue, 18 Aug 2015 02:29:27.485278555 UTC +00:00 # now.to_a # => [27, 29, 2, 18, 8, 2015, 2, 230, false, "UTC"] # - # source://activesupport//lib/active_support/time_with_zone.rb#474 + # source://activesupport//lib/active_support/time_with_zone.rb#445 def to_a; end - # source://activesupport//lib/active_support/time_with_zone.rb#463 + # source://activesupport//lib/active_support/time_with_zone.rb#434 def to_date; end # Returns an instance of DateTime with the timezone's UTC offset @@ -12155,7 +14157,7 @@ class ActiveSupport::TimeWithZone # Time.zone.now.to_datetime # => Tue, 18 Aug 2015 02:32:20 +0000 # Time.current.in_time_zone('Hawaii').to_datetime # => Mon, 17 Aug 2015 16:32:20 -1000 # - # source://activesupport//lib/active_support/time_with_zone.rb#507 + # source://activesupport//lib/active_support/time_with_zone.rb#478 def to_datetime; end # Returns the object's date and time as a floating-point number of seconds @@ -12163,7 +14165,7 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.to_f # => 1417709320.285418 # - # source://activesupport//lib/active_support/time_with_zone.rb#482 + # source://activesupport//lib/active_support/time_with_zone.rb#453 def to_f; end # Returns a string of the object's date and time. @@ -12173,9 +14175,9 @@ class ActiveSupport::TimeWithZone # Accepts an optional format: # * :default - default value, mimics Ruby Time#to_s format. # * :db - format outputs time in UTC :db time. See Time#to_fs(:db). - # * Any key in Time::DATE_FORMATS can be used. See active_support/core_ext/time/conversions.rb. + # * Any key in +Time::DATE_FORMATS+ can be used. See active_support/core_ext/time/conversions.rb. # - # source://activesupport//lib/active_support/time_with_zone.rb#241 + # source://activesupport//lib/active_support/time_with_zone.rb#212 def to_formatted_s(format = T.unsafe(nil)); end # Returns a string of the object's date and time. @@ -12185,9 +14187,9 @@ class ActiveSupport::TimeWithZone # Accepts an optional format: # * :default - default value, mimics Ruby Time#to_s format. # * :db - format outputs time in UTC :db time. See Time#to_fs(:db). - # * Any key in Time::DATE_FORMATS can be used. See active_support/core_ext/time/conversions.rb. + # * Any key in +Time::DATE_FORMATS+ can be used. See active_support/core_ext/time/conversions.rb. # - # source://activesupport//lib/active_support/time_with_zone.rb#241 + # source://activesupport//lib/active_support/time_with_zone.rb#212 def to_fs(format = T.unsafe(nil)); end # Returns the object's date and time as an integer number of seconds @@ -12195,7 +14197,7 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.to_i # => 1417709320 # - # source://activesupport//lib/active_support/time_with_zone.rb#490 + # source://activesupport//lib/active_support/time_with_zone.rb#461 def to_i; end # Returns the object's date and time as a rational number of seconds @@ -12203,19 +14205,19 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.to_r # => (708854548642709/500000) # - # source://activesupport//lib/active_support/time_with_zone.rb#499 + # source://activesupport//lib/active_support/time_with_zone.rb#470 def to_r; end # Returns a string of the object's date and time. # - # source://activesupport//lib/active_support/time_with_zone.rb#212 - def to_s(format = T.unsafe(nil)); end + # source://activesupport//lib/active_support/time_with_zone.rb#200 + def to_s; end # Returns an instance of +Time+, either with the same UTC offset # as +self+ or in the local system timezone depending on the setting # of +ActiveSupport.to_time_preserves_timezone+. # - # source://activesupport//lib/active_support/time_with_zone.rb#514 + # source://activesupport//lib/active_support/time_with_zone.rb#485 def to_time; end # Returns true if the current object's time falls within @@ -12223,7 +14225,7 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#280 + # source://activesupport//lib/active_support/time_with_zone.rb#251 def today?; end # Returns true if the current object's time falls within @@ -12231,7 +14233,7 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#286 + # source://activesupport//lib/active_support/time_with_zone.rb#257 def tomorrow?; end # Returns the object's date and time as an integer number of seconds @@ -12239,15 +14241,15 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.to_i # => 1417709320 # - # source://activesupport//lib/active_support/time_with_zone.rb#490 + # source://activesupport//lib/active_support/time_with_zone.rb#461 def tv_sec; end - # source://activesupport//lib/active_support/time_with_zone.rb#463 + # source://activesupport//lib/active_support/time_with_zone.rb#434 def usec; end # Returns a Time instance of the simultaneous time in the UTC timezone. # - # source://activesupport//lib/active_support/time_with_zone.rb#73 + # source://activesupport//lib/active_support/time_with_zone.rb#63 def utc; end # Returns true if the current time zone is set to UTC. @@ -12259,15 +14261,15 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#115 + # source://activesupport//lib/active_support/time_with_zone.rb#105 def utc?; end # Returns the offset from current time to UTC time in seconds. # - # source://activesupport//lib/active_support/time_with_zone.rb#121 + # source://activesupport//lib/active_support/time_with_zone.rb#111 def utc_offset; end - # source://activesupport//lib/active_support/time_with_zone.rb#463 + # source://activesupport//lib/active_support/time_with_zone.rb#434 def wday; end # Returns a string of the object's date and time in the ISO 8601 standard @@ -12275,13 +14277,13 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" # - # source://activesupport//lib/active_support/time_with_zone.rb#158 + # source://activesupport//lib/active_support/time_with_zone.rb#148 def xmlschema(fraction_digits = T.unsafe(nil)); end - # source://activesupport//lib/active_support/time_with_zone.rb#463 + # source://activesupport//lib/active_support/time_with_zone.rb#434 def yday; end - # source://activesupport//lib/active_support/time_with_zone.rb#463 + # source://activesupport//lib/active_support/time_with_zone.rb#434 def year; end # Returns true if the current object's time falls within @@ -12289,7 +14291,7 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#293 + # source://activesupport//lib/active_support/time_with_zone.rb#264 def yesterday?; end # Returns the time zone abbreviation. @@ -12297,20 +14299,20 @@ class ActiveSupport::TimeWithZone # Time.zone = 'Eastern Time (US & Canada)' # => "Eastern Time (US & Canada)" # Time.zone.now.zone # => "EST" # - # source://activesupport//lib/active_support/time_with_zone.rb#143 + # source://activesupport//lib/active_support/time_with_zone.rb#133 def zone; end private # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#605 + # source://activesupport//lib/active_support/time_with_zone.rb#576 def duration_of_variable_length?(obj); end - # source://activesupport//lib/active_support/time_with_zone.rb#586 + # source://activesupport//lib/active_support/time_with_zone.rb#557 def get_period_and_ensure_valid_local_time(period); end - # source://activesupport//lib/active_support/time_with_zone.rb#578 + # source://activesupport//lib/active_support/time_with_zone.rb#549 def incorporate_utc_offset(time, offset); end # Ensure proxy class responds to all methods that underlying time instance @@ -12318,44 +14320,36 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport//lib/active_support/time_with_zone.rb#562 + # source://activesupport//lib/active_support/time_with_zone.rb#533 def respond_to_missing?(sym, include_priv); end - # source://activesupport//lib/active_support/time_with_zone.rb#599 + # source://activesupport//lib/active_support/time_with_zone.rb#570 def transfer_time_values_to_utc_constructor(time); end - # source://activesupport//lib/active_support/time_with_zone.rb#609 + # source://activesupport//lib/active_support/time_with_zone.rb#580 def wrap_with_time_zone(time); end - - class << self - # Report class name as 'Time' to thwart type checking. - # - # source://activesupport//lib/active_support/time_with_zone.rb#44 - def name; end - end end -# source://activesupport//lib/active_support/time_with_zone.rb#209 -ActiveSupport::TimeWithZone::NOT_SET = T.let(T.unsafe(nil), Object) - -# source://activesupport//lib/active_support/time_with_zone.rb#55 +# source://activesupport//lib/active_support/time_with_zone.rb#45 ActiveSupport::TimeWithZone::PRECISIONS = T.let(T.unsafe(nil), Hash) -# source://activesupport//lib/active_support/time_with_zone.rb#576 +# source://activesupport//lib/active_support/time_with_zone.rb#547 ActiveSupport::TimeWithZone::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) -# The TimeZone class serves as a wrapper around TZInfo::Timezone instances. +# = Active Support \Time Zone +# +# The TimeZone class serves as a wrapper around +TZInfo::Timezone+ instances. # It allows us to do the following: # # * Limit the set of zones provided by TZInfo to a meaningful subset of 134 # zones. # * Retrieve and display zones with a friendlier name # (e.g., "Eastern Time (US & Canada)" instead of "America/New_York"). -# * Lazily load TZInfo::Timezone instances only when they're needed. +# * Lazily load +TZInfo::Timezone+ instances only when they're needed. # * Create ActiveSupport::TimeWithZone instances via TimeZone's +local+, # +parse+, +at+, and +now+ methods. # -# If you set config.time_zone in the Rails Application, you can +# If you set config.time_zone in the \Rails Application, you can # access this TimeZone object via Time.zone: # # # application.rb: @@ -12367,7 +14361,7 @@ ActiveSupport::TimeWithZone::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) # Time.zone.name # => "Eastern Time (US & Canada)" # Time.zone.now # => Sun, 18 May 2008 14:30:44 EDT -04:00 # -# source://activesupport//lib/active_support/values/time_zone.rb#29 +# source://activesupport//lib/active_support/values/time_zone.rb#31 class ActiveSupport::TimeZone include ::Comparable @@ -12378,19 +14372,19 @@ class ActiveSupport::TimeZone # # @return [TimeZone] a new instance of TimeZone # - # source://activesupport//lib/active_support/values/time_zone.rb#301 + # source://activesupport//lib/active_support/values/time_zone.rb#303 def initialize(name, utc_offset = T.unsafe(nil), tzinfo = T.unsafe(nil)); end # Compare this time zone to the parameter. The two are compared first on # their offsets, and then by name. # - # source://activesupport//lib/active_support/values/time_zone.rb#324 + # source://activesupport//lib/active_support/values/time_zone.rb#326 def <=>(zone); end # Compare #name and TZInfo identifier to a supplied regexp, returning +true+ # if a match is found. # - # source://activesupport//lib/active_support/values/time_zone.rb#333 + # source://activesupport//lib/active_support/values/time_zone.rb#335 def =~(re); end # Method for creating new ActiveSupport::TimeWithZone instance in time zone @@ -12405,10 +14399,10 @@ class ActiveSupport::TimeZone # Time.zone = 'Hawaii' # => "Hawaii" # Time.at(946684800, 123456.789).nsec # => 123456789 # - # source://activesupport//lib/active_support/values/time_zone.rb#370 + # source://activesupport//lib/active_support/values/time_zone.rb#372 def at(*args); end - # source://activesupport//lib/active_support/values/time_zone.rb#566 + # source://activesupport//lib/active_support/values/time_zone.rb#568 def encode_with(coder); end # Returns a formatted string of the offset from UTC, or an alternative @@ -12418,10 +14412,10 @@ class ActiveSupport::TimeZone # zone.formatted_offset # => "-06:00" # zone.formatted_offset(false) # => "-0600" # - # source://activesupport//lib/active_support/values/time_zone.rb#318 + # source://activesupport//lib/active_support/values/time_zone.rb#320 def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - # source://activesupport//lib/active_support/values/time_zone.rb#562 + # source://activesupport//lib/active_support/values/time_zone.rb#564 def init_with(coder); end # Method for creating new ActiveSupport::TimeWithZone instance in time zone @@ -12438,7 +14432,7 @@ class ActiveSupport::TimeZone # If the string is invalid then an +ArgumentError+ will be raised unlike +parse+ # which usually returns +nil+ when given an invalid date string. # - # source://activesupport//lib/active_support/values/time_zone.rb#387 + # source://activesupport//lib/active_support/values/time_zone.rb#389 def iso8601(str); end # Method for creating new ActiveSupport::TimeWithZone instance in time zone @@ -12447,13 +14441,13 @@ class ActiveSupport::TimeZone # Time.zone = 'Hawaii' # => "Hawaii" # Time.zone.local(2007, 2, 1, 15, 30, 45) # => Thu, 01 Feb 2007 15:30:45 HST -10:00 # - # source://activesupport//lib/active_support/values/time_zone.rb#354 + # source://activesupport//lib/active_support/values/time_zone.rb#356 def local(*args); end # Adjust the given time to the simultaneous time in UTC. Returns a # Time.utc() instance. # - # source://activesupport//lib/active_support/values/time_zone.rb#542 + # source://activesupport//lib/active_support/values/time_zone.rb#544 def local_to_utc(time, dst = T.unsafe(nil)); end # Compare #name and TZInfo identifier to a supplied regexp, returning +true+ @@ -12461,12 +14455,12 @@ class ActiveSupport::TimeZone # # @return [Boolean] # - # source://activesupport//lib/active_support/values/time_zone.rb#339 + # source://activesupport//lib/active_support/values/time_zone.rb#341 def match?(re); end # Returns the value of attribute name. # - # source://activesupport//lib/active_support/values/time_zone.rb#294 + # source://activesupport//lib/active_support/values/time_zone.rb#296 def name; end # Returns an ActiveSupport::TimeWithZone instance representing the current @@ -12475,7 +14469,7 @@ class ActiveSupport::TimeZone # Time.zone = 'Hawaii' # => "Hawaii" # Time.zone.now # => Wed, 23 Jan 2008 20:24:27 HST -10:00 # - # source://activesupport//lib/active_support/values/time_zone.rb#507 + # source://activesupport//lib/active_support/values/time_zone.rb#509 def now; end # Method for creating new ActiveSupport::TimeWithZone instance in time zone @@ -12497,22 +14491,22 @@ class ActiveSupport::TimeZone # # If the string is invalid then an +ArgumentError+ could be raised. # - # source://activesupport//lib/active_support/values/time_zone.rb#444 + # source://activesupport//lib/active_support/values/time_zone.rb#446 def parse(str, now = T.unsafe(nil)); end - # Available so that TimeZone instances respond like TZInfo::Timezone + # Available so that TimeZone instances respond like +TZInfo::Timezone+ # instances. # - # source://activesupport//lib/active_support/values/time_zone.rb#554 + # source://activesupport//lib/active_support/values/time_zone.rb#556 def period_for_local(time, dst = T.unsafe(nil)); end - # Available so that TimeZone instances respond like TZInfo::Timezone + # Available so that TimeZone instances respond like +TZInfo::Timezone+ # instances. # - # source://activesupport//lib/active_support/values/time_zone.rb#548 + # source://activesupport//lib/active_support/values/time_zone.rb#550 def period_for_utc(time); end - # source://activesupport//lib/active_support/values/time_zone.rb#558 + # source://activesupport//lib/active_support/values/time_zone.rb#560 def periods_for_local(time); end # Method for creating new ActiveSupport::TimeWithZone instance in time zone @@ -12530,7 +14524,7 @@ class ActiveSupport::TimeZone # # @raise [ArgumentError] # - # source://activesupport//lib/active_support/values/time_zone.rb#460 + # source://activesupport//lib/active_support/values/time_zone.rb#462 def rfc3339(str); end # Parses +str+ according to +format+ and returns an ActiveSupport::TimeWithZone. @@ -12554,32 +14548,32 @@ class ActiveSupport::TimeZone # # Time.zone.strptime('Mar 2000', '%b %Y') # => Wed, 01 Mar 2000 00:00:00 HST -10:00 # - # source://activesupport//lib/active_support/values/time_zone.rb#498 + # source://activesupport//lib/active_support/values/time_zone.rb#500 def strptime(str, format, now = T.unsafe(nil)); end # Returns a textual representation of this time zone. # - # source://activesupport//lib/active_support/values/time_zone.rb#345 + # source://activesupport//lib/active_support/values/time_zone.rb#347 def to_s; end # Returns the current date in this time zone. # - # source://activesupport//lib/active_support/values/time_zone.rb#512 + # source://activesupport//lib/active_support/values/time_zone.rb#514 def today; end # Returns the next date in this time zone. # - # source://activesupport//lib/active_support/values/time_zone.rb#517 + # source://activesupport//lib/active_support/values/time_zone.rb#519 def tomorrow; end # Returns the value of attribute tzinfo. # - # source://activesupport//lib/active_support/values/time_zone.rb#295 + # source://activesupport//lib/active_support/values/time_zone.rb#297 def tzinfo; end # Returns the offset of this time zone from UTC in seconds. # - # source://activesupport//lib/active_support/values/time_zone.rb#308 + # source://activesupport//lib/active_support/values/time_zone.rb#310 def utc_offset; end # Adjust the given time to the simultaneous time in the time zone @@ -12590,22 +14584,22 @@ class ActiveSupport::TimeZone # As of tzinfo 2, utc_to_local returns a Time with a non-zero utc_offset. # See the +utc_to_local_returns_utc_offset_times+ config for more info. # - # source://activesupport//lib/active_support/values/time_zone.rb#533 + # source://activesupport//lib/active_support/values/time_zone.rb#535 def utc_to_local(time); end # Returns the previous date in this time zone. # - # source://activesupport//lib/active_support/values/time_zone.rb#522 + # source://activesupport//lib/active_support/values/time_zone.rb#524 def yesterday; end private # @raise [ArgumentError] # - # source://activesupport//lib/active_support/values/time_zone.rb#572 + # source://activesupport//lib/active_support/values/time_zone.rb#574 def parts_to_time(parts, now); end - # source://activesupport//lib/active_support/values/time_zone.rb#597 + # source://activesupport//lib/active_support/values/time_zone.rb#599 def time_now; end class << self @@ -12615,35 +14609,35 @@ class ActiveSupport::TimeZone # timezone to find. (The first one with that offset will be returned.) # Returns +nil+ if no such time zone is known to the system. # - # source://activesupport//lib/active_support/values/time_zone.rb#230 + # source://activesupport//lib/active_support/values/time_zone.rb#232 def [](arg); end # Returns an array of all TimeZone objects. There are multiple # TimeZone objects per time zone, in many cases, to make it easier # for users to find their own time zone. # - # source://activesupport//lib/active_support/values/time_zone.rb#221 + # source://activesupport//lib/active_support/values/time_zone.rb#223 def all; end - # source://activesupport//lib/active_support/values/time_zone.rb#263 + # source://activesupport//lib/active_support/values/time_zone.rb#265 def clear; end # A convenience method for returning a collection of TimeZone objects # for time zones in the country specified by its ISO 3166-1 Alpha2 code. # - # source://activesupport//lib/active_support/values/time_zone.rb#258 + # source://activesupport//lib/active_support/values/time_zone.rb#260 def country_zones(country_code); end def create(*_arg0); end - # source://activesupport//lib/active_support/values/time_zone.rb#205 + # source://activesupport//lib/active_support/values/time_zone.rb#207 def find_tzinfo(name); end # Returns a TimeZone instance with the given name, or +nil+ if no # such TimeZone instance exists. (This exists to support the use of # this class with the +composed_of+ macro.) # - # source://activesupport//lib/active_support/values/time_zone.rb#214 + # source://activesupport//lib/active_support/values/time_zone.rb#216 def new(name); end # Assumes self represents an offset from UTC in seconds (as returned from @@ -12651,34 +14645,34 @@ class ActiveSupport::TimeZone # # ActiveSupport::TimeZone.seconds_to_utc_offset(-21_600) # => "-06:00" # - # source://activesupport//lib/active_support/values/time_zone.rb#197 + # source://activesupport//lib/active_support/values/time_zone.rb#199 def seconds_to_utc_offset(seconds, colon = T.unsafe(nil)); end # A convenience method for returning a collection of TimeZone objects # for time zones in the USA. # - # source://activesupport//lib/active_support/values/time_zone.rb#252 + # source://activesupport//lib/active_support/values/time_zone.rb#254 def us_zones; end private - # source://activesupport//lib/active_support/values/time_zone.rb#271 + # source://activesupport//lib/active_support/values/time_zone.rb#273 def load_country_zones(code); end - # source://activesupport//lib/active_support/values/time_zone.rb#285 + # source://activesupport//lib/active_support/values/time_zone.rb#287 def zones_map; end end end -# Keys are Rails TimeZone names, values are TZInfo identifiers. +# Keys are \Rails TimeZone names, values are TZInfo identifiers. # -# source://activesupport//lib/active_support/values/time_zone.rb#31 +# source://activesupport//lib/active_support/values/time_zone.rb#33 ActiveSupport::TimeZone::MAPPING = T.let(T.unsafe(nil), Hash) -# source://activesupport//lib/active_support/values/time_zone.rb#186 +# source://activesupport//lib/active_support/values/time_zone.rb#188 ActiveSupport::TimeZone::UTC_OFFSET_WITHOUT_COLON = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/values/time_zone.rb#185 +# source://activesupport//lib/active_support/values/time_zone.rb#187 ActiveSupport::TimeZone::UTC_OFFSET_WITH_COLON = T.let(T.unsafe(nil), String) # source://activesupport//lib/active_support/core_ext/object/json.rb#35 @@ -12706,7 +14700,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) @@ -12786,10 +14780,10 @@ class ActiveSupport::XMLConverter::DisallowedType < ::StandardError def initialize(type); end end -# = XmlMini +# = \XmlMini # # To use the much faster libxml parser: -# gem 'libxml-ruby', '=0.9.7' +# gem 'libxml-ruby' # XmlMini.backend = 'LibXML' # # source://activesupport//lib/active_support/xml_mini.rb#17 @@ -12967,11 +14961,11 @@ end # source://activesupport//lib/active_support/xml_mini/rexml.rb#11 ActiveSupport::XmlMini_REXML::CONTENT_KEY = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/core_ext/object/blank.rb#83 +# source://activesupport//lib/active_support/core_ext/array/extract_options.rb#14 class Array include ::Enumerable - # source://activesupport//lib/active_support/core_ext/object/json.rb#158 + # source://activesupport//lib/active_support/core_ext/object/json.rb#166 def as_json(options = T.unsafe(nil)); end # Removes all blank elements from the +Array+ in place and returns self. @@ -12981,7 +14975,7 @@ class Array # a.compact_blank! # # => [1, 2, true] # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#325 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#258 def compact_blank!; end # Returns a deep copy of array. @@ -13151,9 +15145,6 @@ class Array # source://activesupport//lib/active_support/core_ext/array/grouping.rb#93 def split(value = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/core_ext/enumerable.rb#310 - def sum(init = T.unsafe(nil), &block); end - # Equal to self[2]. # # %w( a b c d e ).third # => "c" @@ -13180,6 +15171,9 @@ class Array # source://activesupport//lib/active_support/core_ext/array/access.rb#24 def to(position); end + # source://activesupport//lib/active_support/deprecation/method_wrappers.rb#46 + def to_default_s(*args, **_arg1, &block); end + # Extends Array#to_s to convert a collection of elements into a # comma separated id list if :db argument is given as the format. # @@ -13218,9 +15212,6 @@ class Array # source://activesupport//lib/active_support/core_ext/object/to_query.rb#50 def to_query(key); end - # source://activesupport//lib/active_support/core_ext/array/deprecated_conversions.rb#5 - def to_s(format = T.unsafe(nil)); end - # Converts the array to a comma-separated sentence where the last element is # joined by the connector word. # @@ -13351,7 +15342,7 @@ class Array # # # - # source://activesupport//lib/active_support/core_ext/array/conversions.rb#184 + # source://activesupport//lib/active_support/core_ext/array/conversions.rb#185 def to_xml(options = T.unsafe(nil)); end # Returns a copy of the Array excluding the specified elements. @@ -13407,14 +15398,10 @@ class Array end end -# source://activesupport//lib/active_support/core_ext/array/deprecated_conversions.rb#4 -Array::NOT_SET = T.let(T.unsafe(nil), Object) - -# source://activesupport//lib/active_support/core_ext/object/json.rb#118 +# source://activesupport//lib/active_support/core_ext/object/json.rb#126 class BigDecimal < ::Numeric include ::ActiveSupport::BigDecimalWithDefaultFormat include ::ActiveSupport::NumericWithFormat - include ::ActiveSupport::DeprecatedNumericWithFormat # A BigDecimal would be naturally represented as a JSON number. Most libraries, # however, parse non-integer JSON numbers directly as floats. Clients using @@ -13426,15 +15413,17 @@ class BigDecimal < ::Numeric # BigDecimal, it still has the chance to post-process the string and get the # real value. # - # source://activesupport//lib/active_support/core_ext/object/json.rb#128 + # source://activesupport//lib/active_support/core_ext/object/json.rb#136 def as_json(options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/core_ext/numeric/deprecated_conversions.rb#5 - def to_s(format = T.unsafe(nil), options = T.unsafe(nil)); end + # source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#8 + def to_s(format = T.unsafe(nil)); end end # source://activesupport//lib/active_support/core_ext/class/attribute.rb#5 class Class < ::Module + include ::ActiveSupport::DescendantsTracker::ReloadedClassesFiltering + # Declare a class-level attribute whose value is inheritable by subclasses. # Subclasses can change their own value and it will not impact parent class. # @@ -13532,8 +15521,25 @@ class Class < ::Module # class D < C; end # C.descendants # => [B, A, D] # - # source://activesupport//lib/active_support/core_ext/class/subclasses.rb#20 + # source://activesupport//lib/active_support/descendants_tracker.rb#64 def descendants; end + + # Returns an array with the direct children of +self+. + # + # class Foo; end + # class Bar < Foo; end + # class Baz < Bar; end + # + # Foo.subclasses # => [Bar] + # + # source://activesupport//lib/active_support/descendants_tracker.rb#60 + def subclasses; end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#69 +class Data + # source://activesupport//lib/active_support/core_ext/object/json.rb#70 + def as_json(options = T.unsafe(nil)); end end # source://activesupport//lib/active_support/core_ext/date/zones.rb#6 @@ -13586,7 +15592,7 @@ class Date # source://activesupport//lib/active_support/core_ext/date/calculations.rb#55 def ago(seconds); end - # source://activesupport//lib/active_support/core_ext/object/json.rb#197 + # source://activesupport//lib/active_support/core_ext/object/json.rb#205 def as_json(options = T.unsafe(nil)); end # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) @@ -13660,7 +15666,7 @@ class Date # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#62 + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#63 def inspect; end # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) @@ -13691,7 +15697,7 @@ class Date # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#62 + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#63 def readable_inspect; end # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) @@ -13700,6 +15706,9 @@ class Date # source://activesupport//lib/active_support/core_ext/date/calculations.rb#61 def since(seconds); end + # source://activesupport//lib/active_support/deprecation/method_wrappers.rb#46 + def to_default_s(*args, **_arg1, &block); end + # Convert to a formatted string. See DATE_FORMATS for predefined formats. # # This method is aliased to to_formatted_s. @@ -13756,9 +15765,6 @@ class Date # source://activesupport//lib/active_support/core_ext/date/conversions.rb#47 def to_fs(format = T.unsafe(nil)); end - # source://activesupport//lib/active_support/core_ext/date/deprecated_conversions.rb#7 - def to_s(format = T.unsafe(nil)); end - # Converts a Date instance to a Time, where the time is set to the beginning of the day. # The timezone can be either +:local+ or +:utc+ (default +:local+). # @@ -13774,7 +15780,7 @@ class Date # # @raise [ArgumentError] # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#82 + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#83 def to_time(form = T.unsafe(nil)); end # Returns a string which represents the time in used time zone as DateTime @@ -13783,7 +15789,7 @@ class Date # date = Date.new(2015, 05, 23) # => Sat, 23 May 2015 # date.xmlschema # => "2015-05-23T00:00:00+04:00" # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#94 + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#95 def xmlschema; end class << self @@ -13841,9 +15847,6 @@ end # source://activesupport//lib/active_support/core_ext/date/conversions.rb#9 Date::DATE_FORMATS = T.let(T.unsafe(nil), Hash) -# source://activesupport//lib/active_support/core_ext/date/deprecated_conversions.rb#6 -Date::NOT_SET = T.let(T.unsafe(nil), Object) - # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#5 module DateAndTime; end @@ -13858,28 +15861,28 @@ module DateAndTime::Calculations # Returns a Range representing the whole day of the current date/time. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#300 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#310 def all_day; end # Returns a Range representing the whole month of the current date/time. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#311 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#321 def all_month; end # Returns a Range representing the whole quarter of the current date/time. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#316 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#326 def all_quarter; end # Returns a Range representing the whole week of the current date/time. # Week starts on start_day, default is Date.beginning_of_week or config.beginning_of_week when set. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#306 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#316 def all_week(start_day = T.unsafe(nil)); end # Returns a Range representing the whole year of the current date/time. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#321 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#331 def all_year; end # Returns a new date/time at the start of the month. @@ -13913,7 +15916,7 @@ module DateAndTime::Calculations # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. # +DateTime+ objects have their time set to 0:00. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#257 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#267 def at_beginning_of_week(start_day = T.unsafe(nil)); end # Returns a new date/time at the beginning of the year. @@ -13926,13 +15929,13 @@ module DateAndTime::Calculations # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 # now.beginning_of_year # => Thu, 01 Jan 2015 00:00:00 +0000 # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#169 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#179 def at_beginning_of_year; end # Returns a new date/time representing the end of the month. # DateTime objects will have a time set to 23:59:59. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#286 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#296 def at_end_of_month; end # Returns a new date/time at the end of the quarter. @@ -13953,13 +15956,13 @@ module DateAndTime::Calculations # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. # DateTime objects have their time set to 23:59:59. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#273 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#283 def at_end_of_week(start_day = T.unsafe(nil)); end # Returns a new date/time representing the end of the year. # DateTime objects will have a time set to 23:59:59. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#294 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#304 def at_end_of_year; end # Returns true if the date/time falls before date_or_time. @@ -14000,7 +16003,7 @@ module DateAndTime::Calculations # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. # +DateTime+ objects have their time set to 0:00. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#257 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#267 def beginning_of_week(start_day = T.unsafe(nil)); end # Returns a new date/time at the beginning of the year. @@ -14013,7 +16016,7 @@ module DateAndTime::Calculations # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 # now.beginning_of_year # => Thu, 01 Jan 2015 00:00:00 +0000 # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#169 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#179 def beginning_of_year; end # Returns a new date/time the specified number of days ago. @@ -14030,13 +16033,13 @@ module DateAndTime::Calculations # Week is assumed to start on +start_day+, default is # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#248 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#258 def days_to_week_start(start_day = T.unsafe(nil)); end # Returns a new date/time representing the end of the month. # DateTime objects will have a time set to 23:59:59. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#286 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#296 def end_of_month; end # Returns a new date/time at the end of the quarter. @@ -14057,13 +16060,13 @@ module DateAndTime::Calculations # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. # DateTime objects have their time set to 23:59:59. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#273 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#283 def end_of_week(start_day = T.unsafe(nil)); end # Returns a new date/time representing the end of the year. # DateTime objects will have a time set to 23:59:59. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#294 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#304 def end_of_year; end # Returns true if the date/time is in the future. @@ -14075,12 +16078,12 @@ module DateAndTime::Calculations # Short-hand for months_ago(1). # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#230 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#240 def last_month; end # Short-hand for months_ago(3). # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#235 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#245 def last_quarter; end # Returns a new date/time representing the given day in the previous week. @@ -14088,23 +16091,23 @@ module DateAndTime::Calculations # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. # DateTime objects have their time set to 0:00 unless +same_time+ is true. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#213 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#223 def last_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end # Returns a new date/time representing the previous weekday. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#220 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#230 def last_weekday; end # Short-hand for years_ago(1). # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#241 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#251 def last_year; end # Returns Monday of this week assuming that week starts on Monday. # +DateTime+ objects have their time set to 0:00. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#265 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#275 def monday; end # Returns a new date/time the specified number of months ago. @@ -14130,12 +16133,12 @@ module DateAndTime::Calculations # today.next_occurring(:monday) # => Mon, 18 Dec 2017 # today.next_occurring(:thursday) # => Thu, 21 Dec 2017 # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#330 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#340 def next_occurring(day_of_week); end # Short-hand for months_since(3). # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#205 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#215 def next_quarter; end # Returns a new date/time representing the given day in the next week. @@ -14155,12 +16158,12 @@ module DateAndTime::Calculations # now = DateTime.current # => Thu, 07 May 2015 13:31:16 +0000 # now.next_week # => Mon, 11 May 2015 00:00:00 +0000 # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#190 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#200 def next_week(given_day_in_next_week = T.unsafe(nil), same_time: T.unsafe(nil)); end # Returns a new date/time representing the next weekday. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#196 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#206 def next_weekday; end # Returns true if the date/time does not fall on a Saturday or Sunday. @@ -14197,12 +16200,12 @@ module DateAndTime::Calculations # today.prev_occurring(:monday) # => Mon, 11 Dec 2017 # today.prev_occurring(:thursday) # => Thu, 07 Dec 2017 # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#341 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#351 def prev_occurring(day_of_week); end # Short-hand for months_ago(3). # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#235 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#245 def prev_quarter; end # Returns a new date/time representing the given day in the previous week. @@ -14210,18 +16213,28 @@ module DateAndTime::Calculations # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. # DateTime objects have their time set to 0:00 unless +same_time+ is true. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#213 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#223 def prev_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end # Returns a new date/time representing the previous weekday. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#220 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#230 def prev_weekday; end + # Returns the quarter for a date/time. + # + # Date.new(2010, 1, 31).quarter # => 1 + # Date.new(2010, 4, 12).quarter # => 2 + # Date.new(2010, 9, 15).quarter # => 3 + # Date.new(2010, 12, 25).quarter # => 4 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#166 + def quarter; end + # Returns Sunday of this week assuming that week starts on Monday. # +DateTime+ objects have their time set to 23:59:59. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#280 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#290 def sunday; end # Returns true if the date/time is today. @@ -14277,16 +16290,16 @@ module DateAndTime::Calculations private - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#360 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#370 def copy_time_to(other); end - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#356 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#366 def days_span(day); end - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#348 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#358 def first_hour(date_or_time); end - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#352 + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#362 def last_hour(date_or_time); end end @@ -14388,7 +16401,7 @@ class DateTime < ::Date # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#109 def ago(seconds); end - # source://activesupport//lib/active_support/core_ext/object/json.rb#207 + # source://activesupport//lib/active_support/core_ext/object/json.rb#215 def as_json(options = T.unsafe(nil)); end # Returns a new DateTime representing the start of the day (0:00). @@ -14504,7 +16517,7 @@ class DateTime < ::Date # datetime.formatted_offset # => "-06:00" # datetime.formatted_offset(false) # => "-0600" # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#51 + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#55 def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end # Returns a Time instance of the simultaneous time in the UTC timezone. @@ -14545,7 +16558,7 @@ class DateTime < ::Date # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005 14:30:00 +0000". # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#56 + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#60 def inspect; end # Returns a Time instance of the simultaneous time in the system timezone. @@ -14575,12 +16588,12 @@ class DateTime < ::Date # Returns the fraction of a second as nanoseconds # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#94 + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#98 def nsec; end # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005 14:30:00 +0000". # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#56 + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#60 def readable_inspect; end # Returns the number of seconds since 00:00:00. @@ -14615,9 +16628,12 @@ class DateTime < ::Date # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#36 def subsec; end + # source://activesupport//lib/active_support/deprecation/method_wrappers.rb#46 + def to_default_s(*args, **_arg1, &block); end + # Converts +self+ to a floating-point number of seconds, including fractional microseconds, since the Unix epoch. # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#79 + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#83 def to_f; end # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. @@ -14680,12 +16696,9 @@ class DateTime < ::Date # Converts +self+ to an integer number of seconds since the Unix epoch. # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#84 + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#88 def to_i; end - # source://activesupport//lib/active_support/core_ext/date_time/deprecated_conversions.rb#7 - def to_s(format = T.unsafe(nil)); end - # Either return an instance of +Time+ with the same UTC offset # as +self+ or an instance of +Time+ representing the same time # in the local system timezone depending on the setting of @@ -14696,7 +16709,7 @@ class DateTime < ::Date # Returns the fraction of a second as microseconds # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#89 + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#93 def usec; end # Returns a Time instance of the simultaneous time in the UTC timezone. @@ -14721,10 +16734,10 @@ class DateTime < ::Date private - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#99 + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#103 def offset_in_seconds; end - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#103 + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#107 def seconds_since_unix_epoch; end class << self @@ -14736,7 +16749,7 @@ class DateTime < ::Date # DateTime.civil_from_format :local, 2012, 12, 17 # # => Mon, 17 Dec 2012 00:00:00 +0000 # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#69 + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#73 def civil_from_format(utc_or_local, year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), min = T.unsafe(nil), sec = T.unsafe(nil)); end # Returns Time.zone.now.to_datetime when Time.zone or @@ -14748,9 +16761,6 @@ class DateTime < ::Date end end -# source://activesupport//lib/active_support/core_ext/date_time/deprecated_conversions.rb#6 -DateTime::NOT_SET = T.let(T.unsafe(nil), Object) - # source://activesupport//lib/active_support/core_ext/object/try.rb#117 class Delegator < ::BasicObject include ::ActiveSupport::Tryable @@ -14759,12 +16769,6 @@ end # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#7 module Digest::UUID class << self - # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#13 - def use_rfc4122_namespaced_uuids; end - - # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#13 - def use_rfc4122_namespaced_uuids=(val); end - # Generates a v5 non-random UUID (Universally Unique IDentifier). # # Using OpenSSL::Digest::MD5 generates version 3 UUIDs; OpenSSL::Digest::SHA1 generates version 5 UUIDs. @@ -14772,27 +16776,27 @@ module Digest::UUID # # See RFC 4122 for details of UUID at: https://www.ietf.org/rfc/rfc4122.txt # - # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#21 + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#19 def uuid_from_hash(hash_class, namespace, name); end # Convenience method for uuid_from_hash using OpenSSL::Digest::MD5. # - # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#44 + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#42 def uuid_v3(uuid_namespace, name); end # Convenience method for SecureRandom.uuid. # - # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#54 + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#52 def uuid_v4; end # Convenience method for uuid_from_hash using OpenSSL::Digest::SHA1. # - # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#49 + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#47 def uuid_v5(uuid_namespace, name); end private - # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#58 + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#56 def pack_uuid_namespace(namespace); end end end @@ -14809,27 +16813,13 @@ Digest::UUID::URL_NAMESPACE = T.let(T.unsafe(nil), String) # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#11 Digest::UUID::X500_NAMESPACE = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#8 +# source://activesupport//lib/active_support/core_ext/erb/util.rb#39 module ERB::Util - private - - # A utility method for escaping HTML tag characters. - # This method is also aliased as h. - # - # puts html_escape('is a > 0 & a < 10?') - # # => is a > 0 & a < 10? - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#27 - def h(s); end + include ::ActiveSupport::CoreExt::ERBUtil + include ::ActiveSupport::CoreExt::ERBUtilPrivate + extend ::ActiveSupport::CoreExt::ERBUtil - # A utility method for escaping HTML tag characters. - # This method is also aliased as h. - # - # puts html_escape('is a > 0 & a < 10?') - # # => is a > 0 & a < 10? - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#27 - def html_escape(s); end + private # A utility method for escaping HTML without affecting existing escaped entities. # @@ -14839,7 +16829,7 @@ module ERB::Util # html_escape_once('<< Accept & Checkout') # # => "<< Accept & Checkout" # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#58 + # source://activesupport//lib/active_support/core_ext/erb/util.rb#63 def html_escape_once(s); end # A utility method for escaping HTML entities in JSON strings. Specifically, the @@ -14898,15 +16888,9 @@ module ERB::Util # JSON gem, do not provide this kind of protection by default; also some gems # might override +to_json+ to bypass Active Support's encoder). # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#120 + # source://activesupport//lib/active_support/core_ext/erb/util.rb#124 def json_escape(s); end - # HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer. - # This method is not for public consumption! Seriously! - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#41 - def unwrapped_html_escape(s); end - # A utility method for escaping XML names of tags and names of attributes. # # xml_name_escape('1 < 2 & 3') @@ -14914,26 +16898,14 @@ module ERB::Util # # It follows the requirements of the specification: https://www.w3.org/TR/REC-xml/#NT-Name # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#133 + # source://activesupport//lib/active_support/core_ext/erb/util.rb#142 def xml_name_escape(name); end class << self - # A utility method for escaping HTML tag characters. - # This method is also aliased as h. - # - # puts html_escape('is a > 0 & a < 10?') - # # => is a > 0 & a < 10? - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#27 + # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 def h(s); end - # A utility method for escaping HTML tag characters. - # This method is also aliased as h. - # - # puts html_escape('is a > 0 & a < 10?') - # # => is a > 0 & a < 10? - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#27 + # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 def html_escape(s); end # A utility method for escaping HTML without affecting existing escaped entities. @@ -14944,7 +16916,7 @@ module ERB::Util # html_escape_once('<< Accept & Checkout') # # => "<< Accept & Checkout" # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#58 + # source://activesupport//lib/active_support/core_ext/erb/util.rb#63 def html_escape_once(s); end # A utility method for escaping HTML entities in JSON strings. Specifically, the @@ -15003,13 +16975,16 @@ module ERB::Util # JSON gem, do not provide this kind of protection by default; also some gems # might override +to_json+ to bypass Active Support's encoder). # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#120 + # source://activesupport//lib/active_support/core_ext/erb/util.rb#124 def json_escape(s); end - # HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer. - # This method is not for public consumption! Seriously! + # Tokenizes a line of ERB. This is really just for error reporting and + # nobody should use it. # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#41 + # source://activesupport//lib/active_support/core_ext/erb/util.rb#161 + def tokenize(source); end + + # source://activesupport//lib/active_support/core_ext/erb/util.rb#10 def unwrapped_html_escape(s); end # A utility method for escaping XML names of tags and names of attributes. @@ -15019,43 +16994,43 @@ module ERB::Util # # It follows the requirements of the specification: https://www.w3.org/TR/REC-xml/#NT-Name # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#133 + # source://activesupport//lib/active_support/core_ext/erb/util.rb#142 def xml_name_escape(name); end end end -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#9 +# source://activesupport//lib/active_support/core_ext/erb/util.rb#40 ERB::Util::HTML_ESCAPE = T.let(T.unsafe(nil), Hash) -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#11 +# source://activesupport//lib/active_support/core_ext/erb/util.rb#41 ERB::Util::HTML_ESCAPE_ONCE_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#10 -ERB::Util::JSON_ESCAPE = T.let(T.unsafe(nil), Hash) +# source://activesupport//lib/active_support/core_ext/erb/util.rb#49 +ERB::Util::INVALID_TAG_NAME_FOLLOWING_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#12 -ERB::Util::JSON_ESCAPE_REGEXP = T.let(T.unsafe(nil), Regexp) +# source://activesupport//lib/active_support/core_ext/erb/util.rb#47 +ERB::Util::INVALID_TAG_NAME_START_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#19 -ERB::Util::TAG_NAME_FOLLOWING_REGEXP = T.let(T.unsafe(nil), Regexp) +# source://activesupport//lib/active_support/core_ext/erb/util.rb#50 +ERB::Util::SAFE_XML_TAG_NAME_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#20 -ERB::Util::TAG_NAME_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) +# source://activesupport//lib/active_support/core_ext/erb/util.rb#48 +ERB::Util::TAG_NAME_FOLLOWING_CODEPOINTS = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#18 -ERB::Util::TAG_NAME_START_REGEXP = T.let(T.unsafe(nil), Regexp) +# source://activesupport//lib/active_support/core_ext/erb/util.rb#51 +ERB::Util::TAG_NAME_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) # Following XML requirements: https://www.w3.org/TR/REC-xml/#NT-Name # -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#15 -ERB::Util::TAG_NAME_START_REGEXP_SET = T.let(T.unsafe(nil), String) +# source://activesupport//lib/active_support/core_ext/erb/util.rb#44 +ERB::Util::TAG_NAME_START_CODEPOINTS = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/core_ext/object/json.rb#139 +# source://activesupport//lib/active_support/core_ext/object/json.rb#147 module Enumerable include ::ActiveSupport::ToJsonWithActiveSupportEncoder extend ::ActiveSupport::EnumerableCoreExt::Constants - # source://activesupport//lib/active_support/core_ext/object/json.rb#140 + # source://activesupport//lib/active_support/core_ext/object/json.rb#148 def as_json(options = T.unsafe(nil)); end # Returns a new +Array+ without the blank items. @@ -15072,7 +17047,7 @@ module Enumerable # { a: "", b: 1, c: nil, d: [], e: false, f: true }.compact_blank # # => { b: 1, f: true } # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#235 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#184 def compact_blank; end # The negative of the Enumerable#include?. Returns +true+ if the @@ -15080,7 +17055,7 @@ module Enumerable # # @return [Boolean] # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#169 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#118 def exclude?(object); end # Returns a copy of the enumerable excluding the specified elements. @@ -15094,7 +17069,7 @@ module Enumerable # {foo: 1, bar: 2, baz: 3}.excluding :bar # # => {foo: 1, baz: 3} # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#183 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#132 def excluding(*elements); end # Returns a new +Array+ where the order has been set to that provided in the +series+, based on the +key+ of the @@ -15106,7 +17081,7 @@ module Enumerable # If the +series+ include keys that have no corresponding element in the Enumerable, these are ignored. # If the Enumerable has additional elements that aren't named in the +series+, these are not included in the result. # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#247 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#196 def in_order_of(key, series); end # Returns a new array that includes the passed elements. @@ -15117,7 +17092,7 @@ module Enumerable # ["David", "Rafael"].including %w[ Aaron Todd ] # # => ["David", "Rafael", "Aaron", "Todd"] # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#163 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#112 def including(*elements); end # Convert an enumerable to a hash, using the block result as the key and the @@ -15129,7 +17104,7 @@ module Enumerable # people.index_by { |person| "#{person.first_name} #{person.last_name}" } # # => { "Chade- Fowlersburg-e" => , "David Heinemeier Hansson" => , ...} # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#103 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#52 def index_by; end # Convert an enumerable to a hash, using the element as the key and the block @@ -15146,7 +17121,7 @@ module Enumerable # %i( created_at updated_at ).index_with(Time.now) # # => { created_at: 2020-03-09 22:31:47, updated_at: 2020-03-09 22:31:47 } # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#126 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#75 def index_with(default = T.unsafe(nil)); end # Returns +true+ if the enumerable has more than 1 element. Functionally @@ -15156,7 +17131,7 @@ module Enumerable # # @return [Boolean] # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#144 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#93 def many?; end # Calculates the maximum from the extracted elements. @@ -15164,7 +17139,7 @@ module Enumerable # payments = [Payment.new(5), Payment.new(15), Payment.new(10)] # payments.maximum(:price) # => 15 # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#52 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#40 def maximum(key); end # Calculates the minimum from the extracted elements. @@ -15172,7 +17147,7 @@ module Enumerable # payments = [Payment.new(5), Payment.new(15), Payment.new(10)] # payments.minimum(:price) # => 5 # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#44 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#32 def minimum(key); end # Extract the given key from the first element in the enumerable. @@ -15183,7 +17158,7 @@ module Enumerable # [{ id: 1, name: "David" }, { id: 2, name: "Rafael" }].pick(:id, :name) # # => [1, "David"] # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#212 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#161 def pick(*keys); end # Extract the given key from each element in the enumerable. @@ -15194,7 +17169,7 @@ module Enumerable # [{ id: 1, name: "David" }, { id: 2, name: "Rafael" }].pluck(:id, :name) # # => [[1, "David"], [2, "Rafael"]] # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#196 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#145 def pluck(*keys); end # Returns the sole item in the enumerable. If there are no items, or more @@ -15204,31 +17179,9 @@ module Enumerable # Set.new.sole # => Enumerable::SoleItemExpectedError: no item found # { a: 1, b: 2 }.sole # => Enumerable::SoleItemExpectedError: multiple items found # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#257 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#206 def sole; end - # Calculates a sum from the elements. - # - # payments.sum { |p| p.price * p.tax_rate } - # payments.sum(&:price) - # - # The latter is a shortcut for: - # - # payments.inject(0) { |sum, p| sum + p.price } - # - # It can also calculate the sum without the use of a block. - # - # [5, 15, 10].sum # => 30 - # ['foo', 'bar'].sum('') # => "foobar" - # [[1, 2], [3, 1, 5]].sum([]) # => [1, 2, 3, 1, 5] - # - # The default sum of an empty list is zero. You can override this default: - # - # [].sum(Payment.new(0)) { |i| i.amount } # => Payment.new(0) - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#74 - def sum(identity = T.unsafe(nil), &block); end - # Returns a copy of the enumerable excluding the specified elements. # # ["David", "Rafael", "Aaron", "Todd"].excluding "Aaron", "Todd" @@ -15240,7 +17193,7 @@ module Enumerable # {foo: 1, bar: 2, baz: 3}.excluding :bar # # => {foo: 1, baz: 3} # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#183 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#132 def without(*elements); end end @@ -15250,15 +17203,15 @@ end # source://activesupport//lib/active_support/core_ext/enumerable.rb#21 class Enumerable::SoleItemExpectedError < ::StandardError; end -# source://activesupport//lib/active_support/core_ext/object/json.rb#240 +# source://activesupport//lib/active_support/core_ext/object/json.rb#248 class Exception - # source://activesupport//lib/active_support/core_ext/object/json.rb#241 + # source://activesupport//lib/active_support/core_ext/object/json.rb#249 def as_json(options = T.unsafe(nil)); end end # source://activesupport//lib/active_support/core_ext/object/blank.rb#61 class FalseClass - # source://activesupport//lib/active_support/core_ext/object/json.rb#81 + # source://activesupport//lib/active_support/core_ext/object/json.rb#89 def as_json(options = T.unsafe(nil)); end # +false+ is blank: @@ -15305,31 +17258,28 @@ class File < ::IO end end -# source://activesupport//lib/active_support/core_ext/object/json.rb#110 +# source://activesupport//lib/active_support/core_ext/object/json.rb#118 class Float < ::Numeric include ::ActiveSupport::NumericWithFormat - include ::ActiveSupport::DeprecatedNumericWithFormat # Encoding Infinity or NaN to JSON should return "null". The default returns # "Infinity" or "NaN" which are not valid JSON. # - # source://activesupport//lib/active_support/core_ext/object/json.rb#113 + # source://activesupport//lib/active_support/core_ext/object/json.rb#121 def as_json(options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/core_ext/numeric/deprecated_conversions.rb#5 - def to_s(format = T.unsafe(nil), options = T.unsafe(nil)); end end -# source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#3 +# source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#5 class Hash include ::Enumerable + include ::ActiveSupport::DeepMergeable - # source://activesupport//lib/active_support/core_ext/object/json.rb#164 + # source://activesupport//lib/active_support/core_ext/object/json.rb#172 def as_json(options = T.unsafe(nil)); end # Hash#reject has its own definition, so this needs one too. # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#268 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#217 def compact_blank; end # Removes all blank values from the +Hash+ in place and returns self. @@ -15339,7 +17289,7 @@ class Hash # h.compact_blank! # # => { b: 1, f: true } # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#278 + # source://activesupport//lib/active_support/core_ext/enumerable.rb#227 def compact_blank!; end # Returns a deep copy of hash. @@ -15354,28 +17304,18 @@ class Hash # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#43 def deep_dup; end - # Returns a new hash with +self+ and +other_hash+ merged recursively. - # - # h1 = { a: true, b: { c: [1, 2, 3] } } - # h2 = { a: false, b: { x: [3, 4, 5] } } + # :method: deep_merge! + # :call-seq: deep_merge!(other_hash, &block) # - # h1.deep_merge(h2) # => { a: false, b: { c: [1, 2, 3], x: [3, 4, 5] } } + # Same as #deep_merge, but modifies +self+. # - # Like with Hash#merge in the standard library, a block can be provided - # to merge values: - # - # h1 = { a: 100, b: 200, c: { c1: 100 } } - # h2 = { b: 250, c: { c1: 200 } } - # h1.deep_merge(h2) { |key, this_val, other_val| this_val + other_val } - # # => { a: 100, b: 450, c: { c1: 300 } } + # -- + # Implemented by ActiveSupport::DeepMergeable#deep_merge!. # - # source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#18 - def deep_merge(other_hash, &block); end - - # Same as +deep_merge+, but modifies +self+. + # @return [Boolean] # - # source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#23 - def deep_merge!(other_hash, &block); end + # source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#39 + def deep_merge?(other); end # Returns a new hash with all keys converted to strings. # This includes the keys from the root hash and from all @@ -15675,7 +17615,7 @@ class Hash # # By default the root node is "hash", but that's configurable via the :root option. # - # The default XML builder is a fresh instance of Builder::XmlMarkup. You can + # The default XML builder is a fresh instance of +Builder::XmlMarkup+. You can # configure your own builder with the :builder option. The method also accepts # options like :dasherize and friends, they are forwarded to the builder. # @@ -15774,7 +17714,7 @@ end # :stopdoc: # -# source://activesupport//lib/active_support/hash_with_indifferent_access.rb#425 +# source://activesupport//lib/active_support/hash_with_indifferent_access.rb#443 HashWithIndifferentAccess = ActiveSupport::HashWithIndifferentAccess # :enddoc: @@ -15829,13 +17769,10 @@ end # source://activesupport//lib/active_support/i18n_railtie.rb#9 class I18n::Railtie < ::Rails::Railtie class << self - # source://activesupport//lib/active_support/i18n_railtie.rb#78 - def forward_raise_on_missing_translations_config(app); end - - # source://activesupport//lib/active_support/i18n_railtie.rb#88 + # source://activesupport//lib/active_support/i18n_railtie.rb#95 def include_fallbacks_module; end - # source://activesupport//lib/active_support/i18n_railtie.rb#92 + # source://activesupport//lib/active_support/i18n_railtie.rb#99 def init_fallbacks(fallbacks); end # Setup i18n configuration. @@ -15843,20 +17780,23 @@ class I18n::Railtie < ::Rails::Railtie # source://activesupport//lib/active_support/i18n_railtie.rb#32 def initialize_i18n(app); end - # source://activesupport//lib/active_support/i18n_railtie.rb#108 + # source://activesupport//lib/active_support/i18n_railtie.rb#80 + def setup_raise_on_missing_translations_config(app); end + + # source://activesupport//lib/active_support/i18n_railtie.rb#115 def validate_fallbacks(fallbacks); end - # source://activesupport//lib/active_support/i18n_railtie.rb#119 + # source://activesupport//lib/active_support/i18n_railtie.rb#126 def watched_dirs_with_extensions(paths); end end end -# source://activesupport//lib/active_support/core_ext/object/json.rb#145 +# source://activesupport//lib/active_support/core_ext/object/json.rb#153 class IO include ::Enumerable include ::File::Constants - # source://activesupport//lib/active_support/core_ext/object/json.rb#146 + # source://activesupport//lib/active_support/core_ext/object/json.rb#154 def as_json(options = T.unsafe(nil)); end end @@ -15971,16 +17911,15 @@ IO::READABLE = T.let(T.unsafe(nil), Integer) class IO::TimeoutError < ::IOError; end IO::WRITABLE = T.let(T.unsafe(nil), Integer) -# source://activesupport//lib/active_support/core_ext/object/json.rb#228 +# source://activesupport//lib/active_support/core_ext/object/json.rb#236 class IPAddr - # source://activesupport//lib/active_support/core_ext/object/json.rb#229 + # source://activesupport//lib/active_support/core_ext/object/json.rb#237 def as_json(options = T.unsafe(nil)); end end # source://activesupport//lib/active_support/core_ext/integer/time.rb#6 class Integer < ::Numeric include ::ActiveSupport::NumericWithFormat - include ::ActiveSupport::DeprecatedNumericWithFormat # Returns a Duration instance matching the number of months provided. # @@ -15996,8 +17935,42 @@ class Integer < ::Numeric # source://activesupport//lib/active_support/core_ext/integer/time.rb#10 def months; end - # source://activesupport//lib/active_support/core_ext/numeric/deprecated_conversions.rb#5 - def to_s(format = T.unsafe(nil), options = T.unsafe(nil)); end + # Check whether the integer is evenly divisible by the argument. + # + # 0.multiple_of?(0) # => true + # 6.multiple_of?(5) # => false + # 10.multiple_of?(2) # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/integer/multiple.rb#9 + def multiple_of?(number); end + + # Ordinal returns the suffix used to denote the position + # in an ordered sequence such as 1st, 2nd, 3rd, 4th. + # + # 1.ordinal # => "st" + # 2.ordinal # => "nd" + # 1002.ordinal # => "nd" + # 1003.ordinal # => "rd" + # -11.ordinal # => "th" + # -1001.ordinal # => "st" + # + # source://activesupport//lib/active_support/core_ext/integer/inflections.rb#28 + def ordinal; end + + # Ordinalize turns a number into an ordinal string used to denote the + # position in an ordered sequence such as 1st, 2nd, 3rd, 4th. + # + # 1.ordinalize # => "1st" + # 2.ordinalize # => "2nd" + # 1002.ordinalize # => "1002nd" + # 1003.ordinalize # => "1003rd" + # -11.ordinalize # => "-11th" + # -1001.ordinalize # => "-1001st" + # + # source://activesupport//lib/active_support/core_ext/integer/inflections.rb#15 + def ordinalize; end # Returns a Duration instance matching the number of years provided. # @@ -16016,8 +17989,20 @@ end # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#3 module Kernel + # class_eval on an object acts like +singleton_class.class_eval+. + # + # source://activesupport//lib/active_support/core_ext/kernel/singleton_class.rb#5 + def class_eval(*args, &block); end + private + # A shortcut to define a toplevel concern, not within a module. + # + # See Module::Concerning for more. + # + # source://activesupport//lib/active_support/core_ext/kernel/concern.rb#11 + def concern(topic, &module_definition); end + # Sets $VERBOSE to +true+ for the duration of the block and back to its # original value afterwards. # @@ -16055,6 +18040,13 @@ module Kernel def with_warnings(flag); end class << self + # A shortcut to define a toplevel concern, not within a module. + # + # See Module::Concerning for more. + # + # source://activesupport//lib/active_support/core_ext/kernel/concern.rb#11 + def concern(topic, &module_definition); end + # Sets $VERBOSE to +true+ for the duration of the block and back to its # original value afterwards. # @@ -16267,6 +18259,7 @@ class Module # # module HairColors # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_accessor(:hair_styles) { [:long, :short] } # end # # class Person @@ -16274,8 +18267,9 @@ class Module # end # # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # Person.class_variable_get("@@hair_styles") # => [:long, :short] # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#202 + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#208 def cattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), &blk); end # Defines a class attribute and creates a class and instance reader methods. @@ -16315,6 +18309,7 @@ class Module # # module HairColors # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_reader(:hair_styles) { [:long, :short] } # end # # class Person @@ -16322,10 +18317,11 @@ class Module # end # # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # Person.new.hair_styles # => [:long, :short] # # @raise [TypeError] # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#53 + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#55 def cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end # Defines a class attribute and creates a class and instance writer methods to @@ -16363,6 +18359,7 @@ class Module # # module HairColors # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_writer(:hair_styles) { [:long, :short] } # end # # class Person @@ -16370,12 +18367,23 @@ class Module # end # # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # Person.class_variable_get("@@hair_styles") # => [:long, :short] # # @raise [TypeError] # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#117 + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#121 def cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + # Returns a copy of module or class if it's anonymous. If it's + # named, returns +self+. + # + # Object.deep_dup == Object # => true + # klass = Class.new + # klass.deep_dup == klass # => false + # + # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#64 + def deep_dup; end + # Provides a +delegate+ class method to easily expose contained objects' # public methods as your own. # @@ -16580,20 +18588,15 @@ class Module # Marshal.dump(object), should the delegation target method # of object add or remove instance variables. # - # source://activesupport//lib/active_support/core_ext/module/delegation.rb#289 + # source://activesupport//lib/active_support/core_ext/module/delegation.rb#318 def delegate_missing_to(target, allow_nil: T.unsafe(nil)); end - # deprecate :foo - # deprecate bar: 'message' - # deprecate :foo, :bar, baz: 'warning!', qux: 'gone!' - # - # You can also use custom deprecator instance: + # deprecate :foo, deprecator: MyLib.deprecator + # deprecate :foo, bar: "warning!", deprecator: MyLib.deprecator # - # deprecate :foo, deprecator: MyLib::Deprecator.new - # deprecate :foo, bar: "warning!", deprecator: MyLib::Deprecator.new - # - # \Custom deprecators must respond to deprecation_warning(deprecated_method_name, message, caller_backtrace) - # method where you can implement your custom warning behavior. + # A deprecator is typically an instance of ActiveSupport::Deprecation, but you can also pass any object that responds + # to deprecation_warning(deprecated_method_name, message, caller_backtrace) where you can implement your + # custom warning behavior. # # class MyLib::Deprecator # def deprecation_warning(deprecated_method_name, message, caller_backtrace = nil) @@ -16602,8 +18605,8 @@ class Module # end # end # - # source://activesupport//lib/active_support/core_ext/module/deprecation.rb#22 - def deprecate(*method_names); end + # source://activesupport//lib/active_support/core_ext/module/deprecation.rb#17 + def deprecate(*method_names, deprecator: T.unsafe(nil), **options); end # Defines both class and instance accessors for class attributes. # All class and instance methods created will be public, even if @@ -16662,6 +18665,7 @@ class Module # # module HairColors # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_accessor(:hair_styles) { [:long, :short] } # end # # class Person @@ -16669,8 +18673,9 @@ class Module # end # # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # Person.class_variable_get("@@hair_styles") # => [:long, :short] # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#202 + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#208 def mattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), &blk); end # Defines a class attribute and creates a class and instance reader methods. @@ -16710,6 +18715,7 @@ class Module # # module HairColors # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_reader(:hair_styles) { [:long, :short] } # end # # class Person @@ -16717,10 +18723,11 @@ class Module # end # # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # Person.new.hair_styles # => [:long, :short] # # @raise [TypeError] # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#53 + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#55 def mattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end # Defines a class attribute and creates a class and instance writer methods to @@ -16758,6 +18765,7 @@ class Module # # module HairColors # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_writer(:hair_styles) { [:long, :short] } # end # # class Person @@ -16765,10 +18773,11 @@ class Module # end # # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # Person.class_variable_get("@@hair_styles") # => [:long, :short] # # @raise [TypeError] # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#117 + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#121 def mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#30 @@ -16790,14 +18799,14 @@ class Module # M.module_parent # => Object # Module.new.module_parent # => Object # - # source://activesupport//lib/active_support/core_ext/module/introspection.rb#35 + # source://activesupport//lib/active_support/core_ext/module/introspection.rb#34 def module_parent; end # Returns the name of the module containing this one. # # M::N.module_parent_name # => "M" # - # source://activesupport//lib/active_support/core_ext/module/introspection.rb#10 + # source://activesupport//lib/active_support/core_ext/module/introspection.rb#9 def module_parent_name; end # Returns all the parents of this module according to its name, ordered from @@ -16813,7 +18822,7 @@ class Module # M::N.module_parents # => [M, Object] # X.module_parents # => [M, Object] # - # source://activesupport//lib/active_support/core_ext/module/introspection.rb#51 + # source://activesupport//lib/active_support/core_ext/module/introspection.rb#50 def module_parents; end # Replaces the existing method definition, if there is one, with the passed @@ -16887,7 +18896,11 @@ class Module # Current.new.user = "DHH" # => NoMethodError # Current.new.user # => NoMethodError # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#152 + # A default value may be specified using the +:default+ option. Because + # multiple threads can access the default value, non-frozen default values + # will be duped and frozen. + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#170 def thread_cattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end # Defines a per-thread class attribute and creates class and instance reader methods. @@ -16939,8 +18952,8 @@ class Module # # Current.new.user = "DHH" # => NoMethodError # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#85 - def thread_cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#101 + def thread_cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil)); end # Defines both class and instance accessors for class attributes. # @@ -16984,7 +18997,11 @@ class Module # Current.new.user = "DHH" # => NoMethodError # Current.new.user # => NoMethodError # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#152 + # A default value may be specified using the +:default+ option. Because + # multiple threads can access the default value, non-frozen default values + # will be duped and frozen. + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#170 def thread_mattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end # Defines a per-thread class attribute and creates class and instance reader methods. @@ -17036,8 +19053,8 @@ class Module # # Current.new.user = "DHH" # => NoMethodError # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#85 - def thread_mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#101 + def thread_mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil)); end private @@ -17062,7 +19079,7 @@ class Module end end -# = Bite-sized separation of concerns +# == Bite-sized separation of concerns # # We often find ourselves with a medium-sized chunk of behavior that we'd # like to extract, but only mix in to a single class. @@ -17077,9 +19094,9 @@ end # with a comment, as a least-bad alternative. Using modules in separate files # means tedious sifting to get a big-picture view. # -# = Dissatisfying ways to separate small concerns +# == Dissatisfying ways to separate small concerns # -# == Using comments: +# === Using comments: # # class Todo < ApplicationRecord # # Other todo implementation @@ -17096,7 +19113,7 @@ end # end # end # -# == With an inline module: +# === With an inline module: # # Noisy syntax. # @@ -17120,7 +19137,7 @@ end # include EventTracking # end # -# == Mix-in noise exiled to its own file: +# === Mix-in noise exiled to its own file: # # Once our chunk of behavior starts pushing the scroll-to-understand-it # boundary, we give in and move it to a separate file. At this size, the @@ -17134,7 +19151,7 @@ end # include TodoEventTracking # end # -# = Introducing Module#concerning +# == Introducing Module#concerning # # By quieting the mix-in noise, we arrive at a natural, low-ceremony way to # separate bite-sized concerns. @@ -17251,7 +19268,7 @@ NameError::UNBOUND_METHOD_MODULE_NAME = T.let(T.unsafe(nil), UnboundMethod) # source://activesupport//lib/active_support/core_ext/object/blank.rb#50 class NilClass - # source://activesupport//lib/active_support/core_ext/object/json.rb#87 + # source://activesupport//lib/active_support/core_ext/object/json.rb#95 def as_json(options = T.unsafe(nil)); end # +nil+ is blank: @@ -17294,7 +19311,7 @@ end class Numeric include ::Comparable - # source://activesupport//lib/active_support/core_ext/object/json.rb#105 + # source://activesupport//lib/active_support/core_ext/object/json.rb#113 def as_json(options = T.unsafe(nil)); end # No number is blank: @@ -17311,14 +19328,14 @@ class Numeric # # 2.bytes # => 2 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#14 + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#15 def byte; end # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes # # 2.bytes # => 2 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#14 + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#15 def bytes; end # Returns a Duration instance matching the number of days provided. @@ -17339,14 +19356,14 @@ class Numeric # # 2.exabytes # => 2_305_843_009_213_693_952 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#62 + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#63 def exabyte; end # Returns the number of bytes equivalent to the exabytes provided. # # 2.exabytes # => 2_305_843_009_213_693_952 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#62 + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#63 def exabytes; end # Returns a Duration instance matching the number of fortnights provided. @@ -17367,14 +19384,14 @@ class Numeric # # 2.gigabytes # => 2_147_483_648 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#38 + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#39 def gigabyte; end # Returns the number of bytes equivalent to the gigabytes provided. # # 2.gigabytes # => 2_147_483_648 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#38 + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#39 def gigabytes; end # Returns a Duration instance matching the number of hours provided. @@ -17393,7 +19410,7 @@ class Numeric # @return [Boolean] # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#156 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#13 def html_safe?; end # Returns the number of milliseconds equivalent to the seconds provided. @@ -17409,28 +19426,28 @@ class Numeric # # 2.kilobytes # => 2048 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#22 + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#23 def kilobyte; end # Returns the number of bytes equivalent to the kilobytes provided. # # 2.kilobytes # => 2048 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#22 + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#23 def kilobytes; end # Returns the number of bytes equivalent to the megabytes provided. # # 2.megabytes # => 2_097_152 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#30 + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#31 def megabyte; end # Returns the number of bytes equivalent to the megabytes provided. # # 2.megabytes # => 2_097_152 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#30 + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#31 def megabytes; end # Returns a Duration instance matching the number of minutes provided. @@ -17451,14 +19468,14 @@ class Numeric # # 2.petabytes # => 2_251_799_813_685_248 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#54 + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#55 def petabyte; end # Returns the number of bytes equivalent to the petabytes provided. # # 2.petabytes # => 2_251_799_813_685_248 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#54 + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#55 def petabytes; end # Returns a Duration instance matching the number of seconds provided. @@ -17479,14 +19496,14 @@ class Numeric # # 2.terabytes # => 2_199_023_255_552 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#46 + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#47 def terabyte; end # Returns the number of bytes equivalent to the terabytes provided. # # 2.terabytes # => 2_199_023_255_552 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#46 + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#47 def terabytes; end # Returns a Duration instance matching the number of weeks provided. @@ -17502,6 +19519,20 @@ class Numeric # # source://activesupport//lib/active_support/core_ext/numeric/time.rb#45 def weeks; end + + # Returns the number of bytes equivalent to the zettabytes provided. + # + # 2.zettabytes # => 2_361_183_241_434_822_606_848 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#71 + def zettabyte; end + + # Returns the number of bytes equivalent to the zettabytes provided. + # + # 2.zettabytes # => 2_361_183_241_434_822_606_848 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#71 + def zettabytes; end end # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#9 @@ -17522,6 +19553,9 @@ Numeric::PETABYTE = T.let(T.unsafe(nil), Integer) # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#7 Numeric::TERABYTE = T.let(T.unsafe(nil), Integer) +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#10 +Numeric::ZETTABYTE = T.let(T.unsafe(nil), Integer) + # -- # Most objects are cloneable, but not all. For example you can't dup methods: # @@ -17627,21 +19661,24 @@ class Object < ::BasicObject # @return [Boolean] # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#150 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#7 def html_safe?; end - # Returns true if this object is included in the argument. Argument must be - # any object which responds to +#include?+. Usage: + # Returns true if this object is included in the argument. + # + # When argument is a +Range+, +#cover?+ is used to properly handle inclusion + # check within open ranges. Otherwise, argument must be any object which responds + # to +#include?+. Usage: # # characters = ["Konata", "Kagami", "Tsukasa"] # "Konata".in?(characters) # => true # - # This will throw an +ArgumentError+ if the argument doesn't respond - # to +#include?+. + # For non +Range+ arguments, this will throw an +ArgumentError+ if the argument + # doesn't respond to +#include?+. # # @return [Boolean] # - # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#12 + # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#15 def in?(another_object); end # Returns a hash with string keys that maps instance variable names without "@" to their @@ -17668,7 +19705,7 @@ class Object < ::BasicObject # # C.new(0, 1).instance_variable_names # => ["@y", "@x"] # - # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#27 + # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#30 def instance_variable_names; end # Returns the receiver if it's present otherwise returns +nil+. @@ -17700,7 +19737,7 @@ class Object < ::BasicObject # # @return [Object] # - # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#26 + # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#34 def presence_in(another_object); end # An object is present if it's not blank. @@ -17721,11 +19758,35 @@ class Object < ::BasicObject # source://activesupport//lib/active_support/core_ext/object/to_query.rb#13 def to_query(key); end + # Set and restore public attributes around a block. + # + # client.timeout # => 5 + # client.with(timeout: 1) do + # client.timeout # => 1 + # end + # client.timeout # => 5 + # + # This method is a shorthand for the common begin/ensure pattern: + # + # old_value = object.attribute + # begin + # object.attribute = new_value + # # do things + # ensure + # object.attribute = old_value + # end + # + # It can be used on any object as long as both the reader and writer methods + # are public. + # + # source://activesupport//lib/active_support/core_ext/object/with.rb#24 + def with(**attributes); end + # An elegant way to factor duplication out of options passed to a series of # method calls. Each method called in the block, with the block variable as - # the receiver, will have its options merged with the default +options+ hash - # provided. Each method called on the block variable must take an options - # hash as its final argument. + # the receiver, will have its options merged with the default +options+ + # Hash or Hash-like object provided. Each method called on + # the block variable must take an options hash as its final argument. # # Without with_options, this code contains duplication: # @@ -17786,7 +19847,7 @@ class Object < ::BasicObject # You can access these methods using the class name instead: # # class Phone < ActiveRecord::Base - # enum phone_number_type: { home: 0, office: 1, mobile: 2 } + # enum :phone_number_type, { home: 0, office: 1, mobile: 2 } # # with_options presence: true do # validates :phone_number_type, inclusion: { in: Phone.phone_number_types.keys } @@ -17811,10 +19872,39 @@ class Object < ::BasicObject def with_options(options, &block); end end -# source://activesupport//lib/active_support/core_ext/object/json.rb#222 +# source://activesupport//lib/active_support/core_ext/object/json.rb#230 class Pathname - # source://activesupport//lib/active_support/core_ext/object/json.rb#223 + # source://activesupport//lib/active_support/core_ext/object/json.rb#231 def as_json(options = T.unsafe(nil)); end + + # An Pathname is blank if it's empty: + # + # Pathname.new("").blank? # => true + # Pathname.new(" ").blank? # => false + # Pathname.new("test").blank? # => false + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/pathname/blank.rb#13 + def blank?; end + + # Returns the receiver if the named file exists otherwise returns +nil+. + # pathname.existence is equivalent to + # + # pathname.exist? ? pathname : nil + # + # For example, something like + # + # content = pathname.read if pathname.exist? + # + # becomes + # + # content = pathname.existence&.read + # + # @return [Pathname] + # + # source://activesupport//lib/active_support/core_ext/pathname/existence.rb#20 + def existence; end end module Process @@ -17828,16 +19918,15 @@ module Process end end -# source://activesupport//lib/active_support/core_ext/object/json.rb#234 +# source://activesupport//lib/active_support/core_ext/object/json.rb#242 class Process::Status - # source://activesupport//lib/active_support/core_ext/object/json.rb#235 + # source://activesupport//lib/active_support/core_ext/object/json.rb#243 def as_json(options = T.unsafe(nil)); end end -# source://activesupport//lib/active_support/core_ext/object/json.rb#151 +# source://activesupport//lib/active_support/core_ext/object/json.rb#159 class Range include ::ActiveSupport::RangeWithFormat - include ::ActiveSupport::DeprecatedRangeWithFormat include ::ActiveSupport::CompareWithRange include ::ActiveSupport::EachTimeWithZone include ::Enumerable @@ -17845,7 +19934,7 @@ class Range # source://activesupport//lib/active_support/core_ext/range/compare_range.rb#16 def ===(value); end - # source://activesupport//lib/active_support/core_ext/object/json.rb#152 + # source://activesupport//lib/active_support/core_ext/object/json.rb#160 def as_json(options = T.unsafe(nil)); end # source://activesupport//lib/active_support/core_ext/range/each.rb#7 @@ -17854,13 +19943,16 @@ class Range # source://activesupport//lib/active_support/core_ext/range/compare_range.rb#41 def include?(value); end - # Compare two ranges and see if they overlap each other - # (1..5).overlaps?(4..6) # => true - # (1..5).overlaps?(7..9) # => false + # @raise [TypeError] + # @return [Boolean] # + # source://activesupport//lib/active_support/core_ext/range/overlap.rb#8 + def overlap?(other); end + + # @raise [TypeError] # @return [Boolean] # - # source://activesupport//lib/active_support/core_ext/range/overlaps.rb#7 + # source://activesupport//lib/active_support/core_ext/range/overlap.rb#8 def overlaps?(other); end # source://activesupport//lib/active_support/core_ext/range/each.rb#12 @@ -17869,40 +19961,20 @@ class Range # Optimize range sum to use arithmetic progression if a block is not given and # we have a range of numeric values. # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#287 - def sum(identity = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/core_ext/range/deprecated_conversions.rb#6 - def to_s(format = T.unsafe(nil)); end -end + # source://activesupport//lib/active_support/core_ext/enumerable.rb#236 + def sum(initial_value = T.unsafe(nil)); end -class Redis - include ::Redis::Commands::Bitmaps - include ::Redis::Commands::Cluster - include ::Redis::Commands::Connection - include ::Redis::Commands::Geo - include ::Redis::Commands::Hashes - include ::Redis::Commands::HyperLogLog - include ::Redis::Commands::Keys - include ::Redis::Commands::Lists - include ::Redis::Commands::Pubsub - include ::Redis::Commands::Scripting - include ::Redis::Commands::Server - include ::Redis::Commands::Sets - include ::Redis::Commands::SortedSets - include ::Redis::Commands::Streams - include ::Redis::Commands::Strings - include ::Redis::Commands::Transactions - include ::ActiveSupport::Cache::ConnectionPoolLike -end + private -class Redis::Distributed - include ::ActiveSupport::Cache::ConnectionPoolLike + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/range/overlap.rb#31 + def _empty_range?(b, e, excl); end end -# source://activesupport//lib/active_support/core_ext/object/json.rb#133 +# source://activesupport//lib/active_support/core_ext/object/json.rb#141 class Regexp - # source://activesupport//lib/active_support/core_ext/object/json.rb#134 + # source://activesupport//lib/active_support/core_ext/object/json.rb#142 def as_json(options = T.unsafe(nil)); end # Returns +true+ if the regexp has the multiline flag set. @@ -17919,38 +19991,13 @@ class Regexp def multiline?; end end -class Regexp::TimeoutError < ::RegexpError; end - # source://activesupport//lib/active_support/core_ext/securerandom.rb#5 module SecureRandom class << self - # SecureRandom.base36 generates a random base36 string in lowercase. - # - # The argument _n_ specifies the length of the random string to be generated. - # - # If _n_ is not specified or is +nil+, 16 is assumed. It may be larger in the future. - # This method can be used over +base58+ if a deterministic case key is necessary. - # - # The result will contain alphanumeric characters in lowercase. - # - # p SecureRandom.base36 # => "4kugl2pdqmscqtje" - # p SecureRandom.base36(24) # => "77tmhrhjfvfdwodq8w7ev2m7" - # - # source://activesupport//lib/active_support/core_ext/securerandom.rb#38 + # source://activesupport//lib/active_support/core_ext/securerandom.rb#49 def base36(n = T.unsafe(nil)); end - # SecureRandom.base58 generates a random base58 string. - # - # The argument _n_ specifies the length of the random string to be generated. - # - # If _n_ is not specified or is +nil+, 16 is assumed. It may be larger in the future. - # - # The result may contain alphanumeric characters except 0, O, I, and l. - # - # p SecureRandom.base58 # => "4kUgL2pdQMSCQtjE" - # p SecureRandom.base58(24) # => "77TMHrHJFvFDwodq8w7Ev2m7" - # - # source://activesupport//lib/active_support/core_ext/securerandom.rb#19 + # source://activesupport//lib/active_support/core_ext/securerandom.rb#24 def base58(n = T.unsafe(nil)); end end end @@ -17991,7 +20038,7 @@ class String # source://activesupport//lib/active_support/core_ext/string/behavior.rb#5 def acts_like_string?; end - # source://activesupport//lib/active_support/core_ext/object/json.rb#93 + # source://activesupport//lib/active_support/core_ext/object/json.rb#101 def as_json(options = T.unsafe(nil)); end # If you pass a single integer, returns a substring of one character at that @@ -18069,7 +20116,7 @@ class String # source://activesupport//lib/active_support/core_ext/string/inflections.rb#101 def camelize(first_letter = T.unsafe(nil)); end - # Creates a class name from a plural table name like Rails does for table names to models. + # Creates a class name from a plural table name like \Rails does for table names to models. # Note that this returns a string and not a class. (To convert to an actual class # follow +classify+ with +constantize+.) # @@ -18132,6 +20179,29 @@ class String # source://activesupport//lib/active_support/core_ext/string/inflections.rb#162 def demodulize; end + # Converts the first character to lowercase. + # + # 'If they enjoyed The Matrix'.downcase_first # => "if they enjoyed The Matrix" + # 'I'.downcase_first # => "i" + # ''.downcase_first # => "" + # + # See ActiveSupport::Inflector.downcase_first. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#284 + def downcase_first; end + + # The inverse of String#include?. Returns true if the string + # does not include the other string. + # + # "hello".exclude? "lo" # => false + # "hello".exclude? "ol" # => true + # "hello".exclude? ?h # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/exclude.rb#10 + def exclude?(string); end + # Returns the first character. If a limit is supplied, returns a substring # from the beginning of the string until it reaches the limit value. If the # given limit is greater than or equal to the string length, returns a copy of self. @@ -18156,7 +20226,7 @@ class String # # See ActiveSupport::Inflector.foreign_key. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#286 + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#297 def foreign_key(separate_class_name_and_id_with_underscore = T.unsafe(nil)); end # Returns a substring from the given position to the end of the string. @@ -18182,10 +20252,10 @@ class String # +raw+ helper in views. It is recommended that you use +sanitize+ instead of # this method. It should never be called on user input. # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#368 + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#232 def html_safe; end - # Capitalizes the first word, turns underscores into spaces, and (by default)strips a + # Capitalizes the first word, turns underscores into spaces, and (by default) strips a # trailing '_id' if present. # Like +titleize+, this is meant for creating pretty output. # @@ -18228,7 +20298,7 @@ class String # # The second argument, +indent_string+, specifies which indent string to # use. The default is +nil+, which tells the method to make a guess by - # peeking at the first indented line, and fallback to a space if there is + # peeking at the first indented line, and fall back to a space if there is # none. # # " foo".indent(2) # => " foo" @@ -18483,7 +20553,7 @@ class String # source://activesupport//lib/active_support/core_ext/string/strip.rb#22 def strip_heredoc; end - # Creates the name of a table like Rails does for models to table names. This method + # Creates the name of a table like \Rails does for models to table names. This method # uses the +pluralize+ method on the last word in the string. # # 'RawScaledScorer'.tableize # => "raw_scaled_scorers" @@ -18497,7 +20567,7 @@ class String # Capitalizes all the words and replaces some characters in the string to create # a nicer looking title. +titleize+ is meant for creating pretty output. It is not - # used in the Rails internals. + # used in the \Rails internals. # # The trailing '_id','Id'.. can be kept and capitalized by setting the # optional parameter +keep_id_suffix+ to true. @@ -18514,7 +20584,7 @@ class String # Capitalizes all the words and replaces some characters in the string to create # a nicer looking title. +titleize+ is meant for creating pretty output. It is not - # used in the Rails internals. + # used in the \Rails internals. # # The trailing '_id','Id'.. can be kept and capitalized by setting the # optional parameter +keep_id_suffix+ to true. @@ -18585,7 +20655,7 @@ class String # source://activesupport//lib/active_support/core_ext/string/conversions.rb#22 def to_time(form = T.unsafe(nil)); end - # Truncates a given +text+ after a given length if +text+ is longer than length: + # Truncates a given +text+ to length truncate_to if +text+ is longer than truncate_to: # # 'Once upon a time in a world far far away'.truncate(27) # # => "Once upon a time in a wo..." @@ -18598,16 +20668,20 @@ class String # 'Once upon a time in a world far far away'.truncate(27, separator: /\s/) # # => "Once upon a time in a..." # - # The last characters will be replaced with the :omission string (defaults to "...") - # for a total length not exceeding length: + # The last characters will be replaced with the :omission string (defaults to "..."). + # The total length will not exceed truncate_to unless both +text+ and :omission + # are longer than truncate_to: # # 'And they found that many people were sleeping better.'.truncate(25, omission: '... (continued)') # # => "And they f... (continued)" # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#66 - def truncate(truncate_at, options = T.unsafe(nil)); end + # 'And they found that many people were sleeping better.'.truncate(4, omission: '... (continued)') + # # => "... (continued)" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#70 + def truncate(truncate_to, options = T.unsafe(nil)); end - # Truncates +text+ to at most bytesize bytes in length without + # Truncates +text+ to at most truncate_to bytes in length without # breaking string encoding by splitting multibyte characters or breaking # grapheme clusters ("perceptual characters") by truncating at combining # characters. @@ -18620,10 +20694,12 @@ class String # => "🔪🔪🔪🔪…" # # The truncated text ends with the :omission string, defaulting - # to "…", for a total length not exceeding bytesize. + # to "…", for a total length not exceeding truncate_to. + # + # Raises +ArgumentError+ when the bytesize of :omission exceeds truncate_to. # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#95 - def truncate_bytes(truncate_at, omission: T.unsafe(nil)); end + # source://activesupport//lib/active_support/core_ext/string/filters.rb#101 + def truncate_bytes(truncate_to, omission: T.unsafe(nil)); end # Truncates a given +text+ after a given number of words (words_count): # @@ -18640,7 +20716,7 @@ class String # 'And they found that many people were sleeping better.'.truncate_words(5, omission: '... (continued)') # # => "And they found that many... (continued)" # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#136 + # source://activesupport//lib/active_support/core_ext/string/filters.rb#142 def truncate_words(words_count, options = T.unsafe(nil)); end # The reverse of +camelize+. Makes an underscored, lowercase form from the expression in the string. @@ -18655,7 +20731,7 @@ class String # source://activesupport//lib/active_support/core_ext/string/inflections.rb#139 def underscore; end - # Converts just the first character to uppercase. + # Converts the first character to uppercase. # # 'what a Lovely Day'.upcase_first # => "What a Lovely Day" # 'w'.upcase_first # => "W" @@ -18673,22 +20749,36 @@ String::BLANK_RE = T.let(T.unsafe(nil), Regexp) # source://activesupport//lib/active_support/core_ext/object/blank.rb#105 String::ENCODED_BLANKS = T.let(T.unsafe(nil), Concurrent::Map) -# source://activesupport//lib/active_support/core_ext/object/json.rb#68 +# source://activesupport//lib/active_support/core_ext/object/json.rb#76 class Struct include ::Enumerable - # source://activesupport//lib/active_support/core_ext/object/json.rb#69 + # source://activesupport//lib/active_support/core_ext/object/json.rb#77 def as_json(options = T.unsafe(nil)); end end -# source://activesupport//lib/active_support/core_ext/object/json.rb#98 +# source://activesupport//lib/active_support/core_ext/object/json.rb#106 class Symbol include ::Comparable - # source://activesupport//lib/active_support/core_ext/object/json.rb#99 + # source://activesupport//lib/active_support/core_ext/object/json.rb#107 def as_json(options = T.unsafe(nil)); end end +class Thread + # source://activesupport//lib/active_support/isolated_execution_state.rb#9 + def active_support_execution_state; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#9 + def active_support_execution_state=(_arg0); end +end + +# source://activesupport//lib/active_support/core_ext/thread/backtrace/location.rb#3 +class Thread::Backtrace::Location + # source://activesupport//lib/active_support/core_ext/thread/backtrace/location.rb#5 + def spot(ex); end +end + # source://activesupport//lib/active_support/core_ext/object/blank.rb#146 class Time include ::Comparable @@ -18696,20 +20786,20 @@ class Time include ::DateAndTime::Calculations include ::DateAndTime::Compatibility - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#284 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#300 def +(other); end # Time#- can also be used to determine the number of seconds between two Time instances. # We're layering on additional behavior so that ActiveSupport::TimeWithZone instances # are coerced into values that Time#- will recognize # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#307 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#323 def -(other); end # Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances # can be chronologically compared with a Time # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#316 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#332 def <=>(other); end # Duck-types as a Time-like class. See Object#acts_like?. @@ -18735,80 +20825,80 @@ class Time # largest to smallest. This order can affect the result around the end of a # month. # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#186 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#202 def advance(options); end # Returns a new Time representing the time a number of seconds ago, this is basically a wrapper around the Numeric extension # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#212 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#228 def ago(seconds); end - # source://activesupport//lib/active_support/core_ext/object/json.rb#187 + # source://activesupport//lib/active_support/core_ext/object/json.rb#195 def as_json(options = T.unsafe(nil)); end # Returns a new Time representing the start of the day (0:00) # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#225 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#241 def at_beginning_of_day; end # Returns a new Time representing the start of the hour (x:00) # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#254 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#270 def at_beginning_of_hour; end # Returns a new Time representing the start of the minute (x:xx:00) # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#270 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#286 def at_beginning_of_minute; end # Returns a new Time representing the end of the day, 23:59:59.999999 # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#243 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#259 def at_end_of_day; end # Returns a new Time representing the end of the hour, x:59:59.999999 # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#260 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#276 def at_end_of_hour; end # Returns a new Time representing the end of the minute, x:xx:59.999999 # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#276 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#292 def at_end_of_minute; end # Returns a new Time representing the middle of the day (12:00) # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#233 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#249 def at_midday; end # Returns a new Time representing the middle of the day (12:00) # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#233 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#249 def at_middle_of_day; end # Returns a new Time representing the start of the day (0:00) # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#225 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#241 def at_midnight; end # Returns a new Time representing the middle of the day (12:00) # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#233 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#249 def at_noon; end # Returns a new Time representing the start of the day (0:00) # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#225 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#241 def beginning_of_day; end # Returns a new Time representing the start of the hour (x:00) # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#254 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#270 def beginning_of_hour; end # Returns a new Time representing the start of the minute (x:xx:00) # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#270 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#286 def beginning_of_minute; end # No Time is blank: @@ -18841,34 +20931,34 @@ class Time # Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances # can be chronologically compared with a Time # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#316 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#332 def compare_with_coercion(other); end # Returns a new Time representing the end of the day, 23:59:59.999999 # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#243 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#259 def end_of_day; end # Returns a new Time representing the end of the hour, x:59:59.999999 # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#260 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#276 def end_of_hour; end # Returns a new Time representing the end of the minute, x:xx:59.999999 # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#276 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#292 def end_of_minute; end # Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances # can be eql? to an equivalent Time # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#331 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#347 def eql?(other); end # Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances # can be eql? to an equivalent Time # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#331 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#347 def eql_with_coercion(other); end # Returns a formatted string of the offset from UTC, or an alternative @@ -18882,73 +20972,73 @@ class Time # Returns a new Time representing the time a number of seconds since the instance time # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#217 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#233 def in(seconds); end # Returns a new Time representing the middle of the day (12:00) # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#233 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#249 def midday; end # Returns a new Time representing the middle of the day (12:00) # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#233 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#249 def middle_of_day; end # Returns a new Time representing the start of the day (0:00) # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#225 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#241 def midnight; end # Time#- can also be used to determine the number of seconds between two Time instances. # We're layering on additional behavior so that ActiveSupport::TimeWithZone instances # are coerced into values that Time#- will recognize # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#307 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#323 def minus_with_coercion(other); end - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#294 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#310 def minus_with_duration(other); end - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#294 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#310 def minus_without_coercion(other); end # Returns a new time the specified number of days in the future. # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#345 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#361 def next_day(days = T.unsafe(nil)); end # Returns a new time the specified number of months in the future. # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#355 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#371 def next_month(months = T.unsafe(nil)); end # Returns a new time the specified number of years in the future. # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#365 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#381 def next_year(years = T.unsafe(nil)); end # Returns a new Time representing the middle of the day (12:00) # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#233 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#249 def noon; end - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#284 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#300 def plus_with_duration(other); end # Returns a new time the specified number of days ago. # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#340 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#356 def prev_day(days = T.unsafe(nil)); end # Returns a new time the specified number of months ago. # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#350 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#366 def prev_month(months = T.unsafe(nil)); end # Returns a new time the specified number of years ago. # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#360 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#376 def prev_year(years = T.unsafe(nil)); end # Returns the fraction of a second as a +Rational+ @@ -18978,9 +21068,12 @@ class Time # Returns a new Time representing the time a number of seconds since the instance time # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#217 + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#233 def since(seconds); end + # source://activesupport//lib/active_support/deprecation/method_wrappers.rb#46 + def to_default_s(*args, **_arg1, &block); end + # Converts to a formatted string. See DATE_FORMATS for built-in formats. # # This method is aliased to to_formatted_s. @@ -19039,9 +21132,6 @@ class Time # source://activesupport//lib/active_support/core_ext/time/conversions.rb#53 def to_fs(format = T.unsafe(nil)); end - # source://activesupport//lib/active_support/core_ext/time/deprecated_conversions.rb#7 - def to_s(format = T.unsafe(nil)); end - # Either return +self+ or the time in the local system timezone depending # on the setting of +ActiveSupport.to_time_preserves_timezone+. # @@ -19150,10 +21240,10 @@ class Time # # This method accepts any of the following: # - # * A Rails TimeZone object. - # * An identifier for a Rails TimeZone object (e.g., "Eastern Time (US & Canada)", -5.hours). - # * A TZInfo::Timezone object. - # * An identifier for a TZInfo::Timezone object (e.g., "America/New_York"). + # * A \Rails TimeZone object. + # * An identifier for a \Rails TimeZone object (e.g., "Eastern Time (US & Canada)", -5.hours). + # * A +TZInfo::Timezone+ object. + # * An identifier for a +TZInfo::Timezone+ object (e.g., "America/New_York"). # # Here's an example of how you might set Time.zone on a per request basis and reset it when the request is done. # current_user.time_zone just needs to return a string identifying the user's preferred time zone: @@ -19193,12 +21283,9 @@ Time::COMMON_YEAR_DAYS_IN_MONTH = T.let(T.unsafe(nil), Array) # source://activesupport//lib/active_support/core_ext/time/conversions.rb#8 Time::DATE_FORMATS = T.let(T.unsafe(nil), Hash) -# source://activesupport//lib/active_support/core_ext/time/deprecated_conversions.rb#6 -Time::NOT_SET = T.let(T.unsafe(nil), Object) - # source://activesupport//lib/active_support/core_ext/object/blank.rb#72 class TrueClass - # source://activesupport//lib/active_support/core_ext/object/json.rb#75 + # source://activesupport//lib/active_support/core_ext/object/json.rb#83 def as_json(options = T.unsafe(nil)); end # +true+ is not blank: @@ -19216,12 +21303,12 @@ class TrueClass def to_param; end end -# source://activesupport//lib/active_support/core_ext/object/json.rb#216 +# 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#217 + # source://activesupport//lib/active_support/core_ext/object/json.rb#225 def as_json(options = T.unsafe(nil)); end end diff --git a/sorbet/rbi/gems/addressable@2.8.5.rbi b/sorbet/rbi/gems/addressable@2.8.6.rbi similarity index 90% rename from sorbet/rbi/gems/addressable@2.8.5.rbi rename to sorbet/rbi/gems/addressable@2.8.6.rbi index 932b611ea..9b249f24f 100644 --- a/sorbet/rbi/gems/addressable@2.8.5.rbi +++ b/sorbet/rbi/gems/addressable@2.8.6.rbi @@ -790,7 +790,7 @@ class Addressable::URI # @param [String, [Hash] a customizable set of options # @return [Addressable::URI] The constructed URI object. # - # source://addressable//lib/addressable/uri.rb#819 + # source://addressable//lib/addressable/uri.rb#830 def initialize(options = T.unsafe(nil)); end # Joins two URIs together. @@ -798,7 +798,7 @@ class Addressable::URI # @param The [String, Addressable::URI, #to_str] URI to join with. # @return [Addressable::URI] The joined URI. # - # source://addressable//lib/addressable/uri.rb#1878 + # source://addressable//lib/addressable/uri.rb#1889 def +(uri); end # Returns true if the URI objects are equal. This method @@ -808,7 +808,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URIs are equivalent, false # otherwise. # - # source://addressable//lib/addressable/uri.rb#2228 + # source://addressable//lib/addressable/uri.rb#2239 def ==(uri); end # Returns true if the URI objects are equal. This method @@ -819,7 +819,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URIs are equivalent, false # otherwise. # - # source://addressable//lib/addressable/uri.rb#2206 + # source://addressable//lib/addressable/uri.rb#2217 def ===(uri); end # Determines if the URI is absolute. @@ -827,7 +827,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URI is absolute. false # otherwise. # - # source://addressable//lib/addressable/uri.rb#1868 + # source://addressable//lib/addressable/uri.rb#1879 def absolute?; end # The authority component for this URI. @@ -835,21 +835,21 @@ class Addressable::URI # # @return [String] The authority component. # - # source://addressable//lib/addressable/uri.rb#1223 + # source://addressable//lib/addressable/uri.rb#1234 def authority; end # Sets the authority component for this URI. # # @param new_authority [String, #to_str] The new authority component. # - # source://addressable//lib/addressable/uri.rb#1263 + # source://addressable//lib/addressable/uri.rb#1274 def authority=(new_authority); end # The basename, if any, of the file in the path component. # # @return [String] The path's basename. # - # source://addressable//lib/addressable/uri.rb#1577 + # source://addressable//lib/addressable/uri.rb#1588 def basename; end # The default port for this URI's scheme. @@ -858,7 +858,7 @@ class Addressable::URI # # @return [Integer] The default port. # - # source://addressable//lib/addressable/uri.rb#1443 + # source://addressable//lib/addressable/uri.rb#1454 def default_port; end # This method allows you to make several changes to a URI simultaneously, @@ -868,7 +868,7 @@ class Addressable::URI # # @param block [Proc] A set of operations to perform on a given URI. # - # source://addressable//lib/addressable/uri.rb#2385 + # source://addressable//lib/addressable/uri.rb#2396 def defer_validation; end # Creates a URI suitable for display to users. If semantic attacks are @@ -878,7 +878,7 @@ class Addressable::URI # # @return [Addressable::URI] A URI suitable for display purposes. # - # source://addressable//lib/addressable/uri.rb#2190 + # source://addressable//lib/addressable/uri.rb#2201 def display_uri; end # Returns the public suffix domain for this host. @@ -886,24 +886,24 @@ class Addressable::URI # @example # Addressable::URI.parse("http://www.example.co.uk").domain # => "example.co.uk" # - # source://addressable//lib/addressable/uri.rb#1214 + # source://addressable//lib/addressable/uri.rb#1225 def domain; end # Clones the URI object. # # @return [Addressable::URI] The cloned URI. # - # source://addressable//lib/addressable/uri.rb#2260 + # source://addressable//lib/addressable/uri.rb#2271 def dup; end # Determines if the URI is an empty string. # # @return [TrueClass, FalseClass] Returns true if empty, false otherwise. # - # source://addressable//lib/addressable/uri.rb#2322 + # source://addressable//lib/addressable/uri.rb#2333 def empty?; end - # source://addressable//lib/addressable/uri.rb#2395 + # source://addressable//lib/addressable/uri.rb#2406 def encode_with(coder); end # Returns true if the URI objects are equal. This method @@ -913,7 +913,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URIs are equivalent, false # otherwise. # - # source://addressable//lib/addressable/uri.rb#2242 + # source://addressable//lib/addressable/uri.rb#2253 def eql?(uri); end # The extname, if any, of the file in the path component. @@ -921,28 +921,28 @@ class Addressable::URI # # @return [String] The path's extname. # - # source://addressable//lib/addressable/uri.rb#1587 + # source://addressable//lib/addressable/uri.rb#1598 def extname; end # The fragment component for this URI. # # @return [String] The fragment component. # - # source://addressable//lib/addressable/uri.rb#1799 + # source://addressable//lib/addressable/uri.rb#1810 def fragment; end # Sets the fragment component for this URI. # # @param new_fragment [String, #to_str] The new fragment component. # - # source://addressable//lib/addressable/uri.rb#1824 + # source://addressable//lib/addressable/uri.rb#1835 def fragment=(new_fragment); end # Freeze URI, initializing instance variables. # # @return [Addressable::URI] The frozen URI object. # - # source://addressable//lib/addressable/uri.rb#859 + # source://addressable//lib/addressable/uri.rb#870 def freeze; end # A hash value that will make a URI equivalent to its normalized @@ -950,21 +950,21 @@ class Addressable::URI # # @return [Integer] A hash of the URI. # - # source://addressable//lib/addressable/uri.rb#2252 + # source://addressable//lib/addressable/uri.rb#2263 def hash; end # The host component for this URI. # # @return [String] The host component. # - # source://addressable//lib/addressable/uri.rb#1109 + # source://addressable//lib/addressable/uri.rb#1120 def host; end # Sets the host component for this URI. # # @param new_host [String, #to_str] The new host component. # - # source://addressable//lib/addressable/uri.rb#1145 + # source://addressable//lib/addressable/uri.rb#1156 def host=(new_host); end # This method is same as URI::Generic#host except @@ -973,7 +973,7 @@ class Addressable::URI # @return [String] The hostname for this URI. # @see Addressable::URI#host # - # source://addressable//lib/addressable/uri.rb#1167 + # source://addressable//lib/addressable/uri.rb#1178 def hostname; end # This method is same as URI::Generic#host= except @@ -982,7 +982,7 @@ class Addressable::URI # @param new_hostname [String, #to_str] The new hostname for this URI. # @see Addressable::URI#host= # - # source://addressable//lib/addressable/uri.rb#1179 + # source://addressable//lib/addressable/uri.rb#1190 def hostname=(new_hostname); end # The inferred port component for this URI. @@ -991,17 +991,17 @@ class Addressable::URI # # @return [Integer] The inferred port component. # - # source://addressable//lib/addressable/uri.rb#1429 + # source://addressable//lib/addressable/uri.rb#1440 def inferred_port; end - # source://addressable//lib/addressable/uri.rb#2406 + # source://addressable//lib/addressable/uri.rb#2417 def init_with(coder); end # Returns a String representation of the URI object's state. # # @return [String] The URI object's state, as a String. # - # source://addressable//lib/addressable/uri.rb#2373 + # source://addressable//lib/addressable/uri.rb#2384 def inspect; end # Determines if the scheme indicates an IP-based protocol. @@ -1009,7 +1009,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the scheme indicates an IP-based protocol. # false otherwise. # - # source://addressable//lib/addressable/uri.rb#1844 + # source://addressable//lib/addressable/uri.rb#1855 def ip_based?; end # Joins two URIs together. @@ -1017,7 +1017,7 @@ class Addressable::URI # @param The [String, Addressable::URI, #to_str] URI to join with. # @return [Addressable::URI] The joined URI. # - # source://addressable//lib/addressable/uri.rb#1878 + # source://addressable//lib/addressable/uri.rb#1889 def join(uri); end # Destructive form of join. @@ -1026,7 +1026,7 @@ class Addressable::URI # @return [Addressable::URI] The joined URI. # @see Addressable::URI#join # - # source://addressable//lib/addressable/uri.rb#1981 + # source://addressable//lib/addressable/uri.rb#1992 def join!(uri); end # Merges a URI with a Hash of components. @@ -1038,7 +1038,7 @@ class Addressable::URI # @return [Addressable::URI] The merged URI. # @see Hash#merge # - # source://addressable//lib/addressable/uri.rb#1996 + # source://addressable//lib/addressable/uri.rb#2007 def merge(hash); end # Destructive form of merge. @@ -1047,7 +1047,7 @@ class Addressable::URI # @return [Addressable::URI] The merged URI. # @see Addressable::URI#merge # - # source://addressable//lib/addressable/uri.rb#2061 + # source://addressable//lib/addressable/uri.rb#2072 def merge!(uri); end # Returns a normalized URI object. @@ -1060,7 +1060,7 @@ class Addressable::URI # # @return [Addressable::URI] The normalized URI. # - # source://addressable//lib/addressable/uri.rb#2153 + # source://addressable//lib/addressable/uri.rb#2164 def normalize; end # Destructively normalizes this URI object. @@ -1068,63 +1068,63 @@ class Addressable::URI # @return [Addressable::URI] The normalized URI. # @see Addressable::URI#normalize # - # source://addressable//lib/addressable/uri.rb#2179 + # source://addressable//lib/addressable/uri.rb#2190 def normalize!; end # The authority component for this URI, normalized. # # @return [String] The authority component, normalized. # - # source://addressable//lib/addressable/uri.rb#1241 + # source://addressable//lib/addressable/uri.rb#1252 def normalized_authority; end # The fragment component for this URI, normalized. # # @return [String] The fragment component, normalized. # - # source://addressable//lib/addressable/uri.rb#1805 + # source://addressable//lib/addressable/uri.rb#1816 def normalized_fragment; end # The host component for this URI, normalized. # # @return [String] The host component, normalized. # - # source://addressable//lib/addressable/uri.rb#1115 + # source://addressable//lib/addressable/uri.rb#1126 def normalized_host; end # The password component for this URI, normalized. # # @return [String] The password component, normalized. # - # source://addressable//lib/addressable/uri.rb#991 + # source://addressable//lib/addressable/uri.rb#1002 def normalized_password; end # The path component for this URI, normalized. # # @return [String] The path component, normalized. # - # source://addressable//lib/addressable/uri.rb#1524 + # source://addressable//lib/addressable/uri.rb#1535 def normalized_path; end # The port component for this URI, normalized. # # @return [Integer] The port component, normalized. # - # source://addressable//lib/addressable/uri.rb#1381 + # source://addressable//lib/addressable/uri.rb#1392 def normalized_port; end # The query component for this URI, normalized. # # @return [String] The query component, normalized. # - # source://addressable//lib/addressable/uri.rb#1602 + # source://addressable//lib/addressable/uri.rb#1613 def normalized_query(*flags); end # The scheme component for this URI, normalized. # # @return [String] The scheme component, normalized. # - # source://addressable//lib/addressable/uri.rb#885 + # source://addressable//lib/addressable/uri.rb#896 def normalized_scheme; end # The normalized combination of components that represent a site. @@ -1136,21 +1136,21 @@ class Addressable::URI # # @return [String] The normalized components that identify a site. # - # source://addressable//lib/addressable/uri.rb#1474 + # source://addressable//lib/addressable/uri.rb#1485 def normalized_site; end # The user component for this URI, normalized. # # @return [String] The user component, normalized. # - # source://addressable//lib/addressable/uri.rb#936 + # source://addressable//lib/addressable/uri.rb#947 def normalized_user; end # The userinfo component for this URI, normalized. # # @return [String] The userinfo component, normalized. # - # source://addressable//lib/addressable/uri.rb#1057 + # source://addressable//lib/addressable/uri.rb#1068 def normalized_userinfo; end # Omits components from a URI. @@ -1163,7 +1163,7 @@ class Addressable::URI # @param *components [Symbol] The components to be omitted. # @return [Addressable::URI] The URI with components omitted. # - # source://addressable//lib/addressable/uri.rb#2286 + # source://addressable//lib/addressable/uri.rb#2297 def omit(*components); end # Destructive form of omit. @@ -1172,7 +1172,7 @@ class Addressable::URI # @return [Addressable::URI] The URI with components omitted. # @see Addressable::URI#omit # - # source://addressable//lib/addressable/uri.rb#2313 + # source://addressable//lib/addressable/uri.rb#2324 def omit!(*components); end # The origin for this URI, serialized to ASCII, as per @@ -1180,7 +1180,7 @@ class Addressable::URI # # @return [String] The serialized origin. # - # source://addressable//lib/addressable/uri.rb#1303 + # source://addressable//lib/addressable/uri.rb#1314 def origin; end # Sets the origin for this URI, serialized to ASCII, as per @@ -1189,35 +1189,35 @@ class Addressable::URI # # @param new_origin [String, #to_str] The new origin component. # - # source://addressable//lib/addressable/uri.rb#1322 + # source://addressable//lib/addressable/uri.rb#1333 def origin=(new_origin); end # The password component for this URI. # # @return [String] The password component. # - # source://addressable//lib/addressable/uri.rb#985 + # source://addressable//lib/addressable/uri.rb#996 def password; end # Sets the password component for this URI. # # @param new_password [String, #to_str] The new password component. # - # source://addressable//lib/addressable/uri.rb#1014 + # source://addressable//lib/addressable/uri.rb#1025 def password=(new_password); end # The path component for this URI. # # @return [String] The path component. # - # source://addressable//lib/addressable/uri.rb#1517 + # source://addressable//lib/addressable/uri.rb#1528 def path; end # Sets the path component for this URI. # # @param new_path [String, #to_str] The new path component. # - # source://addressable//lib/addressable/uri.rb#1556 + # source://addressable//lib/addressable/uri.rb#1567 def path=(new_path); end # The port component for this URI. @@ -1226,28 +1226,28 @@ class Addressable::URI # # @return [Integer] The port component. # - # source://addressable//lib/addressable/uri.rb#1375 + # source://addressable//lib/addressable/uri.rb#1386 def port; end # Sets the port component for this URI. # # @param new_port [String, Integer, #to_s] The new port component. # - # source://addressable//lib/addressable/uri.rb#1397 + # source://addressable//lib/addressable/uri.rb#1408 def port=(new_port); end # The query component for this URI. # # @return [String] The query component. # - # source://addressable//lib/addressable/uri.rb#1596 + # source://addressable//lib/addressable/uri.rb#1607 def query; end # Sets the query component for this URI. # # @param new_query [String, #to_str] The new query component. # - # source://addressable//lib/addressable/uri.rb#1630 + # source://addressable//lib/addressable/uri.rb#1641 def query=(new_query); end # Converts the query component to a Hash value. @@ -1268,7 +1268,7 @@ class Addressable::URI # @return [Hash, Array, nil] The query string parsed as a Hash or Array # or nil if the query string is blank. # - # source://addressable//lib/addressable/uri.rb#1661 + # source://addressable//lib/addressable/uri.rb#1672 def query_values(return_type = T.unsafe(nil)); end # Sets the query component for this URI from a Hash object. @@ -1289,7 +1289,7 @@ class Addressable::URI # # => "flag&key=value" # @param new_query_values [Hash, #to_hash, Array] The new query values. # - # source://addressable//lib/addressable/uri.rb#1712 + # source://addressable//lib/addressable/uri.rb#1723 def query_values=(new_query_values); end # Determines if the URI is relative. @@ -1297,7 +1297,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URI is relative. false # otherwise. # - # source://addressable//lib/addressable/uri.rb#1858 + # source://addressable//lib/addressable/uri.rb#1869 def relative?; end # The HTTP request URI for this URI. This is the path and the @@ -1305,14 +1305,14 @@ class Addressable::URI # # @return [String] The request URI required for an HTTP request. # - # source://addressable//lib/addressable/uri.rb#1763 + # source://addressable//lib/addressable/uri.rb#1774 def request_uri; end # Sets the HTTP request URI for this URI. # # @param new_request_uri [String, #to_str] The new HTTP request URI. # - # source://addressable//lib/addressable/uri.rb#1775 + # source://addressable//lib/addressable/uri.rb#1786 def request_uri=(new_request_uri); end # Returns the shortest normalized relative form of this URI that uses the @@ -1322,7 +1322,7 @@ class Addressable::URI # @param uri [String, Addressable::URI, #to_str] The URI to route from. # @return [Addressable::URI] The normalized relative URI that is equivalent to the original URI. # - # source://addressable//lib/addressable/uri.rb#2074 + # source://addressable//lib/addressable/uri.rb#2085 def route_from(uri); end # Returns the shortest normalized relative form of the supplied URI that @@ -1332,21 +1332,21 @@ class Addressable::URI # @param uri [String, Addressable::URI, #to_str] The URI to route to. # @return [Addressable::URI] The normalized relative URI that is equivalent to the supplied URI. # - # source://addressable//lib/addressable/uri.rb#2139 + # source://addressable//lib/addressable/uri.rb#2150 def route_to(uri); end # The scheme component for this URI. # # @return [String] The scheme component. # - # source://addressable//lib/addressable/uri.rb#879 + # source://addressable//lib/addressable/uri.rb#890 def scheme; end # Sets the scheme component for this URI. # # @param new_scheme [String, #to_str] The new scheme component. # - # source://addressable//lib/addressable/uri.rb#906 + # source://addressable//lib/addressable/uri.rb#917 def scheme=(new_scheme); end # The combination of components that represent a site. @@ -1358,14 +1358,14 @@ class Addressable::URI # # @return [String] The components that identify a site. # - # source://addressable//lib/addressable/uri.rb#1456 + # source://addressable//lib/addressable/uri.rb#1467 def site; end # Sets the site value for this URI. # # @param new_site [String, #to_str] The new site value. # - # source://addressable//lib/addressable/uri.rb#1495 + # source://addressable//lib/addressable/uri.rb#1506 def site=(new_site); end # Returns the top-level domain for this host. @@ -1373,28 +1373,28 @@ class Addressable::URI # @example # Addressable::URI.parse("http://www.example.co.uk").tld # => "co.uk" # - # source://addressable//lib/addressable/uri.rb#1196 + # source://addressable//lib/addressable/uri.rb#1207 def tld; end # Sets the top-level domain for this URI. # # @param new_tld [String, #to_str] The new top-level domain. # - # source://addressable//lib/addressable/uri.rb#1204 + # source://addressable//lib/addressable/uri.rb#1215 def tld=(new_tld); end # Returns a Hash of the URI components. # # @return [Hash] The URI as a Hash of components. # - # source://addressable//lib/addressable/uri.rb#2356 + # source://addressable//lib/addressable/uri.rb#2367 def to_hash; end # Converts the URI to a String. # # @return [String] The URI's String representation. # - # source://addressable//lib/addressable/uri.rb#2330 + # source://addressable//lib/addressable/uri.rb#2341 def to_s; end # Converts the URI to a String. @@ -1402,21 +1402,21 @@ class Addressable::URI # # @return [String] The URI's String representation. # - # source://addressable//lib/addressable/uri.rb#2330 + # source://addressable//lib/addressable/uri.rb#2341 def to_str; end # The user component for this URI. # # @return [String] The user component. # - # source://addressable//lib/addressable/uri.rb#930 + # source://addressable//lib/addressable/uri.rb#941 def user; end # Sets the user component for this URI. # # @param new_user [String, #to_str] The new user component. # - # source://addressable//lib/addressable/uri.rb#959 + # source://addressable//lib/addressable/uri.rb#970 def user=(new_user); end # The userinfo component for this URI. @@ -1424,14 +1424,14 @@ class Addressable::URI # # @return [String] The userinfo component. # - # source://addressable//lib/addressable/uri.rb#1041 + # source://addressable//lib/addressable/uri.rb#1052 def userinfo; end # Sets the userinfo component for this URI. # # @param new_userinfo [String, #to_str] The new userinfo component. # - # source://addressable//lib/addressable/uri.rb#1080 + # source://addressable//lib/addressable/uri.rb#1091 def userinfo=(new_userinfo); end protected @@ -1440,14 +1440,14 @@ class Addressable::URI # # @api private # - # source://addressable//lib/addressable/uri.rb#2550 + # source://addressable//lib/addressable/uri.rb#2561 def force_utf8_encoding_if_needed(str); end # Resets composite values for the entire URI # # @api private # - # source://addressable//lib/addressable/uri.rb#2541 + # source://addressable//lib/addressable/uri.rb#2552 def remove_composite_values; end # Replaces the internal state of self with the specified URI's state. @@ -1456,7 +1456,7 @@ class Addressable::URI # @param uri [Addressable::URI] The URI to replace self with. # @return [Addressable::URI] self. # - # source://addressable//lib/addressable/uri.rb#2508 + # source://addressable//lib/addressable/uri.rb#2519 def replace_self(uri); end # Splits path string with "/" (slash). @@ -1466,12 +1466,12 @@ class Addressable::URI # @param path [String] The path to split. # @return [Array] An array of parts of path. # - # source://addressable//lib/addressable/uri.rb#2531 + # source://addressable//lib/addressable/uri.rb#2542 def split_path(path); end # Ensures that the URI is valid. # - # source://addressable//lib/addressable/uri.rb#2465 + # source://addressable//lib/addressable/uri.rb#2476 def validate; end private @@ -1480,7 +1480,7 @@ class Addressable::URI # # @api private # - # source://addressable//lib/addressable/uri.rb#2562 + # source://addressable//lib/addressable/uri.rb#2573 def reset_ivs; end class << self @@ -1509,7 +1509,7 @@ class Addressable::URI # @return [Addressable::URI] The parsed file scheme URI or the original URI if some other URI # scheme was provided. # - # source://addressable//lib/addressable/uri.rb#279 + # source://addressable//lib/addressable/uri.rb#292 def convert_path(path); end # Percent encodes any special characters in the URI. @@ -1523,7 +1523,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#605 + # source://addressable//lib/addressable/uri.rb#616 def encode(uri, return_type = T.unsafe(nil)); end # Percent encodes a URI component. @@ -1556,7 +1556,7 @@ class Addressable::URI # character_class. # @return [String] The encoded component. # - # source://addressable//lib/addressable/uri.rb#390 + # source://addressable//lib/addressable/uri.rb#403 def encode_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end # Percent encodes any special characters in the URI. @@ -1570,7 +1570,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#605 + # source://addressable//lib/addressable/uri.rb#616 def escape(uri, return_type = T.unsafe(nil)); end # Percent encodes a URI component. @@ -1603,7 +1603,7 @@ class Addressable::URI # character_class. # @return [String] The encoded component. # - # source://addressable//lib/addressable/uri.rb#390 + # source://addressable//lib/addressable/uri.rb#403 def escape_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end # Encodes a set of key/value pairs according to the rules for the @@ -1614,7 +1614,7 @@ class Addressable::URI # Defaults to false. # @return [String] The encoded value. # - # source://addressable//lib/addressable/uri.rb#729 + # source://addressable//lib/addressable/uri.rb#740 def form_encode(form_values, sort = T.unsafe(nil)); end # Decodes a String according to the rules for the @@ -1625,7 +1625,7 @@ class Addressable::URI # This is not a Hash because of the possibility for # duplicate keys. # - # source://addressable//lib/addressable/uri.rb#782 + # source://addressable//lib/addressable/uri.rb#793 def form_unencode(encoded_value); end # Converts an input to a URI. The input does not have to be a valid @@ -1639,14 +1639,14 @@ class Addressable::URI # Defaults to {:scheme => "http"}. # @return [Addressable::URI] The parsed URI. # - # source://addressable//lib/addressable/uri.rb#178 + # source://addressable//lib/addressable/uri.rb#191 def heuristic_parse(uri, hints = T.unsafe(nil)); end # Returns an array of known ip-based schemes. These schemes typically # use a similar URI form: # //:@:/ # - # source://addressable//lib/addressable/uri.rb#1358 + # source://addressable//lib/addressable/uri.rb#1369 def ip_based_schemes; end # Joins several URIs together. @@ -1659,7 +1659,7 @@ class Addressable::URI # @param *uris [String, Addressable::URI, #to_str] The URIs to join. # @return [Addressable::URI] The joined URI. # - # source://addressable//lib/addressable/uri.rb#330 + # source://addressable//lib/addressable/uri.rb#343 def join(*uris); end # Normalizes the encoding of a URI component. @@ -1701,7 +1701,7 @@ class Addressable::URI # normalized to "%2F") but otherwise left alone. # @return [String] The normalized component. # - # source://addressable//lib/addressable/uri.rb#541 + # source://addressable//lib/addressable/uri.rb#552 def normalize_component(component, character_class = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Resolves paths to their simplest form. @@ -1709,7 +1709,7 @@ class Addressable::URI # @param path [String] The path to normalize. # @return [String] The normalized path. # - # source://addressable//lib/addressable/uri.rb#2429 + # source://addressable//lib/addressable/uri.rb#2440 def normalize_path(path); end # Normalizes the encoding of a URI. Characters within a hostname are @@ -1724,7 +1724,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#660 + # source://addressable//lib/addressable/uri.rb#671 def normalized_encode(uri, return_type = T.unsafe(nil)); end # Returns a URI object based on the parsed string. @@ -1734,14 +1734,14 @@ class Addressable::URI # Addressable::URI. # @return [Addressable::URI] The parsed URI. # - # source://addressable//lib/addressable/uri.rb#101 + # source://addressable//lib/addressable/uri.rb#114 def parse(uri); end # Returns a hash of common IP-based schemes and their default port # numbers. Adding new schemes to this hash, as necessary, will allow # for better URI normalization. # - # source://addressable//lib/addressable/uri.rb#1365 + # source://addressable//lib/addressable/uri.rb#1376 def port_mapping; end # Unencodes any percent encoded characters within a URI component. @@ -1760,7 +1760,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#461 + # source://addressable//lib/addressable/uri.rb#472 def unencode(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Unencodes any percent encoded characters within a URI component. @@ -1779,7 +1779,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#461 + # source://addressable//lib/addressable/uri.rb#472 def unencode_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Unencodes any percent encoded characters within a URI component. @@ -1798,7 +1798,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#461 + # source://addressable//lib/addressable/uri.rb#472 def unescape(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Unencodes any percent encoded characters within a URI component. @@ -1817,7 +1817,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#461 + # source://addressable//lib/addressable/uri.rb#472 def unescape_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end end end @@ -1837,34 +1837,37 @@ module Addressable::URI::CharacterClasses; end # source://addressable//lib/addressable/uri.rb#47 Addressable::URI::CharacterClasses::ALPHA = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#56 +# source://addressable//lib/addressable/uri.rb#57 Addressable::URI::CharacterClasses::AUTHORITY = T.let(T.unsafe(nil), String) # source://addressable//lib/addressable/uri.rb#48 Addressable::URI::CharacterClasses::DIGIT = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#59 +# source://addressable//lib/addressable/uri.rb#60 Addressable::URI::CharacterClasses::FRAGMENT = T.let(T.unsafe(nil), String) # source://addressable//lib/addressable/uri.rb#49 Addressable::URI::CharacterClasses::GEN_DELIMS = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#55 +# source://addressable//lib/addressable/uri.rb#56 Addressable::URI::CharacterClasses::HOST = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#57 +# source://addressable//lib/addressable/uri.rb#58 Addressable::URI::CharacterClasses::PATH = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#53 +# source://addressable//lib/addressable/uri.rb#54 Addressable::URI::CharacterClasses::PCHAR = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#58 +# source://addressable//lib/addressable/uri.rb#59 Addressable::URI::CharacterClasses::QUERY = T.let(T.unsafe(nil), String) # source://addressable//lib/addressable/uri.rb#51 Addressable::URI::CharacterClasses::RESERVED = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#54 +# source://addressable//lib/addressable/uri.rb#53 +Addressable::URI::CharacterClasses::RESERVED_AND_UNRESERVED = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#55 Addressable::URI::CharacterClasses::SCHEME = T.let(T.unsafe(nil), String) # source://addressable//lib/addressable/uri.rb#50 @@ -1874,6 +1877,36 @@ Addressable::URI::CharacterClasses::SUB_DELIMS = T.let(T.unsafe(nil), String) Addressable::URI::CharacterClasses::UNRESERVED = T.let(T.unsafe(nil), String) # source://addressable//lib/addressable/uri.rb#72 +module Addressable::URI::CharacterClassesRegexps; end + +# source://addressable//lib/addressable/uri.rb#73 +Addressable::URI::CharacterClassesRegexps::AUTHORITY = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#74 +Addressable::URI::CharacterClassesRegexps::FRAGMENT = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#75 +Addressable::URI::CharacterClassesRegexps::HOST = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#76 +Addressable::URI::CharacterClassesRegexps::PATH = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#77 +Addressable::URI::CharacterClassesRegexps::QUERY = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#78 +Addressable::URI::CharacterClassesRegexps::RESERVED = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#79 +Addressable::URI::CharacterClassesRegexps::RESERVED_AND_UNRESERVED = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#80 +Addressable::URI::CharacterClassesRegexps::SCHEME = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#81 +Addressable::URI::CharacterClassesRegexps::UNRESERVED = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#85 Addressable::URI::EMPTY_STR = T.let(T.unsafe(nil), String) # Raised if something other than a uri is supplied. @@ -1881,67 +1914,67 @@ Addressable::URI::EMPTY_STR = T.let(T.unsafe(nil), String) # source://addressable//lib/addressable/uri.rb#34 class Addressable::URI::InvalidURIError < ::StandardError; end -# source://addressable//lib/addressable/uri.rb#2587 +# source://addressable//lib/addressable/uri.rb#2598 module Addressable::URI::NONE; end -# source://addressable//lib/addressable/uri.rb#1519 +# source://addressable//lib/addressable/uri.rb#1530 Addressable::URI::NORMPATH = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#62 +# source://addressable//lib/addressable/uri.rb#63 module Addressable::URI::NormalizeCharacterClasses; end -# source://addressable//lib/addressable/uri.rb#67 +# source://addressable//lib/addressable/uri.rb#68 Addressable::URI::NormalizeCharacterClasses::FRAGMENT = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#63 +# source://addressable//lib/addressable/uri.rb#64 Addressable::URI::NormalizeCharacterClasses::HOST = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#65 +# source://addressable//lib/addressable/uri.rb#66 Addressable::URI::NormalizeCharacterClasses::PCHAR = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#68 +# source://addressable//lib/addressable/uri.rb#69 Addressable::URI::NormalizeCharacterClasses::QUERY = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#66 +# source://addressable//lib/addressable/uri.rb#67 Addressable::URI::NormalizeCharacterClasses::SCHEME = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#64 +# source://addressable//lib/addressable/uri.rb#65 Addressable::URI::NormalizeCharacterClasses::UNRESERVED = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#2416 +# source://addressable//lib/addressable/uri.rb#2427 Addressable::URI::PARENT = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#76 +# source://addressable//lib/addressable/uri.rb#89 Addressable::URI::PORT_MAPPING = T.let(T.unsafe(nil), Hash) -# source://addressable//lib/addressable/uri.rb#2418 +# source://addressable//lib/addressable/uri.rb#2429 Addressable::URI::RULE_2A = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#2419 +# source://addressable//lib/addressable/uri.rb#2430 Addressable::URI::RULE_2B_2C = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#2420 +# source://addressable//lib/addressable/uri.rb#2431 Addressable::URI::RULE_2D = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#2421 +# source://addressable//lib/addressable/uri.rb#2432 Addressable::URI::RULE_PREFIXED_PARENT = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#2415 +# source://addressable//lib/addressable/uri.rb#2426 Addressable::URI::SELF_REF = T.let(T.unsafe(nil), String) # Tables used to optimize encoding operations in `self.encode_component` # and `self.normalize_component` # -# source://addressable//lib/addressable/uri.rb#347 +# source://addressable//lib/addressable/uri.rb#360 Addressable::URI::SEQUENCE_ENCODING_TABLE = T.let(T.unsafe(nil), Array) -# source://addressable//lib/addressable/uri.rb#351 +# source://addressable//lib/addressable/uri.rb#364 Addressable::URI::SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = T.let(T.unsafe(nil), Array) -# source://addressable//lib/addressable/uri.rb#71 +# source://addressable//lib/addressable/uri.rb#84 Addressable::URI::SLASH = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#74 +# source://addressable//lib/addressable/uri.rb#87 Addressable::URI::URIREGEX = T.let(T.unsafe(nil), Regexp) # source://addressable//lib/addressable/version.rb#23 diff --git a/sorbet/rbi/gems/base64@0.1.1.rbi b/sorbet/rbi/gems/base64@0.1.1.rbi deleted file mode 100644 index 58bcecc24..000000000 --- a/sorbet/rbi/gems/base64@0.1.1.rbi +++ /dev/null @@ -1,172 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `base64` gem. -# Please instead update this file by running `bin/tapioca gem base64`. - -# The Base64 module provides for the encoding (#encode64, #strict_encode64, -# #urlsafe_encode64) and decoding (#decode64, #strict_decode64, -# #urlsafe_decode64) of binary data using a Base64 representation. -# -# == Example -# -# A simple encoding and decoding. -# -# require "base64" -# -# enc = Base64.encode64('Send reinforcements') -# # -> "U2VuZCByZWluZm9yY2VtZW50cw==\n" -# plain = Base64.decode64(enc) -# # -> "Send reinforcements" -# -# The purpose of using base64 to encode data is that it translates any -# binary data into purely printable characters. -module Base64 - private - - # Returns the Base64-decoded version of +str+. - # This method complies with RFC 2045. - # Characters outside the base alphabet are ignored. - # - # require 'base64' - # str = 'VGhpcyBpcyBsaW5lIG9uZQpUaGlzIG' + - # 'lzIGxpbmUgdHdvClRoaXMgaXMgbGlu' + - # 'ZSB0aHJlZQpBbmQgc28gb24uLi4K' - # puts Base64.decode64(str) - # - # Generates: - # - # This is line one - # This is line two - # This is line three - # And so on... - # - # source://base64//base64.rb#58 - def decode64(str); end - - # Returns the Base64-encoded version of +bin+. - # This method complies with RFC 2045. - # Line feeds are added to every 60 encoded characters. - # - # require 'base64' - # Base64.encode64("Now is the time for all good coders\nto learn Ruby") - # - # Generates: - # - # Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g - # UnVieQ== - # - # source://base64//base64.rb#38 - def encode64(bin); end - - # Returns the Base64-decoded version of +str+. - # This method complies with RFC 4648. - # ArgumentError is raised if +str+ is incorrectly padded or contains - # non-alphabet characters. Note that CR or LF are also rejected. - # - # source://base64//base64.rb#73 - def strict_decode64(str); end - - # Returns the Base64-encoded version of +bin+. - # This method complies with RFC 4648. - # No line feeds are added. - # - # source://base64//base64.rb#65 - def strict_encode64(bin); end - - # Returns the Base64-decoded version of +str+. - # This method complies with ``Base 64 Encoding with URL and Filename Safe - # Alphabet'' in RFC 4648. - # The alphabet uses '-' instead of '+' and '_' instead of '/'. - # - # The padding character is optional. - # This method accepts both correctly-padded and unpadded input. - # Note that it still rejects incorrectly-padded input. - # - # source://base64//base64.rb#98 - def urlsafe_decode64(str); end - - # Returns the Base64-encoded version of +bin+. - # This method complies with ``Base 64 Encoding with URL and Filename Safe - # Alphabet'' in RFC 4648. - # The alphabet uses '-' instead of '+' and '_' instead of '/'. - # Note that the result can still contain '='. - # You can remove the padding by setting +padding+ as false. - # - # source://base64//base64.rb#83 - def urlsafe_encode64(bin, padding: T.unsafe(nil)); end - - class << self - # Returns the Base64-decoded version of +str+. - # This method complies with RFC 2045. - # Characters outside the base alphabet are ignored. - # - # require 'base64' - # str = 'VGhpcyBpcyBsaW5lIG9uZQpUaGlzIG' + - # 'lzIGxpbmUgdHdvClRoaXMgaXMgbGlu' + - # 'ZSB0aHJlZQpBbmQgc28gb24uLi4K' - # puts Base64.decode64(str) - # - # Generates: - # - # This is line one - # This is line two - # This is line three - # And so on... - # - # source://base64//base64.rb#58 - def decode64(str); end - - # Returns the Base64-encoded version of +bin+. - # This method complies with RFC 2045. - # Line feeds are added to every 60 encoded characters. - # - # require 'base64' - # Base64.encode64("Now is the time for all good coders\nto learn Ruby") - # - # Generates: - # - # Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g - # UnVieQ== - # - # source://base64//base64.rb#38 - def encode64(bin); end - - # Returns the Base64-decoded version of +str+. - # This method complies with RFC 4648. - # ArgumentError is raised if +str+ is incorrectly padded or contains - # non-alphabet characters. Note that CR or LF are also rejected. - # - # source://base64//base64.rb#73 - def strict_decode64(str); end - - # Returns the Base64-encoded version of +bin+. - # This method complies with RFC 4648. - # No line feeds are added. - # - # source://base64//base64.rb#65 - def strict_encode64(bin); end - - # Returns the Base64-decoded version of +str+. - # This method complies with ``Base 64 Encoding with URL and Filename Safe - # Alphabet'' in RFC 4648. - # The alphabet uses '-' instead of '+' and '_' instead of '/'. - # - # The padding character is optional. - # This method accepts both correctly-padded and unpadded input. - # Note that it still rejects incorrectly-padded input. - # - # source://base64//base64.rb#98 - def urlsafe_decode64(str); end - - # Returns the Base64-encoded version of +bin+. - # This method complies with ``Base 64 Encoding with URL and Filename Safe - # Alphabet'' in RFC 4648. - # The alphabet uses '-' instead of '+' and '_' instead of '/'. - # Note that the result can still contain '='. - # You can remove the padding by setting +padding+ as false. - # - # source://base64//base64.rb#83 - def urlsafe_encode64(bin, padding: T.unsafe(nil)); end - end -end diff --git a/sorbet/rbi/gems/base64@0.2.0.rbi b/sorbet/rbi/gems/base64@0.2.0.rbi new file mode 100644 index 000000000..fc8d7763e --- /dev/null +++ b/sorbet/rbi/gems/base64@0.2.0.rbi @@ -0,0 +1,508 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `base64` gem. +# Please instead update this file by running `bin/tapioca gem base64`. + +# \Module \Base64 provides methods for: +# +# - Encoding a binary string (containing non-ASCII characters) +# as a string of printable ASCII characters. +# - Decoding such an encoded string. +# +# \Base64 is commonly used in contexts where binary data +# is not allowed or supported: +# +# - Images in HTML or CSS files, or in URLs. +# - Email attachments. +# +# A \Base64-encoded string is about one-third larger that its source. +# See the {Wikipedia article}[https://en.wikipedia.org/wiki/Base64] +# for more information. +# +# This module provides three pairs of encode/decode methods. +# Your choices among these methods should depend on: +# +# - Which character set is to be used for encoding and decoding. +# - Whether "padding" is to be used. +# - Whether encoded strings are to contain newlines. +# +# Note: Examples on this page assume that the including program has executed: +# +# require 'base64' +# +# == Encoding Character Sets +# +# A \Base64-encoded string consists only of characters from a 64-character set: +# +# - ('A'..'Z'). +# - ('a'..'z'). +# - ('0'..'9'). +# - =, the 'padding' character. +# - Either: +# - %w[+ /]: +# {RFC-2045-compliant}[https://datatracker.ietf.org/doc/html/rfc2045]; +# _not_ safe for URLs. +# - %w[- _]: +# {RFC-4648-compliant}[https://datatracker.ietf.org/doc/html/rfc4648]; +# safe for URLs. +# +# If you are working with \Base64-encoded strings that will come from +# or be put into URLs, you should choose this encoder-decoder pair +# of RFC-4648-compliant methods: +# +# - Base64.urlsafe_encode64 and Base64.urlsafe_decode64. +# +# Otherwise, you may choose any of the pairs in this module, +# including the pair above, or the RFC-2045-compliant pairs: +# +# - Base64.encode64 and Base64.decode64. +# - Base64.strict_encode64 and Base64.strict_decode64. +# +# == Padding +# +# \Base64-encoding changes a triplet of input bytes +# into a quartet of output characters. +# +# Padding in Encode Methods +# +# Padding -- extending an encoded string with zero, one, or two trailing +# = characters -- is performed by methods Base64.encode64, +# Base64.strict_encode64, and, by default, Base64.urlsafe_encode64: +# +# Base64.encode64('s') # => "cw==\n" +# Base64.strict_encode64('s') # => "cw==" +# Base64.urlsafe_encode64('s') # => "cw==" +# Base64.urlsafe_encode64('s', padding: false) # => "cw" +# +# When padding is performed, the encoded string is always of length 4n, +# where +n+ is a non-negative integer: +# +# - Input bytes of length 3n generate unpadded output characters +# of length 4n: +# +# # n = 1: 3 bytes => 4 characters. +# Base64.strict_encode64('123') # => "MDEy" +# # n = 2: 6 bytes => 8 characters. +# Base64.strict_encode64('123456') # => "MDEyMzQ1" +# +# - Input bytes of length 3n+1 generate padded output characters +# of length 4(n+1), with two padding characters at the end: +# +# # n = 1: 4 bytes => 8 characters. +# Base64.strict_encode64('1234') # => "MDEyMw==" +# # n = 2: 7 bytes => 12 characters. +# Base64.strict_encode64('1234567') # => "MDEyMzQ1Ng==" +# +# - Input bytes of length 3n+2 generate padded output characters +# of length 4(n+1), with one padding character at the end: +# +# # n = 1: 5 bytes => 8 characters. +# Base64.strict_encode64('12345') # => "MDEyMzQ=" +# # n = 2: 8 bytes => 12 characters. +# Base64.strict_encode64('12345678') # => "MDEyMzQ1Njc=" +# +# When padding is suppressed, for a positive integer n: +# +# - Input bytes of length 3n generate unpadded output characters +# of length 4n: +# +# # n = 1: 3 bytes => 4 characters. +# Base64.urlsafe_encode64('123', padding: false) # => "MDEy" +# # n = 2: 6 bytes => 8 characters. +# Base64.urlsafe_encode64('123456', padding: false) # => "MDEyMzQ1" +# +# - Input bytes of length 3n+1 generate unpadded output characters +# of length 4n+2, with two padding characters at the end: +# +# # n = 1: 4 bytes => 6 characters. +# Base64.urlsafe_encode64('1234', padding: false) # => "MDEyMw" +# # n = 2: 7 bytes => 10 characters. +# Base64.urlsafe_encode64('1234567', padding: false) # => "MDEyMzQ1Ng" +# +# - Input bytes of length 3n+2 generate unpadded output characters +# of length 4n+3, with one padding character at the end: +# +# # n = 1: 5 bytes => 7 characters. +# Base64.urlsafe_encode64('12345', padding: false) # => "MDEyMzQ" +# # m = 2: 8 bytes => 11 characters. +# Base64.urlsafe_encode64('12345678', padding: false) # => "MDEyMzQ1Njc" +# +# Padding in Decode Methods +# +# All of the \Base64 decode methods support (but do not require) padding. +# +# \Method Base64.decode64 does not check the size of the padding: +# +# Base64.decode64("MDEyMzQ1Njc") # => "01234567" +# Base64.decode64("MDEyMzQ1Njc=") # => "01234567" +# Base64.decode64("MDEyMzQ1Njc==") # => "01234567" +# +# \Method Base64.strict_decode64 strictly enforces padding size: +# +# Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError +# Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" +# Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError +# +# \Method Base64.urlsafe_decode64 allows padding in +str+, +# which if present, must be correct: +# see {Padding}[Base64.html#module-Base64-label-Padding], above: +# +# Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" +# Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" +# Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. +# +# == Newlines +# +# An encoded string returned by Base64.encode64 or Base64.urlsafe_encode64 +# has an embedded newline character +# after each 60-character sequence, and, if non-empty, at the end: +# +# # No newline if empty. +# encoded = Base64.encode64("\x00" * 0) +# encoded.index("\n") # => nil +# +# # Newline at end of short output. +# encoded = Base64.encode64("\x00" * 1) +# encoded.size # => 4 +# encoded.index("\n") # => 4 +# +# # Newline at end of longer output. +# encoded = Base64.encode64("\x00" * 45) +# encoded.size # => 60 +# encoded.index("\n") # => 60 +# +# # Newlines embedded and at end of still longer output. +# encoded = Base64.encode64("\x00" * 46) +# encoded.size # => 65 +# encoded.rindex("\n") # => 65 +# encoded.split("\n").map {|s| s.size } # => [60, 4] +# +# The string to be encoded may itself contain newlines, +# which are encoded as \Base64: +# +# # Base64.encode64("\n\n\n") # => "CgoK\n" +# s = "This is line 1\nThis is line 2\n" +# Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" +# +# source://base64//lib/base64.rb#184 +module Base64 + private + + # Returns a string containing the decoding of an RFC-2045-compliant + # \Base64-encoded string +str+: + # + # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" + # Base64.decode64(s) # => "This is line 1\nThis is line 2\n" + # + # Non-\Base64 characters in +str+ are ignored; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # these include newline characters and characters - and /: + # + # Base64.decode64("\x00\n-_") # => "" + # + # Padding in +str+ (even if incorrect) is ignored: + # + # Base64.decode64("MDEyMzQ1Njc") # => "01234567" + # Base64.decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.decode64("MDEyMzQ1Njc==") # => "01234567" + # + # source://base64//lib/base64.rb#241 + def decode64(str); end + + # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+. + # + # Per RFC 2045, the returned string may contain the URL-unsafe characters + # + or /; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.encode64("\xFB\xEF\xBE") # => "++++\n" + # Base64.encode64("\xFF\xFF\xFF") # => "////\n" + # + # The returned string may include padding; + # see {Padding}[Base64.html#module-Base64-label-Padding] above. + # + # Base64.encode64('*') # => "Kg==\n" + # + # The returned string ends with a newline character, and if sufficiently long + # will have one or more embedded newline characters; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.encode64('*') # => "Kg==\n" + # Base64.encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n" + # + # The string to be encoded may itself contain newlines, + # which will be encoded as ordinary \Base64: + # + # Base64.encode64("\n\n\n") # => "CgoK\n" + # s = "This is line 1\nThis is line 2\n" + # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" + # + # source://base64//lib/base64.rb#219 + def encode64(bin); end + + # Returns a string containing the decoding of an RFC-2045-compliant + # \Base64-encoded string +str+: + # + # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" + # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n" + # + # Non-\Base64 characters in +str+ not allowed; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # these include newline characters and characters - and /: + # + # Base64.strict_decode64("\n") # Raises ArgumentError + # Base64.strict_decode64('-') # Raises ArgumentError + # Base64.strict_decode64('_') # Raises ArgumentError + # + # Padding in +str+, if present, must be correct: + # + # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError + # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError + # + # source://base64//lib/base64.rb#297 + def strict_decode64(str); end + + # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+. + # + # Per RFC 2045, the returned string may contain the URL-unsafe characters + # + or /; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n" + # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n" + # + # The returned string may include padding; + # see {Padding}[Base64.html#module-Base64-label-Padding] above. + # + # Base64.strict_encode64('*') # => "Kg==\n" + # + # The returned string will have no newline characters, regardless of its length; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.strict_encode64('*') # => "Kg==" + # Base64.strict_encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" + # + # The string to be encoded may itself contain newlines, + # which will be encoded as ordinary \Base64: + # + # Base64.strict_encode64("\n\n\n") # => "CgoK" + # s = "This is line 1\nThis is line 2\n" + # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" + # + # source://base64//lib/base64.rb#273 + def strict_encode64(bin); end + + # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +str+: + # + # +str+ may not contain non-Base64 characters; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.urlsafe_decode64('+') # Raises ArgumentError. + # Base64.urlsafe_decode64('/') # Raises ArgumentError. + # Base64.urlsafe_decode64("\n") # Raises ArgumentError. + # + # Padding in +str+, if present, must be correct: + # see {Padding}[Base64.html#module-Base64-label-Padding], above: + # + # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" + # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. + # + # source://base64//lib/base64.rb#351 + def urlsafe_decode64(str); end + + # Returns the RFC-4648-compliant \Base64-encoding of +bin+. + # + # Per RFC 4648, the returned string will not contain the URL-unsafe characters + # + or /, + # but instead may contain the URL-safe characters + # - and _; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----" + # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____" + # + # By default, the returned string may have padding; + # see {Padding}[Base64.html#module-Base64-label-Padding], above: + # + # Base64.urlsafe_encode64('*') # => "Kg==" + # + # Optionally, you can suppress padding: + # + # Base64.urlsafe_encode64('*', padding: false) # => "Kg" + # + # The returned string will have no newline characters, regardless of its length; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.urlsafe_encode64('*') # => "Kg==" + # Base64.urlsafe_encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" + # + # source://base64//lib/base64.rb#328 + def urlsafe_encode64(bin, padding: T.unsafe(nil)); end + + class << self + # Returns a string containing the decoding of an RFC-2045-compliant + # \Base64-encoded string +str+: + # + # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" + # Base64.decode64(s) # => "This is line 1\nThis is line 2\n" + # + # Non-\Base64 characters in +str+ are ignored; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # these include newline characters and characters - and /: + # + # Base64.decode64("\x00\n-_") # => "" + # + # Padding in +str+ (even if incorrect) is ignored: + # + # Base64.decode64("MDEyMzQ1Njc") # => "01234567" + # Base64.decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.decode64("MDEyMzQ1Njc==") # => "01234567" + # + # source://base64//lib/base64.rb#241 + def decode64(str); end + + # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+. + # + # Per RFC 2045, the returned string may contain the URL-unsafe characters + # + or /; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.encode64("\xFB\xEF\xBE") # => "++++\n" + # Base64.encode64("\xFF\xFF\xFF") # => "////\n" + # + # The returned string may include padding; + # see {Padding}[Base64.html#module-Base64-label-Padding] above. + # + # Base64.encode64('*') # => "Kg==\n" + # + # The returned string ends with a newline character, and if sufficiently long + # will have one or more embedded newline characters; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.encode64('*') # => "Kg==\n" + # Base64.encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n" + # + # The string to be encoded may itself contain newlines, + # which will be encoded as ordinary \Base64: + # + # Base64.encode64("\n\n\n") # => "CgoK\n" + # s = "This is line 1\nThis is line 2\n" + # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" + # + # source://base64//lib/base64.rb#219 + def encode64(bin); end + + # Returns a string containing the decoding of an RFC-2045-compliant + # \Base64-encoded string +str+: + # + # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" + # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n" + # + # Non-\Base64 characters in +str+ not allowed; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # these include newline characters and characters - and /: + # + # Base64.strict_decode64("\n") # Raises ArgumentError + # Base64.strict_decode64('-') # Raises ArgumentError + # Base64.strict_decode64('_') # Raises ArgumentError + # + # Padding in +str+, if present, must be correct: + # + # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError + # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError + # + # source://base64//lib/base64.rb#297 + def strict_decode64(str); end + + # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+. + # + # Per RFC 2045, the returned string may contain the URL-unsafe characters + # + or /; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n" + # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n" + # + # The returned string may include padding; + # see {Padding}[Base64.html#module-Base64-label-Padding] above. + # + # Base64.strict_encode64('*') # => "Kg==\n" + # + # The returned string will have no newline characters, regardless of its length; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.strict_encode64('*') # => "Kg==" + # Base64.strict_encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" + # + # The string to be encoded may itself contain newlines, + # which will be encoded as ordinary \Base64: + # + # Base64.strict_encode64("\n\n\n") # => "CgoK" + # s = "This is line 1\nThis is line 2\n" + # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" + # + # source://base64//lib/base64.rb#273 + def strict_encode64(bin); end + + # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +str+: + # + # +str+ may not contain non-Base64 characters; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.urlsafe_decode64('+') # Raises ArgumentError. + # Base64.urlsafe_decode64('/') # Raises ArgumentError. + # Base64.urlsafe_decode64("\n") # Raises ArgumentError. + # + # Padding in +str+, if present, must be correct: + # see {Padding}[Base64.html#module-Base64-label-Padding], above: + # + # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" + # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. + # + # source://base64//lib/base64.rb#351 + def urlsafe_decode64(str); end + + # Returns the RFC-4648-compliant \Base64-encoding of +bin+. + # + # Per RFC 4648, the returned string will not contain the URL-unsafe characters + # + or /, + # but instead may contain the URL-safe characters + # - and _; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----" + # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____" + # + # By default, the returned string may have padding; + # see {Padding}[Base64.html#module-Base64-label-Padding], above: + # + # Base64.urlsafe_encode64('*') # => "Kg==" + # + # Optionally, you can suppress padding: + # + # Base64.urlsafe_encode64('*', padding: false) # => "Kg" + # + # The returned string will have no newline characters, regardless of its length; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.urlsafe_encode64('*') # => "Kg==" + # Base64.urlsafe_encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" + # + # source://base64//lib/base64.rb#328 + def urlsafe_encode64(bin, padding: T.unsafe(nil)); end + end +end + +# source://base64//lib/base64.rb#186 +Base64::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/bcrypt@3.1.19.rbi b/sorbet/rbi/gems/bcrypt@3.1.20.rbi similarity index 100% rename from sorbet/rbi/gems/bcrypt@3.1.19.rbi rename to sorbet/rbi/gems/bcrypt@3.1.20.rbi diff --git a/sorbet/rbi/gems/bigdecimal@3.1.6.rbi b/sorbet/rbi/gems/bigdecimal@3.1.6.rbi new file mode 100644 index 000000000..439d14e31 --- /dev/null +++ b/sorbet/rbi/gems/bigdecimal@3.1.6.rbi @@ -0,0 +1,77 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `bigdecimal` gem. +# Please instead update this file by running `bin/tapioca gem bigdecimal`. + +# source://bigdecimal//lib/bigdecimal/util.rb#78 +class BigDecimal < ::Numeric + # call-seq: + # a.to_d -> bigdecimal + # + # Returns self. + # + # require 'bigdecimal/util' + # + # d = BigDecimal("3.14") + # d.to_d # => 0.314e1 + # + # source://bigdecimal//lib/bigdecimal/util.rb#110 + def to_d; end + + # call-seq: + # a.to_digits -> string + # + # Converts a BigDecimal to a String of the form "nnnnnn.mmm". + # This method is deprecated; use BigDecimal#to_s("F") instead. + # + # require 'bigdecimal/util' + # + # d = BigDecimal("3.14") + # d.to_digits # => "3.14" + # + # source://bigdecimal//lib/bigdecimal/util.rb#90 + def to_digits; end +end + +BigDecimal::VERSION = T.let(T.unsafe(nil), String) + +# source://bigdecimal//lib/bigdecimal/util.rb#138 +class Complex < ::Numeric + # call-seq: + # cmp.to_d -> bigdecimal + # cmp.to_d(precision) -> bigdecimal + # + # Returns the value as a BigDecimal. + # + # The +precision+ parameter is required for a rational complex number. + # This parameter is used to determine the number of significant digits + # for the result. + # + # require 'bigdecimal' + # require 'bigdecimal/util' + # + # Complex(0.1234567, 0).to_d(4) # => 0.1235e0 + # Complex(Rational(22, 7), 0).to_d(3) # => 0.314e1 + # + # See also Kernel.BigDecimal. + # + # source://bigdecimal//lib/bigdecimal/util.rb#157 + def to_d(*args); end +end + +# source://bigdecimal//lib/bigdecimal/util.rb#171 +class NilClass + # call-seq: + # nil.to_d -> bigdecimal + # + # Returns nil represented as a BigDecimal. + # + # require 'bigdecimal' + # require 'bigdecimal/util' + # + # nil.to_d # => 0.0 + # + # source://bigdecimal//lib/bigdecimal/util.rb#182 + def to_d; end +end diff --git a/sorbet/rbi/gems/byebug@11.1.3.rbi b/sorbet/rbi/gems/byebug@11.1.3.rbi deleted file mode 100644 index b2aace929..000000000 --- a/sorbet/rbi/gems/byebug@11.1.3.rbi +++ /dev/null @@ -1,3606 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `byebug` gem. -# Please instead update this file by running `bin/tapioca gem byebug`. - -# Reopen main module to define the library version -# -# source://byebug//lib/byebug/helpers/reflection.rb#3 -module Byebug - include ::Byebug::Helpers::ReflectionHelper - extend ::Byebug::Helpers::ReflectionHelper - extend ::Byebug - - # Debugger's display expressions - # - # source://byebug//lib/byebug/core.rb#31 - def displays; end - - # Debugger's display expressions - # - # source://byebug//lib/byebug/core.rb#31 - def displays=(_arg0); end - - # Configuration file used for startup commands. Default value is .byebugrc - # - # source://byebug//lib/byebug/core.rb#25 - def init_file; end - - # Configuration file used for startup commands. Default value is .byebugrc - # - # source://byebug//lib/byebug/core.rb#25 - def init_file=(_arg0); end - - # Running mode of the debugger. Can be either: - # - # * :attached => Attached to a running program through the `byebug` method. - # * :standalone => Started through `byebug` script. - # * :off => Ignoring any `byebug` method calls. - # - # source://byebug//lib/byebug/core.rb#41 - def mode; end - - # Running mode of the debugger. Can be either: - # - # * :attached => Attached to a running program through the `byebug` method. - # * :standalone => Started through `byebug` script. - # * :off => Ignoring any `byebug` method calls. - # - # source://byebug//lib/byebug/core.rb#41 - def mode=(_arg0); end - - # Runs normal byebug initialization scripts. - # - # Reads and executes the commands from init file (if any) in the current - # working directory. This is only done if the current directory is different - # from your home directory. Thus, you can have more than one init file, one - # generic in your home directory, and another, specific to the program you - # are debugging, in the directory where you invoke byebug. - # - # source://byebug//lib/byebug/core.rb#52 - def run_init_script; end - - private - - def add_catchpoint(_arg0); end - def breakpoints; end - def catchpoints; end - def contexts; end - def current_context; end - def debug_load(*_arg0); end - def lock; end - def post_mortem=(_arg0); end - def post_mortem?; end - def raised_exception; end - - # List of folders to load rc files from - # - # @note Files will be loaded in the order specified here. - # - # source://byebug//lib/byebug/core.rb#102 - def rc_dirs; end - - # Runs a initialization script file - # - # source://byebug//lib/byebug/core.rb#91 - def run_rc_file(rc_file); end - - def start; end - def started?; end - def stop; end - def stoppable?; end - def thread_context(_arg0); end - def tracing=(_arg0); end - def tracing?; end - def unlock; end - def verbose=(_arg0); end - def verbose?; end - - class << self - # The actual port that the control server is started at - # - # source://byebug//lib/byebug/remote.rb#25 - def actual_control_port; end - - # The actual port that the server is started at - # - # source://byebug//lib/byebug/remote.rb#20 - def actual_port; end - - def add_catchpoint(_arg0); end - - # Starts byebug, and stops at the first line of user's code. - # - # source://byebug//lib/byebug/attacher.rb#10 - def attach; end - - def breakpoints; end - def catchpoints; end - def contexts; end - def current_context; end - def debug_load(*_arg0); end - - # Saves information about the unhandled exception and gives a byebug - # prompt back to the user before program termination. - # - # source://byebug//lib/byebug/core.rb#76 - def handle_post_mortem; end - - # Interrupts the current thread - # - # source://byebug//lib/byebug/remote.rb#32 - def interrupt; end - - # source://byebug//lib/byebug/core.rb#61 - def load_settings; end - - def lock; end - - # source://byebug//lib/byebug/remote.rb#59 - def parse_host_and_port(host_port_spec); end - - def post_mortem=(_arg0); end - def post_mortem?; end - def raised_exception; end - - # source://byebug//lib/byebug/attacher.rb#21 - def spawn(host = T.unsafe(nil), port = T.unsafe(nil)); end - - def start; end - - # Connects to the remote byebug - # - # source://byebug//lib/byebug/remote.rb#55 - def start_client(host = T.unsafe(nil), port = T.unsafe(nil)); end - - # Starts the remote server control thread - # - # source://byebug//lib/byebug/remote.rb#48 - def start_control(host = T.unsafe(nil), port = T.unsafe(nil)); end - - # Starts the remote server main thread - # - # source://byebug//lib/byebug/remote.rb#39 - def start_server(host = T.unsafe(nil), port = T.unsafe(nil)); end - - def started?; end - def stop; end - def stoppable?; end - def thread_context(_arg0); end - def tracing=(_arg0); end - def tracing?; end - def unlock; end - def verbose=(_arg0); end - def verbose?; end - - # If in remote mode, wait for the remote connection - # - # source://byebug//lib/byebug/remote.rb#17 - def wait_connection; end - - # If in remote mode, wait for the remote connection - # - # source://byebug//lib/byebug/remote.rb#17 - def wait_connection=(_arg0); end - - private - - # source://byebug//lib/byebug/remote.rb#66 - def client; end - - # source://byebug//lib/byebug/remote.rb#76 - def control; end - - # source://byebug//lib/byebug/remote.rb#70 - def server; end - end -end - -# Setting for automatically invoking IRB on every stop. -# -# source://byebug//lib/byebug/settings/autoirb.rb#10 -class Byebug::AutoirbSetting < ::Byebug::Setting - # @return [AutoirbSetting] a new instance of AutoirbSetting - # - # source://byebug//lib/byebug/settings/autoirb.rb#13 - def initialize; end - - # source://byebug//lib/byebug/settings/autoirb.rb#17 - def banner; end - - # source://byebug//lib/byebug/settings/autoirb.rb#25 - def value; end - - # source://byebug//lib/byebug/settings/autoirb.rb#21 - def value=(val); end -end - -# source://byebug//lib/byebug/settings/autoirb.rb#11 -Byebug::AutoirbSetting::DEFAULT = T.let(T.unsafe(nil), Integer) - -# Setting for automatically listing source code on every stop. -# -# source://byebug//lib/byebug/settings/autolist.rb#10 -class Byebug::AutolistSetting < ::Byebug::Setting - # @return [AutolistSetting] a new instance of AutolistSetting - # - # source://byebug//lib/byebug/settings/autolist.rb#13 - def initialize; end - - # source://byebug//lib/byebug/settings/autolist.rb#17 - def banner; end - - # source://byebug//lib/byebug/settings/autolist.rb#25 - def value; end - - # source://byebug//lib/byebug/settings/autolist.rb#21 - def value=(val); end -end - -# source://byebug//lib/byebug/settings/autolist.rb#11 -Byebug::AutolistSetting::DEFAULT = T.let(T.unsafe(nil), Integer) - -# Setting for automatically invoking Pry on every stop. -# -# source://byebug//lib/byebug/settings/autopry.rb#10 -class Byebug::AutoprySetting < ::Byebug::Setting - # @return [AutoprySetting] a new instance of AutoprySetting - # - # source://byebug//lib/byebug/settings/autopry.rb#13 - def initialize; end - - # source://byebug//lib/byebug/settings/autopry.rb#17 - def banner; end - - # source://byebug//lib/byebug/settings/autopry.rb#25 - def value; end - - # source://byebug//lib/byebug/settings/autopry.rb#21 - def value=(val); end -end - -# source://byebug//lib/byebug/settings/autopry.rb#11 -Byebug::AutoprySetting::DEFAULT = T.let(T.unsafe(nil), Integer) - -# Setting for automatically saving previously entered commands to history -# when exiting the debugger. -# -# source://byebug//lib/byebug/settings/autosave.rb#10 -class Byebug::AutosaveSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/autosave.rb#13 - def banner; end -end - -# source://byebug//lib/byebug/settings/autosave.rb#11 -Byebug::AutosaveSetting::DEFAULT = T.let(T.unsafe(nil), TrueClass) - -# Command to display short paths in file names. -# -# For example, when displaying source code information. -# -# source://byebug//lib/byebug/settings/basename.rb#11 -class Byebug::BasenameSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/basename.rb#12 - def banner; end -end - -# Implements breakpoint functionality -# -# source://byebug//lib/byebug/commands/break.rb#13 -class Byebug::BreakCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - include ::Byebug::Helpers::FileHelper - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/break.rb#40 - def execute; end - - private - - # source://byebug//lib/byebug/commands/break.rb#83 - def add_line_breakpoint(file, line); end - - # source://byebug//lib/byebug/commands/break.rb#54 - def line_breakpoint(location); end - - # source://byebug//lib/byebug/commands/break.rb#65 - def method_breakpoint(location); end - - # source://byebug//lib/byebug/commands/break.rb#74 - def target_object(str); end - - # source://byebug//lib/byebug/commands/break.rb#104 - def valid_breakpoints_for(path, line); end - - class << self - # source://byebug//lib/byebug/commands/break.rb#24 - def description; end - - # source://byebug//lib/byebug/commands/break.rb#20 - def regexp; end - - # source://byebug//lib/byebug/commands/break.rb#36 - def short_description; end - end -end - -# Implements breakpoints -# -# source://byebug//lib/byebug/breakpoint.rb#7 -class Byebug::Breakpoint - def initialize(_arg0, _arg1, _arg2); end - - def enabled=(_arg0); end - def enabled?; end - def expr; end - def expr=(_arg0); end - def hit_condition; end - def hit_condition=(_arg0); end - def hit_count; end - def hit_value; end - def hit_value=(_arg0); end - def id; end - - # Prints all information associated to the breakpoint - # - # source://byebug//lib/byebug/breakpoint.rb#105 - def inspect; end - - def pos; end - def source; end - - class << self - # Adds a new breakpoint - # - # @param file [String] - # @param line [Fixnum] - # @param expr [String] - # - # source://byebug//lib/byebug/breakpoint.rb#29 - def add(file, line, expr = T.unsafe(nil)); end - - # First breakpoint, in order of creation - # - # source://byebug//lib/byebug/breakpoint.rb#11 - def first; end - - # Last breakpoint, in order of creation - # - # source://byebug//lib/byebug/breakpoint.rb#18 - def last; end - - # True if there's no breakpoints - # - # @return [Boolean] - # - # source://byebug//lib/byebug/breakpoint.rb#98 - def none?; end - - # Returns true if a breakpoint could be set in line number +lineno+ in file - # name +filename. - # - # @return [Boolean] - # - # source://byebug//lib/byebug/breakpoint.rb#91 - def potential_line?(filename, lineno); end - - # Returns an array of line numbers in file named +filename+ where - # breakpoints could be set. The list will contain an entry for each - # distinct line event call so it is possible (and possibly useful) for a - # line number appear more than once. - # - # @param filename [String] File name to inspect for possible breakpoints - # - # source://byebug//lib/byebug/breakpoint.rb#52 - def potential_lines(filename); end - - # Removes a breakpoint - # - # @param id [integer] breakpoint number - # - # source://byebug//lib/byebug/breakpoint.rb#40 - def remove(id); end - - private - - # source://byebug//lib/byebug/breakpoint.rb#63 - def potential_lines_with_trace_points(iseq, lines); end - - # source://byebug//lib/byebug/breakpoint.rb#74 - def potential_lines_without_trace_points(iseq, lines); end - end -end - -# Setting to customize the verbosity level for stack frames. -# -# source://byebug//lib/byebug/settings/callstyle.rb#9 -class Byebug::CallstyleSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/callstyle.rb#12 - def banner; end - - # source://byebug//lib/byebug/settings/callstyle.rb#16 - def to_s; end -end - -# source://byebug//lib/byebug/settings/callstyle.rb#10 -Byebug::CallstyleSetting::DEFAULT = T.let(T.unsafe(nil), String) - -# Implements exception catching. -# -# Enables the user to catch unhandled assertion when they happen. -# -# source://byebug//lib/byebug/commands/catch.rb#12 -class Byebug::CatchCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - - # source://byebug//lib/byebug/commands/catch.rb#38 - def execute; end - - private - - # source://byebug//lib/byebug/commands/catch.rb#57 - def add(exception); end - - # source://byebug//lib/byebug/commands/catch.rb#64 - def clear; end - - # source://byebug//lib/byebug/commands/catch.rb#68 - def info; end - - # source://byebug//lib/byebug/commands/catch.rb#50 - def remove(exception); end - - class << self - # source://byebug//lib/byebug/commands/catch.rb#21 - def description; end - - # source://byebug//lib/byebug/commands/catch.rb#17 - def regexp; end - - # source://byebug//lib/byebug/commands/catch.rb#34 - def short_description; end - end -end - -# Parent class of all byebug commands. -# -# Subclass it and name the subclass ending with the word Command to implement -# your own custom command. -# -# class MyCustomCommand < Command -# def self.regexp -# /custom_regexp/ -# end -# -# def self.description -# "Custom long desc" -# end -# -# def.short_description -# "Custom short desc" -# end -# -# def execute -# # My command's implementation -# end -# end -# -# @example Define a custom command -# -# source://byebug//lib/byebug/command.rb#33 -class Byebug::Command - extend ::Forwardable - extend ::Byebug::Helpers::StringHelper - - # @return [Command] a new instance of Command - # - # source://byebug//lib/byebug/command.rb#38 - def initialize(processor, input = T.unsafe(nil)); end - - # source://byebug//lib/byebug/command.rb#51 - def arguments; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def confirm(*args, **_arg1, &block); end - - # source://byebug//lib/byebug/command.rb#43 - def context; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def errmsg(*args, **_arg1, &block); end - - # source://byebug//lib/byebug/command.rb#47 - def frame; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def help(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def match(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pr(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prc(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print(*args, **_arg1, &block); end - - # Returns the value of attribute processor. - # - # source://byebug//lib/byebug/command.rb#36 - def processor; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prv(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def puts(*args, **_arg1, &block); end - - class << self - # Special methods to allow command filtering in processors - # - # source://byebug//lib/byebug/command.rb#69 - def allow_in_control; end - - # Special methods to allow command filtering in processors - # - # source://byebug//lib/byebug/command.rb#69 - def allow_in_control=(_arg0); end - - # Special methods to allow command filtering in processors - # - # source://byebug//lib/byebug/command.rb#69 - def allow_in_post_mortem; end - - # Special methods to allow command filtering in processors - # - # source://byebug//lib/byebug/command.rb#69 - def allow_in_post_mortem=(_arg0); end - - # source://byebug//lib/byebug/command.rb#73 - def always_run; end - - # Sets the attribute always_run - # - # @param value the value to set the attribute always_run to. - # - # source://byebug//lib/byebug/command.rb#71 - def always_run=(_arg0); end - - # source://byebug//lib/byebug/command.rb#88 - def columnize(width); end - - # Default help text for a command. - # - # source://byebug//lib/byebug/command.rb#99 - def help; end - - # Command's regexp match against an input - # - # source://byebug//lib/byebug/command.rb#106 - def match(input); end - - # Name of the command, as executed by the user. - # - # source://byebug//lib/byebug/command.rb#80 - def to_s; end - end -end - -# Holds an array of subcommands for a command -# -# source://byebug//lib/byebug/command_list.rb#9 -class Byebug::CommandList - include ::Enumerable - - # @return [CommandList] a new instance of CommandList - # - # source://byebug//lib/byebug/command_list.rb#12 - def initialize(commands); end - - # source://byebug//lib/byebug/command_list.rb#20 - def each; end - - # source://byebug//lib/byebug/command_list.rb#16 - def match(input); end - - # source://byebug//lib/byebug/command_list.rb#24 - def to_s; end - - private - - # source://byebug//lib/byebug/command_list.rb#30 - def width; end -end - -# Custom exception exception to signal "command not found" errors -# -# source://byebug//lib/byebug/errors.rb#7 -class Byebug::CommandNotFound < ::NoMethodError - # @return [CommandNotFound] a new instance of CommandNotFound - # - # source://byebug//lib/byebug/errors.rb#8 - def initialize(input, parent = T.unsafe(nil)); end - - private - - # source://byebug//lib/byebug/errors.rb#25 - def build_cmd(*args); end - - # source://byebug//lib/byebug/errors.rb#21 - def help; end - - # source://byebug//lib/byebug/errors.rb#17 - def name; end -end - -# Processes commands in regular mode. -# -# You can override this class to create your own command processor that, for -# example, whitelists only certain commands to be executed. -# -# @see PostMortemProcessor for a example -# -# source://byebug//lib/byebug/processors/command_processor.rb#17 -class Byebug::CommandProcessor - include ::Byebug::Helpers::EvalHelper - extend ::Forwardable - - # @return [CommandProcessor] a new instance of CommandProcessor - # - # source://byebug//lib/byebug/processors/command_processor.rb#23 - def initialize(context, interface = T.unsafe(nil)); end - - # source://byebug//lib/byebug/processors/command_processor.rb#64 - def at_breakpoint(brkpt); end - - # source://byebug//lib/byebug/processors/command_processor.rb#70 - def at_catchpoint(exception); end - - # source://byebug//lib/byebug/processors/command_processor.rb#80 - def at_end; end - - # source://byebug//lib/byebug/processors/command_processor.rb#54 - def at_line; end - - # source://byebug//lib/byebug/processors/command_processor.rb#74 - def at_return(return_value); end - - # source://byebug//lib/byebug/processors/command_processor.rb#58 - def at_tracing; end - - # Available commands - # - # source://byebug//lib/byebug/processors/command_processor.rb#50 - def command_list; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def confirm(*args, **_arg1, &block); end - - # Returns the value of attribute context. - # - # source://byebug//lib/byebug/processors/command_processor.rb#21 - def context; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def errmsg(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def frame(*args, **_arg1, &block); end - - # Returns the value of attribute interface. - # - # source://byebug//lib/byebug/processors/command_processor.rb#21 - def interface; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pr(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prc(*args, **_arg1, &block); end - - # Returns the value of attribute prev_line. - # - # source://byebug//lib/byebug/processors/command_processor.rb#20 - def prev_line; end - - # Sets the attribute prev_line - # - # @param value the value to set the attribute prev_line to. - # - # source://byebug//lib/byebug/processors/command_processor.rb#20 - def prev_line=(_arg0); end - - # source://byebug//lib/byebug/processors/command_processor.rb#31 - def printer; end - - # Let the execution continue - # - # source://byebug//lib/byebug/processors/command_processor.rb#87 - def proceed!; end - - # Handle byebug commands. - # - # source://byebug//lib/byebug/processors/command_processor.rb#94 - def process_commands; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prv(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def puts(*args, **_arg1, &block); end - - protected - - # source://byebug//lib/byebug/processors/command_processor.rb#119 - def after_repl; end - - # source://byebug//lib/byebug/processors/command_processor.rb#111 - def before_repl; end - - # Prompt shown before reading a command. - # - # source://byebug//lib/byebug/processors/command_processor.rb#107 - def prompt; end - - # Main byebug's REPL - # - # source://byebug//lib/byebug/processors/command_processor.rb#126 - def repl; end - - private - - # source://byebug//lib/byebug/processors/command_processor.rb#139 - def auto_cmds_for(run_level); end - - # Run permanent commands. - # - # source://byebug//lib/byebug/processors/command_processor.rb#146 - def run_auto_cmds(run_level); end - - # Executes the received input - # - # Instantiates a command matching the input and runs it. If a matching - # command is not found, it evaluates the unknown input. - # - # source://byebug//lib/byebug/processors/command_processor.rb#158 - def run_cmd(input); end - - # source://byebug//lib/byebug/processors/command_processor.rb#167 - def safely; end -end - -# Implements conditions on breakpoints. -# -# Adds the ability to stop on breakpoints only under certain conditions. -# -# source://byebug//lib/byebug/commands/condition.rb#12 -class Byebug::ConditionCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/condition.rb#38 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/condition.rb#21 - def description; end - - # source://byebug//lib/byebug/commands/condition.rb#17 - def regexp; end - - # source://byebug//lib/byebug/commands/condition.rb#34 - def short_description; end - end -end - -# Mantains context information for the debugger and it's the main -# communication point between the library and the C-extension through the -# at_breakpoint, at_catchpoint, at_tracing, at_line and at_return callbacks -# -# source://byebug//lib/byebug/context.rb#14 -class Byebug::Context - include ::Byebug::Helpers::FileHelper - extend ::Byebug::Helpers::PathHelper - extend ::Forwardable - - # Breakpoint handler - # - # source://byebug//lib/byebug/context.rb#113 - def at_breakpoint(breakpoint); end - - # Catchpoint handler - # - # source://byebug//lib/byebug/context.rb#120 - def at_catchpoint(exception); end - - # End of class definition handler - # - # source://byebug//lib/byebug/context.rb#136 - def at_end; end - - # Line handler - # - # source://byebug//lib/byebug/context.rb#94 - def at_line; end - - # Return handler - # - # source://byebug//lib/byebug/context.rb#127 - def at_return(return_value); end - - # Tracing handler - # - # source://byebug//lib/byebug/context.rb#104 - def at_tracing; end - - def backtrace; end - def dead?; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def file(*args, **_arg1, &block); end - - # Reader for the current frame - # - # source://byebug//lib/byebug/context.rb#46 - def frame; end - - # Writer for the current frame - # - # source://byebug//lib/byebug/context.rb#53 - def frame=(pos); end - - def frame_binding(*_arg0); end - def frame_class(*_arg0); end - def frame_file(*_arg0); end - def frame_line(*_arg0); end - def frame_method(*_arg0); end - def frame_self(*_arg0); end - - # Current file, line and source code information - # - # source://byebug//lib/byebug/context.rb#70 - def full_location; end - - def ignored?; end - - # source://byebug//lib/byebug/context.rb#87 - def interrupt; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def line(*args, **_arg1, &block); end - - # Current file & line information - # - # source://byebug//lib/byebug/context.rb#63 - def location; end - - def resume; end - - # Context's stack size - # - # source://byebug//lib/byebug/context.rb#79 - def stack_size; end - - def step_into(*_arg0); end - def step_out(*_arg0); end - def step_over(*_arg0); end - def stop_reason; end - def suspend; end - def suspended?; end - def switch; end - def thnum; end - def thread; end - def tracing; end - def tracing=(_arg0); end - - private - - # Tells whether a file is ignored by the debugger. - # - # @param path [String] filename to be checked. - # @return [Boolean] - # - # source://byebug//lib/byebug/context.rb#153 - def ignored_file?(path); end - - # source://byebug//lib/byebug/context.rb#144 - def processor; end - - class << self - # List of files byebug will ignore while debugging - # - # source://byebug//lib/byebug/context.rb#25 - def ignored_files; end - - # Sets the attribute ignored_files - # - # @param value the value to set the attribute ignored_files to. - # - # source://byebug//lib/byebug/context.rb#20 - def ignored_files=(_arg0); end - - # source://byebug//lib/byebug/context.rb#32 - def interface; end - - # Sets the attribute interface - # - # @param value the value to set the attribute interface to. - # - # source://byebug//lib/byebug/context.rb#30 - def interface=(_arg0); end - - # source://byebug//lib/byebug/context.rb#38 - def processor; end - - # Sets the attribute processor - # - # @param value the value to set the attribute processor to. - # - # source://byebug//lib/byebug/context.rb#36 - def processor=(_arg0); end - end -end - -# Implements the continue command. -# -# Allows the user to continue execution until the next stopping point, a -# specific line number or until program termination. -# -# source://byebug//lib/byebug/commands/continue.rb#13 -class Byebug::ContinueCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/continue.rb#37 - def execute; end - - private - - # source://byebug//lib/byebug/commands/continue.rb#64 - def modifier; end - - # @return [Boolean] - # - # source://byebug//lib/byebug/commands/continue.rb#60 - def unconditionally?; end - - # @return [Boolean] - # - # source://byebug//lib/byebug/commands/continue.rb#56 - def until_line?; end - - class << self - # source://byebug//lib/byebug/commands/continue.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/continue.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/continue.rb#33 - def short_description; end - end -end - -# Processes commands when there's not program running -# -# source://byebug//lib/byebug/processors/control_processor.rb#9 -class Byebug::ControlProcessor < ::Byebug::CommandProcessor - # Available commands - # - # source://byebug//lib/byebug/processors/control_processor.rb#13 - def commands; end - - # Prompt shown before reading a command. - # - # source://byebug//lib/byebug/processors/control_processor.rb#20 - def prompt; end -end - -# Spawns a subdebugger and evaluates the given expression -# -# source://byebug//lib/byebug/commands/debug.rb#10 -class Byebug::DebugCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - - # source://byebug//lib/byebug/commands/debug.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/debug.rb#17 - def description; end - - # source://byebug//lib/byebug/commands/debug.rb#13 - def regexp; end - - # source://byebug//lib/byebug/commands/debug.rb#28 - def short_description; end - end -end - -class Byebug::DebugThread < ::Thread - class << self - def inherited; end - end -end - -# Implements breakpoint deletion. -# -# source://byebug//lib/byebug/commands/delete.rb#10 -class Byebug::DeleteCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/delete.rb#35 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/delete.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/delete.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/delete.rb#31 - def short_description; end - end -end - -# Disabling custom display expressions or breakpoints. -# -# source://byebug//lib/byebug/commands/disable/breakpoints.rb#9 -class Byebug::DisableCommand < ::Byebug::Command - include ::Byebug::Subcommands - extend ::Byebug::Helpers::ReflectionHelper - extend ::Byebug::Subcommands::ClassMethods - - class << self - # source://byebug//lib/byebug/commands/disable.rb#21 - def description; end - - # source://byebug//lib/byebug/commands/disable.rb#17 - def regexp; end - - # source://byebug//lib/byebug/commands/disable.rb#29 - def short_description; end - end -end - -# Disables all or specific breakpoints -# -# source://byebug//lib/byebug/commands/disable/breakpoints.rb#13 -class Byebug::DisableCommand::BreakpointsCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - include ::Byebug::Helpers::ToggleHelper - - # source://byebug//lib/byebug/commands/disable/breakpoints.rb#37 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/disable/breakpoints.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/disable/breakpoints.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/disable/breakpoints.rb#33 - def short_description; end - end -end - -# Enables all or specific displays -# -# source://byebug//lib/byebug/commands/disable/display.rb#13 -class Byebug::DisableCommand::DisplayCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - include ::Byebug::Helpers::ToggleHelper - - # source://byebug//lib/byebug/commands/disable/display.rb#38 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/disable/display.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/disable/display.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/disable/display.rb#34 - def short_description; end - end -end - -# Custom expressions to be displayed every time the debugger stops. -# -# source://byebug//lib/byebug/commands/display.rb#10 -class Byebug::DisplayCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - - # source://byebug//lib/byebug/commands/display.rb#35 - def execute; end - - private - - # source://byebug//lib/byebug/commands/display.rb#44 - def display_expression(exp); end - - # source://byebug//lib/byebug/commands/display.rb#60 - def eval_expr(expression); end - - # source://byebug//lib/byebug/commands/display.rb#50 - def print_display_expressions; end - - class << self - # source://byebug//lib/byebug/commands/display.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/display.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/display.rb#31 - def short_description; end - end -end - -# Move the current frame down in the backtrace. -# -# source://byebug//lib/byebug/commands/down.rb#12 -class Byebug::DownCommand < ::Byebug::Command - include ::Byebug::Helpers::FrameHelper - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/down.rb#36 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/down.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/down.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/down.rb#32 - def short_description; end - end -end - -# Edit a file from byebug's prompt. -# -# source://byebug//lib/byebug/commands/edit.rb#9 -class Byebug::EditCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/edit.rb#33 - def execute; end - - private - - # source://byebug//lib/byebug/commands/edit.rb#65 - def edit_error(type, file); end - - # source://byebug//lib/byebug/commands/edit.rb#61 - def editor; end - - # source://byebug//lib/byebug/commands/edit.rb#45 - def location(matched); end - - class << self - # source://byebug//lib/byebug/commands/edit.rb#17 - def description; end - - # source://byebug//lib/byebug/commands/edit.rb#13 - def regexp; end - - # source://byebug//lib/byebug/commands/edit.rb#29 - def short_description; end - end -end - -# Enabling custom display expressions or breakpoints. -# -# source://byebug//lib/byebug/commands/enable/breakpoints.rb#9 -class Byebug::EnableCommand < ::Byebug::Command - include ::Byebug::Subcommands - extend ::Byebug::Helpers::ReflectionHelper - extend ::Byebug::Subcommands::ClassMethods - - class << self - # source://byebug//lib/byebug/commands/enable.rb#21 - def description; end - - # source://byebug//lib/byebug/commands/enable.rb#17 - def regexp; end - - # source://byebug//lib/byebug/commands/enable.rb#29 - def short_description; end - end -end - -# Enables all or specific breakpoints -# -# source://byebug//lib/byebug/commands/enable/breakpoints.rb#13 -class Byebug::EnableCommand::BreakpointsCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - include ::Byebug::Helpers::ToggleHelper - - # source://byebug//lib/byebug/commands/enable/breakpoints.rb#37 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/enable/breakpoints.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/enable/breakpoints.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/enable/breakpoints.rb#33 - def short_description; end - end -end - -# Enables all or specific displays -# -# source://byebug//lib/byebug/commands/enable/display.rb#13 -class Byebug::EnableCommand::DisplayCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - include ::Byebug::Helpers::ToggleHelper - - # source://byebug//lib/byebug/commands/enable/display.rb#38 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/enable/display.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/enable/display.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/enable/display.rb#34 - def short_description; end - end -end - -# Implements the finish functionality. -# -# Allows the user to continue execution until certain frames are finished. -# -# source://byebug//lib/byebug/commands/finish.rb#12 -class Byebug::FinishCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/finish.rb#37 - def execute; end - - private - - # source://byebug//lib/byebug/commands/finish.rb#53 - def max_frames; end - - class << self - # source://byebug//lib/byebug/commands/finish.rb#21 - def description; end - - # source://byebug//lib/byebug/commands/finish.rb#17 - def regexp; end - - # source://byebug//lib/byebug/commands/finish.rb#33 - def short_description; end - end -end - -# Represents a frame in the stack trace -# -# source://byebug//lib/byebug/frame.rb#9 -class Byebug::Frame - include ::Byebug::Helpers::FileHelper - - # @return [Frame] a new instance of Frame - # - # source://byebug//lib/byebug/frame.rb#14 - def initialize(context, pos); end - - # source://byebug//lib/byebug/frame.rb#31 - def _binding; end - - # source://byebug//lib/byebug/frame.rb#35 - def _class; end - - # source://byebug//lib/byebug/frame.rb#39 - def _method; end - - # source://byebug//lib/byebug/frame.rb#27 - def _self; end - - # Gets current method arguments for the frame. - # - # source://byebug//lib/byebug/frame.rb#62 - def args; end - - # Checks whether the frame is a c-frame - # - # @return [Boolean] - # - # source://byebug//lib/byebug/frame.rb#141 - def c_frame?; end - - # @return [Boolean] - # - # source://byebug//lib/byebug/frame.rb#43 - def current?; end - - # Builds a string containing all available args in the frame number, in a - # verbose or non verbose way according to the value of the +callstyle+ - # setting - # - # source://byebug//lib/byebug/frame.rb#89 - def deco_args; end - - # source://byebug//lib/byebug/frame.rb#76 - def deco_block; end - - # Builds a formatted string containing information about current method call - # - # source://byebug//lib/byebug/frame.rb#106 - def deco_call; end - - # Returns the current class in the frame or an empty string if the current - # +callstyle+ setting is 'short' - # - # source://byebug//lib/byebug/frame.rb#72 - def deco_class; end - - # Formatted filename in frame - # - # source://byebug//lib/byebug/frame.rb#113 - def deco_file; end - - # source://byebug//lib/byebug/frame.rb#80 - def deco_method; end - - # Properly formatted frame number of frame - # - # source://byebug//lib/byebug/frame.rb#120 - def deco_pos; end - - # source://byebug//lib/byebug/frame.rb#19 - def file; end - - # source://byebug//lib/byebug/frame.rb#23 - def line; end - - # Gets local variables for the frame. - # - # source://byebug//lib/byebug/frame.rb#50 - def locals; end - - # Formatted mark for the frame. - # - # --> marks the current frame - # ͱ-- marks c-frames - # marks regular frames - # - # source://byebug//lib/byebug/frame.rb#131 - def mark; end - - # Returns the value of attribute pos. - # - # source://byebug//lib/byebug/frame.rb#12 - def pos; end - - # source://byebug//lib/byebug/frame.rb#145 - def to_hash; end - - private - - # source://byebug//lib/byebug/frame.rb#158 - def c_args; end - - # source://byebug//lib/byebug/frame.rb#178 - def prefix_and_default(arg_type); end - - # source://byebug//lib/byebug/frame.rb#164 - def ruby_args; end - - # @return [Boolean] - # - # source://byebug//lib/byebug/frame.rb#174 - def use_short_style?(arg); end -end - -# Move to specific frames in the backtrace. -# -# source://byebug//lib/byebug/commands/frame.rb#12 -class Byebug::FrameCommand < ::Byebug::Command - include ::Byebug::Helpers::FrameHelper - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/frame.rb#46 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/frame.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/frame.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/frame.rb#42 - def short_description; end - end -end - -# Setting to display full paths in backtraces. -# -# source://byebug//lib/byebug/settings/fullpath.rb#9 -class Byebug::FullpathSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/fullpath.rb#12 - def banner; end -end - -# source://byebug//lib/byebug/settings/fullpath.rb#10 -Byebug::FullpathSetting::DEFAULT = T.let(T.unsafe(nil), TrueClass) - -# Ask for help from byebug's prompt. -# -# source://byebug//lib/byebug/commands/help.rb#10 -class Byebug::HelpCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/help.rb#34 - def execute; end - - private - - # source://byebug//lib/byebug/commands/help.rb#54 - def command; end - - # @raise [CommandNotFound] - # - # source://byebug//lib/byebug/commands/help.rb#48 - def help_for(input, cmd); end - - # source://byebug//lib/byebug/commands/help.rb#44 - def help_for_all; end - - # source://byebug//lib/byebug/commands/help.rb#58 - def subcommand; end - - class << self - # source://byebug//lib/byebug/commands/help.rb#18 - def description; end - - # source://byebug//lib/byebug/commands/help.rb#14 - def regexp; end - - # source://byebug//lib/byebug/commands/help.rb#30 - def short_description; end - end -end - -# source://byebug//lib/byebug/helpers/reflection.rb#4 -module Byebug::Helpers; end - -# Utilities for interaction with executables -# -# source://byebug//lib/byebug/helpers/bin.rb#8 -module Byebug::Helpers::BinHelper - # source://byebug//lib/byebug/helpers/bin.rb#38 - def executable_file_extensions; end - - # source://byebug//lib/byebug/helpers/bin.rb#24 - def find_executable(path, cmd); end - - # @return [Boolean] - # - # source://byebug//lib/byebug/helpers/bin.rb#42 - def real_executable?(file); end - - # source://byebug//lib/byebug/helpers/bin.rb#34 - def search_paths; end - - # Cross-platform way of finding an executable in the $PATH. - # Adapted from: https://gist.github.com/steakknife/88b6c3837a5e90a08296 - # - # source://byebug//lib/byebug/helpers/bin.rb#13 - def which(cmd); end -end - -# Utilities to assist evaluation of code strings -# -# source://byebug//lib/byebug/helpers/eval.rb#8 -module Byebug::Helpers::EvalHelper - # Evaluates a string containing Ruby code in a specific binding, - # handling the errors at an error level. - # - # source://byebug//lib/byebug/helpers/eval.rb#46 - def error_eval(str, binding = T.unsafe(nil)); end - - # Evaluates an +expression+ that might use or defer execution to threads - # other than the current one. - # - # "frozen" so that nothing gets run. So we need to unlock threads prior - # to evaluation or we will run into a deadlock. - # - # @note This is necessary because when in byebug's prompt, every thread is - # @param expression [String] Expression to evaluate - # - # source://byebug//lib/byebug/helpers/eval.rb#30 - def multiple_thread_eval(expression); end - - # Evaluates an +expression+ in a separate thread. - # - # @param expression [String] Expression to evaluate - # - # source://byebug//lib/byebug/helpers/eval.rb#14 - def separate_thread_eval(expression); end - - # Evaluates a string containing Ruby code in a specific binding, - # returning nil in an error happens. - # - # source://byebug//lib/byebug/helpers/eval.rb#38 - def silent_eval(str, binding = T.unsafe(nil)); end - - # Evaluates a string containing Ruby code in a specific binding, - # handling the errors at a warning level. - # - # source://byebug//lib/byebug/helpers/eval.rb#54 - def warning_eval(str, binding = T.unsafe(nil)); end - - private - - # Run block temporarily ignoring all TracePoint events. - # - # Used to evaluate stuff within Byebug's prompt. Otherwise, any code - # creating new threads won't be properly evaluated because new threads - # will get blocked by byebug's main thread. - # - # source://byebug//lib/byebug/helpers/eval.rb#91 - def allowing_other_threads; end - - # source://byebug//lib/byebug/helpers/eval.rb#72 - def error_msg(exception); end - - # Runs the given block in a new thread, waits for it to finish and - # returns the new thread's result. - # - # source://byebug//lib/byebug/helpers/eval.rb#105 - def in_new_thread; end - - # source://byebug//lib/byebug/helpers/eval.rb#66 - def msg(exception); end - - # source://byebug//lib/byebug/helpers/eval.rb#60 - def safe_eval(str, binding); end - - # source://byebug//lib/byebug/helpers/eval.rb#113 - def safe_inspect(var); end - - # source://byebug//lib/byebug/helpers/eval.rb#119 - def safe_to_s(var); end - - # source://byebug//lib/byebug/helpers/eval.rb#80 - def warning_msg(exception); end -end - -# Utilities for interaction with files -# -# source://byebug//lib/byebug/helpers/file.rb#8 -module Byebug::Helpers::FileHelper - # Reads line number +lineno+ from file named +filename+ - # - # source://byebug//lib/byebug/helpers/file.rb#19 - def get_line(filename, lineno); end - - # Reads lines of source file +filename+ into an array - # - # source://byebug//lib/byebug/helpers/file.rb#12 - def get_lines(filename); end - - # Returns the number of lines in file +filename+ in a portable, - # one-line-at-a-time way. - # - # source://byebug//lib/byebug/helpers/file.rb#30 - def n_lines(filename); end - - # Regularize file name. - # - # source://byebug//lib/byebug/helpers/file.rb#37 - def normalize(filename); end - - # A short version of a long path - # - # source://byebug//lib/byebug/helpers/file.rb#48 - def shortpath(fullpath); end - - # True for special files like -e, false otherwise - # - # @return [Boolean] - # - # source://byebug//lib/byebug/helpers/file.rb#58 - def virtual_file?(name); end -end - -# Utilities to assist frame navigation -# -# source://byebug//lib/byebug/helpers/frame.rb#8 -module Byebug::Helpers::FrameHelper - # source://byebug//lib/byebug/helpers/frame.rb#16 - def jump_frames(steps); end - - # source://byebug//lib/byebug/helpers/frame.rb#9 - def switch_to_frame(frame); end - - private - - # source://byebug//lib/byebug/helpers/frame.rb#22 - def adjust_frame(new_frame); end - - # @param step [Integer] A positive or negative integer - # @return [Integer] +1 if step is positive / -1 if negative - # - # source://byebug//lib/byebug/helpers/frame.rb#60 - def direction(step); end - - # source://byebug//lib/byebug/helpers/frame.rb#51 - def frame_err(msg); end - - # Convert a possibly negative index to a positive index from the start - # of the callstack. -1 is the last position in the stack and so on. - # - # @param i [Integer] Integer to be converted in a proper positive index. - # - # source://byebug//lib/byebug/helpers/frame.rb#70 - def index_from_start(index); end - - # source://byebug//lib/byebug/helpers/frame.rb#30 - def navigate_to_frame(jump_no); end - - # @return [Boolean] - # - # source://byebug//lib/byebug/helpers/frame.rb#47 - def out_of_bounds?(pos); end -end - -# Utilities to assist command parsing -# -# source://byebug//lib/byebug/helpers/parse.rb#8 -module Byebug::Helpers::ParseHelper - # Parses +str+ of command +cmd+ as an integer between +min+ and +max+. - # - # If either +min+ or +max+ is nil, that value has no bound. - # - # purpose. - # - # @todo Remove the `cmd` parameter. It has nothing to do with the method's - # - # source://byebug//lib/byebug/helpers/parse.rb#17 - def get_int(str, cmd, min = T.unsafe(nil), max = T.unsafe(nil)); end - - # @return +str+ as an integer or 1 if +str+ is empty. - # - # source://byebug//lib/byebug/helpers/parse.rb#51 - def parse_steps(str, cmd); end - - # @return [Boolean] true if code is syntactically correct for Ruby, false otherwise - # - # source://byebug//lib/byebug/helpers/parse.rb#35 - def syntax_valid?(code); end - - private - - # Temporarily disable output to $stderr - # - # source://byebug//lib/byebug/helpers/parse.rb#65 - def without_stderr; end -end - -# Utilities for managing gem paths -# -# source://byebug//lib/byebug/helpers/path.rb#8 -module Byebug::Helpers::PathHelper - # source://byebug//lib/byebug/helpers/path.rb#29 - def all_files; end - - # source://byebug//lib/byebug/helpers/path.rb#9 - def bin_file; end - - # source://byebug//lib/byebug/helpers/path.rb#25 - def gem_files; end - - # source://byebug//lib/byebug/helpers/path.rb#17 - def lib_files; end - - # source://byebug//lib/byebug/helpers/path.rb#13 - def root_path; end - - # source://byebug//lib/byebug/helpers/path.rb#21 - def test_files; end - - private - - # source://byebug//lib/byebug/helpers/path.rb#35 - def glob_for(dir); end -end - -# Reflection utilitie -# -# source://byebug//lib/byebug/helpers/reflection.rb#8 -module Byebug::Helpers::ReflectionHelper - # List of "command" classes in the including module - # - # source://byebug//lib/byebug/helpers/reflection.rb#12 - def commands; end -end - -# Utilities for interaction with strings -# -# source://byebug//lib/byebug/helpers/string.rb#8 -module Byebug::Helpers::StringHelper - # Converts +str+ from an_underscored-or-dasherized_string to - # ACamelizedString. - # - # source://byebug//lib/byebug/helpers/string.rb#13 - def camelize(str); end - - # Removes a number of leading whitespace for each input line. - # - # source://byebug//lib/byebug/helpers/string.rb#28 - def deindent(str, leading_spaces: T.unsafe(nil)); end - - # Improves indentation and spacing in +str+ for readability in Byebug's - # command prompt. - # - # source://byebug//lib/byebug/helpers/string.rb#21 - def prettify(str); end -end - -# Utilities for thread subcommands -# -# source://byebug//lib/byebug/helpers/thread.rb#8 -module Byebug::Helpers::ThreadHelper - # source://byebug//lib/byebug/helpers/thread.rb#30 - def context_from_thread(thnum); end - - # @return [Boolean] - # - # source://byebug//lib/byebug/helpers/thread.rb#26 - def current_thread?(ctx); end - - # source://byebug//lib/byebug/helpers/thread.rb#9 - def display_context(ctx); end - - # source://byebug//lib/byebug/helpers/thread.rb#13 - def thread_arguments(ctx); end - - private - - # source://byebug//lib/byebug/helpers/thread.rb#62 - def debug_flag(ctx); end - - # @todo Check whether it is Byebug.current_context or context - # - # source://byebug//lib/byebug/helpers/thread.rb#47 - def location(ctx); end - - # source://byebug//lib/byebug/helpers/thread.rb#56 - def status_flag(ctx); end -end - -# Utilities to assist breakpoint/display enabling/disabling. -# -# source://byebug//lib/byebug/helpers/toggle.rb#10 -module Byebug::Helpers::ToggleHelper - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/helpers/toggle.rb#13 - def enable_disable_breakpoints(is_enable, args); end - - # source://byebug//lib/byebug/helpers/toggle.rb#26 - def enable_disable_display(is_enable, args); end - - private - - # source://byebug//lib/byebug/helpers/toggle.rb#57 - def n_displays; end - - # source://byebug//lib/byebug/helpers/toggle.rb#41 - def select_breakpoints(is_enable, args); end -end - -# Utilities for variable subcommands -# -# source://byebug//lib/byebug/helpers/var.rb#10 -module Byebug::Helpers::VarHelper - include ::Byebug::Helpers::EvalHelper - - # source://byebug//lib/byebug/helpers/var.rb#42 - def var_args; end - - # source://byebug//lib/byebug/helpers/var.rb#21 - def var_global; end - - # source://byebug//lib/byebug/helpers/var.rb#29 - def var_instance(str); end - - # source://byebug//lib/byebug/helpers/var.rb#13 - def var_list(ary, binding = T.unsafe(nil)); end - - # source://byebug//lib/byebug/helpers/var.rb#35 - def var_local; end -end - -# Setting to customize the file where byebug's history is saved. -# -# source://byebug//lib/byebug/settings/histfile.rb#9 -class Byebug::HistfileSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/histfile.rb#12 - def banner; end - - # source://byebug//lib/byebug/settings/histfile.rb#16 - def to_s; end -end - -# source://byebug//lib/byebug/settings/histfile.rb#10 -Byebug::HistfileSetting::DEFAULT = T.let(T.unsafe(nil), String) - -# Handles byebug's history of commands. -# -# source://byebug//lib/byebug/history.rb#19 -class Byebug::History - # @return [History] a new instance of History - # - # source://byebug//lib/byebug/history.rb#22 - def initialize; end - - # Array holding the list of commands in history - # - # source://byebug//lib/byebug/history.rb#29 - def buffer; end - - # Discards history. - # - # source://byebug//lib/byebug/history.rb#58 - def clear; end - - # Max number of commands to be displayed when no size has been specified. - # - # Never more than Setting[:histsize]. - # - # source://byebug//lib/byebug/history.rb#105 - def default_max_size; end - - # Whether a specific command should not be stored in history. - # - # For now, empty lines and consecutive duplicates. - # - # @return [Boolean] - # - # source://byebug//lib/byebug/history.rb#123 - def ignore?(buf); end - - # Array of ids of the last +number+ commands. - # - # source://byebug//lib/byebug/history.rb#96 - def last_ids(number); end - - # Removes a command from Readline's history. - # - # source://byebug//lib/byebug/history.rb#75 - def pop; end - - # Adds a new command to Readline's history. - # - # source://byebug//lib/byebug/history.rb#65 - def push(cmd); end - - # Restores history from disk. - # - # source://byebug//lib/byebug/history.rb#36 - def restore; end - - # Saves history to disk. - # - # source://byebug//lib/byebug/history.rb#45 - def save; end - - # Returns the value of attribute size. - # - # source://byebug//lib/byebug/history.rb#20 - def size; end - - # Sets the attribute size - # - # @param value the value to set the attribute size to. - # - # source://byebug//lib/byebug/history.rb#20 - def size=(_arg0); end - - # Max number of commands to be displayed when a size has been specified. - # - # The only bound here is not showing more items than available. - # - # source://byebug//lib/byebug/history.rb#114 - def specific_max_size(number); end - - # Prints the requested numbers of history entries. - # - # source://byebug//lib/byebug/history.rb#83 - def to_s(n_cmds); end -end - -# Show history of byebug commands. -# -# source://byebug//lib/byebug/commands/history.rb#10 -class Byebug::HistoryCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/history.rb#31 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/history.rb#19 - def description; end - - # source://byebug//lib/byebug/commands/history.rb#15 - def regexp; end - - # source://byebug//lib/byebug/commands/history.rb#27 - def short_description; end - end -end - -# Setting to customize the number of byebug commands to be saved in history. -# -# source://byebug//lib/byebug/settings/histsize.rb#9 -class Byebug::HistsizeSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/histsize.rb#12 - def banner; end - - # source://byebug//lib/byebug/settings/histsize.rb#16 - def to_s; end -end - -# source://byebug//lib/byebug/settings/histsize.rb#10 -Byebug::HistsizeSetting::DEFAULT = T.let(T.unsafe(nil), Integer) - -# Shows info about different aspects of the debugger. -# -# source://byebug//lib/byebug/commands/info/breakpoints.rb#7 -class Byebug::InfoCommand < ::Byebug::Command - include ::Byebug::Subcommands - extend ::Byebug::Helpers::ReflectionHelper - extend ::Byebug::Subcommands::ClassMethods - - class << self - # source://byebug//lib/byebug/commands/info.rb#25 - def description; end - - # source://byebug//lib/byebug/commands/info.rb#21 - def regexp; end - - # source://byebug//lib/byebug/commands/info.rb#33 - def short_description; end - end -end - -# Information about current breakpoints -# -# source://byebug//lib/byebug/commands/info/breakpoints.rb#11 -class Byebug::InfoCommand::BreakpointsCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/info/breakpoints.rb#30 - def execute; end - - private - - # source://byebug//lib/byebug/commands/info/breakpoints.rb#47 - def info_breakpoint(brkpt); end - - class << self - # source://byebug//lib/byebug/commands/info/breakpoints.rb#18 - def description; end - - # source://byebug//lib/byebug/commands/info/breakpoints.rb#14 - def regexp; end - - # source://byebug//lib/byebug/commands/info/breakpoints.rb#26 - def short_description; end - end -end - -# Information about display expressions -# -# source://byebug//lib/byebug/commands/info/display.rb#11 -class Byebug::InfoCommand::DisplayCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/info/display.rb#30 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/info/display.rb#18 - def description; end - - # source://byebug//lib/byebug/commands/info/display.rb#14 - def regexp; end - - # source://byebug//lib/byebug/commands/info/display.rb#26 - def short_description; end - end -end - -# Information about a particular source file -# -# source://byebug//lib/byebug/commands/info/file.rb#13 -class Byebug::InfoCommand::FileCommand < ::Byebug::Command - include ::Byebug::Helpers::FileHelper - include ::Byebug::Helpers::StringHelper - - # source://byebug//lib/byebug/commands/info/file.rb#38 - def execute; end - - private - - # source://byebug//lib/byebug/commands/info/file.rb#55 - def info_file_basic(file); end - - # source://byebug//lib/byebug/commands/info/file.rb#63 - def info_file_breakpoints(file); end - - # source://byebug//lib/byebug/commands/info/file.rb#70 - def info_file_mtime(file); end - - # source://byebug//lib/byebug/commands/info/file.rb#74 - def info_file_sha1(file); end - - class << self - # source://byebug//lib/byebug/commands/info/file.rb#23 - def description; end - - # source://byebug//lib/byebug/commands/info/file.rb#19 - def regexp; end - - # source://byebug//lib/byebug/commands/info/file.rb#34 - def short_description; end - end -end - -# Information about current location -# -# source://byebug//lib/byebug/commands/info/line.rb#11 -class Byebug::InfoCommand::LineCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/info/line.rb#30 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/info/line.rb#18 - def description; end - - # source://byebug//lib/byebug/commands/info/line.rb#14 - def regexp; end - - # source://byebug//lib/byebug/commands/info/line.rb#26 - def short_description; end - end -end - -# Information about arguments of the current method/block -# -# source://byebug//lib/byebug/commands/info/program.rb#11 -class Byebug::InfoCommand::ProgramCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/info/program.rb#30 - def execute; end - - private - - # source://byebug//lib/byebug/commands/info/program.rb#37 - def format_stop_reason(stop_reason); end - - class << self - # source://byebug//lib/byebug/commands/info/program.rb#18 - def description; end - - # source://byebug//lib/byebug/commands/info/program.rb#14 - def regexp; end - - # source://byebug//lib/byebug/commands/info/program.rb#26 - def short_description; end - end -end - -# Main Interface class -# -# Contains common functionality to all implemented interfaces. -# -# source://byebug//lib/byebug/interface.rb#16 -class Byebug::Interface - include ::Byebug::Helpers::FileHelper - - # @return [Interface] a new instance of Interface - # - # source://byebug//lib/byebug/interface.rb#22 - def initialize; end - - # Restores history according to +autosave+ setting. - # - # source://byebug//lib/byebug/interface.rb#118 - def autorestore; end - - # Saves or clears history according to +autosave+ setting. - # - # source://byebug//lib/byebug/interface.rb#111 - def autosave; end - - # source://byebug//lib/byebug/interface.rb#105 - def close; end - - # Returns the value of attribute command_queue. - # - # source://byebug//lib/byebug/interface.rb#19 - def command_queue; end - - # Sets the attribute command_queue - # - # @param value the value to set the attribute command_queue to. - # - # source://byebug//lib/byebug/interface.rb#19 - def command_queue=(_arg0); end - - # Confirms user introduced an affirmative response to the input stream. - # - # source://byebug//lib/byebug/interface.rb#101 - def confirm(prompt); end - - # Prints an error message to the error stream. - # - # source://byebug//lib/byebug/interface.rb#80 - def errmsg(message); end - - # Returns the value of attribute error. - # - # source://byebug//lib/byebug/interface.rb#20 - def error; end - - # Returns the value of attribute history. - # - # source://byebug//lib/byebug/interface.rb#19 - def history; end - - # Sets the attribute history - # - # @param value the value to set the attribute history to. - # - # source://byebug//lib/byebug/interface.rb#19 - def history=(_arg0); end - - # Returns the value of attribute input. - # - # source://byebug//lib/byebug/interface.rb#20 - def input; end - - # source://byebug//lib/byebug/interface.rb#28 - def last_if_empty(input); end - - # Returns the value of attribute output. - # - # source://byebug//lib/byebug/interface.rb#20 - def output; end - - # Reads a new line from the interface's input stream. - # - # read now was empty. - # - # @return [String] New string read or the previous string if the string - # - # source://byebug//lib/byebug/interface.rb#70 - def prepare_input(prompt); end - - # Prints an output message to the output stream without a final "\n". - # - # source://byebug//lib/byebug/interface.rb#94 - def print(message); end - - # Prints an output message to the output stream. - # - # source://byebug//lib/byebug/interface.rb#87 - def puts(message); end - - # Pops a command from the input stream. - # - # source://byebug//lib/byebug/interface.rb#35 - def read_command(prompt); end - - # Pushes lines in +filename+ to the command queue. - # - # source://byebug//lib/byebug/interface.rb#44 - def read_file(filename); end - - # Reads a new line from the interface's input stream, parses it into - # commands and saves it to history. - # - # @return [String] Representing something to be run by the debugger. - # - # source://byebug//lib/byebug/interface.rb#54 - def read_input(prompt, save_hist = T.unsafe(nil)); end - - private - - # Splits a command line of the form "cmd1 ; cmd2 ; ... ; cmdN" into an - # array of commands: [cmd1, cmd2, ..., cmdN] - # - # source://byebug//lib/byebug/interface.rb#128 - def split_commands(cmd_line); end -end - -# Interrupting execution of current thread. -# -# source://byebug//lib/byebug/commands/interrupt.rb#9 -class Byebug::InterruptCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/interrupt.rb#28 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/interrupt.rb#16 - def description; end - - # source://byebug//lib/byebug/commands/interrupt.rb#12 - def regexp; end - - # source://byebug//lib/byebug/commands/interrupt.rb#24 - def short_description; end - end -end - -# Enter IRB from byebug's prompt -# -# source://byebug//lib/byebug/commands/irb.rb#11 -class Byebug::IrbCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/irb.rb#30 - def execute; end - - private - - # source://byebug//lib/byebug/commands/irb.rb#40 - def with_clean_argv; end - - class << self - # source://byebug//lib/byebug/commands/irb.rb#18 - def description; end - - # source://byebug//lib/byebug/commands/irb.rb#14 - def regexp; end - - # source://byebug//lib/byebug/commands/irb.rb#26 - def short_description; end - end -end - -# Send custom signals to the debugged program. -# -# source://byebug//lib/byebug/commands/kill.rb#9 -class Byebug::KillCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/kill.rb#30 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/kill.rb#16 - def description; end - - # source://byebug//lib/byebug/commands/kill.rb#12 - def regexp; end - - # source://byebug//lib/byebug/commands/kill.rb#26 - def short_description; end - end -end - -# Setting to enable/disable linetracing. -# -# source://byebug//lib/byebug/settings/linetrace.rb#9 -class Byebug::LinetraceSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/linetrace.rb#10 - def banner; end - - # source://byebug//lib/byebug/settings/linetrace.rb#18 - def value; end - - # source://byebug//lib/byebug/settings/linetrace.rb#14 - def value=(val); end -end - -# List parts of the source code. -# -# source://byebug//lib/byebug/commands/list.rb#12 -class Byebug::ListCommand < ::Byebug::Command - include ::Byebug::Helpers::FileHelper - include ::Byebug::Helpers::ParseHelper - - # source://forwardable/1.3.3/forwardable.rb#231 - def amend_final(*args, **_arg1, &block); end - - # source://byebug//lib/byebug/commands/list.rb#40 - def execute; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def max_line(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def size(*args, **_arg1, &block); end - - private - - # Set line range to be printed by list - # - # @return first line number to list - # @return last line number to list - # - # source://byebug//lib/byebug/commands/list.rb#79 - def auto_range(direction); end - - # Show a range of lines in the current file. - # - # @param min [Integer] Lower bound - # @param max [Integer] Upper bound - # - # source://byebug//lib/byebug/commands/list.rb#115 - def display_lines(min, max); end - - # @param range [String] A string with an integer range format - # @return [String] The lower bound of the given range - # - # source://byebug//lib/byebug/commands/list.rb#126 - def lower_bound(range); end - - # source://byebug//lib/byebug/commands/list.rb#105 - def move(line, size, direction = T.unsafe(nil)); end - - # source://byebug//lib/byebug/commands/list.rb#89 - def parse_range(input); end - - # Line range to be printed by `list`. - # - # If is set, range is parsed from it. - # - # Otherwise it's automatically chosen. - # - # source://byebug//lib/byebug/commands/list.rb#60 - def range(input); end - - # source://byebug//lib/byebug/commands/list.rb#152 - def source_file_formatter; end - - # @param str [String] A string with an integer range format - # @return [Array] The upper & lower bounds of the given range - # - # source://byebug//lib/byebug/commands/list.rb#144 - def split_range(str); end - - # @param range [String] A string with an integer range format - # @return [String] The upper bound of the given range - # - # source://byebug//lib/byebug/commands/list.rb#135 - def upper_bound(range); end - - # @return [Boolean] - # - # source://byebug//lib/byebug/commands/list.rb#69 - def valid_range?(first, last); end - - class << self - # source://byebug//lib/byebug/commands/list.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/list.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/list.rb#36 - def short_description; end - end -end - -# Setting to customize the number of source code lines to be displayed every -# time the "list" command is invoked. -# -# source://byebug//lib/byebug/settings/listsize.rb#10 -class Byebug::ListsizeSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/listsize.rb#13 - def banner; end - - # source://byebug//lib/byebug/settings/listsize.rb#17 - def to_s; end -end - -# source://byebug//lib/byebug/settings/listsize.rb#11 -Byebug::ListsizeSetting::DEFAULT = T.let(T.unsafe(nil), Integer) - -# Interface class for standard byebug use. -# -# source://byebug//lib/byebug/interfaces/local_interface.rb#7 -class Byebug::LocalInterface < ::Byebug::Interface - # @return [LocalInterface] a new instance of LocalInterface - # - # source://byebug//lib/byebug/interfaces/local_interface.rb#10 - def initialize; end - - # Reads a single line of input using Readline. If Ctrl-D is pressed, it - # returns "continue", meaning that program's execution will go on. - # - # @param prompt Prompt to be displayed. - # - # source://byebug//lib/byebug/interfaces/local_interface.rb#23 - def readline(prompt); end - - # Yields the block handling Ctrl-C the following way: if pressed while - # waiting for input, the line is reset to only the prompt and we ask for - # input again. - # - # @note Any external 'INT' traps are overriden during this method. - # - # source://byebug//lib/byebug/interfaces/local_interface.rb#34 - def with_repl_like_sigint; end - - # Disable any Readline completion procs. - # - # Other gems, for example, IRB could've installed completion procs that are - # dependent on them being loaded. Disable those while byebug is the REPL - # making use of Readline. - # - # source://byebug//lib/byebug/interfaces/local_interface.rb#51 - def without_readline_completion; end -end - -# source://byebug//lib/byebug/interfaces/local_interface.rb#8 -Byebug::LocalInterface::EOF_ALIAS = T.let(T.unsafe(nil), String) - -# Show methods of specific classes/modules/objects. -# -# source://byebug//lib/byebug/commands/method.rb#10 -class Byebug::MethodCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - - # source://byebug//lib/byebug/commands/method.rb#37 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/method.rb#19 - def description; end - - # source://byebug//lib/byebug/commands/method.rb#15 - def regexp; end - - # source://byebug//lib/byebug/commands/method.rb#33 - def short_description; end - end -end - -# Implements the next functionality. -# -# Allows the user the continue execution until the next instruction in the -# current frame. -# -# source://byebug//lib/byebug/commands/next.rb#13 -class Byebug::NextCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/next.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/next.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/next.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/next.rb#28 - def short_description; end - end -end - -# Port number used for remote debugging -# -# source://byebug//lib/byebug/remote.rb#13 -Byebug::PORT = T.let(T.unsafe(nil), Integer) - -# Processes commands in post_mortem mode -# -# source://byebug//lib/byebug/processors/post_mortem_processor.rb#9 -class Byebug::PostMortemProcessor < ::Byebug::CommandProcessor - # source://byebug//lib/byebug/processors/post_mortem_processor.rb#10 - def commands; end - - # source://byebug//lib/byebug/processors/post_mortem_processor.rb#14 - def prompt; end -end - -# Setting to enable/disable post_mortem mode, i.e., a debugger prompt after -# program termination by unhandled exception. -# -# source://byebug//lib/byebug/settings/post_mortem.rb#10 -class Byebug::PostMortemSetting < ::Byebug::Setting - # @return [PostMortemSetting] a new instance of PostMortemSetting - # - # source://byebug//lib/byebug/settings/post_mortem.rb#11 - def initialize; end - - # source://byebug//lib/byebug/settings/post_mortem.rb#15 - def banner; end - - # source://byebug//lib/byebug/settings/post_mortem.rb#23 - def value; end - - # source://byebug//lib/byebug/settings/post_mortem.rb#19 - def value=(val); end -end - -# source://byebug//lib/byebug/printers/base.rb#6 -module Byebug::Printers; end - -# Base printer -# -# source://byebug//lib/byebug/printers/base.rb#10 -class Byebug::Printers::Base - # source://byebug//lib/byebug/printers/base.rb#16 - def type; end - - private - - # source://byebug//lib/byebug/printers/base.rb#55 - def array_of_args(collection, &_block); end - - # source://byebug//lib/byebug/printers/base.rb#49 - def contents; end - - # source://byebug//lib/byebug/printers/base.rb#63 - def contents_files; end - - # @raise [MissedPath] - # - # source://byebug//lib/byebug/printers/base.rb#22 - def locate(path); end - - # source://byebug//lib/byebug/printers/base.rb#45 - def parts(path); end - - # source://byebug//lib/byebug/printers/base.rb#35 - def translate(string, args = T.unsafe(nil)); end -end - -# source://byebug//lib/byebug/printers/base.rb#12 -class Byebug::Printers::Base::MissedArgument < ::StandardError; end - -# source://byebug//lib/byebug/printers/base.rb#11 -class Byebug::Printers::Base::MissedPath < ::StandardError; end - -# source://byebug//lib/byebug/printers/base.rb#14 -Byebug::Printers::Base::SEPARATOR = T.let(T.unsafe(nil), String) - -# Plain text printer -# -# source://byebug//lib/byebug/printers/plain.rb#10 -class Byebug::Printers::Plain < ::Byebug::Printers::Base - # source://byebug//lib/byebug/printers/plain.rb#11 - def print(path, args = T.unsafe(nil)); end - - # source://byebug//lib/byebug/printers/plain.rb#17 - def print_collection(path, collection, &block); end - - # source://byebug//lib/byebug/printers/plain.rb#25 - def print_variables(variables, *_unused); end - - private - - # source://byebug//lib/byebug/printers/plain.rb#39 - def contents_files; end -end - -# Enter Pry from byebug's prompt -# -# source://byebug//lib/byebug/commands/pry.rb#10 -class Byebug::PryCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/pry.rb#29 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/pry.rb#17 - def description; end - - # source://byebug//lib/byebug/commands/pry.rb#13 - def regexp; end - - # source://byebug//lib/byebug/commands/pry.rb#25 - def short_description; end - end -end - -# Exit from byebug. -# -# source://byebug//lib/byebug/commands/quit.rb#9 -class Byebug::QuitCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/quit.rb#33 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/quit.rb#17 - def description; end - - # source://byebug//lib/byebug/commands/quit.rb#13 - def regexp; end - - # source://byebug//lib/byebug/commands/quit.rb#29 - def short_description; end - end -end - -# source://byebug//lib/byebug/remote/server.rb#6 -module Byebug::Remote; end - -# Client for remote debugging -# -# source://byebug//lib/byebug/remote/client.rb#10 -class Byebug::Remote::Client - # @return [Client] a new instance of Client - # - # source://byebug//lib/byebug/remote/client.rb#13 - def initialize(interface); end - - # Returns the value of attribute interface. - # - # source://byebug//lib/byebug/remote/client.rb#11 - def interface; end - - # Returns the value of attribute socket. - # - # source://byebug//lib/byebug/remote/client.rb#11 - def socket; end - - # Connects to the remote byebug - # - # source://byebug//lib/byebug/remote/client.rb#21 - def start(host = T.unsafe(nil), port = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://byebug//lib/byebug/remote/client.rb#44 - def started?; end - - private - - # source://byebug//lib/byebug/remote/client.rb#50 - def connect_at(host, port); end -end - -# Server for remote debugging -# -# source://byebug//lib/byebug/remote/server.rb#10 -class Byebug::Remote::Server - # @return [Server] a new instance of Server - # - # source://byebug//lib/byebug/remote/server.rb#13 - def initialize(wait_connection:, &block); end - - # Returns the value of attribute actual_port. - # - # source://byebug//lib/byebug/remote/server.rb#11 - def actual_port; end - - # Start the remote debugging server - # - # source://byebug//lib/byebug/remote/server.rb#22 - def start(host, port); end - - # Returns the value of attribute wait_connection. - # - # source://byebug//lib/byebug/remote/server.rb#11 - def wait_connection; end -end - -# Interface class for remote use of byebug. -# -# source://byebug//lib/byebug/interfaces/remote_interface.rb#9 -class Byebug::RemoteInterface < ::Byebug::Interface - # @return [RemoteInterface] a new instance of RemoteInterface - # - # source://byebug//lib/byebug/interfaces/remote_interface.rb#10 - def initialize(socket); end - - # source://byebug//lib/byebug/interfaces/remote_interface.rb#41 - def close; end - - # source://byebug//lib/byebug/interfaces/remote_interface.rb#23 - def confirm(prompt); end - - # source://byebug//lib/byebug/interfaces/remote_interface.rb#29 - def print(message); end - - # source://byebug//lib/byebug/interfaces/remote_interface.rb#35 - def puts(message); end - - # source://byebug//lib/byebug/interfaces/remote_interface.rb#17 - def read_command(prompt); end - - # source://byebug//lib/byebug/interfaces/remote_interface.rb#45 - def readline(prompt); end -end - -# Restart debugged program from within byebug. -# -# source://byebug//lib/byebug/commands/restart.rb#14 -class Byebug::RestartCommand < ::Byebug::Command - include ::Byebug::Helpers::BinHelper - include ::Byebug::Helpers::PathHelper - - # source://byebug//lib/byebug/commands/restart.rb#40 - def execute; end - - private - - # source://byebug//lib/byebug/commands/restart.rb#54 - def prepend_byebug_bin(cmd); end - - # source://byebug//lib/byebug/commands/restart.rb#59 - def prepend_ruby_bin(cmd); end - - class << self - # source://byebug//lib/byebug/commands/restart.rb#25 - def description; end - - # source://byebug//lib/byebug/commands/restart.rb#21 - def regexp; end - - # source://byebug//lib/byebug/commands/restart.rb#36 - def short_description; end - end -end - -# Save current settings to use them in another debug session. -# -# source://byebug//lib/byebug/commands/save.rb#9 -class Byebug::SaveCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/save.rb#36 - def execute; end - - private - - # source://byebug//lib/byebug/commands/save.rb#50 - def save_breakpoints(file); end - - # source://byebug//lib/byebug/commands/save.rb#56 - def save_catchpoints(file); end - - # source://byebug//lib/byebug/commands/save.rb#62 - def save_displays(file); end - - # source://byebug//lib/byebug/commands/save.rb#66 - def save_settings(file); end - - class << self - # source://byebug//lib/byebug/commands/save.rb#17 - def description; end - - # source://byebug//lib/byebug/commands/save.rb#13 - def regexp; end - - # source://byebug//lib/byebug/commands/save.rb#32 - def short_description; end - end -end - -# Setting to customize the file where byebug's history is saved. -# -# source://byebug//lib/byebug/settings/savefile.rb#9 -class Byebug::SavefileSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/savefile.rb#12 - def banner; end - - # source://byebug//lib/byebug/settings/savefile.rb#16 - def to_s; end -end - -# source://byebug//lib/byebug/settings/savefile.rb#10 -Byebug::SavefileSetting::DEFAULT = T.let(T.unsafe(nil), String) - -# Interface class for command execution from script files. -# -# source://byebug//lib/byebug/interfaces/script_interface.rb#7 -class Byebug::ScriptInterface < ::Byebug::Interface - # @return [ScriptInterface] a new instance of ScriptInterface - # - # source://byebug//lib/byebug/interfaces/script_interface.rb#8 - def initialize(file, verbose = T.unsafe(nil)); end - - # source://byebug//lib/byebug/interfaces/script_interface.rb#20 - def close; end - - # source://byebug//lib/byebug/interfaces/script_interface.rb#16 - def read_command(prompt); end - - # source://byebug//lib/byebug/interfaces/script_interface.rb#24 - def readline(*_arg0); end -end - -# Processes commands from a file -# -# source://byebug//lib/byebug/processors/script_processor.rb#9 -class Byebug::ScriptProcessor < ::Byebug::CommandProcessor - # source://byebug//lib/byebug/processors/script_processor.rb#28 - def after_repl; end - - # Available commands - # - # source://byebug//lib/byebug/processors/script_processor.rb#13 - def commands; end - - # Prompt shown before reading a command. - # - # source://byebug//lib/byebug/processors/script_processor.rb#37 - def prompt; end - - # source://byebug//lib/byebug/processors/script_processor.rb#17 - def repl; end - - private - - # source://byebug//lib/byebug/processors/script_processor.rb#43 - def without_exceptions; end -end - -# Change byebug settings. -# -# source://byebug//lib/byebug/commands/set.rb#10 -class Byebug::SetCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/set.rb#42 - def execute; end - - private - - # source://byebug//lib/byebug/commands/set.rb#66 - def get_onoff(arg, default); end - - class << self - # source://byebug//lib/byebug/commands/set.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/set.rb#38 - def help; end - - # source://byebug//lib/byebug/commands/set.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/set.rb#34 - def short_description; end - end -end - -# Parent class for all byebug settings. -# -# source://byebug//lib/byebug/setting.rb#9 -class Byebug::Setting - # @return [Setting] a new instance of Setting - # - # source://byebug//lib/byebug/setting.rb#14 - def initialize; end - - # @return [Boolean] - # - # source://byebug//lib/byebug/setting.rb#18 - def boolean?; end - - # source://byebug//lib/byebug/setting.rb#28 - def help; end - - # @return [Boolean] - # - # source://byebug//lib/byebug/setting.rb#22 - def integer?; end - - # source://byebug//lib/byebug/setting.rb#37 - def to_s; end - - # source://byebug//lib/byebug/setting.rb#32 - def to_sym; end - - # Returns the value of attribute value. - # - # source://byebug//lib/byebug/setting.rb#10 - def value; end - - # Sets the attribute value - # - # @param value the value to set the attribute value to. - # - # source://byebug//lib/byebug/setting.rb#10 - def value=(_arg0); end - - class << self - # source://byebug//lib/byebug/setting.rb#46 - def [](name); end - - # source://byebug//lib/byebug/setting.rb#50 - def []=(name, value); end - - # source://byebug//lib/byebug/setting.rb#54 - def find(shortcut); end - - # @todo DRY this up. Very similar code exists in the CommandList class - # - # source://byebug//lib/byebug/setting.rb#65 - def help_all; end - - # source://byebug//lib/byebug/setting.rb#42 - def settings; end - end -end - -# source://byebug//lib/byebug/setting.rb#12 -Byebug::Setting::DEFAULT = T.let(T.unsafe(nil), FalseClass) - -# Show byebug settings. -# -# source://byebug//lib/byebug/commands/show.rb#9 -class Byebug::ShowCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/show.rb#35 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/show.rb#17 - def description; end - - # source://byebug//lib/byebug/commands/show.rb#31 - def help; end - - # source://byebug//lib/byebug/commands/show.rb#13 - def regexp; end - - # source://byebug//lib/byebug/commands/show.rb#27 - def short_description; end - end -end - -# Allows the user to continue execution until the next breakpoint, as -# long as it is different from the current one -# -# source://byebug//lib/byebug/commands/skip.rb#11 -class Byebug::SkipCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/skip.rb#70 - def auto_run; end - - # source://byebug//lib/byebug/commands/skip.rb#77 - def execute; end - - # source://byebug//lib/byebug/commands/skip.rb#53 - def initialize_attributes; end - - # source://byebug//lib/byebug/commands/skip.rb#60 - def keep_execution; end - - # source://byebug//lib/byebug/commands/skip.rb#64 - def reset_attributes; end - - class << self - # source://byebug//lib/byebug/commands/skip.rb#41 - def description; end - - # source://byebug//lib/byebug/commands/skip.rb#18 - def file_line; end - - # Sets the attribute file_line - # - # @param value the value to set the attribute file_line to. - # - # source://byebug//lib/byebug/commands/skip.rb#15 - def file_line=(_arg0); end - - # source://byebug//lib/byebug/commands/skip.rb#22 - def file_path; end - - # Sets the attribute file_path - # - # @param value the value to set the attribute file_path to. - # - # source://byebug//lib/byebug/commands/skip.rb#15 - def file_path=(_arg0); end - - # Returns the value of attribute previous_autolist. - # - # source://byebug//lib/byebug/commands/skip.rb#16 - def previous_autolist; end - - # source://byebug//lib/byebug/commands/skip.rb#37 - def regexp; end - - # source://byebug//lib/byebug/commands/skip.rb#31 - def restore_autolist; end - - # source://byebug//lib/byebug/commands/skip.rb#26 - def setup_autolist(value); end - - # source://byebug//lib/byebug/commands/skip.rb#49 - def short_description; end - end -end - -# Execute a file containing byebug commands. -# -# It can be used to restore a previously saved debugging session. -# -# source://byebug//lib/byebug/commands/source.rb#11 -class Byebug::SourceCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/source.rb#31 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/source.rb#19 - def description; end - - # source://byebug//lib/byebug/commands/source.rb#15 - def regexp; end - - # source://byebug//lib/byebug/commands/source.rb#27 - def short_description; end - end -end - -# Formats specific line ranges in a source file -# -# source://byebug//lib/byebug/source_file_formatter.rb#10 -class Byebug::SourceFileFormatter - include ::Byebug::Helpers::FileHelper - - # @return [SourceFileFormatter] a new instance of SourceFileFormatter - # - # source://byebug//lib/byebug/source_file_formatter.rb#15 - def initialize(file, annotator); end - - # source://byebug//lib/byebug/source_file_formatter.rb#67 - def amend(line, ceiling); end - - # source://byebug//lib/byebug/source_file_formatter.rb#51 - def amend_final(line); end - - # source://byebug//lib/byebug/source_file_formatter.rb#47 - def amend_initial(line); end - - # Returns the value of attribute annotator. - # - # source://byebug//lib/byebug/source_file_formatter.rb#13 - def annotator; end - - # Returns the value of attribute file. - # - # source://byebug//lib/byebug/source_file_formatter.rb#13 - def file; end - - # source://byebug//lib/byebug/source_file_formatter.rb#20 - def lines(min, max); end - - # source://byebug//lib/byebug/source_file_formatter.rb#33 - def lines_around(center); end - - # source://byebug//lib/byebug/source_file_formatter.rb#55 - def max_initial_line; end - - # source://byebug//lib/byebug/source_file_formatter.rb#59 - def max_line; end - - # source://byebug//lib/byebug/source_file_formatter.rb#37 - def range_around(center); end - - # source://byebug//lib/byebug/source_file_formatter.rb#41 - def range_from(min); end - - # source://byebug//lib/byebug/source_file_formatter.rb#63 - def size; end -end - -# Setting to enable/disable the display of backtraces when evaluations raise -# errors. -# -# source://byebug//lib/byebug/settings/stack_on_error.rb#10 -class Byebug::StackOnErrorSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/stack_on_error.rb#11 - def banner; end -end - -# Implements the step functionality. -# -# Allows the user the continue execution until the next instruction, possibily -# in a different frame. Use step to step into method calls or blocks. -# -# source://byebug//lib/byebug/commands/step.rb#13 -class Byebug::StepCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/step.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/step.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/step.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/step.rb#28 - def short_description; end - end -end - -# Subcommand additions. -# -# source://byebug//lib/byebug/subcommands.rb#12 -module Byebug::Subcommands - extend ::Forwardable - - mixes_in_class_methods ::Byebug::Subcommands::ClassMethods - - # Delegates to subcommands or prints help if no subcommand specified. - # - # @raise [CommandNotFound] - # - # source://byebug//lib/byebug/subcommands.rb#23 - def execute; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def subcommand_list(*args, **_arg1, &block); end - - class << self - # @private - # - # source://byebug//lib/byebug/subcommands.rb#13 - def included(command); end - end -end - -# Class methods added to subcommands -# -# source://byebug//lib/byebug/subcommands.rb#36 -module Byebug::Subcommands::ClassMethods - include ::Byebug::Helpers::ReflectionHelper - - # Default help text for a command with subcommands - # - # source://byebug//lib/byebug/subcommands.rb#42 - def help; end - - # Command's subcommands. - # - # source://byebug//lib/byebug/subcommands.rb#49 - def subcommand_list; end -end - -# Manipulation of Ruby threads -# -# source://byebug//lib/byebug/commands/thread/current.rb#9 -class Byebug::ThreadCommand < ::Byebug::Command - include ::Byebug::Subcommands - extend ::Byebug::Helpers::ReflectionHelper - extend ::Byebug::Subcommands::ClassMethods - - class << self - # source://byebug//lib/byebug/commands/thread.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/thread.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/thread.rb#30 - def short_description; end - end -end - -# Information about the current thread -# -# source://byebug//lib/byebug/commands/thread/current.rb#13 -class Byebug::ThreadCommand::CurrentCommand < ::Byebug::Command - include ::Byebug::Helpers::ThreadHelper - - # source://byebug//lib/byebug/commands/thread/current.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/thread/current.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/thread/current.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/thread/current.rb#28 - def short_description; end - end -end - -# Information about threads -# -# source://byebug//lib/byebug/commands/thread/list.rb#13 -class Byebug::ThreadCommand::ListCommand < ::Byebug::Command - include ::Byebug::Helpers::ThreadHelper - - # source://byebug//lib/byebug/commands/thread/list.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/thread/list.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/thread/list.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/thread/list.rb#28 - def short_description; end - end -end - -# Resumes the specified thread -# -# source://byebug//lib/byebug/commands/thread/resume.rb#13 -class Byebug::ThreadCommand::ResumeCommand < ::Byebug::Command - include ::Byebug::Helpers::ThreadHelper - - # source://byebug//lib/byebug/commands/thread/resume.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/thread/resume.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/thread/resume.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/thread/resume.rb#28 - def short_description; end - end -end - -# Stops the specified thread -# -# source://byebug//lib/byebug/commands/thread/stop.rb#13 -class Byebug::ThreadCommand::StopCommand < ::Byebug::Command - include ::Byebug::Helpers::ThreadHelper - - # source://byebug//lib/byebug/commands/thread/stop.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/thread/stop.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/thread/stop.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/thread/stop.rb#28 - def short_description; end - end -end - -# Switches to the specified thread -# -# source://byebug//lib/byebug/commands/thread/switch.rb#13 -class Byebug::ThreadCommand::SwitchCommand < ::Byebug::Command - include ::Byebug::Helpers::ThreadHelper - - # source://byebug//lib/byebug/commands/thread/switch.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/thread/switch.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/thread/switch.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/thread/switch.rb#28 - def short_description; end - end -end - -class Byebug::ThreadsTable; end - -# Show (and possibily stop) at every line that changes a global variable. -# -# source://byebug//lib/byebug/commands/tracevar.rb#9 -class Byebug::TracevarCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/tracevar.rb#32 - def execute; end - - private - - # source://byebug//lib/byebug/commands/tracevar.rb#48 - def on_change(name, value, stop); end - - class << self - # source://byebug//lib/byebug/commands/tracevar.rb#16 - def description; end - - # source://byebug//lib/byebug/commands/tracevar.rb#10 - def regexp; end - - # source://byebug//lib/byebug/commands/tracevar.rb#28 - def short_description; end - end -end - -# Remove expressions from display list. -# -# source://byebug//lib/byebug/commands/undisplay.rb#10 -class Byebug::UndisplayCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/undisplay.rb#35 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/undisplay.rb#19 - def description; end - - # source://byebug//lib/byebug/commands/undisplay.rb#15 - def regexp; end - - # source://byebug//lib/byebug/commands/undisplay.rb#31 - def short_description; end - end -end - -# Stop tracing a global variable. -# -# source://byebug//lib/byebug/commands/untracevar.rb#9 -class Byebug::UntracevarCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/untracevar.rb#26 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/untracevar.rb#14 - def description; end - - # source://byebug//lib/byebug/commands/untracevar.rb#10 - def regexp; end - - # source://byebug//lib/byebug/commands/untracevar.rb#22 - def short_description; end - end -end - -# Move the current frame up in the backtrace. -# -# source://byebug//lib/byebug/commands/up.rb#12 -class Byebug::UpCommand < ::Byebug::Command - include ::Byebug::Helpers::FrameHelper - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/up.rb#36 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/up.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/up.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/up.rb#32 - def short_description; end - end -end - -# Shows variables and its values -# -# source://byebug//lib/byebug/commands/var/all.rb#9 -class Byebug::VarCommand < ::Byebug::Command - include ::Byebug::Subcommands - extend ::Byebug::Helpers::ReflectionHelper - extend ::Byebug::Subcommands::ClassMethods - - class << self - # source://byebug//lib/byebug/commands/var.rb#25 - def description; end - - # source://byebug//lib/byebug/commands/var.rb#21 - def regexp; end - - # source://byebug//lib/byebug/commands/var.rb#33 - def short_description; end - end -end - -# Shows global, instance and local variables -# -# source://byebug//lib/byebug/commands/var/all.rb#13 -class Byebug::VarCommand::AllCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - include ::Byebug::Helpers::VarHelper - - # source://byebug//lib/byebug/commands/var/all.rb#34 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/var/all.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/var/all.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/var/all.rb#30 - def short_description; end - end -end - -# Information about arguments of the current method/block -# -# source://byebug//lib/byebug/commands/var/args.rb#13 -class Byebug::VarCommand::ArgsCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - include ::Byebug::Helpers::VarHelper - - # source://byebug//lib/byebug/commands/var/args.rb#34 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/var/args.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/var/args.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/var/args.rb#30 - def short_description; end - end -end - -# Shows constants -# -# source://byebug//lib/byebug/commands/var/const.rb#13 -class Byebug::VarCommand::ConstCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - - # source://byebug//lib/byebug/commands/var/const.rb#34 - def execute; end - - private - - # source://byebug//lib/byebug/commands/var/const.rb#44 - def str_obj; end - - class << self - # source://byebug//lib/byebug/commands/var/const.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/var/const.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/var/const.rb#30 - def short_description; end - end -end - -# Shows global variables -# -# source://byebug//lib/byebug/commands/var/global.rb#11 -class Byebug::VarCommand::GlobalCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - include ::Byebug::Helpers::VarHelper - - # source://byebug//lib/byebug/commands/var/global.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/var/global.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/var/global.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/var/global.rb#28 - def short_description; end - end -end - -# Shows instance variables -# -# source://byebug//lib/byebug/commands/var/instance.rb#13 -class Byebug::VarCommand::InstanceCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - include ::Byebug::Helpers::VarHelper - - # source://byebug//lib/byebug/commands/var/instance.rb#34 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/var/instance.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/var/instance.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/var/instance.rb#30 - def short_description; end - end -end - -# Shows local variables in current scope -# -# source://byebug//lib/byebug/commands/var/local.rb#13 -class Byebug::VarCommand::LocalCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - include ::Byebug::Helpers::VarHelper - - # source://byebug//lib/byebug/commands/var/local.rb#34 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/var/local.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/var/local.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/var/local.rb#30 - def short_description; end - end -end - -# Show current backtrace. -# -# source://byebug//lib/byebug/commands/where.rb#11 -class Byebug::WhereCommand < ::Byebug::Command - include ::Byebug::Helpers::FrameHelper - - # source://byebug//lib/byebug/commands/where.rb#39 - def execute; end - - private - - # source://byebug//lib/byebug/commands/where.rb#45 - def print_backtrace; end - - class << self - # source://byebug//lib/byebug/commands/where.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/where.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/where.rb#35 - def short_description; end - end -end - -# Setting to customize the maximum width of byebug's output. -# -# source://byebug//lib/byebug/settings/width.rb#9 -class Byebug::WidthSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/width.rb#12 - def banner; end - - # source://byebug//lib/byebug/settings/width.rb#16 - def to_s; end -end - -# source://byebug//lib/byebug/settings/width.rb#10 -Byebug::WidthSetting::DEFAULT = T.let(T.unsafe(nil), Integer) - -# Extends the extension class to be able to pass information about the -# debugging environment from the c-extension to the user. -# -# source://byebug//lib/byebug/core.rb#113 -class Exception - # Returns the value of attribute __bb_context. - # - # source://byebug//lib/byebug/core.rb#114 - def __bb_context; end -end - -# Adds a `byebug` method to the Kernel module. -# -# Dropping a `byebug` call anywhere in your code, you get a debug prompt. -# -# source://byebug//lib/byebug/attacher.rb#34 -module Kernel - # source://byebug//lib/byebug/attacher.rb#35 - def byebug; end - - # source://byebug//lib/byebug/attacher.rb#35 - def debugger; end - - # source://byebug//lib/byebug/attacher.rb#41 - def remote_byebug(host = T.unsafe(nil), port = T.unsafe(nil)); end -end diff --git a/sorbet/rbi/gems/coderay@1.1.3.rbi b/sorbet/rbi/gems/coderay@1.1.3.rbi deleted file mode 100644 index 76870c112..000000000 --- a/sorbet/rbi/gems/coderay@1.1.3.rbi +++ /dev/null @@ -1,3426 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `coderay` gem. -# Please instead update this file by running `bin/tapioca gem coderay`. - -# = CodeRay Library -# -# CodeRay is a Ruby library for syntax highlighting. -# -# I try to make CodeRay easy to use and intuitive, but at the same time fully -# featured, complete, fast and efficient. -# -# See README. -# -# It consists mainly of -# * the main engine: CodeRay (Scanners::Scanner, Tokens, Encoders::Encoder) -# * the plugin system: PluginHost, Plugin -# * the scanners in CodeRay::Scanners -# * the encoders in CodeRay::Encoders -# * the styles in CodeRay::Styles -# -# Here's a fancy graphic to light up this gray docu: -# -# http://cycnus.de/raindark/coderay/scheme.png -# -# == Documentation -# -# See CodeRay, Encoders, Scanners, Tokens. -# -# == Usage -# -# Remember you need RubyGems to use CodeRay, unless you have it in your load -# path. Run Ruby with -rubygems option if required. -# -# === Highlight Ruby code in a string as html -# -# require 'coderay' -# print CodeRay.scan('puts "Hello, world!"', :ruby).html -# -# # prints something like this: -# puts "Hello, world!" -# -# -# === Highlight C code from a file in a html div -# -# require 'coderay' -# print CodeRay.scan(File.read('ruby.h'), :c).div -# print CodeRay.scan_file('ruby.h').html.div -# -# You can include this div in your page. The used CSS styles can be printed with -# -# % coderay_stylesheet -# -# === Highlight without typing too much -# -# If you are one of the hasty (or lazy, or extremely curious) people, just run this file: -# -# % ruby -rubygems /path/to/coderay/coderay.rb > example.html -# -# and look at the file it created in your browser. -# -# = CodeRay Module -# -# The CodeRay module provides convenience methods for the engine. -# -# * The +lang+ and +format+ arguments select Scanner and Encoder to use. These are -# simply lower-case symbols, like :python or :html. -# * All methods take an optional hash as last parameter, +options+, that is send to -# the Encoder / Scanner. -# * Input and language are always sorted in this order: +code+, +lang+. -# (This is in alphabetical order, if you need a mnemonic ;) -# -# You should be able to highlight everything you want just using these methods; -# so there is no need to dive into CodeRay's deep class hierarchy. -# -# The examples in the demo directory demonstrate common cases using this interface. -# -# = Basic Access Ways -# -# Read this to get a general view what CodeRay provides. -# -# == Scanning -# -# Scanning means analysing an input string, splitting it up into Tokens. -# Each Token knows about what type it is: string, comment, class name, etc. -# -# Each +lang+ (language) has its own Scanner; for example, :ruby code is -# handled by CodeRay::Scanners::Ruby. -# -# CodeRay.scan:: Scan a string in a given language into Tokens. -# This is the most common method to use. -# CodeRay.scan_file:: Scan a file and guess the language using FileType. -# -# The Tokens object you get from these methods can encode itself; see Tokens. -# -# == Encoding -# -# Encoding means compiling Tokens into an output. This can be colored HTML or -# LaTeX, a textual statistic or just the number of non-whitespace tokens. -# -# Each Encoder provides output in a specific +format+, so you select Encoders via -# formats like :html or :statistic. -# -# CodeRay.encode:: Scan and encode a string in a given language. -# CodeRay.encode_tokens:: Encode the given tokens. -# CodeRay.encode_file:: Scan a file, guess the language using FileType and encode it. -# -# == All-in-One Encoding -# -# CodeRay.encode:: Highlight a string with a given input and output format. -# -# == Instanciating -# -# You can use an Encoder instance to highlight multiple inputs. This way, the setup -# for this Encoder must only be done once. -# -# CodeRay.encoder:: Create an Encoder instance with format and options. -# CodeRay.scanner:: Create an Scanner instance for lang, with '' as default code. -# -# To make use of CodeRay.scanner, use CodeRay::Scanner::code=. -# -# The scanning methods provide more flexibility; we recommend to use these. -# -# == Reusing Scanners and Encoders -# -# If you want to re-use scanners and encoders (because that is faster), see -# CodeRay::Duo for the most convenient (and recommended) interface. -# -# source://coderay//lib/coderay.rb#126 -module CodeRay - class << self - # Assuming the path is a subpath of lib/coderay/ - # - # source://coderay//lib/coderay.rb#133 - def coderay_path(*path); end - - # Encode a string. - # - # This scans +code+ with the the Scanner for +lang+ and then - # encodes it with the Encoder for +format+. - # +options+ will be passed to the Encoder. - # - # See CodeRay::Encoder.encode. - # - # source://coderay//lib/coderay.rb#196 - def encode(code, lang, format, options = T.unsafe(nil)); end - - # Encodes +filename+ (a path to a code file) with the Scanner for +lang+. - # - # See CodeRay.scan_file. - # Notice that the second argument is the output +format+, not the input language. - # - # Example: - # require 'coderay' - # page = CodeRay.encode_file 'some_c_code.c', :html - # - # source://coderay//lib/coderay.rb#221 - def encode_file(filename, format, options = T.unsafe(nil)); end - - # Encode pre-scanned Tokens. - # Use this together with CodeRay.scan: - # - # require 'coderay' - # - # # Highlight a short Ruby code example in a HTML span - # tokens = CodeRay.scan '1 + 2', :ruby - # puts CodeRay.encode_tokens(tokens, :span) - # - # source://coderay//lib/coderay.rb#209 - def encode_tokens(tokens, format, options = T.unsafe(nil)); end - - # Finds the Encoder class for +format+ and creates an instance, passing - # +options+ to it. - # - # Example: - # require 'coderay' - # - # stats = CodeRay.encoder(:statistic) - # stats.encode("puts 17 + 4\n", :ruby) - # - # puts '%d out of %d tokens have the kind :integer.' % [ - # stats.type_stats[:integer].count, - # stats.real_token_count - # ] - # #-> 2 out of 4 tokens have the kind :integer. - # - # source://coderay//lib/coderay.rb#260 - def encoder(format, options = T.unsafe(nil)); end - - # Extract the options for the scanner from the +options+ hash. - # - # Returns an empty Hash if :scanner_options is not set. - # - # This is used if a method like CodeRay.encode has to provide options - # for Encoder _and_ scanner. - # - # source://coderay//lib/coderay.rb#278 - def get_scanner_options(options); end - - # Highlight a string into a HTML
. - # - # CSS styles use classes, so you have to include a stylesheet - # in your output. - # - # See encode. - # - # source://coderay//lib/coderay.rb#232 - def highlight(code, lang, options = T.unsafe(nil), format = T.unsafe(nil)); end - - # Highlight a file into a HTML
. - # - # CSS styles use classes, so you have to include a stylesheet - # in your output. - # - # See encode. - # - # source://coderay//lib/coderay.rb#242 - def highlight_file(filename, options = T.unsafe(nil), format = T.unsafe(nil)); end - - # Scans the given +code+ (a String) with the Scanner for +lang+. - # - # This is a simple way to use CodeRay. Example: - # require 'coderay' - # page = CodeRay.scan("puts 'Hello, world!'", :ruby).html - # - # See also demo/demo_simple. - # - # source://coderay//lib/coderay.rb#168 - def scan(code, lang, options = T.unsafe(nil), &block); end - - # Scans +filename+ (a path to a code file) with the Scanner for +lang+. - # - # If +lang+ is :auto or omitted, the CodeRay::FileType module is used to - # determine it. If it cannot find out what type it is, it uses - # CodeRay::Scanners::Text. - # - # Calls CodeRay.scan. - # - # Example: - # require 'coderay' - # page = CodeRay.scan_file('some_c_code.c').html - # - # source://coderay//lib/coderay.rb#183 - def scan_file(filename, lang = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # Finds the Scanner class for +lang+ and creates an instance, passing - # +options+ to it. - # - # See Scanner.new. - # - # source://coderay//lib/coderay.rb#268 - def scanner(lang, options = T.unsafe(nil), &block); end - end -end - -# source://coderay//lib/coderay.rb#130 -CodeRay::CODERAY_PATH = T.let(T.unsafe(nil), String) - -# = Duo -# -# A Duo is a convenient way to use CodeRay. You just create a Duo, -# giving it a lang (language of the input code) and a format (desired -# output format), and call Duo#highlight with the code. -# -# Duo makes it easy to re-use both scanner and encoder for a repetitive -# task. It also provides a very easy interface syntax: -# -# require 'coderay' -# CodeRay::Duo[:python, :div].highlight 'import this' -# -# Until you want to do uncommon things with CodeRay, I recommend to use -# this method, since it takes care of everything. -# -# source://coderay//lib/coderay/duo.rb#17 -class CodeRay::Duo - # Create a new Duo, holding a lang and a format to highlight code. - # - # simple: - # CodeRay::Duo[:ruby, :html].highlight 'bla 42' - # - # with options: - # CodeRay::Duo[:ruby, :html, :hint => :debug].highlight '????::??' - # - # alternative syntax without options: - # CodeRay::Duo[:ruby => :statistic].encode 'class << self; end' - # - # alternative syntax with options: - # CodeRay::Duo[{ :ruby => :statistic }, :do => :something].encode 'abc' - # - # The options are forwarded to scanner and encoder - # (see CodeRay.get_scanner_options). - # - # @return [Duo] a new instance of Duo - # - # source://coderay//lib/coderay/duo.rb#37 - def initialize(lang = T.unsafe(nil), format = T.unsafe(nil), options = T.unsafe(nil)); end - - # Tokenize and highlight the code using +scanner+ and +encoder+. - # Allows to use Duo like a proc object: - # - # CodeRay::Duo[:python => :yaml].call(code) - # - # or, in Ruby 1.9 and later: - # - # CodeRay::Duo[:python => :yaml].(code) - # - # source://coderay//lib/coderay/duo.rb#64 - def call(code, options = T.unsafe(nil)); end - - # Tokenize and highlight the code using +scanner+ and +encoder+. - # - # source://coderay//lib/coderay/duo.rb#64 - def encode(code, options = T.unsafe(nil)); end - - # The encoder of the duo. Only created once. - # - # source://coderay//lib/coderay/duo.rb#59 - def encoder; end - - # Returns the value of attribute format. - # - # source://coderay//lib/coderay/duo.rb#19 - def format; end - - # Sets the attribute format - # - # @param value the value to set the attribute format to. - # - # source://coderay//lib/coderay/duo.rb#19 - def format=(_arg0); end - - # Tokenize and highlight the code using +scanner+ and +encoder+. - # - # source://coderay//lib/coderay/duo.rb#64 - def highlight(code, options = T.unsafe(nil)); end - - # Returns the value of attribute lang. - # - # source://coderay//lib/coderay/duo.rb#19 - def lang; end - - # Sets the attribute lang - # - # @param value the value to set the attribute lang to. - # - # source://coderay//lib/coderay/duo.rb#19 - def lang=(_arg0); end - - # Returns the value of attribute options. - # - # source://coderay//lib/coderay/duo.rb#19 - def options; end - - # Sets the attribute options - # - # @param value the value to set the attribute options to. - # - # source://coderay//lib/coderay/duo.rb#19 - def options=(_arg0); end - - # The scanner of the duo. Only created once. - # - # source://coderay//lib/coderay/duo.rb#54 - def scanner; end - - class << self - # To allow calls like Duo[:ruby, :html].highlight. - def [](*_arg0); end - end -end - -# This module holds the Encoder class and its subclasses. -# For example, the HTML encoder is named CodeRay::Encoders::HTML -# can be found in coderay/encoders/html. -# -# Encoders also provides methods and constants for the register -# mechanism and the [] method that returns the Encoder class -# belonging to the given format. -# -# source://coderay//lib/coderay/encoders.rb#10 -module CodeRay::Encoders - extend ::CodeRay::PluginHost -end - -# A simple Filter that removes all tokens of the :comment kind. -# -# Alias: +remove_comments+ -# -# Usage: -# CodeRay.scan('print # foo', :ruby).comment_filter.text -# #-> "print " -# -# See also: TokenKindFilter, LinesOfCode -# -# source://coderay//lib/coderay/encoders/comment_filter.rb#15 -class CodeRay::Encoders::CommentFilter < ::CodeRay::Encoders::TokenKindFilter; end - -# source://coderay//lib/coderay/encoders/comment_filter.rb#19 -CodeRay::Encoders::CommentFilter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# Returns the number of tokens. -# -# Text and block tokens are counted. -# -# source://coderay//lib/coderay/encoders/count.rb#7 -class CodeRay::Encoders::Count < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/count.rb#29 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/count.rb#29 - def begin_line(kind); end - - # source://coderay//lib/coderay/encoders/count.rb#29 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/count.rb#29 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/count.rb#25 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/count.rb#19 - def finish(options); end - - # source://coderay//lib/coderay/encoders/count.rb#13 - def setup(options); end -end - -# = Debug Encoder -# -# Fast encoder producing simple debug output. -# -# It is readable and diff-able and is used for testing. -# -# You cannot fully restore the tokens information from the -# output, because consecutive :space tokens are merged. -# -# See also: Scanners::Debug -# -# source://coderay//lib/coderay/encoders/debug.rb#14 -class CodeRay::Encoders::Debug < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/debug.rb#30 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/debug.rb#38 - def begin_line(kind); end - - # source://coderay//lib/coderay/encoders/debug.rb#34 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/debug.rb#42 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/debug.rb#20 - def text_token(text, kind); end -end - -# source://coderay//lib/coderay/encoders/debug.rb#18 -CodeRay::Encoders::Debug::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# = Debug Lint Encoder -# -# Debug encoder with additional checks for: -# -# - empty tokens -# - incorrect nesting -# -# It will raise an InvalidTokenStream exception when any of the above occurs. -# -# See also: Encoders::Debug -# -# source://coderay//lib/coderay/encoders/debug_lint.rb#16 -class CodeRay::Encoders::DebugLint < ::CodeRay::Encoders::Debug - # source://coderay//lib/coderay/encoders/debug_lint.rb#26 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/debug_lint.rb#37 - def begin_line(kind); end - - # @raise [Lint::IncorrectTokenGroupNesting] - # - # source://coderay//lib/coderay/encoders/debug_lint.rb#31 - def end_group(kind); end - - # @raise [Lint::IncorrectTokenGroupNesting] - # - # source://coderay//lib/coderay/encoders/debug_lint.rb#42 - def end_line(kind); end - - # @raise [Lint::EmptyToken] - # - # source://coderay//lib/coderay/encoders/debug_lint.rb#20 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/debug_lint.rb#55 - def finish(options); end - - # source://coderay//lib/coderay/encoders/debug_lint.rb#50 - def setup(options); end -end - -# Wraps HTML output into a DIV element, using inline styles by default. -# -# See Encoders::HTML for available options. -# -# source://coderay//lib/coderay/encoders/div.rb#9 -class CodeRay::Encoders::Div < ::CodeRay::Encoders::HTML; end - -# source://coderay//lib/coderay/encoders/div.rb#15 -CodeRay::Encoders::Div::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/div.rb#11 -CodeRay::Encoders::Div::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# = Encoder -# -# The Encoder base class. Together with Scanner and -# Tokens, it forms the highlighting triad. -# -# Encoder instances take a Tokens object and do something with it. -# -# The most common Encoder is surely the HTML encoder -# (CodeRay::Encoders::HTML). It highlights the code in a colorful -# html page. -# If you want the highlighted code in a div or a span instead, -# use its subclasses Div and Span. -# -# source://coderay//lib/coderay/encoders/encoder.rb#16 -class CodeRay::Encoders::Encoder - extend ::CodeRay::Plugin - - # Creates a new Encoder. - # +options+ is saved and used for all encode operations, as long - # as you don't overwrite it there by passing additional options. - # - # Encoder objects provide three encode methods: - # - encode simply takes a +code+ string and a +lang+ - # - encode_tokens expects a +tokens+ object instead - # - # Each method has an optional +options+ parameter. These are - # added to the options you passed at creation. - # - # @return [Encoder] a new instance of Encoder - # - # source://coderay//lib/coderay/encoders/encoder.rb#55 - def initialize(options = T.unsafe(nil)); end - - # source://coderay//lib/coderay/encoders/encoder.rb#87 - def <<(token); end - - # Starts a token group with the given +kind+. - # - # source://coderay//lib/coderay/encoders/encoder.rb#123 - def begin_group(kind); end - - # Starts a new line token group with the given +kind+. - # - # source://coderay//lib/coderay/encoders/encoder.rb#131 - def begin_line(kind); end - - # Encode the given +code+ using the Scanner for +lang+. - # - # source://coderay//lib/coderay/encoders/encoder.rb#70 - def encode(code, lang, options = T.unsafe(nil)); end - - # Encode a Tokens object. - # - # source://coderay//lib/coderay/encoders/encoder.rb#61 - def encode_tokens(tokens, options = T.unsafe(nil)); end - - # Ends a token group with the given +kind+. - # - # source://coderay//lib/coderay/encoders/encoder.rb#127 - def end_group(kind); end - - # Ends a new line token group with the given +kind+. - # - # source://coderay//lib/coderay/encoders/encoder.rb#135 - def end_line(kind); end - - # The default file extension for this encoder. - # - # source://coderay//lib/coderay/encoders/encoder.rb#83 - def file_extension; end - - # Encode the given +code+ using the Scanner for +lang+. - # You can use highlight instead of encode, if that seems - # more clear to you. - # - # source://coderay//lib/coderay/encoders/encoder.rb#70 - def highlight(code, lang, options = T.unsafe(nil)); end - - # The options you gave the Encoder at creating. - # - # source://coderay//lib/coderay/encoders/encoder.rb#43 - def options; end - - # The options you gave the Encoder at creating. - # - # source://coderay//lib/coderay/encoders/encoder.rb#43 - def options=(_arg0); end - - # The options you gave the Encoder at creating. - # - # source://coderay//lib/coderay/encoders/encoder.rb#43 - def scanner; end - - # The options you gave the Encoder at creating. - # - # source://coderay//lib/coderay/encoders/encoder.rb#43 - def scanner=(_arg0); end - - # Called for each text token ([text, kind]), where text is a String. - # - # source://coderay//lib/coderay/encoders/encoder.rb#118 - def text_token(text, kind); end - - # Called with +content+ and +kind+ of the currently scanned token. - # For simple scanners, it's enougth to implement this method. - # - # By default, it calls text_token, begin_group, end_group, begin_line, - # or end_line, depending on the +content+. - # - # source://coderay//lib/coderay/encoders/encoder.rb#100 - def token(content, kind); end - - # Do the encoding. - # - # The already created +tokens+ object must be used; it must be a - # Tokens object. - # - # source://coderay//lib/coderay/encoders/encoder.rb#168 - def tokens(tokens, options = T.unsafe(nil)); end - - protected - - # Do the encoding. - # - # The already created +tokens+ object must be used; it must be a - # Tokens object. - # - # source://coderay//lib/coderay/encoders/encoder.rb#168 - def compile(tokens, options = T.unsafe(nil)); end - - # Called with merged options after encoding starts. - # The return value is the result of encoding, typically @out. - # - # source://coderay//lib/coderay/encoders/encoder.rb#160 - def finish(options); end - - # source://coderay//lib/coderay/encoders/encoder.rb#148 - def get_output(options); end - - # Append data.to_s to the output. Returns the argument. - # - # source://coderay//lib/coderay/encoders/encoder.rb#153 - def output(data); end - - # Called with merged options before encoding starts. - # Sets @out to an empty string. - # - # See the HTML Encoder for an example of option caching. - # - # source://coderay//lib/coderay/encoders/encoder.rb#144 - def setup(options); end - - class << self - # If FILE_EXTENSION isn't defined, this method returns the - # downcase class name instead. - # - # source://coderay//lib/coderay/encoders/encoder.rb#24 - def const_missing(sym); end - - # The default file extension for output file of this encoder class. - # - # source://coderay//lib/coderay/encoders/encoder.rb#33 - def file_extension; end - end -end - -# Subclasses are to store their default options in this constant. -# -# source://coderay//lib/coderay/encoders/encoder.rb#40 -CodeRay::Encoders::Encoder::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/helpers/plugin.rb#41 -CodeRay::Encoders::Encoder::PLUGIN_HOST = CodeRay::Encoders - -# A Filter encoder has another Tokens instance as output. -# It can be subclass to select, remove, or modify tokens in the stream. -# -# Subclasses of Filter are called "Filters" and can be chained. -# -# == Options -# -# === :tokens -# -# The Tokens object which will receive the output. -# -# Default: Tokens.new -# -# See also: TokenKindFilter -# -# source://coderay//lib/coderay/encoders/filter.rb#18 -class CodeRay::Encoders::Filter < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/filter.rb#39 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/filter.rb#43 - def begin_line(kind); end - - # source://coderay//lib/coderay/encoders/filter.rb#47 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/filter.rb#51 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/filter.rb#35 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/filter.rb#29 - def finish(options); end - - # source://coderay//lib/coderay/encoders/filter.rb#23 - def setup(options); end -end - -# = HTML Encoder -# -# This is CodeRay's most important highlighter: -# It provides save, fast XHTML generation and CSS support. -# -# == Usage -# -# require 'coderay' -# puts CodeRay.scan('Some /code/', :ruby).html #-> a HTML page -# puts CodeRay.scan('Some /code/', :ruby).html(:wrap => :span) -# #-> Some /code/ -# puts CodeRay.scan('Some /code/', :ruby).span #-> the same -# -# puts CodeRay.scan('Some code', :ruby).html( -# :wrap => nil, -# :line_numbers => :inline, -# :css => :style -# ) -# -# == Options -# -# === :tab_width -# Convert \t characters to +n+ spaces (a number or false.) -# false will keep tab characters untouched. -# -# Default: 8 -# -# === :css -# How to include the styles; can be :class or :style. -# -# Default: :class -# -# === :wrap -# Wrap in :page, :div, :span or nil. -# -# You can also use Encoders::Div and Encoders::Span. -# -# Default: nil -# -# === :title -# -# The title of the HTML page (works only when :wrap is set to :page.) -# -# Default: 'CodeRay output' -# -# === :break_lines -# -# Split multiline blocks at line breaks. -# Forced to true if :line_numbers option is set to :inline. -# -# Default: false -# -# === :line_numbers -# Include line numbers in :table, :inline, or nil (no line numbers) -# -# Default: nil -# -# === :line_number_anchors -# Adds anchors and links to the line numbers. Can be false (off), true (on), -# or a prefix string that will be prepended to the anchor name. -# -# The prefix must consist only of letters, digits, and underscores. -# -# Default: true, default prefix name: "line" -# -# === :line_number_start -# Where to start with line number counting. -# -# Default: 1 -# -# === :bold_every -# Make every +n+-th number appear bold. -# -# Default: 10 -# -# === :highlight_lines -# -# Highlights certain line numbers. -# Can be any Enumerable, typically just an Array or Range, of numbers. -# -# Bolding is deactivated when :highlight_lines is set. It only makes sense -# in combination with :line_numbers. -# -# Default: nil -# -# === :hint -# Include some information into the output using the title attribute. -# Can be :info (show token kind on mouse-over), :info_long (with full path) -# or :debug (via inspect). -# -# Default: false -# -# source://coderay//lib/coderay/encoders/html.rb#97 -class CodeRay::Encoders::HTML < ::CodeRay::Encoders::Encoder - # token groups, eg. strings - # - # source://coderay//lib/coderay/encoders/html.rb#235 - def begin_group(kind); end - - # whole lines to be highlighted, eg. a deleted line in a diff - # - # source://coderay//lib/coderay/encoders/html.rb#247 - def begin_line(kind); end - - # Returns the value of attribute css. - # - # source://coderay//lib/coderay/encoders/html.rb#126 - def css; end - - # source://coderay//lib/coderay/encoders/html.rb#241 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/html.rb#261 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/html.rb#221 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/html.rb#316 - def break_lines(text, style); end - - # source://coderay//lib/coderay/encoders/html.rb#310 - def check_group_nesting(name, kind); end - - # source://coderay//lib/coderay/encoders/html.rb#268 - def check_options!(options); end - - # source://coderay//lib/coderay/encoders/html.rb#324 - def close_span; end - - # source://coderay//lib/coderay/encoders/html.rb#280 - def css_class_for_kinds(kinds); end - - # source://coderay//lib/coderay/encoders/html.rb#195 - def finish(options); end - - # source://coderay//lib/coderay/encoders/html.rb#289 - def make_span_for_kinds(method, hint); end - - # source://coderay//lib/coderay/encoders/html.rb#172 - def setup(options); end - - # source://coderay//lib/coderay/encoders/html.rb#284 - def style_for_kinds(kinds); end - - class << self - # source://coderay//lib/coderay/encoders/html.rb#130 - def make_html_escape_hash; end - - # Generate a hint about the given +kinds+ in a +hint+ style. - # - # +hint+ may be :info, :info_long or :debug. - # - # source://coderay//lib/coderay/encoders/html.rb#157 - def token_path_to_hint(hint, kinds); end - end -end - -# source://coderay//lib/coderay/encoders/html/css.rb#5 -class CodeRay::Encoders::HTML::CSS - # @return [CSS] a new instance of CSS - # - # source://coderay//lib/coderay/encoders/html/css.rb#13 - def initialize(style = T.unsafe(nil)); end - - # source://coderay//lib/coderay/encoders/html/css.rb#23 - def get_style_for_css_classes(css_classes); end - - # Returns the value of attribute stylesheet. - # - # source://coderay//lib/coderay/encoders/html/css.rb#7 - def stylesheet; end - - private - - # source://coderay//lib/coderay/encoders/html/css.rb#49 - def parse(stylesheet); end - - class << self - # source://coderay//lib/coderay/encoders/html/css.rb#9 - def load_stylesheet(style = T.unsafe(nil)); end - end -end - -# source://coderay//lib/coderay/encoders/html/css.rb#36 -CodeRay::Encoders::HTML::CSS::CSS_CLASS_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/encoders/html.rb#103 -CodeRay::Encoders::HTML::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/html.rb#101 -CodeRay::Encoders::HTML::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# source://coderay//lib/coderay/encoders/html.rb#143 -CodeRay::Encoders::HTML::HTML_ESCAPE = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/html.rb#144 -CodeRay::Encoders::HTML::HTML_ESCAPE_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/encoders/html/numbering.rb#6 -module CodeRay::Encoders::HTML::Numbering - class << self - # source://coderay//lib/coderay/encoders/html/numbering.rb#8 - def number!(output, mode = T.unsafe(nil), options = T.unsafe(nil)); end - end -end - -# This module is included in the output String of the HTML Encoder. -# -# It provides methods like wrap, div, page etc. -# -# Remember to use #clone instead of #dup to keep the modules the object was -# extended with. -# -# TODO: Rewrite this without monkey patching. -# -# source://coderay//lib/coderay/encoders/html/output.rb#14 -module CodeRay::Encoders::HTML::Output - # source://coderay//lib/coderay/encoders/html/output.rb#57 - def apply_title!(title); end - - # Returns the value of attribute css. - # - # source://coderay//lib/coderay/encoders/html/output.rb#16 - def css; end - - # Sets the attribute css - # - # @param value the value to set the attribute css to. - # - # source://coderay//lib/coderay/encoders/html/output.rb#16 - def css=(_arg0); end - - # source://coderay//lib/coderay/encoders/html/output.rb#86 - def stylesheet(in_tag = T.unsafe(nil)); end - - # source://coderay//lib/coderay/encoders/html/output.rb#62 - def wrap!(element, *args); end - - # source://coderay//lib/coderay/encoders/html/output.rb#52 - def wrap_in!(template); end - - # source://coderay//lib/coderay/encoders/html/output.rb#47 - def wrapped_in; end - - # Sets the attribute wrapped_in - # - # @param value the value to set the attribute wrapped_in to. - # - # source://coderay//lib/coderay/encoders/html/output.rb#50 - def wrapped_in=(_arg0); end - - # @return [Boolean] - # - # source://coderay//lib/coderay/encoders/html/output.rb#43 - def wrapped_in?(element); end - - class << self - # Raises an exception if an object that doesn't respond to to_str is extended by Output, - # to prevent users from misuse. Use Module#remove_method to disable. - # - # source://coderay//lib/coderay/encoders/html/output.rb#22 - def extended(o); end - - # source://coderay//lib/coderay/encoders/html/output.rb#26 - def make_stylesheet(css, in_tag = T.unsafe(nil)); end - - # source://coderay//lib/coderay/encoders/html/output.rb#36 - def page_template_for_css(css); end - end -end - -# source://coderay//lib/coderay/encoders/html/output.rb#117 -CodeRay::Encoders::HTML::Output::DIV = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) - -# source://coderay//lib/coderay/encoders/html/output.rb#130 -CodeRay::Encoders::HTML::Output::PAGE = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) - -# source://coderay//lib/coderay/encoders/html/output.rb#115 -CodeRay::Encoders::HTML::Output::SPAN = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) - -# source://coderay//lib/coderay/encoders/html/output.rb#123 -CodeRay::Encoders::HTML::Output::TABLE = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) - -# -- don't include the templates in docu -# -# source://coderay//lib/coderay/encoders/html/output.rb#92 -class CodeRay::Encoders::HTML::Output::Template < ::String - # source://coderay//lib/coderay/encoders/html/output.rb#104 - def apply(target, replacement); end - - class << self - # source://coderay//lib/coderay/encoders/html/output.rb#94 - def wrap!(str, template, target); end - end -end - -# source://coderay//lib/coderay/encoders/html.rb#146 -CodeRay::Encoders::HTML::TOKEN_KIND_TO_INFO = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/html.rb#150 -CodeRay::Encoders::HTML::TRANSPARENT_TOKEN_KINDS = T.let(T.unsafe(nil), Set) - -# A simple JSON Encoder. -# -# Example: -# CodeRay.scan('puts "Hello world!"', :ruby).json -# yields -# [ -# {"type"=>"text", "text"=>"puts", "kind"=>"ident"}, -# {"type"=>"text", "text"=>" ", "kind"=>"space"}, -# {"type"=>"block", "action"=>"open", "kind"=>"string"}, -# {"type"=>"text", "text"=>"\"", "kind"=>"delimiter"}, -# {"type"=>"text", "text"=>"Hello world!", "kind"=>"content"}, -# {"type"=>"text", "text"=>"\"", "kind"=>"delimiter"}, -# {"type"=>"block", "action"=>"close", "kind"=>"string"}, -# ] -# -# source://coderay//lib/coderay/encoders/json.rb#18 -class CodeRay::Encoders::JSON < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/json.rb#64 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/json.rb#72 - def begin_line(kind); end - - # source://coderay//lib/coderay/encoders/json.rb#68 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/json.rb#76 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/json.rb#60 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/json.rb#49 - def append(data); end - - # source://coderay//lib/coderay/encoders/json.rb#45 - def finish(options); end - - # source://coderay//lib/coderay/encoders/json.rb#38 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/json.rb#35 -CodeRay::Encoders::JSON::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# Counts the LoC (Lines of Code). Returns an Integer >= 0. -# -# Alias: +loc+ -# -# Everything that is not comment, markup, doctype/shebang, or an empty line, -# is considered to be code. -# -# For example, -# * HTML files not containing JavaScript have 0 LoC -# * in a Java class without comments, LoC is the number of non-empty lines -# -# A Scanner class should define the token kinds that are not code in the -# KINDS_NOT_LOC constant, which defaults to [:comment, :doctype]. -# -# source://coderay//lib/coderay/encoders/lines_of_code.rb#17 -class CodeRay::Encoders::LinesOfCode < ::CodeRay::Encoders::TokenKindFilter - protected - - # source://coderay//lib/coderay/encoders/lines_of_code.rb#38 - def finish(options); end - - # source://coderay//lib/coderay/encoders/lines_of_code.rb#25 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/lines_of_code.rb#21 -CodeRay::Encoders::LinesOfCode::NON_EMPTY_LINE = T.let(T.unsafe(nil), Regexp) - -# = Lint Encoder -# -# Checks for: -# -# - empty tokens -# - incorrect nesting -# -# It will raise an InvalidTokenStream exception when any of the above occurs. -# -# See also: Encoders::DebugLint -# -# source://coderay//lib/coderay/encoders/lint.rb#14 -class CodeRay::Encoders::Lint < ::CodeRay::Encoders::Debug - # source://coderay//lib/coderay/encoders/lint.rb#28 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/lint.rb#37 - def begin_line(kind); end - - # @raise [IncorrectTokenGroupNesting] - # - # source://coderay//lib/coderay/encoders/lint.rb#32 - def end_group(kind); end - - # @raise [IncorrectTokenGroupNesting] - # - # source://coderay//lib/coderay/encoders/lint.rb#41 - def end_line(kind); end - - # @raise [EmptyToken] - # - # source://coderay//lib/coderay/encoders/lint.rb#23 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/lint.rb#52 - def finish(options); end - - # source://coderay//lib/coderay/encoders/lint.rb#48 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/lint.rb#19 -class CodeRay::Encoders::Lint::EmptyToken < ::CodeRay::Encoders::Lint::InvalidTokenStream; end - -# source://coderay//lib/coderay/encoders/lint.rb#21 -class CodeRay::Encoders::Lint::IncorrectTokenGroupNesting < ::CodeRay::Encoders::Lint::InvalidTokenStream; end - -# source://coderay//lib/coderay/encoders/lint.rb#18 -class CodeRay::Encoders::Lint::InvalidTokenStream < ::StandardError; end - -# source://coderay//lib/coderay/encoders/lint.rb#20 -class CodeRay::Encoders::Lint::UnknownTokenKind < ::CodeRay::Encoders::Lint::InvalidTokenStream; end - -# = Null Encoder -# -# Does nothing and returns an empty string. -# -# source://coderay//lib/coderay/encoders/null.rb#7 -class CodeRay::Encoders::Null < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/null.rb#11 - def text_token(text, kind); end -end - -# Wraps the output into a HTML page, using CSS classes and -# line numbers in the table format by default. -# -# See Encoders::HTML for available options. -# -# source://coderay//lib/coderay/encoders/page.rb#10 -class CodeRay::Encoders::Page < ::CodeRay::Encoders::HTML; end - -# source://coderay//lib/coderay/encoders/page.rb#16 -CodeRay::Encoders::Page::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/page.rb#12 -CodeRay::Encoders::Page::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# Wraps HTML output into a SPAN element, using inline styles by default. -# -# See Encoders::HTML for available options. -# -# source://coderay//lib/coderay/encoders/span.rb#9 -class CodeRay::Encoders::Span < ::CodeRay::Encoders::HTML; end - -# source://coderay//lib/coderay/encoders/span.rb#15 -CodeRay::Encoders::Span::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/span.rb#11 -CodeRay::Encoders::Span::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# Makes a statistic for the given tokens. -# -# Alias: +stats+ -# -# source://coderay//lib/coderay/encoders/statistic.rb#7 -class CodeRay::Encoders::Statistic < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/statistic.rb#70 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/statistic.rb#78 - def begin_line(kind); end - - # source://coderay//lib/coderay/encoders/statistic.rb#86 - def block_token(action, kind); end - - # source://coderay//lib/coderay/encoders/statistic.rb#74 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/statistic.rb#82 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/statistic.rb#11 - def real_token_count; end - - # source://coderay//lib/coderay/encoders/statistic.rb#62 - def text_token(text, kind); end - - # source://coderay//lib/coderay/encoders/statistic.rb#11 - def type_stats; end - - protected - - # source://coderay//lib/coderay/encoders/statistic.rb#42 - def finish(options); end - - # source://coderay//lib/coderay/encoders/statistic.rb#17 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/statistic.rb#24 -CodeRay::Encoders::Statistic::STATS = T.let(T.unsafe(nil), String) - -# source://coderay//lib/coderay/encoders/statistic.rb#38 -CodeRay::Encoders::Statistic::TOKEN_TYPES_ROW = T.let(T.unsafe(nil), String) - -# source://coderay//lib/coderay/encoders/statistic.rb#13 -class CodeRay::Encoders::Statistic::TypeStats < ::Struct - # Returns the value of attribute count - # - # @return [Object] the current value of count - def count; end - - # Sets the attribute count - # - # @param value [Object] the value to set the attribute count to. - # @return [Object] the newly set value - def count=(_); end - - # Returns the value of attribute size - # - # @return [Object] the current value of size - def size; end - - # Sets the attribute size - # - # @param value [Object] the value to set the attribute size to. - # @return [Object] the newly set value - def size=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://coderay//lib/coderay/encoders/terminal.rb#17 -class CodeRay::Encoders::Terminal < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/terminal.rb#156 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/terminal.rb#156 - def begin_line(kind); end - - # source://coderay//lib/coderay/encoders/terminal.rb#162 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/terminal.rb#172 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/terminal.rb#141 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/terminal.rb#133 - def setup(options); end - - private - - # source://coderay//lib/coderay/encoders/terminal.rb#179 - def open_token(kind); end -end - -# source://coderay//lib/coderay/encoders/terminal.rb#21 -CodeRay::Encoders::Terminal::TOKEN_COLORS = T.let(T.unsafe(nil), Hash) - -# Concats the tokens into a single string, resulting in the original -# code string if no tokens were removed. -# -# Alias: +plain+, +plaintext+ -# -# == Options -# -# === :separator -# A separator string to join the tokens. -# -# Default: empty String -# -# source://coderay//lib/coderay/encoders/text.rb#15 -class CodeRay::Encoders::Text < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/text.rb#25 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/text.rb#36 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/text.rb#21 -CodeRay::Encoders::Text::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/text.rb#19 -CodeRay::Encoders::Text::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# A Filter that selects tokens based on their token kind. -# -# == Options -# -# === :exclude -# -# One or many symbols (in an Array) which shall be excluded. -# -# Default: [] -# -# === :include -# -# One or many symbols (in an array) which shall be included. -# -# Default: :all, which means all tokens are included. -# -# Exclusion wins over inclusion. -# -# See also: CommentFilter -# -# source://coderay//lib/coderay/encoders/token_kind_filter.rb#25 -class CodeRay::Encoders::TokenKindFilter < ::CodeRay::Encoders::Filter - # Add the token group to the output stream if +kind+ matches the - # conditions. - # - # If it does not, all tokens inside the group are excluded from the - # stream, even if their kinds match. - # - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#66 - def begin_group(kind); end - - # See +begin_group+. - # - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#77 - def begin_line(kind); end - - # Take care of re-enabling the delegation of tokens to the output stream - # if an exluded group has ended. - # - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#89 - def end_group(kind); end - - # See +end_group+. - # - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#99 - def end_line(kind); end - - # Add the token to the output stream if +kind+ matches the conditions. - # - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#57 - def text_token(text, kind); end - - protected - - # @return [Boolean] - # - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#49 - def include_group?(kind); end - - # @return [Boolean] - # - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#45 - def include_text_token?(text, kind); end - - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#35 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/token_kind_filter.rb#29 -CodeRay::Encoders::TokenKindFilter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# = XML Encoder -# -# Uses REXML. Very slow. -# -# source://coderay//lib/coderay/encoders/xml.rb#7 -class CodeRay::Encoders::XML < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/xml.rb#58 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/xml.rb#62 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/xml.rb#38 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/xml.rb#31 - def finish(options); end - - # source://coderay//lib/coderay/encoders/xml.rb#22 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/xml.rb#15 -CodeRay::Encoders::XML::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/xml.rb#11 -CodeRay::Encoders::XML::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# = YAML Encoder -# -# Slow. -# -# source://coderay//lib/coderay/encoders/yaml.rb#9 -class CodeRay::Encoders::YAML < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/yaml.rb#31 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/yaml.rb#39 - def begin_line(kind); end - - # source://coderay//lib/coderay/encoders/yaml.rb#35 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/yaml.rb#43 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/yaml.rb#27 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/yaml.rb#22 - def finish(options); end - - # source://coderay//lib/coderay/encoders/yaml.rb#16 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/yaml.rb#13 -CodeRay::Encoders::YAML::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# = FileType -# -# A simple filetype recognizer. -# -# == Usage -# -# # determine the type of the given -# lang = FileType[file_name] -# -# # return :text if the file type is unknown -# lang = FileType.fetch file_name, :text -# -# # try the shebang line, too -# lang = FileType.fetch file_name, :text, true -# -# source://coderay//lib/coderay/helpers/file_type.rb#17 -module CodeRay::FileType - class << self - # Try to determine the file type of the file. - # - # +filename+ is a relative or absolute path to a file. - # - # The file itself is only accessed when +read_shebang+ is set to true. - # That means you can get filetypes from files that don't exist. - # - # source://coderay//lib/coderay/helpers/file_type.rb#29 - def [](filename, read_shebang = T.unsafe(nil)); end - - # This works like Hash#fetch. - # - # If the filetype cannot be found, the +default+ value - # is returned. - # - # source://coderay//lib/coderay/helpers/file_type.rb#50 - def fetch(filename, default = T.unsafe(nil), read_shebang = T.unsafe(nil)); end - - protected - - # source://coderay//lib/coderay/helpers/file_type.rb#66 - def type_from_shebang(filename); end - end -end - -# source://coderay//lib/coderay/helpers/file_type.rb#79 -CodeRay::FileType::TypeFromExt = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/helpers/file_type.rb#139 -CodeRay::FileType::TypeFromName = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/helpers/file_type.rb#137 -CodeRay::FileType::TypeFromShebang = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/helpers/file_type.rb#19 -class CodeRay::FileType::UnknownFileType < ::Exception; end - -# = Plugin -# -# Plugins have to include this module. -# -# IMPORTANT: Use extend for this module. -# -# See CodeRay::PluginHost for examples. -# -# source://coderay//lib/coderay/helpers/plugin.rb#10 -module CodeRay::Plugin - # source://coderay//lib/coderay/helpers/plugin.rb#46 - def aliases; end - - # The PluginHost for this Plugin class. - # - # source://coderay//lib/coderay/helpers/plugin.rb#39 - def plugin_host(host = T.unsafe(nil)); end - - # Returns the value of attribute plugin_id. - # - # source://coderay//lib/coderay/helpers/plugin.rb#12 - def plugin_id; end - - # Register this class for the given +id+. - # - # Example: - # class MyPlugin < PluginHost::BaseClass - # register_for :my_id - # ... - # end - # - # See PluginHost.register. - # - # source://coderay//lib/coderay/helpers/plugin.rb#23 - def register_for(id); end - - # Returns the title of the plugin, or sets it to the - # optional argument +title+. - # - # source://coderay//lib/coderay/helpers/plugin.rb#30 - def title(title = T.unsafe(nil)); end -end - -# = PluginHost -# -# A simple subclass/subfolder plugin system. -# -# Example: -# class Generators -# extend PluginHost -# plugin_path 'app/generators' -# end -# -# class Generator -# extend Plugin -# PLUGIN_HOST = Generators -# end -# -# class FancyGenerator < Generator -# register_for :fancy -# end -# -# Generators[:fancy] #-> FancyGenerator -# # or -# CodeRay.require_plugin 'Generators/fancy' -# # or -# Generators::Fancy -# -# source://coderay//lib/coderay/helpers/plugin_host.rb#27 -module CodeRay::PluginHost - # Returns the Plugin for +id+. - # - # Example: - # yaml_plugin = MyPluginHost[:yaml] - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#49 - def [](id, *args, &blk); end - - # Returns an array of all Plugins. - # - # Note: This loads all plugins using load_all. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#151 - def all_plugins; end - - # Tries to +load+ the missing plugin by translating +const+ to the - # underscore form (eg. LinesOfCode becomes lines_of_code). - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#61 - def const_missing(const); end - - # Define the default plugin to use when no plugin is found - # for a given id, or return the default plugin. - # - # See also map. - # - # class MyColorHost < PluginHost - # map :navy => :dark_blue - # default :gray - # end - # - # MyColorHost.default # loads and returns the Gray plugin - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#114 - def default(id = T.unsafe(nil)); end - - # Returns an array of all .rb files in the plugin path. - # - # The extension .rb is not included. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#140 - def list; end - - # Returns the Plugin for +id+. - # - # Example: - # yaml_plugin = MyPluginHost[:yaml] - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#49 - def load(id, *args, &blk); end - - # Loads all plugins using list and load. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#39 - def load_all; end - - # Loads the map file (see map). - # - # This is done automatically when plugin_path is called. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#159 - def load_plugin_map; end - - # Map a plugin_id to another. - # - # Usage: Put this in a file plugin_path/_map.rb. - # - # class MyColorHost < PluginHost - # map :navy => :dark_blue, - # :maroon => :brown, - # :luna => :moon - # end - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#95 - def map(hash); end - - # A Hash of plugion_id => Plugin pairs. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#133 - def plugin_hash; end - - # The path where the plugins can be found. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#79 - def plugin_path(*args); end - - # Every plugin must register itself for +id+ by calling register_for, - # which calls this method. - # - # See Plugin#register_for. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#128 - def register(plugin, id); end - - protected - - # Return a plugin hash that automatically loads plugins. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#172 - def make_plugin_hash; end - - # Returns the expected path to the plugin file for the given id. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#196 - def path_to(plugin_id); end - - # Converts +id+ to a valid plugin ID String, or returns +nil+. - # - # Raises +ArgumentError+ for all other objects, or if the - # given String includes non-alphanumeric characters (\W). - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#204 - def validate_id(id); end - - class << self - # Adds the module/class to the PLUGIN_HOSTS list. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#72 - def extended(mod); end - end -end - -# source://coderay//lib/coderay/helpers/plugin_host.rb#33 -class CodeRay::PluginHost::HostNotFound < ::LoadError; end - -# source://coderay//lib/coderay/helpers/plugin_host.rb#35 -CodeRay::PluginHost::PLUGIN_HOSTS = T.let(T.unsafe(nil), Array) - -# dummy hash -# -# source://coderay//lib/coderay/helpers/plugin_host.rb#36 -CodeRay::PluginHost::PLUGIN_HOSTS_BY_ID = T.let(T.unsafe(nil), Hash) - -# Raised if Encoders::[] fails because: -# * a file could not be found -# * the requested Plugin is not registered -# -# source://coderay//lib/coderay/helpers/plugin_host.rb#32 -class CodeRay::PluginHost::PluginNotFound < ::LoadError; end - -# = Scanners -# -# This module holds the Scanner class and its subclasses. -# For example, the Ruby scanner is named CodeRay::Scanners::Ruby -# can be found in coderay/scanners/ruby. -# -# Scanner also provides methods and constants for the register -# mechanism and the [] method that returns the Scanner class -# belonging to the given lang. -# -# See PluginHost. -# -# source://coderay//lib/coderay/scanners.rb#18 -module CodeRay::Scanners - extend ::CodeRay::PluginHost -end - -# Scanner for C. -# -# source://coderay//lib/coderay/scanners/c.rb#5 -class CodeRay::Scanners::C < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/c.rb#44 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/c.rb#27 -CodeRay::Scanners::C::DIRECTIVES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/c.rb#39 -CodeRay::Scanners::C::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/c.rb#33 -CodeRay::Scanners::C::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/c.rb#10 -CodeRay::Scanners::C::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/c.rb#23 -CodeRay::Scanners::C::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/c.rb#17 -CodeRay::Scanners::C::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/c.rb#40 -CodeRay::Scanners::C::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# Scanner for C++. -# -# Aliases: +cplusplus+, c++ -CodeRay::Scanners::CPlusPlus = CodeRay::Scanners::Text - -# source://coderay//lib/coderay/scanners/css.rb#4 -class CodeRay::Scanners::CSS < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/css.rb#55 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/css.rb#50 - def setup; end -end - -# source://coderay//lib/coderay/scanners/css.rb#8 -CodeRay::Scanners::CSS::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/css.rb#16 -module CodeRay::Scanners::CSS::RE; end - -# source://coderay//lib/coderay/scanners/css.rb#31 -CodeRay::Scanners::CSS::RE::AtKeyword = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#45 -CodeRay::Scanners::CSS::RE::AttributeSelector = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#43 -CodeRay::Scanners::CSS::RE::Class = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#38 -CodeRay::Scanners::CSS::RE::Dimension = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#19 -CodeRay::Scanners::CSS::RE::Escape = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#40 -CodeRay::Scanners::CSS::RE::Function = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#17 -CodeRay::Scanners::CSS::RE::Hex = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#26 -CodeRay::Scanners::CSS::RE::HexColor = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#42 -CodeRay::Scanners::CSS::RE::Id = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#30 -CodeRay::Scanners::CSS::RE::Ident = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#20 -CodeRay::Scanners::CSS::RE::NMChar = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#21 -CodeRay::Scanners::CSS::RE::NMStart = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#29 -CodeRay::Scanners::CSS::RE::Name = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#28 -CodeRay::Scanners::CSS::RE::Num = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#32 -CodeRay::Scanners::CSS::RE::Percentage = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#44 -CodeRay::Scanners::CSS::RE::PseudoClass = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#24 -CodeRay::Scanners::CSS::RE::String = T.let(T.unsafe(nil), Regexp) - -# TODO: buggy regexp -# -# source://coderay//lib/coderay/scanners/css.rb#22 -CodeRay::Scanners::CSS::RE::String1 = T.let(T.unsafe(nil), Regexp) - -# TODO: buggy regexp -# -# source://coderay//lib/coderay/scanners/css.rb#23 -CodeRay::Scanners::CSS::RE::String2 = T.let(T.unsafe(nil), Regexp) - -# differs from standard because it allows uppercase hex too -# -# source://coderay//lib/coderay/scanners/css.rb#18 -CodeRay::Scanners::CSS::RE::Unicode = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#36 -CodeRay::Scanners::CSS::RE::Unit = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#6 -class CodeRay::Scanners::Clojure < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/clojure.rb#145 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/clojure.rb#95 -CodeRay::Scanners::Clojure::BASIC_IDENTIFIER = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#133 -CodeRay::Scanners::Clojure::COMPLEX10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#134 -CodeRay::Scanners::Clojure::COMPLEX16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#136 -CodeRay::Scanners::Clojure::COMPLEX2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#135 -CodeRay::Scanners::Clojure::COMPLEX8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#16 -CodeRay::Scanners::Clojure::CORE_FORMS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/clojure.rb#120 -CodeRay::Scanners::Clojure::DECIMAL = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#98 -CodeRay::Scanners::Clojure::DIGIT = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#99 -CodeRay::Scanners::Clojure::DIGIT10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#100 -CodeRay::Scanners::Clojure::DIGIT16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#102 -CodeRay::Scanners::Clojure::DIGIT2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#101 -CodeRay::Scanners::Clojure::DIGIT8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#107 -CodeRay::Scanners::Clojure::EXACTNESS = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#110 -CodeRay::Scanners::Clojure::EXP = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#109 -CodeRay::Scanners::Clojure::EXP_MARK = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#96 -CodeRay::Scanners::Clojure::IDENTIFIER = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#85 -CodeRay::Scanners::Clojure::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/clojure.rb#129 -CodeRay::Scanners::Clojure::IMAG10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#130 -CodeRay::Scanners::Clojure::IMAG16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#132 -CodeRay::Scanners::Clojure::IMAG2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#131 -CodeRay::Scanners::Clojure::IMAG8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#90 -CodeRay::Scanners::Clojure::KEYWORD_NEXT_TOKEN_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/clojure.rb#141 -CodeRay::Scanners::Clojure::NUM = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#137 -CodeRay::Scanners::Clojure::NUM10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#138 -CodeRay::Scanners::Clojure::NUM16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#140 -CodeRay::Scanners::Clojure::NUM2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#139 -CodeRay::Scanners::Clojure::NUM8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#78 -CodeRay::Scanners::Clojure::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/clojure.rb#112 -CodeRay::Scanners::Clojure::PREFIX10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#113 -CodeRay::Scanners::Clojure::PREFIX16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#115 -CodeRay::Scanners::Clojure::PREFIX2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#114 -CodeRay::Scanners::Clojure::PREFIX8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#106 -CodeRay::Scanners::Clojure::RADIX10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#103 -CodeRay::Scanners::Clojure::RADIX16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#105 -CodeRay::Scanners::Clojure::RADIX2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#104 -CodeRay::Scanners::Clojure::RADIX8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#125 -CodeRay::Scanners::Clojure::REAL10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#126 -CodeRay::Scanners::Clojure::REAL16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#128 -CodeRay::Scanners::Clojure::REAL2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#127 -CodeRay::Scanners::Clojure::REAL8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#108 -CodeRay::Scanners::Clojure::SIGN = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#11 -CodeRay::Scanners::Clojure::SPECIAL_FORMS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/clojure.rb#111 -CodeRay::Scanners::Clojure::SUFFIX = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#97 -CodeRay::Scanners::Clojure::SYMBOL = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#116 -CodeRay::Scanners::Clojure::UINT10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#117 -CodeRay::Scanners::Clojure::UINT16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#119 -CodeRay::Scanners::Clojure::UINT2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#118 -CodeRay::Scanners::Clojure::UINT8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#121 -CodeRay::Scanners::Clojure::UREAL10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#122 -CodeRay::Scanners::Clojure::UREAL16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#124 -CodeRay::Scanners::Clojure::UREAL2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#123 -CodeRay::Scanners::Clojure::UREAL8 = T.let(T.unsafe(nil), Regexp) - -# = Debug Scanner -# -# Interprets the output of the Encoders::Debug encoder (basically the inverse function). -# -# source://coderay//lib/coderay/scanners/debug.rb#9 -class CodeRay::Scanners::Debug < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/debug.rb#21 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/debug.rb#16 - def setup; end -end - -# Scanner for the Delphi language (Object Pascal). -# -# Alias: +pascal+ -# -# source://coderay//lib/coderay/scanners/delphi.rb#7 -class CodeRay::Scanners::Delphi < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/delphi.rb#45 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/delphi.rb#25 -CodeRay::Scanners::Delphi::DIRECTIVES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/delphi.rb#36 -CodeRay::Scanners::Delphi::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) - -# source://coderay//lib/coderay/scanners/delphi.rb#12 -CodeRay::Scanners::Delphi::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/delphi.rb#40 -CodeRay::Scanners::Delphi::NAME_FOLLOWS = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) - -# Scanner for output of the diff command. -# -# Alias: +patch+ -# -# source://coderay//lib/coderay/scanners/diff.rb#7 -class CodeRay::Scanners::Diff < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/diff.rb#19 - def scan_tokens(encoder, options); end - - private - - # source://coderay//lib/coderay/scanners/diff.rb#204 - def diff(a, b); end -end - -# source://coderay//lib/coderay/scanners/diff.rb#12 -CodeRay::Scanners::Diff::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# Scanner for HTML ERB templates. -# -# source://coderay//lib/coderay/scanners/erb.rb#8 -class CodeRay::Scanners::ERB < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/erb.rb#38 - def reset_instance; end - - # source://coderay//lib/coderay/scanners/erb.rb#43 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/erb.rb#33 - def setup; end -end - -# source://coderay//lib/coderay/scanners/erb.rb#15 -CodeRay::Scanners::ERB::ERB_RUBY_BLOCK = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/erb.rb#13 -CodeRay::Scanners::ERB::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/erb.rb#27 -CodeRay::Scanners::ERB::START_OF_ERB = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/go.rb#4 -class CodeRay::Scanners::Go < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/go.rb#50 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/go.rb#45 -CodeRay::Scanners::Go::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/go.rb#39 -CodeRay::Scanners::Go::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# http://golang.org/ref/spec#Keywords -# -# source://coderay//lib/coderay/scanners/go.rb#10 -CodeRay::Scanners::Go::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/go.rb#29 -CodeRay::Scanners::Go::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/go.rb#34 -CodeRay::Scanners::Go::PREDEFINED_FUNCTIONS = T.let(T.unsafe(nil), Array) - -# http://golang.org/ref/spec#Types -# -# source://coderay//lib/coderay/scanners/go.rb#19 -CodeRay::Scanners::Go::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/go.rb#46 -CodeRay::Scanners::Go::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# Scanner for Groovy. -# -# source://coderay//lib/coderay/scanners/groovy.rb#7 -class CodeRay::Scanners::Groovy < ::CodeRay::Scanners::Java - protected - - # source://coderay//lib/coderay/scanners/groovy.rb#43 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/groovy.rb#39 - def setup; end -end - -# source://coderay//lib/coderay/scanners/groovy.rb#24 -CodeRay::Scanners::Groovy::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# TODO: check list of keywords -# -# source://coderay//lib/coderay/scanners/groovy.rb#12 -CodeRay::Scanners::Groovy::GROOVY_KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/groovy.rb#18 -CodeRay::Scanners::Groovy::GROOVY_MAGIC_VARIABLES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/groovy.rb#20 -CodeRay::Scanners::Groovy::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/groovy.rb#15 -CodeRay::Scanners::Groovy::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/groovy.rb#26 -CodeRay::Scanners::Groovy::REGEXP_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# TODO: interpretation inside ', ", / -# -# source://coderay//lib/coderay/scanners/groovy.rb#29 -CodeRay::Scanners::Groovy::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/groovy.rb#25 -CodeRay::Scanners::Groovy::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/haml.rb#8 -class CodeRay::Scanners::HAML < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/haml.rb#24 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/haml.rb#17 - def setup; end -end - -# source://coderay//lib/coderay/scanners/haml.rb#13 -CodeRay::Scanners::HAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# HTML Scanner -# -# Alias: +xhtml+ -# -# See also: Scanners::XML -# -# source://coderay//lib/coderay/scanners/html.rb#9 -class CodeRay::Scanners::HTML < ::CodeRay::Scanners::Scanner - # source://coderay//lib/coderay/scanners/html.rb#62 - def reset; end - - protected - - # source://coderay//lib/coderay/scanners/html.rb#83 - def scan_css(encoder, code, state = T.unsafe(nil)); end - - # source://coderay//lib/coderay/scanners/html.rb#76 - def scan_java_script(encoder, code); end - - # source://coderay//lib/coderay/scanners/html.rb#90 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/html.rb#70 - def setup; end -end - -# source://coderay//lib/coderay/scanners/html.rb#39 -CodeRay::Scanners::HTML::ATTR_NAME = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/html.rb#42 -CodeRay::Scanners::HTML::ENTITY = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/html.rb#20 -CodeRay::Scanners::HTML::EVENT_ATTRIBUTES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/html.rb#41 -CodeRay::Scanners::HTML::HEX = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/html.rb#35 -CodeRay::Scanners::HTML::IN_ATTRIBUTE = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) - -# source://coderay//lib/coderay/scanners/html.rb#13 -CodeRay::Scanners::HTML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/html.rb#57 -CodeRay::Scanners::HTML::PLAIN_STRING_CONTENT = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/html.rb#40 -CodeRay::Scanners::HTML::TAG_END = T.let(T.unsafe(nil), Regexp) - -# Scanner for JSON (JavaScript Object Notation). -# -# source://coderay//lib/coderay/scanners/json.rb#5 -class CodeRay::Scanners::JSON < ::CodeRay::Scanners::Scanner - protected - - # See http://json.org/ for a definition of the JSON lexic/grammar. - # - # source://coderay//lib/coderay/scanners/json.rb#26 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/json.rb#21 - def setup; end -end - -# source://coderay//lib/coderay/scanners/json.rb#15 -CodeRay::Scanners::JSON::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/json.rb#17 -CodeRay::Scanners::JSON::KEY = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/json.rb#10 -CodeRay::Scanners::JSON::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/json.rb#16 -CodeRay::Scanners::JSON::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# Scanner for Java. -# -# source://coderay//lib/coderay/scanners/java.rb#5 -class CodeRay::Scanners::Java < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/java.rb#51 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/java/builtin_types.rb#4 -module CodeRay::Scanners::Java::BuiltinTypes; end - -# source://coderay//lib/coderay/scanners/java/builtin_types.rb#7 -CodeRay::Scanners::Java::BuiltinTypes::List = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java.rb#19 -CodeRay::Scanners::Java::CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java.rb#25 -CodeRay::Scanners::Java::DIRECTIVES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java.rb#40 -CodeRay::Scanners::Java::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/java.rb#47 -CodeRay::Scanners::Java::IDENT = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/java.rb#30 -CodeRay::Scanners::Java::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html -# -# source://coderay//lib/coderay/scanners/java.rb#12 -CodeRay::Scanners::Java::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java.rb#20 -CodeRay::Scanners::Java::MAGIC_VARIABLES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java.rb#18 -CodeRay::Scanners::Java::RESERVED = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java.rb#42 -CodeRay::Scanners::Java::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/java.rb#21 -CodeRay::Scanners::Java::TYPES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java.rb#41 -CodeRay::Scanners::Java::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# Scanner for JavaScript. -# -# Aliases: +ecmascript+, +ecma_script+, +javascript+ -# -# source://coderay//lib/coderay/scanners/java_script.rb#7 -class CodeRay::Scanners::JavaScript < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/java_script.rb#224 - def reset_instance; end - - # source://coderay//lib/coderay/scanners/java_script.rb#61 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/java_script.rb#57 - def setup; end - - # source://coderay//lib/coderay/scanners/java_script.rb#229 - def xml_scanner; end -end - -# source://coderay//lib/coderay/scanners/java_script.rb#42 -CodeRay::Scanners::JavaScript::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/java_script.rb#36 -CodeRay::Scanners::JavaScript::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# The actual JavaScript keywords. -# -# source://coderay//lib/coderay/scanners/java_script.rb#13 -CodeRay::Scanners::JavaScript::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java_script.rb#24 -CodeRay::Scanners::JavaScript::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/java_script.rb#50 -CodeRay::Scanners::JavaScript::KEY_CHECK_PATTERN = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/java_script.rb#22 -CodeRay::Scanners::JavaScript::MAGIC_VARIABLES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java_script.rb#18 -CodeRay::Scanners::JavaScript::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java_script.rb#44 -CodeRay::Scanners::JavaScript::REGEXP_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# Reserved for future use. -# -# source://coderay//lib/coderay/scanners/java_script.rb#29 -CodeRay::Scanners::JavaScript::RESERVED_WORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java_script.rb#45 -CodeRay::Scanners::JavaScript::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/java_script.rb#43 -CodeRay::Scanners::JavaScript::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# Scanner for the Lua[http://lua.org] programming lanuage. -# -# The language’s complete syntax is defined in -# {the Lua manual}[http://www.lua.org/manual/5.2/manual.html], -# which is what this scanner tries to conform to. -# -# source://coderay//lib/coderay/scanners/lua.rb#11 -class CodeRay::Scanners::Lua < ::CodeRay::Scanners::Scanner - protected - - # CodeRay entry hook. Starts parsing. - # - # source://coderay//lib/coderay/scanners/lua.rb#60 - def scan_tokens(encoder, options); end - - # Scanner initialization. - # - # source://coderay//lib/coderay/scanners/lua.rb#54 - def setup; end -end - -# Automatic token kind selection for normal words. -# -# source://coderay//lib/coderay/scanners/lua.rb#46 -CodeRay::Scanners::Lua::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# Keywords used in Lua. -# -# source://coderay//lib/coderay/scanners/lua.rb#18 -CodeRay::Scanners::Lua::KEYWORDS = T.let(T.unsafe(nil), Array) - -# Constants set by the Lua core. -# -# source://coderay//lib/coderay/scanners/lua.rb#25 -CodeRay::Scanners::Lua::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# The expressions contained in this array are parts of Lua’s `basic' -# library. Although it’s not entirely necessary to load that library, -# it is highly recommended and one would have to provide own implementations -# of some of these expressions if one does not do so. They however aren’t -# keywords, neither are they constants, but nearly predefined, so they -# get tagged as `predefined' rather than anything else. -# -# This list excludes values of form `_UPPERCASE' because the Lua manual -# requires such identifiers to be reserved by Lua anyway and they are -# highlighted directly accordingly, without the need for specific -# identifiers to be listed here. -# -# source://coderay//lib/coderay/scanners/lua.rb#38 -CodeRay::Scanners::Lua::PREDEFINED_EXPRESSIONS = T.let(T.unsafe(nil), Array) - -# Scanner for PHP. -# -# Original by Stefan Walk. -# -# source://coderay//lib/coderay/scanners/php.rb#10 -class CodeRay::Scanners::PHP < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/php.rb#23 - def reset_instance; end - - # source://coderay//lib/coderay/scanners/php.rb#234 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/php.rb#19 - def setup; end -end - -# source://coderay//lib/coderay/scanners/php.rb#15 -CodeRay::Scanners::PHP::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#197 -module CodeRay::Scanners::PHP::RE; end - -# source://coderay//lib/coderay/scanners/php.rb#211 -CodeRay::Scanners::PHP::RE::HTML_INDICATOR = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/php.rb#213 -CodeRay::Scanners::PHP::RE::IDENTIFIER = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/php.rb#216 -CodeRay::Scanners::PHP::RE::OPERATOR = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/php.rb#206 -CodeRay::Scanners::PHP::RE::PHP_END = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/php.rb#199 -CodeRay::Scanners::PHP::RE::PHP_START = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/php.rb#214 -CodeRay::Scanners::PHP::RE::VARIABLE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/php.rb#28 -module CodeRay::Scanners::PHP::Words; end - -# according to http://php.net/quickref.php on 2009-04-21; -# all functions with _ excluded (module functions) and selected additional functions -# -# source://coderay//lib/coderay/scanners/php.rb#50 -CodeRay::Scanners::PHP::Words::BUILTIN_FUNCTIONS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#46 -CodeRay::Scanners::PHP::Words::CLASSES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#145 -CodeRay::Scanners::PHP::Words::CONSTANTS = T.let(T.unsafe(nil), Array) - -# TODO: more built-in PHP functions? -# -# source://coderay//lib/coderay/scanners/php.rb#140 -CodeRay::Scanners::PHP::Words::EXCEPTIONS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#184 -CodeRay::Scanners::PHP::Words::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) - -# according to http://www.php.net/manual/en/reserved.keywords.php -# -# source://coderay//lib/coderay/scanners/php.rb#31 -CodeRay::Scanners::PHP::Words::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#41 -CodeRay::Scanners::PHP::Words::LANGUAGE_CONSTRUCTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#178 -CodeRay::Scanners::PHP::Words::PREDEFINED = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#39 -CodeRay::Scanners::PHP::Words::TYPES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#193 -CodeRay::Scanners::PHP::Words::VARIABLE_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# Scanner for Python. Supports Python 3. -# -# Based on pygments' PythonLexer, see -# http://dev.pocoo.org/projects/pygments/browser/pygments/lexers/agile.py. -# -# source://coderay//lib/coderay/scanners/python.rb#8 -class CodeRay::Scanners::Python < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/python.rb#103 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/python.rb#86 -CodeRay::Scanners::Python::DEF_NEW_STATE = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/python.rb#91 -CodeRay::Scanners::Python::DESCRIPTOR = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/python.rb#97 -CodeRay::Scanners::Python::DOCSTRING_COMING = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/python.rb#65 -CodeRay::Scanners::Python::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/python.rb#57 -CodeRay::Scanners::Python::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/python.rb#13 -CodeRay::Scanners::Python::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/python.rb#64 -CodeRay::Scanners::Python::NAME = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/python.rb#21 -CodeRay::Scanners::Python::OLD_KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/python.rb#68 -CodeRay::Scanners::Python::OPERATOR = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/python.rb#37 -CodeRay::Scanners::Python::PREDEFINED_EXCEPTIONS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/python.rb#25 -CodeRay::Scanners::Python::PREDEFINED_METHODS_AND_TYPES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/python.rb#52 -CodeRay::Scanners::Python::PREDEFINED_VARIABLES_AND_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/python.rb#82 -CodeRay::Scanners::Python::STRING_CONTENT_REGEXP = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/python.rb#78 -CodeRay::Scanners::Python::STRING_DELIMITER_REGEXP = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/python.rb#66 -CodeRay::Scanners::Python::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# = Raydebug Scanner -# -# Highlights the output of the Encoders::Debug encoder. -# -# source://coderay//lib/coderay/scanners/raydebug.rb#9 -class CodeRay::Scanners::Raydebug < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/raydebug.rb#22 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/raydebug.rb#17 - def setup; end -end - -# This scanner is really complex, since Ruby _is_ a complex language! -# -# It tries to highlight 100% of all common code, -# and 90% of strange codes. -# -# It is optimized for HTML highlighting, and is not very useful for -# parsing or pretty printing. -# -# source://coderay//lib/coderay/scanners/ruby.rb#11 -class CodeRay::Scanners::Ruby < ::CodeRay::Scanners::Scanner - # source://coderay//lib/coderay/scanners/ruby.rb#19 - def interpreted_string_state; end - - protected - - # source://coderay//lib/coderay/scanners/ruby.rb#29 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/ruby.rb#25 - def setup; end -end - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#5 -module CodeRay::Scanners::Ruby::Patterns; end - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#72 -CodeRay::Scanners::Ruby::Patterns::BINARY = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#106 -CodeRay::Scanners::Ruby::Patterns::CHARACTER = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#55 -CodeRay::Scanners::Ruby::Patterns::CLASS_VARIABLE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#96 -CodeRay::Scanners::Ruby::Patterns::CONTROL_META_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#132 -CodeRay::Scanners::Ruby::Patterns::DATA = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#69 -CodeRay::Scanners::Ruby::Patterns::DECIMAL = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#102 -CodeRay::Scanners::Ruby::Patterns::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#74 -CodeRay::Scanners::Ruby::Patterns::EXPONENT = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#168 -CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_INTERPRETED = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#161 -CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_KIND = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#160 -CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_START = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#76 -CodeRay::Scanners::Ruby::Patterns::FLOAT_OR_INT = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#75 -CodeRay::Scanners::Ruby::Patterns::FLOAT_SUFFIX = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#57 -CodeRay::Scanners::Ruby::Patterns::GLOBAL_VARIABLE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#116 -CodeRay::Scanners::Ruby::Patterns::HEREDOC_OPEN = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#71 -CodeRay::Scanners::Ruby::Patterns::HEXADECIMAL = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#38 -CodeRay::Scanners::Ruby::Patterns::IDENT = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#28 -CodeRay::Scanners::Ruby::Patterns::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#54 -CodeRay::Scanners::Ruby::Patterns::INSTANCE_VARIABLE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#7 -CodeRay::Scanners::Ruby::Patterns::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#151 -CodeRay::Scanners::Ruby::Patterns::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#32 -CodeRay::Scanners::Ruby::Patterns::KEYWORD_NEW_STATE = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#53 -CodeRay::Scanners::Ruby::Patterns::METHOD_AFTER_DOT = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#40 -CodeRay::Scanners::Ruby::Patterns::METHOD_NAME = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#52 -CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_EX = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#41 -CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_OPERATOR = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#87 -CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_OR_SYMBOL = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#51 -CodeRay::Scanners::Ruby::Patterns::METHOD_SUFFIX = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#77 -CodeRay::Scanners::Ruby::Patterns::NUMERIC = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#56 -CodeRay::Scanners::Ruby::Patterns::OBJECT_VARIABLE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#70 -CodeRay::Scanners::Ruby::Patterns::OCTAL = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#17 -CodeRay::Scanners::Ruby::Patterns::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#58 -CodeRay::Scanners::Ruby::Patterns::PREFIX_VARIABLE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#61 -CodeRay::Scanners::Ruby::Patterns::QUOTE_TO_TYPE = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#67 -CodeRay::Scanners::Ruby::Patterns::REGEXP_MODIFIERS = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#126 -CodeRay::Scanners::Ruby::Patterns::RUBYDOC = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#138 -CodeRay::Scanners::Ruby::Patterns::RUBYDOC_OR_DATA = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#89 -CodeRay::Scanners::Ruby::Patterns::SIMPLE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#79 -CodeRay::Scanners::Ruby::Patterns::SYMBOL = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#142 -CodeRay::Scanners::Ruby::Patterns::VALUE_FOLLOWS = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#59 -CodeRay::Scanners::Ruby::Patterns::VARIABLE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/string_state.rb#8 -class CodeRay::Scanners::Ruby::StringState < ::Struct - # @return [StringState] a new instance of StringState - # - # source://coderay//lib/coderay/scanners/ruby/string_state.rb#48 - def initialize(kind, interpreted, delim, heredoc = T.unsafe(nil)); end - - # source://coderay//lib/coderay/scanners/ruby/string_state.rb#63 - def heredoc_pattern(delim, interpreted, indented); end - - class << self - # source://coderay//lib/coderay/scanners/ruby/string_state.rb#40 - def simple_key_pattern(delim); end - end -end - -# source://coderay//lib/coderay/scanners/ruby/string_state.rb#10 -CodeRay::Scanners::Ruby::StringState::CLOSING_PAREN = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/ruby/string_state.rb#17 -CodeRay::Scanners::Ruby::StringState::STRING_PATTERN = T.let(T.unsafe(nil), Hash) - -# by Josh Goebel -# -# source://coderay//lib/coderay/scanners/sql.rb#5 -class CodeRay::Scanners::SQL < ::CodeRay::Scanners::Scanner - # source://coderay//lib/coderay/scanners/sql.rb#66 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/sql.rb#23 -CodeRay::Scanners::SQL::COMMANDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/sql.rb#38 -CodeRay::Scanners::SQL::DIRECTIVES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/sql.rb#55 -CodeRay::Scanners::SQL::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/sql.rb#46 -CodeRay::Scanners::SQL::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) - -# source://coderay//lib/coderay/scanners/sql.rb#9 -CodeRay::Scanners::SQL::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/sql.rb#18 -CodeRay::Scanners::SQL::OBJECTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/sql.rb#44 -CodeRay::Scanners::SQL::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/sql.rb#36 -CodeRay::Scanners::SQL::PREDEFINED_FUNCTIONS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/sql.rb#28 -CodeRay::Scanners::SQL::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/sql.rb#60 -CodeRay::Scanners::SQL::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/sql.rb#58 -CodeRay::Scanners::SQL::STRING_PREFIXES = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/sql.rb#56 -CodeRay::Scanners::SQL::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# A scanner for Sass. -# -# source://coderay//lib/coderay/scanners/sass.rb#5 -class CodeRay::Scanners::Sass < ::CodeRay::Scanners::CSS - protected - - # source://coderay//lib/coderay/scanners/sass.rb#16 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/sass.rb#12 - def setup; end -end - -# = Scanner -# -# The base class for all Scanners. -# -# It is a subclass of Ruby's great +StringScanner+, which -# makes it easy to access the scanning methods inside. -# -# It is also +Enumerable+, so you can use it like an Array of -# Tokens: -# -# require 'coderay' -# -# c_scanner = CodeRay::Scanners[:c].new "if (*p == '{') nest++;" -# -# for text, kind in c_scanner -# puts text if kind == :operator -# end -# -# # prints: (*==)++; -# -# OK, this is a very simple example :) -# You can also use +map+, +any?+, +find+ and even +sort_by+, -# if you want. -# -# source://coderay//lib/coderay/scanners/scanner.rb#29 -class CodeRay::Scanners::Scanner < ::StringScanner - include ::Enumerable - extend ::CodeRay::Plugin - - # Create a new Scanner. - # - # * +code+ is the input String and is handled by the superclass - # StringScanner. - # * +options+ is a Hash with Symbols as keys. - # It is merged with the default options of the class (you can - # overwrite default options here.) - # - # Else, a Tokens object is used. - # - # @return [Scanner] a new instance of Scanner - # - # source://coderay//lib/coderay/scanners/scanner.rb#125 - def initialize(code = T.unsafe(nil), options = T.unsafe(nil)); end - - # The string in binary encoding. - # - # To be used with #pos, which is the index of the byte the scanner - # will scan next. - # - # source://coderay//lib/coderay/scanners/scanner.rb#218 - def binary_string; end - - # The current column position of the scanner, starting with 1. - # See also: #line. - # - # source://coderay//lib/coderay/scanners/scanner.rb#209 - def column(pos = T.unsafe(nil)); end - - # Traverse the tokens. - # - # source://coderay//lib/coderay/scanners/scanner.rb#192 - def each(&block); end - - # the default file extension for this scanner - # - # source://coderay//lib/coderay/scanners/scanner.rb#160 - def file_extension; end - - # the Plugin ID for this scanner - # - # source://coderay//lib/coderay/scanners/scanner.rb#155 - def lang; end - - # The current line position of the scanner, starting with 1. - # See also: #column. - # - # Beware, this is implemented inefficiently. It should be used - # for debugging only. - # - # source://coderay//lib/coderay/scanners/scanner.rb#202 - def line(pos = T.unsafe(nil)); end - - # Sets back the scanner. Subclasses should redefine the reset_instance - # method instead of this one. - # - # source://coderay//lib/coderay/scanners/scanner.rb#142 - def reset; end - - # Returns the value of attribute state. - # - # source://coderay//lib/coderay/scanners/scanner.rb#44 - def state; end - - # Sets the attribute state - # - # @param value the value to set the attribute state to. - # - # source://coderay//lib/coderay/scanners/scanner.rb#44 - def state=(_arg0); end - - # Set a new string to be scanned. - # - # source://coderay//lib/coderay/scanners/scanner.rb#148 - def string=(code); end - - # Scan the code and returns all tokens in a Tokens object. - # - # source://coderay//lib/coderay/scanners/scanner.rb#165 - def tokenize(source = T.unsafe(nil), options = T.unsafe(nil)); end - - # Cache the result of tokenize. - # - # source://coderay//lib/coderay/scanners/scanner.rb#187 - def tokens; end - - protected - - # Scanner error with additional status information - # - # @raise [ScanError] - # - # source://coderay//lib/coderay/scanners/scanner.rb#314 - def raise_inspect(message, tokens, state = T.unsafe(nil), ambit = T.unsafe(nil), backtrace = T.unsafe(nil)); end - - # source://coderay//lib/coderay/scanners/scanner.rb#289 - def raise_inspect_arguments(message, tokens, state, ambit); end - - # Resets the scanner. - # - # source://coderay//lib/coderay/scanners/scanner.rb#265 - def reset_instance; end - - # Shorthand for scan_until(/\z/). - # This method also avoids a JRuby 1.9 mode bug. - # - # source://coderay//lib/coderay/scanners/scanner.rb#328 - def scan_rest; end - - # This is the central method, and commonly the only one a - # subclass implements. - # - # Subclasses must implement this method; it must return +tokens+ - # and must only use Tokens#<< for storing scanned tokens! - # - # @raise [NotImplementedError] - # - # source://coderay//lib/coderay/scanners/scanner.rb#260 - def scan_tokens(tokens, options); end - - # source://coderay//lib/coderay/scanners/scanner.rb#305 - def scanner_state_info(state); end - - # source://coderay//lib/coderay/scanners/scanner.rb#239 - def set_string_from_source(source); end - - # source://coderay//lib/coderay/scanners/scanner.rb#250 - def set_tokens_from_options(options); end - - # Can be implemented by subclasses to do some initialization - # that has to be done once per instance. - # - # Use reset for initialization that has to be done once per - # scan. - # - # source://coderay//lib/coderay/scanners/scanner.rb#236 - def setup; end - - # source://coderay//lib/coderay/scanners/scanner.rb#322 - def tokens_last(tokens, n); end - - # source://coderay//lib/coderay/scanners/scanner.rb#318 - def tokens_size(tokens); end - - class << self - # The encoding used internally by this scanner. - # - # source://coderay//lib/coderay/scanners/scanner.rb#71 - def encoding(name = T.unsafe(nil)); end - - # The typical filename suffix for this scanner's language. - # - # source://coderay//lib/coderay/scanners/scanner.rb#66 - def file_extension(extension = T.unsafe(nil)); end - - # The lang of this Scanner class, which is equal to its Plugin ID. - # - # source://coderay//lib/coderay/scanners/scanner.rb#76 - def lang; end - - # Normalizes the given code into a string with UNIX newlines, in the - # scanner's internal encoding, with invalid and undefined charachters - # replaced by placeholders. Always returns a new object. - # - # source://coderay//lib/coderay/scanners/scanner.rb#51 - def normalize(code); end - - protected - - # source://coderay//lib/coderay/scanners/scanner.rb#82 - def encode_with_encoding(code, target_encoding); end - - # source://coderay//lib/coderay/scanners/scanner.rb#100 - def guess_encoding(s); end - - # source://coderay//lib/coderay/scanners/scanner.rb#96 - def to_unix(code); end - end -end - -# The default options for all scanner classes. -# -# Define @default_options for subclasses. -# -# source://coderay//lib/coderay/scanners/scanner.rb#40 -CodeRay::Scanners::Scanner::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/scanner.rb#42 -CodeRay::Scanners::Scanner::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/helpers/plugin.rb#41 -CodeRay::Scanners::Scanner::PLUGIN_HOST = CodeRay::Scanners - -# source://coderay//lib/coderay/scanners/scanner.rb#299 -CodeRay::Scanners::Scanner::SCANNER_STATE_INFO = T.let(T.unsafe(nil), String) - -# source://coderay//lib/coderay/scanners/scanner.rb#271 -CodeRay::Scanners::Scanner::SCAN_ERROR_MESSAGE = T.let(T.unsafe(nil), String) - -# Raised if a Scanner fails while scanning -# -# source://coderay//lib/coderay/scanners/scanner.rb#35 -class CodeRay::Scanners::Scanner::ScanError < ::StandardError; end - -# source://coderay//lib/coderay/scanners/taskpaper.rb#4 -class CodeRay::Scanners::Taskpaper < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/taskpaper.rb#11 - def scan_tokens(encoder, options); end -end - -# Scanner for plain text. -# -# Yields just one token of the kind :plain. -# -# Alias: +plaintext+, +plain+ -# -# source://coderay//lib/coderay/scanners/text.rb#9 -class CodeRay::Scanners::Text < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/text.rb#18 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/text.rb#14 -CodeRay::Scanners::Text::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# Scanner for XML. -# -# Currently this is the same scanner as Scanners::HTML. -# -# source://coderay//lib/coderay/scanners/xml.rb#9 -class CodeRay::Scanners::XML < ::CodeRay::Scanners::HTML; end - -# Scanner for YAML. -# -# Based on the YAML scanner from Syntax by Jamis Buck. -# -# source://coderay//lib/coderay/scanners/yaml.rb#7 -class CodeRay::Scanners::YAML < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/yaml.rb#16 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/yaml.rb#12 -CodeRay::Scanners::YAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Symbol) - -# This module holds the Style class and its subclasses. -# -# See Plugin. -# -# source://coderay//lib/coderay/styles.rb#6 -module CodeRay::Styles - extend ::CodeRay::PluginHost -end - -# A colorful theme using CSS 3 colors (with alpha channel). -# -# source://coderay//lib/coderay/styles/alpha.rb#5 -class CodeRay::Styles::Alpha < ::CodeRay::Styles::Style; end - -# source://coderay//lib/coderay/styles/alpha.rb#14 -CodeRay::Styles::Alpha::CSS_MAIN_STYLES = T.let(T.unsafe(nil), String) - -# source://coderay//lib/coderay/styles/alpha.rb#53 -CodeRay::Styles::Alpha::TOKEN_COLORS = T.let(T.unsafe(nil), String) - -# Base class for styles. -# -# Styles are used by Encoders::HTML to colorize tokens. -# -# source://coderay//lib/coderay/styles/style.rb#8 -class CodeRay::Styles::Style - extend ::CodeRay::Plugin -end - -# source://coderay//lib/coderay/styles/style.rb#12 -CodeRay::Styles::Style::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/helpers/plugin.rb#41 -CodeRay::Styles::Style::PLUGIN_HOST = CodeRay::Styles - -# A Hash of all known token kinds and their associated CSS classes. -# -# source://coderay//lib/coderay/token_kinds.rb#4 -CodeRay::TokenKinds = T.let(T.unsafe(nil), Hash) - -# The Tokens class represents a list of tokens returned from -# a Scanner. It's actually just an Array with a few helper methods. -# -# A token itself is not a special object, just two elements in an Array: -# * the _token_ _text_ (the original source of the token in a String) or -# a _token_ _action_ (begin_group, end_group, begin_line, end_line) -# * the _token_ _kind_ (a Symbol representing the type of the token) -# -# It looks like this: -# -# ..., '# It looks like this', :comment, ... -# ..., '3.1415926', :float, ... -# ..., '$^', :error, ... -# -# Some scanners also yield sub-tokens, represented by special -# token actions, for example :begin_group and :end_group. -# -# The Ruby scanner, for example, splits "a string" into: -# -# [ -# :begin_group, :string, -# '"', :delimiter, -# 'a string', :content, -# '"', :delimiter, -# :end_group, :string -# ] -# -# Tokens can be used to save the output of a Scanners in a simple -# Ruby object that can be send to an Encoder later: -# -# tokens = CodeRay.scan('price = 2.59', :ruby).tokens -# tokens.encode(:html) -# tokens.html -# CodeRay.encoder(:html).encode_tokens(tokens) -# -# Tokens gives you the power to handle pre-scanned code very easily: -# You can serialize it to a JSON string and store it in a database, pass it -# around to encode it more than once, send it to other algorithms... -# -# source://coderay//lib/coderay/tokens.rb#41 -class CodeRay::Tokens < ::Array - # source://coderay//lib/coderay/tokens.rb#156 - def begin_group(kind); end - - # source://coderay//lib/coderay/tokens.rb#158 - def begin_line(kind); end - - # Return the actual number of tokens. - # - # source://coderay//lib/coderay/tokens.rb#151 - def count; end - - # Encode the tokens using encoder. - # - # encoder can be - # * a plugin name like :html oder 'statistic' - # * an Encoder object - # - # options are passed to the encoder. - # - # source://coderay//lib/coderay/tokens.rb#56 - def encode(encoder, options = T.unsafe(nil)); end - - # source://coderay//lib/coderay/tokens.rb#157 - def end_group(kind); end - - # source://coderay//lib/coderay/tokens.rb#159 - def end_line(kind); end - - # Redirects unknown methods to encoder calls. - # - # For example, if you call +tokens.html+, the HTML encoder - # is used to highlight the tokens. - # - # source://coderay//lib/coderay/tokens.rb#70 - def method_missing(meth, options = T.unsafe(nil)); end - - # The Scanner instance that created the tokens. - # - # source://coderay//lib/coderay/tokens.rb#47 - def scanner; end - - # The Scanner instance that created the tokens. - # - # source://coderay//lib/coderay/tokens.rb#47 - def scanner=(_arg0); end - - # Split the tokens into parts of the given +sizes+. - # - # The result will be an Array of Tokens objects. The parts have - # the text size specified by the parameter. In addition, each - # part closes all opened tokens. This is useful to insert tokens - # betweem them. - # - # This method is used by @Scanner#tokenize@ when called with an Array - # of source strings. The Diff encoder uses it for inline highlighting. - # - # source://coderay//lib/coderay/tokens.rb#85 - def split_into_parts(*sizes); end - - def text_token(*_arg0); end - - # Turn tokens into a string by concatenating them. - # - # source://coderay//lib/coderay/tokens.rb#62 - def to_s; end - - def tokens(*_arg0); end -end - -# The result of a scan operation is a TokensProxy, but should act like Tokens. -# -# This proxy makes it possible to use the classic CodeRay.scan.encode API -# while still providing the benefits of direct streaming. -# -# source://coderay//lib/coderay/tokens_proxy.rb#7 -class CodeRay::TokensProxy - # Create a new TokensProxy with the arguments of CodeRay.scan. - # - # @return [TokensProxy] a new instance of TokensProxy - # - # source://coderay//lib/coderay/tokens_proxy.rb#12 - def initialize(input, lang, options = T.unsafe(nil), block = T.unsafe(nil)); end - - # Returns the value of attribute block. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def block; end - - # Sets the attribute block - # - # @param value the value to set the attribute block to. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def block=(_arg0); end - - # Overwrite Struct#each. - # - # source://coderay//lib/coderay/tokens_proxy.rb#48 - def each(*args, &blk); end - - # Call CodeRay.encode if +encoder+ is a Symbol; - # otherwise, convert the receiver to tokens and call encoder.encode_tokens. - # - # source://coderay//lib/coderay/tokens_proxy.rb#21 - def encode(encoder, options = T.unsafe(nil)); end - - # Returns the value of attribute input. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def input; end - - # Sets the attribute input - # - # @param value the value to set the attribute input to. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def input=(_arg0); end - - # Returns the value of attribute lang. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def lang; end - - # Sets the attribute lang - # - # @param value the value to set the attribute lang to. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def lang=(_arg0); end - - # Tries to call encode; - # delegates to tokens otherwise. - # - # source://coderay//lib/coderay/tokens_proxy.rb#31 - def method_missing(method, *args, &blk); end - - # Returns the value of attribute options. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def options; end - - # Sets the attribute options - # - # @param value the value to set the attribute options to. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def options=(_arg0); end - - # A (cached) scanner instance to use for the scan task. - # - # source://coderay//lib/coderay/tokens_proxy.rb#43 - def scanner; end - - # The (cached) result of the tokenized input; a Tokens instance. - # - # source://coderay//lib/coderay/tokens_proxy.rb#38 - def tokens; end -end - -# source://coderay//lib/coderay/version.rb#2 -CodeRay::VERSION = T.let(T.unsafe(nil), String) - -# = WordList -# -# A Hash subclass designed for mapping word lists to token types. -# -# A WordList is a Hash with some additional features. -# It is intended to be used for keyword recognition. -# -# WordList is optimized to be used in Scanners, -# typically to decide whether a given ident is a special token. -# -# For case insensitive words use WordList::CaseIgnoring. -# -# Example: -# -# # define word arrays -# RESERVED_WORDS = %w[ -# asm break case continue default do else -# ] -# -# PREDEFINED_TYPES = %w[ -# int long short char void -# ] -# -# # make a WordList -# IDENT_KIND = WordList.new(:ident). -# add(RESERVED_WORDS, :reserved). -# add(PREDEFINED_TYPES, :predefined_type) -# -# ... -# -# def scan_tokens tokens, options -# ... -# -# elsif scan(/[A-Za-z_][A-Za-z_0-9]*/) -# # use it -# kind = IDENT_KIND[match] -# ... -# -# source://coderay//lib/coderay/helpers/word_list.rb#40 -class CodeRay::WordList < ::Hash - # Create a new WordList with +default+ as default value. - # - # @return [WordList] a new instance of WordList - # - # source://coderay//lib/coderay/helpers/word_list.rb#43 - def initialize(default = T.unsafe(nil)); end - - # Add words to the list and associate them with +value+. - # - # Returns +self+, so you can concat add calls. - # - # source://coderay//lib/coderay/helpers/word_list.rb#50 - def add(words, value = T.unsafe(nil)); end -end - -# A CaseIgnoring WordList is like a WordList, only that -# keys are compared case-insensitively (normalizing keys using +downcase+). -# -# source://coderay//lib/coderay/helpers/word_list.rb#60 -class CodeRay::WordList::CaseIgnoring < ::CodeRay::WordList - # source://coderay//lib/coderay/helpers/word_list.rb#62 - def [](key); end - - # source://coderay//lib/coderay/helpers/word_list.rb#66 - def []=(key, value); end -end diff --git a/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi b/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi similarity index 98% rename from sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi rename to sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi index 6c849d14f..e51423a74 100644 --- a/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi +++ b/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi @@ -4131,7 +4131,7 @@ end # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface # @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb#197 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb#201 class Concurrent::FixedThreadPool < ::Concurrent::ThreadPoolExecutor # Create a new thread pool. # @@ -4143,7 +4143,7 @@ class Concurrent::FixedThreadPool < ::Concurrent::ThreadPoolExecutor # @return [FixedThreadPool] a new instance of FixedThreadPool # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool-int- # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb#211 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb#215 def initialize(num_threads, opts = T.unsafe(nil)); end end @@ -4257,7 +4257,7 @@ Concurrent::GLOBAL_TIMER_SET = T.let(T.unsafe(nil), Concurrent::Delay) # # @see http://ruby-doc.org/core/Hash.html Ruby standard library `Hash` # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#47 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#49 class Concurrent::Hash < ::Hash; end # source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#16 @@ -6476,7 +6476,7 @@ class Concurrent::PromiseExecutionError < ::StandardError; end # {include:file:docs-source/promises-main.md} # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#12 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#13 module Concurrent::Promises extend ::Concurrent::Promises::FactoryMethods::Configuration extend ::Concurrent::Promises::FactoryMethods @@ -6484,40 +6484,40 @@ end # @abstract # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2037 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2047 class Concurrent::Promises::AbstractAnyPromise < ::Concurrent::Promises::BlockedPromise; end # Common ancestor of {Event} and {Future} classes, many shared methods are defined here. # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#512 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#513 class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization::Object include ::Concurrent::Promises::InternalStates extend ::Concurrent::Synchronization::SafeInitialization # @return [AbstractEventFuture] a new instance of AbstractEventFuture # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#521 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#522 def initialize(promise, default_executor); end # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 def __initialize_atomic_fields__; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#737 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#738 def add_callback_clear_delayed_node(node); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#732 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#733 def add_callback_notify_blocked(promise, index); end # For inspection. # # @return [Array] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#701 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#702 def blocks; end # For inspection. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#709 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#710 def callbacks; end # Shortcut of {#chain_on} with default `:io` executor supplied. @@ -6525,7 +6525,7 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: # @return [Future] # @see #chain_on # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#595 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#596 def chain(*args, &task); end # Chains the task to be executed asynchronously on executor after it is resolved. @@ -6535,13 +6535,13 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: # @param executor [Executor, :io, :fast] Instance of an executor or a name of the # global executor. The task is executed on it, default executor remains unchanged. # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yeild section). + # (It might be prepended with other arguments, see the @yield section). # @return [Future] # @yieldreturn will become result of the returned Future. # Its returned value becomes {Future#value} fulfilling it, # raised exception becomes {Future#reason} rejecting it. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#613 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#614 def chain_on(executor, *args, &task); end # Resolves the resolvable when receiver is resolved. @@ -6549,7 +6549,7 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: # @param resolvable [Resolvable] # @return [self] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#628 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#629 def chain_resolvable(resolvable); end # Returns default executor. @@ -6561,12 +6561,12 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: # @see FactoryMethods#any_fulfilled_future_on # @see similar # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#589 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#590 def default_executor; end # @return [String] Short string representation. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#618 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#619 def inspect; end # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 @@ -6577,7 +6577,7 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: # @return [self] # @see #on_resolution_using # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#636 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#637 def on_resolution(*args, &callback); end # Stores the callback to be executed synchronously on resolving thread after it is @@ -6586,11 +6586,11 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: # @overload an_event.on_resolution! # @overload a_future.on_resolution! # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yeild section). + # (It might be prepended with other arguments, see the @yield section). # @return [self] # @yieldreturn is forgotten. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#654 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#655 def on_resolution!(*args, &callback); end # Stores the callback to be executed asynchronously on executor after it is resolved. @@ -6600,33 +6600,33 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: # @param executor [Executor, :io, :fast] Instance of an executor or a name of the # global executor. The task is executed on it, default executor remains unchanged. # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yeild section). + # (It might be prepended with other arguments, see the @yield section). # @return [self] # @yieldreturn is forgotten. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#672 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#673 def on_resolution_using(executor, *args, &callback); end # Is it in pending state? # # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#548 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#549 def pending?; end # For inspection. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#715 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#716 def promise; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#687 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#688 def resolve_with(state, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end # Is it in resolved state? # # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#554 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#555 def resolved?; end # Returns its state. @@ -6635,7 +6635,7 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: # @overload a_future.state # @return [Symbol] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#542 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#543 def state; end # Resolves the resolvable when receiver is resolved. @@ -6643,12 +6643,12 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: # @param resolvable [Resolvable] # @return [self] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#628 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#629 def tangle(resolvable); end # @return [String] Short string representation. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#618 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#619 def to_s; end # Propagates touch. Requests all the delayed futures, which it depends on, to be @@ -6656,14 +6656,14 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: # # @return [self] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#561 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#562 def touch; end # For inspection. # # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#721 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#722 def touched?; end # Wait (block the Thread) until receiver is {#resolved?}. @@ -6675,12 +6675,12 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: # @return [self, true, false] self implies timeout was not used, true implies timeout was used # and it was resolved, false implies it was not resolved within timeout. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#577 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#578 def wait(timeout = T.unsafe(nil)); end # For inspection. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#727 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#728 def waiting_threads; end # Crates new object with same class with the executor set as its new default executor. @@ -6692,30 +6692,30 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: # @see Event#with_default_executor # @see Future#with_default_executor # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#682 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#683 def with_default_executor(executor); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#742 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#743 def with_hidden_resolvable; end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#749 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#750 def add_callback(method, *args); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#802 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#812 def async_callback_on_resolution(state, executor, args, callback); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#786 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#796 def call_callback(method, state, args); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#790 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#800 def call_callbacks(state); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#762 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#763 def callback_clear_delayed_node(state, node); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#808 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#818 def callback_notify_blocked(state, promise, index); end # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 @@ -6732,188 +6732,188 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#767 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#768 def wait_until_resolved(timeout); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#798 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#808 def with_async(executor, *args, &block); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1786 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1796 class Concurrent::Promises::AbstractFlatPromise < ::Concurrent::Promises::BlockedPromise # @return [AbstractFlatPromise] a new instance of AbstractFlatPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1788 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1798 def initialize(delayed_because, blockers_count, event_or_future); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1798 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1808 def touch; end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1818 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1828 def add_delayed_of(future); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1810 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1820 def on_resolvable(resolved_future, index); end # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1814 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1824 def resolvable?(countdown, future, index); end # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1806 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1816 def touched?; end end # @abstract # @private # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1539 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1549 class Concurrent::Promises::AbstractPromise < ::Concurrent::Synchronization::Object include ::Concurrent::Promises::InternalStates extend ::Concurrent::Synchronization::SafeInitialization # @return [AbstractPromise] a new instance of AbstractPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1543 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1553 def initialize(future); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1554 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1564 def default_executor; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1571 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1581 def delayed_because; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1548 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1558 def event; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1548 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1558 def future; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1565 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1575 def inspect; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1558 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1568 def state; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1565 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1575 def to_s; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1562 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1572 def touch; end private # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1582 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1592 def evaluate_to(*args, block); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1577 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1587 def resolve_with(new_state, raise_on_reassign = T.unsafe(nil)); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2074 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2084 class Concurrent::Promises::AnyFulfilledFuturePromise < ::Concurrent::Promises::AnyResolvedFuturePromise private # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2078 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2088 def resolvable?(countdown, event_or_future, index); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2040 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2050 class Concurrent::Promises::AnyResolvedEventPromise < ::Concurrent::Promises::AbstractAnyPromise # @return [AnyResolvedEventPromise] a new instance of AnyResolvedEventPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2044 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2054 def initialize(delayed, blockers_count, default_executor); end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2052 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2062 def on_resolvable(resolved_future, index); end # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2048 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2058 def resolvable?(countdown, future, index); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2057 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2067 class Concurrent::Promises::AnyResolvedFuturePromise < ::Concurrent::Promises::AbstractAnyPromise # @return [AnyResolvedFuturePromise] a new instance of AnyResolvedFuturePromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2061 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2071 def initialize(delayed, blockers_count, default_executor); end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2069 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2079 def on_resolvable(resolved_future, index); end # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2065 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2075 def resolvable?(countdown, future, index); end end # @abstract # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1609 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1619 class Concurrent::Promises::BlockedPromise < ::Concurrent::Promises::InnerPromise # @return [BlockedPromise] a new instance of BlockedPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1651 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1661 def initialize(delayed, blockers_count, future); end # for inspection only # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1673 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1683 def blocked_by; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1664 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1674 def delayed_because; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1657 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1667 def on_blocker_resolution(future, index); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1668 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1678 def touch; end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1681 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1691 def clear_and_propagate_touch(stack_or_element = T.unsafe(nil)); end # @raise [NotImplementedError] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1700 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1710 def on_resolvable(resolved_future, index); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1696 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1706 def process_on_blocker_resolution(future, index); end # @return [true, false] if resolvable # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1692 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1702 def resolvable?(countdown, future, index); end class << self - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1642 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1652 def add_delayed(delayed1, delayed2); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1635 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1645 def new_blocked_by(blockers, *args, &block); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1613 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1623 def new_blocked_by1(blocker, *args, &block); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1620 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1630 def new_blocked_by2(blocker1, blocker2, *args, &block); end private @@ -6925,37 +6925,37 @@ end # @abstract # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1706 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1716 class Concurrent::Promises::BlockedTaskPromise < ::Concurrent::Promises::BlockedPromise # @raise [ArgumentError] # @return [BlockedTaskPromise] a new instance of BlockedTaskPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1707 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1717 def initialize(delayed, blockers_count, default_executor, executor, args, &task); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1715 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1725 def executor; end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1756 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1766 class Concurrent::Promises::ChainPromise < ::Concurrent::Promises::BlockedTaskPromise private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1759 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1769 def on_resolvable(resolved_future, index); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2085 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2095 class Concurrent::Promises::DelayPromise < ::Concurrent::Promises::InnerPromise # @return [DelayPromise] a new instance of DelayPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2087 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2097 def initialize(default_executor); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2098 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2108 def delayed_because; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2094 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2104 def touch; end end @@ -6963,7 +6963,7 @@ end # pending or resolved. It should be always resolved. Use {Future} to communicate rejections and # cancellation. # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#816 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#826 class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture # Creates a new event or a future which will be resolved when receiver and other are. # Returns an event if receiver and other are events, otherwise returns a future. @@ -6973,7 +6973,7 @@ class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture # # @return [Future, Event] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#829 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#839 def &(other); end # Creates a new event which will be resolved when the first of receiver, `event_or_future` @@ -6981,7 +6981,7 @@ class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture # # @return [Event] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#843 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#853 def any(event_or_future); end # Creates new event dependent on receiver which will not evaluate until touched, see {#touch}. @@ -6989,7 +6989,7 @@ class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture # # @return [Event] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#853 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#863 def delay; end # Creates new event dependent on receiver scheduled to execute on/in intended_time. @@ -7000,24 +7000,24 @@ class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture # `Time` means to run on `intended_time`. # @return [Event] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#865 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#875 def schedule(intended_time); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#595 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#596 def then(*args, &task); end # Returns self, since this is event # # @return [Event] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#883 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#893 def to_event; end # Converts event to a future. The future is fulfilled when the event is resolved, the future may never fail. # # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#875 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#885 def to_future; end # Crates new object with same class with the executor set as its new default executor. @@ -7025,7 +7025,7 @@ class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture # # @return [Event] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#889 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#899 def with_default_executor(executor); end # Creates a new event or a future which will be resolved when receiver and other are. @@ -7036,7 +7036,7 @@ class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture # # @return [Future, Event] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#829 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#839 def zip(other); end # Creates a new event which will be resolved when the first of receiver, `event_or_future` @@ -7044,37 +7044,37 @@ class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture # # @return [Event] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#843 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#853 def |(event_or_future); end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#900 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#910 def callback_on_resolution(state, args, callback); end # @raise [Concurrent::MultipleAssignmentError] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#895 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#905 def rejected_resolution(raise_on_reassign, state); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1962 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1972 class Concurrent::Promises::EventWrapperPromise < ::Concurrent::Promises::BlockedPromise # @return [EventWrapperPromise] a new instance of EventWrapperPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1963 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1973 def initialize(delayed, blockers_count, default_executor); end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1969 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1979 def on_resolvable(resolved_future, index); end end # Container of all {Future}, {Event} factory methods. They are never constructed directly with # new. # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#45 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#46 module Concurrent::Promises::FactoryMethods include ::Concurrent::Promises::FactoryMethods::Configuration extend ::Concurrent::ReInclude @@ -7086,7 +7086,7 @@ module Concurrent::Promises::FactoryMethods # @return [Future] # @see #any_resolved_future_on # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#277 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#278 def any(*futures_and_or_events); end # Shortcut of {#any_event_on} with default `:io` executor supplied. @@ -7094,10 +7094,10 @@ module Concurrent::Promises::FactoryMethods # @return [Event] # @see #any_event_on # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#318 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#319 def any_event(*futures_and_or_events); end - # Creates new event which becomes resolved after first of the futures_and_or_events resolves. + # Creates a new event which becomes resolved after the first futures_and_or_events resolves. # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed # futures un-executed if they are not required any more. # @@ -7107,7 +7107,7 @@ module Concurrent::Promises::FactoryMethods # @param futures_and_or_events [AbstractEventFuture] # @return [Event] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#328 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#329 def any_event_on(default_executor, *futures_and_or_events); end # Shortcut of {#any_fulfilled_future_on} with default `:io` executor supplied. @@ -7115,12 +7115,12 @@ module Concurrent::Promises::FactoryMethods # @return [Future] # @see #any_fulfilled_future_on # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#299 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#300 def any_fulfilled_future(*futures_and_or_events); end - # Creates new future which is resolved after first of futures_and_or_events is fulfilled. - # Its result equals result of the first resolved future or if all futures_and_or_events reject, - # it has reason of the last resolved future. + # Creates a new future which is resolved after the first futures_and_or_events is fulfilled. + # Its result equals the result of the first resolved future or if all futures_and_or_events reject, + # it has reason of the last rejected future. # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed # futures un-executed if they are not required any more. # If event is supplied, which does not have value and can be only resolved, it's @@ -7132,7 +7132,7 @@ module Concurrent::Promises::FactoryMethods # @param futures_and_or_events [AbstractEventFuture] # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#312 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#313 def any_fulfilled_future_on(default_executor, *futures_and_or_events); end # Shortcut of {#any_resolved_future_on} with default `:io` executor supplied. @@ -7140,11 +7140,11 @@ module Concurrent::Promises::FactoryMethods # @return [Future] # @see #any_resolved_future_on # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#277 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#278 def any_resolved_future(*futures_and_or_events); end - # Creates new future which is resolved after first futures_and_or_events is resolved. - # Its result equals result of the first resolved future. + # Creates a new future which is resolved after the first futures_and_or_events is resolved. + # Its result equals the result of the first resolved future. # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed # futures un-executed if they are not required any more. # If event is supplied, which does not have value and can be only resolved, it's @@ -7156,7 +7156,7 @@ module Concurrent::Promises::FactoryMethods # @param futures_and_or_events [AbstractEventFuture] # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#293 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#294 def any_resolved_future_on(default_executor, *futures_and_or_events); end # Shortcut of {#delay_on} with default `:io` executor supplied. @@ -7164,10 +7164,10 @@ module Concurrent::Promises::FactoryMethods # @return [Future, Event] # @see #delay_on # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#189 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#190 def delay(*args, &task); end - # Creates new event or future which is resolved only after it is touched, + # Creates a new event or future which is resolved only after it is touched, # see {Concurrent::AbstractEventFuture#touch}. # # @overload delay_on @@ -7176,10 +7176,10 @@ module Concurrent::Promises::FactoryMethods # global executor. Default executor propagates to chained futures unless overridden with # executor parameter or changed with {AbstractEventFuture#with_default_executor}. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#206 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#207 def delay_on(default_executor, *args, &task); end - # Creates resolved future with will be fulfilled with the given value. + # Creates a resolved future which will be fulfilled with the given value. # # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the # global executor. Default executor propagates to chained futures unless overridden with @@ -7187,7 +7187,7 @@ module Concurrent::Promises::FactoryMethods # @param value [Object] # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#126 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#127 def fulfilled_future(value, default_executor = T.unsafe(nil)); end # Shortcut of {#future_on} with default `:io` executor supplied. @@ -7195,24 +7195,24 @@ module Concurrent::Promises::FactoryMethods # @return [Future] # @see #future_on # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#93 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#94 def future(*args, &task); end - # Constructs new Future which will be resolved after block is evaluated on default executor. + # Constructs a new Future which will be resolved after block is evaluated on default executor. # Evaluation begins immediately. # # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the # global executor. Default executor propagates to chained futures unless overridden with # executor parameter or changed with {AbstractEventFuture#with_default_executor}. # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yeild section). + # (It might be prepended with other arguments, see the @yield section). # @return [Future] # @yield [*args] to the task. # @yieldreturn will become result of the returned Future. # Its returned value becomes {Future#value} fulfilling it, # raised exception becomes {Future#reason} rejecting it. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#105 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#106 def future_on(default_executor, *args, &task); end # General constructor. Behaves differently based on the argument's type. It's provided for convenience @@ -7229,10 +7229,10 @@ module Concurrent::Promises::FactoryMethods # @return [Event, Future] # @see rejected_future, resolved_event, fulfilled_future # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#173 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#174 def make_future(argument = T.unsafe(nil), default_executor = T.unsafe(nil)); end - # Creates resolved future with will be rejected with the given reason. + # Creates a resolved future which will be rejected with the given reason. # # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the # global executor. Default executor propagates to chained futures unless overridden with @@ -7240,7 +7240,7 @@ module Concurrent::Promises::FactoryMethods # @param reason [Object] # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#135 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#136 def rejected_future(reason, default_executor = T.unsafe(nil)); end # Shortcut of {#resolvable_event_on} with default `:io` executor supplied. @@ -7248,18 +7248,18 @@ module Concurrent::Promises::FactoryMethods # @return [ResolvableEvent] # @see #resolvable_event_on # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#62 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#63 def resolvable_event; end - # Created resolvable event, user is responsible for resolving the event once by - # {Promises::ResolvableEvent#resolve}. + # Creates a resolvable event, user is responsible for resolving the event once + # by calling {Promises::ResolvableEvent#resolve}. # # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the # global executor. Default executor propagates to chained futures unless overridden with # executor parameter or changed with {AbstractEventFuture#with_default_executor}. # @return [ResolvableEvent] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#71 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#72 def resolvable_event_on(default_executor = T.unsafe(nil)); end # Shortcut of {#resolvable_future_on} with default `:io` executor supplied. @@ -7267,7 +7267,7 @@ module Concurrent::Promises::FactoryMethods # @return [ResolvableFuture] # @see #resolvable_future_on # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#77 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#78 def resolvable_future; end # Creates resolvable future, user is responsible for resolving the future once by @@ -7279,7 +7279,7 @@ module Concurrent::Promises::FactoryMethods # executor parameter or changed with {AbstractEventFuture#with_default_executor}. # @return [ResolvableFuture] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#87 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#88 def resolvable_future_on(default_executor = T.unsafe(nil)); end # Creates resolved event. @@ -7289,10 +7289,10 @@ module Concurrent::Promises::FactoryMethods # executor parameter or changed with {AbstractEventFuture#with_default_executor}. # @return [Event] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#143 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#144 def resolved_event(default_executor = T.unsafe(nil)); end - # Creates resolved future with will be either fulfilled with the given value or rejection with + # Creates a resolved future with will be either fulfilled with the given value or rejected with # the given reason. # # @param fulfilled [true, false] @@ -7303,7 +7303,7 @@ module Concurrent::Promises::FactoryMethods # executor parameter or changed with {AbstractEventFuture#with_default_executor}. # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#117 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#118 def resolved_future(fulfilled, value, reason, default_executor = T.unsafe(nil)); end # Shortcut of {#schedule_on} with default `:io` executor supplied. @@ -7311,10 +7311,10 @@ module Concurrent::Promises::FactoryMethods # @return [Future, Event] # @see #schedule_on # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#213 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#214 def schedule(intended_time, *args, &task); end - # Creates new event or future which is resolved in intended_time. + # Creates a new event or future which is resolved in intended_time. # # @overload schedule_on # @overload schedule_on @@ -7324,7 +7324,7 @@ module Concurrent::Promises::FactoryMethods # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. # `Time` means to run on `intended_time`. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#232 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#233 def schedule_on(default_executor, intended_time, *args, &task); end # Shortcut of {#zip_futures_on} with default `:io` executor supplied. @@ -7332,7 +7332,7 @@ module Concurrent::Promises::FactoryMethods # @return [Future] # @see #zip_futures_on # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#239 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#240 def zip(*futures_and_or_events); end # Shortcut of {#zip_events_on} with default `:io` executor supplied. @@ -7340,10 +7340,10 @@ module Concurrent::Promises::FactoryMethods # @return [Event] # @see #zip_events_on # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#261 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#262 def zip_events(*futures_and_or_events); end - # Creates new event which is resolved after all futures_and_or_events are resolved. + # Creates a new event which is resolved after all futures_and_or_events are resolved. # (Future is resolved when fulfilled or rejected.) # # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the @@ -7352,7 +7352,7 @@ module Concurrent::Promises::FactoryMethods # @param futures_and_or_events [AbstractEventFuture] # @return [Event] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#271 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#272 def zip_events_on(default_executor, *futures_and_or_events); end # Shortcut of {#zip_futures_on} with default `:io` executor supplied. @@ -7360,11 +7360,11 @@ module Concurrent::Promises::FactoryMethods # @return [Future] # @see #zip_futures_on # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#239 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#240 def zip_futures(*futures_and_or_events); end - # Creates new future which is resolved after all futures_and_or_events are resolved. - # Its value is array of zipped future values. Its reason is array of reasons for rejection. + # Creates a new future which is resolved after all futures_and_or_events are resolved. + # Its value is an array of zipped future values. Its reason is an array of reasons for rejection. # If there is an error it rejects. # If event is supplied, which does not have value and can be only resolved, it's # represented as `:fulfilled` with value `nil`. @@ -7375,51 +7375,51 @@ module Concurrent::Promises::FactoryMethods # @param futures_and_or_events [AbstractEventFuture] # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#253 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#254 def zip_futures_on(default_executor, *futures_and_or_events); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#49 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#50 module Concurrent::Promises::FactoryMethods::Configuration # @return [Executor, :io, :fast] the executor which is used when none is supplied # to a factory method. The method can be overridden in the receivers of # `include FactoryMethod` # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#53 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#54 def default_executor; end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1830 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1840 class Concurrent::Promises::FlatEventPromise < ::Concurrent::Promises::AbstractFlatPromise # @return [FlatEventPromise] a new instance of FlatEventPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1834 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1844 def initialize(delayed, blockers_count, default_executor); end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1838 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1848 def process_on_blocker_resolution(future, index); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1863 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1873 class Concurrent::Promises::FlatFuturePromise < ::Concurrent::Promises::AbstractFlatPromise # @raise [ArgumentError] # @return [FlatFuturePromise] a new instance of FlatFuturePromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1867 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1877 def initialize(delayed, blockers_count, levels, default_executor); end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1874 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1884 def process_on_blocker_resolution(future, index); end end # Represents a value which will become available in future. May reject with a reason instead, # e.g. when the tasks raises an exception. # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#907 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#917 class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # Creates a new event or a future which will be resolved when receiver and other are. # Returns an event if receiver and other are events, otherwise returns a future. @@ -7429,7 +7429,7 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1060 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1070 def &(other); end # Creates a new event which will be resolved when the first of receiver, `event_or_future` @@ -7438,10 +7438,10 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1075 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1085 def any(event_or_future); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1205 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1215 def apply(args, block); end # Creates new future dependent on receiver which will not evaluate until touched, see {#touch}. @@ -7449,7 +7449,7 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1085 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1095 def delay; end # Allows rejected Future to be risen with `raise` method. @@ -7461,7 +7461,7 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # @raise [Concurrent::Error] when raising not rejected future # @return [Exception] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1003 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1013 def exception(*args); end # Creates new future which will have result of the future returned by receiver. If receiver @@ -7470,7 +7470,7 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # @param level [Integer] how many levels of futures should flatten # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1110 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1120 def flat(level = T.unsafe(nil)); end # Creates new event which will be resolved when the returned event by receiver is. @@ -7478,7 +7478,7 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # # @return [Event] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1120 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1130 def flat_event; end # Creates new future which will have result of the future returned by receiver. If receiver @@ -7487,19 +7487,19 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # @param level [Integer] how many levels of futures should flatten # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1110 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1120 def flat_future(level = T.unsafe(nil)); end # Is it in fulfilled state? # # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#911 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#921 def fulfilled?; end # @return [String] Short string representation. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1225 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1235 def inspect; end # Shortcut of {#on_fulfillment_using} with default `:io` executor supplied. @@ -7507,19 +7507,19 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # @return [self] # @see #on_fulfillment_using # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1126 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1136 def on_fulfillment(*args, &callback); end # Stores the callback to be executed synchronously on resolving thread after it is # fulfilled. Does nothing on rejection. # # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yeild section). + # (It might be prepended with other arguments, see the @yield section). # @return [self] # @yield [value, *args] to the callback. # @yieldreturn is forgotten. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1137 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1147 def on_fulfillment!(*args, &callback); end # Stores the callback to be executed asynchronously on executor after it is @@ -7528,12 +7528,12 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # @param executor [Executor, :io, :fast] Instance of an executor or a name of the # global executor. The task is executed on it, default executor remains unchanged. # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yeild section). + # (It might be prepended with other arguments, see the @yield section). # @return [self] # @yield [value, *args] to the callback. # @yieldreturn is forgotten. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1149 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1159 def on_fulfillment_using(executor, *args, &callback); end # Shortcut of {#on_rejection_using} with default `:io` executor supplied. @@ -7541,19 +7541,19 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # @return [self] # @see #on_rejection_using # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1155 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1165 def on_rejection(*args, &callback); end # Stores the callback to be executed synchronously on resolving thread after it is # rejected. Does nothing on fulfillment. # # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yeild section). + # (It might be prepended with other arguments, see the @yield section). # @return [self] # @yield [reason, *args] to the callback. # @yieldreturn is forgotten. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1166 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1176 def on_rejection!(*args, &callback); end # Stores the callback to be executed asynchronously on executor after it is @@ -7562,12 +7562,12 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # @param executor [Executor, :io, :fast] Instance of an executor or a name of the # global executor. The task is executed on it, default executor remains unchanged. # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yeild section). + # (It might be prepended with other arguments, see the @yield section). # @return [self] # @yield [reason, *args] to the callback. # @yieldreturn is forgotten. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1178 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1188 def on_rejection_using(executor, *args, &callback); end # Returns reason of future's rejection. @@ -7582,14 +7582,14 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # @param timeout_value [Object] a value returned by the method when it times out # @return [Object, timeout_value] the reason, or timeout_value on timeout, or nil on fulfillment. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#956 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#966 def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end # Is it in rejected state? # # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#918 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#928 def rejected?; end # Shortcut of {#rescue_on} with default `:io` executor supplied. @@ -7597,7 +7597,7 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # @return [Future] # @see #rescue_on # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1042 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1052 def rescue(*args, &task); end # Chains the task to be executed asynchronously on executor after it rejects. Does not run @@ -7606,14 +7606,14 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # @param executor [Executor, :io, :fast] Instance of an executor or a name of the # global executor. The task is executed on it, default executor remains unchanged. # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yeild section). + # (It might be prepended with other arguments, see the @yield section). # @return [Future] # @yield [reason, *args] to the task. # @yieldreturn will become result of the returned Future. # Its returned value becomes {Future#value} fulfilling it, # raised exception becomes {Future#reason} rejecting it. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1054 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1064 def rescue_on(executor, *args, &task); end # Returns triplet fulfilled?, value, reason. @@ -7625,7 +7625,7 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # @return [Array(Boolean, Object, Object), nil] triplet of fulfilled?, value, reason, or nil # on timeout. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#971 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#981 def result(timeout = T.unsafe(nil)); end # Allows to use futures as green threads. The receiver has to evaluate to a future which @@ -7646,7 +7646,7 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # which is suppose to continue running. # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1200 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1210 def run(run_test = T.unsafe(nil)); end # Creates new event dependent on receiver scheduled to execute on/in intended_time. @@ -7657,7 +7657,7 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # `Time` means to run on `intended_time`. # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1092 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1102 def schedule(intended_time); end # Shortcut of {#then_on} with default `:io` executor supplied. @@ -7665,7 +7665,7 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # @return [Future] # @see #then_on # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1024 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1034 def then(*args, &task); end # Chains the task to be executed asynchronously on executor after it fulfills. Does not run @@ -7674,33 +7674,33 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # @param executor [Executor, :io, :fast] Instance of an executor or a name of the # global executor. The task is executed on it, default executor remains unchanged. # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yeild section). + # (It might be prepended with other arguments, see the @yield section). # @return [Future] # @yield [value, *args] to the task. # @yieldreturn will become result of the returned Future. # Its returned value becomes {Future#value} fulfilling it, # raised exception becomes {Future#reason} rejecting it. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1036 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1046 def then_on(executor, *args, &task); end # Converts future to event which is resolved when future is resolved by fulfillment or rejection. # # @return [Event] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1212 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1222 def to_event; end # Returns self, since this is a future # # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1220 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1230 def to_future; end # @return [String] Short string representation. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1225 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1235 def to_s; end # Return value of the future. @@ -7717,7 +7717,7 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # timeout_value on timeout, # nil on rejection. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#940 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#950 def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end # Return value of the future. @@ -7735,7 +7735,7 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # or nil on rejection, # or timeout_value on timeout. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#987 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#997 def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end # Wait (block the Thread) until receiver is {#resolved?}. @@ -7748,7 +7748,7 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # @return [self, true, false] self implies timeout was not used, true implies timeout was used # and it was resolved, false implies it was not resolved within timeout. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#977 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#987 def wait!(timeout = T.unsafe(nil)); end # Crates new object with same class with the executor set as its new default executor. @@ -7756,7 +7756,7 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1101 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1111 def with_default_executor(executor); end # Creates a new event or a future which will be resolved when receiver and other are. @@ -7767,7 +7767,7 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1060 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1070 def zip(other); end # Creates a new event which will be resolved when the first of receiver, `event_or_future` @@ -7776,253 +7776,253 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1075 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1085 def |(event_or_future); end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1262 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1272 def async_callback_on_fulfillment(state, executor, args, callback); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1268 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1278 def async_callback_on_rejection(state, executor, args, callback); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1274 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1284 def callback_on_fulfillment(state, args, callback); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1278 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1288 def callback_on_rejection(state, args, callback); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1282 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1292 def callback_on_resolution(state, args, callback); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1241 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1251 def rejected_resolution(raise_on_reassign, state); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1237 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1247 def run_test(v); end # @raise [self] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1256 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1266 def wait_until_resolved!(timeout = T.unsafe(nil)); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1974 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1984 class Concurrent::Promises::FutureWrapperPromise < ::Concurrent::Promises::BlockedPromise # @return [FutureWrapperPromise] a new instance of FutureWrapperPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1975 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1985 def initialize(delayed, blockers_count, default_executor); end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1981 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1991 def on_resolvable(resolved_future, index); end end # will be immediately resolved # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1773 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1783 class Concurrent::Promises::ImmediateEventPromise < ::Concurrent::Promises::InnerPromise # @return [ImmediateEventPromise] a new instance of ImmediateEventPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1774 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1784 def initialize(default_executor); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1779 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1789 class Concurrent::Promises::ImmediateFuturePromise < ::Concurrent::Promises::InnerPromise # @return [ImmediateFuturePromise] a new instance of ImmediateFuturePromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1780 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1790 def initialize(default_executor, fulfilled, value, reason); end end # @abstract # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1605 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1615 class Concurrent::Promises::InnerPromise < ::Concurrent::Promises::AbstractPromise; end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#337 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#338 module Concurrent::Promises::InternalStates; end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#396 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#397 class Concurrent::Promises::InternalStates::Fulfilled < ::Concurrent::Promises::InternalStates::ResolvedWithResult # @return [Fulfilled] a new instance of Fulfilled # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#398 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#399 def initialize(value); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#406 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#407 def apply(args, block); end # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#402 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#403 def fulfilled?; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#414 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#415 def reason; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#418 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#419 def to_sym; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#410 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#411 def value; end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#424 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#425 class Concurrent::Promises::InternalStates::FulfilledArray < ::Concurrent::Promises::InternalStates::Fulfilled - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#425 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#426 def apply(args, block); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#487 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#488 Concurrent::Promises::InternalStates::PENDING = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Pending) -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#458 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#459 class Concurrent::Promises::InternalStates::PartiallyRejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult # @return [PartiallyRejected] a new instance of PartiallyRejected # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#459 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#460 def initialize(value, reason); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#481 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#482 def apply(args, block); end # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#465 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#466 def fulfilled?; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#477 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#478 def reason; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#469 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#470 def to_sym; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#473 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#474 def value; end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#350 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#351 class Concurrent::Promises::InternalStates::Pending < ::Concurrent::Promises::InternalStates::State # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#351 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#352 def resolved?; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#355 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#356 def to_sym; end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#489 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#490 Concurrent::Promises::InternalStates::RESERVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Reserved) -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#491 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#492 Concurrent::Promises::InternalStates::RESOLVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Fulfilled) -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#431 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#432 class Concurrent::Promises::InternalStates::Rejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult # @return [Rejected] a new instance of Rejected # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#432 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#433 def initialize(reason); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#452 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#453 def apply(args, block); end # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#436 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#437 def fulfilled?; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#444 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#445 def reason; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#448 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#449 def to_sym; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#440 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#441 def value; end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#361 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#362 class Concurrent::Promises::InternalStates::Reserved < ::Concurrent::Promises::InternalStates::Pending; end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#365 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#366 class Concurrent::Promises::InternalStates::ResolvedWithResult < ::Concurrent::Promises::InternalStates::State # @raise [NotImplementedError] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#390 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#391 def apply; end # @raise [NotImplementedError] # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#378 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#379 def fulfilled?; end # @raise [NotImplementedError] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#386 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#387 def reason; end # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#366 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#367 def resolved?; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#374 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#375 def result; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#370 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#371 def to_sym; end # @raise [NotImplementedError] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#382 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#383 def value; end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#339 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#340 class Concurrent::Promises::InternalStates::State # @raise [NotImplementedError] # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#340 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#341 def resolved?; end # @raise [NotImplementedError] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#344 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#345 def to_sym; end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1738 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1748 class Concurrent::Promises::RescuePromise < ::Concurrent::Promises::BlockedTaskPromise # @return [RescuePromise] a new instance of RescuePromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1741 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1751 def initialize(delayed, blockers_count, default_executor, executor, args, &task); end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1745 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1755 def on_resolvable(resolved_future, index); end end # Marker module of Future, Event resolved manually. # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1289 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1299 module Concurrent::Promises::Resolvable include ::Concurrent::Promises::InternalStates end # A Event which can be resolved by user. # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1294 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1304 class Concurrent::Promises::ResolvableEvent < ::Concurrent::Promises::Event include ::Concurrent::Promises::Resolvable @@ -8035,7 +8035,7 @@ class Concurrent::Promises::ResolvableEvent < ::Concurrent::Promises::Event # @return [self, false] false is returned when raise_on_reassign is false and the receiver # is already resolved. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1314 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1324 def resolve(raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end # Behaves as {AbstractEventFuture#wait} but has one additional optional argument @@ -8045,28 +8045,28 @@ class Concurrent::Promises::ResolvableEvent < ::Concurrent::Promises::Event # @return [self, true, false] # @see AbstractEventFuture#wait # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1332 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1342 def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end # Creates new event wrapping receiver, effectively hiding the resolve method. # # @return [Event] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1321 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1331 def with_hidden_resolvable; end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1590 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1600 class Concurrent::Promises::ResolvableEventPromise < ::Concurrent::Promises::AbstractPromise # @return [ResolvableEventPromise] a new instance of ResolvableEventPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1591 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1601 def initialize(default_executor); end end # A Future which can be resolved by user. # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1344 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1354 class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future include ::Concurrent::Promises::Resolvable @@ -8077,7 +8077,7 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # @yield [*args] to the block. # @yieldreturn [Object] value # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1385 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1395 def evaluate_to(*args, &block); end # Evaluates the block and sets its result as future's value fulfilling, if the block raises @@ -8088,7 +8088,7 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # @yield [*args] to the block. # @yieldreturn [Object] value # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1396 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1406 def evaluate_to!(*args, &block); end # Makes the future fulfilled with `value`, @@ -8102,7 +8102,7 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # @return [self, false] false is returned when raise_on_reassign is false and the receiver # is already resolved. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1365 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1375 def fulfill(value, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end # Behaves as {Future#reason} but has one additional optional argument @@ -8113,7 +8113,7 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # @return [Exception, timeout_value, nil] # @see Future#reason # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1493 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1503 def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end # Makes the future rejected with `reason`, @@ -8127,7 +8127,7 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # @return [self, false] false is returned when raise_on_reassign is false and the receiver # is already resolved. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1375 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1385 def reject(reason, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end # Makes the future resolved with result of triplet `fulfilled?`, `value`, `reason`, @@ -8143,7 +8143,7 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # @return [self, false] false is returned when raise_on_reassign is false and the receiver # is already resolved. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1355 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1365 def resolve(fulfilled = T.unsafe(nil), value = T.unsafe(nil), reason = T.unsafe(nil), raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end # Behaves as {Future#result} but has one additional optional argument @@ -8154,7 +8154,7 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # @return [::Array(Boolean, Object, Exception), nil] # @see Future#result # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1514 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1524 def result(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end # Behaves as {Future#value} but has one additional optional argument @@ -8165,7 +8165,7 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # @return [Object, timeout_value, nil] # @see Future#value # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1449 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1459 def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end # Behaves as {Future#value!} but has one additional optional argument @@ -8177,7 +8177,7 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # @return [Object, timeout_value, nil] # @see Future#value! # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1471 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1481 def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end # Behaves as {AbstractEventFuture#wait} but has one additional optional argument @@ -8188,7 +8188,7 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # @return [self, true, false] # @see AbstractEventFuture#wait # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1411 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1421 def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end # Behaves as {Future#wait!} but has one additional optional argument @@ -8200,123 +8200,123 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # @return [self, true, false] # @see Future#wait! # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1428 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1438 def wait!(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end # Creates new future wrapping receiver, effectively hiding the resolve method and similar. # # @return [Future] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1532 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1542 def with_hidden_resolvable; end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1596 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1606 class Concurrent::Promises::ResolvableFuturePromise < ::Concurrent::Promises::AbstractPromise # @return [ResolvableFuturePromise] a new instance of ResolvableFuturePromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1597 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1607 def initialize(default_executor); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1582 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1592 def evaluate_to(*args, block); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1899 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1909 class Concurrent::Promises::RunFuturePromise < ::Concurrent::Promises::AbstractFlatPromise # @return [RunFuturePromise] a new instance of RunFuturePromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1903 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1913 def initialize(delayed, blockers_count, default_executor, run_test); end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1908 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1918 def process_on_blocker_resolution(future, index); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2104 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2114 class Concurrent::Promises::ScheduledPromise < ::Concurrent::Promises::InnerPromise # @return [ScheduledPromise] a new instance of ScheduledPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2115 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2125 def initialize(default_executor, intended_time); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2109 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2119 def inspect; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2105 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2115 def intended_time; end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1720 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1730 class Concurrent::Promises::ThenPromise < ::Concurrent::Promises::BlockedTaskPromise # @return [ThenPromise] a new instance of ThenPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1723 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1733 def initialize(delayed, blockers_count, default_executor, executor, args, &task); end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1727 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1737 def on_resolvable(resolved_future, index); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1930 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1940 class Concurrent::Promises::ZipEventEventPromise < ::Concurrent::Promises::BlockedPromise # @return [ZipEventEventPromise] a new instance of ZipEventEventPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1931 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1941 def initialize(delayed, blockers_count, default_executor); end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1937 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1947 def on_resolvable(resolved_future, index); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2021 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2031 class Concurrent::Promises::ZipEventsPromise < ::Concurrent::Promises::BlockedPromise # @return [ZipEventsPromise] a new instance of ZipEventsPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2025 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2035 def initialize(delayed, blockers_count, default_executor); end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2031 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2041 def on_resolvable(resolved_future, index); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1942 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1952 class Concurrent::Promises::ZipFutureEventPromise < ::Concurrent::Promises::BlockedPromise # @return [ZipFutureEventPromise] a new instance of ZipFutureEventPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1943 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1953 def initialize(delayed, blockers_count, default_executor); end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1957 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1967 def on_resolvable(resolved_future, index); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1950 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1960 def process_on_blocker_resolution(future, index); end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1986 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1996 class Concurrent::Promises::ZipFuturesPromise < ::Concurrent::Promises::BlockedPromise # @return [ZipFuturesPromise] a new instance of ZipFuturesPromise # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1990 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2000 def initialize(delayed, blockers_count, default_executor); end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2003 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2013 def on_resolvable(resolved_future, index); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1997 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2007 def process_on_blocker_resolution(future, index); end end @@ -8926,11 +8926,18 @@ class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#45 def initialize(opts = T.unsafe(nil)); end + # The number of threads that are actively executing tasks. + # + # @return [Integer] The number of threads that are actively executing tasks. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#65 + def active_count; end + # Does the task queue have a maximum size? # # @return [Boolean] True if the task queue has a maximum size else false. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#65 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#72 def can_overflow?; end # The number of tasks that have been completed by the pool since construction. @@ -8958,7 +8965,7 @@ class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService # # @return [Integer] The number of threads currently in the pool. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#70 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#77 def length; end # The maximum number of threads that may be created in the pool. @@ -8996,17 +9003,17 @@ class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService # this method explicitely in case your application post jobs in bursts (a # lot of jobs and then nothing for long periods) # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#111 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#118 def prune_pool; end # The number of tasks in the queue awaiting execution. # # @return [Integer] The number of tasks in the queue awaiting execution. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#75 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#82 def queue_length; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#96 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#103 def ready_worker(worker, last_message); end # Number of tasks that may be enqueued before reaching `max_queue` and rejecting @@ -9015,10 +9022,10 @@ class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService # @return [Integer] Number of tasks that may be enqueued before reaching `max_queue` and rejecting # new tasks. A value of -1 indicates that the queue may grow without bound. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#80 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#87 def remaining_capacity; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#91 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#98 def remove_busy_worker(worker); end # The number of tasks that have been scheduled for execution on the pool since construction. @@ -9035,10 +9042,10 @@ class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#42 def synchronous; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#101 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#108 def worker_died(worker); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#106 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#113 def worker_task_completed; end private @@ -9047,61 +9054,61 @@ class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService # # @return [nil, Worker] nil of max capacity is reached # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#234 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#241 def ns_add_busy_worker; end # tries to assign task to a worker, tries to get one from @ready or to create new one # # @return [true, false] if task is assigned to a worker # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#194 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#201 def ns_assign_worker(*args, &task); end # tries to enqueue task # # @return [true, false] if enqueued # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#212 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#219 def ns_enqueue(*args, &task); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#153 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#160 def ns_execute(*args, &task); end # @raise [ArgumentError] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#118 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#125 def ns_initialize(opts); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#182 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#189 def ns_kill_execution; end # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#148 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#155 def ns_limited_queue?; end # try oldest worker if it is idle for enough time, it's returned back at the start # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#273 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#280 def ns_prune_pool; end # handle ready worker, giving it new job or assigning back to @ready # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#246 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#253 def ns_ready_worker(worker, last_message, success = T.unsafe(nil)); end # removes a worker which is not in not tracked in @ready # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#264 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#271 def ns_remove_busy_worker(worker); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#289 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#296 def ns_reset_if_forked; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#167 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#174 def ns_shutdown_execution; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#224 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#231 def ns_worker_died(worker); end end @@ -9131,31 +9138,31 @@ Concurrent::RubyThreadPoolExecutor::DEFAULT_SYNCHRONOUS = T.let(T.unsafe(nil), F # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#24 Concurrent::RubyThreadPoolExecutor::DEFAULT_THREAD_IDLETIMEOUT = T.let(T.unsafe(nil), Integer) -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#303 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#310 class Concurrent::RubyThreadPoolExecutor::Worker include ::Logger::Severity include ::Concurrent::Concern::Logging # @return [Worker] a new instance of Worker # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#306 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#313 def initialize(pool, id); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#317 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#324 def <<(message); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#325 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#332 def kill; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#321 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#328 def stop; end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#331 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#338 def create_worker(queue, pool, idletime); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#351 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#358 def run_task(pool, task, args); end end @@ -11010,6 +11017,17 @@ end # be tested separately then passed to the `TimerTask` for scheduling and # running. # +# A `TimerTask` supports two different types of interval calculations. +# A fixed delay will always wait the same amount of time between the +# completion of one task and the start of the next. A fixed rate will +# attempt to maintain a constant rate of execution regardless of the +# duration of the task. For example, if a fixed rate task is scheduled +# to run every 60 seconds but the task itself takes 10 seconds to +# complete, the next task will be scheduled to run 50 seconds after +# the start of the previous task. If the task takes 70 seconds to +# complete, the next task will be start immediately after the previous +# task completes. Tasks will not be executed concurrently. +# # In some cases it may be necessary for a `TimerTask` to affect its own # execution cycle. To facilitate this, a reference to the TimerTask instance # is passed as an argument to the provided block every time the task is @@ -11047,6 +11065,11 @@ end # task.execute # # #=> 'Boom!' +# @example Configuring `:interval_type` with either :fixed_delay or :fixed_rate, default is :fixed_delay +# task = Concurrent::TimerTask.new(execution_interval: 5, interval_type: :fixed_rate) do +# puts 'Boom!' +# end +# task.interval_type #=> :fixed_rate # @example Last `#value` and `Dereferenceable` mixin # task = Concurrent::TimerTask.new( # dup_on_deref: true, @@ -11059,7 +11082,7 @@ end # task.value #=> 2013-11-07 18:06:55 -0500 # @example Controlling execution from within the block # timer_task = Concurrent::TimerTask.new(execution_interval: 1) do |task| -# task.execution_interval.times{ print 'Boom! ' } +# task.execution_interval.to_i.times{ print 'Boom! ' } # print "\n" # task.execution_interval += 1 # if task.execution_interval > 5 @@ -11068,7 +11091,7 @@ end # end # end # -# timer_task.execute # blocking call - this task will stop itself +# timer_task.execute # #=> Boom! # #=> Boom! Boom! # #=> Boom! Boom! Boom! @@ -11116,7 +11139,7 @@ end # @see http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html # @see http://docs.oracle.com/javase/7/docs/api/java/util/TimerTask.html # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#148 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#165 class Concurrent::TimerTask < ::Concurrent::RubyExecutorService include ::Concurrent::Concern::Dereferenceable include ::Concurrent::Concern::Observable @@ -11125,6 +11148,7 @@ class Concurrent::TimerTask < ::Concurrent::RubyExecutorService # # @option opts # @option opts + # @option opts # @param opts [Hash] the options defining task execution. # @raise ArgumentError when no block is given. # @return [TimerTask] the new `TimerTask` @@ -11135,7 +11159,7 @@ class Concurrent::TimerTask < ::Concurrent::RubyExecutorService # refer to the execution context of the block rather than the running # `TimerTask`. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#180 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#209 def initialize(opts = T.unsafe(nil), &task); end # Execute a previously created `TimerTask`. @@ -11150,38 +11174,43 @@ class Concurrent::TimerTask < ::Concurrent::RubyExecutorService # task.running? #=> true # @return [TimerTask] a reference to `self` # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#206 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#235 def execute; end # @return [Fixnum] Number of seconds after the task completes before the # task is performed again. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#230 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#259 def execution_interval; end # @return [Fixnum] Number of seconds after the task completes before the # task is performed again. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#237 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#266 def execution_interval=(value); end + # @return [Symbol] method to calculate the interval between executions + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#276 + def interval_type; end + # Is the executor running? # # @return [Boolean] `true` when running, `false` when shutting down or shutdown # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#189 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#218 def running?; end # @return [Fixnum] Number of seconds the task can run before it is # considered to have failed. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#248 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#281 def timeout_interval; end # @return [Fixnum] Number of seconds the task can run before it is # considered to have failed. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#255 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#288 def timeout_interval=(value); end private @@ -11189,22 +11218,25 @@ class Concurrent::TimerTask < ::Concurrent::RubyExecutorService # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#166 def <<(task); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#297 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#352 + def calculate_next_interval(start_time); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#336 def execute_task(completion); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#263 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#296 def ns_initialize(opts, &task); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#285 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#324 def ns_kill_execution; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#279 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#318 def ns_shutdown_execution; end # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#17 def post(*args, &task); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#291 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#330 def schedule_next_task(interval = T.unsafe(nil)); end class << self @@ -11215,6 +11247,7 @@ class Concurrent::TimerTask < ::Concurrent::RubyExecutorService # task.running? #=> true # @option opts # @option opts + # @option opts # @param opts [Hash] the options defining task execution. # @raise ArgumentError when no block is given. # @return [TimerTask] the new `TimerTask` @@ -11225,20 +11258,32 @@ class Concurrent::TimerTask < ::Concurrent::RubyExecutorService # refer to the execution context of the block rather than the running # `TimerTask`. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#223 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#252 def execute(opts = T.unsafe(nil), &task); end end end +# Default `:interval_type` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#181 +Concurrent::TimerTask::DEFAULT_INTERVAL_TYPE = T.let(T.unsafe(nil), Symbol) + # Default `:execution_interval` in seconds. # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#153 +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#170 Concurrent::TimerTask::EXECUTION_INTERVAL = T.let(T.unsafe(nil), Integer) -# Default `:timeout_interval` in seconds. +# Maintain the interval between the end of one execution and the start of the next execution. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#173 +Concurrent::TimerTask::FIXED_DELAY = T.let(T.unsafe(nil), Symbol) + +# Maintain the interval between the start of one execution and the start of the next. +# If execution time exceeds the interval, the next execution will start immediately +# after the previous execution finishes. Executions will not run concurrently. # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#156 -Concurrent::TimerTask::TIMEOUT_INTERVAL = T.let(T.unsafe(nil), Integer) +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#178 +Concurrent::TimerTask::FIXED_RATE = T.let(T.unsafe(nil), Symbol) # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#153 class Concurrent::Transaction diff --git a/sorbet/rbi/gems/config@4.2.1.rbi b/sorbet/rbi/gems/config@5.3.0.rbi similarity index 76% rename from sorbet/rbi/gems/config@4.2.1.rbi rename to sorbet/rbi/gems/config@5.3.0.rbi index 36696f754..c48250bc5 100644 --- a/sorbet/rbi/gems/config@4.2.1.rbi +++ b/sorbet/rbi/gems/config@5.3.0.rbi @@ -4,35 +4,35 @@ # This is an autogenerated file for types exported from the `config` gem. # Please instead update this file by running `bin/tapioca gem config`. -# source://config//lib/config/validation/error.rb#1 +# source://config//lib/config/error.rb#1 module Config extend ::Config::Validation::Schema class << self # Loads and sets the settings constant! # - # source://config//lib/config.rb#53 + # source://config//lib/config.rb#55 def load_and_set_settings(*sources); end # Create a populated Options instance from a settings file. If a second file is given, then the sections of that # file will overwrite existing sections of the first file. # - # source://config//lib/config.rb#38 + # source://config//lib/config.rb#40 def load_files(*sources); end - # source://config//lib/config.rb#68 + # source://config//lib/config.rb#70 def local_setting_files(config_root, env); end - # source://config//lib/config.rb#76 + # source://config//lib/config.rb#78 def reload!; end - # source://config//lib/config.rb#59 + # source://config//lib/config.rb#61 def setting_files(config_root, env); end # @yield [_self] # @yieldparam _self [Config] the object that the method was called on # - # source://config//lib/config.rb#31 + # source://config//lib/config.rb#33 def setup; end end end @@ -59,6 +59,20 @@ class Config::Configuration < ::Module def define_writer(name); end end +# source://config//lib/config/dry_validation_requirements.rb#4 +module Config::DryValidationRequirements + class << self + # source://config//lib/config/dry_validation_requirements.rb#7 + def load_dry_validation!; end + end +end + +# source://config//lib/config/dry_validation_requirements.rb#5 +Config::DryValidationRequirements::VERSIONS = T.let(T.unsafe(nil), Array) + +# source://config//lib/config/error.rb#2 +class Config::Error < ::StandardError; end + # source://config//lib/config/integrations/rails/railtie.rb#2 module Config::Integrations; end @@ -79,10 +93,10 @@ class Config::Options < ::OpenStruct # An alternative mechanism for property access. # This let's you do foo['bar'] along with foo.bar. # - # source://config//lib/config/options.rb#119 + # source://config//lib/config/options.rb#122 def [](param); end - # source://config//lib/config/options.rb#124 + # source://config//lib/config/options.rb#128 def []=(param, value); end # source://config//lib/config/options.rb#17 @@ -91,10 +105,10 @@ class Config::Options < ::OpenStruct # source://config//lib/config/options.rb#95 def as_json(options = T.unsafe(nil)); end - # source://config//lib/config/options.rb#129 + # source://config//lib/config/options.rb#133 def collect; end - # source://config//lib/config/options.rb#129 + # source://config//lib/config/options.rb#133 def count; end # source://config//lib/config/options.rb#86 @@ -105,17 +119,17 @@ class Config::Options < ::OpenStruct # source://config//lib/config/options.rb#13 def empty?; end - # source://config//lib/config/options.rb#129 + # source://config//lib/config/options.rb#133 def exit!; end # @return [Boolean] # - # source://config//lib/config/options.rb#138 + # source://config//lib/config/options.rb#148 def has_key?(key); end # @return [Boolean] # - # source://config//lib/config/options.rb#134 + # source://config//lib/config/options.rb#144 def key?(key); end # source://config//lib/config/options.rb#9 @@ -126,18 +140,24 @@ class Config::Options < ::OpenStruct # source://config//lib/config/options.rb#35 def load!; end - # source://config//lib/config/options.rb#129 + # source://config//lib/config/options.rb#133 def max; end + # source://config//lib/config/options.rb#139 + def maximum; end + # source://config//lib/config/options.rb#99 def merge!(hash); end - # source://config//lib/config/options.rb#142 + # source://config//lib/config/options.rb#152 def method_missing(method_name, *args); end - # source://config//lib/config/options.rb#129 + # source://config//lib/config/options.rb#133 def min; end + # source://config//lib/config/options.rb#139 + def minimum; end + # source://config//lib/config/options.rb#26 def prepend_source!(source); end @@ -149,13 +169,13 @@ class Config::Options < ::OpenStruct # source://config//lib/config/options.rb#65 def reload_from_files(*files); end - # source://config//lib/config/options.rb#129 + # source://config//lib/config/options.rb#133 def select; end - # source://config//lib/config/options.rb#129 + # source://config//lib/config/options.rb#133 def table; end - # source://config//lib/config/options.rb#129 + # source://config//lib/config/options.rb#133 def test; end # source://config//lib/config/options.rb#70 @@ -167,27 +187,32 @@ class Config::Options < ::OpenStruct # source://config//lib/config/options.rb#90 def to_json(*args); end - # source://config//lib/config/options.rb#129 + # source://config//lib/config/options.rb#133 def zip; end protected # Recursively converts Hashes to Options (including Hashes inside Arrays) # - # source://config//lib/config/options.rb#168 + # source://config//lib/config/options.rb#178 def __convert(h); end - # source://config//lib/config/options.rb#155 + # source://config//lib/config/options.rb#165 def descend_array(array); end private # @return [Boolean] # - # source://config//lib/config/options.rb#149 + # source://config//lib/config/options.rb#159 def respond_to_missing?(*args); end end +# Some keywords that don't play nicely with Rails 7.* +# +# source://config//lib/config/options.rb#118 +Config::Options::RAILS_RESERVED_NAMES = T.let(T.unsafe(nil), Array) + # Some keywords that don't play nicely with OpenStruct # # source://config//lib/config/options.rb#115 @@ -294,25 +319,25 @@ end # source://config//lib/config/version.rb#2 Config::VERSION = T.let(T.unsafe(nil), String) -# source://config//lib/config/validation/error.rb#2 +# source://config//lib/config/validation/error.rb#4 module Config::Validation; end -# source://config//lib/config/validation/error.rb#3 -class Config::Validation::Error < ::StandardError +# source://config//lib/config/validation/error.rb#5 +class Config::Validation::Error < ::Config::Error class << self - # source://config//lib/config/validation/error.rb#5 + # source://config//lib/config/validation/error.rb#7 def format(v_res); end end end -# source://config//lib/config/validation/schema.rb#3 +# source://config//lib/config/validation/schema.rb#6 module Config::Validation::Schema - # source://config//lib/config/validation/schema.rb#9 + # source://config//lib/config/validation/schema.rb#12 def schema(&block); end # Assigns schema configuration option # - # source://config//lib/config/validation/schema.rb#5 + # source://config//lib/config/validation/schema.rb#8 def schema=(value); end end @@ -323,6 +348,6 @@ module Config::Validation::Validate private - # source://config//lib/config/validation/validate.rb#13 + # source://config//lib/config/validation/validate.rb#17 def validate_using!(validator); end end diff --git a/sorbet/rbi/gems/crack@0.4.5.rbi b/sorbet/rbi/gems/crack@1.0.0.rbi similarity index 100% rename from sorbet/rbi/gems/crack@0.4.5.rbi rename to sorbet/rbi/gems/crack@1.0.0.rbi diff --git a/sorbet/rbi/gems/date@3.3.3.rbi b/sorbet/rbi/gems/date@3.3.4.rbi similarity index 60% rename from sorbet/rbi/gems/date@3.3.3.rbi rename to sorbet/rbi/gems/date@3.3.4.rbi index be2da327d..705d31f60 100644 --- a/sorbet/rbi/gems/date@3.3.3.rbi +++ b/sorbet/rbi/gems/date@3.3.4.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `date` gem. # Please instead update this file by running `bin/tapioca gem date`. +# source://date//lib/date.rb#6 class Date include ::Comparable @@ -14,59 +15,60 @@ class Date # # @return [Boolean] # - # source://date//date.rb#13 + # source://date//lib/date.rb#13 def infinite?; end end +# source://date//lib/date.rb#17 class Date::Infinity < ::Numeric # @return [Infinity] a new instance of Infinity # - # source://date//date.rb#19 + # source://date//lib/date.rb#19 def initialize(d = T.unsafe(nil)); end - # source://date//date.rb#33 + # source://date//lib/date.rb#33 def +@; end - # source://date//date.rb#32 + # source://date//lib/date.rb#32 def -@; end - # source://date//date.rb#35 + # source://date//lib/date.rb#35 def <=>(other); end - # source://date//date.rb#30 + # source://date//lib/date.rb#30 def abs; end - # source://date//date.rb#51 + # source://date//lib/date.rb#51 def coerce(other); end # @return [Boolean] # - # source://date//date.rb#26 + # source://date//lib/date.rb#26 def finite?; end # @return [Boolean] # - # source://date//date.rb#27 + # source://date//lib/date.rb#27 def infinite?; end # @return [Boolean] # - # source://date//date.rb#28 + # source://date//lib/date.rb#28 def nan?; end - # source://date//date.rb#59 + # source://date//lib/date.rb#59 def to_f; end # @return [Boolean] # - # source://date//date.rb#25 + # source://date//lib/date.rb#25 def zero?; end protected - # source://date//date.rb#21 + # source://date//lib/date.rb#21 def d; end end -# source://date//date.rb#7 +# source://date//lib/date.rb#7 Date::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.0.rbi deleted file mode 100644 index 4e1f79154..000000000 --- a/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +++ /dev/null @@ -1,1083 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `diff-lcs` gem. -# Please instead update this file by running `bin/tapioca gem diff-lcs`. - -# source://diff-lcs//lib/diff/lcs.rb#3 -module Diff; end - -# source://diff-lcs//lib/diff/lcs.rb#51 -module Diff::LCS - # Returns the difference set between +self+ and +other+. See Diff::LCS#diff. - # - # source://diff-lcs//lib/diff/lcs.rb#75 - def diff(other, callbacks = T.unsafe(nil), &block); end - - # Returns an Array containing the longest common subsequence(s) between - # +self+ and +other+. See Diff::LCS#lcs. - # - # lcs = seq1.lcs(seq2) - # - # A note when using objects: Diff::LCS only works properly when each object - # can be used as a key in a Hash, which typically means that the objects must - # implement Object#eql? in a way that two identical values compare - # identically for key purposes. That is: - # - # O.new('a').eql?(O.new('a')) == true - # - # source://diff-lcs//lib/diff/lcs.rb#70 - def lcs(other, &block); end - - # Attempts to patch +self+ with the provided +patchset+. A new sequence based - # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts - # to autodiscover the direction of the patch. - # - # source://diff-lcs//lib/diff/lcs.rb#101 - def patch(patchset); end - - # Attempts to patch +self+ with the provided +patchset+. A new sequence based - # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Does no - # patch direction autodiscovery. - # - # source://diff-lcs//lib/diff/lcs.rb#109 - def patch!(patchset); end - - # Attempts to patch +self+ with the provided +patchset+, using #patch!. If - # the sequence this is used on supports #replace, the value of +self+ will be - # replaced. See Diff::LCS#patch. Does no patch direction autodiscovery. - # - # source://diff-lcs//lib/diff/lcs.rb#123 - def patch_me(patchset); end - - # Returns the balanced ("side-by-side") difference set between +self+ and - # +other+. See Diff::LCS#sdiff. - # - # source://diff-lcs//lib/diff/lcs.rb#81 - def sdiff(other, callbacks = T.unsafe(nil), &block); end - - # Traverses the discovered longest common subsequences between +self+ and - # +other+ using the alternate, balanced algorithm. See - # Diff::LCS#traverse_balanced. - # - # source://diff-lcs//lib/diff/lcs.rb#94 - def traverse_balanced(other, callbacks = T.unsafe(nil), &block); end - - # Traverses the discovered longest common subsequences between +self+ and - # +other+. See Diff::LCS#traverse_sequences. - # - # source://diff-lcs//lib/diff/lcs.rb#87 - def traverse_sequences(other, callbacks = T.unsafe(nil), &block); end - - # Attempts to patch +self+ with the provided +patchset+. A new sequence based - # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts - # to autodiscover the direction of the patch. - # - # source://diff-lcs//lib/diff/lcs.rb#101 - def unpatch(patchset); end - - # Attempts to unpatch +self+ with the provided +patchset+. A new sequence - # based on +self+ and the +patchset+ will be created. See Diff::LCS#unpatch. - # Does no patch direction autodiscovery. - # - # source://diff-lcs//lib/diff/lcs.rb#116 - def unpatch!(patchset); end - - # Attempts to unpatch +self+ with the provided +patchset+, using #unpatch!. - # If the sequence this is used on supports #replace, the value of +self+ will - # be replaced. See Diff::LCS#unpatch. Does no patch direction autodiscovery. - # - # source://diff-lcs//lib/diff/lcs.rb#134 - def unpatch_me(patchset); end - - class << self - # :yields seq1[i] for each matched: - # - # source://diff-lcs//lib/diff/lcs.rb#144 - def LCS(seq1, seq2, &block); end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#52 - def callbacks_for(callbacks); end - - # #diff computes the smallest set of additions and deletions necessary to - # turn the first sequence into the second, and returns a description of these - # changes. - # - # See Diff::LCS::DiffCallbacks for the default behaviour. An alternate - # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a - # Class argument is provided for +callbacks+, #diff will attempt to - # initialise it. If the +callbacks+ object (possibly initialised) responds to - # #finish, it will be called. - # - # source://diff-lcs//lib/diff/lcs.rb#168 - def diff(seq1, seq2, callbacks = T.unsafe(nil), &block); end - - # :yields seq1[i] for each matched: - # - # source://diff-lcs//lib/diff/lcs.rb#144 - def lcs(seq1, seq2, &block); end - - # Applies a +patchset+ to the sequence +src+ according to the +direction+ - # (:patch or :unpatch), producing a new sequence. - # - # If the +direction+ is not specified, Diff::LCS::patch will attempt to - # discover the direction of the +patchset+. - # - # A +patchset+ can be considered to apply forward (:patch) if the - # following expression is true: - # - # patch(s1, diff(s1, s2)) -> s2 - # - # A +patchset+ can be considered to apply backward (:unpatch) if the - # following expression is true: - # - # patch(s2, diff(s1, s2)) -> s1 - # - # If the +patchset+ contains no changes, the +src+ value will be returned as - # either src.dup or +src+. A +patchset+ can be deemed as having no - # changes if the following predicate returns true: - # - # patchset.empty? or - # patchset.flatten(1).all? { |change| change.unchanged? } - # - # === Patchsets - # - # A +patchset+ is always an enumerable sequence of changes, hunks of changes, - # or a mix of the two. A hunk of changes is an enumerable sequence of - # changes: - # - # [ # patchset - # # change - # [ # hunk - # # change - # ] - # ] - # - # The +patch+ method accepts patchsets that are enumerable sequences - # containing either Diff::LCS::Change objects (or a subclass) or the array - # representations of those objects. Prior to application, array - # representations of Diff::LCS::Change objects will be reified. - # - # source://diff-lcs//lib/diff/lcs.rb#624 - def patch(src, patchset, direction = T.unsafe(nil)); end - - # Given a set of patchset, convert the current version to the next version. - # Does no auto-discovery. - # - # source://diff-lcs//lib/diff/lcs.rb#734 - def patch!(src, patchset); end - - # #sdiff computes all necessary components to show two sequences and their - # minimized differences side by side, just like the Unix utility - # sdiff does: - # - # old < - - # same same - # before | after - # - > new - # - # See Diff::LCS::SDiffCallbacks for the default behaviour. An alternate - # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a - # Class argument is provided for +callbacks+, #diff will attempt to - # initialise it. If the +callbacks+ object (possibly initialised) responds to - # #finish, it will be called. - # - # Each element of a returned array is a Diff::LCS::ContextChange object, - # which can be implicitly converted to an array. - # - # Diff::LCS.sdiff(a, b).each do |action, (old_pos, old_element), (new_pos, new_element)| - # case action - # when '!' - # # replace - # when '-' - # # delete - # when '+' - # # insert - # end - # end - # - # source://diff-lcs//lib/diff/lcs.rb#200 - def sdiff(seq1, seq2, callbacks = T.unsafe(nil), &block); end - - # #traverse_balanced is an alternative to #traverse_sequences. It uses a - # different algorithm to iterate through the entries in the computed longest - # common subsequence. Instead of viewing the changes as insertions or - # deletions from one of the sequences, #traverse_balanced will report - # changes between the sequences. - # - # The arguments to #traverse_balanced are the two sequences to traverse and a - # callback object, like this: - # - # traverse_balanced(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new) - # - # #sdiff is implemented with #traverse_balanced. - # - # == Callback Methods - # - # Optional callback methods are emphasized. - # - # callbacks#match:: Called when +a+ and +b+ are pointing to - # common elements in +A+ and +B+. - # callbacks#discard_a:: Called when +a+ is pointing to an - # element not in +B+. - # callbacks#discard_b:: Called when +b+ is pointing to an - # element not in +A+. - # callbacks#change:: Called when +a+ and +b+ are pointing to - # the same relative position, but - # A[a] and B[b] are not - # the same; a change has - # occurred. - # - # #traverse_balanced might be a bit slower than #traverse_sequences, - # noticable only while processing huge amounts of data. - # - # == Algorithm - # - # a---+ - # v - # A = a b c e h j l m n p - # B = b c d e f j k l m r s t - # ^ - # b---+ - # - # === Matches - # - # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+ - # and +B+, the arrows will initially point to the first elements of their - # respective sequences. #traverse_sequences will advance the arrows through - # the sequences one element at a time, calling a method on the user-specified - # callback object before each advance. It will advance the arrows in such a - # way that if there are elements A[i] and B[j] which are - # both equal and part of the longest common subsequence, there will be some - # moment during the execution of #traverse_sequences when arrow +a+ is - # pointing to A[i] and arrow +b+ is pointing to B[j]. When - # this happens, #traverse_sequences will call callbacks#match and - # then it will advance both arrows. - # - # === Discards - # - # Otherwise, one of the arrows is pointing to an element of its sequence that - # is not part of the longest common subsequence. #traverse_sequences will - # advance that arrow and will call callbacks#discard_a or - # callbacks#discard_b, depending on which arrow it advanced. - # - # === Changes - # - # If both +a+ and +b+ point to elements that are not part of the longest - # common subsequence, then #traverse_sequences will try to call - # callbacks#change and advance both arrows. If - # callbacks#change is not implemented, then - # callbacks#discard_a and callbacks#discard_b will be - # called in turn. - # - # The methods for callbacks#match, callbacks#discard_a, - # callbacks#discard_b, and callbacks#change are invoked - # with an event comprising the action ("=", "+", "-", or "!", respectively), - # the indicies +i+ and +j+, and the elements A[i] and B[j]. - # Return values are discarded by #traverse_balanced. - # - # === Context - # - # Note that +i+ and +j+ may not be the same index position, even if +a+ and - # +b+ are considered to be pointing to matching or changed elements. - # - # source://diff-lcs//lib/diff/lcs.rb#475 - def traverse_balanced(seq1, seq2, callbacks = T.unsafe(nil)); end - - # #traverse_sequences is the most general facility provided by this module; - # #diff and #lcs are implemented as calls to it. - # - # The arguments to #traverse_sequences are the two sequences to traverse, and - # a callback object, like this: - # - # traverse_sequences(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new) - # - # == Callback Methods - # - # Optional callback methods are emphasized. - # - # callbacks#match:: Called when +a+ and +b+ are pointing to - # common elements in +A+ and +B+. - # callbacks#discard_a:: Called when +a+ is pointing to an - # element not in +B+. - # callbacks#discard_b:: Called when +b+ is pointing to an - # element not in +A+. - # callbacks#finished_a:: Called when +a+ has reached the end of - # sequence +A+. - # callbacks#finished_b:: Called when +b+ has reached the end of - # sequence +B+. - # - # == Algorithm - # - # a---+ - # v - # A = a b c e h j l m n p - # B = b c d e f j k l m r s t - # ^ - # b---+ - # - # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+ - # and +B+, the arrows will initially point to the first elements of their - # respective sequences. #traverse_sequences will advance the arrows through - # the sequences one element at a time, calling a method on the user-specified - # callback object before each advance. It will advance the arrows in such a - # way that if there are elements A[i] and B[j] which are - # both equal and part of the longest common subsequence, there will be some - # moment during the execution of #traverse_sequences when arrow +a+ is - # pointing to A[i] and arrow +b+ is pointing to B[j]. When - # this happens, #traverse_sequences will call callbacks#match and - # then it will advance both arrows. - # - # Otherwise, one of the arrows is pointing to an element of its sequence that - # is not part of the longest common subsequence. #traverse_sequences will - # advance that arrow and will call callbacks#discard_a or - # callbacks#discard_b, depending on which arrow it advanced. If both - # arrows point to elements that are not part of the longest common - # subsequence, then #traverse_sequences will advance arrow +a+ and call the - # appropriate callback, then it will advance arrow +b+ and call the appropriate - # callback. - # - # The methods for callbacks#match, callbacks#discard_a, and - # callbacks#discard_b are invoked with an event comprising the - # action ("=", "+", or "-", respectively), the indicies +i+ and +j+, and the - # elements A[i] and B[j]. Return values are discarded by - # #traverse_sequences. - # - # === End of Sequences - # - # If arrow +a+ reaches the end of its sequence before arrow +b+ does, - # #traverse_sequence will try to call callbacks#finished_a with the - # last index and element of +A+ (A[-1]) and the current index and - # element of +B+ (B[j]). If callbacks#finished_a does not - # exist, then callbacks#discard_b will be called on each element of - # +B+ until the end of the sequence is reached (the call will be done with - # A[-1] and B[j] for each element). - # - # If +b+ reaches the end of +B+ before +a+ reaches the end of +A+, - # callbacks#finished_b will be called with the current index and - # element of +A+ (A[i]) and the last index and element of +B+ - # (A[-1]). Again, if callbacks#finished_b does not exist on - # the callback object, then callbacks#discard_a will be called on - # each element of +A+ until the end of the sequence is reached (A[i] - # and B[-1]). - # - # There is a chance that one additional callbacks#discard_a or - # callbacks#discard_b will be called after the end of the sequence - # is reached, if +a+ has not yet reached the end of +A+ or +b+ has not yet - # reached the end of +B+. - # - # source://diff-lcs//lib/diff/lcs.rb#285 - def traverse_sequences(seq1, seq2, callbacks = T.unsafe(nil)); end - - # Given a set of patchset, convert the current version to the prior version. - # Does no auto-discovery. - # - # source://diff-lcs//lib/diff/lcs.rb#728 - def unpatch!(src, patchset); end - - private - - # source://diff-lcs//lib/diff/lcs/internals.rb#4 - def diff_traversal(method, seq1, seq2, callbacks, &block); end - end -end - -# An alias for DefaultCallbacks that is used in -# Diff::LCS#traverse_balanced. -# -# Diff::LCS.LCS(seq1, seq2, Diff::LCS::BalancedCallbacks) -# -# source://diff-lcs//lib/diff/lcs/callbacks.rb#50 -Diff::LCS::BalancedCallbacks = Diff::LCS::DefaultCallbacks - -# A block is an operation removing, adding, or changing a group of items. -# Basically, this is just a list of changes, where each change adds or -# deletes a single item. Used by bin/ldiff. -# -# source://diff-lcs//lib/diff/lcs/block.rb#6 -class Diff::LCS::Block - # @return [Block] a new instance of Block - # - # source://diff-lcs//lib/diff/lcs/block.rb#9 - def initialize(chunk); end - - # Returns the value of attribute changes. - # - # source://diff-lcs//lib/diff/lcs/block.rb#7 - def changes; end - - # source://diff-lcs//lib/diff/lcs/block.rb#21 - def diff_size; end - - # Returns the value of attribute insert. - # - # source://diff-lcs//lib/diff/lcs/block.rb#7 - def insert; end - - # source://diff-lcs//lib/diff/lcs/block.rb#25 - def op; end - - # Returns the value of attribute remove. - # - # source://diff-lcs//lib/diff/lcs/block.rb#7 - def remove; end -end - -# Represents a simplistic (non-contextual) change. Represents the removal or -# addition of an element from either the old or the new sequenced -# enumerable. -# -# source://diff-lcs//lib/diff/lcs/change.rb#6 -class Diff::LCS::Change - include ::Comparable - - # @return [Change] a new instance of Change - # - # source://diff-lcs//lib/diff/lcs/change.rb#27 - def initialize(*args); end - - # source://diff-lcs//lib/diff/lcs/change.rb#65 - def <=>(other); end - - # source://diff-lcs//lib/diff/lcs/change.rb#58 - def ==(other); end - - # Returns the action this Change represents. - # - # source://diff-lcs//lib/diff/lcs/change.rb#20 - def action; end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#72 - def adding?; end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#84 - def changed?; end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#76 - def deleting?; end - - # Returns the sequence element of the Change. - # - # source://diff-lcs//lib/diff/lcs/change.rb#25 - def element; end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#88 - def finished_a?; end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#92 - def finished_b?; end - - # source://diff-lcs//lib/diff/lcs/change.rb#34 - def inspect(*_args); end - - # Returns the position of the Change. - # - # source://diff-lcs//lib/diff/lcs/change.rb#23 - def position; end - - # source://diff-lcs//lib/diff/lcs/change.rb#38 - def to_a; end - - # source://diff-lcs//lib/diff/lcs/change.rb#38 - def to_ary; end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#80 - def unchanged?; end - - class << self - # source://diff-lcs//lib/diff/lcs/change.rb#44 - def from_a(arr); end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#15 - def valid_action?(action); end - end -end - -# source://diff-lcs//lib/diff/lcs/change.rb#7 -Diff::LCS::Change::IntClass = Integer - -# The only actions valid for changes are '+' (add), '-' (delete), '=' -# (no change), '!' (changed), '<' (tail changes from first sequence), or -# '>' (tail changes from second sequence). The last two ('<>') are only -# found with Diff::LCS::diff and Diff::LCS::sdiff. -# -# source://diff-lcs//lib/diff/lcs/change.rb#13 -Diff::LCS::Change::VALID_ACTIONS = T.let(T.unsafe(nil), Array) - -# Represents a contextual change. Contains the position and values of the -# elements in the old and the new sequenced enumerables as well as the action -# taken. -# -# source://diff-lcs//lib/diff/lcs/change.rb#100 -class Diff::LCS::ContextChange < ::Diff::LCS::Change - # @return [ContextChange] a new instance of ContextChange - # - # source://diff-lcs//lib/diff/lcs/change.rb#114 - def initialize(*args); end - - # source://diff-lcs//lib/diff/lcs/change.rb#166 - def <=>(other); end - - # source://diff-lcs//lib/diff/lcs/change.rb#157 - def ==(other); end - - # Returns the new element being changed. - # - # source://diff-lcs//lib/diff/lcs/change.rb#112 - def new_element; end - - # Returns the new position being changed. - # - # source://diff-lcs//lib/diff/lcs/change.rb#108 - def new_position; end - - # Returns the old element being changed. - # - # source://diff-lcs//lib/diff/lcs/change.rb#110 - def old_element; end - - # Returns the old position being changed. - # - # source://diff-lcs//lib/diff/lcs/change.rb#106 - def old_position; end - - # source://diff-lcs//lib/diff/lcs/change.rb#122 - def to_a; end - - # source://diff-lcs//lib/diff/lcs/change.rb#122 - def to_ary; end - - class << self - # source://diff-lcs//lib/diff/lcs/change.rb#132 - def from_a(arr); end - - # Simplifies a context change for use in some diff callbacks. '<' actions - # are converted to '-' and '>' actions are converted to '+'. - # - # source://diff-lcs//lib/diff/lcs/change.rb#138 - def simplify(event); end - end -end - -# This will produce a compound array of contextual diff change objects. Each -# element in the #diffs array is a "hunk" array, where each element in each -# "hunk" array is a single change. Each change is a Diff::LCS::ContextChange -# that contains both the old index and new index values for the change. The -# "hunk" provides the full context for the changes. Both old and new objects -# will be presented for changed objects. +nil+ will be substituted for a -# discarded object. -# -# seq1 = %w(a b c e h j l m n p) -# seq2 = %w(b c d e f j k l m r s t) -# -# diffs = Diff::LCS.diff(seq1, seq2, Diff::LCS::ContextDiffCallbacks) -# # This example shows a simplified array format. -# # [ [ [ '-', [ 0, 'a' ], [ 0, nil ] ] ], # 1 -# # [ [ '+', [ 3, nil ], [ 2, 'd' ] ] ], # 2 -# # [ [ '-', [ 4, 'h' ], [ 4, nil ] ], # 3 -# # [ '+', [ 5, nil ], [ 4, 'f' ] ] ], -# # [ [ '+', [ 6, nil ], [ 6, 'k' ] ] ], # 4 -# # [ [ '-', [ 8, 'n' ], [ 9, nil ] ], # 5 -# # [ '+', [ 9, nil ], [ 9, 'r' ] ], -# # [ '-', [ 9, 'p' ], [ 10, nil ] ], -# # [ '+', [ 10, nil ], [ 10, 's' ] ], -# # [ '+', [ 10, nil ], [ 11, 't' ] ] ] ] -# -# The five hunks shown are comprised of individual changes; if there is a -# related set of changes, they are still shown individually. -# -# This callback can also be used with Diff::LCS#sdiff, which will produce -# results like: -# -# diffs = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextCallbacks) -# # This example shows a simplified array format. -# # [ [ [ "-", [ 0, "a" ], [ 0, nil ] ] ], # 1 -# # [ [ "+", [ 3, nil ], [ 2, "d" ] ] ], # 2 -# # [ [ "!", [ 4, "h" ], [ 4, "f" ] ] ], # 3 -# # [ [ "+", [ 6, nil ], [ 6, "k" ] ] ], # 4 -# # [ [ "!", [ 8, "n" ], [ 9, "r" ] ], # 5 -# # [ "!", [ 9, "p" ], [ 10, "s" ] ], -# # [ "+", [ 10, nil ], [ 11, "t" ] ] ] ] -# -# The five hunks are still present, but are significantly shorter in total -# presentation, because changed items are shown as changes ("!") instead of -# potentially "mismatched" pairs of additions and deletions. -# -# The result of this operation is similar to that of -# Diff::LCS::SDiffCallbacks. They may be compared as: -# -# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } -# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) -# -# s == c # -> true -# -# === Use -# -# This callback object must be initialised and can be used by the -# Diff::LCS#diff or Diff::LCS#sdiff methods. -# -# cbo = Diff::LCS::ContextDiffCallbacks.new -# Diff::LCS.LCS(seq1, seq2, cbo) -# cbo.finish -# -# Note that the call to #finish is absolutely necessary, or the last set of -# changes will not be visible. Alternatively, can be used as: -# -# cbo = Diff::LCS::ContextDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } -# -# The necessary #finish call will be made. -# -# === Simplified Array Format -# -# The simplified array format used in the example above can be obtained -# with: -# -# require 'pp' -# pp diffs.map { |e| e.map { |f| f.to_a } } -# -# source://diff-lcs//lib/diff/lcs/callbacks.rb#223 -class Diff::LCS::ContextDiffCallbacks < ::Diff::LCS::DiffCallbacks - # source://diff-lcs//lib/diff/lcs/callbacks.rb#232 - def change(event); end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#224 - def discard_a(event); end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#228 - def discard_b(event); end -end - -# This callback object implements the default set of callback events, -# which only returns the event itself. Note that #finished_a and -# #finished_b are not implemented -- I haven't yet figured out where they -# would be useful. -# -# Note that this is intended to be called as is, e.g., -# -# Diff::LCS.LCS(seq1, seq2, Diff::LCS::DefaultCallbacks) -# -# source://diff-lcs//lib/diff/lcs/callbacks.rb#14 -class Diff::LCS::DefaultCallbacks - class << self - # Called when both the old and new values have changed. - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#32 - def change(event); end - - # Called when the old value is discarded in favour of the new value. - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#22 - def discard_a(event); end - - # Called when the new value is discarded in favour of the old value. - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#27 - def discard_b(event); end - - # Called when two items match. - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#17 - def match(event); end - - private - - def new(*_arg0); end - end -end - -# This will produce a compound array of simple diff change objects. Each -# element in the #diffs array is a +hunk+ or +hunk+ array, where each -# element in each +hunk+ array is a single Change object representing the -# addition or removal of a single element from one of the two tested -# sequences. The +hunk+ provides the full context for the changes. -# -# diffs = Diff::LCS.diff(seq1, seq2) -# # This example shows a simplified array format. -# # [ [ [ '-', 0, 'a' ] ], # 1 -# # [ [ '+', 2, 'd' ] ], # 2 -# # [ [ '-', 4, 'h' ], # 3 -# # [ '+', 4, 'f' ] ], -# # [ [ '+', 6, 'k' ] ], # 4 -# # [ [ '-', 8, 'n' ], # 5 -# # [ '-', 9, 'p' ], -# # [ '+', 9, 'r' ], -# # [ '+', 10, 's' ], -# # [ '+', 11, 't' ] ] ] -# -# There are five hunks here. The first hunk says that the +a+ at position 0 -# of the first sequence should be deleted ('-'). The second hunk -# says that the +d+ at position 2 of the second sequence should be inserted -# ('+'). The third hunk says that the +h+ at position 4 of the -# first sequence should be removed and replaced with the +f+ from position 4 -# of the second sequence. The other two hunks are described similarly. -# -# === Use -# -# This callback object must be initialised and is used by the Diff::LCS#diff -# method. -# -# cbo = Diff::LCS::DiffCallbacks.new -# Diff::LCS.LCS(seq1, seq2, cbo) -# cbo.finish -# -# Note that the call to #finish is absolutely necessary, or the last set of -# changes will not be visible. Alternatively, can be used as: -# -# cbo = Diff::LCS::DiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } -# -# The necessary #finish call will be made. -# -# === Simplified Array Format -# -# The simplified array format used in the example above can be obtained -# with: -# -# require 'pp' -# pp diffs.map { |e| e.map { |f| f.to_a } } -# -# source://diff-lcs//lib/diff/lcs/callbacks.rb#106 -class Diff::LCS::DiffCallbacks - # :yields self: - # - # @return [DiffCallbacks] a new instance of DiffCallbacks - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#110 - def initialize; end - - # Returns the difference set collected during the diff process. - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#108 - def diffs; end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#133 - def discard_a(event); end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#137 - def discard_b(event); end - - # Finalizes the diff process. If an unprocessed hunk still exists, then it - # is appended to the diff list. - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#125 - def finish; end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#129 - def match(_event); end - - private - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#141 - def finish_hunk; end -end - -# A Hunk is a group of Blocks which overlap because of the context surrounding -# each block. (So if we're not using context, every hunk will contain one -# block.) Used in the diff program (bin/ldiff). -# -# source://diff-lcs//lib/diff/lcs/hunk.rb#8 -class Diff::LCS::Hunk - # Create a hunk using references to both the old and new data, as well as the - # piece of data. - # - # @return [Hunk] a new instance of Hunk - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#16 - def initialize(data_old, data_new, piece, flag_context, file_length_difference); end - - # Returns the value of attribute blocks. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#63 - def blocks; end - - # Returns a diff string based on a format. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#116 - def diff(format, last = T.unsafe(nil)); end - - # Returns the value of attribute end_new. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#65 - def end_new; end - - # Returns the value of attribute end_old. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#65 - def end_old; end - - # Returns the value of attribute file_length_difference. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#66 - def file_length_difference; end - - # Change the "start" and "end" fields to note that context should be added - # to this hunk. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#70 - def flag_context; end - - # source://diff-lcs//lib/diff/lcs/hunk.rb#72 - def flag_context=(context); end - - # Merges this hunk and the provided hunk together if they overlap. Returns - # a truthy value so that if there is no overlap, you can know the merge - # was skipped. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#98 - def merge(hunk); end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#326 - def missing_last_newline?(data); end - - # Determines whether there is an overlap between this hunk and the - # provided hunk. This will be true if the difference between the two hunks - # start or end positions is within one position of each other. - # - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#110 - def overlaps?(hunk); end - - # Returns the value of attribute start_new. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#64 - def start_new; end - - # Returns the value of attribute start_old. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#64 - def start_old; end - - # Merges this hunk and the provided hunk together if they overlap. Returns - # a truthy value so that if there is no overlap, you can know the merge - # was skipped. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#98 - def unshift(hunk); end - - private - - # source://diff-lcs//lib/diff/lcs/hunk.rb#213 - def context_diff(last = T.unsafe(nil)); end - - # Generate a range of item numbers to print. Only print 1 number if the - # range has only one item in it. Otherwise, it's 'start,end' - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#293 - def context_range(mode, op, last = T.unsafe(nil)); end - - # source://diff-lcs//lib/diff/lcs/hunk.rb#271 - def ed_diff(format, _last = T.unsafe(nil)); end - - # source://diff-lcs//lib/diff/lcs/hunk.rb#339 - def encode(literal, target_encoding = T.unsafe(nil)); end - - # source://diff-lcs//lib/diff/lcs/hunk.rb#343 - def encode_as(string, *args); end - - # Note that an old diff can't have any context. Therefore, we know that - # there's only one block in the hunk. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#135 - def old_diff(_last = T.unsafe(nil)); end - - # source://diff-lcs//lib/diff/lcs/hunk.rb#160 - def unified_diff(last = T.unsafe(nil)); end - - # Generate a range of item numbers to print for unified diff. Print number - # where block starts, followed by number of lines in the block - # (don't print number of lines if it's 1) - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#311 - def unified_range(mode, last); end -end - -# source://diff-lcs//lib/diff/lcs/hunk.rb#10 -Diff::LCS::Hunk::ED_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash) - -# source://diff-lcs//lib/diff/lcs/hunk.rb#9 -Diff::LCS::Hunk::OLD_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash) - -# source://diff-lcs//lib/diff/lcs/internals.rb#29 -module Diff::LCS::Internals - class << self - # This method will analyze the provided patchset to provide a single-pass - # normalization (conversion of the array form of Diff::LCS::Change objects to - # the object form of same) and detection of whether the patchset represents - # changes to be made. - # - # source://diff-lcs//lib/diff/lcs/internals.rb#102 - def analyze_patchset(patchset, depth = T.unsafe(nil)); end - - # Examine the patchset and the source to see in which direction the - # patch should be applied. - # - # WARNING: By default, this examines the whole patch, so this could take - # some time. This also works better with Diff::LCS::ContextChange or - # Diff::LCS::Change as its source, as an array will cause the creation - # of one of the above. - # - # source://diff-lcs//lib/diff/lcs/internals.rb#147 - def intuit_diff_direction(src, patchset, limit = T.unsafe(nil)); end - - # Compute the longest common subsequence between the sequenced - # Enumerables +a+ and +b+. The result is an array whose contents is such - # that - # - # result = Diff::LCS::Internals.lcs(a, b) - # result.each_with_index do |e, i| - # assert_equal(a[i], b[e]) unless e.nil? - # end - # - # source://diff-lcs//lib/diff/lcs/internals.rb#41 - def lcs(a, b); end - - private - - # If +vector+ maps the matching elements of another collection onto this - # Enumerable, compute the inverse of +vector+ that maps this Enumerable - # onto the collection. (Currently unused.) - # - # source://diff-lcs//lib/diff/lcs/internals.rb#286 - def inverse_vector(a, vector); end - - # Returns a hash mapping each element of an Enumerable to the set of - # positions it occupies in the Enumerable, optionally restricted to the - # elements specified in the range of indexes specified by +interval+. - # - # source://diff-lcs//lib/diff/lcs/internals.rb#298 - def position_hash(enum, interval); end - - # Find the place at which +value+ would normally be inserted into the - # Enumerable. If that place is already occupied by +value+, do nothing - # and return +nil+. If the place does not exist (i.e., it is off the end - # of the Enumerable), add it to the end. Otherwise, replace the element - # at that point with +value+. It is assumed that the Enumerable's values - # are numeric. - # - # This operation preserves the sort order. - # - # source://diff-lcs//lib/diff/lcs/internals.rb#252 - def replace_next_larger(enum, value, last_index = T.unsafe(nil)); end - end -end - -# This will produce a simple array of diff change objects. Each element in -# the #diffs array is a single ContextChange. In the set of #diffs provided -# by SDiffCallbacks, both old and new objects will be presented for both -# changed and unchanged objects. +nil+ will be substituted -# for a discarded object. -# -# The diffset produced by this callback, when provided to Diff::LCS#sdiff, -# will compute and display the necessary components to show two sequences -# and their minimized differences side by side, just like the Unix utility -# +sdiff+. -# -# same same -# before | after -# old < - -# - > new -# -# seq1 = %w(a b c e h j l m n p) -# seq2 = %w(b c d e f j k l m r s t) -# -# diffs = Diff::LCS.sdiff(seq1, seq2) -# # This example shows a simplified array format. -# # [ [ "-", [ 0, "a"], [ 0, nil ] ], -# # [ "=", [ 1, "b"], [ 0, "b" ] ], -# # [ "=", [ 2, "c"], [ 1, "c" ] ], -# # [ "+", [ 3, nil], [ 2, "d" ] ], -# # [ "=", [ 3, "e"], [ 3, "e" ] ], -# # [ "!", [ 4, "h"], [ 4, "f" ] ], -# # [ "=", [ 5, "j"], [ 5, "j" ] ], -# # [ "+", [ 6, nil], [ 6, "k" ] ], -# # [ "=", [ 6, "l"], [ 7, "l" ] ], -# # [ "=", [ 7, "m"], [ 8, "m" ] ], -# # [ "!", [ 8, "n"], [ 9, "r" ] ], -# # [ "!", [ 9, "p"], [ 10, "s" ] ], -# # [ "+", [ 10, nil], [ 11, "t" ] ] ] -# -# The result of this operation is similar to that of -# Diff::LCS::ContextDiffCallbacks. They may be compared as: -# -# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } -# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) -# -# s == c # -> true -# -# === Use -# -# This callback object must be initialised and is used by the Diff::LCS#sdiff -# method. -# -# cbo = Diff::LCS::SDiffCallbacks.new -# Diff::LCS.LCS(seq1, seq2, cbo) -# -# As with the other initialisable callback objects, -# Diff::LCS::SDiffCallbacks can be initialised with a block. As there is no -# "fininishing" to be done, this has no effect on the state of the object. -# -# cbo = Diff::LCS::SDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } -# -# === Simplified Array Format -# -# The simplified array format used in the example above can be obtained -# with: -# -# require 'pp' -# pp diffs.map { |e| e.to_a } -# -# source://diff-lcs//lib/diff/lcs/callbacks.rb#301 -class Diff::LCS::SDiffCallbacks - # :yields self: - # - # @return [SDiffCallbacks] a new instance of SDiffCallbacks - # @yield [_self] - # @yieldparam _self [Diff::LCS::SDiffCallbacks] the object that the method was called on - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#305 - def initialize; end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#322 - def change(event); end - - # Returns the difference set collected during the diff process. - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#303 - def diffs; end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#314 - def discard_a(event); end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#318 - def discard_b(event); end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#310 - def match(event); end -end - -# An alias for DefaultCallbacks that is used in -# Diff::LCS#traverse_sequences. -# -# Diff::LCS.LCS(seq1, seq2, Diff::LCS::SequenceCallbacks) -# -# source://diff-lcs//lib/diff/lcs/callbacks.rb#44 -Diff::LCS::SequenceCallbacks = Diff::LCS::DefaultCallbacks - -# source://diff-lcs//lib/diff/lcs.rb#52 -Diff::LCS::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/drb@2.2.1.rbi b/sorbet/rbi/gems/drb@2.2.1.rbi new file mode 100644 index 000000000..0be7dc71b --- /dev/null +++ b/sorbet/rbi/gems/drb@2.2.1.rbi @@ -0,0 +1,1346 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `drb` gem. +# Please instead update this file by running `bin/tapioca gem drb`. + +# for ruby-1.8.0 +# +# source://drb//lib/drb/eq.rb#2 +module DRb + private + + # Get the configuration of the current server. + # + # If there is no current server, this returns the default configuration. + # See #current_server and DRbServer::make_config. + # + # source://drb//lib/drb/drb.rb#1832 + def config; end + + # Get the 'current' server. + # + # In the context of execution taking place within the main + # thread of a dRuby server (typically, as a result of a remote + # call on the server or one of its objects), the current + # server is that server. Otherwise, the current server is + # the primary server. + # + # If the above rule fails to find a server, a DRbServerNotFound + # error is raised. + # + # @raise [DRbServerNotFound] + # + # source://drb//lib/drb/drb.rb#1789 + def current_server; end + + # Retrieves the server with the given +uri+. + # + # See also regist_server and remove_server. + # + # source://drb//lib/drb/drb.rb#1934 + def fetch_server(uri); end + + # Get the front object of the current server. + # + # This raises a DRbServerNotFound error if there is no current server. + # See #current_server. + # + # source://drb//lib/drb/drb.rb#1843 + def front; end + + # Is +uri+ the URI for the current local server? + # + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1822 + def here?(uri); end + + # Set the default ACL to +acl+. + # + # See DRb::DRbServer.default_acl. + # + # source://drb//lib/drb/drb.rb#1888 + def install_acl(acl); end + + # Set the default id conversion object. + # + # This is expected to be an instance such as DRb::DRbIdConv that responds to + # #to_id and #to_obj that can convert objects to and from DRb references. + # + # See DRbServer#default_id_conv. + # + # source://drb//lib/drb/drb.rb#1880 + def install_id_conv(idconv); end + + # source://drb//lib/drb/drb.rb#1894 + def mutex; end + + # The primary local dRuby server. + # + # This is the server created by the #start_service call. + # + # source://drb//lib/drb/drb.rb#1776 + def primary_server; end + + # The primary local dRuby server. + # + # This is the server created by the #start_service call. + # + # source://drb//lib/drb/drb.rb#1776 + def primary_server=(_arg0); end + + # Registers +server+ with DRb. + # + # This is called when a new DRb::DRbServer is created. + # + # If there is no primary server then +server+ becomes the primary server. + # + # Example: + # + # require 'drb' + # + # s = DRb::DRbServer.new # automatically calls regist_server + # DRb.fetch_server s.uri #=> # + # + # source://drb//lib/drb/drb.rb#1912 + def regist_server(server); end + + # Removes +server+ from the list of registered servers. + # + # source://drb//lib/drb/drb.rb#1921 + def remove_server(server); end + + # Start a dRuby server locally. + # + # The new dRuby server will become the primary server, even + # if another server is currently the primary server. + # + # +uri+ is the URI for the server to bind to. If nil, + # the server will bind to random port on the default local host + # name and use the default dRuby protocol. + # + # +front+ is the server's front object. This may be nil. + # + # +config+ is the configuration for the new server. This may + # be nil. + # + # See DRbServer::new. + # + # source://drb//lib/drb/drb.rb#1768 + def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end + + # Stop the local dRuby server. + # + # This operates on the primary server. If there is no primary + # server currently running, it is a noop. + # + # source://drb//lib/drb/drb.rb#1801 + def stop_service; end + + # Get the thread of the primary server. + # + # This returns nil if there is no primary server. See #primary_server. + # + # source://drb//lib/drb/drb.rb#1869 + def thread; end + + # Get a reference id for an object using the current server. + # + # This raises a DRbServerNotFound error if there is no current server. + # See #current_server. + # + # source://drb//lib/drb/drb.rb#1860 + def to_id(obj); end + + # Convert a reference into an object using the current server. + # + # This raises a DRbServerNotFound error if there is no current server. + # See #current_server. + # + # source://drb//lib/drb/drb.rb#1852 + def to_obj(ref); end + + # Get the URI defining the local dRuby space. + # + # This is the URI of the current server. See #current_server. + # + # source://drb//lib/drb/drb.rb#1810 + def uri; end + + class << self + # Get the configuration of the current server. + # + # If there is no current server, this returns the default configuration. + # See #current_server and DRbServer::make_config. + # + # source://drb//lib/drb/drb.rb#1832 + def config; end + + # Get the 'current' server. + # + # In the context of execution taking place within the main + # thread of a dRuby server (typically, as a result of a remote + # call on the server or one of its objects), the current + # server is that server. Otherwise, the current server is + # the primary server. + # + # If the above rule fails to find a server, a DRbServerNotFound + # error is raised. + # + # @raise [DRbServerNotFound] + # + # source://drb//lib/drb/drb.rb#1789 + def current_server; end + + # Retrieves the server with the given +uri+. + # + # See also regist_server and remove_server. + # + # source://drb//lib/drb/drb.rb#1934 + def fetch_server(uri); end + + # Get the front object of the current server. + # + # This raises a DRbServerNotFound error if there is no current server. + # See #current_server. + # + # source://drb//lib/drb/drb.rb#1843 + def front; end + + # Is +uri+ the URI for the current local server? + # + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1822 + def here?(uri); end + + # Set the default ACL to +acl+. + # + # See DRb::DRbServer.default_acl. + # + # source://drb//lib/drb/drb.rb#1888 + def install_acl(acl); end + + # Set the default id conversion object. + # + # This is expected to be an instance such as DRb::DRbIdConv that responds to + # #to_id and #to_obj that can convert objects to and from DRb references. + # + # See DRbServer#default_id_conv. + # + # source://drb//lib/drb/drb.rb#1880 + def install_id_conv(idconv); end + + # source://drb//lib/drb/drb.rb#1894 + def mutex; end + + # The primary local dRuby server. + # + # This is the server created by the #start_service call. + # + # source://drb//lib/drb/drb.rb#1776 + def primary_server; end + + # The primary local dRuby server. + # + # This is the server created by the #start_service call. + # + # source://drb//lib/drb/drb.rb#1776 + def primary_server=(_arg0); end + + # Registers +server+ with DRb. + # + # This is called when a new DRb::DRbServer is created. + # + # If there is no primary server then +server+ becomes the primary server. + # + # Example: + # + # require 'drb' + # + # s = DRb::DRbServer.new # automatically calls regist_server + # DRb.fetch_server s.uri #=> # + # + # source://drb//lib/drb/drb.rb#1912 + def regist_server(server); end + + # Removes +server+ from the list of registered servers. + # + # source://drb//lib/drb/drb.rb#1921 + def remove_server(server); end + + # Start a dRuby server locally. + # + # The new dRuby server will become the primary server, even + # if another server is currently the primary server. + # + # +uri+ is the URI for the server to bind to. If nil, + # the server will bind to random port on the default local host + # name and use the default dRuby protocol. + # + # +front+ is the server's front object. This may be nil. + # + # +config+ is the configuration for the new server. This may + # be nil. + # + # See DRbServer::new. + # + # source://drb//lib/drb/drb.rb#1768 + def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end + + # Stop the local dRuby server. + # + # This operates on the primary server. If there is no primary + # server currently running, it is a noop. + # + # source://drb//lib/drb/drb.rb#1801 + def stop_service; end + + # Get the thread of the primary server. + # + # This returns nil if there is no primary server. See #primary_server. + # + # source://drb//lib/drb/drb.rb#1869 + def thread; end + + # Get a reference id for an object using the current server. + # + # This raises a DRbServerNotFound error if there is no current server. + # See #current_server. + # + # source://drb//lib/drb/drb.rb#1860 + def to_id(obj); end + + # Convert a reference into an object using the current server. + # + # This raises a DRbServerNotFound error if there is no current server. + # See #current_server. + # + # source://drb//lib/drb/drb.rb#1852 + def to_obj(ref); end + + # Get the URI defining the local dRuby space. + # + # This is the URI of the current server. See #current_server. + # + # source://drb//lib/drb/drb.rb#1810 + def uri; end + end +end + +# An Array wrapper that can be sent to another server via DRb. +# +# All entries in the array will be dumped or be references that point to +# the local server. +# +# source://drb//lib/drb/drb.rb#518 +class DRb::DRbArray + # Creates a new DRbArray that either dumps or wraps all the items in the + # Array +ary+ so they can be loaded by a remote DRb server. + # + # @return [DRbArray] a new instance of DRbArray + # + # source://drb//lib/drb/drb.rb#523 + def initialize(ary); end + + # source://drb//lib/drb/drb.rb#542 + def _dump(lv); end + + class << self + # source://drb//lib/drb/drb.rb#538 + def _load(s); end + end +end + +# Class handling the connection between a DRbObject and the +# server the real object lives on. +# +# This class maintains a pool of connections, to reduce the +# overhead of starting and closing down connections for each +# method call. +# +# This class is used internally by DRbObject. The user does +# not normally need to deal with it directly. +# +# source://drb//lib/drb/drb.rb#1256 +class DRb::DRbConn + # @return [DRbConn] a new instance of DRbConn + # + # source://drb//lib/drb/drb.rb#1317 + def initialize(remote_uri); end + + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1333 + def alive?; end + + # source://drb//lib/drb/drb.rb#1328 + def close; end + + # source://drb//lib/drb/drb.rb#1323 + def send_message(ref, msg_id, arg, block); end + + # source://drb//lib/drb/drb.rb#1321 + def uri; end + + class << self + # source://drb//lib/drb/drb.rb#1259 + def make_pool; end + + # source://drb//lib/drb/drb.rb#1297 + def open(remote_uri); end + + # source://drb//lib/drb/drb.rb#1292 + def stop_pool; end + end +end + +# Class responsible for converting between an object and its id. +# +# This, the default implementation, uses an object's local ObjectSpace +# __id__ as its id. This means that an object's identification over +# drb remains valid only while that object instance remains alive +# within the server runtime. +# +# For alternative mechanisms, see DRb::TimerIdConv in drb/timeridconv.rb +# and DRbNameIdConv in sample/name.rb in the full drb distribution. +# +# source://drb//lib/drb/drb.rb#360 +class DRb::DRbIdConv + # Convert an object into a reference id. + # + # This implementation returns the object's __id__ in the local + # object space. + # + # source://drb//lib/drb/drb.rb#374 + def to_id(obj); end + + # Convert an object reference id to an object. + # + # This implementation looks up the reference id in the local object + # space and returns the object it refers to. + # + # source://drb//lib/drb/drb.rb#366 + def to_obj(ref); end +end + +# Handler for sending and receiving drb messages. +# +# This takes care of the low-level marshalling and unmarshalling +# of drb requests and responses sent over the wire between server +# and client. This relieves the implementor of a new drb +# protocol layer with having to deal with these details. +# +# The user does not have to directly deal with this object in +# normal use. +# +# source://drb//lib/drb/drb.rb#556 +class DRb::DRbMessage + # @return [DRbMessage] a new instance of DRbMessage + # + # source://drb//lib/drb/drb.rb#557 + def initialize(config); end + + # source://drb//lib/drb/drb.rb#562 + def dump(obj, error = T.unsafe(nil)); end + + # @raise [DRbConnError] + # + # source://drb//lib/drb/drb.rb#579 + def load(soc); end + + # source://drb//lib/drb/drb.rb#639 + def recv_reply(stream); end + + # @raise [DRbConnError] + # + # source://drb//lib/drb/drb.rb#619 + def recv_request(stream); end + + # source://drb//lib/drb/drb.rb#633 + def send_reply(stream, succ, result); end + + # source://drb//lib/drb/drb.rb#605 + def send_request(stream, ref, msg_id, arg, b); end + + private + + # source://drb//lib/drb/drb.rb#646 + def make_proxy(obj, error = T.unsafe(nil)); end +end + +# source://drb//lib/drb/eq.rb#3 +class DRb::DRbObject + # Create a new remote object stub. + # + # +obj+ is the (local) object we want to create a stub for. Normally + # this is +nil+. +uri+ is the URI of the remote object that this + # will be a stub for. + # + # @return [DRbObject] a new instance of DRbObject + # + # source://drb//lib/drb/drb.rb#1089 + def initialize(obj, uri = T.unsafe(nil)); end + + # source://drb//lib/drb/eq.rb#4 + def ==(other); end + + # Get the reference of the object, if local. + # + # source://drb//lib/drb/drb.rb#1115 + def __drbref; end + + # Get the URI of the remote object. + # + # source://drb//lib/drb/drb.rb#1110 + def __drburi; end + + # Marshall this object. + # + # The URI and ref of the object are marshalled. + # + # source://drb//lib/drb/drb.rb#1080 + def _dump(lv); end + + # source://drb//lib/drb/eq.rb#4 + def eql?(other); end + + # source://drb//lib/drb/eq.rb#9 + def hash; end + + # source://drb//lib/drb/drb.rb#1135 + def method_missing(msg_id, *a, **_arg2, &b); end + + # source://drb//lib/drb/drb.rb#1187 + def pretty_print(q); end + + # source://drb//lib/drb/drb.rb#1191 + def pretty_print_cycle(q); end + + # Routes respond_to? to the referenced remote object. + # + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1123 + def respond_to?(msg_id, priv = T.unsafe(nil)); end + + class << self + # Unmarshall a marshalled DRbObject. + # + # If the referenced object is located within the local server, then + # the object itself is returned. Otherwise, a new DRbObject is + # created to act as a stub for the remote referenced object. + # + # source://drb//lib/drb/drb.rb#1051 + def _load(s); end + + # Creates a DRb::DRbObject given the reference information to the remote + # host +uri+ and object +ref+. + # + # source://drb//lib/drb/drb.rb#1065 + def new_with(uri, ref); end + + # Create a new DRbObject from a URI alone. + # + # source://drb//lib/drb/drb.rb#1073 + def new_with_uri(uri); end + + # Returns a modified backtrace from +result+ with the +uri+ where each call + # in the backtrace came from. + # + # source://drb//lib/drb/drb.rb#1173 + def prepare_backtrace(uri, result); end + + # Given the +uri+ of another host executes the block provided. + # + # source://drb//lib/drb/drb.rb#1160 + def with_friend(uri); end + end +end + +# Module managing the underlying network protocol(s) used by drb. +# +# By default, drb uses the DRbTCPSocket protocol. Other protocols +# can be defined. A protocol must define the following class methods: +# +# [open(uri, config)] Open a client connection to the server at +uri+, +# using configuration +config+. Return a protocol +# instance for this connection. +# [open_server(uri, config)] Open a server listening at +uri+, +# using configuration +config+. Return a +# protocol instance for this listener. +# [uri_option(uri, config)] Take a URI, possibly containing an option +# component (e.g. a trailing '?param=val'), +# and return a [uri, option] tuple. +# +# All of these methods should raise a DRbBadScheme error if the URI +# does not identify the protocol they support (e.g. "druby:" for +# the standard Ruby protocol). This is how the DRbProtocol module, +# given a URI, determines which protocol implementation serves that +# protocol. +# +# The protocol instance returned by #open_server must have the +# following methods: +# +# [accept] Accept a new connection to the server. Returns a protocol +# instance capable of communicating with the client. +# [close] Close the server connection. +# [uri] Get the URI for this server. +# +# The protocol instance returned by #open must have the following methods: +# +# [send_request (ref, msg_id, arg, b)] +# Send a request to +ref+ with the given message id and arguments. +# This is most easily implemented by calling DRbMessage.send_request, +# providing a stream that sits on top of the current protocol. +# [recv_reply] +# Receive a reply from the server and return it as a [success-boolean, +# reply-value] pair. This is most easily implemented by calling +# DRb.recv_reply, providing a stream that sits on top of the +# current protocol. +# [alive?] +# Is this connection still alive? +# [close] +# Close this connection. +# +# The protocol instance returned by #open_server().accept() must have +# the following methods: +# +# [recv_request] +# Receive a request from the client and return a [object, message, +# args, block] tuple. This is most easily implemented by calling +# DRbMessage.recv_request, providing a stream that sits on top of +# the current protocol. +# [send_reply(succ, result)] +# Send a reply to the client. This is most easily implemented +# by calling DRbMessage.send_reply, providing a stream that sits +# on top of the current protocol. +# [close] +# Close this connection. +# +# A new protocol is registered with the DRbProtocol module using +# the add_protocol method. +# +# For examples of other protocols, see DRbUNIXSocket in drb/unix.rb, +# and HTTP0 in sample/http0.rb and sample/http0serv.rb in the full +# drb distribution. +# +# source://drb//lib/drb/drb.rb#721 +module DRb::DRbProtocol + private + + # Add a new protocol to the DRbProtocol module. + # + # source://drb//lib/drb/drb.rb#724 + def add_protocol(prot); end + + # source://drb//lib/drb/drb.rb#802 + def auto_load(uri); end + + # Open a client connection to +uri+ with the configuration +config+. + # + # The DRbProtocol module asks each registered protocol in turn to + # try to open the URI. Each protocol signals that it does not handle that + # URI by raising a DRbBadScheme error. If no protocol recognises the + # URI, then a DRbBadURI error is raised. If a protocol accepts the + # URI, but an error occurs in opening it, a DRbConnError is raised. + # + # @raise [DRbBadURI] + # + # source://drb//lib/drb/drb.rb#736 + def open(uri, config, first = T.unsafe(nil)); end + + # Open a server listening for connections at +uri+ with + # configuration +config+. + # + # The DRbProtocol module asks each registered protocol in turn to + # try to open a server at the URI. Each protocol signals that it does + # not handle that URI by raising a DRbBadScheme error. If no protocol + # recognises the URI, then a DRbBadURI error is raised. If a protocol + # accepts the URI, but an error occurs in opening it, the underlying + # error is passed on to the caller. + # + # @raise [DRbBadURI] + # + # source://drb//lib/drb/drb.rb#764 + def open_server(uri, config, first = T.unsafe(nil)); end + + # Parse +uri+ into a [uri, option] pair. + # + # The DRbProtocol module asks each registered protocol in turn to + # try to parse the URI. Each protocol signals that it does not handle that + # URI by raising a DRbBadScheme error. If no protocol recognises the + # URI, then a DRbBadURI error is raised. + # + # @raise [DRbBadURI] + # + # source://drb//lib/drb/drb.rb#785 + def uri_option(uri, config, first = T.unsafe(nil)); end + + class << self + # Add a new protocol to the DRbProtocol module. + # + # source://drb//lib/drb/drb.rb#724 + def add_protocol(prot); end + + # source://drb//lib/drb/drb.rb#802 + def auto_load(uri); end + + # Open a client connection to +uri+ with the configuration +config+. + # + # The DRbProtocol module asks each registered protocol in turn to + # try to open the URI. Each protocol signals that it does not handle that + # URI by raising a DRbBadScheme error. If no protocol recognises the + # URI, then a DRbBadURI error is raised. If a protocol accepts the + # URI, but an error occurs in opening it, a DRbConnError is raised. + # + # @raise [DRbBadURI] + # + # source://drb//lib/drb/drb.rb#736 + def open(uri, config, first = T.unsafe(nil)); end + + # Open a server listening for connections at +uri+ with + # configuration +config+. + # + # The DRbProtocol module asks each registered protocol in turn to + # try to open a server at the URI. Each protocol signals that it does + # not handle that URI by raising a DRbBadScheme error. If no protocol + # recognises the URI, then a DRbBadURI error is raised. If a protocol + # accepts the URI, but an error occurs in opening it, the underlying + # error is passed on to the caller. + # + # @raise [DRbBadURI] + # + # source://drb//lib/drb/drb.rb#764 + def open_server(uri, config, first = T.unsafe(nil)); end + + # Parse +uri+ into a [uri, option] pair. + # + # The DRbProtocol module asks each registered protocol in turn to + # try to parse the URI. Each protocol signals that it does not handle that + # URI by raising a DRbBadScheme error. If no protocol recognises the + # URI, then a DRbBadURI error is raised. + # + # @raise [DRbBadURI] + # + # source://drb//lib/drb/drb.rb#785 + def uri_option(uri, config, first = T.unsafe(nil)); end + end +end + +# An exception wrapping an error object +# +# source://drb//lib/drb/drb.rb#431 +class DRb::DRbRemoteError < ::DRb::DRbError + # Creates a new remote error that wraps the Exception +error+ + # + # @return [DRbRemoteError] a new instance of DRbRemoteError + # + # source://drb//lib/drb/drb.rb#434 + def initialize(error); end + + # the class of the error, as a string. + # + # source://drb//lib/drb/drb.rb#441 + def reason; end +end + +# source://drb//lib/drb/drb.rb#1350 +class DRb::DRbServer + # Create a new DRbServer instance. + # + # +uri+ is the URI to bind to. This is normally of the form + # 'druby://:' where is a hostname of + # the local machine. If nil, then the system's default hostname + # will be bound to, on a port selected by the system; these value + # can be retrieved from the +uri+ attribute. 'druby:' specifies + # the default dRuby transport protocol: another protocol, such + # as 'drbunix:', can be specified instead. + # + # +front+ is the front object for the server, that is, the object + # to which remote method calls on the server will be passed. If + # nil, then the server will not accept remote method calls. + # + # If +config_or_acl+ is a hash, it is the configuration to + # use for this server. The following options are recognised: + # + # :idconv :: an id-to-object conversion object. This defaults + # to an instance of the class DRb::DRbIdConv. + # :verbose :: if true, all unsuccessful remote calls on objects + # in the server will be logged to $stdout. false + # by default. + # :tcp_acl :: the access control list for this server. See + # the ACL class from the main dRuby distribution. + # :load_limit :: the maximum message size in bytes accepted by + # the server. Defaults to 25 MB (26214400). + # :argc_limit :: the maximum number of arguments to a remote + # method accepted by the server. Defaults to + # 256. + # The default values of these options can be modified on + # a class-wide basis by the class methods #default_argc_limit, + # #default_load_limit, #default_acl, #default_id_conv, + # and #verbose= + # + # If +config_or_acl+ is not a hash, but is not nil, it is + # assumed to be the access control list for this server. + # See the :tcp_acl option for more details. + # + # If no other server is currently set as the primary server, + # this will become the primary server. + # + # The server will immediately start running in its own thread. + # + # @return [DRbServer] a new instance of DRbServer + # + # source://drb//lib/drb/drb.rb#1451 + def initialize(uri = T.unsafe(nil), front = T.unsafe(nil), config_or_acl = T.unsafe(nil)); end + + # Is this server alive? + # + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1506 + def alive?; end + + # Check that a method is callable via dRuby. + # + # +obj+ is the object we want to invoke the method on. +msg_id+ is the + # method name, as a Symbol. + # + # If the method is an insecure method (see #insecure_method?) a + # SecurityError is thrown. If the method is private or undefined, + # a NameError is thrown. + # + # @raise [ArgumentError] + # + # source://drb//lib/drb/drb.rb#1594 + def check_insecure_method(obj, msg_id); end + + # The configuration of this DRbServer + # + # source://drb//lib/drb/drb.rb#1493 + def config; end + + # The front object of the DRbServer. + # + # This object receives remote method calls made on the server's + # URI alone, with an object id. + # + # source://drb//lib/drb/drb.rb#1490 + def front; end + + # Is +uri+ the URI for this server? + # + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1511 + def here?(uri); end + + # Stop this server. + # + # source://drb//lib/drb/drb.rb#1516 + def stop_service; end + + # The main thread of this DRbServer. + # + # This is the thread that listens for and accepts connections + # from clients, not that handles each client's request-response + # session. + # + # source://drb//lib/drb/drb.rb#1484 + def thread; end + + # Convert a local object to a dRuby reference. + # + # source://drb//lib/drb/drb.rb#1533 + def to_id(obj); end + + # Convert a dRuby reference to the local object it refers to. + # + # source://drb//lib/drb/drb.rb#1526 + def to_obj(ref); end + + # The URI of this DRbServer. + # + # source://drb//lib/drb/drb.rb#1477 + def uri; end + + # Get whether the server is in verbose mode. + # + # In verbose mode, failed calls are logged to stdout. + # + # source://drb//lib/drb/drb.rb#1503 + def verbose; end + + # Set whether to operate in verbose mode. + # + # In verbose mode, failed calls are logged to stdout. + # + # source://drb//lib/drb/drb.rb#1498 + def verbose=(v); end + + private + + # Coerce an object to a string, providing our own representation if + # to_s is not defined for the object. + # + # source://drb//lib/drb/drb.rb#1580 + def any_to_s(obj); end + + # source://drb//lib/drb/drb.rb#1696 + def error_print(exception); end + + # Has a method been included in the list of insecure methods? + # + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1574 + def insecure_method?(msg_id); end + + # The main loop performed by a DRbServer's internal thread. + # + # Accepts a connection from a client, and starts up its own + # thread to handle it. This thread loops, receiving requests + # from the client, invoking them on a local object, and + # returning responses, until the client closes the connection + # or a local method call fails. + # + # source://drb//lib/drb/drb.rb#1714 + def main_loop; end + + # Starts the DRb main loop in a new thread. + # + # source://drb//lib/drb/drb.rb#1555 + def run; end + + # source://drb//lib/drb/drb.rb#1540 + def shutdown; end + + class << self + # Set the default access control list to +acl+. The default ACL is +nil+. + # + # See also DRb::ACL and #new() + # + # source://drb//lib/drb/drb.rb#1375 + def default_acl(acl); end + + # Set the default value for the :argc_limit option. + # + # See #new(). The initial default value is 256. + # + # source://drb//lib/drb/drb.rb#1361 + def default_argc_limit(argc); end + + # Set the default value for the :id_conv option. + # + # See #new(). The initial default value is a DRbIdConv instance. + # + # source://drb//lib/drb/drb.rb#1382 + def default_id_conv(idconv); end + + # Set the default value for the :load_limit option. + # + # See #new(). The initial default value is 25 MB. + # + # source://drb//lib/drb/drb.rb#1368 + def default_load_limit(sz); end + + # source://drb//lib/drb/drb.rb#1398 + def make_config(hash = T.unsafe(nil)); end + + # Get the default value of the :verbose option. + # + # source://drb//lib/drb/drb.rb#1394 + def verbose; end + + # Set the default value of the :verbose option. + # + # See #new(). The initial default value is false. + # + # source://drb//lib/drb/drb.rb#1389 + def verbose=(on); end + end +end + +# source://drb//lib/drb/drb.rb#1624 +class DRb::DRbServer::InvokeMethod + include ::DRb::DRbServer::InvokeMethod18Mixin + + # @return [InvokeMethod] a new instance of InvokeMethod + # + # source://drb//lib/drb/drb.rb#1625 + def initialize(drb_server, client); end + + # source://drb//lib/drb/drb.rb#1630 + def perform; end + + private + + # source://drb//lib/drb/drb.rb#1667 + def check_insecure_method; end + + # source://drb//lib/drb/drb.rb#1659 + def init_with_client; end + + # source://drb//lib/drb/drb.rb#1676 + def perform_without_block; end + + # source://drb//lib/drb/drb.rb#1671 + def setup_message; end +end + +# source://drb//lib/drb/invokemethod.rb#6 +module DRb::DRbServer::InvokeMethod18Mixin + # source://drb//lib/drb/invokemethod.rb#7 + def block_yield(x); end + + # source://drb//lib/drb/invokemethod.rb#14 + def perform_with_block; end +end + +# The default drb protocol which communicates over a TCP socket. +# +# The DRb TCP protocol URI looks like: +# druby://:?. The option is optional. +# +# source://drb//lib/drb/drb.rb#815 +class DRb::DRbTCPSocket + # Create a new DRbTCPSocket instance. + # + # +uri+ is the URI we are connected to. + # +soc+ is the tcp socket we are bound to. +config+ is our + # configuration. + # + # @return [DRbTCPSocket] a new instance of DRbTCPSocket + # + # source://drb//lib/drb/drb.rb#903 + def initialize(uri, soc, config = T.unsafe(nil)); end + + # On the server side, for an instance returned by #open_server, + # accept a client connection and return a new instance to handle + # the server's side of this client-server session. + # + # source://drb//lib/drb/drb.rb#971 + def accept; end + + # Check to see if this connection is alive. + # + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1001 + def alive?; end + + # Close the connection. + # + # If this is an instance returned by #open_server, then this stops + # listening for new connections altogether. If this is an instance + # returned by #open or by #accept, then it closes this particular + # client-server session. + # + # source://drb//lib/drb/drb.rb#953 + def close; end + + # Get the address of our TCP peer (the other end of the socket + # we are bound to. + # + # source://drb//lib/drb/drb.rb#918 + def peeraddr; end + + # On the client side, receive a reply from the server. + # + # source://drb//lib/drb/drb.rb#941 + def recv_reply; end + + # On the server side, receive a request from the client. + # + # source://drb//lib/drb/drb.rb#931 + def recv_request; end + + # On the server side, send a reply to the client. + # + # source://drb//lib/drb/drb.rb#936 + def send_reply(succ, result); end + + # On the client side, send a request to the server. + # + # source://drb//lib/drb/drb.rb#926 + def send_request(ref, msg_id, arg, b); end + + # source://drb//lib/drb/drb.rb#1010 + def set_sockopt(soc); end + + # Graceful shutdown + # + # source://drb//lib/drb/drb.rb#996 + def shutdown; end + + # Get the socket. + # + # source://drb//lib/drb/drb.rb#923 + def stream; end + + # Get the URI that we are connected to. + # + # source://drb//lib/drb/drb.rb#914 + def uri; end + + private + + # source://drb//lib/drb/drb.rb#986 + def accept_or_shutdown; end + + # source://drb//lib/drb/drb.rb#962 + def close_shutdown_pipe; end + + class << self + # Returns the hostname of this server + # + # source://drb//lib/drb/drb.rb#845 + def getservername; end + + # Open a client connection to +uri+ (DRb URI string) using configuration + # +config+. + # + # This can raise DRb::DRbBadScheme or DRb::DRbBadURI if +uri+ is not for a + # recognized protocol. See DRb::DRbServer.new for information on built-in + # URI protocols. + # + # source://drb//lib/drb/drb.rb#838 + def open(uri, config); end + + # Open a server listening for connections at +uri+ using + # configuration +config+. + # + # source://drb//lib/drb/drb.rb#876 + def open_server(uri, config); end + + # For the families available for +host+, returns a TCPServer on +port+. + # If +port+ is 0 the first available port is used. IPv4 servers are + # preferred over IPv6 servers. + # + # source://drb//lib/drb/drb.rb#861 + def open_server_inaddr_any(host, port); end + + # source://drb//lib/drb/drb.rb#818 + def parse_uri(uri); end + + # Parse +uri+ into a [uri, option] pair. + # + # source://drb//lib/drb/drb.rb#893 + def uri_option(uri, config); end + end +end + +# Implements DRb over a UNIX socket +# +# 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//lib/drb/unix.rb#62 + def initialize(uri, soc, config = T.unsafe(nil), server_mode = T.unsafe(nil)); end + + # source://drb//lib/drb/unix.rb#105 + def accept; end + + # source://drb//lib/drb/unix.rb#95 + def close; end + + # source://drb//lib/drb/unix.rb#111 + def set_sockopt(soc); end + + class << self + # source://drb//lib/drb/unix.rb#28 + def open(uri, config); end + + # source://drb//lib/drb/unix.rb#34 + def open_server(uri, config); end + + # :stopdoc: + # + # source://drb//lib/drb/unix.rb#17 + def parse_uri(uri); end + + # source://drb//lib/drb/unix.rb#72 + def temp_server; end + + # source://drb//lib/drb/unix.rb#57 + def uri_option(uri, config); end + end +end + +# import from tempfile.rb +# +# 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//lib/drb/drb.rb#1022 + def initialize(option); end + + # source://drb//lib/drb/drb.rb#1028 + def ==(other); end + + # source://drb//lib/drb/drb.rb#1028 + def eql?(other); end + + # source://drb//lib/drb/drb.rb#1033 + def hash; end + + # Returns the value of attribute option. + # + # source://drb//lib/drb/drb.rb#1025 + def option; end + + # source://drb//lib/drb/drb.rb#1026 + def to_s; end +end + +# Mixin module making an object undumpable or unmarshallable. +# +# If an object which includes this module is returned by method +# called over drb, then the object remains in the server space +# and a reference to the object is returned, rather than the +# object being marshalled and moved into the client space. +# +# source://drb//lib/drb/drb.rb#390 +module DRb::DRbUndumped + # @raise [TypeError] + # + # source://drb//lib/drb/drb.rb#391 + def _dump(dummy); end +end + +# Class wrapping a marshalled object whose type is unknown locally. +# +# If an object is returned by a method invoked over drb, but the +# class of the object is unknown in the client namespace, or +# the object is a constant unknown in the client namespace, then +# the still-marshalled object is returned wrapped in a DRbUnknown instance. +# +# If this object is passed as an argument to a method invoked over +# drb, then the wrapped object is passed instead. +# +# The class or constant name of the object can be read from the +# +name+ attribute. The marshalled object is held in the +buf+ +# attribute. +# +# source://drb//lib/drb/drb.rb#457 +class DRb::DRbUnknown + # Create a new DRbUnknown object. + # + # +buf+ is a string containing a marshalled object that could not + # be unmarshalled. +err+ is the error message that was raised + # when the unmarshalling failed. It is used to determine the + # name of the unmarshalled object. + # + # @return [DRbUnknown] a new instance of DRbUnknown + # + # source://drb//lib/drb/drb.rb#465 + def initialize(err, buf); end + + # source://drb//lib/drb/drb.rb#494 + def _dump(lv); end + + # Buffer contained the marshalled, unknown object. + # + # source://drb//lib/drb/drb.rb#484 + def buf; end + + # Create a DRbUnknownError exception containing this object. + # + # source://drb//lib/drb/drb.rb#508 + def exception; end + + # The name of the unknown thing. + # + # Class name for unknown objects; variable name for unknown + # constants. + # + # source://drb//lib/drb/drb.rb#481 + def name; end + + # Attempt to load the wrapped marshalled object again. + # + # If the class of the object is now known locally, the object + # will be unmarshalled and returned. Otherwise, a new + # but identical DRbUnknown object will be returned. + # + # source://drb//lib/drb/drb.rb#503 + def reload; end + + class << self + # source://drb//lib/drb/drb.rb#486 + def _load(s); end + end +end + +# An exception wrapping a DRb::DRbUnknown object +# +# source://drb//lib/drb/drb.rb#410 +class DRb::DRbUnknownError < ::DRb::DRbError + # Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+ + # + # @return [DRbUnknownError] a new instance of DRbUnknownError + # + # source://drb//lib/drb/drb.rb#413 + def initialize(unknown); end + + # source://drb//lib/drb/drb.rb#425 + def _dump(lv); end + + # Get the wrapped DRb::DRbUnknown object. + # + # source://drb//lib/drb/drb.rb#419 + def unknown; end + + class << self + # source://drb//lib/drb/drb.rb#421 + def _load(s); end + end +end + +# source://drb//lib/drb/drb.rb#1199 +class DRb::ThreadObject + include ::MonitorMixin + + # @return [ThreadObject] a new instance of ThreadObject + # + # source://drb//lib/drb/drb.rb#1202 + def initialize(&blk); end + + # source://drb//lib/drb/drb.rb#1237 + def _execute; end + + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1213 + def alive?; end + + # source://drb//lib/drb/drb.rb#1217 + def kill; end + + # source://drb//lib/drb/drb.rb#1222 + def method_missing(msg, *arg, &blk); end +end + +# source://drb//lib/drb/version.rb#2 +DRb::VERSION = T.let(T.unsafe(nil), String) + +# source://drb//lib/drb/drb.rb#1943 +DRbIdConv = DRb::DRbIdConv + +# :stopdoc: +# +# source://drb//lib/drb/drb.rb#1941 +DRbObject = DRb::DRbObject + +# source://drb//lib/drb/drb.rb#1942 +DRbUndumped = DRb::DRbUndumped diff --git a/sorbet/rbi/gems/dry-configurable@1.0.1.rbi b/sorbet/rbi/gems/dry-configurable@1.0.1.rbi deleted file mode 100644 index 04ef85d9b..000000000 --- a/sorbet/rbi/gems/dry-configurable@1.0.1.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `dry-configurable` gem. -# Please instead update this file by running `bin/tapioca gem dry-configurable`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/dry-core@1.0.0.rbi b/sorbet/rbi/gems/dry-core@1.0.0.rbi deleted file mode 100644 index e1f83a85a..000000000 --- a/sorbet/rbi/gems/dry-core@1.0.0.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `dry-core` gem. -# Please instead update this file by running `bin/tapioca gem dry-core`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/dry-inflector@1.0.0.rbi b/sorbet/rbi/gems/dry-inflector@1.0.0.rbi deleted file mode 100644 index de691702a..000000000 --- a/sorbet/rbi/gems/dry-inflector@1.0.0.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `dry-inflector` gem. -# Please instead update this file by running `bin/tapioca gem dry-inflector`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/dry-initializer@3.1.1.rbi b/sorbet/rbi/gems/dry-initializer@3.1.1.rbi deleted file mode 100644 index cf964cd29..000000000 --- a/sorbet/rbi/gems/dry-initializer@3.1.1.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `dry-initializer` gem. -# Please instead update this file by running `bin/tapioca gem dry-initializer`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/dry-logic@1.5.0.rbi b/sorbet/rbi/gems/dry-logic@1.5.0.rbi deleted file mode 100644 index 0e92f479c..000000000 --- a/sorbet/rbi/gems/dry-logic@1.5.0.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `dry-logic` gem. -# Please instead update this file by running `bin/tapioca gem dry-logic`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/dry-schema@1.13.2.rbi b/sorbet/rbi/gems/dry-schema@1.13.2.rbi deleted file mode 100644 index 73da99c31..000000000 --- a/sorbet/rbi/gems/dry-schema@1.13.2.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `dry-schema` gem. -# Please instead update this file by running `bin/tapioca gem dry-schema`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/dry-types@1.7.1.rbi b/sorbet/rbi/gems/dry-types@1.7.1.rbi deleted file mode 100644 index c02588703..000000000 --- a/sorbet/rbi/gems/dry-types@1.7.1.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `dry-types` gem. -# Please instead update this file by running `bin/tapioca gem dry-types`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/dry-validation@1.10.0.rbi b/sorbet/rbi/gems/dry-validation@1.10.0.rbi deleted file mode 100644 index 44f0beb9e..000000000 --- a/sorbet/rbi/gems/dry-validation@1.10.0.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `dry-validation` gem. -# Please instead update this file by running `bin/tapioca gem dry-validation`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/frozen_record@0.27.0.rbi b/sorbet/rbi/gems/frozen_record@0.27.1.rbi similarity index 92% rename from sorbet/rbi/gems/frozen_record@0.27.0.rbi rename to sorbet/rbi/gems/frozen_record@0.27.1.rbi index b8104786c..fa39dfce9 100644 --- a/sorbet/rbi/gems/frozen_record@0.27.0.rbi +++ b/sorbet/rbi/gems/frozen_record@0.27.1.rbi @@ -108,17 +108,17 @@ class FrozenRecord::Base # source://frozen_record//lib/frozen_record/base.rb#298 def attribute(attr); end - # source://activemodel/7.0.4.3/lib/active_model/attribute_methods.rb#73 + # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#72 def attribute_aliases; end - # source://activemodel/7.0.4.3/lib/active_model/attribute_methods.rb#73 + # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#72 def attribute_aliases?; end - # source://activemodel/7.0.4.3/lib/active_model/attribute_methods.rb#74 - def attribute_method_matchers; end + # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#73 + def attribute_method_patterns; end - # source://activemodel/7.0.4.3/lib/active_model/attribute_methods.rb#74 - def attribute_method_matchers?; end + # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#73 + def attribute_method_patterns?; end # source://frozen_record//lib/frozen_record/base.rb#290 def attributes; end @@ -126,14 +126,17 @@ class FrozenRecord::Base # source://frozen_record//lib/frozen_record/base.rb#294 def id; end - # source://activemodel/7.0.4.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 def include_root_in_json; end - # source://activemodel/7.0.4.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 def include_root_in_json?; end - # source://activemodel/7.0.4.3/lib/active_model/naming.rb#244 - def model_name(*_arg0, **_arg1, &_arg2); end + # source://activemodel/7.1.3/lib/active_model/naming.rb#255 + def model_name(&block); end + + # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + def param_delimiter=(_arg0); end # @return [Boolean] # @@ -182,13 +185,13 @@ class FrozenRecord::Base # source://frozen_record//lib/frozen_record/base.rb#159 def attribute(attribute, klass); end - # source://activemodel/7.0.4.3/lib/active_model/attribute_methods.rb#73 + # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#72 def attribute_aliases; end - # source://activemodel/7.0.4.3/lib/active_model/attribute_methods.rb#73 + # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#72 def attribute_aliases=(value); end - # source://activemodel/7.0.4.3/lib/active_model/attribute_methods.rb#73 + # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#72 def attribute_aliases?; end # source://frozen_record//lib/frozen_record/base.rb#33 @@ -200,14 +203,14 @@ class FrozenRecord::Base # source://frozen_record//lib/frozen_record/base.rb#33 def attribute_deserializers?; end - # source://activemodel/7.0.4.3/lib/active_model/attribute_methods.rb#74 - def attribute_method_matchers; end + # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#73 + def attribute_method_patterns; end - # source://activemodel/7.0.4.3/lib/active_model/attribute_methods.rb#74 - def attribute_method_matchers=(value); end + # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#73 + def attribute_method_patterns=(value); end - # source://activemodel/7.0.4.3/lib/active_model/attribute_methods.rb#74 - def attribute_method_matchers?; end + # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#73 + def attribute_method_patterns?; end # source://frozen_record//lib/frozen_record/base.rb#92 def attributes; end @@ -297,13 +300,13 @@ class FrozenRecord::Base # source://frozen_record//lib/frozen_record/base.rb#112 def ids(*_arg0, **_arg1, &_arg2); end - # source://activemodel/7.0.4.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 def include_root_in_json; end - # source://activemodel/7.0.4.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 def include_root_in_json=(value); end - # source://activemodel/7.0.4.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 def include_root_in_json?; end # source://frozen_record//lib/frozen_record/base.rb#32 @@ -354,6 +357,15 @@ class FrozenRecord::Base # source://frozen_record//lib/frozen_record/base.rb#112 def order(*_arg0, **_arg1, &_arg2); end + # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + def param_delimiter; end + + # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + def param_delimiter=(value); end + + # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + def param_delimiter?; end + # source://frozen_record//lib/frozen_record/base.rb#112 def pluck(*_arg0, **_arg1, &_arg2); end @@ -533,6 +545,9 @@ class FrozenRecord::Index::AttributeNonUnique < ::StandardError; end # source://frozen_record//lib/frozen_record/index.rb#5 FrozenRecord::Index::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) +# source://frozen_record//lib/frozen_record/railtie.rb#4 +class FrozenRecord::Railtie < ::Rails::Railtie; end + # source://frozen_record//lib/frozen_record/minimal.rb#14 class FrozenRecord::RecordNotFound < ::StandardError; end diff --git a/sorbet/rbi/gems/globalid@1.1.0.rbi b/sorbet/rbi/gems/globalid@1.2.1.rbi similarity index 52% rename from sorbet/rbi/gems/globalid@1.1.0.rbi rename to sorbet/rbi/gems/globalid@1.2.1.rbi index 3c36525b2..7398824dc 100644 --- a/sorbet/rbi/gems/globalid@1.1.0.rbi +++ b/sorbet/rbi/gems/globalid@1.2.1.rbi @@ -13,25 +13,25 @@ class GlobalID # source://globalid//lib/global_id/global_id.rb#44 def initialize(gid, options = T.unsafe(nil)); end - # source://globalid//lib/global_id/global_id.rb#62 + # source://globalid//lib/global_id/global_id.rb#63 def ==(other); end # source://globalid//lib/global_id/global_id.rb#42 def app(*_arg0, **_arg1, &_arg2); end - # source://globalid//lib/global_id/global_id.rb#75 + # source://globalid//lib/global_id/global_id.rb#76 def as_json(*_arg0); end # source://globalid//lib/global_id/global_id.rb#42 def deconstruct_keys(*_arg0, **_arg1, &_arg2); end - # source://globalid//lib/global_id/global_id.rb#62 + # source://globalid//lib/global_id/global_id.rb#63 def eql?(other); end # source://globalid//lib/global_id/global_id.rb#48 def find(options = T.unsafe(nil)); end - # source://globalid//lib/global_id/global_id.rb#67 + # source://globalid//lib/global_id/global_id.rb#68 def hash; end # source://globalid//lib/global_id/global_id.rb#52 @@ -46,7 +46,7 @@ class GlobalID # source://globalid//lib/global_id/global_id.rb#42 def params(*_arg0, **_arg1, &_arg2); end - # source://globalid//lib/global_id/global_id.rb#71 + # source://globalid//lib/global_id/global_id.rb#72 def to_param; end # source://globalid//lib/global_id/global_id.rb#42 @@ -69,6 +69,9 @@ class GlobalID # source://globalid//lib/global_id/global_id.rb#11 def create(model, options = T.unsafe(nil)); end + # source://globalid//lib/global_id.rb#20 + def deprecator; end + # source://globalid//lib/global_id.rb#15 def eager_load!; end @@ -85,24 +88,193 @@ class GlobalID end end -# source://globalid//lib/global_id/identification.rb#2 +# Mix `GlobalID::Identification` into any model with a `#find(id)` class +# method. Support is automatically included in Active Record. +# +# class Person +# include ActiveModel::Model +# include GlobalID::Identification +# +# attr_accessor :id +# +# def self.find(id) +# new id: id +# end +# +# def ==(other) +# id == other.try(:id) +# end +# end +# +# person_gid = Person.find(1).to_global_id +# # => # # "gid://app/Person/1" +# GlobalID::Locator.locate person_gid +# # => # +# +# source://globalid//lib/global_id/identification.rb#28 module GlobalID::Identification - # source://globalid//lib/global_id/identification.rb#3 + # Returns the Global ID of the model. + # + # model = Person.new id: 1 + # global_id = model.to_global_id + # global_id.modal_class # => Person + # global_id.modal_id # => "1" + # global_id.to_param # => "Z2lkOi8vYm9yZGZvbGlvL1BlcnNvbi8x" + # + # source://globalid//lib/global_id/identification.rb#37 def to_gid(options = T.unsafe(nil)); end - # source://globalid//lib/global_id/identification.rb#8 + # Returns the Global ID parameter of the model. + # + # model = Person.new id: 1 + # model.to_gid_param # => ""Z2lkOi8vYm9yZGZvbGlvL1BlcnNvbi8x" + # + # source://globalid//lib/global_id/identification.rb#46 def to_gid_param(options = T.unsafe(nil)); end - # source://globalid//lib/global_id/identification.rb#3 + # Returns the Global ID of the model. + # + # model = Person.new id: 1 + # global_id = model.to_global_id + # global_id.modal_class # => Person + # global_id.modal_id # => "1" + # global_id.to_param # => "Z2lkOi8vYm9yZGZvbGlvL1BlcnNvbi8x" + # + # source://globalid//lib/global_id/identification.rb#37 def to_global_id(options = T.unsafe(nil)); end - # source://globalid//lib/global_id/identification.rb#12 + # Returns the Signed Global ID of the model. + # Signed Global IDs ensure that the data hasn't been tampered with. + # + # model = Person.new id: 1 + # signed_global_id = model.to_signed_global_id + # signed_global_id.modal_class # => Person + # signed_global_id.modal_id # => "1" + # signed_global_id.to_param # => "BAh7CEkiCGdpZAY6BkVUSSIiZ2..." + # + # ==== Expiration + # + # Signed Global IDs can expire some time in the future. This is useful if + # there's a resource people shouldn't have indefinite access to, like a + # share link. + # + # expiring_sgid = Document.find(5).to_sgid(expires_in: 2.hours, for: 'sharing') + # # => # + # # Within 2 hours... + # GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing') + # # => # + # # More than 2 hours later... + # GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing') + # # => nil + # + # In Rails, an auto-expiry of 1 month is set by default. + # + # You need to explicitly pass `expires_in: nil` to generate a permanent + # SGID that will not expire, + # + # never_expiring_sgid = Document.find(5).to_sgid(expires_in: nil) + # # => # + # + # # Any time later... + # GlobalID::Locator.locate_signed never_expiring_sgid + # # => # + # + # It's also possible to pass a specific expiry time + # + # explicit_expiring_sgid = SecretAgentMessage.find(5).to_sgid(expires_at: Time.now.advance(hours: 1)) + # # => # + # + # # 1 hour later... + # GlobalID::Locator.locate_signed explicit_expiring_sgid.to_s + # # => nil + # + # Note that an explicit `:expires_at` takes precedence over a relative `:expires_in`. + # + # ==== Purpose + # + # You can even bump the security up some more by explaining what purpose a + # Signed Global ID is for. In this way evildoers can't reuse a sign-up + # form's SGID on the login page. For example. + # + # signup_person_sgid = Person.find(1).to_sgid(for: 'signup_form') + # # => # # + # + # source://globalid//lib/global_id/identification.rb#107 def to_sgid(options = T.unsafe(nil)); end - # source://globalid//lib/global_id/identification.rb#17 + # Returns the Signed Global ID parameter. + # + # model = Person.new id: 1 + # model.to_sgid_param # => "BAh7CEkiCGdpZAY6BkVUSSIiZ2..." + # + # source://globalid//lib/global_id/identification.rb#116 def to_sgid_param(options = T.unsafe(nil)); end - # source://globalid//lib/global_id/identification.rb#12 + # Returns the Signed Global ID of the model. + # Signed Global IDs ensure that the data hasn't been tampered with. + # + # model = Person.new id: 1 + # signed_global_id = model.to_signed_global_id + # signed_global_id.modal_class # => Person + # signed_global_id.modal_id # => "1" + # signed_global_id.to_param # => "BAh7CEkiCGdpZAY6BkVUSSIiZ2..." + # + # ==== Expiration + # + # Signed Global IDs can expire some time in the future. This is useful if + # there's a resource people shouldn't have indefinite access to, like a + # share link. + # + # expiring_sgid = Document.find(5).to_sgid(expires_in: 2.hours, for: 'sharing') + # # => # + # # Within 2 hours... + # GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing') + # # => # + # # More than 2 hours later... + # GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing') + # # => nil + # + # In Rails, an auto-expiry of 1 month is set by default. + # + # You need to explicitly pass `expires_in: nil` to generate a permanent + # SGID that will not expire, + # + # never_expiring_sgid = Document.find(5).to_sgid(expires_in: nil) + # # => # + # + # # Any time later... + # GlobalID::Locator.locate_signed never_expiring_sgid + # # => # + # + # It's also possible to pass a specific expiry time + # + # explicit_expiring_sgid = SecretAgentMessage.find(5).to_sgid(expires_at: Time.now.advance(hours: 1)) + # # => # + # + # # 1 hour later... + # GlobalID::Locator.locate_signed explicit_expiring_sgid.to_s + # # => nil + # + # Note that an explicit `:expires_at` takes precedence over a relative `:expires_in`. + # + # ==== Purpose + # + # You can even bump the security up some more by explaining what purpose a + # Signed Global ID is for. In this way evildoers can't reuse a sign-up + # form's SGID on the login page. For example. + # + # signup_person_sgid = Person.find(1).to_sgid(for: 'signup_form') + # # => # # + # + # source://globalid//lib/global_id/identification.rb#107 def to_signed_global_id(options = T.unsafe(nil)); end end @@ -112,13 +284,17 @@ module GlobalID::Locator # Takes either a GlobalID or a string that can be turned into a GlobalID # # Options: + # * :includes - A Symbol, Array, Hash or combination of them. + # The same structure you would pass into a +includes+ method of Active Record. + # If present, locate will load all the relationships specified here. + # See https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations. # * :only - A class, module or Array of classes and/or modules that are # allowed to be located. Passing one or more classes limits instances of returned # classes to those classes or their subclasses. Passing one or more modules in limits # instances of returned classes to those including that module. If no classes or # modules match, +nil+ is returned. # - # source://globalid//lib/global_id/locator.rb#14 + # source://globalid//lib/global_id/locator.rb#20 def locate(gid, options = T.unsafe(nil)); end # Takes an array of GlobalIDs or strings that can be turned into a GlobalIDs. @@ -132,6 +308,11 @@ module GlobalID::Locator # per model class, but still interpolate the results to match the order in which the gids were passed. # # Options: + # * :includes - A Symbol, Array, Hash or combination of them + # The same structure you would pass into a includes method of Active Record. + # @see https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations + # If present, locate_many will load all the relationships specified here. + # Note: It only works if all the gids models have that relationships. # * :only - A class, module or Array of classes and/or modules that are # allowed to be located. Passing one or more classes limits instances of returned # classes to those classes or their subclasses. Passing one or more modules in limits @@ -142,7 +323,7 @@ module GlobalID::Locator # #find will raise an exception if a named ID can't be found. When you set this option to true, # we will use #where(id: ids) instead, which does not raise on missing records. # - # source://globalid//lib/global_id/locator.rb#40 + # source://globalid//lib/global_id/locator.rb#60 def locate_many(gids, options = T.unsafe(nil)); end # Takes an array of SignedGlobalIDs or strings that can be turned into a SignedGlobalIDs. @@ -153,25 +334,34 @@ module GlobalID::Locator # the results to match the order in which the gids were passed. # # Options: + # * :includes - A Symbol, Array, Hash or combination of them + # The same structure you would pass into a includes method of Active Record. + # @see https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations + # If present, locate_many_signed will load all the relationships specified here. + # Note: It only works if all the gids models have that relationships. # * :only - A class, module or Array of classes and/or modules that are # allowed to be located. Passing one or more classes limits instances of returned # classes to those classes or their subclasses. Passing one or more modules in limits # instances of returned classes to those including that module. If no classes or # modules match, +nil+ is returned. # - # source://globalid//lib/global_id/locator.rb#74 + # source://globalid//lib/global_id/locator.rb#103 def locate_many_signed(sgids, options = T.unsafe(nil)); end # Takes either a SignedGlobalID or a string that can be turned into a SignedGlobalID # # Options: + # * :includes - A Symbol, Array, Hash or combination of them + # The same structure you would pass into a includes method of Active Record. + # @see https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations + # If present, locate_signed will load all the relationships specified here. # * :only - A class, module or Array of classes and/or modules that are # allowed to be located. Passing one or more classes limits instances of returned # classes to those classes or their subclasses. Passing one or more modules in limits # instances of returned classes to those including that module. If no classes or # modules match, +nil+ is returned. # - # source://globalid//lib/global_id/locator.rb#57 + # source://globalid//lib/global_id/locator.rb#81 def locate_signed(sgid, options = T.unsafe(nil)); end # Tie a locator to an app. @@ -181,7 +371,7 @@ module GlobalID::Locator # # Using a block: # - # GlobalID::Locator.use :foo do |gid| + # GlobalID::Locator.use :foo do |gid, options| # FooRemote.const_get(gid.model_name).find(gid.model_id) # end # @@ -190,76 +380,87 @@ module GlobalID::Locator # GlobalID::Locator.use :bar, BarLocator.new # # class BarLocator - # def locate(gid) + # def locate(gid, options = {}) # @search_client.search name: gid.model_name, id: gid.model_id # end # end # # @raise [ArgumentError] # - # source://globalid//lib/global_id/locator.rb#98 + # source://globalid//lib/global_id/locator.rb#127 def use(app, locator = T.unsafe(nil), &locator_block); end private # @return [Boolean] # - # source://globalid//lib/global_id/locator.rb#111 + # source://globalid//lib/global_id/locator.rb#140 def find_allowed?(model_class, only = T.unsafe(nil)); end - # source://globalid//lib/global_id/locator.rb#107 + # source://globalid//lib/global_id/locator.rb#136 def locator_for(gid); end - # source://globalid//lib/global_id/locator.rb#119 + # source://globalid//lib/global_id/locator.rb#148 def normalize_app(app); end - # source://globalid//lib/global_id/locator.rb#115 + # source://globalid//lib/global_id/locator.rb#144 def parse_allowed(gids, only = T.unsafe(nil)); end end end -# source://globalid//lib/global_id/locator.rb#127 +# source://globalid//lib/global_id/locator.rb#156 class GlobalID::Locator::BaseLocator - # source://globalid//lib/global_id/locator.rb#128 - def locate(gid); end + # source://globalid//lib/global_id/locator.rb#157 + def locate(gid, options = T.unsafe(nil)); end - # source://globalid//lib/global_id/locator.rb#132 + # source://globalid//lib/global_id/locator.rb#165 def locate_many(gids, options = T.unsafe(nil)); end private - # source://globalid//lib/global_id/locator.rb#143 + # source://globalid//lib/global_id/locator.rb#189 def find_records(model_class, ids, options); end + + # @return [Boolean] + # + # source://globalid//lib/global_id/locator.rb#199 + def model_id_is_valid?(gid); end + + # source://globalid//lib/global_id/locator.rb#203 + def primary_key(model_class); end end -# source://globalid//lib/global_id/locator.rb#172 +# source://globalid//lib/global_id/locator.rb#228 class GlobalID::Locator::BlockLocator # @return [BlockLocator] a new instance of BlockLocator # - # source://globalid//lib/global_id/locator.rb#173 + # source://globalid//lib/global_id/locator.rb#229 def initialize(block); end - # source://globalid//lib/global_id/locator.rb#177 - def locate(gid); end + # source://globalid//lib/global_id/locator.rb#233 + def locate(gid, options = T.unsafe(nil)); end - # source://globalid//lib/global_id/locator.rb#181 + # source://globalid//lib/global_id/locator.rb#237 def locate_many(gids, options = T.unsafe(nil)); end end -# source://globalid//lib/global_id/locator.rb#170 +# source://globalid//lib/global_id/locator.rb#226 GlobalID::Locator::DEFAULT_LOCATOR = T.let(T.unsafe(nil), GlobalID::Locator::UnscopedLocator) -# source://globalid//lib/global_id/locator.rb#152 +# source://globalid//lib/global_id/locator.rb#5 +class GlobalID::Locator::InvalidModelIdError < ::StandardError; end + +# source://globalid//lib/global_id/locator.rb#208 class GlobalID::Locator::UnscopedLocator < ::GlobalID::Locator::BaseLocator - # source://globalid//lib/global_id/locator.rb#153 - def locate(gid); end + # source://globalid//lib/global_id/locator.rb#209 + def locate(gid, options = T.unsafe(nil)); end private - # source://globalid//lib/global_id/locator.rb#158 + # source://globalid//lib/global_id/locator.rb#214 def find_records(model_class, ids, options); end - # source://globalid//lib/global_id/locator.rb#162 + # source://globalid//lib/global_id/locator.rb#218 def unscoped(model_class); end end @@ -271,71 +472,68 @@ class GlobalID::Verifier < ::ActiveSupport::MessageVerifier private # source://globalid//lib/global_id/verifier.rb#10 - def decode(data); end + def decode(data, **_arg1); end # source://globalid//lib/global_id/verifier.rb#6 - def encode(data); end + def encode(data, **_arg1); end end # source://globalid//lib/global_id/signed_global_id.rb#4 class SignedGlobalID < ::GlobalID # @return [SignedGlobalID] a new instance of SignedGlobalID # - # source://globalid//lib/global_id/signed_global_id.rb#50 + # source://globalid//lib/global_id/signed_global_id.rb#59 def initialize(gid, options = T.unsafe(nil)); end - # source://globalid//lib/global_id/signed_global_id.rb#68 + # source://globalid//lib/global_id/signed_global_id.rb#71 def ==(other); end # Returns the value of attribute expires_at. # - # source://globalid//lib/global_id/signed_global_id.rb#48 + # source://globalid//lib/global_id/signed_global_id.rb#57 def expires_at; end + # source://globalid//lib/global_id/signed_global_id.rb#75 + def inspect; end + # Returns the value of attribute purpose. # - # source://globalid//lib/global_id/signed_global_id.rb#48 + # source://globalid//lib/global_id/signed_global_id.rb#57 def purpose; end - # source://globalid//lib/global_id/signed_global_id.rb#62 - def to_h; end - - # source://globalid//lib/global_id/signed_global_id.rb#57 + # source://globalid//lib/global_id/signed_global_id.rb#66 def to_param; end - # source://globalid//lib/global_id/signed_global_id.rb#57 + # source://globalid//lib/global_id/signed_global_id.rb#66 def to_s; end # Returns the value of attribute verifier. # - # source://globalid//lib/global_id/signed_global_id.rb#48 + # source://globalid//lib/global_id/signed_global_id.rb#57 def verifier; end private - # source://globalid//lib/global_id/signed_global_id.rb#73 - def encoded_expiration; end - - # source://globalid//lib/global_id/signed_global_id.rb#77 + # source://globalid//lib/global_id/signed_global_id.rb#80 def pick_expiration(options); end class << self # Returns the value of attribute expires_in. # - # source://globalid//lib/global_id/signed_global_id.rb#22 + # source://globalid//lib/global_id/signed_global_id.rb#8 def expires_in; end # Sets the attribute expires_in # # @param value the value to set the attribute expires_in to. # - # source://globalid//lib/global_id/signed_global_id.rb#22 + # source://globalid//lib/global_id/signed_global_id.rb#8 def expires_in=(_arg0); end # source://globalid//lib/global_id/signed_global_id.rb#10 def parse(sgid, options = T.unsafe(nil)); end - # source://globalid//lib/global_id/signed_global_id.rb#26 + # source://globalid//lib/global_id/signed_global_id.rb#24 def pick_purpose(options); end # Grab the verifier from options and fall back to SignedGlobalID.verifier. @@ -358,11 +556,17 @@ class SignedGlobalID < ::GlobalID private - # source://globalid//lib/global_id/signed_global_id.rb#41 + # source://globalid//lib/global_id/signed_global_id.rb#50 def raise_if_expired(expires_at); end - # source://globalid//lib/global_id/signed_global_id.rb#31 + # source://globalid//lib/global_id/signed_global_id.rb#29 def verify(sgid, options); end + + # source://globalid//lib/global_id/signed_global_id.rb#40 + def verify_with_legacy_self_validated_metadata(sgid, options); end + + # source://globalid//lib/global_id/signed_global_id.rb#34 + def verify_with_verifier_validated_metadata(sgid, options); end end end @@ -400,7 +604,7 @@ class URI::GID < ::URI::Generic # source://uri/0.12.0/uri/generic.rb#243 def app; end - # source://globalid//lib/global_id/uri/gid.rb#101 + # source://globalid//lib/global_id/uri/gid.rb#107 def deconstruct_keys(_keys); end # Returns the value of attribute model_id. @@ -418,53 +622,58 @@ class URI::GID < ::URI::Generic # source://globalid//lib/global_id/uri/gid.rb#29 def params; end - # source://globalid//lib/global_id/uri/gid.rb#96 + # source://globalid//lib/global_id/uri/gid.rb#102 def to_s; end protected # Ruby 2.2 uses #query= instead of #set_query # - # source://globalid//lib/global_id/uri/gid.rb#112 + # source://globalid//lib/global_id/uri/gid.rb#118 def query=(query); end - # source://globalid//lib/global_id/uri/gid.rb#123 + # source://globalid//lib/global_id/uri/gid.rb#129 def set_params(params); end - # source://globalid//lib/global_id/uri/gid.rb#106 + # source://globalid//lib/global_id/uri/gid.rb#112 def set_path(path); end # Ruby 2.1 or less uses #set_query to assign the query # - # source://globalid//lib/global_id/uri/gid.rb#118 + # source://globalid//lib/global_id/uri/gid.rb#124 def set_query(query); end private - # source://globalid//lib/global_id/uri/gid.rb#130 + # source://globalid//lib/global_id/uri/gid.rb#136 def check_host(host); end - # source://globalid//lib/global_id/uri/gid.rb#135 + # source://globalid//lib/global_id/uri/gid.rb#141 def check_path(path); end - # source://globalid//lib/global_id/uri/gid.rb#140 + # source://globalid//lib/global_id/uri/gid.rb#146 def check_scheme(scheme); end - # source://globalid//lib/global_id/uri/gid.rb#172 + # source://globalid//lib/global_id/uri/gid.rb#195 def parse_query_params(query); end - # source://globalid//lib/global_id/uri/gid.rb#148 + # source://globalid//lib/global_id/uri/gid.rb#154 def set_model_components(path, validate = T.unsafe(nil)); end # @raise [URI::InvalidComponentError] # - # source://globalid//lib/global_id/uri/gid.rb#158 + # source://globalid//lib/global_id/uri/gid.rb#174 def validate_component(component); end + # @raise [InvalidModelIdError] + # + # source://globalid//lib/global_id/uri/gid.rb#188 + def validate_model_id(model_id_part); end + # @raise [MissingModelIdError] # - # source://globalid//lib/global_id/uri/gid.rb#165 - def validate_model_id(model_id, model_name); end + # source://globalid//lib/global_id/uri/gid.rb#181 + def validate_model_id_section(model_id, model_name); end class << self # Create a new URI::GID from components with argument check. @@ -480,14 +689,14 @@ class URI::GID < ::URI::Generic # # URI::GID.build(['bcx', 'Person', '1', key: 'value']) # - # source://globalid//lib/global_id/uri/gid.rb#83 + # source://globalid//lib/global_id/uri/gid.rb#88 def build(args); end # Shorthand to build a URI::GID from an app, a model and optional params. # # URI::GID.create('bcx', Person.find(5), database: 'superhumans') # - # source://globalid//lib/global_id/uri/gid.rb#67 + # source://globalid//lib/global_id/uri/gid.rb#72 def create(app, model, params = T.unsafe(nil)); end # Create a new URI::GID by parsing a gid string with argument check. @@ -500,7 +709,7 @@ class URI::GID < ::URI::Generic # URI.parse('gid://bcx') # => URI::GID instance # URI::GID.parse('gid://bcx/') # => raises URI::InvalidComponentError # - # source://globalid//lib/global_id/uri/gid.rb#59 + # source://globalid//lib/global_id/uri/gid.rb#64 def parse(uri); end # Validates +app+'s as URI hostnames containing only alphanumeric characters @@ -512,14 +721,25 @@ class URI::GID < ::URI::Generic # URI::GID.validate_app(nil) # => ArgumentError # URI::GID.validate_app('foo/bar') # => ArgumentError # - # source://globalid//lib/global_id/uri/gid.rb#43 + # source://globalid//lib/global_id/uri/gid.rb#48 def validate_app(app); end end end -# source://globalid//lib/global_id/uri/gid.rb#128 +# source://globalid//lib/global_id/uri/gid.rb#134 URI::GID::COMPONENT = T.let(T.unsafe(nil), Array) +# source://globalid//lib/global_id/uri/gid.rb#37 +URI::GID::COMPOSITE_MODEL_ID_DELIMITER = T.let(T.unsafe(nil), String) + +# Maximum size of a model id segment +# +# source://globalid//lib/global_id/uri/gid.rb#36 +URI::GID::COMPOSITE_MODEL_ID_MAX_SIZE = T.let(T.unsafe(nil), Integer) + +# source://globalid//lib/global_id/uri/gid.rb#33 +class URI::GID::InvalidModelIdError < ::URI::InvalidComponentError; end + # Raised when creating a Global ID for a model without an id # # source://globalid//lib/global_id/uri/gid.rb#32 diff --git a/sorbet/rbi/gems/google-protobuf@3.24.1.rbi b/sorbet/rbi/gems/google-protobuf@3.25.3.rbi similarity index 79% rename from sorbet/rbi/gems/google-protobuf@3.24.1.rbi rename to sorbet/rbi/gems/google-protobuf@3.25.3.rbi index 8e1643476..ecb58886f 100644 --- a/sorbet/rbi/gems/google-protobuf@3.24.1.rbi +++ b/sorbet/rbi/gems/google-protobuf@3.25.3.rbi @@ -7,30 +7,32 @@ # We define these before requiring the platform-specific modules. # That way the module init can grab references to these. # -# source://google-protobuf//lib/google/protobuf/message_exts.rb#31 +# source://google-protobuf//lib/google/protobuf/message_exts.rb#8 module Google; end -# source://google-protobuf//lib/google/protobuf/message_exts.rb#32 +# source://google-protobuf//lib/google/protobuf/message_exts.rb#9 module Google::Protobuf class << self - # source://google-protobuf//lib/google/protobuf.rb#71 + # source://google-protobuf//lib/google/protobuf.rb#38 def decode(klass, proto, options = T.unsafe(nil)); end - # source://google-protobuf//lib/google/protobuf.rb#75 + # source://google-protobuf//lib/google/protobuf.rb#42 def decode_json(klass, json, options = T.unsafe(nil)); end def deep_copy(_arg0); end + + # @raise [FrozenError] def discard_unknown(_arg0); end - # source://google-protobuf//lib/google/protobuf.rb#63 + # source://google-protobuf//lib/google/protobuf.rb#30 def encode(msg, options = T.unsafe(nil)); end - # source://google-protobuf//lib/google/protobuf.rb#67 + # source://google-protobuf//lib/google/protobuf.rb#34 def encode_json(msg, options = T.unsafe(nil)); end end end -# source://google-protobuf//lib/google/protobuf/message_exts.rb#52 +# source://google-protobuf//lib/google/protobuf/message_exts.rb#29 class Google::Protobuf::AbstractMessage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -63,9 +65,11 @@ class Google::Protobuf::AbstractMessage end end +# Message Descriptor - Descriptor for short. class Google::Protobuf::Descriptor include ::Enumerable + # @return [Descriptor] a new instance of Descriptor def initialize(_arg0, _arg1, _arg2); end def each; end @@ -75,12 +79,14 @@ class Google::Protobuf::Descriptor def lookup_oneof(_arg0); end def msgclass; end def name; end + def options; end end # Re-open the class (the rest of the class is implemented in C) # # source://google-protobuf//lib/google/protobuf/descriptor_dsl.rb#457 class Google::Protobuf::DescriptorPool + # @raise [ArgumentError] def add_serialized_file(_arg0); end # source://google-protobuf//lib/google/protobuf/descriptor_dsl.rb#458 @@ -97,9 +103,45 @@ class Google::Protobuf::DescriptorProto < ::Google::Protobuf::AbstractMessage; e class Google::Protobuf::DescriptorProto::ExtensionRange < ::Google::Protobuf::AbstractMessage; end class Google::Protobuf::DescriptorProto::ReservedRange < ::Google::Protobuf::AbstractMessage; end +module Google::Protobuf::Edition + class << self + def descriptor; end + def lookup(_arg0); end + def resolve(_arg0); end + end +end + +# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#84 +Google::Protobuf::Edition::EDITION_1_TEST_ONLY = T.let(T.unsafe(nil), Integer) + +# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#84 +Google::Protobuf::Edition::EDITION_2023 = T.let(T.unsafe(nil), Integer) + +# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#84 +Google::Protobuf::Edition::EDITION_2_TEST_ONLY = T.let(T.unsafe(nil), Integer) + +# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#84 +Google::Protobuf::Edition::EDITION_99997_TEST_ONLY = T.let(T.unsafe(nil), Integer) + +# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#84 +Google::Protobuf::Edition::EDITION_99998_TEST_ONLY = T.let(T.unsafe(nil), Integer) + +# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#84 +Google::Protobuf::Edition::EDITION_99999_TEST_ONLY = T.let(T.unsafe(nil), Integer) + +# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#84 +Google::Protobuf::Edition::EDITION_PROTO2 = T.let(T.unsafe(nil), Integer) + +# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#84 +Google::Protobuf::Edition::EDITION_PROTO3 = T.let(T.unsafe(nil), Integer) + +# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#84 +Google::Protobuf::Edition::EDITION_UNKNOWN = T.let(T.unsafe(nil), Integer) + class Google::Protobuf::EnumDescriptor include ::Enumerable + # @return [EnumDescriptor] a new instance of EnumDescriptor def initialize(_arg0, _arg1, _arg2); end def each; end @@ -108,6 +150,7 @@ class Google::Protobuf::EnumDescriptor def lookup_name(_arg0); end def lookup_value(_arg0); end def name; end + def options; end end class Google::Protobuf::EnumDescriptorProto < ::Google::Protobuf::AbstractMessage; end @@ -116,7 +159,7 @@ class Google::Protobuf::EnumOptions < ::Google::Protobuf::AbstractMessage; end class Google::Protobuf::EnumValueDescriptorProto < ::Google::Protobuf::AbstractMessage; end class Google::Protobuf::EnumValueOptions < ::Google::Protobuf::AbstractMessage; end -# source://google-protobuf//lib/google/protobuf.rb#39 +# source://google-protobuf//lib/google/protobuf.rb#16 class Google::Protobuf::Error < ::StandardError; end class Google::Protobuf::ExtensionRangeOptions < ::Google::Protobuf::AbstractMessage; end @@ -226,7 +269,7 @@ Google::Protobuf::FeatureSet::RepeatedFieldEncoding::PACKED = T.let(T.unsafe(nil # source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#73 Google::Protobuf::FeatureSet::RepeatedFieldEncoding::REPEATED_FIELD_ENCODING_UNKNOWN = T.let(T.unsafe(nil), Integer) -module Google::Protobuf::FeatureSet::StringFieldValidation +module Google::Protobuf::FeatureSet::Utf8Validation class << self def descriptor; end def lookup(_arg0); end @@ -235,29 +278,58 @@ module Google::Protobuf::FeatureSet::StringFieldValidation end # source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#74 -Google::Protobuf::FeatureSet::StringFieldValidation::HINT = T.let(T.unsafe(nil), Integer) +Google::Protobuf::FeatureSet::Utf8Validation::NONE = T.let(T.unsafe(nil), Integer) # source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#74 -Google::Protobuf::FeatureSet::StringFieldValidation::MANDATORY = T.let(T.unsafe(nil), Integer) +Google::Protobuf::FeatureSet::Utf8Validation::UTF8_VALIDATION_UNKNOWN = T.let(T.unsafe(nil), Integer) # source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#74 -Google::Protobuf::FeatureSet::StringFieldValidation::NONE = T.let(T.unsafe(nil), Integer) +Google::Protobuf::FeatureSet::Utf8Validation::VERIFY = T.let(T.unsafe(nil), Integer) -# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#74 -Google::Protobuf::FeatureSet::StringFieldValidation::STRING_FIELD_VALIDATION_UNKNOWN = T.let(T.unsafe(nil), Integer) +class Google::Protobuf::FeatureSetDefaults < ::Google::Protobuf::AbstractMessage; end +class Google::Protobuf::FeatureSetDefaults::FeatureSetEditionDefault < ::Google::Protobuf::AbstractMessage; end class Google::Protobuf::FieldDescriptor + # @return [FieldDescriptor] a new instance of FieldDescriptor def initialize(_arg0, _arg1, _arg2); end + # @param msg [Google::Protobuf::Message] def clear(_arg0); end + def default; end + + # Tests if this field has been set on the argument message. + # + # @param msg [Google::Protobuf::Message] + # @raise [TypeError] If the field is not defined on this message. + # @return [Object] Value of the field on this message. def get(_arg0); end + + # Tests if this field has been set on the argument message. + # + # @param msg [Google::Protobuf::Message] + # @raise [TypeError] If this field does not exist on the message + # @raise [ArgumentError] If this field does not track presence + # @return [Boolean] True iff message has this field set def has?(_arg0); end + def json_name; end def label; end def name; end def number; end + def options; end + + # call-seq: + # FieldDescriptor.set(message, value) + # + # Sets the value corresponding to this field to the given value on the given + # message. Raises an exception if message is of the wrong type. Performs the + # ordinary type-checks for field setting. + # + # @param msg [Google::Protobuf::Message] + # @param value [Object] def set(_arg0, _arg1); end + def submsg_name; end def subtype; end def type; end @@ -438,9 +510,11 @@ Google::Protobuf::FieldOptions::OptionTargetType::TARGET_TYPE_SERVICE = T.let(T. Google::Protobuf::FieldOptions::OptionTargetType::TARGET_TYPE_UNKNOWN = T.let(T.unsafe(nil), Integer) class Google::Protobuf::FileDescriptor + # @return [FileDescriptor] a new instance of FileDescriptor def initialize(_arg0, _arg1, _arg2); end def name; end + def options; end def syntax; end end @@ -476,15 +550,18 @@ module Google::Protobuf::GeneratedCodeInfo::Annotation::Semantic end end -# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#81 +# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#83 Google::Protobuf::GeneratedCodeInfo::Annotation::Semantic::ALIAS = T.let(T.unsafe(nil), Integer) -# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#81 +# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#83 Google::Protobuf::GeneratedCodeInfo::Annotation::Semantic::NONE = T.let(T.unsafe(nil), Integer) -# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#81 +# source://google-protobuf//lib/google/protobuf/descriptor_pb.rb#83 Google::Protobuf::GeneratedCodeInfo::Annotation::Semantic::SET = T.let(T.unsafe(nil), Integer) +# source://google-protobuf//lib/google/protobuf.rb#46 +Google::Protobuf::IMPLEMENTATION = T.let(T.unsafe(nil), Symbol) + # source://google-protobuf//lib/google/protobuf/descriptor_dsl.rb#16 module Google::Protobuf::Internal; end @@ -690,69 +767,149 @@ class Google::Protobuf::Internal::OneofBuilder def optional(name, type, number, type_class = T.unsafe(nil), options = T.unsafe(nil)); end end -# source://google-protobuf//lib/google/protobuf/object_cache.rb#64 +# source://google-protobuf//lib/google/protobuf/object_cache.rb#41 class Google::Protobuf::LegacyObjectCache # @return [LegacyObjectCache] a new instance of LegacyObjectCache # - # source://google-protobuf//lib/google/protobuf/object_cache.rb#65 + # source://google-protobuf//lib/google/protobuf/object_cache.rb#42 def initialize; end - # source://google-protobuf//lib/google/protobuf/object_cache.rb#71 + # source://google-protobuf//lib/google/protobuf/object_cache.rb#48 def get(key); end - # source://google-protobuf//lib/google/protobuf/object_cache.rb#93 + # source://google-protobuf//lib/google/protobuf/object_cache.rb#70 def try_add(key, value); end private - # source://google-protobuf//lib/google/protobuf/object_cache.rb#108 + # source://google-protobuf//lib/google/protobuf/object_cache.rb#85 def purge; end end class Google::Protobuf::Map include ::Enumerable + # @return [Map] a new instance of Map def initialize(*_arg0); end + # call-seq: + # Map.==(other) => boolean + # + # Compares this map to another. Maps are equal if they have identical key sets, + # and for each key, the values in both maps compare equal. Elements are + # compared as per normal Ruby semantics, by calling their :== methods (or + # performing a more efficient comparison for primitive types). + # + # Maps with dissimilar key types or value types/typeclasses are never equal, + # even if value comparison (for example, between integers and floats) would + # have otherwise indicated that every element has equal value. def ==(_arg0); end + + # call-seq: + # Map.[](key) => value + # + # Accesses the element at the given key. Throws an exception if the key type is + # incorrect. Returns nil when the key is not present in the map. def [](_arg0); end + + # call-seq: + # Map.[]=(key, value) => value + # + # Inserts or overwrites the value at the given key with the given new value. + # Throws an exception if the key type is incorrect. Returns the new value that + # was just inserted. def []=(_arg0, _arg1); end + def clear; end + + # call-seq: + # Map.dup => new_map + # + # Duplicates this map with a shallow copy. References to all non-primitive + # element objects (e.g., submessages) are shared. def clone; end + + # call-seq: + # Map.delete(key) => old_value + # + # Deletes the value at the given key, if any, returning either the old value or + # nil if none was present. Throws an exception if the key is of the wrong type. def delete(_arg0); end + + # call-seq: + # Map.dup => new_map + # + # Duplicates this map with a shallow copy. References to all non-primitive + # element objects (e.g., submessages) are shared. def dup; end + + # call-seq: + # Map.each(&block) + # + # Invokes &block on each |key, value| pair in the map, in unspecified order. + # Note that Map also includes Enumerable; map thus acts like a normal Ruby + # sequence. def each; end + def freeze; end + + # @return [Boolean] def has_key?(_arg0); end + def hash; end def inspect; end + + # call-seq: + # Map.keys => [list_of_keys] + # + # Returns the list of keys contained in the map, in unspecified order. def keys; end + def length; end + + # call-seq: + # Map.merge(other_map) => map + # + # Copies key/value pairs from other_map into a copy of this map. If a key is + # set in other_map and this map, the value from other_map overwrites the value + # in the new copy of this map. Returns the new copy of this map with merged + # contents. def merge(_arg0); end + def size; end + + # call-seq: + # Map.to_h => {} + # + # Returns a Ruby Hash object containing all the values within the map def to_h; end + + # call-seq: + # Map.values => [list_of_values] + # + # Returns the list of values contained in the map, in unspecified order. def values; end end -# source://google-protobuf//lib/google/protobuf/message_exts.rb#33 +# source://google-protobuf//lib/google/protobuf/message_exts.rb#10 module Google::Protobuf::MessageExts mixes_in_class_methods ::Google::Protobuf::MessageExts::ClassMethods - # source://google-protobuf//lib/google/protobuf/message_exts.rb#43 + # source://google-protobuf//lib/google/protobuf/message_exts.rb#20 def to_json(options = T.unsafe(nil)); end - # source://google-protobuf//lib/google/protobuf/message_exts.rb#47 + # source://google-protobuf//lib/google/protobuf/message_exts.rb#24 def to_proto(options = T.unsafe(nil)); end class << self # this is only called in jruby; mri loades the ClassMethods differently # - # source://google-protobuf//lib/google/protobuf/message_exts.rb#36 + # source://google-protobuf//lib/google/protobuf/message_exts.rb#13 def included(klass); end end end -# source://google-protobuf//lib/google/protobuf/message_exts.rb#40 +# source://google-protobuf//lib/google/protobuf/message_exts.rb#17 module Google::Protobuf::MessageExts::ClassMethods; end class Google::Protobuf::MessageOptions < ::Google::Protobuf::AbstractMessage; end @@ -793,115 +950,133 @@ Google::Protobuf::OBJECT_CACHE = T.let(T.unsafe(nil), Google::Protobuf::ObjectCa # are 32 bits. In this case, we enable the secondary Hash to hold the keys # and prevent them from being collected. # -# source://google-protobuf//lib/google/protobuf/object_cache.rb#47 +# source://google-protobuf//lib/google/protobuf/object_cache.rb#24 class Google::Protobuf::ObjectCache # @return [ObjectCache] a new instance of ObjectCache # - # source://google-protobuf//lib/google/protobuf/object_cache.rb#48 + # source://google-protobuf//lib/google/protobuf/object_cache.rb#25 def initialize; end - # source://google-protobuf//lib/google/protobuf/object_cache.rb#53 + # source://google-protobuf//lib/google/protobuf/object_cache.rb#30 def get(key); end - # source://google-protobuf//lib/google/protobuf/object_cache.rb#57 + # source://google-protobuf//lib/google/protobuf/object_cache.rb#34 def try_add(key, value); end end class Google::Protobuf::OneofDescriptor include ::Enumerable + # @return [OneofDescriptor] a new instance of OneofDescriptor def initialize(_arg0, _arg1, _arg2); end def each; end def name; end + def options; end end class Google::Protobuf::OneofDescriptorProto < ::Google::Protobuf::AbstractMessage; end class Google::Protobuf::OneofOptions < ::Google::Protobuf::AbstractMessage; end -# source://google-protobuf//lib/google/protobuf.rb#40 +# source://google-protobuf//lib/google/protobuf.rb#20 +Google::Protobuf::PREFER_FFI = T.let(T.unsafe(nil), FalseClass) + +# source://google-protobuf//lib/google/protobuf.rb#17 class Google::Protobuf::ParseError < ::Google::Protobuf::Error; end -# source://google-protobuf//lib/google/protobuf/repeated_field.rb#50 +# source://google-protobuf//lib/google/protobuf/repeated_field.rb#27 class Google::Protobuf::RepeatedField include ::Enumerable extend ::Forwardable + # @return [RepeatedField] a new instance of RepeatedField def initialize(*_arg0); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def &(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def *(*args, **_arg1, &block); end def +(_arg0); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def -(*args, **_arg1, &block); end + # @raise [FrozenError] def <<(_arg0); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def <=>(*args, **_arg1, &block); end def ==(_arg0); end def [](*_arg0); end + + # @raise [FrozenError] def []=(_arg0, _arg1); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def assoc(*args, **_arg1, &block); end def at(*_arg0); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def bsearch(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def bsearch_index(*args, **_arg1, &block); end + # @raise [FrozenError] def clear; end + def clone; end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def collect!(*args, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def combination(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def compact(*args, **_arg1, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def compact!(*args, &block); end def concat(_arg0); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def count(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def cycle(*args, **_arg1, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#128 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#105 def delete(*args, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#128 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#105 def delete_at(*args, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def delete_if(*args, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def dig(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def drop(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def drop_while(*args, **_arg1, &block); end def dup; end + + # call-seq: + # RepeatedField.each(&block) + # + # Invokes the block once for each element of the repeated field. RepeatedField + # also includes Enumerable; combined with this method, the repeated field thus + # acts like an ordinary Ruby sequence. def each; end # array aliases into enumerable @@ -909,172 +1084,180 @@ class Google::Protobuf::RepeatedField # @return [Boolean] # - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#115 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#92 def empty?; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def eql?(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def fetch(*args, **_arg1, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def fill(*args, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def find_index(*args, **_arg1, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#81 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#58 def first(n = T.unsafe(nil)); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def flatten(*args, **_arg1, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def flatten!(*args, &block); end def freeze; end def hash; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def include?(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def index(*args, **_arg1, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def insert(*args, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def inspect(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def join(*args, **_arg1, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def keep_if(*args, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#92 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#69 def last(n = T.unsafe(nil)); end def length; end def map; end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def map!(*args, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def pack(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def permutation(*args, **_arg1, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#104 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#81 def pop(n = T.unsafe(nil)); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def pretty_print(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def pretty_print_cycle(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def product(*args, **_arg1, &block); end + # @raise [FrozenError] def push(*_arg0); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def rassoc(*args, **_arg1, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def reject!(*args, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def repeated_combination(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def repeated_permutation(*args, **_arg1, &block); end + # @raise [FrozenError] def replace(_arg0); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def reverse(*args, **_arg1, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def reverse!(*args, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def rindex(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def rotate(*args, **_arg1, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def rotate!(*args, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def sample(*args, **_arg1, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def select!(*args, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def shelljoin(*args, **_arg1, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#128 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#105 def shift(*args, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def shuffle(*args, **_arg1, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def shuffle!(*args, &block); end def size; end def slice(*_arg0); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#128 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#105 def slice!(*args, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def sort!(*args, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def sort_by!(*args, &block); end + # call-seq: + # RepeatedField.to_ary => array + # + # Used when converted implicitly into array, e.g. compared to an Array. + # Also called as a fallback of Object#to_a def to_ary; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def to_s(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def transpose(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def uniq(*args, **_arg1, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#140 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#117 def uniq!(*args, &block); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#128 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#105 def unshift(*args, &block); end def values_at; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def |(*args, **_arg1, &block); end private + # @raise [FrozenError] def pop_one; end class << self private - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#127 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#104 def define_array_wrapper_method(method_name); end - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#139 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#116 def define_array_wrapper_with_result_method(method_name); end end end @@ -1083,9 +1266,9 @@ end # This only applies in cases where the calling function which created the enumerator, # such as #sort!, modifies itself rather than a new array, such as #sort # -# source://google-protobuf//lib/google/protobuf/repeated_field.rb#183 +# source://google-protobuf//lib/google/protobuf/repeated_field.rb#160 class Google::Protobuf::RepeatedField::ProxyingEnumerator < ::Struct - # source://google-protobuf//lib/google/protobuf/repeated_field.rb#184 + # source://google-protobuf//lib/google/protobuf/repeated_field.rb#161 def each(*args, &block); end end @@ -1096,7 +1279,7 @@ class Google::Protobuf::ServiceOptions < ::Google::Protobuf::AbstractMessage; en class Google::Protobuf::SourceCodeInfo < ::Google::Protobuf::AbstractMessage; end class Google::Protobuf::SourceCodeInfo::Location < ::Google::Protobuf::AbstractMessage; end -# source://google-protobuf//lib/google/protobuf.rb#41 +# source://google-protobuf//lib/google/protobuf.rb#18 class Google::Protobuf::TypeError < ::TypeError; end class Google::Protobuf::UninterpretedOption < ::Google::Protobuf::AbstractMessage; end diff --git a/sorbet/rbi/gems/graphql@2.0.26.rbi b/sorbet/rbi/gems/graphql@2.2.13.rbi similarity index 82% rename from sorbet/rbi/gems/graphql@2.0.26.rbi rename to sorbet/rbi/gems/graphql@2.2.13.rbi index 06b09e485..e9652af62 100644 --- a/sorbet/rbi/gems/graphql@2.0.26.rbi +++ b/sorbet/rbi/gems/graphql@2.2.13.rbi @@ -4,39 +4,6 @@ # This is an autogenerated file for types exported from the `graphql` gem. # Please instead update this file by running `bin/tapioca gem graphql`. -# backport from ruby v2.5 to v2.2 that has no `padding` things -# -# @api private -# -# source://graphql//lib/graphql/schema/base_64_bp.rb#7 -module Base64Bp - extend ::Base64 - - private - - # @api private - # - # source://graphql//lib/graphql/schema/base_64_bp.rb#19 - def urlsafe_decode64(str); end - - # @api private - # - # source://graphql//lib/graphql/schema/base_64_bp.rb#12 - def urlsafe_encode64(bin, padding:); end - - class << self - # @api private - # - # source://graphql//lib/graphql/schema/base_64_bp.rb#19 - def urlsafe_decode64(str); end - - # @api private - # - # source://graphql//lib/graphql/schema/base_64_bp.rb#12 - def urlsafe_encode64(bin, padding:); end - end -end - # source://graphql//lib/graphql.rb#8 module GraphQL class << self @@ -56,7 +23,7 @@ module GraphQL # @return [GraphQL::Language::Nodes::Document] # # source://graphql//lib/graphql.rb#45 - def parse(graphql_string, trace: T.unsafe(nil)); end + def parse(graphql_string, trace: T.unsafe(nil), filename: T.unsafe(nil)); end # Read the contents of `filename` and parse them as GraphQL # @@ -74,7 +41,7 @@ module GraphQL # source://graphql//lib/graphql.rb#58 def scan(graphql_string); end - # source://graphql//lib/graphql.rb#66 + # source://graphql//lib/graphql.rb#67 def scan_with_ruby(graphql_string); end end end @@ -108,7 +75,7 @@ module GraphQL::Analysis; end module GraphQL::Analysis::AST private - # source://graphql//lib/graphql/analysis/ast.rb#76 + # source://graphql//lib/graphql/analysis/ast.rb#89 def analysis_errors(results); end # Analyze a multiplex, and all queries within. @@ -119,18 +86,18 @@ module GraphQL::Analysis::AST # @param analyzers [Array] # @return [Array] Results from multiplex analyzers # - # source://graphql//lib/graphql/analysis/ast.rb#21 + # source://graphql//lib/graphql/analysis/ast.rb#22 def analyze_multiplex(multiplex, analyzers); end # @param query [GraphQL::Query] # @param analyzers [Array] # @return [Array] Results from those analyzers # - # source://graphql//lib/graphql/analysis/ast.rb#50 + # source://graphql//lib/graphql/analysis/ast.rb#51 def analyze_query(query, analyzers, multiplex_analyzers: T.unsafe(nil)); end class << self - # source://graphql//lib/graphql/analysis/ast.rb#76 + # source://graphql//lib/graphql/analysis/ast.rb#89 def analysis_errors(results); end # Analyze a multiplex, and all queries within. @@ -141,14 +108,14 @@ module GraphQL::Analysis::AST # @param analyzers [Array] # @return [Array] Results from multiplex analyzers # - # source://graphql//lib/graphql/analysis/ast.rb#21 + # source://graphql//lib/graphql/analysis/ast.rb#22 def analyze_multiplex(multiplex, analyzers); end # @param query [GraphQL::Query] # @param analyzers [Array] # @return [Array] Results from those analyzers # - # source://graphql//lib/graphql/analysis/ast.rb#50 + # source://graphql//lib/graphql/analysis/ast.rb#51 def analyze_query(query, analyzers, multiplex_analyzers: T.unsafe(nil)); end end end @@ -176,100 +143,100 @@ class GraphQL::Analysis::AST::Analyzer # source://graphql//lib/graphql/analysis/ast/analyzer.rb#28 def analyze?; end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_abstract_node(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_argument(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_directive(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_document(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_enum(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_field(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_fragment_spread(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_inline_fragment(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_input_object(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_list_type(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_non_null_type(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_null_value(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_operation_definition(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_type_name(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_variable_definition(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#44 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#51 def on_enter_variable_identifier(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_abstract_node(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_argument(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_directive(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_document(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_enum(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_field(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_fragment_spread(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_inline_fragment(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_input_object(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_list_type(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_non_null_type(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_null_value(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_operation_definition(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_type_name(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_variable_definition(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#47 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#54 def on_leave_variable_identifier(node, parent, visitor); end # The result for this analyzer. Returning {GraphQL::AnalysisError} results @@ -278,31 +245,39 @@ class GraphQL::Analysis::AST::Analyzer # @raise [GraphQL::RequiredImplementationMissingError] # @return [Any] The analyzer result # - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#35 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#42 def result; end + # Analyzer hook to decide at analysis time whether analysis + # requires a visitor pass; can be disabled for precomputed results. + # + # @return [Boolean] If analysis requires visitation or not + # + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#35 + def visit?; end + protected # @return [GraphQL::Execution::Multiplex, nil] `nil` if this analyzer is visiting a query # - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#80 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#87 def multiplex; end # @return [GraphQL::Query, nil] `nil` if this analyzer is visiting a multiplex # (When this is `nil`, use `visitor.query` inside visit methods to get the current query) # - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#77 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#84 def query; end # @return [GraphQL::Query, GraphQL::Execution::Multiplex] Whatever this analyzer is analyzing # - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#73 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#80 def subject; end class << self private - # source://graphql//lib/graphql/analysis/ast/analyzer.rb#42 + # source://graphql//lib/graphql/analysis/ast/analyzer.rb#49 def build_visitor_hooks(member_name); end end end @@ -314,16 +289,19 @@ class GraphQL::Analysis::AST::FieldUsage < ::GraphQL::Analysis::AST::Analyzer # source://graphql//lib/graphql/analysis/ast/field_usage.rb#6 def initialize(query); end - # source://graphql//lib/graphql/analysis/ast/field_usage.rb#13 + # source://graphql//lib/graphql/analysis/ast/field_usage.rb#14 def on_leave_field(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/field_usage.rb#26 + # source://graphql//lib/graphql/analysis/ast/field_usage.rb#27 def result; end private - # source://graphql//lib/graphql/analysis/ast/field_usage.rb#36 + # source://graphql//lib/graphql/analysis/ast/field_usage.rb#38 def extract_deprecated_arguments(argument_values); end + + # source://graphql//lib/graphql/analysis/ast/field_usage.rb#73 + def extract_deprecated_enum_value(enum_type, value); end end # Used under the hood to implement complexity validation, @@ -341,7 +319,7 @@ class GraphQL::Analysis::AST::MaxQueryDepth < ::GraphQL::Analysis::AST::QueryDep def result; end end -# source://graphql//lib/graphql/analysis/ast/query_complexity.rb#8 +# source://graphql//lib/graphql/analysis/ast/query_complexity.rb#6 class GraphQL::Analysis::AST::QueryComplexity < ::GraphQL::Analysis::AST::Analyzer # State for the query complexity calculation: # - `complexities_on_type` holds complexity scores for each type @@ -351,10 +329,10 @@ class GraphQL::Analysis::AST::QueryComplexity < ::GraphQL::Analysis::AST::Analyz # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#9 def initialize(query); end - # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#61 + # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#49 def on_enter_field(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#83 + # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#66 def on_leave_field(node, parent, visitor); end # Overide this method to use the complexity result @@ -364,11 +342,6 @@ class GraphQL::Analysis::AST::QueryComplexity < ::GraphQL::Analysis::AST::Analyz private - # @return [Boolean] - # - # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#161 - def applies_to?(query, left_scope, right_scope); end - # A hook which is called whenever a field's max complexity is calculated. # Override this method to capture individual field complexity details. # @@ -376,87 +349,75 @@ class GraphQL::Analysis::AST::QueryComplexity < ::GraphQL::Analysis::AST::Analyz # @param max_complexity [Numeric] Field's maximum complexity including child complexity # @param child_complexity [Numeric, nil] Field's child complexity # - # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#179 + # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#134 def field_complexity(scoped_type_complexity, max_complexity:, child_complexity: T.unsafe(nil)); end # @return [Integer] # - # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#95 + # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#78 def max_possible_complexity; end - # (`{field_key => complexity}`) + # @param inner_selections [Array>] Field selections for a scope + # @return [Integer] Total complexity value for all these selections in the parent scope # - # @param children_for_scope [Array] An array of `scoped_children[scope]` hashes - # @return [Integer] Complexity value for all these selections in the current scope - # - # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#185 - def merged_max_complexity(query, children_for_scope); end + # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#139 + def merged_max_complexity(query, inner_selections); end # @param query [GraphQL::Query] Used for `query.possible_types` - # @param scoped_children_hashes [Array] Array of scoped children hashes + # @param scopes [Array] Array of scoped type complexities # @return [Integer] # - # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#107 - def merged_max_complexity_for_scopes(query, scoped_children_hashes); end + # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#87 + def merged_max_complexity_for_scopes(query, scopes); end + + # @return [Boolean] + # + # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#121 + def types_intersect?(query, a, b); end end -# source://graphql//lib/graphql/analysis/ast/query_complexity.rb#19 -class GraphQL::Analysis::AST::QueryComplexity::ScopedTypeComplexity +# ScopedTypeComplexity models a tree of GraphQL types mapped to inner selections, ie: +# Hash> +# +# source://graphql//lib/graphql/analysis/ast/query_complexity.rb#21 +class GraphQL::Analysis::AST::QueryComplexity::ScopedTypeComplexity < ::Hash # @param parent_type [Class] The owner of `field_definition` # @param field_definition [GraphQL::Field, GraphQL::Schema::Field] Used for getting the `.complexity` configuration # @param query [GraphQL::Query] Used for `query.possible_types` # @param response_path [Array] The path to the response key for the field - # @return [ScopedTypeComplexity] a new instance of ScopedTypeComplexity + # @return [Hash>] # - # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#30 + # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#32 def initialize(parent_type, field_definition, query, response_path); end # Returns the value of attribute field_definition. # - # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#24 + # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#25 def field_definition; end # @return [Array] # - # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#40 + # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#42 def nodes; end - # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#56 + # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#44 def own_complexity(child_complexity); end # Returns the value of attribute query. # - # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#24 + # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#25 def query; end # Returns the value of attribute response_path. # - # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#24 + # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#25 def response_path; end - - # This value is only calculated when asked for to avoid needless hash allocations. - # Also, if it's never asked for, we determine that this scope complexity - # is a scalar field ({#terminal?}). - # - # @return [Hash ScopedTypeComplexity>]] Hash ScopedTypeComplexity>] - # - # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#52 - def scoped_children; end - - # Returns true if this field has no selections, ie, it's a scalar. - # We need a quick way to check whether we should continue traversing. - # - # @return [Boolean] - # - # source://graphql//lib/graphql/analysis/ast/query_complexity.rb#44 - def terminal?; end end -# A single proc for {#scoped_children} hashes. Use this to avoid repeated allocations, -# since the lexical binding isn't important. +# A proc for defaulting empty namespace requests as a new scope hash. # -# source://graphql//lib/graphql/analysis/ast/query_complexity.rb#22 -GraphQL::Analysis::AST::QueryComplexity::ScopedTypeComplexity::HASH_CHILDREN = T.let(T.unsafe(nil), Proc) +# source://graphql//lib/graphql/analysis/ast/query_complexity.rb#23 +GraphQL::Analysis::AST::QueryComplexity::ScopedTypeComplexity::DEFAULT_PROC = T.let(T.unsafe(nil), Proc) # source://graphql//lib/graphql/analysis/ast/query_depth.rb#27 class GraphQL::Analysis::AST::QueryDepth < ::GraphQL::Analysis::AST::Analyzer @@ -465,27 +426,27 @@ class GraphQL::Analysis::AST::QueryDepth < ::GraphQL::Analysis::AST::Analyzer # source://graphql//lib/graphql/analysis/ast/query_depth.rb#28 def initialize(query); end - # source://graphql//lib/graphql/analysis/ast/query_depth.rb#34 + # source://graphql//lib/graphql/analysis/ast/query_depth.rb#35 def on_enter_field(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/query_depth.rb#40 + # source://graphql//lib/graphql/analysis/ast/query_depth.rb#43 def on_leave_field(node, parent, visitor); end - # source://graphql//lib/graphql/analysis/ast/query_depth.rb#49 + # source://graphql//lib/graphql/analysis/ast/query_depth.rb#54 def result; end end # Depth first traversal through a query AST, calling AST analyzers # along the way. # -# The visitor is a special case of GraphQL::Language::Visitor, visiting +# The visitor is a special case of GraphQL::Language::StaticVisitor, visiting # only the selected operation, providing helpers for common use cases such # as skipped fields and visiting fragment spreads. # # @see {GraphQL::Analysis::AST::Analyzer} AST Analyzers for queries # # source://graphql//lib/graphql/analysis/ast/visitor.rb#13 -class GraphQL::Analysis::AST::Visitor < ::GraphQL::Language::Visitor +class GraphQL::Analysis::AST::Visitor < ::GraphQL::Language::StaticVisitor # @return [Visitor] a new instance of Visitor # # source://graphql//lib/graphql/analysis/ast/visitor.rb#14 @@ -678,10 +639,10 @@ class GraphQL::Backtrace # source://graphql//lib/graphql/backtrace.rb#30 def initialize(context, value: T.unsafe(nil)); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def [](*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def each(*args, **_arg1, &block); end # source://graphql//lib/graphql/backtrace.rb#34 @@ -815,30 +776,33 @@ GraphQL::Backtrace::Table::MIN_COL_WIDTH = T.let(T.unsafe(nil), Integer) # source://graphql//lib/graphql/backtrace/trace.rb#4 module GraphQL::Backtrace::Trace - # source://graphql//lib/graphql/backtrace/trace.rb#12 + # source://graphql//lib/graphql/backtrace/trace.rb#5 + def initialize(*args, **kwargs, &block); end + + # source://graphql//lib/graphql/backtrace/trace.rb#18 def analyze_query(query:); end - # source://graphql//lib/graphql/backtrace/trace.rb#30 + # source://graphql//lib/graphql/backtrace/trace.rb#36 def execute_field(field:, query:, ast_node:, arguments:, object:); end - # source://graphql//lib/graphql/backtrace/trace.rb#35 + # source://graphql//lib/graphql/backtrace/trace.rb#41 def execute_field_lazy(field:, query:, ast_node:, arguments:, object:); end - # source://graphql//lib/graphql/backtrace/trace.rb#40 + # source://graphql//lib/graphql/backtrace/trace.rb#46 def execute_multiplex(multiplex:); end - # source://graphql//lib/graphql/backtrace/trace.rb#19 + # source://graphql//lib/graphql/backtrace/trace.rb#25 def execute_query(query:); end - # source://graphql//lib/graphql/backtrace/trace.rb#24 + # source://graphql//lib/graphql/backtrace/trace.rb#30 def execute_query_lazy(query:, multiplex:); end - # source://graphql//lib/graphql/backtrace/trace.rb#5 + # source://graphql//lib/graphql/backtrace/trace.rb#11 def validate(query:, validate:); end private - # source://graphql//lib/graphql/backtrace/trace.rb#71 + # source://graphql//lib/graphql/backtrace/trace.rb#69 def push_field_backtrace_context(field, query, ast_node, arguments, object); end # source://graphql//lib/graphql/backtrace/trace.rb#62 @@ -847,7 +811,7 @@ end # When {Backtrace} is enabled, raised errors are wrapped with {TracedError}. # -# source://graphql//lib/graphql/backtrace/traced_error.rb#6 +# source://graphql//lib/graphql/backtrace/traced_error.rb#5 class GraphQL::Backtrace::TracedError < ::GraphQL::Error # @return [TracedError] a new instance of TracedError # @@ -893,27 +857,8 @@ module GraphQL::Backtrace::Tracer end end -# source://graphql//lib/graphql/coercion_error.rb#5 -class GraphQL::CoercionError < ::GraphQL::Error - # @return [CoercionError] a new instance of CoercionError - # - # source://graphql//lib/graphql/coercion_error.rb#8 - def initialize(message, extensions: T.unsafe(nil)); end - - # under the `extensions` key. - # - # @return [Hash] Optional custom data for error objects which will be added - # - # source://graphql//lib/graphql/coercion_error.rb#6 - def extensions; end - - # under the `extensions` key. - # - # @return [Hash] Optional custom data for error objects which will be added - # - # source://graphql//lib/graphql/coercion_error.rb#6 - def extensions=(_arg0); end -end +# source://graphql//lib/graphql/coercion_error.rb#3 +class GraphQL::CoercionError < ::GraphQL::ExecutionError; end # This plugin supports Fiber-based concurrency, along with {GraphQL::Dataloader::Source}. # @@ -934,35 +879,61 @@ end class GraphQL::Dataloader # @return [Dataloader] a new instance of Dataloader # - # source://graphql//lib/graphql/dataloader.rb#52 + # source://graphql//lib/graphql/dataloader.rb#53 def initialize(nonblocking: T.unsafe(nil)); end # @api private Nothing to see here # - # source://graphql//lib/graphql/dataloader.rb#100 + # source://graphql//lib/graphql/dataloader.rb#127 def append_job(&job); end - # source://graphql//lib/graphql/dataloader.rb#234 - def join_queues(previous_queue, next_queue); end + # Clear any already-loaded objects from {Source} caches + # + # @return [void] + # + # source://graphql//lib/graphql/dataloader.rb#136 + def clear_cache; end + + # This is called before the fiber is spawned, from the parent context (i.e. from + # the thread or fiber that it is scheduled from). + # + # @return [Hash] Current fiber-local variables + # + # source://graphql//lib/graphql/dataloader.rb#69 + def get_fiber_variables; end # @return [Boolean] # - # source://graphql//lib/graphql/dataloader.rb#60 + # source://graphql//lib/graphql/dataloader.rb#61 def nonblocking?; end - # @api private Move along, move along - # - # source://graphql//lib/graphql/dataloader.rb#136 + # source://graphql//lib/graphql/dataloader.rb#175 def run; end + # source://graphql//lib/graphql/dataloader.rb#225 + def run_fiber(f); end + # Use a self-contained queue for the work in the block. # - # source://graphql//lib/graphql/dataloader.rb#108 + # source://graphql//lib/graphql/dataloader.rb#144 def run_isolated; end + # Set up the fiber variables in a new fiber. + # + # This is called within the fiber, right after it is spawned. + # + # @param vars [Hash] Fiber-local variables from {get_fiber_variables} + # @return [void] + # + # source://graphql//lib/graphql/dataloader.rb#86 + def set_fiber_variables(vars); end + + # source://graphql//lib/graphql/dataloader.rb#229 + def spawn_fiber; end + # truffle-ruby wasn't doing well with the implementation below # - # source://graphql//lib/graphql/dataloader.rb#80 + # source://graphql//lib/graphql/dataloader.rb#107 def with(source_class, *batch_args, **batch_kwargs); end # Tell the dataloader that this fiber is waiting for data. @@ -971,31 +942,19 @@ class GraphQL::Dataloader # # @return [void] # - # source://graphql//lib/graphql/dataloader.rb#94 + # source://graphql//lib/graphql/dataloader.rb#121 def yield; end private - # If there are pending sources, return a fiber for running them. - # Otherwise, return `nil`. - # - # @return [Fiber, nil] - # - # source://graphql//lib/graphql/dataloader.rb#248 - def create_source_fiber; end + # source://graphql//lib/graphql/dataloader.rb#242 + def join_queues(prev_queue, new_queue); end - # source://graphql//lib/graphql/dataloader.rb#276 - def resume(fiber); end + # source://graphql//lib/graphql/dataloader.rb#248 + def spawn_job_fiber; end - # Copies the thread local vars into the fiber thread local vars. Many - # gems (such as RequestStore, MiniRacer, etc.) rely on thread local vars - # to keep track of execution context, and without this they do not - # behave as expected. - # - # @see https://github.com/rmosolgo/graphql-ruby/issues/3449 - # - # source://graphql//lib/graphql/dataloader.rb#288 - def spawn_fiber; end + # source://graphql//lib/graphql/dataloader.rb#258 + def spawn_source_fiber; end class << self # Returns the value of attribute default_nonblocking. @@ -1016,20 +975,34 @@ class GraphQL::Dataloader # Call the block with a Dataloader instance, # then run all enqueued jobs and return the result of the block. # - # source://graphql//lib/graphql/dataloader.rb#42 + # source://graphql//lib/graphql/dataloader.rb#43 def with_dataloading(&block); end end end +# source://graphql//lib/graphql/dataloader/async_dataloader.rb#4 +class GraphQL::Dataloader::AsyncDataloader < ::GraphQL::Dataloader + # source://graphql//lib/graphql/dataloader/async_dataloader.rb#14 + def run; end + + # source://graphql//lib/graphql/dataloader/async_dataloader.rb#5 + def yield; end + + private + + # source://graphql//lib/graphql/dataloader/async_dataloader.rb#63 + def spawn_source_task(parent_task, condition); end +end + # source://graphql//lib/graphql/dataloader.rb#30 -class GraphQL::Dataloader::AsyncDataloader < ::GraphQL::Dataloader; end +class GraphQL::Dataloader::NonblockingDataloader < ::GraphQL::Dataloader; end # The default implementation of dataloading -- all no-ops. # # The Dataloader interface isn't public, but it enables # simple internal code while adding the option to add Dataloader. # -# source://graphql//lib/graphql/dataloader/null_dataloader.rb#11 +# source://graphql//lib/graphql/dataloader/null_dataloader.rb#9 class GraphQL::Dataloader::NullDataloader < ::GraphQL::Dataloader # source://graphql//lib/graphql/dataloader/null_dataloader.rb#18 def append_job; end @@ -1064,6 +1037,9 @@ class GraphQL::Dataloader::Request # # source://graphql//lib/graphql/dataloader/request.rb#14 def load; end + + # source://graphql//lib/graphql/dataloader/request.rb#18 + def load_with_deprecation_warning; end end # @see Source#request_all which returns an instance of this. @@ -1085,6 +1061,13 @@ end # source://graphql//lib/graphql/dataloader/source.rb#5 class GraphQL::Dataloader::Source + # Clear any already-loaded objects for this source + # + # @return [void] + # + # source://graphql//lib/graphql/dataloader/source.rb#167 + def clear_cache; end + # Returns the value of attribute dataloader. # # source://graphql//lib/graphql/dataloader/source.rb#18 @@ -1116,17 +1099,17 @@ class GraphQL::Dataloader::Source # @param new_results [Hash Object>] key-value pairs to cache in this source # @return [void] # - # source://graphql//lib/graphql/dataloader/source.rb#116 + # source://graphql//lib/graphql/dataloader/source.rb#117 def merge(new_results); end # Returns the value of attribute pending. # - # source://graphql//lib/graphql/dataloader/source.rb#164 + # source://graphql//lib/graphql/dataloader/source.rb#172 def pending; end # @return [Boolean] True if this source has any pending requests for data. # - # source://graphql//lib/graphql/dataloader/source.rb#108 + # source://graphql//lib/graphql/dataloader/source.rb#109 def pending?; end # @return [Dataloader::Request] a pending request for a value from `key`. Call `.load` on that object to wait for the result. @@ -1148,12 +1131,17 @@ class GraphQL::Dataloader::Source # source://graphql//lib/graphql/dataloader/source.rb#34 def result_key_for(value); end + # Returns the value of attribute results. + # + # source://graphql//lib/graphql/dataloader/source.rb#172 + def results; end + # Called by {GraphQL::Dataloader} to resolve and pending requests to this source. # # @api private # @return [void] # - # source://graphql//lib/graphql/dataloader/source.rb#127 + # source://graphql//lib/graphql/dataloader/source.rb#128 def run_pending_keys; end # Called by {Dataloader} to prepare the {Source}'s internal state @@ -1168,7 +1156,7 @@ class GraphQL::Dataloader::Source # # @return [void] # - # source://graphql//lib/graphql/dataloader/source.rb#94 + # source://graphql//lib/graphql/dataloader/source.rb#95 def sync(pending_result_keys); end private @@ -1179,7 +1167,7 @@ class GraphQL::Dataloader::Source # @param key [Object] key passed to {#load} or {#load_all} # @return [Object] The result from {#fetch} for `key`. # - # source://graphql//lib/graphql/dataloader/source.rb#172 + # source://graphql//lib/graphql/dataloader/source.rb#180 def result_for(key); end class << self @@ -1198,17 +1186,20 @@ class GraphQL::Dataloader::Source # @param batch_kwargs [Hash] # @return [Object] # - # source://graphql//lib/graphql/dataloader/source.rb#160 + # source://graphql//lib/graphql/dataloader/source.rb#161 def batch_key_for(*batch_args, **batch_kwargs); end end end +# source://graphql//lib/graphql/dataloader/source.rb#91 +GraphQL::Dataloader::Source::MAX_ITERATIONS = T.let(T.unsafe(nil), Integer) + # This error is raised when `Types::ISO8601Date` is asked to return a value # that cannot be parsed to a Ruby Date. # # @see GraphQL::Types::ISO8601Date which raises this error # -# source://graphql//lib/graphql/date_encoding_error.rb#8 +# source://graphql//lib/graphql/date_encoding_error.rb#7 class GraphQL::DateEncodingError < ::GraphQL::RuntimeTypeError # @return [DateEncodingError] a new instance of DateEncodingError # @@ -1221,14 +1212,6 @@ class GraphQL::DateEncodingError < ::GraphQL::RuntimeTypeError def date_value; end end -# source://graphql//lib/graphql/deprecation.rb#4 -module GraphQL::Deprecation - class << self - # source://graphql//lib/graphql/deprecation.rb#5 - def warn(message); end - end -end - # source://graphql//lib/graphql/dig.rb#3 module GraphQL::Dig # implemented using the old activesupport #dig instead of the ruby built-in @@ -1242,13 +1225,31 @@ module GraphQL::Dig def dig(own_key, *rest_keys); end end -# source://graphql//lib/graphql.rb#72 +# This error is raised when `Types::ISO8601Duration` is asked to return a value +# that cannot be parsed as an ISO8601-formatted duration by ActiveSupport::Duration. +# +# @see GraphQL::Types::ISO8601Duration which raises this error +# +# source://graphql//lib/graphql/duration_encoding_error.rb#7 +class GraphQL::DurationEncodingError < ::GraphQL::RuntimeTypeError + # @return [DurationEncodingError] a new instance of DurationEncodingError + # + # source://graphql//lib/graphql/duration_encoding_error.rb#11 + def initialize(value); end + + # The value which couldn't be encoded + # + # source://graphql//lib/graphql/duration_encoding_error.rb#9 + def duration_value; end +end + +# source://graphql//lib/graphql.rb#73 module GraphQL::EmptyObjects; end -# source://graphql//lib/graphql.rb#74 +# source://graphql//lib/graphql.rb#75 GraphQL::EmptyObjects::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) -# source://graphql//lib/graphql.rb#73 +# source://graphql//lib/graphql.rb#74 GraphQL::EmptyObjects::EMPTY_HASH = T.let(T.unsafe(nil), Hash) # source://graphql//lib/graphql.rb#17 @@ -1323,24 +1324,6 @@ class GraphQL::Execution::Interpreter # # source://graphql//lib/graphql/execution/interpreter.rb#24 def run_all(schema, query_options, context: T.unsafe(nil), max_complexity: T.unsafe(nil)); end - - private - - # source://graphql//lib/graphql/execution/interpreter.rb#204 - def call_after_hooks(instrumenters, object, after_hook_name, ex); end - - # Call each before hook, and if they all succeed, yield. - # If they don't all succeed, call after_ for each one that succeeded. - # - # source://graphql//lib/graphql/execution/interpreter.rb#179 - def call_hooks(instrumenters, object, before_hook_name, after_hook_name); end - - # Call the before_ hooks of each query, - # Then yield if no errors. - # `call_hooks` takes care of appropriate cleanup. - # - # source://graphql//lib/graphql/execution/interpreter.rb#164 - def each_query_call_hooks(instrumenters, queries, i = T.unsafe(nil)); end end end @@ -1390,7 +1373,7 @@ class GraphQL::Execution::Interpreter::Arguments # source://graphql//lib/graphql/execution/interpreter/arguments.rb#24 def initialize(argument_values:, keyword_arguments: T.unsafe(nil)); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def [](*args, **_arg1, &block); end # @return [Hash{Symbol => ArgumentValue}] @@ -1398,10 +1381,10 @@ class GraphQL::Execution::Interpreter::Arguments # source://graphql//lib/graphql/execution/interpreter/arguments.rb#56 def argument_values; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def each(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def each_value(*args, **_arg1, &block); end # @return [Boolean] @@ -1409,16 +1392,16 @@ class GraphQL::Execution::Interpreter::Arguments # source://graphql//lib/graphql/execution/interpreter/arguments.rb#58 def empty?; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def fetch(*args, **_arg1, &block); end # source://graphql//lib/graphql/execution/interpreter/arguments.rb#65 def inspect; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def key?(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def keys(*args, **_arg1, &block); end # The Ruby-style arguments hash, ready for a resolver. @@ -1440,13 +1423,13 @@ class GraphQL::Execution::Interpreter::Arguments # source://graphql//lib/graphql/execution/interpreter/arguments.rb#76 def merge_extras(extra_args); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def size(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def to_h(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def values(*args, **_arg1, &block); end end @@ -1494,11 +1477,11 @@ class GraphQL::Execution::Interpreter::ExecutionErrors def add(err_or_msg); end end -# source://graphql//lib/graphql/execution/interpreter.rb#216 +# source://graphql//lib/graphql/execution/interpreter.rb#150 class GraphQL::Execution::Interpreter::ListResultFailedError < ::GraphQL::Error # @return [ListResultFailedError] a new instance of ListResultFailedError # - # source://graphql//lib/graphql/execution/interpreter.rb#217 + # source://graphql//lib/graphql/execution/interpreter.rb#151 def initialize(value:, path:, field:); end end @@ -1552,12 +1535,12 @@ end # # @api private # -# source://graphql//lib/graphql/execution/interpreter/runtime.rb#10 +# source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#6 class GraphQL::Execution::Interpreter::Runtime # @api private # @return [Runtime] a new instance of Runtime # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#194 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#35 def initialize(query:, lazies_at_depth:); end # @api private @@ -1567,23 +1550,23 @@ class GraphQL::Execution::Interpreter::Runtime # @param trace [Boolean] If `false`, don't wrap this with field tracing # @return [GraphQL::Execution::Lazy, Object] If loading `object` will be deferred, it's a wrapper over it. # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#962 - def after_lazy(lazy_obj, field:, owner_object:, arguments:, ast_node:, result:, result_name:, eager: T.unsafe(nil), trace: T.unsafe(nil), &block); end + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#788 + def after_lazy(lazy_obj, field:, owner_object:, arguments:, ast_node:, result:, result_name:, runtime_state:, eager: T.unsafe(nil), trace: T.unsafe(nil), &block); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#1012 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#843 def arguments(graphql_object, arg_owner, ast_node); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#891 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#717 def call_method_on_directives(method_name, object, directives, &block); end # @api private # @return [GraphQL::Query::Context] # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#192 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#33 def context; end # The resolver for `field` returned `value`. Continue to execute the query, @@ -1596,28 +1579,28 @@ class GraphQL::Execution::Interpreter::Runtime # @api private # @return [Lazy, Array, Hash, Object] Lazy, Array, and Hash are all traversed to resolve lazy values later # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#736 - def continue_field(value, owner_type, field, current_type, ast_node, next_selections, is_non_null, owner_object, arguments, result_name, selection_result); end + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#563 + def continue_field(value, owner_type, field, current_type, ast_node, next_selections, is_non_null, owner_object, arguments, result_name, selection_result, was_scoped, runtime_state); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#632 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#459 def continue_value(value, parent_type, field, is_non_null, ast_node, result_name, selection_result); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#620 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#447 def current_path; end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#573 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#400 def dead_result?(selection_result); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#1021 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#852 def delete_all_interpreter_context; end # Check {Schema::Directive.include?} for each directive that's present @@ -1625,81 +1608,81 @@ class GraphQL::Execution::Interpreter::Runtime # @api private # @return [Boolean] # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#924 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#750 def directives_include?(node, graphql_object, parent_type); end # @api private # @return [void] # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#400 - def evaluate_selection(result_name, field_ast_nodes_or_ast_node, owner_object, owner_type, is_eager_field, selections_result, parent_object); end + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#236 + def evaluate_selection(result_name, field_ast_nodes_or_ast_node, owner_object, owner_type, is_eager_field, selections_result, parent_object, runtime_state); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#462 - def evaluate_selection_with_args(arguments, field_defn, ast_node, field_ast_nodes, owner_type, object, is_eager_field, result_name, selection_result, parent_object, return_type, return_type_non_null); end + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#278 + def evaluate_selection_with_args(arguments, field_defn, ast_node, field_ast_nodes, owner_type, object, is_eager_field, result_name, selection_result, parent_object, return_type, runtime_state); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#518 - def evaluate_selection_with_resolved_keyword_args(kwarg_arguments, resolved_arguments, field_defn, ast_node, field_ast_nodes, owner_type, object, is_eager_field, result_name, selection_result, parent_object, return_type, return_type_non_null); end + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#335 + def evaluate_selection_with_resolved_keyword_args(kwarg_arguments, resolved_arguments, field_defn, ast_node, field_ast_nodes, owner_type, object, is_eager_field, result_name, selection_result, parent_object, return_type, return_type_non_null, runtime_state); end # @api private # @return [void] # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#370 - def evaluate_selections(owner_object, owner_type, is_eager_selection, gathered_selections, selections_result, target_result, parent_object); end + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#208 + def evaluate_selections(owner_object, owner_type, is_eager_selection, gathered_selections, selections_result, target_result, parent_object, runtime_state); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#222 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#57 def final_result; end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#302 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#139 def gather_selections(owner_object, owner_type, selections, selections_to_run = T.unsafe(nil), selections_by_name = T.unsafe(nil)); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#935 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#761 def get_current_runtime_state; end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#226 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#61 def inspect; end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#1048 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#879 def lazy?(object); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#945 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#771 def minimal_after_lazy(value, &block); end # @api private # @return [GraphQL::Query] # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#186 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#27 def query; end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#876 - def resolve_list_item(inner_value, inner_type, inner_type_non_null, ast_node, field, owner_object, arguments, this_idx, response_list, next_selections, owner_type); end + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#703 + def resolve_list_item(inner_value, inner_type, inner_type_non_null, ast_node, field, owner_object, arguments, this_idx, response_list, next_selections, owner_type, was_scoped, runtime_state); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#1032 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#863 def resolve_type(type, value); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#896 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#722 def run_directive(method_name, object, directives, idx, &block); end # This _begins_ the execution. Some deferred work @@ -1708,13 +1691,13 @@ class GraphQL::Execution::Interpreter::Runtime # @api private # @return [void] # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#243 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#78 def run_eager; end # @api private # @return [Class] # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#189 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#30 def schema; end # Mark this node and any already-registered children as dead, @@ -1722,243 +1705,218 @@ class GraphQL::Execution::Interpreter::Runtime # # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#607 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#434 def set_graphql_dead(selection_result); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#577 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#404 def set_result(selection_result, result_name, value, is_child_result, is_non_null); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#230 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#65 def tap_or_each(obj_or_array); end end # @api private # -# source://graphql//lib/graphql/execution/interpreter/runtime.rb#11 +# source://graphql//lib/graphql/execution/interpreter/runtime.rb#12 class GraphQL::Execution::Interpreter::Runtime::CurrentState # @api private # @return [CurrentState] a new instance of CurrentState # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#12 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#13 def initialize; end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#20 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#22 def current_arguments; end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#20 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#22 def current_arguments=(_arg0); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#20 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#22 def current_field; end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#20 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#22 def current_field=(_arg0); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#20 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#22 def current_object; end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#20 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#22 def current_object=(_arg0); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#20 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#22 def current_result; end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#20 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#22 def current_result=(_arg0); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#20 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#22 def current_result_name; end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#20 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#22 def current_result_name=(_arg0); end -end -# @api private -# -# source://graphql//lib/graphql/execution/interpreter/runtime.rb#24 -module GraphQL::Execution::Interpreter::Runtime::GraphQLResult # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#25 - def initialize(result_name, parent_result, is_non_null_in_parent); end + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#22 + def was_authorized_by_scope_items; end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#40 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#22 + def was_authorized_by_scope_items=(_arg0); end +end + +# source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#7 +module GraphQL::Execution::Interpreter::Runtime::GraphQLResult + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#8 + def initialize(result_name, parent_result, is_non_null_in_parent); end + + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#23 def build_path(path_array); end - # @api private + # Returns the value of attribute graphql_dead. # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#45 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#28 def graphql_dead; end - # @api private + # Sets the attribute graphql_dead # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#45 + # @param value the value to set the attribute graphql_dead to. + # + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#28 def graphql_dead=(_arg0); end - # @api private + # Returns the value of attribute graphql_is_non_null_in_parent. # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#46 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#29 def graphql_is_non_null_in_parent; end - # @api private + # Returns the value of attribute graphql_parent. # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#46 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#29 def graphql_parent; end - # @api private # @return [Hash] Plain-Ruby result data (`@graphql_metadata` contains Result wrapper objects) # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#49 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#32 def graphql_result_data; end - # @api private # @return [Hash] Plain-Ruby result data (`@graphql_metadata` contains Result wrapper objects) # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#49 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#32 def graphql_result_data=(_arg0); end - # @api private + # Returns the value of attribute graphql_result_name. # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#46 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#29 def graphql_result_name; end - # @api private - # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#36 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#19 def path; end end -# @api private -# -# source://graphql//lib/graphql/execution/interpreter/runtime.rb#138 +# source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#121 class GraphQL::Execution::Interpreter::Runtime::GraphQLResultArray include ::GraphQL::Execution::Interpreter::Runtime::GraphQLResult - # @api private # @return [GraphQLResultArray] a new instance of GraphQLResultArray # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#141 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#124 def initialize(_result_name, _parent_result, _is_non_null_in_parent); end - # @api private - # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#146 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#129 def graphql_skip_at(index); end - # @api private - # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#168 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#151 def set_child_result(idx, value); end - # @api private - # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#158 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#141 def set_leaf(idx, value); end - # @api private - # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#180 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#163 def values; end end -# @api private -# -# source://graphql//lib/graphql/execution/interpreter/runtime.rb#52 +# source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#35 class GraphQL::Execution::Interpreter::Runtime::GraphQLResultHash include ::GraphQL::Execution::Interpreter::Runtime::GraphQLResult - # @api private # @return [GraphQLResultHash] a new instance of GraphQLResultHash # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#53 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#36 def initialize(_result_name, _parent_result, _is_non_null_in_parent); end - # @api private - # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#110 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#93 def [](k); end - # @api private - # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#93 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#76 def delete(key); end - # @api private - # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#98 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#81 def each; end - # @api private + # Returns the value of attribute graphql_merged_into. # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#60 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#43 def graphql_merged_into; end - # @api private + # Sets the attribute graphql_merged_into # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#60 + # @param value the value to set the attribute graphql_merged_into to. + # + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#43 def graphql_merged_into=(_arg0); end - # @api private # @return [Boolean] # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#106 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#89 def key?(k); end - # @api private - # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#114 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#97 def merge_into(into_result); end - # @api private - # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#82 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#65 def set_child_result(key, value); end - # @api private - # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#62 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#45 def set_leaf(key, value); end - # @api private - # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#102 + # source://graphql//lib/graphql/execution/interpreter/runtime/graphql_result.rb#85 def values; end end # @api private # -# source://graphql//lib/graphql/execution/interpreter/runtime.rb#631 +# source://graphql//lib/graphql/execution/interpreter/runtime.rb#458 GraphQL::Execution::Interpreter::Runtime::HALT = T.let(T.unsafe(nil), Object) # @api private # -# source://graphql//lib/graphql/execution/interpreter/runtime.rb#367 +# source://graphql//lib/graphql/execution/interpreter/runtime.rb#205 GraphQL::Execution::Interpreter::Runtime::NO_ARGS = T.let(T.unsafe(nil), Hash) # This wraps a value which is available, but not yet calculated, like a promise or future. @@ -2089,10 +2047,10 @@ class GraphQL::Execution::Lazy::LazyMethodMap::ConcurrentishMap # source://graphql//lib/graphql/execution/lazy/lazy_method_map.rb#76 def compute_if_absent(key); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def each_pair(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def size(*args, **_arg1, &block); end protected @@ -2154,6 +2112,14 @@ class GraphQL::Execution::Lookahead # source://graphql//lib/graphql/execution/lookahead.rb#34 def initialize(query:, ast_nodes:, field: T.unsafe(nil), root_type: T.unsafe(nil), owner_type: T.unsafe(nil)); end + # Like {#selection}, but for aliases. + # It returns a null object (check with {#selected?}) + # + # @return [GraphQL::Execution::Lookahead] + # + # source://graphql//lib/graphql/execution/lookahead.rb#140 + def alias_selection(alias_name, selected_type: T.unsafe(nil), arguments: T.unsafe(nil)); end + # @return [Hash] # # source://graphql//lib/graphql/execution/lookahead.rb#53 @@ -2169,7 +2135,7 @@ class GraphQL::Execution::Lookahead # source://graphql//lib/graphql/execution/lookahead.rb#47 def field; end - # source://graphql//lib/graphql/execution/lookahead.rb#186 + # source://graphql//lib/graphql/execution/lookahead.rb#209 def inspect; end # The method name of the field. @@ -2182,7 +2148,7 @@ class GraphQL::Execution::Lookahead # end # @return [Symbol] # - # source://graphql//lib/graphql/execution/lookahead.rb#182 + # source://graphql//lib/graphql/execution/lookahead.rb#205 def name; end # @return [GraphQL::Schema::Object, GraphQL::Schema::Union, GraphQL::Schema::Interface] @@ -2192,7 +2158,7 @@ class GraphQL::Execution::Lookahead # @return [Boolean] True if this lookahead represents a field that was requested # - # source://graphql//lib/graphql/execution/lookahead.rb#84 + # source://graphql//lib/graphql/execution/lookahead.rb#100 def selected?; end # Like {#selects?}, but can be used for chaining. @@ -2201,7 +2167,7 @@ class GraphQL::Execution::Lookahead # @param field_name [String, Symbol] # @return [GraphQL::Execution::Lookahead] # - # source://graphql//lib/graphql/execution/lookahead.rb#92 + # source://graphql//lib/graphql/execution/lookahead.rb#108 def selection(field_name, selected_type: T.unsafe(nil), arguments: T.unsafe(nil)); end # Like {#selection}, but for all nodes. @@ -2219,7 +2185,7 @@ class GraphQL::Execution::Lookahead # @param arguments [Hash] Arguments which must match in the selection # @return [Array] # - # source://graphql//lib/graphql/execution/lookahead.rb#151 + # source://graphql//lib/graphql/execution/lookahead.rb#174 def selections(arguments: T.unsafe(nil)); end # True if this node has a selection on `field_name`. @@ -2239,61 +2205,93 @@ class GraphQL::Execution::Lookahead # source://graphql//lib/graphql/execution/lookahead.rb#79 def selects?(field_name, selected_type: T.unsafe(nil), arguments: T.unsafe(nil)); end + # True if this node has a selection with alias matching `alias_name`. + # If `alias_name` is a String, it is treated as a GraphQL-style (camelized) + # field name and used verbatim. If `alias_name` is a Symbol, it is + # treated as a Ruby-style (underscored) name and camelized before comparing. + # + # If `arguments:` is provided, each provided key/value will be matched + # against the arguments in the next selection. This method will return false + # if any of the given `arguments:` are not present and matching in the next selection. + # (But, the next selection may contain _more_ than the given arguments.) + # + # @param alias_name [String, Symbol] + # @param arguments [Hash] Arguments which must match in the selection + # @return [Boolean] + # + # source://graphql//lib/graphql/execution/lookahead.rb#95 + def selects_alias?(alias_name, arguments: T.unsafe(nil)); end + private + # source://graphql//lib/graphql/execution/lookahead.rb#349 + def alias_selections; end + # @return [Boolean] # - # source://graphql//lib/graphql/execution/lookahead.rb#296 + # source://graphql//lib/graphql/execution/lookahead.rb#319 def arguments_match?(arguments, field_defn, field_node); end # If a selection on `node` matches `field_name` (which is backed by `field_defn`) # and matches the `arguments:` constraints, then add that node to `matches` # - # source://graphql//lib/graphql/execution/lookahead.rb#274 - def find_selected_nodes(node, field_defn, arguments:, matches:); end + # source://graphql//lib/graphql/execution/lookahead.rb#297 + def find_selected_nodes(node, field_name, field_defn, arguments:, matches:, alias_name: T.unsafe(nil)); end - # source://graphql//lib/graphql/execution/lookahead.rb#234 + # source://graphql//lib/graphql/execution/lookahead.rb#257 def find_selections(subselections_by_type, selections_on_type, selected_type, ast_selections, arguments); end + # source://graphql//lib/graphql/execution/lookahead.rb#333 + def lookahead_for_selection(field_defn, selected_type, arguments, alias_name = T.unsafe(nil)); end + + # source://graphql//lib/graphql/execution/lookahead.rb#354 + def lookup_alias_node(nodes, name); end + + # source://graphql//lib/graphql/execution/lookahead.rb#373 + def lookup_fragment(ast_selection); end + # @return [Boolean] # - # source://graphql//lib/graphql/execution/lookahead.rb#222 + # source://graphql//lib/graphql/execution/lookahead.rb#245 def skipped_by_directive?(ast_selection); end + + # source://graphql//lib/graphql/execution/lookahead.rb#362 + def unwrap_fragments(node); end end # A singleton, so that misses don't come with overhead. # -# source://graphql//lib/graphql/execution/lookahead.rb#218 +# source://graphql//lib/graphql/execution/lookahead.rb#241 GraphQL::Execution::Lookahead::NULL_LOOKAHEAD = T.let(T.unsafe(nil), GraphQL::Execution::Lookahead::NullLookahead) # This is returned for {Lookahead#selection} when a non-existent field is passed # -# source://graphql//lib/graphql/execution/lookahead.rb#192 +# source://graphql//lib/graphql/execution/lookahead.rb#214 class GraphQL::Execution::Lookahead::NullLookahead < ::GraphQL::Execution::Lookahead # No inputs required here. # # @return [NullLookahead] a new instance of NullLookahead # - # source://graphql//lib/graphql/execution/lookahead.rb#193 + # source://graphql//lib/graphql/execution/lookahead.rb#216 def initialize; end - # source://graphql//lib/graphql/execution/lookahead.rb#212 + # source://graphql//lib/graphql/execution/lookahead.rb#235 def inspect; end # @return [Boolean] # - # source://graphql//lib/graphql/execution/lookahead.rb#196 + # source://graphql//lib/graphql/execution/lookahead.rb#219 def selected?; end - # source://graphql//lib/graphql/execution/lookahead.rb#204 + # source://graphql//lib/graphql/execution/lookahead.rb#227 def selection(*_arg0); end - # source://graphql//lib/graphql/execution/lookahead.rb#208 + # source://graphql//lib/graphql/execution/lookahead.rb#231 def selections(*_arg0); end # @return [Boolean] # - # source://graphql//lib/graphql/execution/lookahead.rb#200 + # source://graphql//lib/graphql/execution/lookahead.rb#223 def selects?(*_arg0); end end @@ -2376,7 +2374,7 @@ class GraphQL::Execution::Skip < ::GraphQL::Error; end # the error will be inserted into the response's `"errors"` key # and the field will resolve to `nil`. # -# source://graphql//lib/graphql/execution_error.rb#7 +# source://graphql//lib/graphql/execution_error.rb#6 class GraphQL::ExecutionError < ::GraphQL::Error # @return [ExecutionError] a new instance of ExecutionError # @@ -2445,69 +2443,13 @@ class GraphQL::ExecutionError < ::GraphQL::Error def to_h; end end -# @api private -# -# source://graphql//lib/graphql/filter.rb#6 -class GraphQL::Filter - # @api private - # @return [Filter] a new instance of Filter - # - # source://graphql//lib/graphql/filter.rb#7 - def initialize(only: T.unsafe(nil), except: T.unsafe(nil), silence_deprecation_warning: T.unsafe(nil)); end - - # Returns true if `member, ctx` passes this filter - # - # @api private - # - # source://graphql//lib/graphql/filter.rb#17 - def call(member, ctx); end - - # @api private - # - # source://graphql//lib/graphql/filter.rb#22 - def merge(only: T.unsafe(nil), except: T.unsafe(nil)); end -end - -# @api private -# -# source://graphql//lib/graphql/filter.rb#53 -class GraphQL::Filter::MergedExcept < ::GraphQL::Filter::MergedOnly - # @api private - # - # source://graphql//lib/graphql/filter.rb#54 - def call(member, ctx); end -end - -# @api private -# -# source://graphql//lib/graphql/filter.rb#31 -class GraphQL::Filter::MergedOnly - # @api private - # @return [MergedOnly] a new instance of MergedOnly - # - # source://graphql//lib/graphql/filter.rb#32 - def initialize(first, second); end - - # @api private - # - # source://graphql//lib/graphql/filter.rb#37 - def call(member, ctx); end - - class << self - # @api private - # - # source://graphql//lib/graphql/filter.rb#41 - def build(onlies); end - end -end - # This error is raised when `Types::Int` is given an input value outside of 32-bit integer range. # # For really big integer values, consider `GraphQL::Types::BigInt` # # @see GraphQL::Types::Int which raises this error # -# source://graphql//lib/graphql/integer_decoding_error.rb#9 +# source://graphql//lib/graphql/integer_decoding_error.rb#8 class GraphQL::IntegerDecodingError < ::GraphQL::RuntimeTypeError # @return [IntegerDecodingError] a new instance of IntegerDecodingError # @@ -2529,7 +2471,7 @@ end # # @see GraphQL::Types::Int which raises this error # -# source://graphql//lib/graphql/integer_encoding_error.rb#12 +# source://graphql//lib/graphql/integer_encoding_error.rb#11 class GraphQL::IntegerEncodingError < ::GraphQL::RuntimeTypeError # @return [IntegerEncodingError] a new instance of IntegerEncodingError # @@ -2640,19 +2582,19 @@ end # source://graphql//lib/graphql/introspection/schema_type.rb#5 class GraphQL::Introspection::SchemaType < ::GraphQL::Introspection::BaseObject - # source://graphql//lib/graphql/introspection/schema_type.rb#38 + # source://graphql//lib/graphql/introspection/schema_type.rb#40 def directives; end - # source://graphql//lib/graphql/introspection/schema_type.rb#30 + # source://graphql//lib/graphql/introspection/schema_type.rb#32 def mutation_type; end - # source://graphql//lib/graphql/introspection/schema_type.rb#26 + # source://graphql//lib/graphql/introspection/schema_type.rb#28 def query_type; end # source://graphql//lib/graphql/introspection/schema_type.rb#18 def schema_description; end - # source://graphql//lib/graphql/introspection/schema_type.rb#34 + # source://graphql//lib/graphql/introspection/schema_type.rb#36 def subscription_type; end # source://graphql//lib/graphql/introspection/schema_type.rb#22 @@ -2660,7 +2602,7 @@ class GraphQL::Introspection::SchemaType < ::GraphQL::Introspection::BaseObject private - # source://graphql//lib/graphql/introspection/schema_type.rb#44 + # source://graphql//lib/graphql/introspection/schema_type.rb#46 def permitted_root_type(op_type); end end @@ -2721,7 +2663,7 @@ end # Raised automatically when a field's resolve function returns `nil` # for a non-null field. # -# source://graphql//lib/graphql/invalid_null_error.rb#6 +# source://graphql//lib/graphql/invalid_null_error.rb#5 class GraphQL::InvalidNullError < ::GraphQL::RuntimeTypeError # @return [InvalidNullError] a new instance of InvalidNullError # @@ -2791,7 +2733,7 @@ module GraphQL::Language class << self # @api private # - # source://graphql//lib/graphql/language.rb#18 + # source://graphql//lib/graphql/language.rb#19 def serialize(value); end end end @@ -2799,9 +2741,16 @@ end # source://graphql//lib/graphql/language/block_string.rb#4 module GraphQL::Language::BlockString class << self - # source://graphql//lib/graphql/language/block_string.rb#82 + # @yield [parts.slice!(0, 3).join] + # + # source://graphql//lib/graphql/language/block_string.rb#94 def break_line(line, length); end + # @return [Boolean] + # + # source://graphql//lib/graphql/language/block_string.rb#110 + def contains_only_whitespace?(line); end + # source://graphql//lib/graphql/language/block_string.rb#61 def print(str, indent: T.unsafe(nil)); end @@ -2836,7 +2785,7 @@ module GraphQL::Language::DefinitionSlice end # source://graphql//lib/graphql/language/definition_slice.rb#18 -class GraphQL::Language::DefinitionSlice::DependencyVisitor < ::GraphQL::Language::Visitor +class GraphQL::Language::DefinitionSlice::DependencyVisitor < ::GraphQL::Language::StaticVisitor # @return [DependencyVisitor] a new instance of DependencyVisitor # # source://graphql//lib/graphql/language/definition_slice.rb#19 @@ -2868,61 +2817,61 @@ class GraphQL::Language::DocumentFromSchemaDefinition # @return [DocumentFromSchemaDefinition] a new instance of DocumentFromSchemaDefinition # # source://graphql//lib/graphql/language/document_from_schema_definition.rb#16 - def initialize(schema, context: T.unsafe(nil), only: T.unsafe(nil), except: T.unsafe(nil), include_introspection_types: T.unsafe(nil), include_built_in_directives: T.unsafe(nil), include_built_in_scalars: T.unsafe(nil), always_include_schema: T.unsafe(nil)); end + def initialize(schema, context: T.unsafe(nil), include_introspection_types: T.unsafe(nil), include_built_in_directives: T.unsafe(nil), include_built_in_scalars: T.unsafe(nil), always_include_schema: T.unsafe(nil)); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#135 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#131 def build_argument_node(argument); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#249 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#246 def build_argument_nodes(arguments); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#197 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#194 def build_default_value(default_value, type); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#261 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#262 def build_definition_nodes; end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#176 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#172 def build_directive_location_node(location); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#172 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#168 def build_directive_location_nodes(locations); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#162 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#158 def build_directive_node(directive); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#255 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#256 def build_directive_nodes(directives); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#108 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#104 def build_enum_type_node(enum_type); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#119 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#115 def build_enum_value_node(enum_value); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#79 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#75 def build_field_node(field); end # @api private @@ -2932,32 +2881,32 @@ class GraphQL::Language::DocumentFromSchemaDefinition # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#153 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#149 def build_input_object_node(input_object); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#98 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#94 def build_interface_type_node(interface_type); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#69 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#59 def build_object_type_node(object_type); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#127 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#123 def build_scalar_type_node(scalar_type); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#54 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#44 def build_schema_node; end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#230 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#227 def build_type_definition_node(type); end # @api private @@ -2967,17 +2916,17 @@ class GraphQL::Language::DocumentFromSchemaDefinition # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#182 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#178 def build_type_name_node(type); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#89 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#85 def build_union_type_node(union_type); end # @api private # - # source://graphql//lib/graphql/language/document_from_schema_definition.rb#48 + # source://graphql//lib/graphql/language/document_from_schema_definition.rb#38 def document; end private @@ -3056,216 +3005,220 @@ module GraphQL::Language::Generation def generate(node, indent: T.unsafe(nil), printer: T.unsafe(nil)); end end -# source://graphql//lib/graphql/language/lexer.rb#7 -module GraphQL::Language::Lexer - include ::GraphQL::Language::Lexer::Literals +# source://graphql//lib/graphql/language/lexer.rb#5 +class GraphQL::Language::Lexer + # @return [Lexer] a new instance of Lexer + # + # source://graphql//lib/graphql/language/lexer.rb#6 + def initialize(graphql_str, filename: T.unsafe(nil)); end - class << self - # source://graphql//lib/graphql/language/lexer.rb#133 - def emit(token_name, ts, te, meta, token_value); end + # This produces a unique integer for bytes 2 and 3 of each keyword string + # See https://tenderlovemaking.com/2023/09/02/fast-tokenizers-with-stringscanner.html + # + # source://graphql//lib/graphql/language/lexer.rb#221 + def _hash(key); end + + # source://graphql//lib/graphql/language/lexer.rb#22 + def advance; end + + # source://graphql//lib/graphql/language/lexer.rb#141 + def column_number; end + + # source://graphql//lib/graphql/language/lexer.rb#85 + def debug_token_value(token_name); end + + # @return [Boolean] + # + # source://graphql//lib/graphql/language/lexer.rb#16 + def eos?; end - # source://graphql//lib/graphql/language/lexer.rb#200 - def emit_block(ts, te, meta, value); end + # source://graphql//lib/graphql/language/lexer.rb#137 + def line_number; end - # source://graphql//lib/graphql/language/lexer.rb#207 - def emit_string(ts, te, meta, value); end + # Returns the value of attribute pos. + # + # source://graphql//lib/graphql/language/lexer.rb#20 + def pos; end + + # @raise [GraphQL::ParseError] + # + # source://graphql//lib/graphql/language/lexer.rb#145 + def raise_parse_error(message, line = T.unsafe(nil), col = T.unsafe(nil)); end - # source://graphql//lib/graphql/language/lexer.rb#172 - def record_comment(ts, te, meta, str); end + # source://graphql//lib/graphql/language/lexer.rb#111 + def string_value; end + # source://graphql//lib/graphql/language/lexer.rb#79 + def token_value; end + + class << self # Replace any escaped unicode or whitespace with the _actual_ characters # To avoid allocating more strings, this modifies the string passed into it # - # source://graphql//lib/graphql/language/lexer.rb#148 + # source://graphql//lib/graphql/language/lexer.rb#301 def replace_escaped_characters_in_place(raw_string); end - # source://graphql//lib/graphql/language/lexer.rb#90 + # This is not used during parsing because the parser + # doesn't actually need tokens. + # + # source://graphql//lib/graphql/language/lexer.rb#327 def tokenize(string); end end end -# source://graphql//lib/graphql/language/lexer.rb#10 -GraphQL::Language::Lexer::BLANK = T.let(T.unsafe(nil), Regexp) - -# source://graphql//lib/graphql/language/lexer.rb#62 +# source://graphql//lib/graphql/language/lexer.rb#255 GraphQL::Language::Lexer::BLOCK_QUOTE = T.let(T.unsafe(nil), String) -# source://graphql//lib/graphql/language/lexer.rb#75 -GraphQL::Language::Lexer::BLOCK_STRING = T.let(T.unsafe(nil), Regexp) - -# source://graphql//lib/graphql/language/lexer.rb#11 -GraphQL::Language::Lexer::COMMENT = T.let(T.unsafe(nil), Regexp) - -# source://graphql//lib/graphql/language/lexer.rb#63 -GraphQL::Language::Lexer::ESCAPED_QUOTE = T.let(T.unsafe(nil), Regexp) - -# source://graphql//lib/graphql/language/lexer.rb#186 -GraphQL::Language::Lexer::ESCAPES = T.let(T.unsafe(nil), Regexp) - -# source://graphql//lib/graphql/language/lexer.rb#187 -GraphQL::Language::Lexer::ESCAPES_REPLACE = T.let(T.unsafe(nil), Hash) - -# source://graphql//lib/graphql/language/lexer.rb#15 -GraphQL::Language::Lexer::FLOAT = T.let(T.unsafe(nil), Regexp) - -# source://graphql//lib/graphql/language/lexer.rb#13 -GraphQL::Language::Lexer::FLOAT_DECIMAL = T.let(T.unsafe(nil), Regexp) - -# source://graphql//lib/graphql/language/lexer.rb#14 -GraphQL::Language::Lexer::FLOAT_EXP = T.let(T.unsafe(nil), Regexp) - -# source://graphql//lib/graphql/language/lexer.rb#57 -GraphQL::Language::Lexer::FOUR_DIGIT_UNICODE = T.let(T.unsafe(nil), Regexp) - -# source://graphql//lib/graphql/language/lexer.rb#8 -GraphQL::Language::Lexer::IDENTIFIER = T.let(T.unsafe(nil), Regexp) - -# source://graphql//lib/graphql/language/lexer.rb#12 -GraphQL::Language::Lexer::INT = T.let(T.unsafe(nil), Regexp) - -# source://graphql//lib/graphql/language/lexer.rb#72 -GraphQL::Language::Lexer::LIT = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#259 +GraphQL::Language::Lexer::BLOCK_STRING_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#66 -GraphQL::Language::Lexer::LIT_NAME_LUT = T.let(T.unsafe(nil), Hash) +# source://graphql//lib/graphql/language/lexer.rb#275 +module GraphQL::Language::Lexer::ByteFor; end -# source://graphql//lib/graphql/language/lexer.rb#17 -module GraphQL::Language::Lexer::Literals; end +# source://graphql//lib/graphql/language/lexer.rb#279 +GraphQL::Language::Lexer::ByteFor::ELLIPSIS = T.let(T.unsafe(nil), Integer) -# source://graphql//lib/graphql/language/lexer.rb#50 -GraphQL::Language::Lexer::Literals::AMP = T.let(T.unsafe(nil), String) +# identifier, *not* a keyword +# +# source://graphql//lib/graphql/language/lexer.rb#280 +GraphQL::Language::Lexer::ByteFor::IDENTIFIER = T.let(T.unsafe(nil), Integer) -# source://graphql//lib/graphql/language/lexer.rb#48 -GraphQL::Language::Lexer::Literals::BANG = T.let(T.unsafe(nil), String) +# identifier or keyword +# +# source://graphql//lib/graphql/language/lexer.rb#277 +GraphQL::Language::Lexer::ByteFor::NAME = T.let(T.unsafe(nil), Integer) -# source://graphql//lib/graphql/language/lexer.rb#43 -GraphQL::Language::Lexer::Literals::COLON = T.let(T.unsafe(nil), String) +# int or float +# +# source://graphql//lib/graphql/language/lexer.rb#276 +GraphQL::Language::Lexer::ByteFor::NUMBER = T.let(T.unsafe(nil), Integer) -# source://graphql//lib/graphql/language/lexer.rb#35 -GraphQL::Language::Lexer::Literals::DIRECTIVE = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#281 +GraphQL::Language::Lexer::ByteFor::PUNCTUATION = T.let(T.unsafe(nil), Integer) -# source://graphql//lib/graphql/language/lexer.rb#45 -GraphQL::Language::Lexer::Literals::DIR_SIGN = T.let(T.unsafe(nil), String) +# source://graphql//lib/graphql/language/lexer.rb#278 +GraphQL::Language::Lexer::ByteFor::STRING = T.let(T.unsafe(nil), Integer) -# source://graphql//lib/graphql/language/lexer.rb#46 -GraphQL::Language::Lexer::Literals::ELLIPSIS = T.let(T.unsafe(nil), String) +# source://graphql//lib/graphql/language/lexer.rb#256 +GraphQL::Language::Lexer::ESCAPED_QUOTE = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#33 -GraphQL::Language::Lexer::Literals::ENUM = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#97 +GraphQL::Language::Lexer::ESCAPES = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#47 -GraphQL::Language::Lexer::Literals::EQUALS = T.let(T.unsafe(nil), String) +# source://graphql//lib/graphql/language/lexer.rb#98 +GraphQL::Language::Lexer::ESCAPES_REPLACE = T.let(T.unsafe(nil), Hash) -# source://graphql//lib/graphql/language/lexer.rb#29 -GraphQL::Language::Lexer::Literals::EXTEND = T.let(T.unsafe(nil), Regexp) +# Use this array to check, for a given byte that will start a token, +# what kind of token might it start? +# +# source://graphql//lib/graphql/language/lexer.rb#273 +GraphQL::Language::Lexer::FIRST_BYTES = T.let(T.unsafe(nil), Array) -# source://graphql//lib/graphql/language/lexer.rb#21 -GraphQL::Language::Lexer::Literals::FALSE = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#157 +GraphQL::Language::Lexer::FLOAT_DECIMAL_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#19 -GraphQL::Language::Lexer::Literals::FRAGMENT = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#158 +GraphQL::Language::Lexer::FLOAT_EXP_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#30 -GraphQL::Language::Lexer::Literals::IMPLEMENTS = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#250 +GraphQL::Language::Lexer::FOUR_DIGIT_UNICODE = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#34 -GraphQL::Language::Lexer::Literals::INPUT = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#155 +GraphQL::Language::Lexer::IDENTIFIER_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#31 -GraphQL::Language::Lexer::Literals::INTERFACE = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#149 +GraphQL::Language::Lexer::IGNORE_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#41 -GraphQL::Language::Lexer::Literals::LBRACKET = T.let(T.unsafe(nil), String) +# source://graphql//lib/graphql/language/lexer.rb#156 +GraphQL::Language::Lexer::INT_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#37 -GraphQL::Language::Lexer::Literals::LCURLY = T.let(T.unsafe(nil), String) +# source://graphql//lib/graphql/language/lexer.rb#161 +GraphQL::Language::Lexer::KEYWORDS = T.let(T.unsafe(nil), Array) -# source://graphql//lib/graphql/language/lexer.rb#39 -GraphQL::Language::Lexer::Literals::LPAREN = T.let(T.unsafe(nil), String) +# source://graphql//lib/graphql/language/lexer.rb#184 +GraphQL::Language::Lexer::KEYWORD_BY_TWO_BYTES = T.let(T.unsafe(nil), Array) -# source://graphql//lib/graphql/language/lexer.rb#24 -GraphQL::Language::Lexer::Literals::MUTATION = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#183 +GraphQL::Language::Lexer::KEYWORD_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#22 -GraphQL::Language::Lexer::Literals::NULL = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#159 +GraphQL::Language::Lexer::NUMERIC_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#18 -GraphQL::Language::Lexer::Literals::ON = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#251 +GraphQL::Language::Lexer::N_DIGIT_UNICODE = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#49 -GraphQL::Language::Lexer::Literals::PIPE = T.let(T.unsafe(nil), String) +# A sparse array mapping the bytes for each punctuation +# to a symbol name for that punctuation +# +# source://graphql//lib/graphql/language/lexer.rb#243 +GraphQL::Language::Lexer::PUNCTUATION_NAME_FOR_BYTE = T.let(T.unsafe(nil), Array) -# source://graphql//lib/graphql/language/lexer.rb#23 -GraphQL::Language::Lexer::Literals::QUERY = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#225 +module GraphQL::Language::Lexer::Punctuation; end -# source://graphql//lib/graphql/language/lexer.rb#42 -GraphQL::Language::Lexer::Literals::RBRACKET = T.let(T.unsafe(nil), String) +# source://graphql//lib/graphql/language/lexer.rb#238 +GraphQL::Language::Lexer::Punctuation::AMP = T.let(T.unsafe(nil), String) -# source://graphql//lib/graphql/language/lexer.rb#38 -GraphQL::Language::Lexer::Literals::RCURLY = T.let(T.unsafe(nil), String) +# source://graphql//lib/graphql/language/lexer.rb#236 +GraphQL::Language::Lexer::Punctuation::BANG = T.let(T.unsafe(nil), String) -# source://graphql//lib/graphql/language/lexer.rb#36 -GraphQL::Language::Lexer::Literals::REPEATABLE = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#232 +GraphQL::Language::Lexer::Punctuation::COLON = T.let(T.unsafe(nil), String) -# source://graphql//lib/graphql/language/lexer.rb#40 -GraphQL::Language::Lexer::Literals::RPAREN = T.let(T.unsafe(nil), String) +# source://graphql//lib/graphql/language/lexer.rb#234 +GraphQL::Language::Lexer::Punctuation::DIR_SIGN = T.let(T.unsafe(nil), String) -# source://graphql//lib/graphql/language/lexer.rb#27 -GraphQL::Language::Lexer::Literals::SCALAR = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#235 +GraphQL::Language::Lexer::Punctuation::EQUALS = T.let(T.unsafe(nil), String) -# source://graphql//lib/graphql/language/lexer.rb#26 -GraphQL::Language::Lexer::Literals::SCHEMA = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#230 +GraphQL::Language::Lexer::Punctuation::LBRACKET = T.let(T.unsafe(nil), String) -# source://graphql//lib/graphql/language/lexer.rb#25 -GraphQL::Language::Lexer::Literals::SUBSCRIPTION = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#226 +GraphQL::Language::Lexer::Punctuation::LCURLY = T.let(T.unsafe(nil), String) -# source://graphql//lib/graphql/language/lexer.rb#20 -GraphQL::Language::Lexer::Literals::TRUE = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#228 +GraphQL::Language::Lexer::Punctuation::LPAREN = T.let(T.unsafe(nil), String) -# source://graphql//lib/graphql/language/lexer.rb#28 -GraphQL::Language::Lexer::Literals::TYPE = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#237 +GraphQL::Language::Lexer::Punctuation::PIPE = T.let(T.unsafe(nil), String) -# source://graphql//lib/graphql/language/lexer.rb#32 -GraphQL::Language::Lexer::Literals::UNION = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#231 +GraphQL::Language::Lexer::Punctuation::RBRACKET = T.let(T.unsafe(nil), String) -# source://graphql//lib/graphql/language/lexer.rb#44 -GraphQL::Language::Lexer::Literals::VAR_SIGN = T.let(T.unsafe(nil), String) +# source://graphql//lib/graphql/language/lexer.rb#227 +GraphQL::Language::Lexer::Punctuation::RCURLY = T.let(T.unsafe(nil), String) -# source://graphql//lib/graphql/language/lexer.rb#9 -GraphQL::Language::Lexer::NEWLINE = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#229 +GraphQL::Language::Lexer::Punctuation::RPAREN = T.let(T.unsafe(nil), String) -# source://graphql//lib/graphql/language/lexer.rb#58 -GraphQL::Language::Lexer::N_DIGIT_UNICODE = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#233 +GraphQL::Language::Lexer::Punctuation::VAR_SIGN = T.let(T.unsafe(nil), String) -# source://graphql//lib/graphql/language/lexer.rb#55 +# source://graphql//lib/graphql/language/lexer.rb#248 GraphQL::Language::Lexer::QUOTE = T.let(T.unsafe(nil), String) -# source://graphql//lib/graphql/language/lexer.rb#74 -GraphQL::Language::Lexer::QUOTED_STRING = T.let(T.unsafe(nil), Regexp) +# source://graphql//lib/graphql/language/lexer.rb#258 +GraphQL::Language::Lexer::QUOTED_STRING_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#64 +# source://graphql//lib/graphql/language/lexer.rb#257 GraphQL::Language::Lexer::STRING_CHAR = T.let(T.unsafe(nil), Regexp) # # https://graphql.github.io/graphql-spec/June2018/#sec-String-Value # -# source://graphql//lib/graphql/language/lexer.rb#61 +# source://graphql//lib/graphql/language/lexer.rb#254 GraphQL::Language::Lexer::STRING_ESCAPE = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#56 +# source://graphql//lib/graphql/language/lexer.rb#249 GraphQL::Language::Lexer::UNICODE_DIGIT = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#59 +# source://graphql//lib/graphql/language/lexer.rb#252 GraphQL::Language::Lexer::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) -# # catch-all for anything else. must be at the bottom for precedence. -# -# source://graphql//lib/graphql/language/lexer.rb#88 -GraphQL::Language::Lexer::UNKNOWN_CHAR = T.let(T.unsafe(nil), Regexp) - -# source://graphql//lib/graphql/language/lexer.rb#197 +# source://graphql//lib/graphql/language/lexer.rb#108 GraphQL::Language::Lexer::UTF_8 = T.let(T.unsafe(nil), Regexp) -# source://graphql//lib/graphql/language/lexer.rb#198 +# source://graphql//lib/graphql/language/lexer.rb#109 GraphQL::Language::Lexer::VALID_STRING = T.let(T.unsafe(nil), Regexp) # source://graphql//lib/graphql/language/nodes.rb#4 @@ -3280,15 +3233,6 @@ module GraphQL::Language::Nodes; end # # source://graphql//lib/graphql/language/nodes.rb#12 class GraphQL::Language::Nodes::AbstractNode - # Initialize a node by extracting its position, - # then calling the class's `initialize_node` method. - # - # @param options [Hash] Initial attributes for this node - # @return [AbstractNode] a new instance of AbstractNode - # - # source://graphql//lib/graphql/language/nodes.rb#30 - def initialize(options = T.unsafe(nil)); end - # Value equality # # @return [Boolean] True if `self` is equivalent to `other` @@ -3304,11 +3248,12 @@ class GraphQL::Language::Nodes::AbstractNode # source://graphql//lib/graphql/language/nodes.rb#73 def children_method_name; end - # Returns the value of attribute col. - # - # source://graphql//lib/graphql/language/nodes.rb#25 + # source://graphql//lib/graphql/language/nodes.rb#31 def col; end + # source://graphql//lib/graphql/language/nodes.rb#41 + def definition_line; end + # TODO DRY with `replace_child` # # source://graphql//lib/graphql/language/nodes.rb#119 @@ -3319,9 +3264,7 @@ class GraphQL::Language::Nodes::AbstractNode # source://graphql//lib/graphql/language/nodes.rb#25 def filename; end - # Returns the value of attribute line. - # - # source://graphql//lib/graphql/language/nodes.rb#25 + # source://graphql//lib/graphql/language/nodes.rb#27 def line; end # This creates a copy of `self`, with `new_options` applied. @@ -3380,14 +3323,14 @@ class GraphQL::Language::Nodes::AbstractNode # source://graphql//lib/graphql/language/nodes.rb#176 def children_methods(children_of_type); end - # source://graphql//lib/graphql/language/nodes.rb#264 - def generate_initialize_node; end + # source://graphql//lib/graphql/language/nodes.rb#273 + def generate_initialize; end # These methods return a plain Ruby value, not another node # - Add reader methods # - Add a `#scalars` method # - # source://graphql//lib/graphql/language/nodes.rb#242 + # source://graphql//lib/graphql/language/nodes.rb#243 def scalar_methods(*method_names); end end end @@ -3395,7 +3338,7 @@ end # source://graphql//lib/graphql/language/nodes.rb#14 module GraphQL::Language::Nodes::AbstractNode::DefinitionNode # source://graphql//lib/graphql/language/nodes.rb#19 - def initialize(options = T.unsafe(nil)); end + def initialize(definition_line: T.unsafe(nil), **_rest); end # This AST node's {#line} returns the first line, which may be the description. # @@ -3410,25 +3353,25 @@ GraphQL::Language::Nodes::AbstractNode::NO_CHILDREN = T.let(T.unsafe(nil), Array # A key-value pair for a field's inputs # -# source://graphql//lib/graphql/language/nodes.rb#315 +# source://graphql//lib/graphql/language/nodes.rb#335 class GraphQL::Language::Nodes::Argument < ::GraphQL::Language::Nodes::AbstractNode - # source://graphql//lib/graphql/language/nodes.rb#325 - def children; end + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), value: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), value: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#345 + def children; end # @return [String] the key for this argument # - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # @return [String, Float, Integer, Boolean, Array, InputObject, VariableIdentifier] The value passed for this key # - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def value; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -3441,7 +3384,7 @@ class GraphQL::Language::Nodes::Argument < ::GraphQL::Language::Nodes::AbstractN # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#293 + # source://graphql//lib/graphql/language/nodes.rb#313 def from_a(filename, line, col, name, value); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -3449,24 +3392,24 @@ class GraphQL::Language::Nodes::Argument < ::GraphQL::Language::Nodes::AbstractN end end -# source://graphql//lib/graphql/language/nodes.rb#330 +# source://graphql//lib/graphql/language/nodes.rb#350 class GraphQL::Language::Nodes::Directive < ::GraphQL::Language::Nodes::AbstractNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), arguments: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#190 def arguments; end # source://graphql//lib/graphql/language/nodes.rb#190 def children; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), arguments: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_argument(node_opts); end + def merge_argument(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -3479,7 +3422,7 @@ class GraphQL::Language::Nodes::Directive < ::GraphQL::Language::Nodes::Abstract # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#293 + # source://graphql//lib/graphql/language/nodes.rb#313 def from_a(filename, line, col, name, arguments); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -3487,9 +3430,10 @@ class GraphQL::Language::Nodes::Directive < ::GraphQL::Language::Nodes::Abstract end end -# source://graphql//lib/graphql/language/nodes.rb#338 +# source://graphql//lib/graphql/language/nodes.rb#358 class GraphQL::Language::Nodes::DirectiveDefinition < ::GraphQL::Language::Nodes::AbstractNode - include ::GraphQL::Language::Nodes::AbstractNode::DefinitionNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), repeatable: T.unsafe(nil), description: T.unsafe(nil), arguments: T.unsafe(nil), locations: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil), definition_pos: T.unsafe(nil)); end # source://graphql//lib/graphql/language/nodes.rb#190 def arguments; end @@ -3499,28 +3443,25 @@ class GraphQL::Language::Nodes::DirectiveDefinition < ::GraphQL::Language::Nodes # Returns the value of attribute description. # - # source://graphql//lib/graphql/language/nodes.rb#340 + # source://graphql//lib/graphql/language/nodes.rb#359 def description; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), repeatable: T.unsafe(nil), description: T.unsafe(nil), arguments: T.unsafe(nil), locations: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#190 def locations; end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_argument(node_opts); end + def merge_argument(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_location(node_opts); end + def merge_location(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def repeatable; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -3533,7 +3474,7 @@ class GraphQL::Language::Nodes::DirectiveDefinition < ::GraphQL::Language::Nodes # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#296 + # source://graphql//lib/graphql/language/nodes.rb#317 def from_a(filename, line, col, name, repeatable, description, arguments, locations); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -3541,7 +3482,7 @@ class GraphQL::Language::Nodes::DirectiveDefinition < ::GraphQL::Language::Nodes end end -# source://graphql//lib/graphql/language/nodes.rb#335 +# source://graphql//lib/graphql/language/nodes.rb#355 class GraphQL::Language::Nodes::DirectiveLocation < ::GraphQL::Language::Nodes::NameOnlyNode # source://graphql//lib/graphql/language/nodes.rb#149 def visit_method; end @@ -3568,14 +3509,17 @@ end # @example Creating a custom string from a document # class VariableScrubber < GraphQL::Language::Printer # def print_argument(arg) -# "#{arg.name}: " +# print_string("#{arg.name}: ") # end # end # # document.to_query_string(printer: VariableScrubber.new) # -# source://graphql//lib/graphql/language/nodes.rb#544 +# source://graphql//lib/graphql/language/nodes.rb#572 class GraphQL::Language::Nodes::Document < ::GraphQL::Language::Nodes::AbstractNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(definitions: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#190 def children; end @@ -3584,10 +3528,7 @@ class GraphQL::Language::Nodes::Document < ::GraphQL::Language::Nodes::AbstractN # source://graphql//lib/graphql/language/nodes.rb#190 def definitions; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(definitions: T.unsafe(nil)); end - - # source://graphql//lib/graphql/language/nodes.rb#550 + # source://graphql//lib/graphql/language/nodes.rb#578 def slice_definition(name); end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -3600,7 +3541,7 @@ class GraphQL::Language::Nodes::Document < ::GraphQL::Language::Nodes::AbstractN # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#292 + # source://graphql//lib/graphql/language/nodes.rb#312 def from_a(filename, line, col, definitions); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -3610,7 +3551,7 @@ end # An enum value. The string is available as {#name}. # -# source://graphql//lib/graphql/language/nodes.rb#349 +# source://graphql//lib/graphql/language/nodes.rb#368 class GraphQL::Language::Nodes::Enum < ::GraphQL::Language::Nodes::NameOnlyNode # source://graphql//lib/graphql/language/nodes.rb#149 def visit_method; end @@ -3627,34 +3568,32 @@ class GraphQL::Language::Nodes::Enum < ::GraphQL::Language::Nodes::NameOnlyNode end end -# source://graphql//lib/graphql/language/nodes.rb#701 +# source://graphql//lib/graphql/language/nodes.rb#721 class GraphQL::Language::Nodes::EnumTypeDefinition < ::GraphQL::Language::Nodes::AbstractNode - include ::GraphQL::Language::Nodes::AbstractNode::DefinitionNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), description: T.unsafe(nil), directives: T.unsafe(nil), values: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil), definition_pos: T.unsafe(nil)); end # source://graphql//lib/graphql/language/nodes.rb#211 def children; end # Returns the value of attribute description. # - # source://graphql//lib/graphql/language/nodes.rb#703 + # source://graphql//lib/graphql/language/nodes.rb#722 def description; end # source://graphql//lib/graphql/language/nodes.rb#190 def directives; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), description: T.unsafe(nil), directives: T.unsafe(nil), values: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_value(node_opts); end + def merge_value(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#190 @@ -3670,7 +3609,7 @@ class GraphQL::Language::Nodes::EnumTypeDefinition < ::GraphQL::Language::Nodes: # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#295 + # source://graphql//lib/graphql/language/nodes.rb#316 def from_a(filename, line, col, name, description, directives, values); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -3678,27 +3617,27 @@ class GraphQL::Language::Nodes::EnumTypeDefinition < ::GraphQL::Language::Nodes: end end -# source://graphql//lib/graphql/language/nodes.rb#712 +# source://graphql//lib/graphql/language/nodes.rb#731 class GraphQL::Language::Nodes::EnumTypeExtension < ::GraphQL::Language::Nodes::AbstractNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), directives: T.unsafe(nil), values: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#211 def children; end # source://graphql//lib/graphql/language/nodes.rb#190 def directives; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), directives: T.unsafe(nil), values: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_value(node_opts); end + def merge_value(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#190 @@ -3714,7 +3653,7 @@ class GraphQL::Language::Nodes::EnumTypeExtension < ::GraphQL::Language::Nodes:: # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#294 + # source://graphql//lib/graphql/language/nodes.rb#314 def from_a(filename, line, col, name, directives, values); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -3722,31 +3661,29 @@ class GraphQL::Language::Nodes::EnumTypeExtension < ::GraphQL::Language::Nodes:: end end -# source://graphql//lib/graphql/language/nodes.rb#691 +# source://graphql//lib/graphql/language/nodes.rb#712 class GraphQL::Language::Nodes::EnumValueDefinition < ::GraphQL::Language::Nodes::AbstractNode - include ::GraphQL::Language::Nodes::AbstractNode::DefinitionNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), description: T.unsafe(nil), directives: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil), definition_pos: T.unsafe(nil)); end # source://graphql//lib/graphql/language/nodes.rb#190 def children; end # Returns the value of attribute description. # - # source://graphql//lib/graphql/language/nodes.rb#693 + # source://graphql//lib/graphql/language/nodes.rb#713 def description; end # source://graphql//lib/graphql/language/nodes.rb#190 def directives; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), description: T.unsafe(nil), directives: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -3759,7 +3696,7 @@ class GraphQL::Language::Nodes::EnumValueDefinition < ::GraphQL::Language::Nodes # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#294 + # source://graphql//lib/graphql/language/nodes.rb#315 def from_a(filename, line, col, name, description, directives); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -3769,9 +3706,14 @@ end # A single selection in a GraphQL query. # -# source://graphql//lib/graphql/language/nodes.rb#357 +# source://graphql//lib/graphql/language/nodes.rb#376 class GraphQL::Language::Nodes::Field < ::GraphQL::Language::Nodes::AbstractNode - # source://graphql//lib/graphql/language/nodes.rb#254 + # @return [Field] a new instance of Field + # + # source://graphql//lib/graphql/language/nodes.rb#387 + def initialize(name: T.unsafe(nil), arguments: T.unsafe(nil), directives: T.unsafe(nil), selections: T.unsafe(nil), field_alias: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end + + # source://graphql//lib/graphql/language/nodes.rb#255 def alias; end # source://graphql//lib/graphql/language/nodes.rb#190 @@ -3783,22 +3725,19 @@ class GraphQL::Language::Nodes::Field < ::GraphQL::Language::Nodes::AbstractNode # source://graphql//lib/graphql/language/nodes.rb#190 def directives; end - # source://graphql//lib/graphql/language/nodes.rb#368 - def initialize_node(attributes); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_argument(node_opts); end + def merge_argument(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_selection(node_opts); end + def merge_selection(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # @return [Array] Selections on this object (or empty array if this is a scalar field) @@ -3816,17 +3755,18 @@ class GraphQL::Language::Nodes::Field < ::GraphQL::Language::Nodes::AbstractNode # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#377 - def from_a(filename, line, col, graphql_alias, name, arguments, directives, selections); end + # source://graphql//lib/graphql/language/nodes.rb#401 + def from_a(filename, line, col, field_alias, name, arguments, directives, selections); end # source://graphql//lib/graphql/language/nodes.rb#156 def visit_method; end end end -# source://graphql//lib/graphql/language/nodes.rb#609 +# source://graphql//lib/graphql/language/nodes.rb#634 class GraphQL::Language::Nodes::FieldDefinition < ::GraphQL::Language::Nodes::AbstractNode - include ::GraphQL::Language::Nodes::AbstractNode::DefinitionNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), type: T.unsafe(nil), description: T.unsafe(nil), arguments: T.unsafe(nil), directives: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil), definition_pos: T.unsafe(nil)); end # source://graphql//lib/graphql/language/nodes.rb#190 def arguments; end @@ -3836,7 +3776,7 @@ class GraphQL::Language::Nodes::FieldDefinition < ::GraphQL::Language::Nodes::Ab # Returns the value of attribute description. # - # source://graphql//lib/graphql/language/nodes.rb#611 + # source://graphql//lib/graphql/language/nodes.rb#635 def description; end # source://graphql//lib/graphql/language/nodes.rb#190 @@ -3848,25 +3788,22 @@ class GraphQL::Language::Nodes::FieldDefinition < ::GraphQL::Language::Nodes::Ab # source://graphql//lib/graphql/language/nodes.rb#190 def fields; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), type: T.unsafe(nil), description: T.unsafe(nil), arguments: T.unsafe(nil), directives: T.unsafe(nil)); end - - # source://graphql//lib/graphql/language/nodes.rb#622 + # source://graphql//lib/graphql/language/nodes.rb#646 def merge(new_options); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_argument(node_opts); end + def merge_argument(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def type; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -3879,7 +3816,7 @@ class GraphQL::Language::Nodes::FieldDefinition < ::GraphQL::Language::Nodes::Ab # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#296 + # source://graphql//lib/graphql/language/nodes.rb#317 def from_a(filename, line, col, name, type, description, arguments, directives); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -3889,29 +3826,31 @@ end # A reusable fragment, defined at document-level. # -# source://graphql//lib/graphql/language/nodes.rb#388 +# source://graphql//lib/graphql/language/nodes.rb#410 class GraphQL::Language::Nodes::FragmentDefinition < ::GraphQL::Language::Nodes::AbstractNode + # @return [FragmentDefinition] a new instance of FragmentDefinition + # + # source://graphql//lib/graphql/language/nodes.rb#423 + def initialize(name: T.unsafe(nil), type: T.unsafe(nil), directives: T.unsafe(nil), selections: T.unsafe(nil), filename: T.unsafe(nil), pos: T.unsafe(nil), source_string: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#211 def children; end # source://graphql//lib/graphql/language/nodes.rb#190 def directives; end - # source://graphql//lib/graphql/language/nodes.rb#392 - def initialize_node(name: T.unsafe(nil), type: T.unsafe(nil), directives: T.unsafe(nil), selections: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_selection(node_opts); end + def merge_selection(**node_opts); end # @return [String] the identifier for this fragment, which may be applied with `...#{name}` # - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#190 @@ -3919,7 +3858,7 @@ class GraphQL::Language::Nodes::FragmentDefinition < ::GraphQL::Language::Nodes: # @return [String] the type condition for this fragment (name of type which it may apply to) # - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def type; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -3932,7 +3871,7 @@ class GraphQL::Language::Nodes::FragmentDefinition < ::GraphQL::Language::Nodes: # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#399 + # source://graphql//lib/graphql/language/nodes.rb#435 def from_a(filename, line, col, name, type, directives, selections); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -3942,24 +3881,24 @@ end # Application of a named fragment in a selection # -# source://graphql//lib/graphql/language/nodes.rb#413 +# source://graphql//lib/graphql/language/nodes.rb#441 class GraphQL::Language::Nodes::FragmentSpread < ::GraphQL::Language::Nodes::AbstractNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), directives: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#190 def children; end # source://graphql//lib/graphql/language/nodes.rb#190 def directives; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), directives: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -3972,7 +3911,7 @@ class GraphQL::Language::Nodes::FragmentSpread < ::GraphQL::Language::Nodes::Abs # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#293 + # source://graphql//lib/graphql/language/nodes.rb#313 def from_a(filename, line, col, name, directives); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -3982,30 +3921,30 @@ end # An unnamed fragment, defined directly in the query with `... { }` # -# source://graphql//lib/graphql/language/nodes.rb#424 +# source://graphql//lib/graphql/language/nodes.rb#452 class GraphQL::Language::Nodes::InlineFragment < ::GraphQL::Language::Nodes::AbstractNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(type: T.unsafe(nil), directives: T.unsafe(nil), selections: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#211 def children; end # source://graphql//lib/graphql/language/nodes.rb#190 def directives; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(type: T.unsafe(nil), directives: T.unsafe(nil), selections: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_selection(node_opts); end + def merge_selection(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#190 def selections; end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def type; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4018,7 +3957,7 @@ class GraphQL::Language::Nodes::InlineFragment < ::GraphQL::Language::Nodes::Abs # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#294 + # source://graphql//lib/graphql/language/nodes.rb#314 def from_a(filename, line, col, type, directives, selections); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4028,8 +3967,11 @@ end # A collection of key-value inputs which may be a field argument # -# source://graphql//lib/graphql/language/nodes.rb#438 +# source://graphql//lib/graphql/language/nodes.rb#466 class GraphQL::Language::Nodes::InputObject < ::GraphQL::Language::Nodes::AbstractNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(arguments: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end + # @return [Array] A list of key-value pairs inside this input object # # source://graphql//lib/graphql/language/nodes.rb#190 @@ -4038,15 +3980,12 @@ class GraphQL::Language::Nodes::InputObject < ::GraphQL::Language::Nodes::Abstra # source://graphql//lib/graphql/language/nodes.rb#190 def children; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(arguments: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_argument(node_opts); end + def merge_argument(**node_opts); end # @return [Hash] Recursively turn this input object into a Ruby Hash # - # source://graphql//lib/graphql/language/nodes.rb#446 + # source://graphql//lib/graphql/language/nodes.rb#474 def to_h(options = T.unsafe(nil)); end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4054,7 +3993,7 @@ class GraphQL::Language::Nodes::InputObject < ::GraphQL::Language::Nodes::Abstra private - # source://graphql//lib/graphql/language/nodes.rb#458 + # source://graphql//lib/graphql/language/nodes.rb#486 def serialize_value_for_hash(value); end class << self @@ -4064,7 +4003,7 @@ class GraphQL::Language::Nodes::InputObject < ::GraphQL::Language::Nodes::Abstra # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#292 + # source://graphql//lib/graphql/language/nodes.rb#312 def from_a(filename, line, col, arguments); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4072,16 +4011,17 @@ class GraphQL::Language::Nodes::InputObject < ::GraphQL::Language::Nodes::Abstra end end -# source://graphql//lib/graphql/language/nodes.rb#721 +# source://graphql//lib/graphql/language/nodes.rb#740 class GraphQL::Language::Nodes::InputObjectTypeDefinition < ::GraphQL::Language::Nodes::AbstractNode - include ::GraphQL::Language::Nodes::AbstractNode::DefinitionNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), description: T.unsafe(nil), directives: T.unsafe(nil), fields: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil), definition_pos: T.unsafe(nil)); end # source://graphql//lib/graphql/language/nodes.rb#211 def children; end # Returns the value of attribute description. # - # source://graphql//lib/graphql/language/nodes.rb#723 + # source://graphql//lib/graphql/language/nodes.rb#741 def description; end # source://graphql//lib/graphql/language/nodes.rb#190 @@ -4090,19 +4030,16 @@ class GraphQL::Language::Nodes::InputObjectTypeDefinition < ::GraphQL::Language: # source://graphql//lib/graphql/language/nodes.rb#190 def fields; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), description: T.unsafe(nil), directives: T.unsafe(nil), fields: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_field(node_opts); end + def merge_field(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4115,7 +4052,7 @@ class GraphQL::Language::Nodes::InputObjectTypeDefinition < ::GraphQL::Language: # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#295 + # source://graphql//lib/graphql/language/nodes.rb#316 def from_a(filename, line, col, name, description, directives, fields); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4123,8 +4060,11 @@ class GraphQL::Language::Nodes::InputObjectTypeDefinition < ::GraphQL::Language: end end -# source://graphql//lib/graphql/language/nodes.rb#732 +# source://graphql//lib/graphql/language/nodes.rb#750 class GraphQL::Language::Nodes::InputObjectTypeExtension < ::GraphQL::Language::Nodes::AbstractNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), directives: T.unsafe(nil), fields: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#211 def children; end @@ -4134,19 +4074,16 @@ class GraphQL::Language::Nodes::InputObjectTypeExtension < ::GraphQL::Language:: # source://graphql//lib/graphql/language/nodes.rb#190 def fields; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), directives: T.unsafe(nil), fields: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_field(node_opts); end + def merge_field(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4159,7 +4096,7 @@ class GraphQL::Language::Nodes::InputObjectTypeExtension < ::GraphQL::Language:: # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#294 + # source://graphql//lib/graphql/language/nodes.rb#314 def from_a(filename, line, col, name, directives, fields); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4167,37 +4104,35 @@ class GraphQL::Language::Nodes::InputObjectTypeExtension < ::GraphQL::Language:: end end -# source://graphql//lib/graphql/language/nodes.rb#599 +# source://graphql//lib/graphql/language/nodes.rb#625 class GraphQL::Language::Nodes::InputValueDefinition < ::GraphQL::Language::Nodes::AbstractNode - include ::GraphQL::Language::Nodes::AbstractNode::DefinitionNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), type: T.unsafe(nil), default_value: T.unsafe(nil), description: T.unsafe(nil), directives: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil), definition_pos: T.unsafe(nil)); end # source://graphql//lib/graphql/language/nodes.rb#190 def children; end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def default_value; end # Returns the value of attribute description. # - # source://graphql//lib/graphql/language/nodes.rb#601 + # source://graphql//lib/graphql/language/nodes.rb#626 def description; end # source://graphql//lib/graphql/language/nodes.rb#190 def directives; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), type: T.unsafe(nil), default_value: T.unsafe(nil), description: T.unsafe(nil), directives: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def type; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4210,7 +4145,7 @@ class GraphQL::Language::Nodes::InputValueDefinition < ::GraphQL::Language::Node # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#296 + # source://graphql//lib/graphql/language/nodes.rb#317 def from_a(filename, line, col, name, type, default_value, description, directives); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4218,16 +4153,17 @@ class GraphQL::Language::Nodes::InputValueDefinition < ::GraphQL::Language::Node end end -# source://graphql//lib/graphql/language/nodes.rb#650 +# source://graphql//lib/graphql/language/nodes.rb#673 class GraphQL::Language::Nodes::InterfaceTypeDefinition < ::GraphQL::Language::Nodes::AbstractNode - include ::GraphQL::Language::Nodes::AbstractNode::DefinitionNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), description: T.unsafe(nil), interfaces: T.unsafe(nil), directives: T.unsafe(nil), fields: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil), definition_pos: T.unsafe(nil)); end # source://graphql//lib/graphql/language/nodes.rb#211 def children; end # Returns the value of attribute description. # - # source://graphql//lib/graphql/language/nodes.rb#652 + # source://graphql//lib/graphql/language/nodes.rb#674 def description; end # source://graphql//lib/graphql/language/nodes.rb#190 @@ -4236,25 +4172,22 @@ class GraphQL::Language::Nodes::InterfaceTypeDefinition < ::GraphQL::Language::N # source://graphql//lib/graphql/language/nodes.rb#190 def fields; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), description: T.unsafe(nil), interfaces: T.unsafe(nil), directives: T.unsafe(nil), fields: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#190 def interfaces; end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_field(node_opts); end + def merge_field(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_interface(node_opts); end + def merge_interface(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4267,7 +4200,7 @@ class GraphQL::Language::Nodes::InterfaceTypeDefinition < ::GraphQL::Language::N # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#296 + # source://graphql//lib/graphql/language/nodes.rb#317 def from_a(filename, line, col, name, description, interfaces, directives, fields); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4275,8 +4208,11 @@ class GraphQL::Language::Nodes::InterfaceTypeDefinition < ::GraphQL::Language::N end end -# source://graphql//lib/graphql/language/nodes.rb#662 +# source://graphql//lib/graphql/language/nodes.rb#684 class GraphQL::Language::Nodes::InterfaceTypeExtension < ::GraphQL::Language::Nodes::AbstractNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), interfaces: T.unsafe(nil), directives: T.unsafe(nil), fields: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#211 def children; end @@ -4286,25 +4222,22 @@ class GraphQL::Language::Nodes::InterfaceTypeExtension < ::GraphQL::Language::No # source://graphql//lib/graphql/language/nodes.rb#190 def fields; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), interfaces: T.unsafe(nil), directives: T.unsafe(nil), fields: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#190 def interfaces; end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_field(node_opts); end + def merge_field(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_interface(node_opts); end + def merge_interface(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4317,7 +4250,7 @@ class GraphQL::Language::Nodes::InterfaceTypeExtension < ::GraphQL::Language::No # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#295 + # source://graphql//lib/graphql/language/nodes.rb#315 def from_a(filename, line, col, name, interfaces, directives, fields); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4327,7 +4260,7 @@ end # A list type definition, denoted with `[...]` (used for variable type definitions) # -# source://graphql//lib/graphql/language/nodes.rb#477 +# source://graphql//lib/graphql/language/nodes.rb#505 class GraphQL::Language::Nodes::ListType < ::GraphQL::Language::Nodes::WrapperType # source://graphql//lib/graphql/language/nodes.rb#149 def visit_method; end @@ -4349,15 +4282,15 @@ GraphQL::Language::Nodes::NONE = T.let(T.unsafe(nil), Array) # Base class for nodes whose only value is a name (no child nodes or other scalars) # -# source://graphql//lib/graphql/language/nodes.rb#309 +# source://graphql//lib/graphql/language/nodes.rb#329 class GraphQL::Language::Nodes::NameOnlyNode < ::GraphQL::Language::Nodes::AbstractNode - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4370,7 +4303,7 @@ class GraphQL::Language::Nodes::NameOnlyNode < ::GraphQL::Language::Nodes::Abstr # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#292 + # source://graphql//lib/graphql/language/nodes.rb#312 def from_a(filename, line, col, name); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4380,7 +4313,7 @@ end # A non-null type definition, denoted with `...!` (used for variable type definitions) # -# source://graphql//lib/graphql/language/nodes.rb#481 +# source://graphql//lib/graphql/language/nodes.rb#509 class GraphQL::Language::Nodes::NonNullType < ::GraphQL::Language::Nodes::WrapperType # source://graphql//lib/graphql/language/nodes.rb#149 def visit_method; end @@ -4399,7 +4332,7 @@ end # A null value literal. # -# source://graphql//lib/graphql/language/nodes.rb#353 +# source://graphql//lib/graphql/language/nodes.rb#372 class GraphQL::Language::Nodes::NullValue < ::GraphQL::Language::Nodes::NameOnlyNode # source://graphql//lib/graphql/language/nodes.rb#149 def visit_method; end @@ -4416,16 +4349,17 @@ class GraphQL::Language::Nodes::NullValue < ::GraphQL::Language::Nodes::NameOnly end end -# source://graphql//lib/graphql/language/nodes.rb#630 +# source://graphql//lib/graphql/language/nodes.rb#654 class GraphQL::Language::Nodes::ObjectTypeDefinition < ::GraphQL::Language::Nodes::AbstractNode - include ::GraphQL::Language::Nodes::AbstractNode::DefinitionNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), interfaces: T.unsafe(nil), description: T.unsafe(nil), directives: T.unsafe(nil), fields: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil), definition_pos: T.unsafe(nil)); end # source://graphql//lib/graphql/language/nodes.rb#211 def children; end # Returns the value of attribute description. # - # source://graphql//lib/graphql/language/nodes.rb#632 + # source://graphql//lib/graphql/language/nodes.rb#655 def description; end # source://graphql//lib/graphql/language/nodes.rb#190 @@ -4434,22 +4368,19 @@ class GraphQL::Language::Nodes::ObjectTypeDefinition < ::GraphQL::Language::Node # source://graphql//lib/graphql/language/nodes.rb#190 def fields; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), interfaces: T.unsafe(nil), description: T.unsafe(nil), directives: T.unsafe(nil), fields: T.unsafe(nil)); end - - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def interfaces; end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_field(node_opts); end + def merge_field(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4462,7 +4393,7 @@ class GraphQL::Language::Nodes::ObjectTypeDefinition < ::GraphQL::Language::Node # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#296 + # source://graphql//lib/graphql/language/nodes.rb#317 def from_a(filename, line, col, name, interfaces, description, directives, fields); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4470,8 +4401,11 @@ class GraphQL::Language::Nodes::ObjectTypeDefinition < ::GraphQL::Language::Node end end -# source://graphql//lib/graphql/language/nodes.rb#641 +# source://graphql//lib/graphql/language/nodes.rb#664 class GraphQL::Language::Nodes::ObjectTypeExtension < ::GraphQL::Language::Nodes::AbstractNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), interfaces: T.unsafe(nil), directives: T.unsafe(nil), fields: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#211 def children; end @@ -4481,22 +4415,19 @@ class GraphQL::Language::Nodes::ObjectTypeExtension < ::GraphQL::Language::Nodes # source://graphql//lib/graphql/language/nodes.rb#190 def fields; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), interfaces: T.unsafe(nil), directives: T.unsafe(nil), fields: T.unsafe(nil)); end - - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def interfaces; end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_field(node_opts); end + def merge_field(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4509,7 +4440,7 @@ class GraphQL::Language::Nodes::ObjectTypeExtension < ::GraphQL::Language::Nodes # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#295 + # source://graphql//lib/graphql/language/nodes.rb#315 def from_a(filename, line, col, name, interfaces, directives, fields); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4521,35 +4452,35 @@ end # May be anonymous or named. # May be explicitly typed (eg `mutation { ... }`) or implicitly a query (eg `{ ... }`). # -# source://graphql//lib/graphql/language/nodes.rb#503 +# source://graphql//lib/graphql/language/nodes.rb#531 class GraphQL::Language::Nodes::OperationDefinition < ::GraphQL::Language::Nodes::AbstractNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(operation_type: T.unsafe(nil), name: T.unsafe(nil), variables: T.unsafe(nil), directives: T.unsafe(nil), selections: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil), definition_pos: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#211 def children; end # source://graphql//lib/graphql/language/nodes.rb#190 def directives; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(operation_type: T.unsafe(nil), name: T.unsafe(nil), variables: T.unsafe(nil), directives: T.unsafe(nil), selections: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_selection(node_opts); end + def merge_selection(**node_opts); end # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_variable(node_opts); end + def merge_variable(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end # @return [String, nil] The root type for this operation, or `nil` for implicit `"query"` # - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def operation_type; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # @return [Array] Root-level fields on this operation @@ -4572,7 +4503,7 @@ class GraphQL::Language::Nodes::OperationDefinition < ::GraphQL::Language::Nodes # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#296 + # source://graphql//lib/graphql/language/nodes.rb#317 def from_a(filename, line, col, operation_type, name, variables, directives, selections); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4580,31 +4511,29 @@ class GraphQL::Language::Nodes::OperationDefinition < ::GraphQL::Language::Nodes end end -# source://graphql//lib/graphql/language/nodes.rb#581 +# source://graphql//lib/graphql/language/nodes.rb#608 class GraphQL::Language::Nodes::ScalarTypeDefinition < ::GraphQL::Language::Nodes::AbstractNode - include ::GraphQL::Language::Nodes::AbstractNode::DefinitionNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), description: T.unsafe(nil), directives: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil), definition_pos: T.unsafe(nil)); end # source://graphql//lib/graphql/language/nodes.rb#190 def children; end # Returns the value of attribute description. # - # source://graphql//lib/graphql/language/nodes.rb#583 + # source://graphql//lib/graphql/language/nodes.rb#609 def description; end # source://graphql//lib/graphql/language/nodes.rb#190 def directives; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), description: T.unsafe(nil), directives: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4617,7 +4546,7 @@ class GraphQL::Language::Nodes::ScalarTypeDefinition < ::GraphQL::Language::Node # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#294 + # source://graphql//lib/graphql/language/nodes.rb#315 def from_a(filename, line, col, name, description, directives); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4625,24 +4554,24 @@ class GraphQL::Language::Nodes::ScalarTypeDefinition < ::GraphQL::Language::Node end end -# source://graphql//lib/graphql/language/nodes.rb#591 +# source://graphql//lib/graphql/language/nodes.rb#617 class GraphQL::Language::Nodes::ScalarTypeExtension < ::GraphQL::Language::Nodes::AbstractNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), directives: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#190 def children; end # source://graphql//lib/graphql/language/nodes.rb#190 def directives; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), directives: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4655,7 +4584,7 @@ class GraphQL::Language::Nodes::ScalarTypeExtension < ::GraphQL::Language::Nodes # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#293 + # source://graphql//lib/graphql/language/nodes.rb#313 def from_a(filename, line, col, name, directives); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4663,9 +4592,10 @@ class GraphQL::Language::Nodes::ScalarTypeExtension < ::GraphQL::Language::Nodes end end -# source://graphql//lib/graphql/language/nodes.rb#564 +# source://graphql//lib/graphql/language/nodes.rb#592 class GraphQL::Language::Nodes::SchemaDefinition < ::GraphQL::Language::Nodes::AbstractNode - include ::GraphQL::Language::Nodes::AbstractNode::DefinitionNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(query: T.unsafe(nil), mutation: T.unsafe(nil), subscription: T.unsafe(nil), directives: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil), definition_pos: T.unsafe(nil)); end # source://graphql//lib/graphql/language/nodes.rb#190 def children; end @@ -4673,22 +4603,19 @@ class GraphQL::Language::Nodes::SchemaDefinition < ::GraphQL::Language::Nodes::A # source://graphql//lib/graphql/language/nodes.rb#190 def directives; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(query: T.unsafe(nil), mutation: T.unsafe(nil), subscription: T.unsafe(nil), directives: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def mutation; end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def query; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def subscription; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4701,7 +4628,7 @@ class GraphQL::Language::Nodes::SchemaDefinition < ::GraphQL::Language::Nodes::A # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#295 + # source://graphql//lib/graphql/language/nodes.rb#316 def from_a(filename, line, col, query, mutation, subscription, directives); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4709,30 +4636,30 @@ class GraphQL::Language::Nodes::SchemaDefinition < ::GraphQL::Language::Nodes::A end end -# source://graphql//lib/graphql/language/nodes.rb#573 +# source://graphql//lib/graphql/language/nodes.rb#600 class GraphQL::Language::Nodes::SchemaExtension < ::GraphQL::Language::Nodes::AbstractNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(query: T.unsafe(nil), mutation: T.unsafe(nil), subscription: T.unsafe(nil), directives: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#190 def children; end # source://graphql//lib/graphql/language/nodes.rb#190 def directives; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(query: T.unsafe(nil), mutation: T.unsafe(nil), subscription: T.unsafe(nil), directives: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def mutation; end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def query; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def subscription; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4745,7 +4672,7 @@ class GraphQL::Language::Nodes::SchemaExtension < ::GraphQL::Language::Nodes::Ab # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#295 + # source://graphql//lib/graphql/language/nodes.rb#315 def from_a(filename, line, col, query, mutation, subscription, directives); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4755,7 +4682,7 @@ end # A type name, used for variable definitions # -# source://graphql//lib/graphql/language/nodes.rb#556 +# source://graphql//lib/graphql/language/nodes.rb#584 class GraphQL::Language::Nodes::TypeName < ::GraphQL::Language::Nodes::NameOnlyNode # source://graphql//lib/graphql/language/nodes.rb#149 def visit_method; end @@ -4772,36 +4699,34 @@ class GraphQL::Language::Nodes::TypeName < ::GraphQL::Language::Nodes::NameOnlyN end end -# source://graphql//lib/graphql/language/nodes.rb#672 +# source://graphql//lib/graphql/language/nodes.rb#694 class GraphQL::Language::Nodes::UnionTypeDefinition < ::GraphQL::Language::Nodes::AbstractNode - include ::GraphQL::Language::Nodes::AbstractNode::DefinitionNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), types: T.unsafe(nil), description: T.unsafe(nil), directives: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil), definition_pos: T.unsafe(nil)); end # source://graphql//lib/graphql/language/nodes.rb#190 def children; end # Returns the value of attribute description. # - # source://graphql//lib/graphql/language/nodes.rb#674 + # source://graphql//lib/graphql/language/nodes.rb#695 def description; end # source://graphql//lib/graphql/language/nodes.rb#190 def directives; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), types: T.unsafe(nil), description: T.unsafe(nil), directives: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # Returns the value of attribute types. # - # source://graphql//lib/graphql/language/nodes.rb#674 + # source://graphql//lib/graphql/language/nodes.rb#695 def types; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4814,7 +4739,7 @@ class GraphQL::Language::Nodes::UnionTypeDefinition < ::GraphQL::Language::Nodes # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#295 + # source://graphql//lib/graphql/language/nodes.rb#316 def from_a(filename, line, col, name, types, description, directives); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4822,29 +4747,29 @@ class GraphQL::Language::Nodes::UnionTypeDefinition < ::GraphQL::Language::Nodes end end -# source://graphql//lib/graphql/language/nodes.rb#682 +# source://graphql//lib/graphql/language/nodes.rb#703 class GraphQL::Language::Nodes::UnionTypeExtension < ::GraphQL::Language::Nodes::AbstractNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), types: T.unsafe(nil), directives: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#190 def children; end # source://graphql//lib/graphql/language/nodes.rb#190 def directives; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), types: T.unsafe(nil), directives: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#198 - def merge_directive(node_opts); end + def merge_directive(**node_opts); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # Returns the value of attribute types. # - # source://graphql//lib/graphql/language/nodes.rb#683 + # source://graphql//lib/graphql/language/nodes.rb#704 def types; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4857,7 +4782,7 @@ class GraphQL::Language::Nodes::UnionTypeExtension < ::GraphQL::Language::Nodes: # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#294 + # source://graphql//lib/graphql/language/nodes.rb#314 def from_a(filename, line, col, name, types, directives); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4867,25 +4792,34 @@ end # An operation-level query variable # -# source://graphql//lib/graphql/language/nodes.rb#485 +# source://graphql//lib/graphql/language/nodes.rb#513 class GraphQL::Language::Nodes::VariableDefinition < ::GraphQL::Language::Nodes::AbstractNode + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(name: T.unsafe(nil), type: T.unsafe(nil), default_value: T.unsafe(nil), directives: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil), definition_pos: T.unsafe(nil)); end + + # source://graphql//lib/graphql/language/nodes.rb#190 + def children; end + # @return [String, Integer, Float, Boolean, Array, NullValue] A Ruby value to use if no other value is provided # - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def default_value; end - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(name: T.unsafe(nil), type: T.unsafe(nil), default_value: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#190 + def directives; end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#198 + def merge_directive(**node_opts); end + + # source://graphql//lib/graphql/language/nodes.rb#255 def name; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # @return [TypeName, NonNullType, ListType] The expected type of this value # - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def type; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4898,8 +4832,8 @@ class GraphQL::Language::Nodes::VariableDefinition < ::GraphQL::Language::Nodes: # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#294 - def from_a(filename, line, col, name, type, default_value); end + # source://graphql//lib/graphql/language/nodes.rb#316 + def from_a(filename, line, col, name, type, default_value, directives); end # source://graphql//lib/graphql/language/nodes.rb#156 def visit_method; end @@ -4908,7 +4842,7 @@ end # Usage of a variable in a query. Name does _not_ include `$`. # -# source://graphql//lib/graphql/language/nodes.rb#560 +# source://graphql//lib/graphql/language/nodes.rb#588 class GraphQL::Language::Nodes::VariableIdentifier < ::GraphQL::Language::Nodes::NameOnlyNode # source://graphql//lib/graphql/language/nodes.rb#149 def visit_method; end @@ -4927,15 +4861,15 @@ end # Base class for non-null type names and list type names # -# source://graphql//lib/graphql/language/nodes.rb#303 +# source://graphql//lib/graphql/language/nodes.rb#323 class GraphQL::Language::Nodes::WrapperType < ::GraphQL::Language::Nodes::AbstractNode - # source://graphql//lib/graphql/language/nodes.rb#288 - def initialize_node(of_type: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/nodes.rb#303 + def initialize(of_type: T.unsafe(nil), line: T.unsafe(nil), col: T.unsafe(nil), pos: T.unsafe(nil), filename: T.unsafe(nil), source_string: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/nodes.rb#254 + # source://graphql//lib/graphql/language/nodes.rb#255 def of_type; end - # source://graphql//lib/graphql/language/nodes.rb#256 + # source://graphql//lib/graphql/language/nodes.rb#257 def scalars; end # source://graphql//lib/graphql/language/nodes.rb#149 @@ -4948,7 +4882,7 @@ class GraphQL::Language::Nodes::WrapperType < ::GraphQL::Language::Nodes::Abstra # source://graphql//lib/graphql/language/nodes.rb#154 def children_method_name=(_arg0); end - # source://graphql//lib/graphql/language/nodes.rb#292 + # source://graphql//lib/graphql/language/nodes.rb#312 def from_a(filename, line, col, of_type); end # source://graphql//lib/graphql/language/nodes.rb#156 @@ -4956,155 +4890,145 @@ class GraphQL::Language::Nodes::WrapperType < ::GraphQL::Language::Nodes::Abstra end end -# source://graphql//lib/graphql/language/parser.rb#13 -class GraphQL::Language::Parser < ::Racc::Parser - def initialize(query_string, filename:, trace: T.unsafe(nil)); end - - def _reduce_10(val, _values, result); end - def _reduce_100(val, _values, result); end - def _reduce_102(val, _values, result); end - def _reduce_103(val, _values, result); end - def _reduce_104(val, _values, result); end - def _reduce_105(val, _values, result); end - def _reduce_106(val, _values, result); end - def _reduce_107(val, _values, result); end - def _reduce_108(val, _values, result); end - def _reduce_109(val, _values, result); end - def _reduce_11(val, _values, result); end - def _reduce_114(val, _values, result); end - def _reduce_115(val, _values, result); end - def _reduce_116(val, _values, result); end - def _reduce_118(val, _values, result); end - def _reduce_119(val, _values, result); end - def _reduce_12(val, _values, result); end - def _reduce_128(val, _values, result); end - def _reduce_129(val, _values, result); end - def _reduce_136(val, _values, result); end - def _reduce_137(val, _values, result); end - def _reduce_138(val, _values, result); end - def _reduce_139(val, _values, result); end - def _reduce_140(val, _values, result); end - def _reduce_141(val, _values, result); end - def _reduce_142(val, _values, result); end - def _reduce_143(val, _values, result); end - def _reduce_144(val, _values, result); end - def _reduce_145(val, _values, result); end - def _reduce_146(val, _values, result); end - def _reduce_147(val, _values, result); end - def _reduce_148(val, _values, result); end - def _reduce_149(val, _values, result); end - def _reduce_153(val, _values, result); end - def _reduce_154(val, _values, result); end - def _reduce_155(val, _values, result); end - def _reduce_157(val, _values, result); end - def _reduce_158(val, _values, result); end - def _reduce_159(val, _values, result); end - def _reduce_16(val, _values, result); end - def _reduce_160(val, _values, result); end - def _reduce_161(val, _values, result); end - def _reduce_162(val, _values, result); end - def _reduce_163(val, _values, result); end - def _reduce_164(val, _values, result); end - def _reduce_165(val, _values, result); end - def _reduce_166(val, _values, result); end - def _reduce_167(val, _values, result); end - def _reduce_168(val, _values, result); end - def _reduce_169(val, _values, result); end - def _reduce_170(val, _values, result); end - def _reduce_171(val, _values, result); end - def _reduce_172(val, _values, result); end - def _reduce_173(val, _values, result); end - def _reduce_174(val, _values, result); end - def _reduce_175(val, _values, result); end - def _reduce_176(val, _values, result); end - def _reduce_177(val, _values, result); end - def _reduce_178(val, _values, result); end - def _reduce_179(val, _values, result); end - def _reduce_18(val, _values, result); end - def _reduce_180(val, _values, result); end - def _reduce_181(val, _values, result); end - def _reduce_184(val, _values, result); end - def _reduce_185(val, _values, result); end - def _reduce_19(val, _values, result); end - def _reduce_2(val, _values, result); end - def _reduce_20(val, _values, result); end - def _reduce_21(val, _values, result); end - def _reduce_22(val, _values, result); end - def _reduce_23(val, _values, result); end - def _reduce_24(val, _values, result); end - def _reduce_25(val, _values, result); end - def _reduce_26(val, _values, result); end - def _reduce_27(val, _values, result); end - def _reduce_28(val, _values, result); end - def _reduce_29(val, _values, result); end - def _reduce_3(val, _values, result); end - def _reduce_30(val, _values, result); end - def _reduce_31(val, _values, result); end - def _reduce_32(val, _values, result); end - def _reduce_33(val, _values, result); end - def _reduce_37(val, _values, result); end - def _reduce_38(val, _values, result); end - def _reduce_4(val, _values, result); end - def _reduce_63(val, _values, result); end - def _reduce_64(val, _values, result); end - def _reduce_65(val, _values, result); end - def _reduce_66(val, _values, result); end - def _reduce_67(val, _values, result); end - def _reduce_68(val, _values, result); end - def _reduce_69(val, _values, result); end - def _reduce_70(val, _values, result); end - def _reduce_71(val, _values, result); end - def _reduce_72(val, _values, result); end - def _reduce_73(val, _values, result); end - def _reduce_74(val, _values, result); end - def _reduce_75(val, _values, result); end - def _reduce_83(val, _values, result); end - def _reduce_84(val, _values, result); end - def _reduce_85(val, _values, result); end - def _reduce_86(val, _values, result); end - def _reduce_87(val, _values, result); end - def _reduce_88(val, _values, result); end - def _reduce_89(val, _values, result); end - def _reduce_90(val, _values, result); end - def _reduce_91(val, _values, result); end - def _reduce_92(val, _values, result); end - def _reduce_93(val, _values, result); end - def _reduce_94(val, _values, result); end - def _reduce_95(val, _values, result); end - def _reduce_96(val, _values, result); end - def _reduce_97(val, _values, result); end - def _reduce_98(val, _values, result); end - def _reduce_99(val, _values, result); end - - # source://graphql//lib/graphql/language/parser.rb#2010 - def _reduce_none(val, _values, result); end - - def parse_document; end +# source://graphql//lib/graphql/language/parser.rb#8 +class GraphQL::Language::Parser + include ::GraphQL::Language::Nodes + include ::GraphQL::EmptyObjects + + # @return [Parser] a new instance of Parser + # + # source://graphql//lib/graphql/language/parser.rb#30 + def initialize(graphql_str, filename: T.unsafe(nil), trace: T.unsafe(nil)); end + + # source://graphql//lib/graphql/language/parser.rb#40 + def parse; end private - def get_description(token); end - def make_node(node_name, assigns); end - def next_token; end - def on_error(parser_token_id, lexer_token, vstack); end + # source://graphql//lib/graphql/language/parser.rb#55 + def advance_token; end + + # @return [Boolean] + # + # source://graphql//lib/graphql/language/parser.rb#705 + def at?(expected_token_name); end + + # token_value works for when the scanner matched something + # which is usually fine and it's good for it to be fast at that. + # + # source://graphql//lib/graphql/language/parser.rb#741 + def debug_token_value; end + + # source://graphql//lib/graphql/language/parser.rb#78 + def definition; end + + # source://graphql//lib/graphql/language/parser.rb#63 + def document; end + + # source://graphql//lib/graphql/language/parser.rb#716 + def expect_one_of(token_names); end + + # source://graphql//lib/graphql/language/parser.rb#709 + def expect_token(expected_token_name); end + + # Only use when we care about the expected token's value + # + # source://graphql//lib/graphql/language/parser.rb#733 + def expect_token_value(tok); end + + # source://graphql//lib/graphql/language/parser.rb#451 + def list_type; end + + # source://graphql//lib/graphql/language/parser.rb#405 + def parse_argument_definitions; end + + # source://graphql//lib/graphql/language/parser.rb#631 + def parse_arguments; end + + # source://graphql//lib/graphql/language/parser.rb#614 + def parse_directives; end + + # Any identifier, but not true, false, or null + # + # source://graphql//lib/graphql/language/parser.rb#602 + def parse_enum_name; end + + # source://graphql//lib/graphql/language/parser.rb#338 + def parse_enum_value_definitions; end + + # source://graphql//lib/graphql/language/parser.rb#386 + def parse_field_definitions; end + + # source://graphql//lib/graphql/language/parser.rb#371 + def parse_implements; end + + # source://graphql//lib/graphql/language/parser.rb#324 + def parse_input_object_field_definitions; end + + # source://graphql//lib/graphql/language/parser.rb#419 + def parse_input_value_definition; end + + # source://graphql//lib/graphql/language/parser.rb#524 + def parse_name; end + + # source://graphql//lib/graphql/language/parser.rb#593 + def parse_name_without_on; end + + # source://graphql//lib/graphql/language/parser.rb#459 + def parse_operation_type; end + + # source://graphql//lib/graphql/language/parser.rb#610 + def parse_type_name; end + + # source://graphql//lib/graphql/language/parser.rb#357 + def parse_union_members; end + + # source://graphql//lib/graphql/language/parser.rb#59 + def pos; end + + # @raise [GraphQL::ParseError] + # + # source://graphql//lib/graphql/language/parser.rb#720 + def raise_parse_error(message); end + + # source://graphql//lib/graphql/language/parser.rb#473 + def selection_set; end + + # source://graphql//lib/graphql/language/parser.rb#651 + def string_value; end + + # Returns the value of attribute token_name. + # + # source://graphql//lib/graphql/language/parser.rb#53 + def token_name; end + + # source://graphql//lib/graphql/language/parser.rb#436 + def type; end + + # source://graphql//lib/graphql/language/parser.rb#657 + def value; end class << self + # Returns the value of attribute cache. + # + # source://graphql//lib/graphql/language/parser.rb#13 def cache; end + + # Sets the attribute cache + # + # @param value the value to set the attribute cache to. + # + # source://graphql//lib/graphql/language/parser.rb#13 def cache=(_arg0); end - def parse(query_string, filename: T.unsafe(nil), trace: T.unsafe(nil)); end + + # source://graphql//lib/graphql/language/parser.rb#15 + def parse(graphql_str, filename: T.unsafe(nil), trace: T.unsafe(nil)); end + + # source://graphql//lib/graphql/language/parser.rb#19 def parse_file(filename, trace: T.unsafe(nil)); end end end -# source://graphql//lib/graphql/language/parser.rb#838 -GraphQL::Language::Parser::Racc_arg = T.let(T.unsafe(nil), Array) - -# source://graphql//lib/graphql/language/parser.rb#981 -GraphQL::Language::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) - -# source://graphql//lib/graphql/language/parser.rb#854 -GraphQL::Language::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) - # source://graphql//lib/graphql/language/printer.rb#4 class GraphQL::Language::Printer # Turn an arbitrary AST node back into a string. @@ -5117,130 +5041,151 @@ class GraphQL::Language::Printer # # class MyPrinter < GraphQL::Language::Printer # def print_argument(arg) - # "#{arg.name}: " + # print_string("#{arg.name}: ") # end # end # # MyPrinter.new.print(document) # # => "mutation { pay(creditCard: ) { success } }" + # @param node [Nodes::AbstractNode] # @param indent [String] Whitespace to add to the printed node + # @param truncate_size [Integer, nil] The size to truncate to. # @return [String] Valid GraphQL for `node` # - # source://graphql//lib/graphql/language/printer.rb#27 - def print(node, indent: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/printer.rb#54 + def print(node, indent: T.unsafe(nil), truncate_size: T.unsafe(nil)); end protected - # source://graphql//lib/graphql/language/printer.rb#37 + # source://graphql//lib/graphql/language/printer.rb#76 def print_argument(argument); end - # source://graphql//lib/graphql/language/printer.rb#191 + # source://graphql//lib/graphql/language/printer.rb#296 def print_arguments(arguments, indent: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#274 + # source://graphql//lib/graphql/language/printer.rb#420 def print_description(node, indent: T.unsafe(nil), first_in_block: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#41 + # source://graphql//lib/graphql/language/printer.rb#91 def print_directive(directive); end - # source://graphql//lib/graphql/language/printer.rb#259 + # source://graphql//lib/graphql/language/printer.rb#396 def print_directive_definition(directive); end - # source://graphql//lib/graphql/language/printer.rb#294 + # source://graphql//lib/graphql/language/printer.rb#442 def print_directives(directives); end - # source://graphql//lib/graphql/language/printer.rb#33 + # source://graphql//lib/graphql/language/printer.rb#69 def print_document(document); end - # source://graphql//lib/graphql/language/printer.rb#51 + # source://graphql//lib/graphql/language/printer.rb#105 def print_enum(enum); end - # source://graphql//lib/graphql/language/printer.rb#228 + # source://graphql//lib/graphql/language/printer.rb#357 def print_enum_type_definition(enum_type, extension: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#238 + # source://graphql//lib/graphql/language/printer.rb#372 def print_enum_value_definition(enum_value); end - # source://graphql//lib/graphql/language/printer.rb#59 + # source://graphql//lib/graphql/language/printer.rb#113 def print_field(field, indent: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#204 + # source://graphql//lib/graphql/language/printer.rb#320 def print_field_definition(field); end - # source://graphql//lib/graphql/language/printer.rb#281 + # source://graphql//lib/graphql/language/printer.rb#427 def print_field_definitions(fields); end - # source://graphql//lib/graphql/language/printer.rb#69 + # source://graphql//lib/graphql/language/printer.rb#132 def print_fragment_definition(fragment_def, indent: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#79 + # source://graphql//lib/graphql/language/printer.rb#148 def print_fragment_spread(fragment_spread, indent: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#181 + # source://graphql//lib/graphql/language/printer.rb#273 def print_implements(type); end - # source://graphql//lib/graphql/language/printer.rb#85 + # source://graphql//lib/graphql/language/printer.rb#155 def print_inline_fragment(inline_fragment, indent: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#95 + # source://graphql//lib/graphql/language/printer.rb#82 def print_input_object(input_object); end - # source://graphql//lib/graphql/language/printer.rb#244 + # source://graphql//lib/graphql/language/printer.rb#379 def print_input_object_type_definition(input_object_type, extension: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#185 + # source://graphql//lib/graphql/language/printer.rb#285 def print_input_value_definition(input_value); end - # source://graphql//lib/graphql/language/printer.rb#213 + # source://graphql//lib/graphql/language/printer.rb#330 def print_interface_type_definition(interface_type, extension: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#99 + # source://graphql//lib/graphql/language/printer.rb#166 def print_list_type(list_type); end - # source://graphql//lib/graphql/language/printer.rb#314 + # source://graphql//lib/graphql/language/printer.rb#463 def print_node(node, indent: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#103 + # source://graphql//lib/graphql/language/printer.rb#172 def print_non_null_type(non_null_type); end - # source://graphql//lib/graphql/language/printer.rb#55 + # source://graphql//lib/graphql/language/printer.rb#109 def print_null_value; end - # source://graphql//lib/graphql/language/printer.rb#173 + # source://graphql//lib/graphql/language/printer.rb#264 def print_object_type_definition(object_type, extension: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#107 + # source://graphql//lib/graphql/language/printer.rb#177 def print_operation_definition(operation_definition, indent: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#167 + # source://graphql//lib/graphql/language/printer.rb#257 def print_scalar_type_definition(scalar_type, extension: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#134 + # source://graphql//lib/graphql/language/printer.rb#222 def print_schema_definition(schema, extension: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#302 + # source://graphql//lib/graphql/language/printer.rb#451 def print_selections(selections, indent: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#120 + # source://graphql//lib/graphql/language/printer.rb#65 + def print_string(str); end + + # source://graphql//lib/graphql/language/printer.rb#198 def print_type_name(type_name); end - # source://graphql//lib/graphql/language/printer.rb#221 + # source://graphql//lib/graphql/language/printer.rb#339 def print_union_type_definition(union_type, extension: T.unsafe(nil)); end - # source://graphql//lib/graphql/language/printer.rb#124 + # source://graphql//lib/graphql/language/printer.rb#202 def print_variable_definition(variable_definition); end - # source://graphql//lib/graphql/language/printer.rb#130 + # source://graphql//lib/graphql/language/printer.rb#217 def print_variable_identifier(variable_identifier); end +end - private +# source://graphql//lib/graphql/language/printer.rb#5 +GraphQL::Language::Printer::OMISSION = T.let(T.unsafe(nil), String) - # Returns the value of attribute node. +# source://graphql//lib/graphql/language/printer.rb#7 +class GraphQL::Language::Printer::TruncatableBuffer + # @return [TruncatableBuffer] a new instance of TruncatableBuffer # - # source://graphql//lib/graphql/language/printer.rb#397 - def node; end + # source://graphql//lib/graphql/language/printer.rb#12 + def initialize(truncate_size: T.unsafe(nil)); end + + # source://graphql//lib/graphql/language/printer.rb#17 + def append(other); end + + # source://graphql//lib/graphql/language/printer.rb#26 + def to_string; end end +# source://graphql//lib/graphql/language/printer.rb#10 +GraphQL::Language::Printer::TruncatableBuffer::DEFAULT_INIT_CAPACITY = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/language/printer.rb#8 +class GraphQL::Language::Printer::TruncatableBuffer::TruncateSizeReached < ::StandardError; end + # A custom printer used to print sanitized queries. It inlines provided variables # within the query for facilitate logging and analysis of queries. # @@ -5267,66 +5212,220 @@ class GraphQL::Language::SanitizedPrinter < ::GraphQL::Language::Printer # source://graphql//lib/graphql/language/sanitized_printer.rb#99 def coerce_argument_value_to_list?(type, value); end - # source://graphql//lib/graphql/language/sanitized_printer.rb#76 - def print_argument(argument); end + # source://graphql//lib/graphql/language/sanitized_printer.rb#75 + def print_argument(argument); end + + # source://graphql//lib/graphql/language/sanitized_printer.rb#144 + def print_directive(directive); end + + # source://graphql//lib/graphql/language/sanitized_printer.rb#115 + def print_field(field, indent: T.unsafe(nil)); end + + # source://graphql//lib/graphql/language/sanitized_printer.rb#135 + def print_fragment_definition(fragment_def, indent: T.unsafe(nil)); end + + # source://graphql//lib/graphql/language/sanitized_printer.rb#123 + def print_inline_fragment(inline_fragment, indent: T.unsafe(nil)); end + + # source://graphql//lib/graphql/language/sanitized_printer.rb#39 + def print_node(node, indent: T.unsafe(nil)); end + + # Print the operation definition but do not include the variable + # definitions since we will inline them within the query + # + # source://graphql//lib/graphql/language/sanitized_printer.rb#154 + def print_operation_definition(operation_definition, indent: T.unsafe(nil)); end + + # source://graphql//lib/graphql/language/sanitized_printer.rb#106 + def print_variable_identifier(variable_id); end + + # Indicates whether or not to redact non-null values for the given argument. Defaults to redacting all strings + # arguments but this can be customized by subclasses. + # + # @return [Boolean] + # + # source://graphql//lib/graphql/language/sanitized_printer.rb#63 + def redact_argument_value?(argument, value); end + + # Returns the value to use for redacted versions of the given argument. Defaults to the + # string "". + # + # source://graphql//lib/graphql/language/sanitized_printer.rb#71 + def redacted_argument_value(argument); end + + # @return [String, nil] A scrubbed query string, if the query was valid. + # + # source://graphql//lib/graphql/language/sanitized_printer.rb#31 + def sanitized_query_string; end + + private + + # Returns the value of attribute query. + # + # source://graphql//lib/graphql/language/sanitized_printer.rb#217 + def query; end + + # source://graphql//lib/graphql/language/sanitized_printer.rb#172 + def value_to_ast(value, type); end +end + +# source://graphql//lib/graphql/language/sanitized_printer.rb#20 +GraphQL::Language::SanitizedPrinter::REDACTED = T.let(T.unsafe(nil), String) + +# Like `GraphQL::Language::Visitor` except it doesn't support +# making changes to the document -- only visiting it as-is. +# +# source://graphql//lib/graphql/language/static_visitor.rb#6 +class GraphQL::Language::StaticVisitor + # @return [StaticVisitor] a new instance of StaticVisitor + # + # source://graphql//lib/graphql/language/static_visitor.rb#7 + def initialize(document); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_argument(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#109 + def on_argument_children(new_node); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_directive(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_directive_definition(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_directive_location(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_document(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#58 + def on_document_children(document_node); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_enum(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_enum_type_definition(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_enum_type_extension(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_enum_value_definition(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_field(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#65 + def on_field_children(new_node); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_field_definition(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_fragment_definition(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#94 + def on_fragment_definition_children(new_node); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_fragment_spread(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_inline_fragment(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#94 + def on_inline_fragment_children(new_node); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_input_object(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_input_object_type_definition(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_input_object_type_extension(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_input_value_definition(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_interface_type_definition(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_interface_type_extension(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_list_type(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_non_null_type(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_null_value(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_object_type_definition(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_object_type_extension(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_operation_definition(node, parent); end + + # source://graphql//lib/graphql/language/static_visitor.rb#101 + def on_operation_definition_children(new_node); end + + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_scalar_type_definition(node, parent); end - # source://graphql//lib/graphql/language/sanitized_printer.rb#149 - def print_directive(directive); end + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_scalar_type_extension(node, parent); end - # source://graphql//lib/graphql/language/sanitized_printer.rb#115 - def print_field(field, indent: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_schema_definition(node, parent); end - # source://graphql//lib/graphql/language/sanitized_printer.rb#138 - def print_fragment_definition(fragment_def, indent: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_schema_extension(node, parent); end - # source://graphql//lib/graphql/language/sanitized_printer.rb#124 - def print_inline_fragment(inline_fragment, indent: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_type_name(node, parent); end - # source://graphql//lib/graphql/language/sanitized_printer.rb#39 - def print_node(node, indent: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_union_type_definition(node, parent); end - # Print the operation definition but do not include the variable - # definitions since we will inline them within the query - # - # source://graphql//lib/graphql/language/sanitized_printer.rb#160 - def print_operation_definition(operation_definition, indent: T.unsafe(nil)); end + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_union_type_extension(node, parent); end - # source://graphql//lib/graphql/language/sanitized_printer.rb#106 - def print_variable_identifier(variable_id); end + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_variable_definition(node, parent); end - # Indicates whether or not to redact non-null values for the given argument. Defaults to redacting all strings - # arguments but this can be customized by subclasses. - # - # @return [Boolean] - # - # source://graphql//lib/graphql/language/sanitized_printer.rb#64 - def redact_argument_value?(argument, value); end + # source://graphql//lib/graphql/language/static_visitor.rb#40 + def on_variable_identifier(node, parent); end - # Returns the value to use for redacted versions of the given argument. Defaults to the - # string "". + # Visit `document` and all children # - # source://graphql//lib/graphql/language/sanitized_printer.rb#72 - def redacted_argument_value(argument); end - - # @return [String, nil] A scrubbed query string, if the query was valid. + # @return [void] # - # source://graphql//lib/graphql/language/sanitized_printer.rb#31 - def sanitized_query_string; end + # source://graphql//lib/graphql/language/static_visitor.rb#13 + def visit; end - private + # source://graphql//lib/graphql/language/static_visitor.rb#73 + def visit_directives(new_node); end - # Returns the value of attribute query. - # - # source://graphql//lib/graphql/language/sanitized_printer.rb#219 - def query; end + # source://graphql//lib/graphql/language/static_visitor.rb#79 + def visit_selections(new_node); end - # source://graphql//lib/graphql/language/sanitized_printer.rb#179 - def value_to_ast(value, type); end + class << self + # We don't use `alias` here because it breaks `super` + # + # source://graphql//lib/graphql/language/static_visitor.rb#26 + def make_visit_methods(ast_node_class); end + end end -# source://graphql//lib/graphql/language/sanitized_printer.rb#20 -GraphQL::Language::SanitizedPrinter::REDACTED = T.let(T.unsafe(nil), String) - # Emitted by the lexer and passed to the parser. # Contains type, value and position data. # @@ -5409,293 +5508,270 @@ end # # Check the result # visitor.count # # => 3 +# @see GraphQL::Language::StaticVisitor for a faster visitor that doesn't support modifying the document # -# source://graphql//lib/graphql/language/visitor.rb#33 +# source://graphql//lib/graphql/language/visitor.rb#35 class GraphQL::Language::Visitor # @return [Visitor] a new instance of Visitor # - # source://graphql//lib/graphql/language/visitor.rb#45 + # source://graphql//lib/graphql/language/visitor.rb#42 def initialize(document); end - # Get a {NodeVisitor} for `node_class` - # - # @deprecated see `on_` methods, like {#on_field} - # @example Run a hook whenever you enter a new Field - # visitor[GraphQL::Language::Nodes::Field] << ->(node, parent) { p "Here's a field" } - # @param node_class [Class] The node class that you want to listen to - # @return [NodeVisitor] - # - # source://graphql//lib/graphql/language/visitor.rb#61 - def [](node_class); end - - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_argument(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#218 + # source://graphql//lib/graphql/language/visitor.rb#197 def on_argument_children(new_node); end - # source://graphql//lib/graphql/language/visitor.rb#117 + # source://graphql//lib/graphql/language/visitor.rb#96 def on_argument_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_directive(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_directive_definition(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#130 + # source://graphql//lib/graphql/language/visitor.rb#109 def on_directive_definition_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_directive_location(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#117 + # source://graphql//lib/graphql/language/visitor.rb#96 def on_directive_location_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#123 + # source://graphql//lib/graphql/language/visitor.rb#102 def on_directive_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_document(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#140 + # source://graphql//lib/graphql/language/visitor.rb#119 def on_document_children(document_node); end - # source://graphql//lib/graphql/language/visitor.rb#117 + # source://graphql//lib/graphql/language/visitor.rb#96 def on_document_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_enum(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_enum_type_definition(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#130 + # source://graphql//lib/graphql/language/visitor.rb#109 def on_enum_type_definition_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_enum_type_extension(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#130 + # source://graphql//lib/graphql/language/visitor.rb#109 def on_enum_type_extension_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_enum_value_definition(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#123 + # source://graphql//lib/graphql/language/visitor.rb#102 def on_enum_value_definition_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#117 + # source://graphql//lib/graphql/language/visitor.rb#96 def on_enum_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_field(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#153 + # source://graphql//lib/graphql/language/visitor.rb#132 def on_field_children(new_node); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_field_definition(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#130 + # source://graphql//lib/graphql/language/visitor.rb#109 def on_field_definition_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#117 + # source://graphql//lib/graphql/language/visitor.rb#96 def on_field_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_fragment_definition(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#197 + # source://graphql//lib/graphql/language/visitor.rb#176 def on_fragment_definition_children(new_node); end - # source://graphql//lib/graphql/language/visitor.rb#117 + # source://graphql//lib/graphql/language/visitor.rb#96 def on_fragment_definition_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_fragment_spread(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#123 + # source://graphql//lib/graphql/language/visitor.rb#102 def on_fragment_spread_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_inline_fragment(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#197 + # source://graphql//lib/graphql/language/visitor.rb#176 def on_inline_fragment_children(new_node); end - # source://graphql//lib/graphql/language/visitor.rb#117 + # source://graphql//lib/graphql/language/visitor.rb#96 def on_inline_fragment_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_input_object(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_input_object_type_definition(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#130 + # source://graphql//lib/graphql/language/visitor.rb#109 def on_input_object_type_definition_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_input_object_type_extension(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#130 + # source://graphql//lib/graphql/language/visitor.rb#109 def on_input_object_type_extension_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#123 + # source://graphql//lib/graphql/language/visitor.rb#102 def on_input_object_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_input_value_definition(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#123 + # source://graphql//lib/graphql/language/visitor.rb#102 def on_input_value_definition_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_interface_type_definition(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#137 + # source://graphql//lib/graphql/language/visitor.rb#116 def on_interface_type_definition_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_interface_type_extension(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#137 + # source://graphql//lib/graphql/language/visitor.rb#116 def on_interface_type_extension_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_list_type(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#117 + # source://graphql//lib/graphql/language/visitor.rb#96 def on_list_type_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_non_null_type(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#117 + # source://graphql//lib/graphql/language/visitor.rb#96 def on_non_null_type_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_null_value(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#117 + # source://graphql//lib/graphql/language/visitor.rb#96 def on_null_value_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_object_type_definition(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#130 + # source://graphql//lib/graphql/language/visitor.rb#109 def on_object_type_definition_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_object_type_extension(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#130 + # source://graphql//lib/graphql/language/visitor.rb#109 def on_object_type_extension_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_operation_definition(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#205 + # source://graphql//lib/graphql/language/visitor.rb#184 def on_operation_definition_children(new_node); end - # source://graphql//lib/graphql/language/visitor.rb#117 + # source://graphql//lib/graphql/language/visitor.rb#96 def on_operation_definition_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_scalar_type_definition(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#123 + # source://graphql//lib/graphql/language/visitor.rb#102 def on_scalar_type_definition_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_scalar_type_extension(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#123 + # source://graphql//lib/graphql/language/visitor.rb#102 def on_scalar_type_extension_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_schema_definition(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#123 + # source://graphql//lib/graphql/language/visitor.rb#102 def on_schema_definition_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_schema_extension(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#123 + # source://graphql//lib/graphql/language/visitor.rb#102 def on_schema_extension_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_type_name(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#117 + # source://graphql//lib/graphql/language/visitor.rb#96 def on_type_name_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_union_type_definition(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#123 + # source://graphql//lib/graphql/language/visitor.rb#102 def on_union_type_definition_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_union_type_extension(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#123 + # source://graphql//lib/graphql/language/visitor.rb#102 def on_union_type_extension_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_variable_definition(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#117 + # source://graphql//lib/graphql/language/visitor.rb#102 def on_variable_definition_with_modifications(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#95 + # source://graphql//lib/graphql/language/visitor.rb#79 def on_variable_identifier(node, parent); end - # source://graphql//lib/graphql/language/visitor.rb#117 + # source://graphql//lib/graphql/language/visitor.rb#96 def on_variable_identifier_with_modifications(node, parent); end # @return [GraphQL::Language::Nodes::Document] The document with any modifications applied # - # source://graphql//lib/graphql/language/visitor.rb#52 + # source://graphql//lib/graphql/language/visitor.rb#48 def result; end - # Visit `document` and all children, applying hooks as you go + # Visit `document` and all children # # @return [void] # - # source://graphql//lib/graphql/language/visitor.rb#67 + # source://graphql//lib/graphql/language/visitor.rb#52 def visit; end - # source://graphql//lib/graphql/language/visitor.rb#166 + # source://graphql//lib/graphql/language/visitor.rb#145 def visit_directives(new_node); end - # source://graphql//lib/graphql/language/visitor.rb#177 + # source://graphql//lib/graphql/language/visitor.rb#156 def visit_selections(new_node); end private - # source://graphql//lib/graphql/language/visitor.rb#282 + # source://graphql//lib/graphql/language/visitor.rb#261 def apply_modifications(node, parent, new_node_and_new_parent); end - # source://graphql//lib/graphql/language/visitor.rb#309 - def begin_visit(node, parent); end - - # Should global `leave` visitors come first or last? - # - # source://graphql//lib/graphql/language/visitor.rb#315 - def end_visit(node, parent); end - class << self - # If one of the visitors returns SKIP, stop visiting this node - # - # source://graphql//lib/graphql/language/visitor.rb#321 - def apply_hooks(hooks, node, parent); end - # We don't use `alias` here because it breaks `super` # - # source://graphql//lib/graphql/language/visitor.rb#80 + # source://graphql//lib/graphql/language/visitor.rb#65 def make_visit_methods(ast_node_class); end end end @@ -5703,66 +5779,34 @@ end # When this is returned from a visitor method, # Then the `node` passed into the method is removed from `parent`'s children. # -# source://graphql//lib/graphql/language/visitor.rb#43 +# source://graphql//lib/graphql/language/visitor.rb#40 GraphQL::Language::Visitor::DELETE_NODE = T.let(T.unsafe(nil), GraphQL::Language::Visitor::DeleteNode) -# source://graphql//lib/graphql/language/visitor.rb#39 +# source://graphql//lib/graphql/language/visitor.rb#36 class GraphQL::Language::Visitor::DeleteNode; end -# Collect `enter` and `leave` hooks for classes in {GraphQL::Language::Nodes} -# -# Access {NodeVisitor}s via {GraphQL::Language::Visitor#[]} -# -# source://graphql//lib/graphql/language/visitor.rb#331 -class GraphQL::Language::Visitor::NodeVisitor - # @return [NodeVisitor] a new instance of NodeVisitor - # - # source://graphql//lib/graphql/language/visitor.rb#337 - def initialize; end - - # Shorthand to add a hook to the {#enter} array - # - # @param hook [Proc] A hook to add - # - # source://graphql//lib/graphql/language/visitor.rb#344 - def <<(hook); end - - # @return [Array] Hooks to call when entering a node of this type - # - # source://graphql//lib/graphql/language/visitor.rb#333 - def enter; end - - # @return [Array] Hooks to call when leaving a node of this type - # - # source://graphql//lib/graphql/language/visitor.rb#335 - def leave; end -end - -# If any hook returns this value, the {Visitor} stops visiting this -# node right away -# -# @deprecated Use `super` to continue the visit; or don't call it to halt. -# -# source://graphql//lib/graphql/language/visitor.rb#37 -GraphQL::Language::Visitor::SKIP = T.let(T.unsafe(nil), Symbol) - # Raised when a argument is configured with `loads:` and the client provides an `ID`, # but no object is loaded for that ID. # # @see GraphQL::Schema::Member::HasArguments::ArgumentObjectLoader#load_application_object_failed, A hook which you can override in resolvers, mutations and input objects. # -# source://graphql//lib/graphql/load_application_object_failed_error.rb#9 +# source://graphql//lib/graphql/load_application_object_failed_error.rb#8 class GraphQL::LoadApplicationObjectFailedError < ::GraphQL::ExecutionError # @return [LoadApplicationObjectFailedError] a new instance of LoadApplicationObjectFailedError # - # source://graphql//lib/graphql/load_application_object_failed_error.rb#15 - def initialize(argument:, id:, object:); end + # source://graphql//lib/graphql/load_application_object_failed_error.rb#18 + def initialize(argument:, id:, object:, context:); end # @return [GraphQL::Schema::Argument] the argument definition for the argument that was looked up # # source://graphql//lib/graphql/load_application_object_failed_error.rb#10 def argument; end + # @return [GraphQL::Query::Context] + # + # source://graphql//lib/graphql/load_application_object_failed_error.rb#16 + def context; end + # @return [String] The ID provided by the client # # source://graphql//lib/graphql/load_application_object_failed_error.rb#12 @@ -5774,7 +5818,7 @@ class GraphQL::LoadApplicationObjectFailedError < ::GraphQL::ExecutionError def object; end end -# source://graphql//lib/graphql.rb#70 +# source://graphql//lib/graphql.rb#71 GraphQL::NOT_CONFIGURED = T.let(T.unsafe(nil), Object) # source://graphql//lib/graphql/name_validator.rb#3 @@ -5873,47 +5917,47 @@ class GraphQL::Pagination::Connection # @param default_page_size [Integer, nil] A configured value to determine the result size when neither first or last are given. # @return [Connection] a new instance of Connection # - # source://graphql//lib/graphql/pagination/connection.rb#61 + # source://graphql//lib/graphql/pagination/connection.rb#69 def initialize(items, parent: T.unsafe(nil), field: T.unsafe(nil), context: T.unsafe(nil), first: T.unsafe(nil), after: T.unsafe(nil), max_page_size: T.unsafe(nil), default_page_size: T.unsafe(nil), last: T.unsafe(nil), before: T.unsafe(nil), edge_class: T.unsafe(nil), arguments: T.unsafe(nil)); end # @return [String, nil] the client-provided cursor. `""` is treated as `nil`. # - # source://graphql//lib/graphql/pagination/connection.rb#40 + # source://graphql//lib/graphql/pagination/connection.rb#48 def after; end # Raw access to client-provided values. (`max_page_size` not applied to first or last.) # - # source://graphql//lib/graphql/pagination/connection.rb#28 + # source://graphql//lib/graphql/pagination/connection.rb#36 def after_value; end # Raw access to client-provided values. (`max_page_size` not applied to first or last.) # - # source://graphql//lib/graphql/pagination/connection.rb#28 + # source://graphql//lib/graphql/pagination/connection.rb#36 def after_value=(_arg0); end # @return [Hash Object>] The field arguments from the field that returned this connection # - # source://graphql//lib/graphql/pagination/connection.rb#49 + # source://graphql//lib/graphql/pagination/connection.rb#57 def arguments; end # @return [Hash Object>] The field arguments from the field that returned this connection # - # source://graphql//lib/graphql/pagination/connection.rb#49 + # source://graphql//lib/graphql/pagination/connection.rb#57 def arguments=(_arg0); end # @return [String, nil] the client-provided cursor. `""` is treated as `nil`. # - # source://graphql//lib/graphql/pagination/connection.rb#31 + # source://graphql//lib/graphql/pagination/connection.rb#39 def before; end # Raw access to client-provided values. (`max_page_size` not applied to first or last.) # - # source://graphql//lib/graphql/pagination/connection.rb#28 + # source://graphql//lib/graphql/pagination/connection.rb#36 def before_value; end # Raw access to client-provided values. (`max_page_size` not applied to first or last.) # - # source://graphql//lib/graphql/pagination/connection.rb#28 + # source://graphql//lib/graphql/pagination/connection.rb#36 def before_value=(_arg0); end # @return [GraphQL::Query::Context] @@ -5921,10 +5965,8 @@ class GraphQL::Pagination::Connection # source://graphql//lib/graphql/pagination/connection.rb#22 def context; end - # @return [GraphQL::Query::Context] - # - # source://graphql//lib/graphql/pagination/connection.rb#22 - def context=(_arg0); end + # source://graphql//lib/graphql/pagination/connection.rb#24 + def context=(new_ctx); end # Return a cursor for this item. # @@ -5932,50 +5974,50 @@ class GraphQL::Pagination::Connection # @raise [PaginationImplementationMissingError] # @return [String] # - # source://graphql//lib/graphql/pagination/connection.rb#205 + # source://graphql//lib/graphql/pagination/connection.rb#218 def cursor_for(item); end - # source://graphql//lib/graphql/pagination/connection.rb#110 + # source://graphql//lib/graphql/pagination/connection.rb#123 def default_page_size; end - # source://graphql//lib/graphql/pagination/connection.rb#105 + # source://graphql//lib/graphql/pagination/connection.rb#118 def default_page_size=(new_value); end # @return [Class] A wrapper class for edges of this connection # - # source://graphql//lib/graphql/pagination/connection.rb#161 + # source://graphql//lib/graphql/pagination/connection.rb#174 def edge_class; end # @return [Class] A wrapper class for edges of this connection # - # source://graphql//lib/graphql/pagination/connection.rb#161 + # source://graphql//lib/graphql/pagination/connection.rb#174 def edge_class=(_arg0); end # A dynamic alias for compatibility with {Relay::BaseConnection}. # # @deprecated use {#nodes} instead # - # source://graphql//lib/graphql/pagination/connection.rb#173 + # source://graphql//lib/graphql/pagination/connection.rb#186 def edge_nodes; end # @return [Array] {nodes}, but wrapped with Edge instances # - # source://graphql//lib/graphql/pagination/connection.rb#156 + # source://graphql//lib/graphql/pagination/connection.rb#169 def edges; end # @return [String] The cursor of the last item in {nodes} # - # source://graphql//lib/graphql/pagination/connection.rb#198 + # source://graphql//lib/graphql/pagination/connection.rb#211 def end_cursor; end # @return [GraphQL::Schema::Field] The field this connection was returned by # - # source://graphql//lib/graphql/pagination/connection.rb#164 + # source://graphql//lib/graphql/pagination/connection.rb#177 def field; end # @return [GraphQL::Schema::Field] The field this connection was returned by # - # source://graphql//lib/graphql/pagination/connection.rb#164 + # source://graphql//lib/graphql/pagination/connection.rb#177 def field=(_arg0); end # @return [Integer, nil] A clamped `first` value. @@ -5985,46 +6027,46 @@ class GraphQL::Pagination::Connection # is greater than `max_page_size``, it'll be clamped down to # `max_page_size`. If `default_page_size` is nil, use `max_page_size`. # - # source://graphql//lib/graphql/pagination/connection.rb#130 + # source://graphql//lib/graphql/pagination/connection.rb#143 def first; end # Sets the attribute first # # @param value the value to set the attribute first to. # - # source://graphql//lib/graphql/pagination/connection.rb#122 + # source://graphql//lib/graphql/pagination/connection.rb#135 def first=(_arg0); end # Raw access to client-provided values. (`max_page_size` not applied to first or last.) # - # source://graphql//lib/graphql/pagination/connection.rb#28 + # source://graphql//lib/graphql/pagination/connection.rb#36 def first_value; end # Raw access to client-provided values. (`max_page_size` not applied to first or last.) # - # source://graphql//lib/graphql/pagination/connection.rb#28 + # source://graphql//lib/graphql/pagination/connection.rb#36 def first_value=(_arg0); end # @return [Boolean] # - # source://graphql//lib/graphql/pagination/connection.rb#118 + # source://graphql//lib/graphql/pagination/connection.rb#131 def has_default_page_size_override?; end # @return [Boolean] # - # source://graphql//lib/graphql/pagination/connection.rb#101 + # source://graphql//lib/graphql/pagination/connection.rb#114 def has_max_page_size_override?; end # @raise [PaginationImplementationMissingError] # @return [Boolean] True if there are more items after this page # - # source://graphql//lib/graphql/pagination/connection.rb#183 + # source://graphql//lib/graphql/pagination/connection.rb#196 def has_next_page; end # @raise [PaginationImplementationMissingError] # @return [Boolean] True if there were items before these items # - # source://graphql//lib/graphql/pagination/connection.rb#188 + # source://graphql//lib/graphql/pagination/connection.rb#201 def has_previous_page; end # @return [Object] A list object, from the application. This is the unpaginated value passed into the connection. @@ -6034,51 +6076,51 @@ class GraphQL::Pagination::Connection # @return [Integer, nil] A clamped `last` value. (The underlying instance variable doesn't have limits on it) # - # source://graphql//lib/graphql/pagination/connection.rb#151 + # source://graphql//lib/graphql/pagination/connection.rb#164 def last; end # Sets the attribute last # # @param value the value to set the attribute last to. # - # source://graphql//lib/graphql/pagination/connection.rb#149 + # source://graphql//lib/graphql/pagination/connection.rb#162 def last=(_arg0); end # Raw access to client-provided values. (`max_page_size` not applied to first or last.) # - # source://graphql//lib/graphql/pagination/connection.rb#28 + # source://graphql//lib/graphql/pagination/connection.rb#36 def last_value; end # Raw access to client-provided values. (`max_page_size` not applied to first or last.) # - # source://graphql//lib/graphql/pagination/connection.rb#28 + # source://graphql//lib/graphql/pagination/connection.rb#36 def last_value=(_arg0); end - # source://graphql//lib/graphql/pagination/connection.rb#93 + # source://graphql//lib/graphql/pagination/connection.rb#106 def max_page_size; end - # source://graphql//lib/graphql/pagination/connection.rb#88 + # source://graphql//lib/graphql/pagination/connection.rb#101 def max_page_size=(new_value); end # @raise [PaginationImplementationMissingError] # @return [Array] A slice of {items}, constrained by {@first_value}/{@after_value}/{@last_value}/{@before_value} # - # source://graphql//lib/graphql/pagination/connection.rb#167 + # source://graphql//lib/graphql/pagination/connection.rb#180 def nodes; end # The connection object itself implements `PageInfo` fields # - # source://graphql//lib/graphql/pagination/connection.rb#178 + # source://graphql//lib/graphql/pagination/connection.rb#191 def page_info; end # @return [Object] the object this collection belongs to # - # source://graphql//lib/graphql/pagination/connection.rb#25 + # source://graphql//lib/graphql/pagination/connection.rb#33 def parent; end # @return [Object] the object this collection belongs to # - # source://graphql//lib/graphql/pagination/connection.rb#25 + # source://graphql//lib/graphql/pagination/connection.rb#33 def parent=(_arg0); end # This is called by `Relay::RangeAdd` -- it can be overridden @@ -6087,50 +6129,63 @@ class GraphQL::Pagination::Connection # @param item [Object] An item newly added to `items` # @return [Edge] # - # source://graphql//lib/graphql/pagination/connection.rb#145 + # source://graphql//lib/graphql/pagination/connection.rb#158 def range_add_edge(item); end # @return [String] The cursor of the first item in {nodes} # - # source://graphql//lib/graphql/pagination/connection.rb#193 + # source://graphql//lib/graphql/pagination/connection.rb#206 def start_cursor; end + # @return [Boolean] + # + # source://graphql//lib/graphql/pagination/connection.rb#97 + def was_authorized_by_scope_items?; end + private - # source://graphql//lib/graphql/pagination/connection.rb#225 + # source://graphql//lib/graphql/pagination/connection.rb#248 def decode(cursor); end - # source://graphql//lib/graphql/pagination/connection.rb#229 + # source://graphql//lib/graphql/pagination/connection.rb#224 + def detect_was_authorized_by_scope_items; end + + # source://graphql//lib/graphql/pagination/connection.rb#252 def encode(cursor); end # @param argument [nil, Integer] `first` or `last`, as provided by the client # @param max_page_size [nil, Integer] # @return [nil, Integer] `nil` if the input was `nil`, otherwise a value between `0` and `max_page_size` # - # source://graphql//lib/graphql/pagination/connection.rb#214 + # source://graphql//lib/graphql/pagination/connection.rb#237 def limit_pagination_argument(argument, max_page_size); end end # A wrapper around paginated items. It includes a {cursor} for pagination # and could be extended with custom relationship-level data. # -# source://graphql//lib/graphql/pagination/connection.rb#235 +# source://graphql//lib/graphql/pagination/connection.rb#258 class GraphQL::Pagination::Connection::Edge # @return [Edge] a new instance of Edge # - # source://graphql//lib/graphql/pagination/connection.rb#238 + # source://graphql//lib/graphql/pagination/connection.rb#261 def initialize(node, connection); end - # source://graphql//lib/graphql/pagination/connection.rb#247 + # source://graphql//lib/graphql/pagination/connection.rb#270 def cursor; end # Returns the value of attribute node. # - # source://graphql//lib/graphql/pagination/connection.rb#236 + # source://graphql//lib/graphql/pagination/connection.rb#259 def node; end - # source://graphql//lib/graphql/pagination/connection.rb#243 + # source://graphql//lib/graphql/pagination/connection.rb#266 def parent; end + + # @return [Boolean] + # + # source://graphql//lib/graphql/pagination/connection.rb#274 + def was_authorized_by_scope_items?; end end # source://graphql//lib/graphql/pagination/connection.rb#15 @@ -6201,7 +6256,7 @@ class GraphQL::Pagination::Connections::ImplementationMissingError < ::GraphQL:: # source://graphql//lib/graphql/pagination/mongoid_relation_connection.rb#6 class GraphQL::Pagination::MongoidRelationConnection < ::GraphQL::Pagination::RelationConnection - # source://graphql//lib/graphql/pagination/mongoid_relation_connection.rb#20 + # source://graphql//lib/graphql/pagination/mongoid_relation_connection.rb#19 def null_relation(relation); end # source://graphql//lib/graphql/pagination/mongoid_relation_connection.rb#15 @@ -6360,7 +6415,7 @@ end # A combination of query string and {Schema} instance which can be reduced to a {#result}. # -# source://graphql//lib/graphql/query/null_context.rb#3 +# source://graphql//lib/graphql/query/context/scoped_context.rb#3 class GraphQL::Query include ::GraphQL::Tracing::Traceable extend ::Forwardable @@ -6375,14 +6430,12 @@ class GraphQL::Query # @param root_value [Object] the object used to resolve fields on the root type # @param max_depth [Numeric] the maximum number of nested selections allowed for this query (falls back to schema-level value) # @param max_complexity [Numeric] the maximum field complexity for this query (falls back to schema-level value) - # @param except [<#call(schema_member, context)>] If provided, objects will be hidden from the schema when `.call(schema_member, context)` returns truthy - # @param only [<#call(schema_member, context)>] If provided, objects will be hidden from the schema when `.call(schema_member, context)` returns false # @return [Query] a new instance of Query # - # source://graphql//lib/graphql/query.rb#100 - def initialize(schema, query_string = T.unsafe(nil), query: T.unsafe(nil), document: T.unsafe(nil), context: T.unsafe(nil), variables: T.unsafe(nil), validate: T.unsafe(nil), static_validator: T.unsafe(nil), subscription_topic: T.unsafe(nil), operation_name: T.unsafe(nil), root_value: T.unsafe(nil), max_depth: T.unsafe(nil), max_complexity: T.unsafe(nil), except: T.unsafe(nil), only: T.unsafe(nil), warden: T.unsafe(nil)); end + # source://graphql//lib/graphql/query.rb#98 + def initialize(schema, query_string = T.unsafe(nil), query: T.unsafe(nil), document: T.unsafe(nil), context: T.unsafe(nil), variables: T.unsafe(nil), validate: T.unsafe(nil), static_validator: T.unsafe(nil), subscription_topic: T.unsafe(nil), operation_name: T.unsafe(nil), root_value: T.unsafe(nil), max_depth: T.unsafe(nil), max_complexity: T.unsafe(nil), warden: T.unsafe(nil)); end - # source://graphql//lib/graphql/query.rb#377 + # source://graphql//lib/graphql/query.rb#366 def after_lazy(value, &block); end # Returns the value of attribute analysis_errors. @@ -6397,7 +6450,7 @@ class GraphQL::Query # source://graphql//lib/graphql/query.rb#322 def analysis_errors=(_arg0); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def analyzers(*args, **_arg1, &block); end # source://graphql//lib/graphql/query.rb#275 @@ -6412,7 +6465,7 @@ class GraphQL::Query # source://graphql//lib/graphql/query.rb#271 def arguments_for(ast_node, definition, parent_object: T.unsafe(nil)); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def ast_analyzers(*args, **_arg1, &block); end # Returns the value of attribute context. @@ -6454,15 +6507,15 @@ class GraphQL::Query # source://graphql//lib/graphql/query.rb#216 def fragments; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def get_field(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def get_type(*args, **_arg1, &block); end # @api private # - # source://graphql//lib/graphql/query.rb#373 + # source://graphql//lib/graphql/query.rb#362 def handle_or_reraise(err); end # source://graphql//lib/graphql/query.rb#74 @@ -6473,6 +6526,11 @@ class GraphQL::Query # source://graphql//lib/graphql/query.rb#178 def interpreter?; end + # Returns the value of attribute logger. + # + # source://graphql//lib/graphql/query.rb#378 + def logger; end + # A lookahead for the root selections of this query # # @return [GraphQL::Execution::Lookahead] @@ -6480,17 +6538,12 @@ class GraphQL::Query # source://graphql//lib/graphql/query.rb#195 def lookahead; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def max_complexity(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def max_depth(*args, **_arg1, &block); end - # @return [void] - # - # source://graphql//lib/graphql/query.rb#358 - def merge_filters(only: T.unsafe(nil), except: T.unsafe(nil)); end - # Returns the value of attribute multiplex. # # source://graphql//lib/graphql/query.rb#182 @@ -6526,7 +6579,7 @@ class GraphQL::Query # source://graphql//lib/graphql/query.rb#220 def operations; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def possible_types(*args, **_arg1, &block); end # Returns the value of attribute provided_variables. @@ -6576,7 +6629,7 @@ class GraphQL::Query # source://graphql//lib/graphql/query.rb#204 def result_values=(result_hash); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def root_type_for_operation(*args, **_arg1, &block); end # The value for root types @@ -6631,7 +6684,7 @@ class GraphQL::Query # @return [Boolean] # - # source://graphql//lib/graphql/query.rb#368 + # source://graphql//lib/graphql/query.rb#357 def subscription?; end # @return [String, nil] the triggered event, if this query is a subscription update @@ -6664,7 +6717,10 @@ class GraphQL::Query # source://graphql//lib/graphql/query.rb#40 def validate=(new_validate); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 + def validate_timeout_remaining(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 def validation_errors(*args, **_arg1, &block); end # source://graphql//lib/graphql/query.rb#315 @@ -6690,23 +6746,23 @@ class GraphQL::Query private - # source://graphql//lib/graphql/query.rb#391 + # source://graphql//lib/graphql/query.rb#382 def find_operation(operations, operation_name); end - # source://graphql//lib/graphql/query.rb#401 + # source://graphql//lib/graphql/query.rb#392 def prepare_ast; end # Since the query string is processed at the last possible moment, # any internal values which depend on it should be accessed within this wrapper. # - # source://graphql//lib/graphql/query.rb#465 + # source://graphql//lib/graphql/query.rb#456 def with_prepared_ast; end end # Expose some query-specific info to field resolve functions. # It delegates `[]` to the hash that's passed to `GraphQL::Query#initialize`. # -# source://graphql//lib/graphql/query/context.rb#6 +# source://graphql//lib/graphql/query/context/scoped_context.rb#4 class GraphQL::Query::Context include ::GraphQL::Query::Context::SharedMethods extend ::Forwardable @@ -6717,169 +6773,200 @@ class GraphQL::Query::Context # @param values [Hash] A hash of arbitrary values which will be accessible at query-time # @return [Context] a new instance of Context # - # source://graphql//lib/graphql/query/context.rb#78 + # source://graphql//lib/graphql/query/context.rb#80 def initialize(query:, values:, object:, schema: T.unsafe(nil)); end # Lookup `key` from the hash passed to {Schema#execute} as `context:` # - # source://graphql//lib/graphql/query/context.rb#220 + # source://graphql//lib/graphql/query/context.rb#124 def [](key); end # Reassign `key` to the hash passed to {Schema#execute} as `context:` # - # source://graphql//lib/graphql/query/context.rb#209 + # source://graphql//lib/graphql/query/context.rb#113 def []=(key, value); end - # source://graphql//lib/graphql/query/context.rb#239 + # source://graphql//lib/graphql/query/context.rb#143 def current_path; end - # source://graphql//lib/graphql/query/context.rb#196 + # source://graphql//lib/graphql/query/context.rb#100 def dataloader; end - # source://graphql//lib/graphql/query/context.rb#253 + # source://graphql//lib/graphql/query/context.rb#157 def delete(key); end - # source://graphql//lib/graphql/query/context.rb#281 + # source://graphql//lib/graphql/query/context.rb#185 def dig(key, *other_keys); end # @return [Array] errors returned during execution # - # source://graphql//lib/graphql/query/context.rb#64 + # source://graphql//lib/graphql/query/context.rb#66 def errors; end - # source://graphql//lib/graphql/query/context.rb#263 + # source://graphql//lib/graphql/query/context.rb#167 def fetch(key, default = T.unsafe(nil)); end - # source://graphql//lib/graphql/query/context.rb#336 + # source://graphql//lib/graphql/query/context.rb#244 def inspect; end # @api private # - # source://graphql//lib/graphql/query/context.rb#201 + # source://graphql//lib/graphql/query/context.rb#105 def interpreter=(_arg0); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def interpreter?(*args, **_arg1, &block); end # @return [Boolean] # - # source://graphql//lib/graphql/query/context.rb#308 + # source://graphql//lib/graphql/query/context.rb#212 def key?(key); end + # source://graphql//lib/graphql/query/context.rb#240 + def logger; end + # Get an isolated hash for `ns`. Doesn't affect user-provided storage. # # @param ns [Object] a usage-specific namespace identifier # @return [Hash] namespaced storage # - # source://graphql//lib/graphql/query/context.rb#323 + # source://graphql//lib/graphql/query/context.rb#227 def namespace(ns); end # @return [Boolean] true if this namespace was accessed before # - # source://graphql//lib/graphql/query/context.rb#332 + # source://graphql//lib/graphql/query/context.rb#236 def namespace?(ns); end # @return [Array] The current position in the result # - # source://graphql//lib/graphql/query/context.rb#73 + # source://graphql//lib/graphql/query/context.rb#75 def path; end # @return [GraphQL::Query] The query whose context this is # - # source://graphql//lib/graphql/query/context.rb#67 + # source://graphql//lib/graphql/query/context.rb#69 def query; end # @return [Hash] A hash that will be added verbatim to the result hash, as `"extensions" => { ... }` # - # source://graphql//lib/graphql/query/context.rb#192 + # source://graphql//lib/graphql/query/context.rb#96 def response_extensions; end # @return [GraphQL::Schema] # - # source://graphql//lib/graphql/query/context.rb#70 + # source://graphql//lib/graphql/query/context.rb#72 def schema; end + # Use this when you need to do a scoped set _inside_ a lazy-loaded (or batch-loaded) + # block of code. + # + # @example using scoped context inside a promise + # scoped_ctx = context.scoped + # SomeBatchLoader.load(...).then do |thing| + # # use a scoped_ctx which was created _before_ dataloading: + # scoped_ctx.set!(:thing, thing) + # end + # @return [Context::Scoped] + # + # source://graphql//lib/graphql/query/context.rb#267 + def scoped; end + # @api private # - # source://graphql//lib/graphql/query/context.rb#207 + # source://graphql//lib/graphql/query/context.rb#111 def scoped_context; end - # source://graphql//lib/graphql/query/context.rb#340 + # source://graphql//lib/graphql/query/context.rb#248 def scoped_merge!(hash); end - # source://graphql//lib/graphql/query/context.rb#344 + # source://graphql//lib/graphql/query/context.rb#252 def scoped_set!(key, value); end - # source://graphql//lib/graphql/query/context.rb#298 + # source://graphql//lib/graphql/query/context.rb#202 def to_h; end - # source://graphql//lib/graphql/query/context.rb#298 + # source://graphql//lib/graphql/query/context.rb#202 def to_hash; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def trace(*args, **_arg1, &block); end # @api private # - # source://graphql//lib/graphql/query/context.rb#204 + # source://graphql//lib/graphql/query/context.rb#108 def value=(_arg0); end # @return [GraphQL::Schema::Warden] # - # source://graphql//lib/graphql/query/context.rb#313 + # source://graphql//lib/graphql/query/context.rb#217 def warden; end # @api private # - # source://graphql//lib/graphql/query/context.rb#318 + # source://graphql//lib/graphql/query/context.rb#222 def warden=(_arg0); end end -# source://graphql//lib/graphql/query/context.rb#38 +# source://graphql//lib/graphql/query/context.rb#40 class GraphQL::Query::Context::ExecutionErrors # @return [ExecutionErrors] a new instance of ExecutionErrors # - # source://graphql//lib/graphql/query/context.rb#39 + # source://graphql//lib/graphql/query/context.rb#41 def initialize(ctx); end - # source://graphql//lib/graphql/query/context.rb#43 + # source://graphql//lib/graphql/query/context.rb#45 def >>(err_or_msg); end - # source://graphql//lib/graphql/query/context.rb#43 + # source://graphql//lib/graphql/query/context.rb#45 def add(err_or_msg); end - # source://graphql//lib/graphql/query/context.rb#43 + # source://graphql//lib/graphql/query/context.rb#45 def push(err_or_msg); end end -# source://graphql//lib/graphql/query/context.rb#215 +# source://graphql//lib/graphql/query/context.rb#119 GraphQL::Query::Context::RUNTIME_METADATA_KEYS = T.let(T.unsafe(nil), Set) -# source://graphql//lib/graphql/query/context.rb#93 +# source://graphql//lib/graphql/query/context.rb#271 +class GraphQL::Query::Context::Scoped + # @return [Scoped] a new instance of Scoped + # + # source://graphql//lib/graphql/query/context.rb#272 + def initialize(scoped_context, path); end + + # source://graphql//lib/graphql/query/context.rb#277 + def merge!(hash); end + + # source://graphql//lib/graphql/query/context.rb#281 + def set!(key, value); end +end + +# source://graphql//lib/graphql/query/context/scoped_context.rb#5 class GraphQL::Query::Context::ScopedContext # @return [ScopedContext] a new instance of ScopedContext # - # source://graphql//lib/graphql/query/context.rb#97 + # source://graphql//lib/graphql/query/context/scoped_context.rb#6 def initialize(query_context); end - # source://graphql//lib/graphql/query/context.rb#137 + # source://graphql//lib/graphql/query/context/scoped_context.rb#46 def [](key); end - # source://graphql//lib/graphql/query/context.rb#146 + # source://graphql//lib/graphql/query/context/scoped_context.rb#55 def current_path; end - # source://graphql//lib/graphql/query/context.rb#150 + # source://graphql//lib/graphql/query/context/scoped_context.rb#59 def dig(key, *other_keys); end # @return [Boolean] # - # source://graphql//lib/graphql/query/context.rb#126 + # source://graphql//lib/graphql/query/context/scoped_context.rb#35 def key?(key); end - # source://graphql//lib/graphql/query/context.rb#115 - def merge!(hash); end + # source://graphql//lib/graphql/query/context/scoped_context.rb#24 + def merge!(hash, at: T.unsafe(nil)); end - # source://graphql//lib/graphql/query/context.rb#103 + # source://graphql//lib/graphql/query/context/scoped_context.rb#12 def merged_context; end private @@ -6887,44 +6974,38 @@ class GraphQL::Query::Context::ScopedContext # Start at the current location, # but look up the tree for previously-assigned scoped values # - # source://graphql//lib/graphql/query/context.rb#168 + # source://graphql//lib/graphql/query/context/scoped_context.rb#77 def each_present_path_ctx; end end -# source://graphql//lib/graphql/query/context.rb#95 -GraphQL::Query::Context::ScopedContext::NO_CONTEXT = T.let(T.unsafe(nil), Hash) - -# source://graphql//lib/graphql/query/context.rb#94 -GraphQL::Query::Context::ScopedContext::NO_PATH = T.let(T.unsafe(nil), Array) - -# source://graphql//lib/graphql/query/context.rb#7 +# source://graphql//lib/graphql/query/context.rb#9 module GraphQL::Query::Context::SharedMethods # Add error at query-level. # # @param error [GraphQL::ExecutionError] an execution error # @return [void] # - # source://graphql//lib/graphql/query/context.rb#17 + # source://graphql//lib/graphql/query/context.rb#19 def add_error(error); end # @example Print the GraphQL backtrace during field resolution # puts ctx.backtrace # @return [GraphQL::Backtrace] The backtrace for this point in query execution # - # source://graphql//lib/graphql/query/context.rb#29 + # source://graphql//lib/graphql/query/context.rb#31 def backtrace; end - # source://graphql//lib/graphql/query/context.rb#33 + # source://graphql//lib/graphql/query/context.rb#35 def execution_errors; end # Return this value to tell the runtime # to exclude this field from the response altogether # - # source://graphql//lib/graphql/query/context.rb#10 + # source://graphql//lib/graphql/query/context.rb#12 def skip; end end -# source://graphql//lib/graphql/query/context.rb#261 +# source://graphql//lib/graphql/query/context.rb#165 GraphQL::Query::Context::UNSPECIFIED_FETCH_DEFAULT = T.let(T.unsafe(nil), Object) # @api private @@ -6987,94 +7068,70 @@ GraphQL::Query::InputValidationResult::VALID = T.let(T.unsafe(nil), GraphQL::Que # This object can be `ctx` in places where there is no query # -# source://graphql//lib/graphql/query/null_context.rb#5 -class GraphQL::Query::NullContext - extend ::Forwardable +# source://graphql//lib/graphql/query/null_context.rb#6 +class GraphQL::Query::NullContext < ::GraphQL::Query::Context + include ::Singleton + extend ::Singleton::SingletonClassMethods # @return [NullContext] a new instance of NullContext # - # source://graphql//lib/graphql/query/null_context.rb#20 + # source://graphql//lib/graphql/query/null_context.rb#23 def initialize; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def [](*args, **_arg1, &block); end # Returns the value of attribute dataloader. # - # source://graphql//lib/graphql/query/null_context.rb#17 + # source://graphql//lib/graphql/query/null_context.rb#20 def dataloader; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def dig(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def fetch(*args, **_arg1, &block); end # @return [Boolean] # - # source://graphql//lib/graphql/query/null_context.rb#27 + # source://graphql//lib/graphql/query/null_context.rb#30 def interpreter?; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def key?(*args, **_arg1, &block); end # Returns the value of attribute query. # - # source://graphql//lib/graphql/query/null_context.rb#17 + # source://graphql//lib/graphql/query/null_context.rb#20 def query; end # Returns the value of attribute schema. # - # source://graphql//lib/graphql/query/null_context.rb#17 + # source://graphql//lib/graphql/query/null_context.rb#20 def schema; end # Returns the value of attribute warden. # - # source://graphql//lib/graphql/query/null_context.rb#17 + # source://graphql//lib/graphql/query/null_context.rb#20 def warden; end class << self - # source://forwardable/1.3.2/forwardable.rb#229 - def [](*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def dataloader(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def dig(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def fetch(*args, **_arg1, &block); end - - # source://graphql//lib/graphql/query/null_context.rb#34 - def instance; end - - # source://forwardable/1.3.2/forwardable.rb#229 - def interpreter?(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def key?(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def query(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def schema(*args, **_arg1, &block); end + private - # source://forwardable/1.3.2/forwardable.rb#229 - def warden(*args, **_arg1, &block); end + def allocate; end + def new(*_arg0); end end end -# source://graphql//lib/graphql/query/null_context.rb#6 +# source://graphql//lib/graphql/query/null_context.rb#9 class GraphQL::Query::NullContext::NullQuery # @yield [value] # - # source://graphql//lib/graphql/query/null_context.rb#7 + # source://graphql//lib/graphql/query/null_context.rb#10 def after_lazy(value); end end -# source://graphql//lib/graphql/query/null_context.rb#12 +# source://graphql//lib/graphql/query/null_context.rb#15 class GraphQL::Query::NullContext::NullSchema < ::GraphQL::Schema; end # source://graphql//lib/graphql/query.rb#17 @@ -7110,19 +7167,19 @@ class GraphQL::Query::Result # source://graphql//lib/graphql/query/result.rb#51 def ==(other); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def [](*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def as_json(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def context(*args, **_arg1, &block); end # source://graphql//lib/graphql/query/result.rb#39 def inspect; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def keys(*args, **_arg1, &block); end # Delegate any hash-like method to the underlying hash. @@ -7130,7 +7187,7 @@ class GraphQL::Query::Result # source://graphql//lib/graphql/query/result.rb#27 def method_missing(method_name, *args, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def mutation?(*args, **_arg1, &block); end # @return [GraphQL::Query] The query that was executed @@ -7138,10 +7195,10 @@ class GraphQL::Query::Result # source://graphql//lib/graphql/query/result.rb#17 def query; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def query?(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def subscription?(*args, **_arg1, &block); end # @return [Hash] The resulting hash of "data" and/or "errors" @@ -7149,10 +7206,10 @@ class GraphQL::Query::Result # source://graphql//lib/graphql/query/result.rb#20 def to_h; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def to_json(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def values(*args, **_arg1, &block); end private @@ -7211,6 +7268,11 @@ class GraphQL::Query::ValidationPipeline # source://graphql//lib/graphql/query/validation_pipeline.rb#32 def valid?; end + # @api private + # + # source://graphql//lib/graphql/query/validation_pipeline.rb#17 + def validate_timeout_remaining; end + # @api private # @return [Array] Static validation errors for the query string # @@ -7287,7 +7349,7 @@ class GraphQL::Query::Variables # source://graphql//lib/graphql/query/variables.rb#13 def initialize(ctx, ast_variables, provided_variables); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def [](*args, **_arg1, &block); end # Returns the value of attribute context. @@ -7300,16 +7362,16 @@ class GraphQL::Query::Variables # source://graphql//lib/graphql/query/variables.rb#9 def errors; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def fetch(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def key?(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def length(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def to_h(*args, **_arg1, &block); end private @@ -7321,7 +7383,7 @@ class GraphQL::Query::Variables def deep_stringify(val); end end -# source://graphql//lib/graphql/railtie.rb#3 +# source://graphql//lib/graphql/railtie.rb#4 class GraphQL::Railtie < ::Rails::Railtie; end # source://graphql//lib/graphql/relay/range_add.rb#3 @@ -7407,10 +7469,6 @@ class GraphQL::RuntimeTypeError < ::GraphQL::Error; end # Schemas can restrict large incoming queries with `max_depth` and `max_complexity` configurations. # (These configurations can be overridden by specific calls to {Schema#execute}) # -# Schemas can specify how queries should be executed against them. -# `query_execution_strategy`, `mutation_execution_strategy` and `subscription_execution_strategy` -# each apply to corresponding root types. -# # @example defining a schema # class MySchema < GraphQL::Schema # query QueryType @@ -7427,7 +7485,7 @@ class GraphQL::Schema class << self # @api private # - # source://graphql//lib/graphql/schema.rb#1149 + # source://graphql//lib/graphql/schema.rb#1308 def add_subscription_extension_if_necessary; end # Return a lazy if any of `maybe_lazies` are lazy, @@ -7436,7 +7494,7 @@ class GraphQL::Schema # @api private # @param maybe_lazies [Array] # - # source://graphql//lib/graphql/schema.rb#1208 + # source://graphql//lib/graphql/schema.rb#1367 def after_any_lazies(maybe_lazies); end # Call the given block at the right time, either: @@ -7445,17 +7503,17 @@ class GraphQL::Schema # # @api private # - # source://graphql//lib/graphql/schema.rb#1168 + # source://graphql//lib/graphql/schema.rb#1327 def after_lazy(value, &block); end - # source://graphql//lib/graphql/schema.rb#694 + # source://graphql//lib/graphql/schema.rb#753 def analysis_engine; end # Sets the attribute analysis_engine # # @param value the value to set the attribute analysis_engine to. # - # source://graphql//lib/graphql/schema.rb#692 + # source://graphql//lib/graphql/schema.rb#751 def analysis_engine=(_arg0); end # Return the Hash response of {Introspection::INTROSPECTION_QUERY}. @@ -7470,65 +7528,73 @@ class GraphQL::Schema # @param include_is_one_of [Boolean] If true, `isOneOf: true|false` will be included with input objects # @return [Hash] GraphQL result # - # source://graphql//lib/graphql/schema.rb#225 - def as_json(only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil), include_deprecated_args: T.unsafe(nil), include_schema_description: T.unsafe(nil), include_is_repeatable: T.unsafe(nil), include_specified_by_url: T.unsafe(nil), include_is_one_of: T.unsafe(nil)); end + # source://graphql//lib/graphql/schema.rb#276 + def as_json(context: T.unsafe(nil), include_deprecated_args: T.unsafe(nil), include_schema_description: T.unsafe(nil), include_is_repeatable: T.unsafe(nil), include_specified_by_url: T.unsafe(nil), include_is_one_of: T.unsafe(nil)); end + + # source://graphql//lib/graphql/schema.rb#212 + def build_trace_mode(mode); end # @return [GraphQL::Pagination::Connections] if installed # - # source://graphql//lib/graphql/schema.rb#367 + # source://graphql//lib/graphql/schema.rb#407 def connections; end # @api private # - # source://graphql//lib/graphql/schema.rb#364 + # source://graphql//lib/graphql/schema.rb#404 def connections=(_arg0); end - # source://graphql//lib/graphql/schema.rb#798 + # source://graphql//lib/graphql/schema.rb#916 def context_class(new_context_class = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#592 + # source://graphql//lib/graphql/schema.rb#791 + def count_introspection_fields; end + + # source://graphql//lib/graphql/schema.rb#631 def cursor_encoder(new_encoder = T.unsafe(nil)); end # @api private # @see GraphQL::Dataloader # - # source://graphql//lib/graphql/schema.rb#509 + # source://graphql//lib/graphql/schema.rb#549 def dataloader_class; end # Sets the attribute dataloader_class # # @param value the value to set the attribute dataloader_class to. # - # source://graphql//lib/graphql/schema.rb#513 + # source://graphql//lib/graphql/schema.rb#553 def dataloader_class=(_arg0); end - # source://graphql//lib/graphql/schema.rb#790 + # source://graphql//lib/graphql/schema.rb#888 def default_analysis_engine; end - # source://graphql//lib/graphql/schema.rb#991 + # source://graphql//lib/graphql/schema.rb#1122 def default_directives; end - # source://graphql//lib/graphql/schema.rb#782 + # source://graphql//lib/graphql/schema.rb#880 def default_execution_strategy; end - # source://graphql//lib/graphql/schema.rb#271 - def default_filter; end - - # source://graphql//lib/graphql/schema.rb#275 - def default_mask(new_mask = T.unsafe(nil)); end + # source://graphql//lib/graphql/schema.rb#896 + def default_logger(new_default_logger = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#599 + # source://graphql//lib/graphql/schema.rb#638 def default_max_page_size(new_default_max_page_size = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#607 + # source://graphql//lib/graphql/schema.rb#646 def default_page_size(new_default_page_size = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#134 + # @param new_mode [Symbol] If configured, this will be used when `context: { trace_mode: ... }` isn't set. + # + # source://graphql//lib/graphql/schema.rb#147 + def default_trace_mode(new_mode = T.unsafe(nil)); end + + # source://graphql//lib/graphql/schema.rb#133 def deprecated_graphql_definition; end # @return [String, nil] # - # source://graphql//lib/graphql/schema.rb#253 + # source://graphql//lib/graphql/schema.rb#302 def description(new_description = T.unsafe(nil)); end # Attach a single directive to this schema @@ -7536,51 +7602,51 @@ class GraphQL::Schema # @param new_directive [Class] # @return void # - # source://graphql//lib/graphql/schema.rb#987 + # source://graphql//lib/graphql/schema.rb#1118 def directive(new_directive); end # Add several directives at once # # @param new_directives [Class] # - # source://graphql//lib/graphql/schema.rb#976 + # source://graphql//lib/graphql/schema.rb#1102 def directives(*new_directives); end - # source://graphql//lib/graphql/schema.rb#730 + # source://graphql//lib/graphql/schema.rb#799 def disable_introspection_entry_points; end # @return [Boolean] # - # source://graphql//lib/graphql/schema.rb#748 + # source://graphql//lib/graphql/schema.rb#817 def disable_introspection_entry_points?; end - # source://graphql//lib/graphql/schema.rb#736 + # source://graphql//lib/graphql/schema.rb#805 def disable_schema_introspection_entry_point; end # @return [Boolean] # - # source://graphql//lib/graphql/schema.rb#756 + # source://graphql//lib/graphql/schema.rb#825 def disable_schema_introspection_entry_point?; end - # source://graphql//lib/graphql/schema.rb#742 + # source://graphql//lib/graphql/schema.rb#811 def disable_type_introspection_entry_point; end # @return [Boolean] # - # source://graphql//lib/graphql/schema.rb#764 + # source://graphql//lib/graphql/schema.rb#833 def disable_type_introspection_entry_point?; end - # source://graphql//lib/graphql/schema.rb#708 + # source://graphql//lib/graphql/schema.rb#767 def error_bubbling(new_error_bubbling = T.unsafe(nil)); end # Sets the attribute error_bubbling # # @param value the value to set the attribute error_bubbling to. # - # source://graphql//lib/graphql/schema.rb#716 + # source://graphql//lib/graphql/schema.rb#776 def error_bubbling=(_arg0); end - # source://graphql//lib/graphql/schema.rb#820 + # source://graphql//lib/graphql/schema.rb#938 def error_handlers; end # Execute a query on itself. @@ -7588,10 +7654,16 @@ class GraphQL::Schema # @return [Hash] query result, ready to be serialized as JSON # @see {Query#initialize} for arguments. # - # source://graphql//lib/graphql/schema.rb#1097 + # source://graphql//lib/graphql/schema.rb#1256 def execute(query_str = T.unsafe(nil), **kwargs); end - # source://graphql//lib/graphql/schema.rb#263 + # @param new_extra_types [Module] Type definitions to include in printing and introspection, even though they aren't referenced in the schema + # @return [Array] Type definitions added to this schema + # + # source://graphql//lib/graphql/schema.rb#843 + def extra_types(*new_extra_types); end + + # source://graphql//lib/graphql/schema.rb#312 def find(path); end # Create schema from an IDL schema or file containing an IDL definition. @@ -7602,7 +7674,7 @@ class GraphQL::Schema # @param using [Hash] Plugins to attach to the created schema with `use(key, value)` # @return [Class] the schema described by `document` # - # source://graphql//lib/graphql/schema.rb#113 + # source://graphql//lib/graphql/schema.rb#112 def from_definition(definition_or_path, default_resolve: T.unsafe(nil), parser: T.unsafe(nil), using: T.unsafe(nil)); end # Create schema with the result of an introspection query. @@ -7610,89 +7682,94 @@ class GraphQL::Schema # @param introspection_result [Hash] A response from {GraphQL::Introspection::INTROSPECTION_QUERY} # @return [Class] the schema described by `input` # - # source://graphql//lib/graphql/schema.rb#103 + # source://graphql//lib/graphql/schema.rb#102 def from_introspection(introspection_result); end - # source://graphql//lib/graphql/schema.rb#547 + # source://graphql//lib/graphql/schema.rb#586 def get_field(type_or_name, field_name, context = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#570 + # source://graphql//lib/graphql/schema.rb#609 def get_fields(type, context = T.unsafe(nil)); end # @param type_name [String] # @return [Module, nil] A type, or nil if there's no type called `type_name` # - # source://graphql//lib/graphql/schema.rb#332 + # source://graphql//lib/graphql/schema.rb#367 def get_type(type_name, context = T.unsafe(nil)); end # @api private # - # source://graphql//lib/graphql/schema.rb#829 + # source://graphql//lib/graphql/schema.rb#947 def handle_or_reraise(context, err); end + # @return [Boolean] Does this schema have _any_ definition for a type named `type_name`, regardless of visibility? + # + # source://graphql//lib/graphql/schema.rb#399 + def has_defined_type?(type_name); end + # @raise [GraphQL::RequiredImplementationMissingError] # - # source://graphql//lib/graphql/schema.rb#893 + # source://graphql//lib/graphql/schema.rb#1013 def id_from_object(object, type, ctx); end - # source://graphql//lib/graphql/schema.rb#881 + # source://graphql//lib/graphql/schema.rb#995 def inherited(child_class); end - # source://graphql//lib/graphql/schema.rb#970 + # source://graphql//lib/graphql/schema.rb#1090 def instrument(instrument_step, instrumenter, options = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#1141 + # source://graphql//lib/graphql/schema.rb#1300 def instrumenters; end # Sets the attribute interpreter # # @param value the value to set the attribute interpreter to. # - # source://graphql//lib/graphql/schema.rb#706 + # source://graphql//lib/graphql/schema.rb#765 def interpreter=(_arg0); end # @return [Boolean] # - # source://graphql//lib/graphql/schema.rb#702 + # source://graphql//lib/graphql/schema.rb#761 def interpreter?; end - # source://graphql//lib/graphql/schema.rb#574 + # source://graphql//lib/graphql/schema.rb#613 def introspection(new_introspection_namespace = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#584 + # source://graphql//lib/graphql/schema.rb#623 def introspection_system; end # @return [Boolean] True if this object should be lazily resolved # - # source://graphql//lib/graphql/schema.rb#1200 + # source://graphql//lib/graphql/schema.rb#1359 def lazy?(obj); end # @return [Symbol, nil] The method name to lazily resolve `obj`, or nil if `obj`'s class wasn't registered with {#lazy_resolve}. # - # source://graphql//lib/graphql/schema.rb#1195 + # source://graphql//lib/graphql/schema.rb#1354 def lazy_method_name(obj); end - # source://graphql//lib/graphql/schema.rb#966 + # source://graphql//lib/graphql/schema.rb#1086 def lazy_resolve(lazy_class, value_method); end - # source://graphql//lib/graphql/schema.rb#682 + # source://graphql//lib/graphql/schema.rb#741 def max_complexity(max_complexity = T.unsafe(nil)); end # Sets the attribute max_complexity # # @param value the value to set the attribute max_complexity to. # - # source://graphql//lib/graphql/schema.rb#680 + # source://graphql//lib/graphql/schema.rb#739 def max_complexity=(_arg0); end - # source://graphql//lib/graphql/schema.rb#720 - def max_depth(new_max_depth = T.unsafe(nil)); end + # source://graphql//lib/graphql/schema.rb#780 + def max_depth(new_max_depth = T.unsafe(nil), count_introspection_fields: T.unsafe(nil)); end # Sets the attribute max_depth # # @param value the value to set the attribute max_depth to. # - # source://graphql//lib/graphql/schema.rb#718 + # source://graphql//lib/graphql/schema.rb#778 def max_depth=(_arg0); end # Execute several queries on itself, concurrently. @@ -7714,44 +7791,49 @@ class GraphQL::Schema # @see {Query#initialize} for query keyword arguments # @see {Execution::Multiplex#run_all} for multiplex keyword arguments # - # source://graphql//lib/graphql/schema.rb#1137 + # source://graphql//lib/graphql/schema.rb#1296 def multiplex(queries, **kwargs); end - # source://graphql//lib/graphql/schema.rb#1078 + # source://graphql//lib/graphql/schema.rb#1237 def multiplex_analyzer(new_analyzer); end - # source://graphql//lib/graphql/schema.rb#1082 + # source://graphql//lib/graphql/schema.rb#1241 def multiplex_analyzers; end - # source://graphql//lib/graphql/schema.rb#400 + # source://graphql//lib/graphql/schema.rb#440 def mutation(new_mutation_object = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#623 - def mutation_execution_strategy(new_mutation_execution_strategy = T.unsafe(nil)); end + # source://graphql//lib/graphql/schema.rb#666 + def mutation_execution_strategy(new_mutation_execution_strategy = T.unsafe(nil), deprecation_warning: T.unsafe(nil)); end # @return [Boolean] # - # source://graphql//lib/graphql/schema.rb#382 + # source://graphql//lib/graphql/schema.rb#422 def new_connections?; end # Create a trace instance which will include the trace modules specified for the optional mode. # + # If no `mode:` is given, then {default_trace_mode} will be used. + # # @param mode [Symbol] Trace modules for this trade mode will be included # @param options [Hash] Keywords that will be passed to the tracing class during `#initialize` # @return [Tracing::Trace] # - # source://graphql//lib/graphql/schema.rb#1052 + # source://graphql//lib/graphql/schema.rb#1204 def new_trace(mode: T.unsafe(nil), **options); end # @raise [GraphQL::RequiredImplementationMissingError] # - # source://graphql//lib/graphql/schema.rb#889 + # source://graphql//lib/graphql/schema.rb#1009 def object_from_id(node_id, ctx); end - # source://graphql//lib/graphql/schema.rb#772 + # source://graphql//lib/graphql/schema.rb#861 def orphan_types(*new_orphan_types); end - # source://graphql//lib/graphql/schema.rb#194 + # source://graphql//lib/graphql/schema.rb#203 + def own_trace_modes; end + + # source://graphql//lib/graphql/schema.rb#245 def own_trace_modules; end # A function to call when {#execute} receives an invalid query string @@ -7762,76 +7844,81 @@ class GraphQL::Schema # @param ctx [GraphQL::Query::Context] The context for the query where the error occurred # @return void # - # source://graphql//lib/graphql/schema.rb#962 + # source://graphql//lib/graphql/schema.rb#1082 def parse_error(parse_err, ctx); end - # source://graphql//lib/graphql/schema.rb#298 + # source://graphql//lib/graphql/schema.rb#333 def plugins; end # @param type [Module] The type definition whose possible types you want to see # @return [Hash] All possible types, if no `type` is given. # @return [Array] Possible types for `type`, if it's given. # - # source://graphql//lib/graphql/schema.rb#463 + # source://graphql//lib/graphql/schema.rb#503 def possible_types(type = T.unsafe(nil), context = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#386 + # source://graphql//lib/graphql/schema.rb#426 def query(new_query_object = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#1070 + # source://graphql//lib/graphql/schema.rb#1229 def query_analyzer(new_analyzer); end - # source://graphql//lib/graphql/schema.rb#1074 + # source://graphql//lib/graphql/schema.rb#1233 def query_analyzers; end - # source://graphql//lib/graphql/schema.rb#615 - def query_execution_strategy(new_query_execution_strategy = T.unsafe(nil)); end + # source://graphql//lib/graphql/schema.rb#719 + def query_class(new_query_class = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#1160 + # source://graphql//lib/graphql/schema.rb#654 + def query_execution_strategy(new_query_execution_strategy = T.unsafe(nil), deprecation_warning: T.unsafe(nil)); end + + # source://graphql//lib/graphql/schema.rb#1319 def query_stack_error(query, err); end - # source://graphql//lib/graphql/schema.rb#515 + # source://graphql//lib/graphql/schema.rb#555 def references_to(to_type = T.unsafe(nil), from: T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#806 + # source://graphql//lib/graphql/schema.rb#924 def rescue_from(*err_classes, &handler_block); end - # source://graphql//lib/graphql/schema.rb#872 + # @raise [GraphQL::RequiredImplementationMissingError] + # + # source://graphql//lib/graphql/schema.rb#990 def resolve_type(type, obj, ctx); end # @return [GraphQL::ObjectType, nil] # @see [GraphQL::Schema::Warden] Restricted access to root types # - # source://graphql//lib/graphql/schema.rb#431 + # source://graphql//lib/graphql/schema.rb#471 def root_type_for_operation(operation); end - # source://graphql//lib/graphql/schema.rb#444 + # source://graphql//lib/graphql/schema.rb#484 def root_types; end - # source://graphql//lib/graphql/schema.rb#1086 + # source://graphql//lib/graphql/schema.rb#1245 def sanitized_printer(new_sanitized_printer = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#901 + # source://graphql//lib/graphql/schema.rb#1021 def schema_directive(dir_class, **options); end - # source://graphql//lib/graphql/schema.rb#906 + # source://graphql//lib/graphql/schema.rb#1026 def schema_directives; end - # source://graphql//lib/graphql/schema.rb#285 + # source://graphql//lib/graphql/schema.rb#320 def static_validator; end - # source://graphql//lib/graphql/schema.rb#414 + # source://graphql//lib/graphql/schema.rb#454 def subscription(new_subscription_object = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#631 - def subscription_execution_strategy(new_subscription_execution_strategy = T.unsafe(nil)); end + # source://graphql//lib/graphql/schema.rb#678 + def subscription_execution_strategy(new_subscription_execution_strategy = T.unsafe(nil), deprecation_warning: T.unsafe(nil)); end # @return [GraphQL::Subscriptions] # - # source://graphql//lib/graphql/schema.rb#139 + # source://graphql//lib/graphql/schema.rb#138 def subscriptions(inherited: T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#143 + # source://graphql//lib/graphql/schema.rb#142 def subscriptions=(new_implementation); end # Override this method to handle lazy objects in a custom way. @@ -7840,24 +7927,22 @@ class GraphQL::Schema # @param value [Object] an instance of a class registered with {.lazy_resolve} # @return [Object] A GraphQL-ready (non-lazy) object # - # source://graphql//lib/graphql/schema.rb#1184 + # source://graphql//lib/graphql/schema.rb#1343 def sync_lazy(value); end # Return the GraphQL IDL for the schema # # @param context [Hash] - # @param only [<#call(member, ctx)>] - # @param except [<#call(member, ctx)>] # @return [String] # - # source://graphql//lib/graphql/schema.rb#242 - def to_definition(only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + # source://graphql//lib/graphql/schema.rb#291 + def to_definition(context: T.unsafe(nil)); end # Return the GraphQL::Language::Document IDL AST for the schema # # @return [GraphQL::Language::Document] # - # source://graphql//lib/graphql/schema.rb#248 + # source://graphql//lib/graphql/schema.rb#297 def to_document; end # Returns the JSON response of {Introspection::INTROSPECTION_QUERY}. @@ -7865,37 +7950,43 @@ class GraphQL::Schema # @return [String] # @see {#as_json} # - # source://graphql//lib/graphql/schema.rb#211 + # source://graphql//lib/graphql/schema.rb#262 def to_json(**args); end - # source://graphql//lib/graphql/schema.rb#147 + # source://graphql//lib/graphql/schema.rb#159 def trace_class(new_class = T.unsafe(nil)); end # @return [Class] Return the trace class to use for this mode, looking one up on the superclass if this Schema doesn't have one defined. # - # source://graphql//lib/graphql/schema.rb#158 - def trace_class_for(mode); end + # source://graphql//lib/graphql/schema.rb#174 + def trace_class_for(mode, build: T.unsafe(nil)); end # Configure `trace_class` to be used whenever `context: { trace_mode: mode_name }` is requested. - # `:default` is used when no `trace_mode: ...` is requested. + # {default_trace_mode} is used when no `trace_mode: ...` is requested. + # + # When a `trace_class` is added this way, it will _not_ receive other modules added with `trace_with(...)` + # unless `trace_mode` is explicitly given. (This class will not recieve any default trace modules.) + # + # Subclasses of the schema will use `trace_class` as a base class for this mode and those + # subclass also will _not_ receive default tracing modules. # # @param mode_name [Symbol] # @param trace_class [Class] subclass of GraphQL::Tracing::Trace # @return void # - # source://graphql//lib/graphql/schema.rb#188 + # source://graphql//lib/graphql/schema.rb#198 def trace_mode(mode_name, trace_class); end # @return [Array] Modules added for tracing in `trace_mode`, including inherited ones # - # source://graphql//lib/graphql/schema.rb#199 + # source://graphql//lib/graphql/schema.rb#250 def trace_modules_for(trace_mode); end # The options hash for this trace mode # # @return [Hash] # - # source://graphql//lib/graphql/schema.rb#1036 + # source://graphql//lib/graphql/schema.rb#1182 def trace_options_for(mode); end # Mix `trace_mod` into this schema's `Trace` class so that its methods @@ -7906,19 +7997,19 @@ class GraphQL::Schema # @param options [Hash] Keywords that will be passed to the tracing class during `#initialize` # @return [void] # - # source://graphql//lib/graphql/schema.rb#1019 + # source://graphql//lib/graphql/schema.rb#1152 def trace_with(trace_mod, mode: T.unsafe(nil), **options); end - # source://graphql//lib/graphql/schema.rb#1000 + # source://graphql//lib/graphql/schema.rb#1132 def tracer(new_tracer); end - # source://graphql//lib/graphql/schema.rb#1008 + # source://graphql//lib/graphql/schema.rb#1141 def tracers; end - # source://graphql//lib/graphql/schema.rb#945 + # source://graphql//lib/graphql/schema.rb#1065 def type_error(type_error, ctx); end - # source://graphql//lib/graphql/schema.rb#542 + # source://graphql//lib/graphql/schema.rb#581 def type_from_ast(ast_node, context: T.unsafe(nil)); end # Build a map of `{ name => type }` and return it @@ -7926,7 +8017,7 @@ class GraphQL::Schema # @return [Hash Class>] A dictionary of type classes by their GraphQL name # @see get_type Which is more efficient for finding _one type_ by name, because it doesn't merge hashes. # - # source://graphql//lib/graphql/schema.rb#305 + # source://graphql//lib/graphql/schema.rb#340 def types(context = T.unsafe(nil)); end # This hook is called when a field fails an `authorized?` check. @@ -7942,7 +8033,7 @@ class GraphQL::Schema # @param unauthorized_error [GraphQL::UnauthorizedFieldError] # @return [Field] The returned field will be put in the GraphQL response # - # source://graphql//lib/graphql/schema.rb#941 + # source://graphql//lib/graphql/schema.rb#1061 def unauthorized_field(unauthorized_error); end # This hook is called when an object fails an `authorized?` check. @@ -7961,18 +8052,18 @@ class GraphQL::Schema # @param unauthorized_error [GraphQL::UnauthorizedError] # @return [Object] The returned object will be put in the GraphQL response # - # source://graphql//lib/graphql/schema.rb#925 + # source://graphql//lib/graphql/schema.rb#1045 def unauthorized_object(unauthorized_error); end - # source://graphql//lib/graphql/schema.rb#492 + # source://graphql//lib/graphql/schema.rb#532 def union_memberships(type = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#289 + # source://graphql//lib/graphql/schema.rb#324 def use(plugin, **kwargs); end # @return [Boolean] # - # source://graphql//lib/graphql/schema.rb#698 + # source://graphql//lib/graphql/schema.rb#757 def using_ast_analysis?; end # Validate a query string according to this schema. @@ -7980,86 +8071,94 @@ class GraphQL::Schema # @param string_or_document [String, GraphQL::Language::Nodes::Document] # @return [Array] # - # source://graphql//lib/graphql/schema.rb#654 + # source://graphql//lib/graphql/schema.rb#705 def validate(string_or_document, rules: T.unsafe(nil), context: T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#670 + # source://graphql//lib/graphql/schema.rb#729 def validate_max_errors(new_validate_max_errors = T.unsafe(nil)); end # Sets the attribute validate_max_errors # # @param value the value to set the attribute validate_max_errors to. # - # source://graphql//lib/graphql/schema.rb#668 + # source://graphql//lib/graphql/schema.rb#727 def validate_max_errors=(_arg0); end - # source://graphql//lib/graphql/schema.rb#641 + # source://graphql//lib/graphql/schema.rb#692 def validate_timeout(new_validate_timeout = T.unsafe(nil)); end # Sets the attribute validate_timeout # # @param value the value to set the attribute validate_timeout to. # - # source://graphql//lib/graphql/schema.rb#639 + # source://graphql//lib/graphql/schema.rb#690 def validate_timeout=(_arg0); end # @return [Boolean] # - # source://graphql//lib/graphql/schema.rb#897 + # source://graphql//lib/graphql/schema.rb#1017 def visible?(member, ctx); end - # source://graphql//lib/graphql/schema.rb#448 + # source://graphql//lib/graphql/schema.rb#488 def warden_class; end # Sets the attribute warden_class # # @param value the value to set the attribute warden_class to. # - # source://graphql//lib/graphql/schema.rb#458 + # source://graphql//lib/graphql/schema.rb#498 def warden_class=(_arg0); end private + # source://graphql//lib/graphql/schema.rb#1379 + def add_trace_options_for(mode, new_options); end + # @param t [Module, Array] # @return [void] # - # source://graphql//lib/graphql/schema.rb#1222 + # source://graphql//lib/graphql/schema.rb#1387 def add_type_and_traverse(t, root:); end - # source://graphql//lib/graphql/schema.rb#1273 + # This is overridden in subclasses to check the inheritance chain + # + # source://graphql//lib/graphql/schema.rb#1497 + def get_references_to(type_name); end + + # source://graphql//lib/graphql/schema.rb#1438 def lazy_methods; end - # source://graphql//lib/graphql/schema.rb#1291 + # source://graphql//lib/graphql/schema.rb#1456 def non_introspection_types; end - # source://graphql//lib/graphql/schema.rb#1311 + # source://graphql//lib/graphql/schema.rb#1476 def own_directives; end - # source://graphql//lib/graphql/schema.rb#1315 + # source://graphql//lib/graphql/schema.rb#1480 def own_instrumenters; end - # source://graphql//lib/graphql/schema.rb#1327 + # source://graphql//lib/graphql/schema.rb#1492 def own_multiplex_analyzers; end - # source://graphql//lib/graphql/schema.rb#1299 + # source://graphql//lib/graphql/schema.rb#1464 def own_orphan_types; end - # source://graphql//lib/graphql/schema.rb#1295 + # source://graphql//lib/graphql/schema.rb#1460 def own_plugins; end - # source://graphql//lib/graphql/schema.rb#1303 + # source://graphql//lib/graphql/schema.rb#1468 def own_possible_types; end - # source://graphql//lib/graphql/schema.rb#1323 + # source://graphql//lib/graphql/schema.rb#1488 def own_query_analyzers; end - # source://graphql//lib/graphql/schema.rb#1319 + # source://graphql//lib/graphql/schema.rb#1484 def own_tracers; end - # source://graphql//lib/graphql/schema.rb#1287 + # source://graphql//lib/graphql/schema.rb#1452 def own_types; end - # source://graphql//lib/graphql/schema.rb#1307 + # source://graphql//lib/graphql/schema.rb#1472 def own_union_memberships; end end end @@ -8176,7 +8275,7 @@ class GraphQL::Schema::Argument # @api private # - # source://graphql//lib/graphql/schema/argument.rb#235 + # source://graphql//lib/graphql/schema/argument.rb#240 def coerce_into_values(parent_object, values, context, argument_values); end # @param default_value [Object] The value to use when the client doesn't provide one @@ -8228,7 +8327,7 @@ class GraphQL::Schema::Argument # source://graphql//lib/graphql/schema/argument.rb#29 def keyword; end - # source://graphql//lib/graphql/schema/argument.rb#295 + # source://graphql//lib/graphql/schema/argument.rb#300 def load_and_authorize_value(load_method_owner, coerced_value, context); end # @return [Class, Module, nil] If this argument should load an application object, this is the type of object to load @@ -8278,7 +8377,7 @@ class GraphQL::Schema::Argument # @api private # - # source://graphql//lib/graphql/schema/argument.rb#334 + # source://graphql//lib/graphql/schema/argument.rb#339 def validate_default_value; end # @return [Boolean] @@ -8288,18 +8387,18 @@ class GraphQL::Schema::Argument private - # source://graphql//lib/graphql/schema/argument.rb#382 + # source://graphql//lib/graphql/schema/argument.rb#387 def validate_deprecated_or_optional(null:, deprecation_reason:); end - # source://graphql//lib/graphql/schema/argument.rb#370 + # source://graphql//lib/graphql/schema/argument.rb#375 def validate_input_type(input_type); end end -# source://graphql//lib/graphql/schema/argument.rb#361 +# source://graphql//lib/graphql/schema/argument.rb#366 class GraphQL::Schema::Argument::InvalidDefaultValueError < ::GraphQL::Error # @return [InvalidDefaultValueError] a new instance of InvalidDefaultValueError # - # source://graphql//lib/graphql/schema/argument.rb#362 + # source://graphql//lib/graphql/schema/argument.rb#367 def initialize(argument); end end @@ -8308,17 +8407,17 @@ GraphQL::Schema::BUILT_IN_TYPES = T.let(T.unsafe(nil), Hash) # @api private # -# source://graphql//lib/graphql/schema/base_64_encoder.rb#8 +# source://graphql//lib/graphql/schema/base_64_encoder.rb#6 module GraphQL::Schema::Base64Encoder class << self # @api private # - # source://graphql//lib/graphql/schema/base_64_encoder.rb#13 + # source://graphql//lib/graphql/schema/base_64_encoder.rb#11 def decode(encoded_text, nonce: T.unsafe(nil)); end # @api private # - # source://graphql//lib/graphql/schema/base_64_encoder.rb#9 + # source://graphql//lib/graphql/schema/base_64_encoder.rb#7 def encode(unencoded_text, nonce: T.unsafe(nil)); end end end @@ -8415,7 +8514,7 @@ module GraphQL::Schema::BuildFromDefinition::Builder # @api private # - # source://graphql//lib/graphql/schema/build_from_definition.rb#467 + # source://graphql//lib/graphql/schema/build_from_definition.rb#465 def build_resolve_type(lookup_hash, directives, missing_type_handler); end # @api private @@ -8448,11 +8547,6 @@ module GraphQL::Schema::BuildFromDefinition::Builder # # source://graphql//lib/graphql/schema/build_from_definition.rb#214 def replace_late_bound_types_with_built_in(types); end - - # @api private - # - # source://graphql//lib/graphql/schema/build_from_definition.rb#491 - def resolve_type_name(type); end end # @api private @@ -8811,6 +8905,19 @@ GraphQL::Schema::Directive::OBJECT = T.let(T.unsafe(nil), Symbol) # source://graphql//lib/graphql/schema/directive/one_of.rb#5 class GraphQL::Schema::Directive::OneOf < ::GraphQL::Schema::Directive extend ::GraphQL::Schema::Member::HasArguments::ClassConfigured::InheritedArguments + + # @return [OneOf] a new instance of OneOf + # + # source://graphql//lib/graphql/schema/directive/one_of.rb#10 + def initialize(*_arg0, **_arg1, &_arg2); end +end + +# source://graphql//lib/graphql/schema/directive/one_of.rb#16 +module GraphQL::Schema::Directive::OneOf::IsOneOf + # @return [Boolean] + # + # source://graphql//lib/graphql/schema/directive/one_of.rb#17 + def one_of?; end end # source://graphql//lib/graphql/schema/directive.rb#130 @@ -8840,6 +8947,16 @@ class GraphQL::Schema::Directive::Skip < ::GraphQL::Schema::Directive end end +# source://graphql//lib/graphql/schema/directive/specified_by.rb#5 +class GraphQL::Schema::Directive::SpecifiedBy < ::GraphQL::Schema::Directive + extend ::GraphQL::Schema::Member::HasArguments::ClassConfigured::InheritedArguments + + class << self + # source://graphql//lib/graphql/schema/member/has_arguments.rb#68 + def load_url(value, _context = T.unsafe(nil)); end + end +end + # An example directive to show how you might interact with the runtime. # # This directive takes the return value of the tagged part of the query, @@ -8879,16 +8996,16 @@ GraphQL::Schema::Directive::UNION = T.let(T.unsafe(nil), Symbol) # source://graphql//lib/graphql/schema/directive.rb#148 GraphQL::Schema::Directive::VARIABLE_DEFINITION = T.let(T.unsafe(nil), Symbol) -# source://graphql//lib/graphql/schema.rb#78 +# source://graphql//lib/graphql/schema.rb#77 class GraphQL::Schema::DuplicateNamesError < ::GraphQL::Error # @return [DuplicateNamesError] a new instance of DuplicateNamesError # - # source://graphql//lib/graphql/schema.rb#80 + # source://graphql//lib/graphql/schema.rb#79 def initialize(duplicated_name:, duplicated_definition_1:, duplicated_definition_2:); end # Returns the value of attribute duplicated_name. # - # source://graphql//lib/graphql/schema.rb#79 + # source://graphql//lib/graphql/schema.rb#78 def duplicated_name; end end @@ -8904,7 +9021,7 @@ end # # ONIONS # # PEPPERS # # } -# class PizzaTopping < GraphQL::Enum +# class PizzaTopping < GraphQL::Schema::Enum # value :MUSHROOMS # value :ONIONS # value :PEPPERS @@ -9090,14 +9207,15 @@ class GraphQL::Schema::Field # @param ast_node [Language::Nodes::FieldDefinition, nil] If this schema was parsed from definition, this AST node defined the field # @param method_conflict_warning [Boolean] If false, skip the warning if this field's method conflicts with a built-in method # @param validates [Array] Configurations for validating this field + # @param fallback_value [Object] A fallback value if the method is not defined # @return [Field] a new instance of Field # # source://graphql//lib/graphql/schema/field.rb#222 - def initialize(type: T.unsafe(nil), name: T.unsafe(nil), owner: T.unsafe(nil), null: T.unsafe(nil), description: T.unsafe(nil), deprecation_reason: T.unsafe(nil), method: T.unsafe(nil), hash_key: T.unsafe(nil), dig: T.unsafe(nil), resolver_method: T.unsafe(nil), connection: T.unsafe(nil), max_page_size: T.unsafe(nil), default_page_size: T.unsafe(nil), scope: T.unsafe(nil), introspection: T.unsafe(nil), camelize: T.unsafe(nil), trace: T.unsafe(nil), complexity: T.unsafe(nil), ast_node: T.unsafe(nil), extras: T.unsafe(nil), extensions: T.unsafe(nil), connection_extension: T.unsafe(nil), resolver_class: T.unsafe(nil), subscription_scope: T.unsafe(nil), relay_node_field: T.unsafe(nil), relay_nodes_field: T.unsafe(nil), method_conflict_warning: T.unsafe(nil), broadcastable: T.unsafe(nil), arguments: T.unsafe(nil), directives: T.unsafe(nil), validates: T.unsafe(nil), fallback_value: T.unsafe(nil), &definition_block); end + def initialize(type: T.unsafe(nil), name: T.unsafe(nil), owner: T.unsafe(nil), null: T.unsafe(nil), description: T.unsafe(nil), deprecation_reason: T.unsafe(nil), method: T.unsafe(nil), hash_key: T.unsafe(nil), dig: T.unsafe(nil), resolver_method: T.unsafe(nil), connection: T.unsafe(nil), max_page_size: T.unsafe(nil), default_page_size: T.unsafe(nil), scope: T.unsafe(nil), introspection: T.unsafe(nil), camelize: T.unsafe(nil), trace: T.unsafe(nil), complexity: T.unsafe(nil), ast_node: T.unsafe(nil), extras: T.unsafe(nil), extensions: T.unsafe(nil), connection_extension: T.unsafe(nil), resolver_class: T.unsafe(nil), subscription_scope: T.unsafe(nil), relay_node_field: T.unsafe(nil), relay_nodes_field: T.unsafe(nil), method_conflict_warning: T.unsafe(nil), broadcastable: T.unsafe(nil), arguments: T.unsafe(nil), directives: T.unsafe(nil), validates: T.unsafe(nil), fallback_value: T.unsafe(nil), dynamic_introspection: T.unsafe(nil), &definition_block); end # @return [Boolean] # - # source://graphql//lib/graphql/schema/field.rb#606 + # source://graphql//lib/graphql/schema/field.rb#594 def authorized?(object, args, context); end # If true, subscription updates with this field can be shared between viewers @@ -9105,13 +9223,13 @@ class GraphQL::Schema::Field # @return [Boolean, nil] # @see GraphQL::Subscriptions::BroadcastAnalyzer # - # source://graphql//lib/graphql/schema/field.rb#357 + # source://graphql//lib/graphql/schema/field.rb#360 def broadcastable?; end - # source://graphql//lib/graphql/schema/field.rb#456 + # source://graphql//lib/graphql/schema/field.rb#459 def calculate_complexity(query:, nodes:, child_complexity:); end - # source://graphql//lib/graphql/schema/field.rb#521 + # source://graphql//lib/graphql/schema/field.rb#509 def complexity(new_complexity = T.unsafe(nil)); end # Can be set with `connection: true|false` or inferred from a type name ending in `*Connection` @@ -9123,13 +9241,13 @@ class GraphQL::Schema::Field # @return [Integer, nil] Applied to connections if {#has_default_page_size?} # - # source://graphql//lib/graphql/schema/field.rb#567 + # source://graphql//lib/graphql/schema/field.rb#555 def default_page_size; end # @param text [String] # @return [String] # - # source://graphql//lib/graphql/schema/field.rb#369 + # source://graphql//lib/graphql/schema/field.rb#372 def description(text = T.unsafe(nil)); end # Sets the attribute description @@ -9144,6 +9262,18 @@ class GraphQL::Schema::Field # source://graphql//lib/graphql/schema/field.rb#33 def dig_keys; end + # Returns the value of attribute dynamic_introspection. + # + # source://graphql//lib/graphql/schema/field.rb#355 + def dynamic_introspection; end + + # Sets the attribute dynamic_introspection + # + # @param value the value to set the attribute dynamic_introspection to. + # + # source://graphql//lib/graphql/schema/field.rb#355 + def dynamic_introspection=(_arg0); end + # Add `extension` to this field, initialized with `options` if provided. # # @example adding an extension @@ -9154,7 +9284,7 @@ class GraphQL::Schema::Field # @param options [Hash] if provided, given as `options:` when initializing `extension`. # @return [void] # - # source://graphql//lib/graphql/schema/field.rb#421 + # source://graphql//lib/graphql/schema/field.rb#424 def extension(extension_class, options = T.unsafe(nil)); end # Read extension instances from this field, @@ -9170,7 +9300,7 @@ class GraphQL::Schema::Field # @param extensions [Array Hash>>] Add extensions to this field. For hash elements, only the first key/value is used. # @return [Array] extensions to apply to this field # - # source://graphql//lib/graphql/schema/field.rb#396 + # source://graphql//lib/graphql/schema/field.rb#399 def extensions(new_extensions = T.unsafe(nil)); end # Read extras (as symbols) from this field, @@ -9179,12 +9309,12 @@ class GraphQL::Schema::Field # @param new_extras [Array] Add extras to this field # @return [Array] # - # source://graphql//lib/graphql/schema/field.rb#438 + # source://graphql//lib/graphql/schema/field.rb#441 def extras(new_extras = T.unsafe(nil)); end # @param ctx [GraphQL::Query::Context] # - # source://graphql//lib/graphql/schema/field.rb#761 + # source://graphql//lib/graphql/schema/field.rb#749 def fetch_extra(extra_name, ctx); end # @return [String] the GraphQL name for this field, camelized unless `camelize: false` is provided @@ -9194,12 +9324,12 @@ class GraphQL::Schema::Field # @return [Boolean] True if this field's {#default_page_size} should override the schema default. # - # source://graphql//lib/graphql/schema/field.rb#562 + # source://graphql//lib/graphql/schema/field.rb#550 def has_default_page_size?; end # @return [Boolean] True if this field's {#max_page_size} should override the schema default. # - # source://graphql//lib/graphql/schema/field.rb#546 + # source://graphql//lib/graphql/schema/field.rb#534 def has_max_page_size?; end # Returns the value of attribute hash_key. @@ -9217,7 +9347,7 @@ class GraphQL::Schema::Field # @return [Integer, nil] Applied to connections if {#has_max_page_size?} # - # source://graphql//lib/graphql/schema/field.rb#551 + # source://graphql//lib/graphql/schema/field.rb#539 def max_page_size; end # @return [Boolean] Should we warn if this field's name conflicts with a built-in method? @@ -9282,7 +9412,7 @@ class GraphQL::Schema::Field # @param args [Hash] A symbol-keyed hash of Ruby keyword arguments. (Empty if no args) # @param ctx [GraphQL::Query::Context] # - # source://graphql//lib/graphql/schema/field.rb#655 + # source://graphql//lib/graphql/schema/field.rb#643 def resolve(object, args, query_ctx); end # @return [Class, nil] The {Schema::Resolver} this field was derived from, if there is one @@ -9317,27 +9447,30 @@ class GraphQL::Schema::Field # source://graphql//lib/graphql/schema/field.rb#78 def trace; end - # source://graphql//lib/graphql/schema/field.rb#580 + # source://graphql//lib/graphql/schema/field.rb#568 def type; end # Sets the attribute type # # @param value the value to set the attribute type to. # - # source://graphql//lib/graphql/schema/field.rb#578 + # source://graphql//lib/graphql/schema/field.rb#566 def type=(_arg0); end # @return [Boolean] # - # source://graphql//lib/graphql/schema/field.rb#598 + # source://graphql//lib/graphql/schema/field.rb#586 def visible?(context); end private - # source://graphql//lib/graphql/schema/field.rb#773 + # source://graphql//lib/graphql/schema/field.rb#871 + def apply_own_complexity_to(child_complexity, query, nodes); end + + # source://graphql//lib/graphql/schema/field.rb#761 def assert_satisfactory_implementation(receiver, method_name, ruby_kwargs); end - # source://graphql//lib/graphql/schema/field.rb#860 + # source://graphql//lib/graphql/schema/field.rb#848 def run_extensions_before_resolve(obj, args, ctx, extended, idx: T.unsafe(nil)); end # Wrap execution with hooks. @@ -9345,7 +9478,7 @@ class GraphQL::Schema::Field # # @return [Object] Whatever the # - # source://graphql//lib/graphql/schema/field.rb#827 + # source://graphql//lib/graphql/schema/field.rb#815 def with_extensions(obj, args, ctx); end class << self @@ -9372,7 +9505,7 @@ class GraphQL::Schema::Field # @param resolver [Class] A {GraphQL::Schema::Resolver} class to use for field configuration # @param mutation [Class] A {GraphQL::Schema::Mutation} class to use for field configuration # @param subscription [Class] A {GraphQL::Schema::Subscription} class to use for field configuration - # @return [GraphQL::Schema:Field] an instance of `self + # @return [GraphQL::Schema:Field] an instance of `self` # @see {.initialize} for other options # # source://graphql//lib/graphql/schema/field.rb#97 @@ -9396,66 +9529,66 @@ class GraphQL::Schema::Field::ConnectionExtension < ::GraphQL::Schema::FieldExte def resolve(object:, arguments:, context:); end end -# source://graphql//lib/graphql/schema/field.rb#813 +# source://graphql//lib/graphql/schema/field.rb#801 class GraphQL::Schema::Field::ExtendedState # @return [ExtendedState] a new instance of ExtendedState # - # source://graphql//lib/graphql/schema/field.rb#814 + # source://graphql//lib/graphql/schema/field.rb#802 def initialize(args, object); end # Returns the value of attribute added_extras. # - # source://graphql//lib/graphql/schema/field.rb#821 + # source://graphql//lib/graphql/schema/field.rb#809 def added_extras; end # Sets the attribute added_extras # # @param value the value to set the attribute added_extras to. # - # source://graphql//lib/graphql/schema/field.rb#821 + # source://graphql//lib/graphql/schema/field.rb#809 def added_extras=(_arg0); end # Returns the value of attribute arguments. # - # source://graphql//lib/graphql/schema/field.rb#821 + # source://graphql//lib/graphql/schema/field.rb#809 def arguments; end # Sets the attribute arguments # # @param value the value to set the attribute arguments to. # - # source://graphql//lib/graphql/schema/field.rb#821 + # source://graphql//lib/graphql/schema/field.rb#809 def arguments=(_arg0); end # Returns the value of attribute memos. # - # source://graphql//lib/graphql/schema/field.rb#821 + # source://graphql//lib/graphql/schema/field.rb#809 def memos; end # Sets the attribute memos # # @param value the value to set the attribute memos to. # - # source://graphql//lib/graphql/schema/field.rb#821 + # source://graphql//lib/graphql/schema/field.rb#809 def memos=(_arg0); end # Returns the value of attribute object. # - # source://graphql//lib/graphql/schema/field.rb#821 + # source://graphql//lib/graphql/schema/field.rb#809 def object; end # Sets the attribute object # # @param value the value to set the attribute object to. # - # source://graphql//lib/graphql/schema/field.rb#821 + # source://graphql//lib/graphql/schema/field.rb#809 def object=(_arg0); end end # source://graphql//lib/graphql/schema/field.rb#18 class GraphQL::Schema::Field::FieldImplementationFailed < ::GraphQL::Error; end -# source://graphql//lib/graphql/schema/field.rb#577 +# source://graphql//lib/graphql/schema/field.rb#565 class GraphQL::Schema::Field::MissingReturnTypeError < ::GraphQL::Error; end # source://graphql//lib/graphql/schema/field/scope_extension.rb#6 @@ -9654,6 +9787,78 @@ end # source://graphql//lib/graphql/schema/finder.rb#20 class GraphQL::Schema::Finder::MemberNotFoundError < ::ArgumentError; end +# source://graphql//lib/graphql/schema/has_single_input_argument.rb#5 +module GraphQL::Schema::HasSingleInputArgument + mixes_in_class_methods ::GraphQL::Schema::HasSingleInputArgument::ClassMethods + + # source://graphql//lib/graphql/schema/has_single_input_argument.rb#6 + def resolve_with_support(**inputs); end + + private + + # source://graphql//lib/graphql/schema/has_single_input_argument.rb#149 + def authorize_arguments(args, values); end + + class << self + # @private + # + # source://graphql//lib/graphql/schema/has_single_input_argument.rb#42 + def included(base); end + end +end + +# source://graphql//lib/graphql/schema/has_single_input_argument.rb#46 +module GraphQL::Schema::HasSingleInputArgument::ClassMethods + # source://graphql//lib/graphql/schema/has_single_input_argument.rb#73 + def all_field_argument_definitions; end + + # @return [Boolean] + # + # source://graphql//lib/graphql/schema/has_single_input_argument.rb#69 + def any_field_arguments?; end + + # Also apply this argument to the input type: + # + # source://graphql//lib/graphql/schema/has_single_input_argument.rb#78 + def argument(*args, own_argument: T.unsafe(nil), **kwargs, &block); end + + # source://graphql//lib/graphql/schema/has_single_input_argument.rb#47 + def dummy; end + + # source://graphql//lib/graphql/schema/has_single_input_argument.rb#57 + def field_arguments(context = T.unsafe(nil)); end + + # source://graphql//lib/graphql/schema/has_single_input_argument.rb#61 + def get_field_argument(name, context = T.unsafe(nil)); end + + # The base class for generated input object types + # + # @param new_class [Class] The base class to use for generating input object definitions + # @return [Class] The base class for this mutation's generated input object (default is {GraphQL::Schema::InputObject}) + # + # source://graphql//lib/graphql/schema/has_single_input_argument.rb#104 + def input_object_class(new_class = T.unsafe(nil)); end + + # @param new_input_type [Class, nil] If provided, it configures this mutation to accept `new_input_type` instead of generating an input type + # @return [Class] The generated {Schema::InputObject} class for this mutation's `input` + # + # source://graphql//lib/graphql/schema/has_single_input_argument.rb#113 + def input_type(new_input_type = T.unsafe(nil)); end + + # source://graphql//lib/graphql/schema/has_single_input_argument.rb#65 + def own_field_arguments; end + + private + + # Generate the input type for the `input:` argument + # To customize how input objects are generated, override this method + # + # @return [Class] a subclass of {.input_object_class} + # + # source://graphql//lib/graphql/schema/has_single_input_argument.rb#125 + def generate_input_type; end +end + # source://graphql//lib/graphql/schema/input_object.rb#4 class GraphQL::Schema::InputObject < ::GraphQL::Schema::Member include ::GraphQL::Schema::Member::HasArguments::ArgumentObjectLoader @@ -9680,7 +9885,7 @@ class GraphQL::Schema::InputObject < ::GraphQL::Schema::Member # source://graphql//lib/graphql/schema/input_object.rb#103 def [](key); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def any?(*args, **_arg1, &block); end # @return [GraphQL::Execution::Interpereter::Arguments] The underlying arguments instance @@ -9693,10 +9898,10 @@ class GraphQL::Schema::InputObject < ::GraphQL::Schema::Member # source://graphql//lib/graphql/schema/input_object.rb#14 def context; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def each(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def empty?(*args, **_arg1, &block); end # @return [Boolean] @@ -9704,10 +9909,10 @@ class GraphQL::Schema::InputObject < ::GraphQL::Schema::Member # source://graphql//lib/graphql/schema/input_object.rb#113 def key?(key); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def keys(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def map(*args, **_arg1, &block); end # source://graphql//lib/graphql/schema/input_object.rb#47 @@ -9727,7 +9932,7 @@ class GraphQL::Schema::InputObject < ::GraphQL::Schema::Member # source://graphql//lib/graphql/schema/input_object.rb#85 def unwrap_value(value); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def values(*args, **_arg1, &block); end private @@ -9787,7 +9992,7 @@ module GraphQL::Schema::Interface extend ::GraphQL::Schema::Member::HasInterfaces extend ::GraphQL::Schema::Interface::DefinitionMethods - # source://graphql//lib/graphql/schema/interface.rb#98 + # source://graphql//lib/graphql/schema/interface.rb#102 def unwrap; end end @@ -9816,22 +10021,22 @@ module GraphQL::Schema::Interface::DefinitionMethods # Here's the tricky part. Make sure behavior keeps making its way down the inheritance chain. # - # source://graphql//lib/graphql/schema/interface.rb#40 + # source://graphql//lib/graphql/schema/interface.rb#49 def included(child_class); end - # source://graphql//lib/graphql/schema/interface.rb#91 + # source://graphql//lib/graphql/schema/interface.rb#95 def kind; end - # source://graphql//lib/graphql/schema/interface.rb#81 + # source://graphql//lib/graphql/schema/interface.rb#85 def orphan_types(*types); end - # source://graphql//lib/graphql/schema/interface.rb#31 + # source://graphql//lib/graphql/schema/interface.rb#40 def type_membership_class(membership_class = T.unsafe(nil)); end # @return [Boolean] # @see {Schema::Warden} hides interfaces without visible implementations # - # source://graphql//lib/graphql/schema/interface.rb#27 + # source://graphql//lib/graphql/schema/interface.rb#36 def visible?(context); end end @@ -9842,16 +10047,16 @@ class GraphQL::Schema::IntrospectionSystem # source://graphql//lib/graphql/schema/introspection_system.rb#7 def initialize(schema); end - # source://graphql//lib/graphql/schema/introspection_system.rb#57 + # source://graphql//lib/graphql/schema/introspection_system.rb#59 def dynamic_field(name:); end - # source://graphql//lib/graphql/schema/introspection_system.rb#53 + # source://graphql//lib/graphql/schema/introspection_system.rb#55 def dynamic_fields; end - # source://graphql//lib/graphql/schema/introspection_system.rb#49 + # source://graphql//lib/graphql/schema/introspection_system.rb#51 def entry_point(name:); end - # source://graphql//lib/graphql/schema/introspection_system.rb#45 + # source://graphql//lib/graphql/schema/introspection_system.rb#47 def entry_points; end # Returns the value of attribute possible_types. @@ -9866,7 +10071,7 @@ class GraphQL::Schema::IntrospectionSystem # @api private # @return void # - # source://graphql//lib/graphql/schema/introspection_system.rb#67 + # source://graphql//lib/graphql/schema/introspection_system.rb#69 def resolve_late_bindings; end # Returns the value of attribute types. @@ -9878,33 +10083,33 @@ class GraphQL::Schema::IntrospectionSystem # This is probably not 100% robust -- but it has to be good enough to avoid modifying the built-in introspection types # - # source://graphql//lib/graphql/schema/introspection_system.rb#130 + # source://graphql//lib/graphql/schema/introspection_system.rb#132 def dup_type_class(type_class); end - # source://graphql//lib/graphql/schema/introspection_system.rb#112 + # source://graphql//lib/graphql/schema/introspection_system.rb#114 def get_fields_from_class(class_sym:); end - # source://graphql//lib/graphql/schema/introspection_system.rb#104 + # source://graphql//lib/graphql/schema/introspection_system.rb#106 def load_constant(class_name); end - # source://graphql//lib/graphql/schema/introspection_system.rb#88 + # source://graphql//lib/graphql/schema/introspection_system.rb#90 def resolve_late_binding(late_bound_type); end end -# source://graphql//lib/graphql/schema/introspection_system.rb#146 +# source://graphql//lib/graphql/schema/introspection_system.rb#148 class GraphQL::Schema::IntrospectionSystem::PerFieldProxyResolve # @return [PerFieldProxyResolve] a new instance of PerFieldProxyResolve # - # source://graphql//lib/graphql/schema/introspection_system.rb#147 + # source://graphql//lib/graphql/schema/introspection_system.rb#149 def initialize(object_class:, inner_resolve:); end - # source://graphql//lib/graphql/schema/introspection_system.rb#152 + # source://graphql//lib/graphql/schema/introspection_system.rb#154 def call(obj, args, ctx); end end # Error that is raised when [#Schema#from_definition] is passed an invalid schema definition string. # -# source://graphql//lib/graphql/schema.rb#97 +# source://graphql//lib/graphql/schema.rb#96 class GraphQL::Schema::InvalidDocumentError < ::GraphQL::Error; end # source://graphql//lib/graphql/schema/invalid_type_error.rb#4 @@ -10035,7 +10240,7 @@ module GraphQL::Schema::Loader def load(introspection_result); end class << self - # source://graphql//lib/graphql/schema/loader.rb#198 + # source://graphql//lib/graphql/schema/loader.rb#196 def build_arguments(arg_owner, args, type_resolver); end # source://graphql//lib/graphql/schema/loader.rb#172 @@ -10093,7 +10298,7 @@ module GraphQL::Schema::Member::BaseDSLMethods # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/member/base_dsl_methods.rb#113 + # source://graphql//lib/graphql/schema/member/base_dsl_methods.rb#114 def authorized?(object, context); end # Creates the default name for a schema member. @@ -10107,7 +10312,7 @@ module GraphQL::Schema::Member::BaseDSLMethods # @api private # - # source://graphql//lib/graphql/schema/member/base_dsl_methods.rb#117 + # source://graphql//lib/graphql/schema/member/base_dsl_methods.rb#118 def default_relay; end # Call this method to provide a new description; OR @@ -10165,19 +10370,19 @@ module GraphQL::Schema::Member::BaseDSLMethods # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/member/base_dsl_methods.rb#109 + # source://graphql//lib/graphql/schema/member/base_dsl_methods.rb#110 def visible?(context); end protected # @api private # - # source://graphql//lib/graphql/schema/member/base_dsl_methods.rb#123 + # source://graphql//lib/graphql/schema/member/base_dsl_methods.rb#124 def default_graphql_name=(_arg0); end # @api private # - # source://graphql//lib/graphql/schema/member/base_dsl_methods.rb#123 + # source://graphql//lib/graphql/schema/member/base_dsl_methods.rb#124 def graphql_name=(_arg0); end end @@ -10306,9 +10511,14 @@ module GraphQL::Schema::Member::HasArguments # source://graphql//lib/graphql/schema/member/has_arguments.rb#80 def add_argument(arg_defn); end - # source://graphql//lib/graphql/schema/member/has_arguments.rb#220 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#232 def all_argument_definitions; end + # @return [Boolean] + # + # source://graphql//lib/graphql/schema/member/has_arguments.rb#125 + def any_arguments?; end + # @return [GraphQL::Schema::Argument] An instance of {argument_class}, created from `*args` # @see {GraphQL::Schema::Argument#initialize} for parameters # @@ -10317,7 +10527,7 @@ module GraphQL::Schema::Member::HasArguments # @param new_arg_class [Class] A class to use for building argument definitions # - # source://graphql//lib/graphql/schema/member/has_arguments.rb#239 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#251 def argument_class(new_arg_class = T.unsafe(nil)); end # @return [Hash GraphQL::Schema::Argument] Arguments defined on this thing, keyed by name. Includes inherited definitions] Hash GraphQL::Schema::Argument] Arguments defined on this thing, keyed by name. Includes inherited definitions @@ -10327,7 +10537,7 @@ module GraphQL::Schema::Member::HasArguments # @return [Boolean] # - # source://graphql//lib/graphql/schema/member/has_arguments.rb#322 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#334 def arguments_statically_coercible?; end # If given a block, it will eventually yield the loaded args to the block. @@ -10340,15 +10550,15 @@ module GraphQL::Schema::Member::HasArguments # @return [Interpreter::Arguments, Execution::Lazy] # @yield [Interpreter::Arguments, Execution::Lazy] # - # source://graphql//lib/graphql/schema/member/has_arguments.rb#252 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#264 def coerce_arguments(parent_object, values, context, &block); end # @return [GraphQL::Schema::Argument, nil] Argument defined on this thing, fetched by name. # - # source://graphql//lib/graphql/schema/member/has_arguments.rb#227 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#239 def get_argument(argument_name, context = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema/member/has_arguments.rb#419 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#442 def own_arguments; end # source://graphql//lib/graphql/schema/member/has_arguments.rb#96 @@ -10358,7 +10568,7 @@ module GraphQL::Schema::Member::HasArguments # but not for directives. # TODO apply static validations on schema definitions? # - # source://graphql//lib/graphql/schema/member/has_arguments.rb#309 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#321 def validate_directive_argument(arg_defn, value); end class << self @@ -10374,24 +10584,24 @@ module GraphQL::Schema::Member::HasArguments end end -# source://graphql//lib/graphql/schema/member/has_arguments.rb#330 +# source://graphql//lib/graphql/schema/member/has_arguments.rb#342 module GraphQL::Schema::Member::HasArguments::ArgumentClassAccessor - # source://graphql//lib/graphql/schema/member/has_arguments.rb#331 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#343 def argument_class(new_arg_class = T.unsafe(nil)); end end -# source://graphql//lib/graphql/schema/member/has_arguments.rb#342 +# source://graphql//lib/graphql/schema/member/has_arguments.rb#354 module GraphQL::Schema::Member::HasArguments::ArgumentObjectLoader - # source://graphql//lib/graphql/schema/member/has_arguments.rb#367 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#379 def authorize_application_object(argument, id, context, loaded_application_object); end - # source://graphql//lib/graphql/schema/member/has_arguments.rb#362 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#374 def load_and_authorize_application_object(argument, id, context); end - # source://graphql//lib/graphql/schema/member/has_arguments.rb#354 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#366 def load_application_object(argument, id, context); end - # source://graphql//lib/graphql/schema/member/has_arguments.rb#413 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#436 def load_application_object_failed(err); end # Look up the corresponding object for a provided ID. @@ -10402,44 +10612,54 @@ module GraphQL::Schema::Member::HasArguments::ArgumentObjectLoader # @param id [String] A client-provided to look up # @param context [GraphQL::Query::Context] the current context # - # source://graphql//lib/graphql/schema/member/has_arguments.rb#350 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#362 def object_from_id(type, id, context); end end -# source://graphql//lib/graphql/schema/member/has_arguments.rb#125 +# source://graphql//lib/graphql/schema/member/has_arguments.rb#129 module GraphQL::Schema::Member::HasArguments::ClassConfigured - # source://graphql//lib/graphql/schema/member/has_arguments.rb#126 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#130 def inherited(child_class); end end -# source://graphql//lib/graphql/schema/member/has_arguments.rb#131 +# source://graphql//lib/graphql/schema/member/has_arguments.rb#135 module GraphQL::Schema::Member::HasArguments::ClassConfigured::InheritedArguments - # source://graphql//lib/graphql/schema/member/has_arguments.rb#148 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#156 def all_argument_definitions; end - # source://graphql//lib/graphql/schema/member/has_arguments.rb#132 + # @return [Boolean] + # + # source://graphql//lib/graphql/schema/member/has_arguments.rb#152 + def any_arguments?; end + + # source://graphql//lib/graphql/schema/member/has_arguments.rb#136 def arguments(context = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema/member/has_arguments.rb#161 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#169 def get_argument(argument_name, context = T.unsafe(nil)); end end -# source://graphql//lib/graphql/schema/member/has_arguments.rb#175 +# source://graphql//lib/graphql/schema/member/has_arguments.rb#183 module GraphQL::Schema::Member::HasArguments::FieldConfigured - # source://graphql//lib/graphql/schema/member/has_arguments.rb#194 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#206 def all_argument_definitions; end - # source://graphql//lib/graphql/schema/member/has_arguments.rb#176 + # @return [Boolean] + # + # source://graphql//lib/graphql/schema/member/has_arguments.rb#202 + def any_arguments?; end + + # source://graphql//lib/graphql/schema/member/has_arguments.rb#184 def arguments(context = T.unsafe(nil)); end end -# source://graphql//lib/graphql/schema/member/has_arguments.rb#314 +# source://graphql//lib/graphql/schema/member/has_arguments.rb#326 module GraphQL::Schema::Member::HasArguments::HasDirectiveArguments - # source://graphql//lib/graphql/schema/member/has_arguments.rb#315 + # source://graphql//lib/graphql/schema/member/has_arguments.rb#327 def validate_directive_argument(arg_defn, value); end end -# source://graphql//lib/graphql/schema/member/has_arguments.rb#418 +# source://graphql//lib/graphql/schema/member/has_arguments.rb#441 GraphQL::Schema::Member::HasArguments::NO_ARGUMENTS = T.let(T.unsafe(nil), Hash) # source://graphql//lib/graphql/schema/member/has_ast_node.rb#5 @@ -10595,28 +10815,28 @@ module GraphQL::Schema::Member::HasFields # @param [GraphQL::Schema::Field] # @return [String] A warning to give when this field definition might conflict with a built-in method # - # source://graphql//lib/graphql/schema/member/has_fields.rb#214 + # source://graphql//lib/graphql/schema/member/has_fields.rb#217 def conflict_field_name_warning(field_defn); end - # source://graphql//lib/graphql/schema/member/has_fields.rb#181 + # source://graphql//lib/graphql/schema/member/has_fields.rb#184 def inherited(subclass); end # If `type` is an interface, and `self` has a type membership for `type`, then make sure it's visible. # # @return [Boolean] # - # source://graphql//lib/graphql/schema/member/has_fields.rb#190 + # source://graphql//lib/graphql/schema/member/has_fields.rb#193 def visible_interface_implementation?(type, context, warden); end class << self # @private # - # source://graphql//lib/graphql/schema/member/has_fields.rb#174 + # source://graphql//lib/graphql/schema/member/has_fields.rb#177 def extended(child_class); end # @private # - # source://graphql//lib/graphql/schema/member/has_fields.rb#168 + # source://graphql//lib/graphql/schema/member/has_fields.rb#171 def included(child_class); end end end @@ -10651,7 +10871,7 @@ end module GraphQL::Schema::Member::HasFields::ObjectMethods # @return [Hash GraphQL::Schema::Field>] Fields on this object, keyed by name, including inherited fields # - # source://graphql//lib/graphql/schema/member/has_fields.rb#148 + # source://graphql//lib/graphql/schema/member/has_fields.rb#151 def fields(context = T.unsafe(nil)); end # source://graphql//lib/graphql/schema/member/has_fields.rb#133 @@ -10675,7 +10895,7 @@ module GraphQL::Schema::Member::HasInterfaces # param context [Query::Context] If omitted, skip filtering. # - # source://graphql//lib/graphql/schema/member/has_interfaces.rb#93 + # source://graphql//lib/graphql/schema/member/has_interfaces.rb#102 def interfaces(context = T.unsafe(nil)); end # source://graphql//lib/graphql/schema/member/has_interfaces.rb#53 @@ -10683,13 +10903,13 @@ module GraphQL::Schema::Member::HasInterfaces private - # source://graphql//lib/graphql/schema/member/has_interfaces.rb#120 + # source://graphql//lib/graphql/schema/member/has_interfaces.rb#134 def inherited(subclass); end class << self # @private # - # source://graphql//lib/graphql/schema/member/has_interfaces.rb#116 + # source://graphql//lib/graphql/schema/member/has_interfaces.rb#130 def extended(child_class); end end end @@ -10708,7 +10928,7 @@ end # source://graphql//lib/graphql/schema/member/has_interfaces.rb#72 module GraphQL::Schema::Member::HasInterfaces::ClassConfigured::InheritedInterfaces - # source://graphql//lib/graphql/schema/member/has_interfaces.rb#80 + # source://graphql//lib/graphql/schema/member/has_interfaces.rb#89 def interface_type_memberships; end # source://graphql//lib/graphql/schema/member/has_interfaces.rb#73 @@ -10834,6 +11054,12 @@ end # source://graphql//lib/graphql/schema/member/scoped.rb#6 module GraphQL::Schema::Member::Scoped + # source://graphql//lib/graphql/schema/member/scoped.rb#31 + def inherited(subclass); end + + # source://graphql//lib/graphql/schema/member/scoped.rb#19 + def reauthorize_scoped_objects(new_value = T.unsafe(nil)); end + # This is called when a field has `scope: true`. # The field's return type class receives this call. # @@ -11061,7 +11287,7 @@ class GraphQL::Schema::Object < ::GraphQL::Schema::Member # @return [Object] a new instance of Object # - # source://graphql//lib/graphql/schema/object.rb#96 + # source://graphql//lib/graphql/schema/object.rb#104 def initialize(object, context); end # @return [GraphQL::Query::Context] the context instance for this query @@ -11104,22 +11330,32 @@ class GraphQL::Schema::Object < ::GraphQL::Schema::Member # @raise [GraphQL::UnauthorizedError] if the user-provided hook returns `false` # @return [GraphQL::Schema::Object, GraphQL::Execution::Lazy] # - # source://graphql//lib/graphql/schema/object.rb#55 + # source://graphql//lib/graphql/schema/object.rb#59 def authorized_new(object, context); end # Set up a type-specific invalid null error to use when this object's non-null fields wrongly return `nil`. # It should help with debugging and bug tracker integrations. # - # source://graphql//lib/graphql/schema/object.rb#104 + # source://graphql//lib/graphql/schema/object.rb#112 def const_missing(name); end - # source://graphql//lib/graphql/schema/object.rb#114 + # source://graphql//lib/graphql/schema/object.rb#122 def kind; end + # source://graphql//lib/graphql/schema/object.rb#99 + def scoped_new(object, context); end + # This is called by the runtime to return an object to call methods on. # - # source://graphql//lib/graphql/schema/object.rb#34 + # source://graphql//lib/graphql/schema/object.rb#38 def wrap(object, context); end + + # source://graphql//lib/graphql/schema/object.rb#33 + def wrap_scoped(object, context); end + + protected + + def new(*_arg0); end end end @@ -11155,20 +11391,18 @@ end class GraphQL::Schema::Printer < ::GraphQL::Language::Printer # @param schema [GraphQL::Schema] # @param context [Hash] - # @param only [<#call(member, ctx)>] - # @param except [<#call(member, ctx)>] # @param introspection [Boolean] Should include the introspection types in the string? # @return [Printer] a new instance of Printer # - # source://graphql//lib/graphql/schema/printer.rb#42 - def initialize(schema, context: T.unsafe(nil), only: T.unsafe(nil), except: T.unsafe(nil), introspection: T.unsafe(nil)); end + # source://graphql//lib/graphql/schema/printer.rb#40 + def initialize(schema, context: T.unsafe(nil), introspection: T.unsafe(nil)); end # Return a GraphQL schema string for the defined types in the schema # - # source://graphql//lib/graphql/schema/printer.rb#86 + # source://graphql//lib/graphql/schema/printer.rb#87 def print_schema; end - # source://graphql//lib/graphql/schema/printer.rb#90 + # source://graphql//lib/graphql/schema/printer.rb#91 def print_type(type); end # Returns the value of attribute schema. @@ -11184,7 +11418,7 @@ class GraphQL::Schema::Printer < ::GraphQL::Language::Printer class << self # Return the GraphQL schema string for the introspection type system # - # source://graphql//lib/graphql/schema/printer.rb#56 + # source://graphql//lib/graphql/schema/printer.rb#52 def print_introspection_schema; end # Return a GraphQL schema string for the defined types in the schema @@ -11194,14 +11428,14 @@ class GraphQL::Schema::Printer < ::GraphQL::Language::Printer # @param only [<#call(member, ctx)>] # @param except [<#call(member, ctx)>] # - # source://graphql//lib/graphql/schema/printer.rb#80 + # source://graphql//lib/graphql/schema/printer.rb#81 def print_schema(schema, **args); end end end -# source://graphql//lib/graphql/schema/printer.rb#95 +# source://graphql//lib/graphql/schema/printer.rb#96 class GraphQL::Schema::Printer::IntrospectionPrinter < ::GraphQL::Language::Printer - # source://graphql//lib/graphql/schema/printer.rb#96 + # source://graphql//lib/graphql/schema/printer.rb#97 def print_schema_definition(schema); end end @@ -11222,64 +11456,19 @@ end # # @see {GraphQL::Schema::Mutation} for an example, it's basically the same. # -# source://graphql//lib/graphql/schema/relay_classic_mutation.rb#24 +# source://graphql//lib/graphql/schema/relay_classic_mutation.rb#23 class GraphQL::Schema::RelayClassicMutation < ::GraphQL::Schema::Mutation + include ::GraphQL::Schema::HasSingleInputArgument + extend ::GraphQL::Schema::HasSingleInputArgument::ClassMethods + + # source://graphql//lib/graphql/schema/member/has_arguments.rb#68 + def load_client_mutation_id(value, _context = T.unsafe(nil)); end + # Override {GraphQL::Schema::Resolver#resolve_with_support} to # delete `client_mutation_id` from the kwargs. # - # source://graphql//lib/graphql/schema/relay_classic_mutation.rb#31 + # source://graphql//lib/graphql/schema/relay_classic_mutation.rb#35 def resolve_with_support(**inputs); end - - private - - # source://graphql//lib/graphql/schema/relay_classic_mutation.rb#172 - def authorize_arguments(args, values); end - - class << self - # source://graphql//lib/graphql/schema/relay_classic_mutation.rb#95 - def all_field_argument_definitions; end - - # Also apply this argument to the input type: - # - # source://graphql//lib/graphql/schema/relay_classic_mutation.rb#100 - def argument(*args, own_argument: T.unsafe(nil), **kwargs, &block); end - - # source://graphql//lib/graphql/schema/relay_classic_mutation.rb#73 - def dummy; end - - # source://graphql//lib/graphql/schema/relay_classic_mutation.rb#83 - def field_arguments(context = T.unsafe(nil)); end - - # source://graphql//lib/graphql/schema/relay_classic_mutation.rb#87 - def get_field_argument(name, context = T.unsafe(nil)); end - - # The base class for generated input object types - # - # @param new_class [Class] The base class to use for generating input object definitions - # @return [Class] The base class for this mutation's generated input object (default is {GraphQL::Schema::InputObject}) - # - # source://graphql//lib/graphql/schema/relay_classic_mutation.rb#126 - def input_object_class(new_class = T.unsafe(nil)); end - - # @param new_input_type [Class, nil] If provided, it configures this mutation to accept `new_input_type` instead of generating an input type - # @return [Class] The generated {Schema::InputObject} class for this mutation's `input` - # - # source://graphql//lib/graphql/schema/relay_classic_mutation.rb#135 - def input_type(new_input_type = T.unsafe(nil)); end - - # source://graphql//lib/graphql/schema/relay_classic_mutation.rb#91 - def own_field_arguments; end - - private - - # Generate the input type for the `input:` argument - # To customize how input objects are generated, override this method - # - # @return [Class] a subclass of {.input_object_class} - # - # source://graphql//lib/graphql/schema/relay_classic_mutation.rb#147 - def generate_input_type; end - end end # A class-based container for field configuration and resolution logic. It supports: @@ -11332,7 +11521,7 @@ class GraphQL::Schema::Resolver # @raise [GraphQL::UnauthorizedError] To signal an authorization failure # @return [Boolean, early_return_data] If `false`, execution will stop (and `early_return_data` will be returned instead, if present.) # - # source://graphql//lib/graphql/schema/resolver.rb#145 + # source://graphql//lib/graphql/schema/resolver.rb#147 def authorized?(**inputs); end # @return [GraphQL::Query::Context] @@ -11366,7 +11555,7 @@ class GraphQL::Schema::Resolver # @raise [GraphQL::UnauthorizedError] To signal an authorization failure # @return [Boolean, early_return_data] If `false`, execution will stop (and `early_return_data` will be returned instead, if present.) # - # source://graphql//lib/graphql/schema/resolver.rb#134 + # source://graphql//lib/graphql/schema/resolver.rb#136 def ready?(**args); end # Do the work. Everything happens here. @@ -11374,7 +11563,7 @@ class GraphQL::Schema::Resolver # @raise [GraphQL::RequiredImplementationMissingError] # @return [Object] An object corresponding to the return type # - # source://graphql//lib/graphql/schema/resolver.rb#120 + # source://graphql//lib/graphql/schema/resolver.rb#122 def resolve(**args); end # This method is _actually_ called by the runtime, @@ -11394,45 +11583,50 @@ class GraphQL::Schema::Resolver # # @param err [GraphQL::UnauthorizedError] # - # source://graphql//lib/graphql/schema/resolver.rb#157 + # source://graphql//lib/graphql/schema/resolver.rb#159 def unauthorized_object(err); end private - # source://graphql//lib/graphql/schema/resolver.rb#163 + # source://graphql//lib/graphql/schema/resolver.rb#165 def authorize_arguments(args, inputs); end - # source://graphql//lib/graphql/schema/resolver.rb#206 + # source://graphql//lib/graphql/schema/resolver.rb#212 def get_argument(name, context = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema/resolver.rb#179 + # source://graphql//lib/graphql/schema/resolver.rb#185 def load_arguments(args); end class << self - # source://graphql//lib/graphql/schema/resolver.rb#219 + # source://graphql//lib/graphql/schema/resolver.rb#229 def all_field_argument_definitions; end + # @return [Boolean] + # + # source://graphql//lib/graphql/schema/resolver.rb#221 + def any_field_arguments?; end + # Add an argument to this field's signature, but # also add some preparation hook methods which will be used for this argument # # @see {GraphQL::Schema::Argument#initialize} for the signature # - # source://graphql//lib/graphql/schema/resolver.rb#360 + # source://graphql//lib/graphql/schema/resolver.rb#370 def argument(*args, **kwargs, &block); end - # source://graphql//lib/graphql/schema/resolver.rb#297 + # source://graphql//lib/graphql/schema/resolver.rb#307 def broadcastable(new_broadcastable); end # @return [Boolean, nil] # - # source://graphql//lib/graphql/schema/resolver.rb#302 + # source://graphql//lib/graphql/schema/resolver.rb#312 def broadcastable?; end # Specifies the complexity of the field. Defaults to `1` # # @return [Integer, Proc] # - # source://graphql//lib/graphql/schema/resolver.rb#290 + # source://graphql//lib/graphql/schema/resolver.rb#300 def complexity(new_complexity = T.unsafe(nil)); end # Get or set the `default_page_size:` which will be configured for fields using this resolver @@ -11441,7 +11635,7 @@ class GraphQL::Schema::Resolver # @param default_page_size [Integer, nil] Set a new value # @return [Integer, nil] The `default_page_size` assigned to fields that use this resolver # - # source://graphql//lib/graphql/schema/resolver.rb#335 + # source://graphql//lib/graphql/schema/resolver.rb#345 def default_page_size(new_default_page_size = T.unsafe(nil)); end # Registers new extension @@ -11449,35 +11643,35 @@ class GraphQL::Schema::Resolver # @param extension [Class] Extension class # @param options [Hash] Optional extension options # - # source://graphql//lib/graphql/schema/resolver.rb#369 + # source://graphql//lib/graphql/schema/resolver.rb#379 def extension(extension, **options); end # @api private # - # source://graphql//lib/graphql/schema/resolver.rb#375 + # source://graphql//lib/graphql/schema/resolver.rb#385 def extensions; end # Additional info injected into {#resolve} # # @see {GraphQL::Schema::Field#extras} # - # source://graphql//lib/graphql/schema/resolver.rb#234 + # source://graphql//lib/graphql/schema/resolver.rb#244 def extras(new_extras = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema/resolver.rb#211 + # source://graphql//lib/graphql/schema/resolver.rb#217 def field_arguments(context = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema/resolver.rb#215 + # source://graphql//lib/graphql/schema/resolver.rb#225 def get_field_argument(name, context = T.unsafe(nil)); end # @return [Boolean] `true` if this resolver or a superclass has an assigned `default_page_size` # - # source://graphql//lib/graphql/schema/resolver.rb#348 + # source://graphql//lib/graphql/schema/resolver.rb#358 def has_default_page_size?; end # @return [Boolean] `true` if this resolver or a superclass has an assigned `max_page_size` # - # source://graphql//lib/graphql/schema/resolver.rb#327 + # source://graphql//lib/graphql/schema/resolver.rb#337 def has_max_page_size?; end # Get or set the `max_page_size:` which will be configured for fields using this resolver @@ -11486,7 +11680,7 @@ class GraphQL::Schema::Resolver # @param max_page_size [Integer, nil] Set a new value # @return [Integer, nil] The `max_page_size` assigned to fields that use this resolver # - # source://graphql//lib/graphql/schema/resolver.rb#314 + # source://graphql//lib/graphql/schema/resolver.rb#324 def max_page_size(new_max_page_size = T.unsafe(nil)); end # If `true` (default), then the return type for this resolver will be nullable. @@ -11495,17 +11689,17 @@ class GraphQL::Schema::Resolver # @param allow_null [Boolean] Whether or not the response can be null # @see #type which sets the return type of this field and accepts a `null:` option # - # source://graphql//lib/graphql/schema/resolver.rb#247 + # source://graphql//lib/graphql/schema/resolver.rb#257 def null(allow_null = T.unsafe(nil)); end # Default `:resolve` set below. # # @return [Symbol] The method to call on instances of this object to resolve the field # - # source://graphql//lib/graphql/schema/resolver.rb#225 + # source://graphql//lib/graphql/schema/resolver.rb#235 def resolve_method(new_method = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema/resolver.rb#255 + # source://graphql//lib/graphql/schema/resolver.rb#265 def resolver_method(new_method_name = T.unsafe(nil)); end # Call this method to get the return type of the field, @@ -11517,17 +11711,17 @@ class GraphQL::Schema::Resolver # @param null [true, false] Whether or not the field may return `nil` # @return [Class] The type which this field returns. # - # source://graphql//lib/graphql/schema/resolver.rb#270 + # source://graphql//lib/graphql/schema/resolver.rb#280 def type(new_type = T.unsafe(nil), null: T.unsafe(nil)); end # A non-normalized type configuration, without `null` applied # - # source://graphql//lib/graphql/schema/resolver.rb#353 + # source://graphql//lib/graphql/schema/resolver.rb#363 def type_expr; end private - # source://graphql//lib/graphql/schema/resolver.rb#396 + # source://graphql//lib/graphql/schema/resolver.rb#406 def own_extensions; end end end @@ -11619,6 +11813,12 @@ class GraphQL::Schema::Scalar < ::GraphQL::Schema::Member end end +# source://graphql//lib/graphql/schema.rb#1502 +module GraphQL::Schema::SubclassGetReferencesTo + # source://graphql//lib/graphql/schema.rb#1503 + def get_references_to(type_name); end +end + # This class can be extended to create fields on your subscription root. # # It provides hooks for the different parts of the subscription lifecycle: @@ -11646,22 +11846,22 @@ class GraphQL::Schema::Subscription < ::GraphQL::Schema::Resolver # remove this subscription (assuming that the object was deleted in the meantime, # or that it became inaccessible). # - # source://graphql//lib/graphql/schema/subscription.rb#89 + # source://graphql//lib/graphql/schema/subscription.rb#94 def load_application_object_failed(err); end # Implement the {Resolve} API # - # source://graphql//lib/graphql/schema/subscription.rb#45 + # source://graphql//lib/graphql/schema/subscription.rb#50 def resolve(**args); end # Wrap the user-defined `#subscribe` hook # - # source://graphql//lib/graphql/schema/subscription.rb#52 + # source://graphql//lib/graphql/schema/subscription.rb#57 def resolve_subscribe(**args); end # Wrap the user-provided `#update` hook # - # source://graphql//lib/graphql/schema/subscription.rb#69 + # source://graphql//lib/graphql/schema/subscription.rb#74 def resolve_update(**args); end # source://graphql//lib/graphql/schema/subscription.rb#28 @@ -11671,19 +11871,22 @@ class GraphQL::Schema::Subscription < ::GraphQL::Schema::Resolver # Override it to return an object or # `:no_response` to (explicitly) return nothing. # - # source://graphql//lib/graphql/schema/subscription.rb#64 + # source://graphql//lib/graphql/schema/subscription.rb#69 def subscribe(args = T.unsafe(nil)); end # Call this to halt execution and remove this subscription from the system # - # source://graphql//lib/graphql/schema/subscription.rb#97 - def unsubscribe; end + # @param update_value [Object] if present, deliver this update before unsubscribing + # @return [void] + # + # source://graphql//lib/graphql/schema/subscription.rb#104 + def unsubscribe(update_value = T.unsafe(nil)); end # The default implementation returns the root object. # Override it to return {NO_UPDATE} if you want to # skip updates sometimes. Or override it to return a different object. # - # source://graphql//lib/graphql/schema/subscription.rb#82 + # source://graphql//lib/graphql/schema/subscription.rb#87 def update(args = T.unsafe(nil)); end class << self @@ -11694,12 +11897,12 @@ class GraphQL::Schema::Subscription < ::GraphQL::Schema::Resolver # @param optional [Boolean] If true, then don't require `scope:` to be provided to updates to this subscription. # @return [Symbol] # - # source://graphql//lib/graphql/schema/subscription.rb#108 + # source://graphql//lib/graphql/schema/subscription.rb#115 def subscription_scope(new_scope = T.unsafe(nil), optional: T.unsafe(nil)); end # @return [Boolean] # - # source://graphql//lib/graphql/schema/subscription.rb#119 + # source://graphql//lib/graphql/schema/subscription.rb#126 def subscription_scope_optional?; end # This is called during initial subscription to get a "name" for this subscription. @@ -11719,7 +11922,7 @@ class GraphQL::Schema::Subscription < ::GraphQL::Schema::Resolver # @return [String] An identifier corresponding to a stream of updates # @see {#update} for how to skip updates when an event comes with a matching topic. # - # source://graphql//lib/graphql/schema/subscription.rb#143 + # source://graphql//lib/graphql/schema/subscription.rb#150 def topic_for(arguments:, field:, scope:); end end end @@ -11727,7 +11930,7 @@ end # source://graphql//lib/graphql/schema/subscription.rb#17 GraphQL::Schema::Subscription::NO_UPDATE = T.let(T.unsafe(nil), Symbol) -# source://graphql//lib/graphql/schema/subscription.rb#102 +# source://graphql//lib/graphql/schema/subscription.rb#109 GraphQL::Schema::Subscription::READING_SCOPE = T.let(T.unsafe(nil), Object) # This plugin will stop resolving new fields after `max_seconds` have elapsed. @@ -11983,16 +12186,16 @@ module GraphQL::Schema::UniqueWithinType end end -# source://graphql//lib/graphql/schema.rb#88 +# source://graphql//lib/graphql/schema.rb#87 class GraphQL::Schema::UnresolvedLateBoundTypeError < ::GraphQL::Error # @return [UnresolvedLateBoundTypeError] a new instance of UnresolvedLateBoundTypeError # - # source://graphql//lib/graphql/schema.rb#90 + # source://graphql//lib/graphql/schema.rb#89 def initialize(type:); end # Returns the value of attribute type. # - # source://graphql//lib/graphql/schema.rb#89 + # source://graphql//lib/graphql/schema.rb#88 def type; end end @@ -12126,7 +12329,7 @@ GraphQL::Schema::Validator::AllowNullValidator::MESSAGE = T.let(T.unsafe(nil), S # argument :favorite_non_prime, Integer, required: true, # validates: { exclusion: { in: [2, 3, 5, 7, ... ]} } # -# source://graphql//lib/graphql/schema/validator/exclusion_validator.rb#15 +# source://graphql//lib/graphql/schema/validator/exclusion_validator.rb#13 class GraphQL::Schema::Validator::ExclusionValidator < ::GraphQL::Schema::Validator # @param message [String] # @param in [Array] The values to reject @@ -12152,7 +12355,7 @@ end # # # It's pretty hard to come up with a legitimate use case for `without:` # -# source://graphql//lib/graphql/schema/validator/format_validator.rb#23 +# source://graphql//lib/graphql/schema/validator/format_validator.rb#20 class GraphQL::Schema::Validator::FormatValidator < ::GraphQL::Schema::Validator # @param with [RegExp, nil] # @param without [Regexp, nil] @@ -12175,7 +12378,7 @@ end # argument :favorite_prime, Integer, required: true, # validates: { inclusion: { in: [2, 3, 5, 7, 11, ... ] } } # -# source://graphql//lib/graphql/schema/validator/inclusion_validator.rb#17 +# source://graphql//lib/graphql/schema/validator/inclusion_validator.rb#15 class GraphQL::Schema::Validator::InclusionValidator < ::GraphQL::Schema::Validator # @param message [String] # @param in [Array] The values to allow @@ -12197,7 +12400,7 @@ end # # argument :ice_cream_preferences, [ICE_CREAM_FLAVOR], required: true, validates: { length: { is: 3 } } # -# source://graphql//lib/graphql/schema/validator/length_validator.rb#24 +# source://graphql//lib/graphql/schema/validator/length_validator.rb#16 class GraphQL::Schema::Validator::LengthValidator < ::GraphQL::Schema::Validator # @param maximum [Integer] # @param too_long [String] Used when `maximum` is exceeded or value is greater than `within` @@ -12228,7 +12431,7 @@ end # # argument :items_count, Integer, required: true, validates: { numericality: { greater_than_or_equal_to: 0 } } # -# source://graphql//lib/graphql/schema/validator/numericality_validator.rb#29 +# source://graphql//lib/graphql/schema/validator/numericality_validator.rb#19 class GraphQL::Schema::Validator::NumericalityValidator < ::GraphQL::Schema::Validator # @param greater_than [Integer] # @param greater_than_or_equal_to [Integer] @@ -12278,7 +12481,7 @@ end # argument :age, Integer, required: :nullable # end # -# source://graphql//lib/graphql/schema/validator/required_validator.rb#39 +# source://graphql//lib/graphql/schema/validator/required_validator.rb#37 class GraphQL::Schema::Validator::RequiredValidator < ::GraphQL::Schema::Validator # @param one_of [Symbol, Array] An argument, or a list of arguments, that represents a valid set of inputs for this field # @param message [String] @@ -12304,160 +12507,142 @@ class GraphQL::Schema::Validator::ValidationFailedError < ::GraphQL::ExecutionEr def errors; end end -# Restrict access to a {GraphQL::Schema} with a user-defined filter. +# Restrict access to a {GraphQL::Schema} with a user-defined `visible?` implementations. # # When validating and executing a query, all access to schema members # should go through a warden. If you access the schema directly, # you may show a client something that it shouldn't be allowed to see. # # @api private -# @example Hiding private fields -# private_members = -> (member, ctx) { member.metadata[:private] } -# result = Schema.execute(query_string, except: private_members) -# @example Custom filter implementation -# # It must respond to `#call(member)`. -# class MissingRequiredFlags -# def initialize(user) -# @user = user -# end -# -# # Return `false` if any required flags are missing -# def call(member, ctx) -# member.metadata[:required_flags].any? do |flag| -# !@user.has_flag?(flag) -# end -# end -# end -# -# # Then, use the custom filter in query: -# missing_required_flags = MissingRequiredFlags.new(current_user) # -# # This query can only access members which match the user's flags -# result = Schema.execute(query_string, except: missing_required_flags) -# -# source://graphql//lib/graphql/schema/warden.rb#39 +# source://graphql//lib/graphql/schema/warden.rb#14 class GraphQL::Schema::Warden # @api private - # @param filter [<#call(member)>] Objects are hidden when `.call(member, ctx)` returns true # @param context [GraphQL::Query::Context] # @param schema [GraphQL::Schema] # @return [Warden] a new instance of Warden # - # source://graphql//lib/graphql/schema/warden.rb#120 - def initialize(filter = T.unsafe(nil), context:, schema:); end + # source://graphql//lib/graphql/schema/warden.rb#96 + def initialize(context:, schema:); end # @api private # @param argument_owner [GraphQL::Field, GraphQL::InputObjectType] # @return [Array] Visible arguments on `argument_owner` # - # source://graphql//lib/graphql/schema/warden.rb#221 + # source://graphql//lib/graphql/schema/warden.rb#197 def arguments(argument_owner, ctx = T.unsafe(nil)); end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#249 + # source://graphql//lib/graphql/schema/warden.rb#240 def directives; end # @api private # @return [Array] Visible members of `enum_defn` # - # source://graphql//lib/graphql/schema/warden.rb#227 + # source://graphql//lib/graphql/schema/warden.rb#212 def enum_values(enum_defn); end # @api private # @param type_defn [GraphQL::ObjectType, GraphQL::InterfaceType] # @return [Array] Fields on `type_defn` # - # source://graphql//lib/graphql/schema/warden.rb#214 + # source://graphql//lib/graphql/schema/warden.rb#190 def fields(type_defn); end # @api private # @return [GraphQL::Argument, nil] The argument named `argument_name` on `parent_type`, if it exists and is visible # - # source://graphql//lib/graphql/schema/warden.rb#198 + # source://graphql//lib/graphql/schema/warden.rb#174 def get_argument(parent_type, argument_name); end # @api private # @return [GraphQL::Field, nil] The field named `field_name` on `parent_type`, if it exists # - # source://graphql//lib/graphql/schema/warden.rb#182 + # source://graphql//lib/graphql/schema/warden.rb#158 def get_field(parent_type, field_name); end # @api private # @return [GraphQL::BaseType, nil] The type named `type_name`, if it exists (else `nil`) # - # source://graphql//lib/graphql/schema/warden.rb#157 + # source://graphql//lib/graphql/schema/warden.rb#133 def get_type(type_name); end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#286 + # source://graphql//lib/graphql/schema/warden.rb#277 def interface_type_memberships(obj_type, _ctx = T.unsafe(nil)); end # @api private # @return [Array] Visible interfaces implemented by `obj_type` # - # source://graphql//lib/graphql/schema/warden.rb#244 + # source://graphql//lib/graphql/schema/warden.rb#229 def interfaces(obj_type); end + # @api private + # @return [Boolean] True if this type is used for `loads:` but not in the schema otherwise and not _explicitly_ hidden. + # + # source://graphql//lib/graphql/schema/warden.rb#128 + def loadable?(type, _ctx); end + # @api private # @return [Array] The types which may be member of `type_defn` # - # source://graphql//lib/graphql/schema/warden.rb#204 + # source://graphql//lib/graphql/schema/warden.rb#180 def possible_types(type_defn); end # @api private # @return [Boolean] Boolean True if the type is visible and reachable in the schema # - # source://graphql//lib/graphql/schema/warden.rb#176 + # source://graphql//lib/graphql/schema/warden.rb#152 def reachable_type?(type_name); end # @api private # @return [Array] Visible and reachable types in the schema # - # source://graphql//lib/graphql/schema/warden.rb#171 + # source://graphql//lib/graphql/schema/warden.rb#147 def reachable_types; end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#253 + # source://graphql//lib/graphql/schema/warden.rb#244 def root_type_for_operation(op_name); end # @api private # @return [Hash] Visible types in the schema # - # source://graphql//lib/graphql/schema/warden.rb#144 + # source://graphql//lib/graphql/schema/warden.rb#115 def types; end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#273 + # source://graphql//lib/graphql/schema/warden.rb#264 def visible_argument?(arg_defn, _ctx = T.unsafe(nil)); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#238 + # source://graphql//lib/graphql/schema/warden.rb#223 def visible_enum_value?(enum_value, _ctx = T.unsafe(nil)); end # @api private # @param owner [Class, Module] If provided, confirm that field has the given owner. # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#263 + # source://graphql//lib/graphql/schema/warden.rb#254 def visible_field?(field_defn, _ctx = T.unsafe(nil), owner = T.unsafe(nil)); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#277 + # source://graphql//lib/graphql/schema/warden.rb#268 def visible_type?(type_defn, _ctx = T.unsafe(nil)); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#282 + # source://graphql//lib/graphql/schema/warden.rb#273 def visible_type_membership?(type_membership, _ctx = T.unsafe(nil)); end private @@ -12469,35 +12654,35 @@ class GraphQL::Schema::Warden # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#327 + # source://graphql//lib/graphql/schema/warden.rb#333 def field_on_visible_interface?(field_defn, type_defn); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#368 + # source://graphql//lib/graphql/schema/warden.rb#371 def orphan_type?(type_defn); end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#391 + # source://graphql//lib/graphql/schema/warden.rb#385 def reachable_type_set; end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#387 + # source://graphql//lib/graphql/schema/warden.rb#379 def read_through; end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#359 + # source://graphql//lib/graphql/schema/warden.rb#365 def referenced?(type_defn); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#353 + # source://graphql//lib/graphql/schema/warden.rb#359 def root_type?(type_defn); end # We need this to tell whether a field was inherited by an interface @@ -12505,42 +12690,35 @@ class GraphQL::Schema::Warden # # @api private # - # source://graphql//lib/graphql/schema/warden.rb#319 + # source://graphql//lib/graphql/schema/warden.rb#325 def unfiltered_interfaces(type_defn); end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#312 + # source://graphql//lib/graphql/schema/warden.rb#318 def union_memberships(obj_type); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#383 + # source://graphql//lib/graphql/schema/warden.rb#375 def visible?(member); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#372 - def visible_abstract_type?(type_defn); end - - # @api private - # @return [Boolean] - # - # source://graphql//lib/graphql/schema/warden.rb#295 + # source://graphql//lib/graphql/schema/warden.rb#286 def visible_and_reachable_type?(type_defn); end # @api private - # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#379 - def visible_possible_types?(type_defn); end + # source://graphql//lib/graphql/schema/warden.rb#423 + def visit_type(type, unvisited_types, visited_type_set, type_by_name_hash, included_interface_possible_types_set, include_interface_possible_types:); end class << self # @api private # - # source://graphql//lib/graphql/schema/warden.rb#40 + # source://graphql//lib/graphql/schema/warden.rb#15 def from_context(context); end # @api private @@ -12551,125 +12729,126 @@ class GraphQL::Schema::Warden # @return [Object] `entry` or one of `entry`'s items if exactly one of them is visible for this context # @return [nil] If neither `entry` nor any of `entry`'s items are visible for this context # - # source://graphql//lib/graphql/schema/warden.rb#53 + # source://graphql//lib/graphql/schema/warden.rb#28 def visible_entry?(visibility_method, entry, context, warden = T.unsafe(nil)); end end end # @api private # -# source://graphql//lib/graphql/schema/warden.rb#366 -GraphQL::Schema::Warden::NO_REFERENCES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://graphql//lib/graphql/schema/warden.rb#91 +# source://graphql//lib/graphql/schema/warden.rb#67 class GraphQL::Schema::Warden::NullWarden # @api private # @return [NullWarden] a new instance of NullWarden # - # source://graphql//lib/graphql/schema/warden.rb#92 + # source://graphql//lib/graphql/schema/warden.rb#68 def initialize(_filter = T.unsafe(nil), context:, schema:); end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#103 + # source://graphql//lib/graphql/schema/warden.rb#79 def arguments(argument_owner, ctx = T.unsafe(nil)); end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#108 + # source://graphql//lib/graphql/schema/warden.rb#84 def directives; end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#104 + # source://graphql//lib/graphql/schema/warden.rb#80 def enum_values(enum_defn); end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#109 + # source://graphql//lib/graphql/schema/warden.rb#85 def fields(type_defn); end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#105 + # source://graphql//lib/graphql/schema/warden.rb#81 def get_argument(parent_type, argument_name); end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#110 + # source://graphql//lib/graphql/schema/warden.rb#86 def get_field(parent_type, field_name); end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#102 + # source://graphql//lib/graphql/schema/warden.rb#78 def get_type(type_name); end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#101 + # source://graphql//lib/graphql/schema/warden.rb#77 def interface_type_memberships(obj_type, _ctx = T.unsafe(nil)); end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#114 + # source://graphql//lib/graphql/schema/warden.rb#91 def interfaces(obj_type); end + # @api private + # @return [Boolean] + # + # source://graphql//lib/graphql/schema/warden.rb#88 + def loadable?(type, _ctx); end + # @api private # - # source://graphql//lib/graphql/schema/warden.rb#113 + # source://graphql//lib/graphql/schema/warden.rb#90 def possible_types(type_defn); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#111 + # source://graphql//lib/graphql/schema/warden.rb#87 def reachable_type?(type_name); end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#112 + # source://graphql//lib/graphql/schema/warden.rb#89 def reachable_types; end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#107 + # source://graphql//lib/graphql/schema/warden.rb#83 def root_type_for_operation(op_name); end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#106 + # source://graphql//lib/graphql/schema/warden.rb#82 def types; end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#97 + # source://graphql//lib/graphql/schema/warden.rb#73 def visible_argument?(arg_defn, _ctx = T.unsafe(nil)); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#99 + # source://graphql//lib/graphql/schema/warden.rb#75 def visible_enum_value?(enum_value, _ctx = T.unsafe(nil)); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#96 + # source://graphql//lib/graphql/schema/warden.rb#72 def visible_field?(field_defn, _ctx = T.unsafe(nil), owner = T.unsafe(nil)); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#98 + # source://graphql//lib/graphql/schema/warden.rb#74 def visible_type?(type_defn, _ctx = T.unsafe(nil)); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#100 + # source://graphql//lib/graphql/schema/warden.rb#76 def visible_type_membership?(type_membership, _ctx = T.unsafe(nil)); end end @@ -12680,47 +12859,53 @@ end # # @api private # -# source://graphql//lib/graphql/schema/warden.rb#79 +# source://graphql//lib/graphql/schema/warden.rb#54 class GraphQL::Schema::Warden::PassThruWarden class << self # @api private # - # source://graphql//lib/graphql/schema/warden.rb#87 + # source://graphql//lib/graphql/schema/warden.rb#62 def arguments(owner, ctx); end # @api private # - # source://graphql//lib/graphql/schema/warden.rb#86 + # source://graphql//lib/graphql/schema/warden.rb#61 def interface_type_memberships(obj_t, ctx); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#82 + # source://graphql//lib/graphql/schema/warden.rb#63 + def loadable?(type, ctx); end + + # @api private + # @return [Boolean] + # + # source://graphql//lib/graphql/schema/warden.rb#57 def visible_argument?(arg, ctx); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#84 + # source://graphql//lib/graphql/schema/warden.rb#59 def visible_enum_value?(ev, ctx); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#81 + # source://graphql//lib/graphql/schema/warden.rb#56 def visible_field?(field, ctx); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#83 + # source://graphql//lib/graphql/schema/warden.rb#58 def visible_type?(type, ctx); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema/warden.rb#85 + # source://graphql//lib/graphql/schema/warden.rb#60 def visible_type_membership?(tm, ctx); end end end @@ -12751,7 +12936,7 @@ module GraphQL::StaticValidation; end # Default rules for {GraphQL::StaticValidation::Validator} # -# Order is important here. Some validators return {GraphQL::Language::Visitor::SKIP} +# Order is important here. Some validators skip later hooks. # which stops the visit on that node. That way it doesn't try to find fields on types that # don't exist, etc. # @@ -12891,7 +13076,7 @@ class GraphQL::StaticValidation::ArgumentsAreDefinedError < ::GraphQL::StaticVal end # source://graphql//lib/graphql/static_validation/base_visitor.rb#4 -class GraphQL::StaticValidation::BaseVisitor < ::GraphQL::Language::Visitor +class GraphQL::StaticValidation::BaseVisitor < ::GraphQL::Language::StaticVisitor # @return [BaseVisitor] a new instance of BaseVisitor # # source://graphql//lib/graphql/static_validation/base_visitor.rb#5 @@ -13074,13 +13259,13 @@ class GraphQL::StaticValidation::DefinitionDependencies::NodeWithPath # source://graphql//lib/graphql/static_validation/definition_dependencies.rb#101 def initialize(node, path); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def eql?(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def hash(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def name(*args, **_arg1, &block); end # Returns the value of attribute node. @@ -13865,7 +14050,7 @@ class GraphQL::StaticValidation::LiteralValidator # source://graphql//lib/graphql/static_validation/literal_validator.rb#97 def constant_scalar?(ast_value); end - # source://graphql//lib/graphql/static_validation/literal_validator.rb#144 + # source://graphql//lib/graphql/static_validation/literal_validator.rb#143 def ensure_array(value); end # When `error_bubbling` is false, we want to bail on the first failure that we find. @@ -13874,10 +14059,10 @@ class GraphQL::StaticValidation::LiteralValidator # source://graphql//lib/graphql/static_validation/literal_validator.rb#86 def maybe_raise_if_invalid(ast_value); end - # source://graphql//lib/graphql/static_validation/literal_validator.rb#148 + # source://graphql//lib/graphql/static_validation/literal_validator.rb#147 def merge_results(results_list); end - # source://graphql//lib/graphql/static_validation/literal_validator.rb#133 + # source://graphql//lib/graphql/static_validation/literal_validator.rb#132 def present_input_field_values_are_valid(type, ast_node); end # source://graphql//lib/graphql/static_validation/literal_validator.rb#34 @@ -14098,316 +14283,93 @@ class GraphQL::StaticValidation::RequiredArgumentsArePresentError < ::GraphQL::S # Returns the value of attribute arguments. # # source://graphql//lib/graphql/static_validation/rules/required_arguments_are_present_error.rb#7 - def arguments; end - - # Returns the value of attribute class_name. - # - # source://graphql//lib/graphql/static_validation/rules/required_arguments_are_present_error.rb#5 - def class_name; end - - # source://graphql//lib/graphql/static_validation/rules/required_arguments_are_present_error.rb#30 - def code; end - - # Returns the value of attribute name. - # - # source://graphql//lib/graphql/static_validation/rules/required_arguments_are_present_error.rb#6 - def name; end - - # A hash representation of this Message - # - # source://graphql//lib/graphql/static_validation/rules/required_arguments_are_present_error.rb#17 - def to_h; end -end - -# source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb#4 -module GraphQL::StaticValidation::RequiredInputObjectAttributesArePresent - # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb#5 - def on_input_object(node, parent); end - - private - - # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb#14 - def get_parent_type(context, parent); end - - # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb#33 - def validate_input_object(ast_node, context, parent); end -end - -# source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb#4 -class GraphQL::StaticValidation::RequiredInputObjectAttributesArePresentError < ::GraphQL::StaticValidation::Error - # @return [RequiredInputObjectAttributesArePresentError] a new instance of RequiredInputObjectAttributesArePresentError - # - # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb#9 - def initialize(message, path:, nodes:, argument_type:, argument_name:, input_object_type:); end - - # Returns the value of attribute argument_name. - # - # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb#6 - def argument_name; end - - # Returns the value of attribute argument_type. - # - # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb#5 - def argument_type; end - - # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb#30 - def code; end - - # Returns the value of attribute input_object_type. - # - # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb#7 - def input_object_type; end - - # A hash representation of this Message - # - # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb#17 - def to_h; end -end - -# source://graphql//lib/graphql/static_validation/rules/subscription_root_exists.rb#4 -module GraphQL::StaticValidation::SubscriptionRootExists - # source://graphql//lib/graphql/static_validation/rules/subscription_root_exists.rb#5 - def on_operation_definition(node, _parent); end -end - -# source://graphql//lib/graphql/static_validation/rules/subscription_root_exists_error.rb#4 -class GraphQL::StaticValidation::SubscriptionRootExistsError < ::GraphQL::StaticValidation::Error - # @return [SubscriptionRootExistsError] a new instance of SubscriptionRootExistsError - # - # source://graphql//lib/graphql/static_validation/rules/subscription_root_exists_error.rb#6 - def initialize(message, path: T.unsafe(nil), nodes: T.unsafe(nil)); end - - # source://graphql//lib/graphql/static_validation/rules/subscription_root_exists_error.rb#21 - def code; end - - # A hash representation of this Message - # - # source://graphql//lib/graphql/static_validation/rules/subscription_root_exists_error.rb#11 - def to_h; end -end - -# - Ride along with `GraphQL::Language::Visitor` -# - Track type info, expose it to validators -# -# source://graphql//lib/graphql/static_validation/type_stack.rb#6 -class GraphQL::StaticValidation::TypeStack - # @param schema [GraphQL::Schema] the schema whose types to use when climbing this document - # @param visitor [GraphQL::Language::Visitor] a visitor to follow & watch the types - # @return [TypeStack] a new instance of TypeStack - # - # source://graphql//lib/graphql/static_validation/type_stack.rb#38 - def initialize(schema, visitor); end - - # @return [Array] arguments which have been entered - # - # source://graphql//lib/graphql/static_validation/type_stack.rb#31 - def argument_definitions; end - - # Directives are pushed on, then popped off while traversing the tree - # - # @return [Array] directives which have been entered - # - # source://graphql//lib/graphql/static_validation/type_stack.rb#28 - def directive_definitions; end - - # When it enters a field, it's pushed on this stack (useful for nested fields, args). - # When it exits, it's popped off. - # - # @return [Array] fields which have been entered - # - # source://graphql//lib/graphql/static_validation/type_stack.rb#24 - def field_definitions; end - - # When it enters an object (starting with query or mutation root), it's pushed on this stack. - # When it exits, it's popped off. - # - # @return [Array] - # - # source://graphql//lib/graphql/static_validation/type_stack.rb#19 - def object_types; end - - # @return [Array] fields which have been entered (by their AST name) - # - # source://graphql//lib/graphql/static_validation/type_stack.rb#34 - def path; end - - # @return [GraphQL::Schema] the schema whose types are present in this document - # - # source://graphql//lib/graphql/static_validation/type_stack.rb#14 - def schema; end -end - -# source://graphql//lib/graphql/static_validation/type_stack.rb#142 -module GraphQL::StaticValidation::TypeStack::ArgumentStrategy - private - - # source://graphql//lib/graphql/static_validation/type_stack.rb#166 - def pop(stack, node); end - - # Push `argument_defn` onto the stack. - # It's possible that `argument_defn` will be nil. - # Push it anyways so `pop` has something to pop. - # - # source://graphql//lib/graphql/static_validation/type_stack.rb#147 - def push(stack, node); end - - class << self - # source://graphql//lib/graphql/static_validation/type_stack.rb#166 - def pop(stack, node); end - - # Push `argument_defn` onto the stack. - # It's possible that `argument_defn` will be nil. - # Push it anyways so `pop` has something to pop. - # - # source://graphql//lib/graphql/static_validation/type_stack.rb#147 - def push(stack, node); end - end -end - -# source://graphql//lib/graphql/static_validation/type_stack.rb#130 -module GraphQL::StaticValidation::TypeStack::DirectiveStrategy - private - - # source://graphql//lib/graphql/static_validation/type_stack.rb#137 - def pop(stack, node); end - - # source://graphql//lib/graphql/static_validation/type_stack.rb#132 - def push(stack, node); end - - class << self - # source://graphql//lib/graphql/static_validation/type_stack.rb#137 - def pop(stack, node); end - - # source://graphql//lib/graphql/static_validation/type_stack.rb#132 - def push(stack, node); end - end -end - -# source://graphql//lib/graphql/static_validation/type_stack.rb#193 -class GraphQL::StaticValidation::TypeStack::EnterWithStrategy - # @return [EnterWithStrategy] a new instance of EnterWithStrategy - # - # source://graphql//lib/graphql/static_validation/type_stack.rb#194 - def initialize(stack, strategy); end - - # source://graphql//lib/graphql/static_validation/type_stack.rb#199 - def call(node, parent); end -end - -# source://graphql//lib/graphql/static_validation/type_stack.rb#106 -module GraphQL::StaticValidation::TypeStack::FieldStrategy - private - - # source://graphql//lib/graphql/static_validation/type_stack.rb#123 - def pop(stack, node); end - - # source://graphql//lib/graphql/static_validation/type_stack.rb#108 - def push(stack, node); end - - class << self - # source://graphql//lib/graphql/static_validation/type_stack.rb#123 - def pop(stack, node); end - - # source://graphql//lib/graphql/static_validation/type_stack.rb#108 - def push(stack, node); end - end -end - -# source://graphql//lib/graphql/static_validation/type_stack.rb#75 -module GraphQL::StaticValidation::TypeStack::FragmentDefinitionStrategy - extend ::GraphQL::StaticValidation::TypeStack::FragmentWithTypeStrategy - - private - - # source://graphql//lib/graphql/static_validation/type_stack.rb#78 - def push_path_member(stack, node); end - - class << self - # source://graphql//lib/graphql/static_validation/type_stack.rb#78 - def push_path_member(stack, node); end - end -end - -# source://graphql//lib/graphql/static_validation/type_stack.rb#172 -module GraphQL::StaticValidation::TypeStack::FragmentSpreadStrategy - private - - # source://graphql//lib/graphql/static_validation/type_stack.rb#178 - def pop(stack, node); end - - # source://graphql//lib/graphql/static_validation/type_stack.rb#174 - def push(stack, node); end + def arguments; end - class << self - # source://graphql//lib/graphql/static_validation/type_stack.rb#178 - def pop(stack, node); end + # Returns the value of attribute class_name. + # + # source://graphql//lib/graphql/static_validation/rules/required_arguments_are_present_error.rb#5 + def class_name; end - # source://graphql//lib/graphql/static_validation/type_stack.rb#174 - def push(stack, node); end - end -end + # source://graphql//lib/graphql/static_validation/rules/required_arguments_are_present_error.rb#30 + def code; end -# source://graphql//lib/graphql/static_validation/type_stack.rb#55 -module GraphQL::StaticValidation::TypeStack::FragmentWithTypeStrategy - # source://graphql//lib/graphql/static_validation/type_stack.rb#69 - def pop(stack, node); end + # Returns the value of attribute name. + # + # source://graphql//lib/graphql/static_validation/rules/required_arguments_are_present_error.rb#6 + def name; end - # source://graphql//lib/graphql/static_validation/type_stack.rb#56 - def push(stack, node); end + # A hash representation of this Message + # + # source://graphql//lib/graphql/static_validation/rules/required_arguments_are_present_error.rb#17 + def to_h; end end -# source://graphql//lib/graphql/static_validation/type_stack.rb#83 -module GraphQL::StaticValidation::TypeStack::InlineFragmentStrategy - extend ::GraphQL::StaticValidation::TypeStack::FragmentWithTypeStrategy +# source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb#4 +module GraphQL::StaticValidation::RequiredInputObjectAttributesArePresent + # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb#5 + def on_input_object(node, parent); end private - # source://graphql//lib/graphql/static_validation/type_stack.rb#86 - def push_path_member(stack, node); end + # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb#14 + def get_parent_type(context, parent); end - class << self - # source://graphql//lib/graphql/static_validation/type_stack.rb#86 - def push_path_member(stack, node); end - end + # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb#33 + def validate_input_object(ast_node, context, parent); end end -# source://graphql//lib/graphql/static_validation/type_stack.rb#204 -class GraphQL::StaticValidation::TypeStack::LeaveWithStrategy - # @return [LeaveWithStrategy] a new instance of LeaveWithStrategy +# source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb#4 +class GraphQL::StaticValidation::RequiredInputObjectAttributesArePresentError < ::GraphQL::StaticValidation::Error + # @return [RequiredInputObjectAttributesArePresentError] a new instance of RequiredInputObjectAttributesArePresentError # - # source://graphql//lib/graphql/static_validation/type_stack.rb#205 - def initialize(stack, strategy); end + # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb#9 + def initialize(message, path:, nodes:, argument_type:, argument_name:, input_object_type:); end - # source://graphql//lib/graphql/static_validation/type_stack.rb#210 - def call(node, parent); end -end + # Returns the value of attribute argument_name. + # + # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb#6 + def argument_name; end -# source://graphql//lib/graphql/static_validation/type_stack.rb#91 -module GraphQL::StaticValidation::TypeStack::OperationDefinitionStrategy - private + # Returns the value of attribute argument_type. + # + # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb#5 + def argument_type; end - # source://graphql//lib/graphql/static_validation/type_stack.rb#100 - def pop(stack, node); end + # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb#30 + def code; end - # source://graphql//lib/graphql/static_validation/type_stack.rb#93 - def push(stack, node); end + # Returns the value of attribute input_object_type. + # + # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb#7 + def input_object_type; end - class << self - # source://graphql//lib/graphql/static_validation/type_stack.rb#100 - def pop(stack, node); end + # A hash representation of this Message + # + # source://graphql//lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb#17 + def to_h; end +end - # source://graphql//lib/graphql/static_validation/type_stack.rb#93 - def push(stack, node); end - end +# source://graphql//lib/graphql/static_validation/rules/subscription_root_exists.rb#4 +module GraphQL::StaticValidation::SubscriptionRootExists + # source://graphql//lib/graphql/static_validation/rules/subscription_root_exists.rb#5 + def on_operation_definition(node, _parent); end end -# source://graphql//lib/graphql/static_validation/type_stack.rb#183 -GraphQL::StaticValidation::TypeStack::PUSH_STRATEGIES = T.let(T.unsafe(nil), Hash) +# source://graphql//lib/graphql/static_validation/rules/subscription_root_exists_error.rb#4 +class GraphQL::StaticValidation::SubscriptionRootExistsError < ::GraphQL::StaticValidation::Error + # @return [SubscriptionRootExistsError] a new instance of SubscriptionRootExistsError + # + # source://graphql//lib/graphql/static_validation/rules/subscription_root_exists_error.rb#6 + def initialize(message, path: T.unsafe(nil), nodes: T.unsafe(nil)); end + + # source://graphql//lib/graphql/static_validation/rules/subscription_root_exists_error.rb#21 + def code; end -# These are jumping-off points for infering types down the tree -# -# source://graphql//lib/graphql/static_validation/type_stack.rb#8 -GraphQL::StaticValidation::TypeStack::TYPE_INFERRENCE_ROOTS = T.let(T.unsafe(nil), Array) + # A hash representation of this Message + # + # source://graphql//lib/graphql/static_validation/rules/subscription_root_exists_error.rb#11 + def to_h; end +end # source://graphql//lib/graphql/static_validation/rules/unique_directives_per_location.rb#4 module GraphQL::StaticValidation::UniqueDirectivesPerLocation @@ -14491,47 +14453,44 @@ end # # It holds a list of errors which each validator may add to. # -# It also provides limited access to the {TypeStack} instance, -# which tracks state as you climb in and out of different fields. -# -# source://graphql//lib/graphql/static_validation/validation_context.rb#14 +# source://graphql//lib/graphql/static_validation/validation_context.rb#11 class GraphQL::StaticValidation::ValidationContext extend ::Forwardable # @return [ValidationContext] a new instance of ValidationContext # - # source://graphql//lib/graphql/static_validation/validation_context.rb#23 + # source://graphql//lib/graphql/static_validation/validation_context.rb#21 def initialize(query, visitor_class, max_errors); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def argument_definition(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def dependencies(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def directive_definition(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def document(*args, **_arg1, &block); end # Returns the value of attribute errors. # - # source://graphql//lib/graphql/static_validation/validation_context.rb#17 + # source://graphql//lib/graphql/static_validation/validation_context.rb#14 def errors; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def field_definition(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def fragments(*args, **_arg1, &block); end # Returns the value of attribute max_errors. # - # source://graphql//lib/graphql/static_validation/validation_context.rb#17 + # source://graphql//lib/graphql/static_validation/validation_context.rb#14 def max_errors; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def object_types(*args, **_arg1, &block); end # source://graphql//lib/graphql/static_validation/validation_context.rb#36 @@ -14539,25 +14498,27 @@ class GraphQL::StaticValidation::ValidationContext # Returns the value of attribute on_dependency_resolve_handlers. # - # source://graphql//lib/graphql/static_validation/validation_context.rb#17 + # source://graphql//lib/graphql/static_validation/validation_context.rb#14 def on_dependency_resolve_handlers; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def operations(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def parent_type_definition(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def path(*args, **_arg1, &block); end # Returns the value of attribute query. # - # source://graphql//lib/graphql/static_validation/validation_context.rb#17 + # source://graphql//lib/graphql/static_validation/validation_context.rb#14 def query; end - # source://forwardable/1.3.2/forwardable.rb#229 - def schema(*args, **_arg1, &block); end + # Returns the value of attribute schema. + # + # source://graphql//lib/graphql/static_validation/validation_context.rb#14 + def schema; end # source://graphql//lib/graphql/static_validation/validation_context.rb#48 def schema_directives; end @@ -14567,7 +14528,7 @@ class GraphQL::StaticValidation::ValidationContext # source://graphql//lib/graphql/static_validation/validation_context.rb#44 def too_many_errors?; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def type_definition(*args, **_arg1, &block); end # source://graphql//lib/graphql/static_validation/validation_context.rb#40 @@ -14575,11 +14536,13 @@ class GraphQL::StaticValidation::ValidationContext # Returns the value of attribute visitor. # - # source://graphql//lib/graphql/static_validation/validation_context.rb#17 + # source://graphql//lib/graphql/static_validation/validation_context.rb#14 def visitor; end - # source://forwardable/1.3.2/forwardable.rb#229 - def warden(*args, **_arg1, &block); end + # Returns the value of attribute warden. + # + # source://graphql//lib/graphql/static_validation/validation_context.rb#14 + def warden; end end # source://graphql//lib/graphql/static_validation/validation_timeout_error.rb#4 @@ -14621,7 +14584,7 @@ class GraphQL::StaticValidation::Validator # @param query [GraphQL::Query] # @param context [GraphQL::StaticValidation::ValidationContext] # - # source://graphql//lib/graphql/static_validation/validator.rb#67 + # source://graphql//lib/graphql/static_validation/validator.rb#70 def handle_timeout(query, context); end # Validate `query` against the schema. Returns an array of message hashes. @@ -14983,22 +14946,22 @@ class GraphQL::Subscriptions # @param validate_update [Boolean] If false, then validation is skipped when executing updates # @return [Subscriptions] a new instance of Subscriptions # - # source://graphql//lib/graphql/subscriptions.rb#43 + # source://graphql//lib/graphql/subscriptions.rb#40 def initialize(schema:, validate_update: T.unsafe(nil), broadcast: T.unsafe(nil), default_broadcastable: T.unsafe(nil), **rest); end # @return [Boolean] if true, then a query like this one would be broadcasted # - # source://graphql//lib/graphql/subscriptions.rb#231 + # source://graphql//lib/graphql/subscriptions.rb#233 def broadcastable?(query_str, **query_options); end # @return [String] A new unique identifier for a subscription # - # source://graphql//lib/graphql/subscriptions.rb#214 + # source://graphql//lib/graphql/subscriptions.rb#216 def build_id; end # @return [Boolean] Used when fields don't have `broadcastable:` explicitly set # - # source://graphql//lib/graphql/subscriptions.rb#53 + # source://graphql//lib/graphql/subscriptions.rb#50 def default_broadcastable; end # A subscription was terminated server-side. @@ -15008,7 +14971,7 @@ class GraphQL::Subscriptions # @raise [GraphQL::RequiredImplementationMissingError] # @return void. # - # source://graphql//lib/graphql/subscriptions.rb#209 + # source://graphql//lib/graphql/subscriptions.rb#211 def delete_subscription(subscription_id); end # A subscription query was re-evaluated, returning `result`. @@ -15019,7 +14982,7 @@ class GraphQL::Subscriptions # @raise [GraphQL::RequiredImplementationMissingError] # @return [void] # - # source://graphql//lib/graphql/subscriptions.rb#192 + # source://graphql//lib/graphql/subscriptions.rb#194 def deliver(subscription_id, result); end # Run the update query for this subscription and deliver it @@ -15028,7 +14991,7 @@ class GraphQL::Subscriptions # @see {#execute_update} # @see {#deliver} # - # source://graphql//lib/graphql/subscriptions.rb#163 + # source://graphql//lib/graphql/subscriptions.rb#158 def execute(subscription_id, event, object); end # Event `event` occurred on `object`, @@ -15039,7 +15002,7 @@ class GraphQL::Subscriptions # @raise [GraphQL::RequiredImplementationMissingError] # @return [void] # - # source://graphql//lib/graphql/subscriptions.rb#175 + # source://graphql//lib/graphql/subscriptions.rb#177 def execute_all(event, object); end # `event` was triggered on `object`, and `subscription_id` was subscribed, @@ -15052,7 +15015,7 @@ class GraphQL::Subscriptions # @param object [Object] The value for the subscription field # @return [GraphQL::Query::Result] # - # source://graphql//lib/graphql/subscriptions.rb#107 + # source://graphql//lib/graphql/subscriptions.rb#104 def execute_update(subscription_id, event, object); end # Convert a user-provided event name or argument @@ -15064,7 +15027,7 @@ class GraphQL::Subscriptions # @param event_or_arg_name [String, Symbol] # @return [String] # - # source://graphql//lib/graphql/subscriptions.rb#226 + # source://graphql//lib/graphql/subscriptions.rb#228 def normalize_name(event_or_arg_name); end # The system wants to send an update to this subscription. @@ -15074,7 +15037,7 @@ class GraphQL::Subscriptions # @raise [GraphQL::RequiredImplementationMissingError] # @return [Hash] Containing required keys # - # source://graphql//lib/graphql/subscriptions.rb#183 + # source://graphql//lib/graphql/subscriptions.rb#185 def read_subscription(subscription_id); end # Fetch subscriptions matching this field + arguments pair @@ -15087,7 +15050,7 @@ class GraphQL::Subscriptions # @param context [Hash] # @return [void] # - # source://graphql//lib/graphql/subscriptions.rb#63 + # source://graphql//lib/graphql/subscriptions.rb#60 def trigger(event_name, args, object, scope: T.unsafe(nil), context: T.unsafe(nil)); end # Define this method to customize whether to validate @@ -15095,7 +15058,7 @@ class GraphQL::Subscriptions # # @return [Boolean] defaults to `true`, or false if `validate: false` is provided. # - # source://graphql//lib/graphql/subscriptions.rb#155 + # source://graphql//lib/graphql/subscriptions.rb#150 def validate_update?(query:, context:, root_value:, subscription_topic:, operation_name:, variables:); end # `query` was executed and found subscriptions to `events`. @@ -15106,7 +15069,7 @@ class GraphQL::Subscriptions # @raise [GraphQL::RequiredImplementationMissingError] # @return [void] # - # source://graphql//lib/graphql/subscriptions.rb#201 + # source://graphql//lib/graphql/subscriptions.rb#203 def write_subscription(query, events); end private @@ -15119,13 +15082,13 @@ class GraphQL::Subscriptions # @param args [Hash, Array, Any] some GraphQL input value to coerce as `arg_owner` # @return [Any] normalized arguments value # - # source://graphql//lib/graphql/subscriptions.rb#248 + # source://graphql//lib/graphql/subscriptions.rb#250 def normalize_arguments(event_name, arg_owner, args, context); end class << self # @see {Subscriptions#initialize} for options, concrete implementations may add options. # - # source://graphql//lib/graphql/subscriptions.rb#26 + # source://graphql//lib/graphql/subscriptions.rb#25 def use(defn, options = T.unsafe(nil)); end end end @@ -15163,7 +15126,7 @@ end # } # # result = MySchema.execute( -# query: query, +# query, # context: context, # variables: variables, # operation_name: operation_name @@ -15220,7 +15183,7 @@ class GraphQL::Subscriptions::ActionCableSubscriptions < ::GraphQL::Subscription # The channel was closed, forget about it. # - # source://graphql//lib/graphql/subscriptions/action_cable_subscriptions.rb#223 + # source://graphql//lib/graphql/subscriptions/action_cable_subscriptions.rb#224 def delete_subscription(subscription_id); end # This subscription was re-evaluated. @@ -15241,12 +15204,12 @@ class GraphQL::Subscriptions::ActionCableSubscriptions < ::GraphQL::Subscription # @param message [String] n ActionCable-broadcasted string (JSON) # @param context [GraphQL::Query::Context] the context of the first event for a given subscription fingerprint # - # source://graphql//lib/graphql/subscriptions/action_cable_subscriptions.rb#196 + # source://graphql//lib/graphql/subscriptions/action_cable_subscriptions.rb#197 def load_action_cable_message(message, context); end # Return the query from "storage" (in memory) # - # source://graphql//lib/graphql/subscriptions/action_cable_subscriptions.rb#205 + # source://graphql//lib/graphql/subscriptions/action_cable_subscriptions.rb#206 def read_subscription(subscription_id); end # Every subscribing channel is listening here, but only one of them takes any action. @@ -15260,7 +15223,7 @@ class GraphQL::Subscriptions::ActionCableSubscriptions < ::GraphQL::Subscription # let the listener belonging to the first event on the list be # the one to build and publish payloads. # - # source://graphql//lib/graphql/subscriptions/action_cable_subscriptions.rb#166 + # source://graphql//lib/graphql/subscriptions/action_cable_subscriptions.rb#167 def setup_stream(channel, initial_event); end # A query was run where these events were subscribed to. @@ -15268,15 +15231,15 @@ class GraphQL::Subscriptions::ActionCableSubscriptions < ::GraphQL::Subscription # It will receive notifications when events come in # and re-evaluate the query locally. # - # source://graphql//lib/graphql/subscriptions/action_cable_subscriptions.rb#135 + # source://graphql//lib/graphql/subscriptions/action_cable_subscriptions.rb#136 def write_subscription(query, events); end private - # source://graphql//lib/graphql/subscriptions/action_cable_subscriptions.rb#248 + # source://graphql//lib/graphql/subscriptions/action_cable_subscriptions.rb#249 def stream_event_name(event); end - # source://graphql//lib/graphql/subscriptions/action_cable_subscriptions.rb#244 + # source://graphql//lib/graphql/subscriptions/action_cable_subscriptions.rb#245 def stream_subscription_name(subscription_id); end end @@ -15407,7 +15370,7 @@ class GraphQL::Subscriptions::Event # source://graphql//lib/graphql/subscriptions/event.rb#68 def deep_sort_hash_keys(hash_to_sort); end - # source://graphql//lib/graphql/subscriptions/event.rb#133 + # source://graphql//lib/graphql/subscriptions/event.rb#139 def get_arg_definition(arg_owner, arg_name, context); end # source://graphql//lib/graphql/subscriptions/event.rb#94 @@ -15415,33 +15378,11 @@ class GraphQL::Subscriptions::Event end end -# Wrap the root fields of the subscription type with special logic for: -# - Registering the subscription during the first execution -# - Evaluating the triggered portion(s) of the subscription during later execution -# -# source://graphql//lib/graphql/subscriptions/instrumentation.rb#7 -class GraphQL::Subscriptions::Instrumentation - # @return [Instrumentation] a new instance of Instrumentation - # - # source://graphql//lib/graphql/subscriptions/instrumentation.rb#8 - def initialize(schema:); end - - # After checking the root fields, pass the gathered events to the store - # - # source://graphql//lib/graphql/subscriptions/instrumentation.rb#20 - def after_query(query); end - - # If needed, prepare to gather events which this query subscribes to - # - # source://graphql//lib/graphql/subscriptions/instrumentation.rb#13 - def before_query(query); end -end - # Raised when either: # - the triggered `event_name` doesn't match a field in the schema; or # - one or more arguments don't match the field arguments # -# source://graphql//lib/graphql/subscriptions.rb#15 +# source://graphql//lib/graphql/subscriptions.rb#14 class GraphQL::Subscriptions::InvalidTriggerError < ::GraphQL::Error; end # Serialization helpers for passing subscription data around. @@ -15556,9 +15497,93 @@ GraphQL::Subscriptions::Serialize::TIMESTAMP_KEY = T.let(T.unsafe(nil), String) # - Or, an update didn't pass `.trigger(..., scope:)` # When raised, the initial subscription or update fails completely. # -# source://graphql//lib/graphql/subscriptions.rb#22 +# source://graphql//lib/graphql/subscriptions.rb#21 class GraphQL::Subscriptions::SubscriptionScopeMissingError < ::GraphQL::Error; end +# source://graphql//lib/graphql/testing/helpers.rb#3 +module GraphQL::Testing; end + +# source://graphql//lib/graphql/testing/helpers.rb#4 +module GraphQL::Testing::Helpers + # source://graphql//lib/graphql/testing/helpers.rb#42 + def run_graphql_field(schema, field_path, object, arguments: T.unsafe(nil), context: T.unsafe(nil)); end + + # @yield [resolution_context] + # + # source://graphql//lib/graphql/testing/helpers.rb#78 + def with_resolution_context(schema, type:, object:, context: T.unsafe(nil)); end + + class << self + # @param schema_class [Class] + # @return [Module] A helpers module which always uses the given schema + # + # source://graphql//lib/graphql/testing/helpers.rb#7 + def for(schema_class); end + end +end + +# source://graphql//lib/graphql/testing/helpers.rb#11 +class GraphQL::Testing::Helpers::Error < ::GraphQL::Error; end + +# source://graphql//lib/graphql/testing/helpers.rb#35 +class GraphQL::Testing::Helpers::FieldNotDefinedError < ::GraphQL::Testing::Helpers::Error + # @return [FieldNotDefinedError] a new instance of FieldNotDefinedError + # + # source://graphql//lib/graphql/testing/helpers.rb#36 + def initialize(type_name:, field_name:); end +end + +# source://graphql//lib/graphql/testing/helpers.rb#21 +class GraphQL::Testing::Helpers::FieldNotVisibleError < ::GraphQL::Testing::Helpers::Error + # @return [FieldNotVisibleError] a new instance of FieldNotVisibleError + # + # source://graphql//lib/graphql/testing/helpers.rb#22 + def initialize(type_name:, field_name:); end +end + +# source://graphql//lib/graphql/testing/helpers.rb#89 +class GraphQL::Testing::Helpers::ResolutionAssertionContext + # @return [ResolutionAssertionContext] a new instance of ResolutionAssertionContext + # + # source://graphql//lib/graphql/testing/helpers.rb#90 + def initialize(test, type_name:, object:, schema:, context:); end + + # source://graphql//lib/graphql/testing/helpers.rb#99 + def run_graphql_field(field_name, arguments: T.unsafe(nil)); end +end + +# source://graphql//lib/graphql/testing/helpers.rb#108 +module GraphQL::Testing::Helpers::SchemaHelpers + include ::GraphQL::Testing::Helpers + + # source://graphql//lib/graphql/testing/helpers.rb#111 + def run_graphql_field(field_path, object, arguments: T.unsafe(nil), context: T.unsafe(nil)); end + + # source://graphql//lib/graphql/testing/helpers.rb#115 + def with_resolution_context(*args, **kwargs, &block); end + + class << self + # source://graphql//lib/graphql/testing/helpers.rb#120 + def for(schema_class); end + end +end + +# source://graphql//lib/graphql/testing/helpers.rb#28 +class GraphQL::Testing::Helpers::TypeNotDefinedError < ::GraphQL::Testing::Helpers::Error + # @return [TypeNotDefinedError] a new instance of TypeNotDefinedError + # + # source://graphql//lib/graphql/testing/helpers.rb#29 + def initialize(type_name:); end +end + +# source://graphql//lib/graphql/testing/helpers.rb#14 +class GraphQL::Testing::Helpers::TypeNotVisibleError < ::GraphQL::Testing::Helpers::Error + # @return [TypeNotVisibleError] a new instance of TypeNotVisibleError + # + # source://graphql//lib/graphql/testing/helpers.rb#15 + def initialize(type_name:); end +end + # source://graphql//lib/graphql/tracing/trace.rb#3 module GraphQL::Tracing; end @@ -15736,7 +15761,7 @@ GraphQL::Tracing::AppOpticsTrace::PREP_KEYS = T.let(T.unsafe(nil), Array) # AppOpticsAPM::Config[:graphql][:sanitize_query] = true|false # AppOpticsAPM::Config[:graphql][:remove_comments] = true|false # -# source://graphql//lib/graphql/tracing/appoptics_tracing.rb#18 +# source://graphql//lib/graphql/tracing/appoptics_tracing.rb#17 class GraphQL::Tracing::AppOpticsTracing < ::GraphQL::Tracing::PlatformTracing # source://graphql//lib/graphql/tracing/appoptics_tracing.rb#61 def platform_authorized_key(type); end @@ -15960,52 +15985,53 @@ end module GraphQL::Tracing::DataDogTrace include ::GraphQL::Tracing::PlatformTrace + # @param tracer [#trace] Deprecated # @param analytics_enabled [Boolean] Deprecated # @param analytics_sample_rate [Float] Deprecated # - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#8 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#9 def initialize(tracer: T.unsafe(nil), analytics_enabled: T.unsafe(nil), analytics_sample_rate: T.unsafe(nil), service: T.unsafe(nil), **rest); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#35 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#33 def analyze_multiplex(**data); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#35 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#33 def analyze_query(**data); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#120 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#111 def authorized(query:, type:, object:); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#141 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#130 def authorized_lazy(object:, type:, query:); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#126 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#117 def authorized_span(span_key, object, type, query); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#108 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#99 def execute_field(query:, field:, ast_node:, arguments:, object:); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#114 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#105 def execute_field_lazy(query:, field:, ast_node:, arguments:, object:); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#79 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#72 def execute_field_span(span_key, query, field, ast_node, arguments, object); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#35 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#33 def execute_multiplex(**data); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#35 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#33 def execute_query(**data); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#35 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#33 def execute_query_lazy(**data); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#35 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#33 def lex(**data); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#35 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#33 def parse(**data); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#187 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#174 def platform_authorized_key(type); end # Implement this method in a subclass to apply custom tags to datadog spans @@ -16016,22 +16042,22 @@ module GraphQL::Tracing::DataDogTrace # @param data [Hash] The runtime data for this event (@see GraphQL::Tracing for keys for each event) # @param span [Datadog::Tracing::SpanOperation] The datadog span for this event # - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#183 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#170 def platform_field_key(field); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#191 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#178 def platform_resolve_type_key(type); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#147 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#136 def resolve_type(object:, type:, query:); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#153 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#142 def resolve_type_lazy(object:, type:, query:); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#159 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#148 def resolve_type_span(span_key, object, type, query); end - # source://graphql//lib/graphql/tracing/data_dog_trace.rb#35 + # source://graphql//lib/graphql/tracing/data_dog_trace.rb#33 def validate(**data); end end @@ -16046,24 +16072,19 @@ end class GraphQL::Tracing::DataDogTracing < ::GraphQL::Tracing::PlatformTracing # @return [Boolean] # - # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#71 - def analytics_available?; end - - # @return [Boolean] - # - # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#77 + # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#63 def analytics_enabled?; end - # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#82 + # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#68 def analytics_sample_rate; end - # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#91 + # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#77 def platform_authorized_key(type); end - # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#87 + # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#73 def platform_field_key(type, field); end - # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#95 + # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#81 def platform_resolve_type_key(type); end # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#17 @@ -16075,16 +16096,58 @@ class GraphQL::Tracing::DataDogTracing < ::GraphQL::Tracing::PlatformTracing # @param data [Hash] The runtime data for this event (@see GraphQL::Tracing for keys for each event) # @param span [Datadog::Tracing::SpanOperation] The datadog span for this event # - # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#62 + # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#53 def prepare_span(key, data, span); end - # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#54 - def service_name; end - - # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#65 + # source://graphql//lib/graphql/tracing/data_dog_tracing.rb#56 def tracer; end end +# source://graphql//lib/graphql/tracing/legacy_hooks_trace.rb#4 +module GraphQL::Tracing::LegacyHooksTrace + # source://graphql//lib/graphql/tracing/legacy_hooks_trace.rb#5 + def execute_multiplex(multiplex:); end +end + +# source://graphql//lib/graphql/tracing/legacy_hooks_trace.rb#16 +module GraphQL::Tracing::LegacyHooksTrace::RunHooks + private + + # source://graphql//lib/graphql/tracing/legacy_hooks_trace.rb#61 + def call_after_hooks(instrumenters, object, after_hook_name, ex); end + + # Call each before hook, and if they all succeed, yield. + # If they don't all succeed, call after_ for each one that succeeded. + # + # source://graphql//lib/graphql/tracing/legacy_hooks_trace.rb#36 + def call_hooks(instrumenters, object, before_hook_name, after_hook_name); end + + # Call the before_ hooks of each query, + # Then yield if no errors. + # `call_hooks` takes care of appropriate cleanup. + # + # source://graphql//lib/graphql/tracing/legacy_hooks_trace.rb#21 + def each_query_call_hooks(instrumenters, queries, i = T.unsafe(nil)); end + + class << self + # source://graphql//lib/graphql/tracing/legacy_hooks_trace.rb#61 + def call_after_hooks(instrumenters, object, after_hook_name, ex); end + + # Call each before hook, and if they all succeed, yield. + # If they don't all succeed, call after_ for each one that succeeded. + # + # source://graphql//lib/graphql/tracing/legacy_hooks_trace.rb#36 + def call_hooks(instrumenters, object, before_hook_name, after_hook_name); end + + # Call the before_ hooks of each query, + # Then yield if no errors. + # `call_hooks` takes care of appropriate cleanup. + # + # source://graphql//lib/graphql/tracing/legacy_hooks_trace.rb#21 + def each_query_call_hooks(instrumenters, queries, i = T.unsafe(nil)); end + end +end + # source://graphql//lib/graphql/tracing/legacy_trace.rb#65 class GraphQL::Tracing::LegacyTrace < ::GraphQL::Tracing::Trace include ::GraphQL::Tracing::CallLegacyTracers @@ -16295,18 +16358,18 @@ GraphQL::Tracing::NotificationsTracing::KEYS = T.let(T.unsafe(nil), Hash) # source://graphql//lib/graphql/tracing/notifications_tracing.rb#28 GraphQL::Tracing::NotificationsTracing::MAX_KEYS_SIZE = T.let(T.unsafe(nil), Integer) -# source://graphql//lib/graphql/tracing.rb#33 +# source://graphql//lib/graphql/tracing.rb#35 GraphQL::Tracing::NullTrace = T.let(T.unsafe(nil), GraphQL::Tracing::Trace) -# source://graphql//lib/graphql/tracing.rb#65 +# source://graphql//lib/graphql/tracing.rb#67 module GraphQL::Tracing::NullTracer private - # source://graphql//lib/graphql/tracing.rb#67 + # source://graphql//lib/graphql/tracing.rb#69 def trace(k, v); end class << self - # source://graphql//lib/graphql/tracing.rb#67 + # source://graphql//lib/graphql/tracing.rb#69 def trace(k, v); end end end @@ -16403,17 +16466,17 @@ class GraphQL::Tracing::PlatformTracing # @param trace_phase [Symbol] The stage of execution being traced (used by OpenTelementry tracing) # @return [String] # - # source://graphql//lib/graphql/tracing/platform_tracing.rb#128 + # source://graphql//lib/graphql/tracing/platform_tracing.rb#130 def cached_platform_key(ctx, key, trace_phase); end # @api private # - # source://graphql//lib/graphql/tracing/platform_tracing.rb#108 + # source://graphql//lib/graphql/tracing/platform_tracing.rb#110 def fallback_transaction_name(context); end # @api private # - # source://graphql//lib/graphql/tracing/platform_tracing.rb#112 + # source://graphql//lib/graphql/tracing/platform_tracing.rb#114 def options; end # Get the transaction name based on the operation type and name if possible, or fall back to a user provided @@ -16421,7 +16484,7 @@ class GraphQL::Tracing::PlatformTracing # # @api private # - # source://graphql//lib/graphql/tracing/platform_tracing.rb#96 + # source://graphql//lib/graphql/tracing/platform_tracing.rb#98 def transaction_name(query); end class << self @@ -16679,6 +16742,102 @@ end # source://graphql//lib/graphql/tracing/scout_tracing.rb#6 GraphQL::Tracing::ScoutTracing::INSTRUMENT_OPTS = T.let(T.unsafe(nil), Hash) +# source://graphql//lib/graphql/tracing/sentry_trace.rb#5 +module GraphQL::Tracing::SentryTrace + include ::GraphQL::Tracing::PlatformTrace + + # @param set_transaction_name [Boolean] If true, the GraphQL operation name will be used as the transaction name. + # This is not advised if you run more than one query per HTTP request, for example, with `graphql-client` or multiplexing. + # It can also be specified per-query with `context[:set_sentry_transaction_name]`. + # + # source://graphql//lib/graphql/tracing/sentry_trace.rb#11 + def initialize(set_transaction_name: T.unsafe(nil), **_rest); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#35 + def analyze_multiplex(**data); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#35 + def analyze_query(**data); end + + # source://graphql//lib/graphql/tracing/platform_trace.rb#72 + def authorized(type:, query:, object:); end + + # source://graphql//lib/graphql/tracing/platform_trace.rb#72 + def authorized_lazy(type:, query:, object:); end + + # source://graphql//lib/graphql/tracing/platform_trace.rb#44 + def execute_field(query:, field:, ast_node:, arguments:, object:); end + + # source://graphql//lib/graphql/tracing/platform_trace.rb#44 + def execute_field_lazy(query:, field:, ast_node:, arguments:, object:); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#35 + def execute_multiplex(**data); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#16 + def execute_query(**data); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#35 + def execute_query_lazy(**data); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#35 + def lex(**data); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#35 + def parse(**data); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#50 + def platform_authorized(platform_key, &block); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#70 + def platform_authorized_key(type); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#54 + def platform_authorized_lazy(platform_key, &block); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#42 + def platform_execute_field(platform_key, &block); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#46 + def platform_execute_field_lazy(platform_key, &block); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#66 + def platform_field_key(field); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#58 + def platform_resolve_type(platform_key, &block); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#74 + def platform_resolve_type_key(type); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#62 + def platform_resolve_type_lazy(platform_key, &block); end + + # source://graphql//lib/graphql/tracing/platform_trace.rb#85 + def resolve_type(query:, type:, object:); end + + # source://graphql//lib/graphql/tracing/platform_trace.rb#85 + def resolve_type_lazy(query:, type:, object:); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#35 + def validate(**data); end + + private + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#80 + def instrument_execution(platform_key, trace_method, data = T.unsafe(nil), &block); end + + # source://graphql//lib/graphql/tracing/sentry_trace.rb#102 + def operation_name(query); end +end + +# source://graphql//lib/graphql/tracing/sentry_trace.rb#0 +class GraphQL::Tracing::SentryTrace::KeyCache + include ::GraphQL::Tracing::PlatformTrace + include ::GraphQL::Tracing::SentryTrace + include ::GraphQL::Tracing::PlatformTrace::BaseKeyCache +end + # source://graphql//lib/graphql/tracing/statsd_trace.rb#5 module GraphQL::Tracing::StatsdTrace include ::GraphQL::Tracing::PlatformTrace @@ -16792,46 +16951,48 @@ class GraphQL::Tracing::Trace # source://graphql//lib/graphql/tracing/trace.rb#13 def initialize(multiplex: T.unsafe(nil), query: T.unsafe(nil), **_options); end - # source://graphql//lib/graphql/tracing/trace.rb#30 + # source://graphql//lib/graphql/tracing/trace.rb#31 def analyze_multiplex(multiplex:); end - # source://graphql//lib/graphql/tracing/trace.rb#34 + # source://graphql//lib/graphql/tracing/trace.rb#35 def analyze_query(query:); end - # source://graphql//lib/graphql/tracing/trace.rb#58 + # source://graphql//lib/graphql/tracing/trace.rb#59 def authorized(query:, type:, object:); end - # source://graphql//lib/graphql/tracing/trace.rb#62 + # source://graphql//lib/graphql/tracing/trace.rb#63 def authorized_lazy(query:, type:, object:); end - # source://graphql//lib/graphql/tracing/trace.rb#50 + # source://graphql//lib/graphql/tracing/trace.rb#51 def execute_field(field:, query:, ast_node:, arguments:, object:); end - # source://graphql//lib/graphql/tracing/trace.rb#54 + # source://graphql//lib/graphql/tracing/trace.rb#55 def execute_field_lazy(field:, query:, ast_node:, arguments:, object:); end - # source://graphql//lib/graphql/tracing/trace.rb#38 + # source://graphql//lib/graphql/tracing/trace.rb#39 def execute_multiplex(multiplex:); end - # source://graphql//lib/graphql/tracing/trace.rb#42 + # source://graphql//lib/graphql/tracing/trace.rb#43 def execute_query(query:); end - # source://graphql//lib/graphql/tracing/trace.rb#46 + # source://graphql//lib/graphql/tracing/trace.rb#47 def execute_query_lazy(query:, multiplex:); end - # source://graphql//lib/graphql/tracing/trace.rb#18 + # The Ruby parser doesn't call this method (`graphql/c_parser` does.) + # + # source://graphql//lib/graphql/tracing/trace.rb#19 def lex(query_string:); end - # source://graphql//lib/graphql/tracing/trace.rb#22 + # source://graphql//lib/graphql/tracing/trace.rb#23 def parse(query_string:); end - # source://graphql//lib/graphql/tracing/trace.rb#66 + # source://graphql//lib/graphql/tracing/trace.rb#67 def resolve_type(query:, type:, object:); end - # source://graphql//lib/graphql/tracing/trace.rb#70 + # source://graphql//lib/graphql/tracing/trace.rb#71 def resolve_type_lazy(query:, type:, object:); end - # source://graphql//lib/graphql/tracing/trace.rb#26 + # source://graphql//lib/graphql/tracing/trace.rb#27 def validate(query:, validate:); end end @@ -16840,14 +17001,14 @@ end # # @api private # -# source://graphql//lib/graphql/tracing.rb#38 +# source://graphql//lib/graphql/tracing.rb#40 module GraphQL::Tracing::Traceable # @api private # @param key [String] The name of the event in GraphQL internals # @param metadata [Hash] Event-related metadata (can be anything) # @return [Object] Must return the value of the block # - # source://graphql//lib/graphql/tracing.rb#42 + # source://graphql//lib/graphql/tracing.rb#44 def trace(key, metadata, &block); end private @@ -16861,7 +17022,7 @@ module GraphQL::Tracing::Traceable # @param metadata [Object] The current event object # @return Whatever the block returns # - # source://graphql//lib/graphql/tracing.rb#56 + # source://graphql//lib/graphql/tracing.rb#58 def call_tracers(idx, key, metadata, &block); end end @@ -17134,6 +17295,49 @@ end # source://graphql//lib/graphql/types/iso_8601_date_time.rb#24 GraphQL::Types::ISO8601DateTime::DEFAULT_TIME_PRECISION = T.let(T.unsafe(nil), Integer) +# This scalar takes `Duration`s and transmits them as strings, +# using ISO 8601 format. ActiveSupport >= 5.0 must be loaded to use +# this scalar. +# +# Use it for fields or arguments as follows: +# +# field :age, GraphQL::Types::ISO8601Duration, null: false +# +# argument :interval, GraphQL::Types::ISO8601Duration, null: false +# +# Alternatively, use this built-in scalar as inspiration for your +# own Duration type. +# +# source://graphql//lib/graphql/types/iso_8601_duration.rb#16 +class GraphQL::Types::ISO8601Duration < ::GraphQL::Schema::Scalar + class << self + # @param value [String, ActiveSupport::Duration] + # @raise [GraphQL::Error] if ActiveSupport::Duration is not defined + # @raise [GraphQL::DurationEncodingError] if duration cannot be parsed + # @return [ActiveSupport::Duration, nil] + # + # source://graphql//lib/graphql/types/iso_8601_duration.rb#57 + def coerce_input(value, ctx); end + + # @param value [ActiveSupport::Duration, String] + # @raise [GraphQL::Error] if ActiveSupport::Duration is not defined or if an incompatible object is passed + # @return [String] + # + # source://graphql//lib/graphql/types/iso_8601_duration.rb#33 + def coerce_result(value, _ctx); end + + # @return [Integer, nil] + # + # source://graphql//lib/graphql/types/iso_8601_duration.rb#20 + def seconds_precision; end + + # @param value [Integer, nil] + # + # source://graphql//lib/graphql/types/iso_8601_duration.rb#26 + def seconds_precision=(value); end + end +end + # @see {Types::BigInt} for handling integers outside 32-bit range. # # source://graphql//lib/graphql/types/int.rb#6 @@ -17278,14 +17482,20 @@ module GraphQL::Types::Relay::ConnectionBehaviors mixes_in_class_methods ::GraphQL::Types::Relay::ConnectionBehaviors::ClassMethods - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def cursor_from_node(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#186 + def edges; end + + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#195 + def nodes; end + + # source://forwardable/1.3.3/forwardable.rb#231 def parent(*args, **_arg1, &block); end class << self - # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#169 + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#181 def add_page_info_field(obj_type); end # @private @@ -17299,7 +17509,7 @@ end module GraphQL::Types::Relay::ConnectionBehaviors::ClassMethods # @return [Boolean] # - # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#96 + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#108 def authorized?(obj, ctx); end # @return [Boolean] @@ -17315,7 +17525,7 @@ module GraphQL::Types::Relay::ConnectionBehaviors::ClassMethods # Set the default `edge_nullable` for this class and its child classes. (Defaults to `true`.) # Use `edge_nullable(false)` in your base class to make non-null `edge` fields. # - # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#127 + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#139 def edge_nullable(new_value = T.unsafe(nil)); end # Configure this connection to return `edges` and `nodes` based on `edge_type_class`. @@ -17337,13 +17547,13 @@ module GraphQL::Types::Relay::ConnectionBehaviors::ClassMethods # Set the default `edges_nullable` for this class and its child classes. (Defaults to `true`.) # Use `edges_nullable(false)` in your base class to make non-null `edges` fields. # - # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#117 + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#129 def edges_nullable(new_value = T.unsafe(nil)); end # Set the default `nodes_field` for this class and its child classes. (Defaults to `true`.) # Use `nodes_field(false)` in your base class to prevent adding of a nodes field. # - # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#137 + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#149 def has_nodes_field(new_value = T.unsafe(nil)); end # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#25 @@ -17352,7 +17562,7 @@ module GraphQL::Types::Relay::ConnectionBehaviors::ClassMethods # Set the default `node_nullable` for this class and its child classes. (Defaults to `true`.) # Use `node_nullable(false)` in your base class to make non-null `node` and `nodes` fields. # - # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#107 + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#119 def node_nullable(new_value = T.unsafe(nil)); end # @return [Class] @@ -17362,17 +17572,22 @@ module GraphQL::Types::Relay::ConnectionBehaviors::ClassMethods # Add the shortcut `nodes` field to this connection and its subclasses # - # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#92 + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#104 def nodes_field(node_nullable: T.unsafe(nil), field_options: T.unsafe(nil)); end + # The connection will skip auth on its nodes if the node_type is configured for that + # + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#91 + def reauthorize_scoped_objects(new_value = T.unsafe(nil)); end + # Filter this list according to the way its node type would scope them # - # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#87 + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#86 def scope_items(items, context); end # @return [Boolean] # - # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#100 + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#112 def visible?(ctx); end protected @@ -17381,26 +17596,26 @@ module GraphQL::Types::Relay::ConnectionBehaviors::ClassMethods # # @param value the value to set the attribute edge_class to. # - # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#147 + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#159 def edge_class=(_arg0); end # Sets the attribute edge_type # # @param value the value to set the attribute edge_type to. # - # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#147 + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#159 def edge_type=(_arg0); end # Sets the attribute node_type # # @param value the value to set the attribute node_type to. # - # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#147 + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#159 def node_type=(_arg0); end private - # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#151 + # source://graphql//lib/graphql/types/relay/connection_behaviors.rb#163 def define_nodes_field(nullable, field_options: T.unsafe(nil)); end end @@ -17408,6 +17623,9 @@ end module GraphQL::Types::Relay::EdgeBehaviors mixes_in_class_methods ::GraphQL::Types::Relay::EdgeBehaviors::ClassMethods + # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#15 + def node; end + class << self # @private # @@ -17416,25 +17634,25 @@ module GraphQL::Types::Relay::EdgeBehaviors end end -# source://graphql//lib/graphql/types/relay/edge_behaviors.rb#15 +# source://graphql//lib/graphql/types/relay/edge_behaviors.rb#22 module GraphQL::Types::Relay::EdgeBehaviors::ClassMethods # @return [Boolean] # - # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#50 + # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#57 def authorized?(obj, ctx); end # @return [Boolean] # - # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#22 + # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#29 def default_relay?; end - # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#16 + # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#23 def inherited(child_class); end # Set the default `node_nullable` for this class and its child classes. (Defaults to `true`.) # Use `node_nullable(false)` in your base class to make non-null `node` field. # - # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#60 + # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#67 def node_nullable(new_value = T.unsafe(nil)); end # Get or set the Object type that this edge wraps. @@ -17443,12 +17661,12 @@ module GraphQL::Types::Relay::EdgeBehaviors::ClassMethods # @param null [Boolean] # @param field_options [Hash] Any extra arguments to pass to the `field :node` configuration # - # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#31 + # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#38 def node_type(node_type = T.unsafe(nil), null: T.unsafe(nil), field_options: T.unsafe(nil)); end # @return [Boolean] # - # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#54 + # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#61 def visible?(ctx); end protected @@ -17457,14 +17675,14 @@ module GraphQL::Types::Relay::EdgeBehaviors::ClassMethods # # @param value the value to set the attribute node_nullable to. # - # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#70 + # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#77 def node_nullable=(_arg0); end # Sets the attribute node_type # # @param value the value to set the attribute node_type to. # - # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#70 + # source://graphql//lib/graphql/types/relay/edge_behaviors.rb#77 def node_type=(_arg0); end end @@ -17527,13 +17745,9 @@ module GraphQL::Types::Relay::Node extend ::GraphQL::Schema::Member::HasDirectives extend ::GraphQL::Schema::Member::HasInterfaces extend ::GraphQL::Schema::Interface::DefinitionMethods - extend ::GraphQL::Types::Relay::Node::DefinitionMethods extend ::GraphQL::Types::Relay::NodeBehaviors::ClassMethods end -# source://graphql//lib/graphql/types/relay/node.rb#0 -module GraphQL::Types::Relay::Node::DefinitionMethods; end - # source://graphql//lib/graphql/types/relay/node.rb#0 class GraphQL::Types::Relay::Node::UnresolvedTypeError < ::GraphQL::UnresolvedTypeError; end @@ -17597,7 +17811,7 @@ end # # Alternatively, custom code in `authorized?` may raise this error. It will be routed the same way. # -# source://graphql//lib/graphql/unauthorized_error.rb#8 +# source://graphql//lib/graphql/unauthorized_error.rb#7 class GraphQL::UnauthorizedError < ::GraphQL::Error # @return [UnauthorizedError] a new instance of UnauthorizedError # @@ -17625,7 +17839,7 @@ class GraphQL::UnauthorizedError < ::GraphQL::Error def type; end end -# source://graphql//lib/graphql/unauthorized_field_error.rb#4 +# source://graphql//lib/graphql/unauthorized_field_error.rb#3 class GraphQL::UnauthorizedFieldError < ::GraphQL::UnauthorizedError # @return [UnauthorizedFieldError] a new instance of UnauthorizedFieldError # @@ -17646,7 +17860,7 @@ end # Error raised when the value provided for a field # can't be resolved to one of the possible types for the field. # -# source://graphql//lib/graphql/unresolved_type_error.rb#6 +# source://graphql//lib/graphql/unresolved_type_error.rb#5 class GraphQL::UnresolvedTypeError < ::GraphQL::RuntimeTypeError # @return [UnresolvedTypeError] a new instance of UnresolvedTypeError # diff --git a/sorbet/rbi/gems/hashdiff@1.0.1.rbi b/sorbet/rbi/gems/hashdiff@1.1.0.rbi similarity index 97% rename from sorbet/rbi/gems/hashdiff@1.0.1.rbi rename to sorbet/rbi/gems/hashdiff@1.1.0.rbi index dd7e6df97..ddd1b249f 100644 --- a/sorbet/rbi/gems/hashdiff@1.0.1.rbi +++ b/sorbet/rbi/gems/hashdiff@1.1.0.rbi @@ -22,6 +22,7 @@ module Hashdiff # @param obj2 [Array, Hash] # @param options [Hash] the options to use when comparing # * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other + # * :ignore_keys (Symbol, String or Array) [[]] a list of keys to ignore. No comparison is made for the specified key(s) # * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1}) # * :delimiter (String) ['.'] the delimiter used when returning nested key references # * :numeric_tolerance (Numeric) [0] should be a positive numeric value. Value by which numeric differences must be greater than. By default, numeric values are compared exactly; with the :tolerance option, the difference between numeric values must be greater than the given value. @@ -33,7 +34,7 @@ module Hashdiff # @since 0.0.1 # @yield [path, value1, value2] Optional block is used to compare each value, instead of default #==. If the block returns value other than true of false, then other specified comparison options will be used to do the comparison. # - # source://hashdiff//lib/hashdiff/diff.rb#31 + # source://hashdiff//lib/hashdiff/diff.rb#32 def best_diff(obj1, obj2, options = T.unsafe(nil), &block); end # check if objects are comparable @@ -94,6 +95,7 @@ module Hashdiff # @param obj2 [Array, Hash] # @param options [Hash] the options to use when comparing # * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other + # * :ignore_keys (Symbol, String or Array) [[]] a list of keys to ignore. No comparison is made for the specified key(s) # * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1}) # * :similarity (Numeric) [0.8] should be between (0, 1]. Meaningful if there are similar hashes in arrays. See {best_diff}. # * :delimiter (String) ['.'] the delimiter used when returning nested key references @@ -106,7 +108,7 @@ module Hashdiff # @since 0.0.1 # @yield [path, value1, value2] Optional block is used to compare each value, instead of default #==. If the block returns value other than true of false, then other specified comparison options will be used to do the comparison. # - # source://hashdiff//lib/hashdiff/diff.rb#78 + # source://hashdiff//lib/hashdiff/diff.rb#80 def diff(obj1, obj2, options = T.unsafe(nil), &block); end # diff array using LCS algorithm @@ -114,7 +116,7 @@ module Hashdiff # @private # @yield [links] # - # source://hashdiff//lib/hashdiff/diff.rb#119 + # source://hashdiff//lib/hashdiff/diff.rb#124 def diff_array_lcs(arraya, arrayb, options = T.unsafe(nil)); end # caculate array difference using LCS algorithm diff --git a/sorbet/rbi/gems/identity_cache@1.4.1.rbi b/sorbet/rbi/gems/identity_cache@1.5.5.rbi similarity index 99% rename from sorbet/rbi/gems/identity_cache@1.4.1.rbi rename to sorbet/rbi/gems/identity_cache@1.5.5.rbi index e706c4168..b22b9e81e 100644 --- a/sorbet/rbi/gems/identity_cache@1.4.1.rbi +++ b/sorbet/rbi/gems/identity_cache@1.5.5.rbi @@ -247,7 +247,7 @@ class IdentityCache::CacheFetcher # source://identity_cache//lib/identity_cache/cache_fetcher.rb#59 def delete(key); end - # source://identity_cache//lib/identity_cache/cache_fetcher.rb#73 + # source://identity_cache//lib/identity_cache/cache_fetcher.rb#77 def fetch(key, fill_lock_duration: T.unsafe(nil), lock_wait_tries: T.unsafe(nil), &block); end # source://identity_cache//lib/identity_cache/cache_fetcher.rb#67 @@ -258,42 +258,42 @@ class IdentityCache::CacheFetcher private - # source://identity_cache//lib/identity_cache/cache_fetcher.rb#307 + # source://identity_cache//lib/identity_cache/cache_fetcher.rb#311 def add(key, value, expiration_options = T.unsafe(nil)); end - # source://identity_cache//lib/identity_cache/cache_fetcher.rb#301 + # source://identity_cache//lib/identity_cache/cache_fetcher.rb#305 def add_multi(keys); end - # source://identity_cache//lib/identity_cache/cache_fetcher.rb#272 + # source://identity_cache//lib/identity_cache/cache_fetcher.rb#276 def cas_multi(keys); end - # source://identity_cache//lib/identity_cache/cache_fetcher.rb#268 + # source://identity_cache//lib/identity_cache/cache_fetcher.rb#272 def client_id; end - # source://identity_cache//lib/identity_cache/cache_fetcher.rb#253 + # source://identity_cache//lib/identity_cache/cache_fetcher.rb#257 def fallback_key_expiration_options(fill_lock_duration); end - # source://identity_cache//lib/identity_cache/cache_fetcher.rb#195 + # source://identity_cache//lib/identity_cache/cache_fetcher.rb#199 def fetch_or_take_lock(key, old_lock:, **expiration_options); end # @raise [ArgumentError] # - # source://identity_cache//lib/identity_cache/cache_fetcher.rb#99 + # source://identity_cache//lib/identity_cache/cache_fetcher.rb#103 def fetch_with_fill_lock(key, fill_lock_duration, lock_wait_tries, &block); end - # source://identity_cache//lib/identity_cache/cache_fetcher.rb#83 + # source://identity_cache//lib/identity_cache/cache_fetcher.rb#87 def fetch_without_fill_lock(key); end - # source://identity_cache//lib/identity_cache/cache_fetcher.rb#233 + # source://identity_cache//lib/identity_cache/cache_fetcher.rb#237 def fill_with_lock(key, data, my_lock, expiration_options); end - # source://identity_cache//lib/identity_cache/cache_fetcher.rb#249 + # source://identity_cache//lib/identity_cache/cache_fetcher.rb#253 def lock_fill_fallback_key(key, lock); end - # source://identity_cache//lib/identity_cache/cache_fetcher.rb#170 + # source://identity_cache//lib/identity_cache/cache_fetcher.rb#174 def mark_fill_failure_on_lock(key, expiration_options); end - # source://identity_cache//lib/identity_cache/cache_fetcher.rb#182 + # source://identity_cache//lib/identity_cache/cache_fetcher.rb#186 def upsert(key, expiration_options = T.unsafe(nil)); end end @@ -719,12 +719,12 @@ class IdentityCache::Cached::BelongsTo < ::IdentityCache::Cached::Association # @return [Boolean] # - # source://identity_cache//lib/identity_cache/cached/belongs_to.rb#98 + # source://identity_cache//lib/identity_cache/cached/belongs_to.rb#102 def embedded_by_reference?; end # @return [Boolean] # - # source://identity_cache//lib/identity_cache/cached/belongs_to.rb#94 + # source://identity_cache//lib/identity_cache/cached/belongs_to.rb#98 def embedded_recursively?; end # source://identity_cache//lib/identity_cache/cached/belongs_to.rb#35 @@ -784,10 +784,10 @@ class IdentityCache::Cached::PrimaryIndex # source://identity_cache//lib/identity_cache/cached/primary_index.rb#8 def initialize(model); end - # source://identity_cache//lib/identity_cache/cached/primary_index.rb#73 + # source://identity_cache//lib/identity_cache/cached/primary_index.rb#77 def cache_decode(cache_value); end - # source://identity_cache//lib/identity_cache/cached/primary_index.rb#69 + # source://identity_cache//lib/identity_cache/cached/primary_index.rb#73 def cache_encode(record); end # source://identity_cache//lib/identity_cache/cached/primary_index.rb#51 @@ -802,7 +802,7 @@ class IdentityCache::Cached::PrimaryIndex # source://identity_cache//lib/identity_cache/cached/primary_index.rb#34 def fetch_multi(ids); end - # source://identity_cache//lib/identity_cache/cached/primary_index.rb#61 + # source://identity_cache//lib/identity_cache/cached/primary_index.rb#64 def load_multi_from_db(ids); end # source://identity_cache//lib/identity_cache/cached/primary_index.rb#55 @@ -815,16 +815,16 @@ class IdentityCache::Cached::PrimaryIndex private - # source://identity_cache//lib/identity_cache/cached/primary_index.rb#87 + # source://identity_cache//lib/identity_cache/cached/primary_index.rb#91 def build_query(id_or_ids); end - # source://identity_cache//lib/identity_cache/cached/primary_index.rb#91 + # source://identity_cache//lib/identity_cache/cached/primary_index.rb#95 def cache_key_prefix; end - # source://identity_cache//lib/identity_cache/cached/primary_index.rb#79 + # source://identity_cache//lib/identity_cache/cached/primary_index.rb#83 def cast_id(id); end - # source://identity_cache//lib/identity_cache/cached/primary_index.rb#83 + # source://identity_cache//lib/identity_cache/cached/primary_index.rb#87 def id_column; end end @@ -1227,7 +1227,7 @@ class IdentityCache::FallbackFetcher # source://identity_cache//lib/identity_cache/fallback_fetcher.rb#15 def delete(key); end - # source://identity_cache//lib/identity_cache/fallback_fetcher.rb#36 + # source://identity_cache//lib/identity_cache/fallback_fetcher.rb#40 def fetch(key, **cache_fetcher_options); end # source://identity_cache//lib/identity_cache/fallback_fetcher.rb#23 @@ -1548,6 +1548,16 @@ module IdentityCache::ShouldUseCache extend ::ActiveSupport::Concern mixes_in_class_methods ::IdentityCache::ShouldUseCache::ClassMethods + + private + + # @return [Boolean] + # + # source://identity_cache//lib/identity_cache/should_use_cache.rb#19 + def loaded_by_idc?; end + + # source://identity_cache//lib/identity_cache/should_use_cache.rb#15 + def mark_as_loaded_by_idc; end end # source://identity_cache//lib/identity_cache/should_use_cache.rb#7 @@ -1689,7 +1699,7 @@ module IdentityCache::WithPrimaryIndex::ClassMethods # Invalidates the primary cache index for the associated record. Will not invalidate cached attributes. # - # source://identity_cache//lib/identity_cache/with_primary_index.rb#160 + # source://identity_cache//lib/identity_cache/with_primary_index.rb#162 def expire_primary_key_cache_index(id); end # Fetch the record by its primary key from the cache or read from @@ -1757,7 +1767,7 @@ module IdentityCache::WithPrimaryIndex::ClassMethods private - # source://identity_cache//lib/identity_cache/with_primary_index.rb#166 + # source://identity_cache//lib/identity_cache/with_primary_index.rb#168 def inherited(subclass); end end diff --git a/sorbet/rbi/gems/io-console@0.6.0.rbi b/sorbet/rbi/gems/io-console@0.7.2.rbi similarity index 100% rename from sorbet/rbi/gems/io-console@0.6.0.rbi rename to sorbet/rbi/gems/io-console@0.7.2.rbi diff --git a/sorbet/rbi/gems/irb@1.6.4.rbi b/sorbet/rbi/gems/irb@1.6.4.rbi deleted file mode 100644 index dc7279283..000000000 --- a/sorbet/rbi/gems/irb@1.6.4.rbi +++ /dev/null @@ -1,2703 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `irb` gem. -# Please instead update this file by running `bin/tapioca gem irb`. - -# source://irb//lib/irb.rb#919 -class Binding - # Opens an IRB session where +binding.irb+ is called which allows for - # interactive debugging. You can call any methods or variables available in - # the current scope, and mutate state if you need to. - # - # - # Given a Ruby file called +potato.rb+ containing the following code: - # - # class Potato - # def initialize - # @cooked = false - # binding.irb - # puts "Cooked potato: #{@cooked}" - # end - # end - # - # Potato.new - # - # Running ruby potato.rb will open an IRB session where - # +binding.irb+ is called, and you will see the following: - # - # $ ruby potato.rb - # - # From: potato.rb @ line 4 : - # - # 1: class Potato - # 2: def initialize - # 3: @cooked = false - # => 4: binding.irb - # 5: puts "Cooked potato: #{@cooked}" - # 6: end - # 7: end - # 8: - # 9: Potato.new - # - # irb(#):001:0> - # - # You can type any valid Ruby code and it will be evaluated in the current - # context. This allows you to debug without having to run your code repeatedly: - # - # irb(#):001:0> @cooked - # => false - # irb(#):002:0> self.class - # => Potato - # irb(#):003:0> caller.first - # => ".../2.5.1/lib/ruby/2.5.0/irb/workspace.rb:85:in `eval'" - # irb(#):004:0> @cooked = true - # => true - # - # You can exit the IRB session with the +exit+ command. Note that exiting will - # resume execution where +binding.irb+ had paused it, as you can see from the - # output printed to standard output in this example: - # - # irb(#):005:0> exit - # Cooked potato: true - # - # - # See IRB@IRB+Usage for more information. - # - # source://irb//lib/irb.rb#977 - def irb(show_code: T.unsafe(nil)); end -end - -# IRB stands for "interactive Ruby" and is a tool to interactively execute Ruby -# expressions read from the standard input. -# -# The +irb+ command from your shell will start the interpreter. -# -# == Usage -# -# Use of irb is easy if you know Ruby. -# -# When executing irb, prompts are displayed as follows. Then, enter the Ruby -# expression. An input is executed when it is syntactically complete. -# -# $ irb -# irb(main):001:0> 1+2 -# #=> 3 -# irb(main):002:0> class Foo -# irb(main):003:1> def foo -# irb(main):004:2> print 1 -# irb(main):005:2> end -# irb(main):006:1> end -# #=> nil -# -# The singleline editor module or multiline editor module can be used with irb. -# Use of multiline editor is default if it's installed. -# -# == Command line options -# -# :include: ./irb/lc/help-message -# -# == Commands -# -# The following commands are available on IRB. -# -# * cwws -# * Show the current workspace. -# * cb, cws, chws -# * Change the current workspace to an object. -# * bindings, workspaces -# * Show workspaces. -# * pushb, pushws -# * Push an object to the workspace stack. -# * popb, popws -# * Pop a workspace from the workspace stack. -# * load -# * Load a Ruby file. -# * require -# * Require a Ruby file. -# * source -# * Loads a given file in the current session. -# * irb -# * Start a child IRB. -# * jobs -# * List of current sessions. -# * fg -# * Switches to the session of the given number. -# * kill -# * Kills the session with the given number. -# * help -# * Enter the mode to look up RI documents. -# * irb_info -# * Show information about IRB. -# * ls -# * Show methods, constants, and variables. -# -g [query] or -G [query] allows you to filter out the output. -# * measure -# * measure enables the mode to measure processing time. measure :off disables it. -# * $, show_source -# * Show the source code of a given method or constant. -# * @, whereami -# * Show the source code around binding.irb again. -# * debug -# * Start the debugger of debug.gem. -# * break, delete, next, step, continue, finish, backtrace, info, catch -# * Start the debugger of debug.gem and run the command on it. -# -# == Configuration -# -# IRB reads a personal initialization file when it's invoked. -# IRB searches a file in the following order and loads the first one found. -# -# * $IRBRC (if $IRBRC is set) -# * $XDG_CONFIG_HOME/irb/irbrc (if $XDG_CONFIG_HOME is set) -# * ~/.irbrc -# * +.config/irb/irbrc+ -# * +.irbrc+ -# * +irb.rc+ -# * +_irbrc+ -# * $irbrc -# -# The following are alternatives to the command line options. To use them type -# as follows in an +irb+ session: -# -# IRB.conf[:IRB_NAME]="irb" -# IRB.conf[:INSPECT_MODE]=nil -# IRB.conf[:IRB_RC] = nil -# IRB.conf[:BACK_TRACE_LIMIT]=16 -# IRB.conf[:USE_LOADER] = false -# IRB.conf[:USE_MULTILINE] = nil -# IRB.conf[:USE_SINGLELINE] = nil -# IRB.conf[:USE_COLORIZE] = true -# IRB.conf[:USE_TRACER] = false -# IRB.conf[:USE_AUTOCOMPLETE] = true -# IRB.conf[:IGNORE_SIGINT] = true -# IRB.conf[:IGNORE_EOF] = false -# IRB.conf[:PROMPT_MODE] = :DEFAULT -# IRB.conf[:PROMPT] = {...} -# -# === Auto indentation -# -# To disable auto-indent mode in irb, add the following to your +.irbrc+: -# -# IRB.conf[:AUTO_INDENT] = false -# -# === Autocompletion -# -# To disable autocompletion for irb, add the following to your +.irbrc+: -# -# IRB.conf[:USE_AUTOCOMPLETE] = false -# -# === History -# -# By default, irb will store the last 1000 commands you used in -# IRB.conf[:HISTORY_FILE] (~/.irb_history by default). -# -# If you want to disable history, add the following to your +.irbrc+: -# -# IRB.conf[:SAVE_HISTORY] = nil -# -# See IRB::Context#save_history= for more information. -# -# The history of _results_ of commands evaluated is not stored by default, -# but can be turned on to be stored with this +.irbrc+ setting: -# -# IRB.conf[:EVAL_HISTORY] = -# -# See IRB::Context#eval_history= and History class. The history of command -# results is not permanently saved in any file. -# -# == Customizing the IRB Prompt -# -# In order to customize the prompt, you can change the following Hash: -# -# IRB.conf[:PROMPT] -# -# This example can be used in your +.irbrc+ -# -# IRB.conf[:PROMPT][:MY_PROMPT] = { # name of prompt mode -# :AUTO_INDENT => false, # disables auto-indent mode -# :PROMPT_I => ">> ", # simple prompt -# :PROMPT_S => nil, # prompt for continuated strings -# :PROMPT_C => nil, # prompt for continuated statement -# :RETURN => " ==>%s\n" # format to return value -# } -# -# IRB.conf[:PROMPT_MODE] = :MY_PROMPT -# -# Or, invoke irb with the above prompt mode by: -# -# irb --prompt my-prompt -# -# Constants +PROMPT_I+, +PROMPT_S+ and +PROMPT_C+ specify the format. In the -# prompt specification, some special strings are available: -# -# %N # command name which is running -# %m # to_s of main object (self) -# %M # inspect of main object (self) -# %l # type of string(", ', /, ]), `]' is inner %w[...] -# %NNi # indent level. NN is digits and means as same as printf("%NNd"). -# # It can be omitted -# %NNn # line number. -# %% # % -# -# For instance, the default prompt mode is defined as follows: -# -# IRB.conf[:PROMPT_MODE][:DEFAULT] = { -# :PROMPT_I => "%N(%m):%03n:%i> ", -# :PROMPT_N => "%N(%m):%03n:%i> ", -# :PROMPT_S => "%N(%m):%03n:%i%l ", -# :PROMPT_C => "%N(%m):%03n:%i* ", -# :RETURN => "%s\n" # used to printf -# } -# -# irb comes with a number of available modes: -# -# # :NULL: -# # :PROMPT_I: -# # :PROMPT_N: -# # :PROMPT_S: -# # :PROMPT_C: -# # :RETURN: | -# # %s -# # :DEFAULT: -# # :PROMPT_I: ! '%N(%m):%03n:%i> ' -# # :PROMPT_N: ! '%N(%m):%03n:%i> ' -# # :PROMPT_S: ! '%N(%m):%03n:%i%l ' -# # :PROMPT_C: ! '%N(%m):%03n:%i* ' -# # :RETURN: | -# # => %s -# # :CLASSIC: -# # :PROMPT_I: ! '%N(%m):%03n:%i> ' -# # :PROMPT_N: ! '%N(%m):%03n:%i> ' -# # :PROMPT_S: ! '%N(%m):%03n:%i%l ' -# # :PROMPT_C: ! '%N(%m):%03n:%i* ' -# # :RETURN: | -# # %s -# # :SIMPLE: -# # :PROMPT_I: ! '>> ' -# # :PROMPT_N: ! '>> ' -# # :PROMPT_S: -# # :PROMPT_C: ! '?> ' -# # :RETURN: | -# # => %s -# # :INF_RUBY: -# # :PROMPT_I: ! '%N(%m):%03n:%i> ' -# # :PROMPT_N: -# # :PROMPT_S: -# # :PROMPT_C: -# # :RETURN: | -# # %s -# # :AUTO_INDENT: true -# # :XMP: -# # :PROMPT_I: -# # :PROMPT_N: -# # :PROMPT_S: -# # :PROMPT_C: -# # :RETURN: |2 -# # ==>%s -# -# == Restrictions -# -# Because irb evaluates input immediately after it is syntactically complete, -# the results may be slightly different than directly using Ruby. -# -# == IRB Sessions -# -# IRB has a special feature, that allows you to manage many sessions at once. -# -# You can create new sessions with Irb.irb, and get a list of current sessions -# with the +jobs+ command in the prompt. -# -# === Commands -# -# JobManager provides commands to handle the current sessions: -# -# jobs # List of current sessions -# fg # Switches to the session of the given number -# kill # Kills the session with the given number -# -# The +exit+ command, or ::irb_exit, will quit the current session and call any -# exit hooks with IRB.irb_at_exit. -# -# A few commands for loading files within the session are also available: -# -# +source+:: -# Loads a given file in the current session and displays the source lines, -# see IrbLoader#source_file -# +irb_load+:: -# Loads the given file similarly to Kernel#load, see IrbLoader#irb_load -# +irb_require+:: -# Loads the given file similarly to Kernel#require -# -# === Configuration -# -# The command line options, or IRB.conf, specify the default behavior of -# Irb.irb. -# -# On the other hand, each conf in IRB@Command+line+options is used to -# individually configure IRB.irb. -# -# If a proc is set for IRB.conf[:IRB_RC], its will be invoked after execution -# of that proc with the context of the current session as its argument. Each -# session can be configured using this mechanism. -# -# === Session variables -# -# There are a few variables in every Irb session that can come in handy: -# -# _:: -# The value command executed, as a local variable -# __:: -# The history of evaluated commands. Available only if -# IRB.conf[:EVAL_HISTORY] is not +nil+ (which is the default). -# See also IRB::Context#eval_history= and IRB::History. -# __[line_no]:: -# Returns the evaluation value at the given line number, +line_no+. -# If +line_no+ is a negative, the return value +line_no+ many lines before -# the most recent return value. -# -# === Example using IRB Sessions -# -# # invoke a new session -# irb(main):001:0> irb -# # list open sessions -# irb.1(main):001:0> jobs -# #0->irb on main (# : stop) -# #1->irb#1 on main (# : running) -# -# # change the active session -# irb.1(main):002:0> fg 0 -# # define class Foo in top-level session -# irb(main):002:0> class Foo;end -# # invoke a new session with the context of Foo -# irb(main):003:0> irb Foo -# # define Foo#foo -# irb.2(Foo):001:0> def foo -# irb.2(Foo):002:1> print 1 -# irb.2(Foo):003:1> end -# -# # change the active session -# irb.2(Foo):004:0> fg 0 -# # list open sessions -# irb(main):004:0> jobs -# #0->irb on main (# : running) -# #1->irb#1 on main (# : stop) -# #2->irb#2 on Foo (# : stop) -# # check if Foo#foo is available -# irb(main):005:0> Foo.instance_methods #=> [:foo, ...] -# -# # change the active session -# irb(main):006:0> fg 2 -# # define Foo#bar in the context of Foo -# irb.2(Foo):005:0> def bar -# irb.2(Foo):006:1> print "bar" -# irb.2(Foo):007:1> end -# irb.2(Foo):010:0> Foo.instance_methods #=> [:bar, :foo, ...] -# -# # change the active session -# irb.2(Foo):011:0> fg 0 -# irb(main):007:0> f = Foo.new #=> # -# # invoke a new session with the context of f (instance of Foo) -# irb(main):008:0> irb f -# # list open sessions -# irb.3():001:0> jobs -# #0->irb on main (# : stop) -# #1->irb#1 on main (# : stop) -# #2->irb#2 on Foo (# : stop) -# #3->irb#3 on # (# : running) -# # evaluate f.foo -# irb.3():002:0> foo #=> 1 => nil -# # evaluate f.bar -# irb.3():003:0> bar #=> bar => nil -# # kill jobs 1, 2, and 3 -# irb.3():004:0> kill 1, 2, 3 -# # list open sessions, should only include main session -# irb(main):009:0> jobs -# #0->irb on main (# : running) -# # quit irb -# irb(main):010:0> exit -# -# source://irb//lib/irb/init.rb#7 -module IRB - class << self - # The current IRB::Context of the session, see IRB.conf - # - # irb - # irb(main):001:0> IRB.CurrentContext.irb_name = "foo" - # foo(main):002:0> IRB.conf[:MAIN_CONTEXT].irb_name #=> "foo" - # - # source://irb//lib/irb.rb#400 - def CurrentContext; end - - # Convenience method to create a new Inspector, using the given +inspect+ - # proc, and optional +init+ proc and passes them to Inspector.new - # - # irb(main):001:0> ins = IRB::Inspector(proc{ |v| "omg! #{v}" }) - # irb(main):001:0> IRB.CurrentContext.inspect_mode = ins # => omg! # - # irb(main):001:0> "what?" #=> omg! what? - # - # source://irb//lib/irb/inspector.rb#17 - def Inspector(inspect, init = T.unsafe(nil)); end - - # Displays current configuration. - # - # Modifying the configuration is achieved by sending a message to IRB.conf. - # - # See IRB@Configuration for more information. - # - # source://irb//lib/irb.rb#383 - def conf; end - - # source://irb//lib/irb/src_encoding.rb#4 - def default_src_encoding; end - - # source://irb//lib/irb/init.rb#23 - def init_config(ap_path); end - - # source://irb//lib/irb/init.rb#212 - def init_error; end - - # Aborts then interrupts irb. - # - # Will raise an Abort exception, or the given +exception+. - # - # source://irb//lib/irb.rb#427 - def irb_abort(irb, exception = T.unsafe(nil)); end - - # Quits irb - # - # source://irb//lib/irb.rb#420 - def irb_exit(irb, ret); end - - # loading modules - # - # source://irb//lib/irb/init.rb#414 - def load_modules; end - - # option analyzing - # - # source://irb//lib/irb/init.rb#217 - def parse_opts(argv: T.unsafe(nil)); end - - # source://irb//lib/irb/init.rb#373 - def rc_file(ext = T.unsafe(nil)); end - - # enumerate possible rc-file base name generators - # - # @yield [proc{|rc| current_dir+"/.irb#{rc}"}] - # - # source://irb//lib/irb/init.rb#392 - def rc_file_generators; end - - # running config - # - # source://irb//lib/irb/init.rb#357 - def run_config; end - - # source://irb//lib/irb/init.rb#167 - def set_measure_callback(type = T.unsafe(nil), arg = T.unsafe(nil), &block); end - - # initialize config - # - # source://irb//lib/irb/init.rb#10 - def setup(ap_path, argv: T.unsafe(nil)); end - - # Initializes IRB and creates a new Irb.irb object at the +TOPLEVEL_BINDING+ - # - # source://irb//lib/irb.rb#405 - def start(ap_path = T.unsafe(nil)); end - - # source://irb//lib/irb/init.rb#203 - def unset_measure_callback(type = T.unsafe(nil)); end - - # Returns the current version of IRB, including release version and last - # updated date. - # - # source://irb//lib/irb.rb#389 - def version; end - - private - - # source://irb//lib/irb/easter-egg.rb#101 - def easter_egg(type = T.unsafe(nil)); end - - # source://irb//lib/irb/init.rb#426 - def set_encoding(extern, intern = T.unsafe(nil), override: T.unsafe(nil)); end - end -end - -# source://irb//lib/irb/color.rb#7 -module IRB::Color - class << self - # source://irb//lib/irb/color.rb#112 - def clear(colorable: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://irb//lib/irb/color.rb#79 - def colorable?; end - - # source://irb//lib/irb/color.rb#117 - def colorize(text, seq, colorable: T.unsafe(nil)); end - - # If `complete` is false (code is incomplete), this does not warn compile_error. - # This option is needed to avoid warning a user when the compile_error is happening - # because the input is not wrong but just incomplete. - # - # source://irb//lib/irb/color.rb#126 - def colorize_code(code, complete: T.unsafe(nil), ignore_error: T.unsafe(nil), colorable: T.unsafe(nil), local_variables: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://irb//lib/irb/color.rb#91 - def inspect_colorable?(obj, seen: T.unsafe(nil)); end - - private - - # source://irb//lib/irb/color.rb#211 - def dispatch_seq(token, expr, str, in_symbol:); end - - # source://irb//lib/irb/color.rb#175 - def scan(code, allow_last_error:); end - - # source://irb//lib/irb/color.rb#167 - def without_circular_ref(obj, seen:, &block); end - end -end - -# A constant of all-bit 1 to match any Ripper's state in #dispatch_seq -# -# source://irb//lib/irb/color.rb#26 -IRB::Color::ALL = T.let(T.unsafe(nil), Integer) - -# source://irb//lib/irb/color.rb#15 -IRB::Color::BLUE = T.let(T.unsafe(nil), Integer) - -# source://irb//lib/irb/color.rb#9 -IRB::Color::BOLD = T.let(T.unsafe(nil), Integer) - -# source://irb//lib/irb/color.rb#8 -IRB::Color::CLEAR = T.let(T.unsafe(nil), Integer) - -# source://irb//lib/irb/color.rb#17 -IRB::Color::CYAN = T.let(T.unsafe(nil), Integer) - -# source://irb//lib/irb/color.rb#75 -IRB::Color::ERROR_TOKENS = T.let(T.unsafe(nil), Array) - -# source://irb//lib/irb/color.rb#13 -IRB::Color::GREEN = T.let(T.unsafe(nil), Integer) - -# source://irb//lib/irb/color.rb#16 -IRB::Color::MAGENTA = T.let(T.unsafe(nil), Integer) - -# source://irb//lib/irb/color.rb#12 -IRB::Color::RED = T.let(T.unsafe(nil), Integer) - -# source://irb//lib/irb/color.rb#11 -IRB::Color::REVERSE = T.let(T.unsafe(nil), Integer) - -# A class to manage a state to know whether the current token is for Symbol or not. -# -# source://irb//lib/irb/color.rb#227 -class IRB::Color::SymbolState - # @return [SymbolState] a new instance of SymbolState - # - # source://irb//lib/irb/color.rb#228 - def initialize; end - - # Return true if the token is a part of Symbol. - # - # source://irb//lib/irb/color.rb#234 - def scan_token(token); end -end - -# source://irb//lib/irb/color.rb#19 -IRB::Color::TOKEN_KEYWORDS = T.let(T.unsafe(nil), Hash) - -# source://irb//lib/irb/color.rb#32 -IRB::Color::TOKEN_SEQ_EXPRS = T.let(T.unsafe(nil), Hash) - -# source://irb//lib/irb/color.rb#10 -IRB::Color::UNDERLINE = T.let(T.unsafe(nil), Integer) - -# source://irb//lib/irb/color.rb#14 -IRB::Color::YELLOW = T.let(T.unsafe(nil), Integer) - -# source://irb//lib/irb/context.rb#15 -class IRB::Context - # Creates a new IRB context. - # - # The optional +input_method+ argument: - # - # +nil+:: uses stdin or Reline or Readline - # +String+:: uses a File - # +other+:: uses this as InputMethod - # - # @return [Context] a new instance of Context - # - # source://irb//lib/irb/context.rb#23 - def initialize(irb, workspace = T.unsafe(nil), input_method = T.unsafe(nil)); end - - # A copy of the default IRB.conf[:AP_NAME] - # - # source://irb//lib/irb/context.rb#175 - def ap_name; end - - # A copy of the default IRB.conf[:AP_NAME] - # - # source://irb//lib/irb/context.rb#175 - def ap_name=(_arg0); end - - # Can be either the default IRB.conf[:AUTO_INDENT], or the - # mode set by #prompt_mode= - # - # To disable auto-indentation in irb: - # - # IRB.conf[:AUTO_INDENT] = false - # - # or - # - # irb_context.auto_indent_mode = false - # - # or - # - # IRB.CurrentContext.auto_indent_mode = false - # - # See IRB@Configuration for more information. - # - # source://irb//lib/irb/context.rb#234 - def auto_indent_mode; end - - # Can be either the default IRB.conf[:AUTO_INDENT], or the - # mode set by #prompt_mode= - # - # To disable auto-indentation in irb: - # - # IRB.conf[:AUTO_INDENT] = false - # - # or - # - # irb_context.auto_indent_mode = false - # - # or - # - # IRB.CurrentContext.auto_indent_mode = false - # - # See IRB@Configuration for more information. - # - # source://irb//lib/irb/context.rb#234 - def auto_indent_mode=(_arg0); end - - # The limit of backtrace lines displayed as top +n+ and tail +n+. - # - # The default value is 16. - # - # Can also be set using the +--back-trace-limit+ command line option. - # - # See IRB@Command+line+options for more command line options. - # - # source://irb//lib/irb/context.rb#327 - def back_trace_limit; end - - # The limit of backtrace lines displayed as top +n+ and tail +n+. - # - # The default value is 16. - # - # Can also be set using the +--back-trace-limit+ command line option. - # - # See IRB@Command+line+options for more command line options. - # - # source://irb//lib/irb/context.rb#327 - def back_trace_limit=(_arg0); end - - # User-defined IRB command aliases - # - # source://irb//lib/irb/context.rb#330 - def command_aliases; end - - # User-defined IRB command aliases - # - # source://irb//lib/irb/context.rb#330 - def command_aliases=(_arg0); end - - # Whether to echo the return value to output or not. - # - # Uses IRB.conf[:ECHO] if available, or defaults to +true+. - # - # puts "hello" - # # hello - # #=> nil - # IRB.CurrentContext.echo = false - # puts "omg" - # # omg - # - # source://irb//lib/irb/context.rb#265 - def echo; end - - # Whether to echo the return value to output or not. - # - # Uses IRB.conf[:ECHO] if available, or defaults to +true+. - # - # puts "hello" - # # hello - # #=> nil - # IRB.CurrentContext.echo = false - # puts "omg" - # # omg - # - # source://irb//lib/irb/context.rb#265 - def echo=(_arg0); end - - # Whether to echo the return value to output or not. - # - # Uses IRB.conf[:ECHO] if available, or defaults to +true+. - # - # puts "hello" - # # hello - # #=> nil - # IRB.CurrentContext.echo = false - # puts "omg" - # # omg - # - # source://irb//lib/irb/context.rb#265 - def echo?; end - - # Whether to echo for assignment expressions. - # - # If set to +false+, the value of assignment will not be shown. - # - # If set to +true+, the value of assignment will be shown. - # - # If set to +:truncate+, the value of assignment will be shown and truncated. - # - # It defaults to +:truncate+. - # - # a = "omg" - # #=> omg - # - # a = "omg" * 10 - # #=> omgomgomgomgomgomgomg... - # - # IRB.CurrentContext.echo_on_assignment = false - # a = "omg" - # - # IRB.CurrentContext.echo_on_assignment = true - # a = "omg" * 10 - # #=> omgomgomgomgomgomgomgomgomgomg - # - # To set the behaviour of showing on assignment in irb: - # - # IRB.conf[:ECHO_ON_ASSIGNMENT] = :truncate or true or false - # - # or - # - # irb_context.echo_on_assignment = :truncate or true or false - # - # or - # - # IRB.CurrentContext.echo_on_assignment = :truncate or true or false - # - # source://irb//lib/irb/context.rb#300 - def echo_on_assignment; end - - # Whether to echo for assignment expressions. - # - # If set to +false+, the value of assignment will not be shown. - # - # If set to +true+, the value of assignment will be shown. - # - # If set to +:truncate+, the value of assignment will be shown and truncated. - # - # It defaults to +:truncate+. - # - # a = "omg" - # #=> omg - # - # a = "omg" * 10 - # #=> omgomgomgomgomgomgomg... - # - # IRB.CurrentContext.echo_on_assignment = false - # a = "omg" - # - # IRB.CurrentContext.echo_on_assignment = true - # a = "omg" * 10 - # #=> omgomgomgomgomgomgomgomgomgomg - # - # To set the behaviour of showing on assignment in irb: - # - # IRB.conf[:ECHO_ON_ASSIGNMENT] = :truncate or true or false - # - # or - # - # irb_context.echo_on_assignment = :truncate or true or false - # - # or - # - # IRB.CurrentContext.echo_on_assignment = :truncate or true or false - # - # source://irb//lib/irb/context.rb#300 - def echo_on_assignment=(_arg0); end - - # Whether to echo for assignment expressions. - # - # If set to +false+, the value of assignment will not be shown. - # - # If set to +true+, the value of assignment will be shown. - # - # If set to +:truncate+, the value of assignment will be shown and truncated. - # - # It defaults to +:truncate+. - # - # a = "omg" - # #=> omg - # - # a = "omg" * 10 - # #=> omgomgomgomgomgomgomg... - # - # IRB.CurrentContext.echo_on_assignment = false - # a = "omg" - # - # IRB.CurrentContext.echo_on_assignment = true - # a = "omg" * 10 - # #=> omgomgomgomgomgomgomgomgomgomg - # - # To set the behaviour of showing on assignment in irb: - # - # IRB.conf[:ECHO_ON_ASSIGNMENT] = :truncate or true or false - # - # or - # - # irb_context.echo_on_assignment = :truncate or true or false - # - # or - # - # IRB.CurrentContext.echo_on_assignment = :truncate or true or false - # - # source://irb//lib/irb/context.rb#300 - def echo_on_assignment?; end - - # Sets command result history limit. Default value is set from - # IRB.conf[:EVAL_HISTORY]. - # - # +no+ is an Integer or +nil+. - # - # Returns +no+ of history items if greater than 0. - # - # If +no+ is 0, the number of history items is unlimited. - # - # If +no+ is +nil+, execution result history isn't used (default). - # - # History values are available via __ variable, see - # IRB::History. - # - # source://irb//lib/irb/extend-command.rb#339 - def eval_history=(*opts, &b); end - - # source://irb//lib/irb/context.rb#476 - def evaluate(line, line_no, exception: T.unsafe(nil)); end - - # Exits the current session, see IRB.irb_exit - # - # source://irb//lib/irb/context.rb#506 - def exit(ret = T.unsafe(nil)); end - - # Specify the installation locations of the ri file to be displayed in the - # document dialog. - # - # source://irb//lib/irb/context.rb#254 - def extra_doc_dirs; end - - # Specify the installation locations of the ri file to be displayed in the - # document dialog. - # - # source://irb//lib/irb/context.rb#254 - def extra_doc_dirs=(_arg0); end - - # Whether #io uses a File for the +input_method+ passed when creating the - # current context, see ::new - # - # @return [Boolean] - # - # source://irb//lib/irb/context.rb#416 - def file_input?; end - - # Whether ^D (+control-d+) will be ignored or not. - # - # If set to +false+, ^D will quit irb. - # - # source://irb//lib/irb/context.rb#251 - def ignore_eof; end - - # Whether ^D (+control-d+) will be ignored or not. - # - # If set to +false+, ^D will quit irb. - # - # source://irb//lib/irb/context.rb#251 - def ignore_eof=(_arg0); end - - # Whether ^D (+control-d+) will be ignored or not. - # - # If set to +false+, ^D will quit irb. - # - # source://irb//lib/irb/context.rb#251 - def ignore_eof?; end - - # Whether ^C (+control-c+) will be ignored or not. - # - # If set to +false+, ^C will quit irb. - # - # If set to +true+, - # - # * during input: cancel input then return to top level. - # * during execute: abandon current execution. - # - # source://irb//lib/irb/context.rb#247 - def ignore_sigint; end - - # Whether ^C (+control-c+) will be ignored or not. - # - # If set to +false+, ^C will quit irb. - # - # If set to +true+, - # - # * during input: cancel input then return to top level. - # * during execute: abandon current execution. - # - # source://irb//lib/irb/context.rb#247 - def ignore_sigint=(_arg0); end - - # Whether ^C (+control-c+) will be ignored or not. - # - # If set to +false+, ^C will quit irb. - # - # If set to +true+, - # - # * during input: cancel input then return to top level. - # * during execute: abandon current execution. - # - # source://irb//lib/irb/context.rb#247 - def ignore_sigint?; end - - # source://irb//lib/irb/context.rb#517 - def inspect; end - - # Whether #inspect_mode is set or not, see #inspect_mode= for more detail. - # - # @return [Boolean] - # - # source://irb//lib/irb/context.rb#410 - def inspect?; end - - # source://irb//lib/irb/context.rb#500 - def inspect_last_value; end - - # A copy of the default IRB.conf[:INSPECT_MODE] - # - # source://irb//lib/irb/context.rb#200 - def inspect_mode; end - - # Specifies the inspect mode with +opt+: - # - # +true+:: display +inspect+ - # +false+:: display +to_s+ - # +nil+:: inspect mode in non-math mode, - # non-inspect mode in math mode - # - # See IRB::Inspector for more information. - # - # Can also be set using the +--inspect+ and +--noinspect+ command line - # options. - # - # See IRB@Command+line+options for more command line options. - # - # source://irb//lib/irb/context.rb#433 - def inspect_mode=(opt); end - - # The current input method. - # - # Can be either StdioInputMethod, ReadlineInputMethod, - # RelineInputMethod, FileInputMethod or other specified when the - # context is created. See ::new for more # information on +input_method+. - # - # source://irb//lib/irb/context.rb#170 - def io; end - - # The current input method. - # - # Can be either StdioInputMethod, ReadlineInputMethod, - # RelineInputMethod, FileInputMethod or other specified when the - # context is created. See ::new for more # information on +input_method+. - # - # source://irb//lib/irb/context.rb#170 - def io=(_arg0); end - - # Current irb session. - # - # source://irb//lib/irb/context.rb#173 - def irb; end - - # Current irb session. - # - # source://irb//lib/irb/context.rb#173 - def irb=(_arg0); end - - # Can be either name from IRB.conf[:IRB_NAME], or the number of - # the current job set by JobManager, such as irb#2 - # - # source://irb//lib/irb/context.rb#182 - def irb_name; end - - # Can be either name from IRB.conf[:IRB_NAME], or the number of - # the current job set by JobManager, such as irb#2 - # - # source://irb//lib/irb/context.rb#182 - def irb_name=(_arg0); end - - # Can be either the #irb_name surrounded by parenthesis, or the - # +input_method+ passed to Context.new - # - # source://irb//lib/irb/context.rb#185 - def irb_path; end - - # Can be either the #irb_name surrounded by parenthesis, or the - # +input_method+ passed to Context.new - # - # source://irb//lib/irb/context.rb#185 - def irb_path=(_arg0); end - - # The return value of the last statement evaluated. - # - # source://irb//lib/irb/context.rb#381 - def last_value; end - - # A copy of the default IRB.conf[:LOAD_MODULES] - # - # source://irb//lib/irb/context.rb#179 - def load_modules; end - - # A copy of the default IRB.conf[:LOAD_MODULES] - # - # source://irb//lib/irb/context.rb#179 - def load_modules=(_arg0); end - - # source://irb//lib/irb/context.rb#539 - def local_variables; end - - # The top-level workspace, see WorkSpace#main - # - # source://irb//lib/irb/context.rb#155 - def main; end - - # Whether a newline is put before multiline output. - # - # Uses IRB.conf[:NEWLINE_BEFORE_MULTILINE_OUTPUT] if available, - # or defaults to +true+. - # - # "abc\ndef" - # #=> - # abc - # def - # IRB.CurrentContext.newline_before_multiline_output = false - # "abc\ndef" - # #=> abc - # def - # - # source://irb//lib/irb/context.rb#314 - def newline_before_multiline_output; end - - # Whether a newline is put before multiline output. - # - # Uses IRB.conf[:NEWLINE_BEFORE_MULTILINE_OUTPUT] if available, - # or defaults to +true+. - # - # "abc\ndef" - # #=> - # abc - # def - # IRB.CurrentContext.newline_before_multiline_output = false - # "abc\ndef" - # #=> abc - # def - # - # source://irb//lib/irb/context.rb#314 - def newline_before_multiline_output=(_arg0); end - - # Whether a newline is put before multiline output. - # - # Uses IRB.conf[:NEWLINE_BEFORE_MULTILINE_OUTPUT] if available, - # or defaults to +true+. - # - # "abc\ndef" - # #=> - # abc - # def - # IRB.CurrentContext.newline_before_multiline_output = false - # "abc\ndef" - # #=> abc - # def - # - # source://irb//lib/irb/context.rb#314 - def newline_before_multiline_output?; end - - # IRB prompt for continuated statement. (e.g. immediately after an +if+) - # - # See IRB@Customizing+the+IRB+Prompt for more information. - # - # source://irb//lib/irb/context.rb#215 - def prompt_c; end - - # IRB prompt for continuated statement. (e.g. immediately after an +if+) - # - # See IRB@Customizing+the+IRB+Prompt for more information. - # - # source://irb//lib/irb/context.rb#215 - def prompt_c=(_arg0); end - - # Standard IRB prompt. - # - # See IRB@Customizing+the+IRB+Prompt for more information. - # - # source://irb//lib/irb/context.rb#207 - def prompt_i; end - - # Standard IRB prompt. - # - # See IRB@Customizing+the+IRB+Prompt for more information. - # - # source://irb//lib/irb/context.rb#207 - def prompt_i=(_arg0); end - - # A copy of the default IRB.conf[:PROMPT_MODE] - # - # source://irb//lib/irb/context.rb#203 - def prompt_mode; end - - # Sets the +mode+ of the prompt in this context. - # - # See IRB@Customizing+the+IRB+Prompt for more information. - # - # source://irb//lib/irb/context.rb#393 - def prompt_mode=(mode); end - - # See IRB@Customizing+the+IRB+Prompt for more information. - # - # source://irb//lib/irb/context.rb#217 - def prompt_n; end - - # See IRB@Customizing+the+IRB+Prompt for more information. - # - # source://irb//lib/irb/context.rb#217 - def prompt_n=(_arg0); end - - # IRB prompt for continuated strings. - # - # See IRB@Customizing+the+IRB+Prompt for more information. - # - # source://irb//lib/irb/context.rb#211 - def prompt_s; end - - # IRB prompt for continuated strings. - # - # See IRB@Customizing+the+IRB+Prompt for more information. - # - # source://irb//lib/irb/context.rb#211 - def prompt_s=(_arg0); end - - # Whether #verbose? is +true+, and +input_method+ is either - # StdioInputMethod or RelineInputMethod or ReadlineInputMethod, see #io - # for more information. - # - # @return [Boolean] - # - # source://irb//lib/irb/context.rb#374 - def prompting?; end - - # A copy of the default IRB.conf[:RC] - # - # source://irb//lib/irb/context.rb#177 - def rc; end - - # A copy of the default IRB.conf[:RC] - # - # source://irb//lib/irb/context.rb#177 - def rc=(_arg0); end - - # A copy of the default IRB.conf[:RC] - # Alias for #rc - # - # source://irb//lib/irb/context.rb#177 - def rc?; end - - # The format of the return statement, set by #prompt_mode= using the - # +:RETURN+ of the +mode+ passed to set the current #prompt_mode. - # - # source://irb//lib/irb/context.rb#237 - def return_format; end - - # The format of the return statement, set by #prompt_mode= using the - # +:RETURN+ of the +mode+ passed to set the current #prompt_mode. - # - # source://irb//lib/irb/context.rb#237 - def return_format=(_arg0); end - - # Sets IRB.conf[:SAVE_HISTORY] to the given +val+ and calls - # #init_save_history with this context. - # - # Will store the number of +val+ entries of history in the #history_file - # - # Add the following to your +.irbrc+ to change the number of history - # entries stored to 1000: - # - # IRB.conf[:SAVE_HISTORY] = 1000 - # - # source://irb//lib/irb/extend-command.rb#339 - def save_history=(*opts, &b); end - - # Sets the return value from the last statement evaluated in this context - # to #last_value. - # - # source://irb//lib/irb/context.rb#385 - def set_last_value(value); end - - # Return true if it's aliased from the argument and it's not an identifier. - # - # @return [Boolean] - # - # source://irb//lib/irb/context.rb#544 - def symbol_alias?(command); end - - # The current thread in this context. - # - # source://irb//lib/irb/context.rb#164 - def thread; end - - # source://irb//lib/irb/context.rb#517 - def to_s; end - - # Return true if the command supports transforming args - # - # @return [Boolean] - # - # source://irb//lib/irb/context.rb#550 - def transform_args?(command); end - - # Whether colorization is enabled or not. - # - # A copy of the default IRB.conf[:USE_AUTOCOMPLETE] - # - # source://irb//lib/irb/context.rb#198 - def use_autocomplete; end - - # Whether colorization is enabled or not. - # - # A copy of the default IRB.conf[:USE_AUTOCOMPLETE] - # Alias for #use_autocomplete - # - # source://irb//lib/irb/context.rb#198 - def use_autocomplete?; end - - # Sets IRB.conf[:USE_LOADER] - # - # See #use_loader for more information. - # - # source://irb//lib/irb/extend-command.rb#339 - def use_loader=(*opts, &b); end - - # Whether multiline editor mode is enabled or not. - # - # A copy of the default IRB.conf[:USE_MULTILINE] - # - # source://irb//lib/irb/context.rb#190 - def use_multiline; end - - # Whether multiline editor mode is enabled or not. - # - # A copy of the default IRB.conf[:USE_MULTILINE] - # Alias for #use_multiline - # - # source://irb//lib/irb/context.rb#190 - def use_multiline?; end - - # Whether singleline editor mode is enabled or not. - # - # A copy of the default IRB.conf[:USE_SINGLELINE] - # backward compatibility - # - # source://irb//lib/irb/context.rb#194 - def use_readline; end - - # Whether singleline editor mode is enabled or not. - # - # A copy of the default IRB.conf[:USE_SINGLELINE] - # backward compatibility - # - # source://irb//lib/irb/context.rb#194 - def use_readline?; end - - # Whether multiline editor mode is enabled or not. - # - # A copy of the default IRB.conf[:USE_MULTILINE] - # backward compatibility - # - # source://irb//lib/irb/context.rb#190 - def use_reline; end - - # Whether multiline editor mode is enabled or not. - # - # A copy of the default IRB.conf[:USE_MULTILINE] - # backward compatibility - # - # source://irb//lib/irb/context.rb#190 - def use_reline?; end - - # Whether singleline editor mode is enabled or not. - # - # A copy of the default IRB.conf[:USE_SINGLELINE] - # - # source://irb//lib/irb/context.rb#194 - def use_singleline; end - - # Whether singleline editor mode is enabled or not. - # - # A copy of the default IRB.conf[:USE_SINGLELINE] - # Alias for #use_singleline - # - # source://irb//lib/irb/context.rb#194 - def use_singleline?; end - - # Sets whether or not to use the Tracer library when evaluating statements - # in this context. - # - # See +lib/tracer.rb+ for more information. - # - # source://irb//lib/irb/extend-command.rb#339 - def use_tracer=(*opts, &b); end - - # Whether verbose messages are displayed or not. - # - # A copy of the default IRB.conf[:VERBOSE] - # - # source://irb//lib/irb/context.rb#318 - def verbose; end - - # Whether verbose messages are displayed or not. - # - # A copy of the default IRB.conf[:VERBOSE] - # - # source://irb//lib/irb/context.rb#318 - def verbose=(_arg0); end - - # Returns whether messages are displayed or not. - # - # @return [Boolean] - # - # source://irb//lib/irb/context.rb#355 - def verbose?; end - - # WorkSpace in the current context. - # - # source://irb//lib/irb/context.rb#162 - def workspace; end - - # WorkSpace in the current context. - # - # source://irb//lib/irb/context.rb#162 - def workspace=(_arg0); end - - # The toplevel workspace, see #home_workspace - # - # source://irb//lib/irb/context.rb#160 - def workspace_home; end -end - -# source://irb//lib/irb/context.rb#514 -IRB::Context::IDNAME_IVARS = T.let(T.unsafe(nil), Array) - -# source://irb//lib/irb/context.rb#512 -IRB::Context::NOPRINTING_IVARS = T.let(T.unsafe(nil), Array) - -# source://irb//lib/irb/context.rb#513 -IRB::Context::NO_INSPECTING_IVARS = T.let(T.unsafe(nil), Array) - -# Extends methods for the Context module -# -# source://irb//lib/irb/extend-command.rb#311 -module IRB::ContextExtender - class << self - # Evaluate the given +command+ from the given +load_file+ on the Context - # module. - # - # Will also define any given +aliases+ for the method. - # - # source://irb//lib/irb/extend-command.rb#337 - def def_extend_command(cmd_name, load_file, *aliases); end - - # Installs the default context extensions as irb commands: - # - # Context#eval_history=:: +irb/ext/history.rb+ - # Context#use_tracer=:: +irb/ext/tracer.rb+ - # Context#use_loader=:: +irb/ext/use-loader.rb+ - # Context#save_history=:: +irb/ext/save-history.rb+ - # - # source://irb//lib/irb/extend-command.rb#327 - def install_extend_commands; end - end -end - -# Installs the default irb extensions command bundle. -# -# source://irb//lib/irb/extend-command.rb#9 -module IRB::ExtendCommandBundle - # Installs alias methods for the default irb commands, see - # ::install_extend_commands. - # - # source://irb//lib/irb/extend-command.rb#272 - def install_alias_method(to, from, override = T.unsafe(nil)); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_backtrace(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_break(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_catch(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_change_workspace(*opts, **kwargs, &b); end - - # Displays current configuration. - # - # Modifying the configuration is achieved by sending a message to IRB.conf. - # - # source://irb//lib/irb/extend-command.rb#31 - def irb_context; end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_continue(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_current_working_workspace(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_debug(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_debug_info(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_delete(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_edit(*opts, **kwargs, &b); end - - # Quits the current irb context - # - # +ret+ is the optional signal or message to send to Context#exit - # - # Same as IRB.CurrentContext.exit. - # - # source://irb//lib/irb/extend-command.rb#24 - def irb_exit(ret = T.unsafe(nil)); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_fg(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_finish(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_help(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_info(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_jobs(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_kill(*opts, **kwargs, &b); end - - # Loads the given file similarly to Kernel#load, see IrbLoader#irb_load - # - # source://irb//lib/irb/extend-command.rb#259 - def irb_load(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_ls(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_measure(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_next(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_pop_workspace(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_push_workspace(*opts, **kwargs, &b); end - - # Loads the given file similarly to Kernel#require - # - # source://irb//lib/irb/extend-command.rb#259 - def irb_require(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_show_cmds(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_show_source(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_source(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_step(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_whereami(*opts, **kwargs, &b); end - - # source://irb//lib/irb/extend-command.rb#259 - def irb_workspaces(*opts, **kwargs, &b); end - - class << self - # source://irb//lib/irb/extend-command.rb#196 - def all_commands_info; end - - # Evaluate the given +cmd_name+ on the given +cmd_class+ Class. - # - # Will also define any given +aliases+ for the method. - # - # The optional +load_file+ parameter will be required within the method - # definition. - # - # source://irb//lib/irb/extend-command.rb#249 - def def_extend_command(cmd_name, cmd_class, load_file, *aliases); end - - # Installs alias methods for the default irb commands on the given object - # using #install_alias_method. - # - # source://irb//lib/irb/extend-command.rb#298 - def extend_object(obj); end - - # Installs the default irb commands. - # - # source://irb//lib/irb/extend-command.rb#237 - def install_extend_commands; end - - # source://irb//lib/irb/extend-command.rb#292 - def irb_original_method_name(method_name); end - - # Convert a command name to its implementation class if such command exists - # - # source://irb//lib/irb/extend-command.rb#223 - def load_command(command); end - end -end - -# source://irb//lib/irb/extend-command.rb#10 -IRB::ExtendCommandBundle::EXCB = IRB::ExtendCommandBundle - -# Use a File for IO with irb, see InputMethod -# -# source://irb//lib/irb/input-method.rb#120 -class IRB::FileInputMethod < ::IRB::InputMethod - # Creates a new input method object - # - # @return [FileInputMethod] a new instance of FileInputMethod - # - # source://irb//lib/irb/input-method.rb#133 - def initialize(file); end - - # source://irb//lib/irb/input-method.rb#167 - def close; end - - # The external encoding for standard input. - # - # source://irb//lib/irb/input-method.rb#158 - def encoding; end - - # Whether the end of this input method has been reached, returns +true+ if - # there is no more data to read. - # - # See IO#eof? for more information. - # - # @return [Boolean] - # - # source://irb//lib/irb/input-method.rb#145 - def eof?; end - - # The file name of this input method, usually given during initialization. - # - # source://irb//lib/irb/input-method.rb#139 - def file_name; end - - # Reads the next line from this input method. - # - # See IO#gets for more information. - # - # source://irb//lib/irb/input-method.rb#152 - def gets; end - - # For debug message - # - # source://irb//lib/irb/input-method.rb#163 - def inspect; end - - class << self - # source://irb//lib/irb/input-method.rb#122 - def open(file, &block); end - end -end - -# source://irb//lib/irb/init.rb#372 -IRB::IRBRC_EXT = T.let(T.unsafe(nil), String) - -# source://irb//lib/irb/completion.rb#11 -module IRB::InputCompletor - class << self - # source://irb//lib/irb/completion.rb#159 - def retrieve_completion_data(input, bind: T.unsafe(nil), doc_namespace: T.unsafe(nil)); end - - # source://irb//lib/irb/completion.rb#87 - def retrieve_files_to_require_from_load_path; end - - # source://irb//lib/irb/completion.rb#106 - def retrieve_files_to_require_relative_from_current_dir; end - - # source://irb//lib/irb/completion.rb#76 - def retrieve_gem_and_system_load_path; end - - # source://irb//lib/irb/completion.rb#434 - def select_message(receiver, message, candidates, sep = T.unsafe(nil)); end - end -end - -# source://irb//lib/irb/completion.rb#59 -IRB::InputCompletor::BASIC_WORD_BREAK_CHARACTERS = T.let(T.unsafe(nil), String) - -# source://irb//lib/irb/completion.rb#147 -IRB::InputCompletor::CompletionProc = T.let(T.unsafe(nil), Proc) - -# source://irb//lib/irb/completion.rb#112 -IRB::InputCompletor::CompletionRequireProc = T.let(T.unsafe(nil), Proc) - -# source://irb//lib/irb/completion.rb#61 -IRB::InputCompletor::GEM_PATHS = T.let(T.unsafe(nil), Array) - -# Set of available operators in Ruby -# -# source://irb//lib/irb/completion.rb#432 -IRB::InputCompletor::Operators = T.let(T.unsafe(nil), Array) - -# source://irb//lib/irb/completion.rb#397 -IRB::InputCompletor::PerfectMatchedProc = T.let(T.unsafe(nil), Proc) - -# Set of reserved words used by Ruby, you should not use these for -# constants or variables -# -# source://irb//lib/irb/completion.rb#38 -IRB::InputCompletor::ReservedWords = T.let(T.unsafe(nil), Array) - -# source://irb//lib/irb/input-method.rb#15 -class IRB::InputMethod - # Creates a new input method object - # - # @return [InputMethod] a new instance of InputMethod - # - # source://irb//lib/irb/input-method.rb#18 - def initialize(file = T.unsafe(nil)); end - - # The file name of this input method, usually given during initialization. - # - # source://irb//lib/irb/input-method.rb#22 - def file_name; end - - # Reads the next line from this input method. - # - # See IO#gets for more information. - # - # source://irb//lib/irb/input-method.rb#30 - def gets; end - - # For debug message - # - # source://irb//lib/irb/input-method.rb#52 - def inspect; end - - # The irb prompt associated with this input method - # - # source://irb//lib/irb/input-method.rb#25 - def prompt; end - - # The irb prompt associated with this input method - # - # source://irb//lib/irb/input-method.rb#25 - def prompt=(_arg0); end - - # Whether this input method is still readable when there is no more data to - # read. - # - # See IO#eof for more information. - # - # @return [Boolean] - # - # source://irb//lib/irb/input-method.rb#47 - def readable_after_eof?; end - - # source://irb//lib/irb/input-method.rb#35 - def winsize; end -end - -# An irb inspector -# -# In order to create your own custom inspector there are two things you -# should be aware of: -# -# Inspector uses #inspect_value, or +inspect_proc+, for output of return values. -# -# This also allows for an optional #init+, or +init_proc+, which is called -# when the inspector is activated. -# -# Knowing this, you can create a rudimentary inspector as follows: -# -# irb(main):001:0> ins = IRB::Inspector.new(proc{ |v| "omg! #{v}" }) -# irb(main):001:0> IRB.CurrentContext.inspect_mode = ins # => omg! # -# irb(main):001:0> "what?" #=> omg! what? -# -# source://irb//lib/irb/inspector.rb#37 -class IRB::Inspector - # Creates a new inspector object, using the given +inspect_proc+ when - # output return values in irb. - # - # @return [Inspector] a new instance of Inspector - # - # source://irb//lib/irb/inspector.rb#83 - def initialize(inspect_proc, init_proc = T.unsafe(nil)); end - - # Proc to call when the inspector is activated, good for requiring - # dependent libraries. - # - # source://irb//lib/irb/inspector.rb#90 - def init; end - - # Proc to call when the input is evaluated and output in irb. - # - # source://irb//lib/irb/inspector.rb#95 - def inspect_value(v); end - - class << self - # Example - # - # Inspector.def_inspector(key, init_p=nil){|v| v.inspect} - # Inspector.def_inspector([key1,..], init_p=nil){|v| v.inspect} - # Inspector.def_inspector(key, inspector) - # Inspector.def_inspector([key1,...], inspector) - # - # source://irb//lib/irb/inspector.rb#58 - def def_inspector(key, arg = T.unsafe(nil), &block); end - - # Determines the inspector to use where +inspector+ is one of the keys passed - # during inspector definition. - # - # source://irb//lib/irb/inspector.rb#48 - def keys_with_inspector(inspector); end - end -end - -# source://irb//lib/irb/inspector.rb#38 -IRB::Inspector::KERNEL_INSPECT = T.let(T.unsafe(nil), UnboundMethod) - -# source://irb//lib/irb.rb#431 -class IRB::Irb - # Creates a new irb session - # - # @return [Irb] a new instance of Irb - # - # source://irb//lib/irb.rb#466 - def initialize(workspace = T.unsafe(nil), input_method = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://irb//lib/irb.rb#877 - def assignment_expression?(line); end - - # Returns the current context of this irb session - # - # source://irb//lib/irb.rb#503 - def context; end - - # source://irb//lib/irb.rb#607 - def convert_invalid_byte_sequence(str, enc); end - - # A hook point for `debug` command's TracePoint after :IRB_EXIT as well as its clean-up - # - # source://irb//lib/irb.rb#474 - def debug_break; end - - # source://irb//lib/irb.rb#614 - def encode_with_invalid_byte_sequence(str, enc); end - - # Evaluates input for this session. - # - # source://irb//lib/irb.rb#508 - def eval_input; end - - # source://irb//lib/irb.rb#636 - def handle_exception(exc); end - - # Outputs the local variables to this current session, including - # #signal_status and #context, using IRB::Locale. - # - # source://irb//lib/irb.rb#862 - def inspect; end - - # source://irb//lib/irb.rb#824 - def output_value(omit = T.unsafe(nil)); end - - # source://irb//lib/irb.rb#785 - def prompt(prompt, ltype, indent, line_no); end - - # source://irb//lib/irb.rb#484 - def run(conf = T.unsafe(nil)); end - - # The lexer used by this irb session - # - # source://irb//lib/irb.rb#505 - def scanner; end - - # The lexer used by this irb session - # - # source://irb//lib/irb.rb#505 - def scanner=(_arg0); end - - # Handler for the signal SIGINT, see Kernel#trap for more information. - # - # source://irb//lib/irb.rb#742 - def signal_handle; end - - # Evaluates the given block using the given +status+. - # - # source://irb//lib/irb.rb#764 - def signal_status(status); end - - # Evaluates the given block using the given +context+ as the Context. - # - # source://irb//lib/irb.rb#732 - def suspend_context(context); end - - # Evaluates the given block using the given +input_method+ as the - # Context#io. - # - # Used by the irb commands +source+ and +irb_load+, see IRB@IRB+Sessions - # for more information. - # - # source://irb//lib/irb.rb#721 - def suspend_input_method(input_method); end - - # Evaluates the given block using the given +path+ as the Context#irb_path - # and +name+ as the Context#irb_name. - # - # Used by the irb command +source+, see IRB@IRB+Sessions for more - # information. - # - # source://irb//lib/irb.rb#691 - def suspend_name(path = T.unsafe(nil), name = T.unsafe(nil)); end - - # Evaluates the given block using the given +workspace+ as the - # Context#workspace. - # - # Used by the irb command +irb_load+, see IRB@IRB+Sessions for more - # information. - # - # source://irb//lib/irb.rb#707 - def suspend_workspace(workspace); end - - # source://irb//lib/irb.rb#776 - def truncate_prompt_main(str); end -end - -# source://irb//lib/irb.rb#432 -IRB::Irb::ASSIGNMENT_NODE_TYPES = T.let(T.unsafe(nil), Array) - -# source://irb//lib/irb.rb#463 -IRB::Irb::CONTROL_CHARACTERS_PATTERN = T.let(T.unsafe(nil), String) - -# Note: instance and index assignment expressions could also be written like: -# "foo.bar=(1)" and "foo.[]=(1, bar)", when expressed that way, the former -# be parsed as :assign and echo will be suppressed, but the latter is -# parsed as a :method_add_arg and the output won't be suppressed -# -# source://irb//lib/irb.rb#461 -IRB::Irb::PROMPT_MAIN_TRUNCATE_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://irb//lib/irb.rb#462 -IRB::Irb::PROMPT_MAIN_TRUNCATE_OMISSION = T.let(T.unsafe(nil), String) - -# source://irb//lib/irb/locale.rb#8 -class IRB::Locale - # @return [Locale] a new instance of Locale - # - # source://irb//lib/irb/locale.rb#21 - def initialize(locale = T.unsafe(nil)); end - - # source://irb//lib/irb/locale.rb#45 - def String(mes); end - - # source://irb//lib/irb/locale.rb#41 - def encoding; end - - # source://irb//lib/irb/locale.rb#120 - def find(file, paths = T.unsafe(nil)); end - - # source://irb//lib/irb/locale.rb#54 - def format(*opts); end - - # source://irb//lib/irb/locale.rb#58 - def gets(*rs); end - - # Returns the value of attribute lang. - # - # source://irb//lib/irb/locale.rb#39 - def lang; end - - # source://irb//lib/irb/locale.rb#108 - def load(file, priv = T.unsafe(nil)); end - - # Returns the value of attribute modifier. - # - # source://irb//lib/irb/locale.rb#39 - def modifier; end - - # source://irb//lib/irb/locale.rb#66 - def print(*opts); end - - # source://irb//lib/irb/locale.rb#71 - def printf(*opts); end - - # source://irb//lib/irb/locale.rb#76 - def puts(*opts); end - - # source://irb//lib/irb/locale.rb#62 - def readline(*rs); end - - # source://irb//lib/irb/locale.rb#81 - def require(file, priv = T.unsafe(nil)); end - - # Returns the value of attribute territory. - # - # source://irb//lib/irb/locale.rb#39 - def territory; end - - private - - # source://irb//lib/irb/locale.rb#159 - def each_localized_path(dir, file); end - - # @yield [nil] - # - # source://irb//lib/irb/locale.rb#166 - def each_sublocale; end - - # source://irb//lib/irb/locale.rb#133 - def real_load(path, priv); end - - # typically, for the parameters and a in paths, it searches - # /// - # - # @param paths load paths in which IRB find a localized file. - # @param dir directory - # @param file basename to be localized - # - # source://irb//lib/irb/locale.rb#148 - def search_file(lib_paths, dir, file); end - - def toplevel_load(*_arg0); end -end - -# source://irb//lib/irb/locale.rb#16 -IRB::Locale::LOCALE_DIR = T.let(T.unsafe(nil), String) - -# source://irb//lib/irb/locale.rb#10 -IRB::Locale::LOCALE_NAME_RE = T.let(T.unsafe(nil), Regexp) - -# source://irb//lib/irb/magic-file.rb#3 -IRB::MagicFile = T.let(T.unsafe(nil), Object) - -# An output formatter used internally by the lexer. -# -# source://irb//lib/irb/notifier.rb#11 -module IRB::Notifier - private - - # Define a new Notifier output source, returning a new CompositeNotifier - # with the given +prefix+ and +output_method+. - # - # The optional +prefix+ will be appended to all objects being inspected - # during output, using the given +output_method+ as the output source. If - # no +output_method+ is given, StdioOutputMethod will be used, and all - # expressions will be sent directly to STDOUT without any additional - # formatting. - # - # source://irb//lib/irb/notifier.rb#31 - def def_notifier(prefix = T.unsafe(nil), output_method = T.unsafe(nil)); end - - class << self - # Define a new Notifier output source, returning a new CompositeNotifier - # with the given +prefix+ and +output_method+. - # - # The optional +prefix+ will be appended to all objects being inspected - # during output, using the given +output_method+ as the output source. If - # no +output_method+ is given, StdioOutputMethod will be used, and all - # expressions will be sent directly to STDOUT without any additional - # formatting. - # - # source://irb//lib/irb/notifier.rb#31 - def def_notifier(prefix = T.unsafe(nil), output_method = T.unsafe(nil)); end - end -end - -# An abstract class, or superclass, for CompositeNotifier and -# LeveledNotifier to inherit. It provides several wrapper methods for the -# OutputMethod object used by the Notifier. -# -# source://irb//lib/irb/notifier.rb#39 -class IRB::Notifier::AbstractNotifier - # Creates a new Notifier object - # - # @return [AbstractNotifier] a new instance of AbstractNotifier - # - # source://irb//lib/irb/notifier.rb#41 - def initialize(prefix, base_notifier); end - - # Execute the given block if notifications are enabled. - # - # @yield [@base_notifier] - # - # source://irb//lib/irb/notifier.rb#99 - def exec_if; end - - # A wrapper method used to determine whether notifications are enabled. - # - # Defaults to +true+. - # - # @return [Boolean] - # - # source://irb//lib/irb/notifier.rb#53 - def notify?; end - - # Same as #ppx, except it uses the #prefix given during object - # initialization. - # See OutputMethod#ppx for more detail. - # - # source://irb//lib/irb/notifier.rb#82 - def pp(*objs); end - - # Same as #pp, except it concatenates the given +prefix+ with the #prefix - # given during object initialization. - # - # See OutputMethod#ppx for more detail. - # - # source://irb//lib/irb/notifier.rb#92 - def ppx(prefix, *objs); end - - # The +prefix+ for this Notifier, which is appended to all objects being - # inspected during output. - # - # source://irb//lib/irb/notifier.rb#48 - def prefix; end - - # See OutputMethod#print for more detail. - # - # source://irb//lib/irb/notifier.rb#58 - def print(*opts); end - - # See OutputMethod#printf for more detail. - # - # source://irb//lib/irb/notifier.rb#68 - def printf(format, *opts); end - - # See OutputMethod#printn for more detail. - # - # source://irb//lib/irb/notifier.rb#63 - def printn(*opts); end - - # See OutputMethod#puts for more detail. - # - # source://irb//lib/irb/notifier.rb#73 - def puts(*objs); end -end - -# A class that can be used to create a group of notifier objects with the -# intent of representing a leveled notification system for irb. -# -# This class will allow you to generate other notifiers, and assign them -# the appropriate level for output. -# -# The Notifier class provides a class-method Notifier.def_notifier to -# create a new composite notifier. Using the first composite notifier -# object you create, sibling notifiers can be initialized with -# #def_notifier. -# -# source://irb//lib/irb/notifier.rb#116 -class IRB::Notifier::CompositeNotifier < ::IRB::Notifier::AbstractNotifier - # Create a new composite notifier object with the given +prefix+, and - # +base_notifier+ to use for output. - # - # @return [CompositeNotifier] a new instance of CompositeNotifier - # - # source://irb//lib/irb/notifier.rb#117 - def initialize(prefix, base_notifier); end - - # Creates a new LeveledNotifier in the composite #notifiers group. - # - # The given +prefix+ will be assigned to the notifier, and +level+ will - # be used as the index of the #notifiers Array. - # - # This method returns the newly created instance. - # - # source://irb//lib/irb/notifier.rb#133 - def def_notifier(level, prefix = T.unsafe(nil)); end - - # Returns the leveled notifier for this object - # - # source://irb//lib/irb/notifier.rb#140 - def level; end - - # Sets the leveled notifier for this object. - # - # When the given +value+ is an instance of AbstractNotifier, - # #level_notifier is set to the given object. - # - # When an Integer is given, #level_notifier is set to the notifier at the - # index +value+ in the #notifiers Array. - # - # If no notifier exists at the index +value+ in the #notifiers Array, an - # ErrUndefinedNotifier exception is raised. - # - # An ErrUnrecognizedLevel exception is raised if the given +value+ is not - # found in the existing #notifiers Array, or an instance of - # AbstractNotifier - # - # source://irb//lib/irb/notifier.rb#157 - def level=(value); end - - # Returns the leveled notifier for this object - # - # source://irb//lib/irb/notifier.rb#140 - def level_notifier; end - - # Sets the leveled notifier for this object. - # - # When the given +value+ is an instance of AbstractNotifier, - # #level_notifier is set to the given object. - # - # When an Integer is given, #level_notifier is set to the notifier at the - # index +value+ in the #notifiers Array. - # - # If no notifier exists at the index +value+ in the #notifiers Array, an - # ErrUndefinedNotifier exception is raised. - # - # An ErrUnrecognizedLevel exception is raised if the given +value+ is not - # found in the existing #notifiers Array, or an instance of - # AbstractNotifier - # - # source://irb//lib/irb/notifier.rb#157 - def level_notifier=(value); end - - # List of notifiers in the group - # - # source://irb//lib/irb/notifier.rb#125 - def notifiers; end -end - -# source://irb//lib/irb/notifier.rb#12 -class IRB::Notifier::ErrUndefinedNotifier < ::StandardError - # @return [ErrUndefinedNotifier] a new instance of ErrUndefinedNotifier - # - # source://irb//lib/irb/notifier.rb#13 - def initialize(val); end -end - -# source://irb//lib/irb/notifier.rb#17 -class IRB::Notifier::ErrUnrecognizedLevel < ::StandardError - # @return [ErrUnrecognizedLevel] a new instance of ErrUnrecognizedLevel - # - # source://irb//lib/irb/notifier.rb#18 - def initialize(val); end -end - -# A leveled notifier is comparable to the composite group from -# CompositeNotifier#notifiers. -# -# source://irb//lib/irb/notifier.rb#175 -class IRB::Notifier::LeveledNotifier < ::IRB::Notifier::AbstractNotifier - include ::Comparable - - # Create a new leveled notifier with the given +base+, and +prefix+ to - # send to AbstractNotifier.new - # - # The given +level+ is used to compare other leveled notifiers in the - # CompositeNotifier group to determine whether or not to output - # notifications. - # - # @return [LeveledNotifier] a new instance of LeveledNotifier - # - # source://irb//lib/irb/notifier.rb#184 - def initialize(base, level, prefix); end - - # Compares the level of this notifier object with the given +other+ - # notifier. - # - # See the Comparable module for more information. - # - # source://irb//lib/irb/notifier.rb#197 - def <=>(other); end - - # The current level of this notifier object - # - # source://irb//lib/irb/notifier.rb#191 - def level; end - - # Whether to output messages to the output method, depending on the level - # of this notifier object. - # - # @return [Boolean] - # - # source://irb//lib/irb/notifier.rb#203 - def notify?; end -end - -# NoMsgNotifier is a LeveledNotifier that's used as the default notifier -# when creating a new CompositeNotifier. -# -# This notifier is used as the +zero+ index, or level +0+, for -# CompositeNotifier#notifiers, and will not output messages of any sort. -# -# source://irb//lib/irb/notifier.rb#214 -class IRB::Notifier::NoMsgNotifier < ::IRB::Notifier::LeveledNotifier - # Creates a new notifier that should not be used to output messages. - # - # @return [NoMsgNotifier] a new instance of NoMsgNotifier - # - # source://irb//lib/irb/notifier.rb#215 - def initialize; end - - # Ensures notifications are ignored, see AbstractNotifier#notify? for - # more information. - # - # @return [Boolean] - # - # source://irb//lib/irb/notifier.rb#223 - def notify?; end -end - -# An abstract output class for IO in irb. This is mainly used internally by -# IRB::Notifier. You can define your own output method to use with Irb.new, -# or Context.new -# -# source://irb//lib/irb/output-method.rb#11 -class IRB::OutputMethod - # Returns an array of the given +format+ and +opts+ to be used by - # Kernel#sprintf, if there was a successful Regexp match in the given - # +format+ from #printf - # - # % - # [#0- +] - # (\*|\*[1-9][0-9]*\$|[1-9][0-9]*) - # .(\*|\*[1-9][0-9]*\$|[1-9][0-9]*|)? - # #(hh|h|l|ll|L|q|j|z|t) - # [diouxXeEfgGcsb%] - # - # source://irb//lib/irb/output-method.rb#48 - def parse_printf_format(format, opts); end - - # Prints the given +objs+ calling Object#inspect on each. - # - # See #puts for more detail. - # - # source://irb//lib/irb/output-method.rb#64 - def pp(*objs); end - - # Prints the given +objs+ calling Object#inspect on each and appending the - # given +prefix+. - # - # See #puts for more detail. - # - # source://irb//lib/irb/output-method.rb#72 - def ppx(prefix, *objs); end - - # Open this method to implement your own output method, raises a - # NotImplementedError if you don't define #print in your own class. - # - # @raise [NotImplementedError] - # - # source://irb//lib/irb/output-method.rb#20 - def print(*opts); end - - # Extends IO#printf to format the given +opts+ for Kernel#sprintf using - # #parse_printf_format - # - # source://irb//lib/irb/output-method.rb#31 - def printf(format, *opts); end - - # Prints the given +opts+, with a newline delimiter. - # - # source://irb//lib/irb/output-method.rb#25 - def printn(*opts); end - - # Calls #print on each element in the given +objs+, followed by a newline - # character. - # - # source://irb//lib/irb/output-method.rb#54 - def puts(*objs); end -end - -# source://irb//lib/irb/output-method.rb#12 -class IRB::OutputMethod::NotImplementedError < ::StandardError - # @return [NotImplementedError] a new instance of NotImplementedError - # - # source://irb//lib/irb/output-method.rb#13 - def initialize(val); end -end - -# source://irb//lib/irb/input-method.rb#173 -class IRB::ReadlineInputMethod < ::IRB::InputMethod - # source://irb//lib/irb/input-method.rb#182 - def initialize; end - - # source://irb//lib/irb/input-method.rb#244 - def encoding; end - - # source://irb//lib/irb/input-method.rb#222 - def eof?; end - - # source://irb//lib/irb/input-method.rb#206 - def gets; end - - # source://irb//lib/irb/input-method.rb#249 - def inspect; end - - # source://irb//lib/irb/input-method.rb#239 - def line(line_no); end - - # source://irb//lib/irb/input-method.rb#230 - def readable_after_eof?; end - - class << self - # source://irb//lib/irb/input-method.rb#174 - def initialize_readline; end - end -end - -# source://irb//lib/irb/input-method.rb#470 -class IRB::ReidlineInputMethod < ::IRB::RelineInputMethod - # @return [ReidlineInputMethod] a new instance of ReidlineInputMethod - # - # source://irb//lib/irb/input-method.rb#471 - def initialize; end -end - -# source://irb//lib/irb/input-method.rb#259 -class IRB::RelineInputMethod < ::IRB::InputMethod - include ::Reline - - # Creates a new input method object using Reline - # - # @return [RelineInputMethod] a new instance of RelineInputMethod - # - # source://irb//lib/irb/input-method.rb#263 - def initialize; end - - # source://irb//lib/irb/input-method.rb#312 - def auto_indent(&block); end - - # source://irb//lib/irb/input-method.rb#304 - def check_termination(&block); end - - # source://irb//lib/irb/input-method.rb#308 - def dynamic_prompt(&block); end - - # The external encoding for standard input. - # - # source://irb//lib/irb/input-method.rb#452 - def encoding; end - - # Whether the end of this input method has been reached, returns +true+ - # if there is no more data to read. - # - # See IO#eof? for more information. - # - # @return [Boolean] - # - # source://irb//lib/irb/input-method.rb#430 - def eof?; end - - # Reads the next line from this input method. - # - # See IO#gets for more information. - # - # source://irb//lib/irb/input-method.rb#412 - def gets; end - - # For debug message - # - # source://irb//lib/irb/input-method.rb#457 - def inspect; end - - # Returns the current line number for #io. - # - # #line counts the number of times #gets is called. - # - # See IO#lineno for more information. - # - # source://irb//lib/irb/input-method.rb#447 - def line(line_no); end - - # Whether this input method is still readable when there is no more data to - # read. - # - # See IO#eof for more information. - # - # @return [Boolean] - # - # source://irb//lib/irb/input-method.rb#438 - def readable_after_eof?; end -end - -# source://irb//lib/irb/input-method.rb#316 -IRB::RelineInputMethod::SHOW_DOC_DIALOG = T.let(T.unsafe(nil), Proc) - -# source://irb//lib/irb/input-method.rb#14 -IRB::STDIN_FILE_NAME = T.let(T.unsafe(nil), String) - -# source://irb//lib/irb/input-method.rb#58 -class IRB::StdioInputMethod < ::IRB::InputMethod - # Creates a new input method object - # - # @return [StdioInputMethod] a new instance of StdioInputMethod - # - # source://irb//lib/irb/input-method.rb#59 - def initialize; end - - # The external encoding for standard input. - # - # source://irb//lib/irb/input-method.rb#109 - def encoding; end - - # Whether the end of this input method has been reached, returns +true+ if - # there is no more data to read. - # - # See IO#eof? for more information. - # - # @return [Boolean] - # - # source://irb//lib/irb/input-method.rb#80 - def eof?; end - - # Reads the next line from this input method. - # - # See IO#gets for more information. - # - # source://irb//lib/irb/input-method.rb#70 - def gets; end - - # For debug message - # - # source://irb//lib/irb/input-method.rb#114 - def inspect; end - - # Returns the current line number for #io. - # - # #line counts the number of times #gets is called. - # - # See IO#lineno for more information. - # - # source://irb//lib/irb/input-method.rb#104 - def line(line_no); end - - # Whether this input method is still readable when there is no more data to - # read. - # - # See IO#eof for more information. - # - # @return [Boolean] - # - # source://irb//lib/irb/input-method.rb#95 - def readable_after_eof?; end -end - -# A standard output printer -# -# source://irb//lib/irb/output-method.rb#81 -class IRB::StdioOutputMethod < ::IRB::OutputMethod - # Prints the given +opts+ to standard output, see IO#print for more - # information. - # - # source://irb//lib/irb/output-method.rb#82 - def print(*opts); end -end - -# source://irb//lib/irb/workspace.rb#9 -IRB::TOPLEVEL_BINDING = T.let(T.unsafe(nil), Binding) - -# source://irb//lib/irb/version.rb#8 -IRB::VERSION = T.let(T.unsafe(nil), String) - -# source://irb//lib/irb/workspace.rb#11 -class IRB::WorkSpace - # Creates a new workspace. - # - # set self to main if specified, otherwise - # inherit main from TOPLEVEL_BINDING. - # - # @return [WorkSpace] a new instance of WorkSpace - # - # source://irb//lib/irb/workspace.rb#16 - def initialize(*main); end - - # The Binding of this workspace - # - # source://irb//lib/irb/workspace.rb#106 - def binding; end - - # source://irb//lib/irb/workspace.rb#140 - def code_around_binding; end - - # Evaluate the given +statements+ within the context of this workspace. - # - # source://irb//lib/irb/workspace.rb#112 - def evaluate(statements, file = T.unsafe(nil), line = T.unsafe(nil)); end - - # error message manipulator - # WARN: Rails patches this method to filter its own backtrace. Be cautious when changing it. - # See: https://github.com/rails/rails/blob/main/railties/lib/rails/commands/console/console_command.rb#L8:~:text=def,filter_backtrace - # - # source://irb//lib/irb/workspace.rb#127 - def filter_backtrace(bt); end - - # source://irb//lib/irb/workspace.rb#120 - def local_variable_get(name); end - - # source://irb//lib/irb/workspace.rb#116 - def local_variable_set(name, value); end - - # The top-level workspace of this context, also available as - # IRB.conf[:__MAIN__] - # - # source://irb//lib/irb/workspace.rb#109 - def main; end -end - -# :stopdoc: -# -# source://irb//lib/irb/ruby-lex.rb#11 -class RubyLex - # @return [RubyLex] a new instance of RubyLex - # - # source://irb//lib/irb/ruby-lex.rb#19 - def initialize(context); end - - # source://irb//lib/irb/ruby-lex.rb#301 - def check_code_block(code, tokens); end - - # source://irb//lib/irb/ruby-lex.rb#590 - def check_corresponding_token_depth(lines, line_index); end - - # source://irb//lib/irb/ruby-lex.rb#520 - def check_newline_depth_difference; end - - # source://irb//lib/irb/ruby-lex.rb#207 - def check_state(code, tokens); end - - # source://irb//lib/irb/ruby-lex.rb#698 - def check_string_literal(tokens); end - - # source://irb//lib/irb/ruby-lex.rb#777 - def check_termination_in_prev_line(code); end - - # source://irb//lib/irb/ruby-lex.rb#232 - def each_top_level_statement; end - - # source://irb//lib/irb/ruby-lex.rb#166 - def find_prev_spaces(line_index); end - - # source://irb//lib/irb/ruby-lex.rb#223 - def initialize_input; end - - # @return [Boolean] - # - # source://irb//lib/irb/ruby-lex.rb#443 - def is_method_calling?(tokens, index); end - - # source://irb//lib/irb/ruby-lex.rb#492 - def is_the_in_correspond_to_a_for(tokens, index); end - - # source://irb//lib/irb/ruby-lex.rb#268 - def lex; end - - # source://irb//lib/irb/ruby-lex.rb#280 - def process_continue(tokens); end - - # source://irb//lib/irb/ruby-lex.rb#749 - def process_literal_type(tokens); end - - # source://irb//lib/irb/ruby-lex.rb#393 - def process_nesting_level(tokens); end - - # source://irb//lib/irb/ruby-lex.rb#217 - def prompt; end - - # source://irb//lib/irb/ruby-lex.rb#187 - def set_auto_indent; end - - # io functions - # - # source://irb//lib/irb/ruby-lex.rb#46 - def set_input(io, &block); end - - # source://irb//lib/irb/ruby-lex.rb#122 - def set_prompt(&block); end - - # source://irb//lib/irb/ruby-lex.rb#461 - def take_corresponding_syntax_to_kw_do(tokens, index); end - - private - - # @return [Boolean] - # - # source://irb//lib/irb/ruby-lex.rb#826 - def heredoc_scope?; end - - # @return [Boolean] - # - # source://irb//lib/irb/ruby-lex.rb#831 - def in_keyword_case_scope?; end - - class << self - # source://irb//lib/irb/ruby-lex.rb#28 - def compile_with_errors_suppressed(code, line_no: T.unsafe(nil)); end - - # source://irb//lib/irb/ruby-lex.rb#135 - def generate_local_variables_assign_code(local_variables); end - - # source://irb//lib/irb/ruby-lex.rb#139 - def ripper_lex_without_warning(code, context: T.unsafe(nil)); end - end -end - -# source://irb//lib/irb/ruby-lex.rb#126 -RubyLex::ERROR_TOKENS = T.let(T.unsafe(nil), Array) - -# source://irb//lib/irb/ruby-lex.rb#13 -class RubyLex::TerminateLineInput < ::StandardError - # @return [TerminateLineInput] a new instance of TerminateLineInput - # - # source://irb//lib/irb/ruby-lex.rb#14 - def initialize; end -end diff --git a/sorbet/rbi/gems/json@2.6.3.rbi b/sorbet/rbi/gems/json@2.7.1.rbi similarity index 92% rename from sorbet/rbi/gems/json@2.6.3.rbi rename to sorbet/rbi/gems/json@2.7.1.rbi index 259116aa0..e22ce040e 100644 --- a/sorbet/rbi/gems/json@2.6.3.rbi +++ b/sorbet/rbi/gems/json@2.7.1.rbi @@ -1,10 +1,12 @@ -# 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#689 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 @@ -13,7 +15,7 @@ class Class < ::Module # # @return [Boolean] # - # source://json//json/common.rb#700 + # source://json//lib/json/common.rb#694 def json_creatable?; end end @@ -300,6 +302,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 @@ -586,6 +597,8 @@ end # Parsed JSON: # Without custom addition: "#" (String) # With custom addition: # (Foo) +# +# source://json//lib/json/version.rb#2 module JSON private @@ -617,8 +630,8 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//json/common.rb#631 - def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end + # source://json//lib/json/common.rb#614 + 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 @@ -634,13 +647,13 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//json/common.rb#335 + # source://json//lib/json/common.rb#328 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//json/common.rb#335 + # source://json//lib/json/common.rb#328 def fast_unparse(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -679,7 +692,7 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//json/common.rb#296 + # source://json//lib/json/common.rb#299 def generate(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -810,7 +823,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//json/common.rb#557 + # source://json//lib/json/common.rb#540 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # :call-seq: @@ -821,7 +834,7 @@ module JSON # # See method #parse. # - # source://json//json/common.rb#245 + # source://json//lib/json/common.rb#248 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -832,9 +845,12 @@ module JSON # # See method #parse! # - # source://json//json/common.rb#256 + # source://json//lib/json/common.rb#259 def load_file!(filespec, opts = T.unsafe(nil)); end + # source://json//lib/json/common.rb#642 + def merge_dump_options(opts, strict: T.unsafe(nil)); end + # :call-seq: # JSON.parse(source, opts) -> object # @@ -883,7 +899,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//json/common.rb#215 + # source://json//lib/json/common.rb#218 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -898,7 +914,7 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//json/common.rb#230 + # source://json//lib/json/common.rb#233 def parse!(source, opts = T.unsafe(nil)); end # :call-seq: @@ -931,28 +947,28 @@ module JSON # } # } # - # source://json//json/common.rb#390 + # source://json//lib/json/common.rb#373 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//json/common.rb#390 + # source://json//lib/json/common.rb#373 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//json/common.rb#575 + # source://json//lib/json/common.rb#558 def recurse_proc(result, &proc); end - # source://json//json/common.rb#557 + # source://json//lib/json/common.rb#540 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//json/common.rb#296 + # source://json//lib/json/common.rb#299 def unparse(obj, opts = T.unsafe(nil)); end class << self @@ -968,26 +984,26 @@ module JSON # ruby = [0, 1, nil] # JSON[ruby] # => '[0,1,null]' # - # source://json//json/common.rb#18 + # source://json//lib/json/common.rb#21 def [](object, opts = T.unsafe(nil)); end - # source://json//json/common.rb#81 + # source://json//lib/json/common.rb#84 def create_fast_state; end # Returns the current create identifier. # See also JSON.create_id=. # - # source://json//json/common.rb#126 + # source://json//lib/json/common.rb#129 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//json/common.rb#120 + # source://json//lib/json/common.rb#123 def create_id=(new_value); end - # source://json//json/common.rb#91 + # source://json//lib/json/common.rb#94 def create_pretty_state; end # Return the constant located at _path_. The format of _path_ has to be @@ -995,7 +1011,7 @@ module JSON # level (absolute namespace path?). If there doesn't exist a constant at # the given path, an ArgumentError is raised. # - # source://json//json/common.rb#42 + # source://json//lib/json/common.rb#45 def deep_const_get(path); end # :call-seq: @@ -1026,23 +1042,23 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//json/common.rb#631 - def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end + # source://json//lib/json/common.rb#614 + 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//json/common.rb#596 + # source://json//lib/json/common.rb#579 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//json/common.rb#596 + # source://json//lib/json/common.rb#579 def dump_default_options=(_arg0); end # :call-seq: @@ -1059,13 +1075,13 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//json/common.rb#335 + # source://json//lib/json/common.rb#328 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//json/common.rb#335 + # source://json//lib/json/common.rb#328 def fast_unparse(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -1104,24 +1120,24 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//json/common.rb#296 + # source://json//lib/json/common.rb#299 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//json/common.rb#103 + # source://json//lib/json/common.rb#106 def generator; end # Set the module _generator_ to be used by JSON. # - # source://json//json/common.rb#58 + # source://json//lib/json/common.rb#61 def generator=(generator); end # Encodes string using String.encode. # - # source://json//json/common.rb#653 + # source://json//lib/json/common.rb#638 def iconv(to, from, string); end # :call-seq: @@ -1252,7 +1268,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//json/common.rb#557 + # source://json//lib/json/common.rb#540 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # Sets or returns default options for the JSON.load method. @@ -1260,7 +1276,7 @@ module JSON # opts = JSON.load_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} # - # source://json//json/common.rb#420 + # source://json//lib/json/common.rb#403 def load_default_options; end # Sets or returns default options for the JSON.load method. @@ -1268,7 +1284,7 @@ module JSON # opts = JSON.load_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} # - # source://json//json/common.rb#420 + # source://json//lib/json/common.rb#403 def load_default_options=(_arg0); end # :call-seq: @@ -1279,7 +1295,7 @@ module JSON # # See method #parse. # - # source://json//json/common.rb#245 + # source://json//lib/json/common.rb#248 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1290,7 +1306,7 @@ module JSON # # See method #parse! # - # source://json//json/common.rb#256 + # source://json//lib/json/common.rb#259 def load_file!(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1341,7 +1357,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//json/common.rb#215 + # source://json//lib/json/common.rb#218 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -1356,19 +1372,19 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//json/common.rb#230 + # source://json//lib/json/common.rb#233 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//json/common.rb#29 + # source://json//lib/json/common.rb#32 def parser; end # Set the JSON parser class _parser_ to be used by JSON. # - # source://json//json/common.rb#32 + # source://json//lib/json/common.rb#35 def parser=(parser); end # :call-seq: @@ -1401,111 +1417,123 @@ module JSON # } # } # - # source://json//json/common.rb#390 + # source://json//lib/json/common.rb#373 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//json/common.rb#390 + # source://json//lib/json/common.rb#373 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//json/common.rb#575 + # source://json//lib/json/common.rb#558 def recurse_proc(result, &proc); end - # source://json//json/common.rb#557 + # source://json//lib/json/common.rb#540 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//json/common.rb#108 + # source://json//lib/json/common.rb#111 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//json/common.rb#108 + # source://json//lib/json/common.rb#111 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//json/common.rb#296 + # source://json//lib/json/common.rb#299 def unparse(obj, opts = T.unsafe(nil)); end + + private + + # source://json//lib/json/common.rb#642 + def merge_dump_options(opts, strict: T.unsafe(nil)); end end end -# source://json//json/common.rb#114 +# source://json//lib/json/common.rb#117 JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String) -# source://json//json/common.rb#111 +# source://json//lib/json/common.rb#114 JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String) +# source://json//lib/json/generic_object.rb#5 class JSON::GenericObject < ::OpenStruct - # source://json//json/generic_object.rb#63 + # source://json//lib/json/generic_object.rb#63 def as_json(*_arg0); end - # source://json//json/generic_object.rb#47 + # source://json//lib/json/generic_object.rb#47 def to_hash; end - # source://json//json/generic_object.rb#67 + # source://json//lib/json/generic_object.rb#67 def to_json(*a); end - # source://json//json/generic_object.rb#59 + # source://json//lib/json/generic_object.rb#59 def |(other); end class << self - # source://json//json/generic_object.rb#41 + # source://json//lib/json/generic_object.rb#41 def dump(obj, *args); end - # source://json//json/generic_object.rb#21 + # source://json//lib/json/generic_object.rb#21 def from_hash(object); end # Sets the attribute json_creatable # # @param value the value to set the attribute json_creatable to. # - # source://json//json/generic_object.rb#13 + # source://json//lib/json/generic_object.rb#13 def json_creatable=(_arg0); end # @return [Boolean] # - # source://json//json/generic_object.rb#9 + # source://json//lib/json/generic_object.rb#9 def json_creatable?; end - # source://json//json/generic_object.rb#15 + # source://json//lib/json/generic_object.rb#15 def json_create(data); end - # source://json//json/generic_object.rb#36 + # source://json//lib/json/generic_object.rb#36 def load(source, proc = T.unsafe(nil), opts = T.unsafe(nil)); end end end # The base exception for JSON errors. +# +# source://json//lib/json/common.rb#140 class JSON::JSONError < ::StandardError class << self - # source://json//json/common.rb#138 + # source://json//lib/json/common.rb#141 def wrap(exception); end end end -# source://json//json/common.rb#35 +# source://json//lib/json/common.rb#6 +JSON::NOT_SET = T.let(T.unsafe(nil), Object) + +# source://json//lib/json/common.rb#38 JSON::Parser = JSON::Ext::Parser -# source://json//json/common.rb#73 +# source://json//lib/json/common.rb#76 JSON::State = JSON::Ext::Generator::State # For backwards compatibility # -# source://json//json/common.rb#159 +# source://json//lib/json/common.rb#162 JSON::UnparserError = JSON::GeneratorError +# source://json//lib/json/common.rb#652 module Kernel private @@ -1516,18 +1544,18 @@ module Kernel # The _opts_ argument is passed through to generate/parse respectively. See # generate and parse for their documentation. # - # source://json//json/common.rb#685 + # source://json//lib/json/common.rb#679 def JSON(object, *args); end # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in # one line. # - # source://json//json/common.rb#663 + # source://json//lib/json/common.rb#657 def j(*objs); end # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with # indentation and over many lines. # - # source://json//json/common.rb#672 + # source://json//lib/json/common.rb#666 def jj(*objs); end end diff --git a/sorbet/rbi/gems/json_api_client@1.21.1.rbi b/sorbet/rbi/gems/json_api_client@1.22.0.rbi similarity index 98% rename from sorbet/rbi/gems/json_api_client@1.21.1.rbi rename to sorbet/rbi/gems/json_api_client@1.22.0.rbi index 96fb695ee..481208e78 100644 --- a/sorbet/rbi/gems/json_api_client@1.21.1.rbi +++ b/sorbet/rbi/gems/json_api_client@1.22.0.rbi @@ -1412,10 +1412,10 @@ class JsonApiClient::Resource # source://json_api_client//lib/json_api_client/helpers/associatable.rb#9 def __cached_associations=(_arg0); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.0.8/lib/active_support/callbacks.rb#68 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.0.8/lib/active_support/callbacks.rb#68 def __callbacks?; end # source://json_api_client//lib/json_api_client/resource.rb#44 @@ -1424,16 +1424,16 @@ class JsonApiClient::Resource # source://json_api_client//lib/json_api_client/resource.rb#44 def _immutable?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.0.8/lib/active_support/callbacks.rb#928 def _run_validate_callbacks(&block); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.0.8/lib/active_support/callbacks.rb#940 def _validate_callbacks; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.0.8/lib/active_model/validations.rb#52 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.0.8/lib/active_model/validations.rb#52 def _validators?; end # source://json_api_client//lib/json_api_client/resource.rb#41 @@ -1512,7 +1512,7 @@ class JsonApiClient::Resource # source://json_api_client//lib/json_api_client/resource.rb#403 def mark_as_persisted!; end - # source://activemodel/7.0.6/lib/active_model/naming.rb#244 + # source://activemodel/7.0.8/lib/active_model/naming.rb#244 def model_name(*_arg0, **_arg1, &_arg2); end # Returns true if this is a new record (never persisted to the database) @@ -1611,7 +1611,7 @@ class JsonApiClient::Resource # source://json_api_client//lib/json_api_client/resource.rb#468 def valid?(context = T.unsafe(nil)); end - # source://activemodel/7.0.6/lib/active_model/validations.rb#48 + # source://activemodel/7.0.8/lib/active_model/validations.rb#48 def validation_context; end protected @@ -1670,17 +1670,17 @@ class JsonApiClient::Resource # source://json_api_client//lib/json_api_client/resource.rb#609 def respond_to_missing?(symbol, include_all = T.unsafe(nil)); end - # source://activemodel/7.0.6/lib/active_model/validations.rb#48 + # source://activemodel/7.0.8/lib/active_model/validations.rb#48 def validation_context=(_arg0); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.0.8/lib/active_support/callbacks.rb#68 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.0.8/lib/active_support/callbacks.rb#68 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.0.8/lib/active_support/callbacks.rb#68 def __callbacks?; end # source://json_api_client//lib/json_api_client/resource.rb#44 @@ -1692,19 +1692,19 @@ class JsonApiClient::Resource # source://json_api_client//lib/json_api_client/resource.rb#44 def _immutable?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.0.8/lib/active_support/callbacks.rb#932 def _validate_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.0.8/lib/active_support/callbacks.rb#936 def _validate_callbacks=(value); end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.0.8/lib/active_model/validations.rb#52 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.0.8/lib/active_model/validations.rb#52 def _validators=(value); end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.0.8/lib/active_model/validations.rb#52 def _validators?; end # source://json_api_client//lib/json_api_client/resource.rb#41 @@ -2497,7 +2497,7 @@ module JsonApiClient::Utils # source://json_api_client//lib/json_api_client/utils.rb#4 def compute_type(klass, type_name); end - # source://json_api_client//lib/json_api_client/utils.rb#28 + # source://json_api_client//lib/json_api_client/utils.rb#33 def parse_includes(klass, *tables); end end end diff --git a/sorbet/rbi/gems/kredis@1.5.0.rbi b/sorbet/rbi/gems/kredis@1.5.0.rbi deleted file mode 100644 index a3fbfc21d..000000000 --- a/sorbet/rbi/gems/kredis@1.5.0.rbi +++ /dev/null @@ -1,1146 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `kredis` gem. -# Please instead update this file by running `bin/tapioca gem kredis`. - -# source://kredis//lib/kredis/version.rb#1 -module Kredis - include ::Kredis::Types - include ::Kredis::TypeCasting - include ::Kredis::Namespace - include ::Kredis::Connections - extend ::Kredis::Types - extend ::Kredis::TypeCasting - extend ::Kredis::Namespace - extend ::Kredis::Connections - extend ::Kredis - - # source://kredis//lib/kredis.rb#28 - def instrument(channel, **options, &block); end - - # source://kredis//lib/kredis.rb#22 - def logger; end - - # source://kredis//lib/kredis.rb#22 - def logger=(val); end - - # source://kredis//lib/kredis.rb#24 - def redis(config: T.unsafe(nil)); end - - class << self - # source://kredis//lib/kredis.rb#22 - def logger; end - - # source://kredis//lib/kredis.rb#22 - def logger=(val); end - end -end - -# source://kredis//lib/kredis/attributes.rb#1 -module Kredis::Attributes - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::Kredis::Attributes::ClassMethods - - private - - # source://kredis//lib/kredis/attributes.rb#112 - def enrich_after_change_with_record_access(type, original_after_change); end - - # source://kredis//lib/kredis/attributes.rb#108 - def extract_kredis_id; end - - # source://kredis//lib/kredis/attributes.rb#96 - def kredis_key_evaluated(key); end - - # source://kredis//lib/kredis/attributes.rb#104 - def kredis_key_for_attribute(name); end -end - -# source://kredis//lib/kredis/attributes.rb#0 -module Kredis::Attributes::ClassMethods - # source://kredis//lib/kredis/attributes.rb#73 - def kredis_boolean(name, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#65 - def kredis_counter(name, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#21 - def kredis_datetime(name, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#17 - def kredis_decimal(name, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#37 - def kredis_enum(name, values:, default:, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#25 - def kredis_flag(name, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#33 - def kredis_float(name, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#69 - def kredis_hash(name, key: T.unsafe(nil), typed: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#13 - def kredis_integer(name, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#41 - def kredis_json(name, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#45 - def kredis_list(name, key: T.unsafe(nil), typed: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#5 - def kredis_proxy(name, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#53 - def kredis_set(name, key: T.unsafe(nil), typed: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#57 - def kredis_slot(name, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#61 - def kredis_slots(name, available:, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#9 - def kredis_string(name, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/attributes.rb#49 - def kredis_unique_list(name, limit: T.unsafe(nil), key: T.unsafe(nil), typed: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - private - - # source://kredis//lib/kredis/attributes.rb#78 - def kredis_connection_with(method, name, key, **options); end -end - -# source://kredis//lib/kredis/connections.rb#3 -module Kredis::Connections - # source://kredis//lib/kredis/connections.rb#16 - def clear_all; end - - # source://kredis//lib/kredis/connections.rb#5 - def configurator; end - - # source://kredis//lib/kredis/connections.rb#5 - def configurator=(val); end - - # source://kredis//lib/kredis/connections.rb#8 - def configured_for(name); end - - # source://kredis//lib/kredis/connections.rb#4 - def connections; end - - # source://kredis//lib/kredis/connections.rb#4 - def connections=(val); end - - # source://kredis//lib/kredis/connections.rb#6 - def connector; end - - # source://kredis//lib/kredis/connections.rb#6 - def connector=(val); end - - class << self - # source://kredis//lib/kredis/connections.rb#5 - def configurator; end - - # source://kredis//lib/kredis/connections.rb#5 - def configurator=(val); end - - # source://kredis//lib/kredis/connections.rb#4 - def connections; end - - # source://kredis//lib/kredis/connections.rb#4 - def connections=(val); end - - # source://kredis//lib/kredis/connections.rb#6 - def connector; end - - # source://kredis//lib/kredis/connections.rb#6 - def connector=(val); end - end -end - -# source://kredis//lib/kredis/log_subscriber.rb#3 -class Kredis::LogSubscriber < ::ActiveSupport::LogSubscriber - # source://kredis//lib/kredis/log_subscriber.rb#12 - def meta(event); end - - # source://kredis//lib/kredis/log_subscriber.rb#8 - def migration(event); end - - # source://kredis//lib/kredis/log_subscriber.rb#4 - def proxy(event); end - - private - - # source://kredis//lib/kredis/log_subscriber.rb#17 - def formatted_in(color, event, type: T.unsafe(nil)); end -end - -# source://kredis//lib/kredis/migration.rb#3 -class Kredis::Migration - # @return [Migration] a new instance of Migration - # - # source://kredis//lib/kredis/migration.rb#6 - def initialize(config = T.unsafe(nil)); end - - # source://kredis//lib/kredis/migration.rb#33 - def delete_all(*key_patterns); end - - # source://kredis//lib/kredis/migration.rb#21 - def migrate(from:, to:, pipeline: T.unsafe(nil)); end - - # source://kredis//lib/kredis/migration.rb#12 - def migrate_all(key_pattern); end - - private - - # source://kredis//lib/kredis/migration.rb#48 - def each_key_batch_matching(key_pattern, &block); end - - # source://kredis//lib/kredis/migration.rb#56 - def log_migration(message, &block); end - - class << self - # source://kredis//lib/kredis/migration.rb#4 - def delete_all(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/migration.rb#4 - def migrate(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/migration.rb#4 - def migrate_all(*_arg0, **_arg1, &_arg2); end - end -end - -# source://kredis//lib/kredis/migration.rb#46 -Kredis::Migration::SCAN_BATCH_SIZE = T.let(T.unsafe(nil), Integer) - -# source://kredis//lib/kredis/namespace.rb#1 -module Kredis::Namespace - # source://kredis//lib/kredis/namespace.rb#6 - def namespace; end - - # source://kredis//lib/kredis/namespace.rb#2 - def namespace=(namespace); end - - # source://kredis//lib/kredis/namespace.rb#10 - def namespaced_key(key); end -end - -# source://kredis//lib/kredis/railtie.rb#1 -class Kredis::Railtie < ::Rails::Railtie; end - -# source://kredis//lib/kredis/type/json.rb#4 -module Kredis::Type; end - -# source://kredis//lib/kredis/type/datetime.rb#5 -class Kredis::Type::DateTime < ::ActiveModel::Type::DateTime - # source://kredis//lib/kredis/type/datetime.rb#10 - def cast_value(value); end - - # source://kredis//lib/kredis/type/datetime.rb#6 - def serialize(value); end -end - -# source://kredis//lib/kredis/type/json.rb#5 -class Kredis::Type::Json < ::ActiveModel::Type::Value - # source://kredis//lib/kredis/type/json.rb#10 - def cast_value(value); end - - # source://kredis//lib/kredis/type/json.rb#14 - def serialize(value); end - - # source://kredis//lib/kredis/type/json.rb#6 - def type; end -end - -# source://kredis//lib/kredis/type_casting.rb#6 -module Kredis::TypeCasting - # @raise [InvalidType] - # - # source://kredis//lib/kredis/type_casting.rb#25 - def string_to_type(value, type); end - - # source://kredis//lib/kredis/type_casting.rb#35 - def strings_to_types(values, type); end - - # @raise [InvalidType] - # - # source://kredis//lib/kredis/type_casting.rb#19 - def type_to_string(value, type); end - - # source://kredis//lib/kredis/type_casting.rb#31 - def types_to_strings(values, type); end -end - -# source://kredis//lib/kredis/type_casting.rb#7 -class Kredis::TypeCasting::InvalidType < ::StandardError; end - -# source://kredis//lib/kredis/type_casting.rb#9 -Kredis::TypeCasting::TYPES = T.let(T.unsafe(nil), Hash) - -# source://kredis//lib/kredis/types.rb#1 -module Kredis::Types - # source://kredis//lib/kredis/types.rb#29 - def boolean(key, default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#42 - def counter(key, expires_in: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#46 - def cycle(key, values:, expires_in: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#33 - def datetime(key, default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#21 - def decimal(key, default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#54 - def enum(key, values:, default:, config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#50 - def flag(key, config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#25 - def float(key, default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#58 - def hash(key, typed: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#17 - def integer(key, default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#37 - def json(key, default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#62 - def list(key, typed: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#74 - def ordered_set(key, typed: T.unsafe(nil), limit: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#4 - def proxy(key, config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#9 - def scalar(key, typed: T.unsafe(nil), default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#70 - def set(key, typed: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#78 - def slot(key, config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#82 - def slots(key, available:, config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#13 - def string(key, default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types.rb#66 - def unique_list(key, typed: T.unsafe(nil), limit: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end - - private - - # source://kredis//lib/kredis/types.rb#87 - def type_from(type_klass, config, key, after_change: T.unsafe(nil), **options); end -end - -# source://kredis//lib/kredis/types/callbacks_proxy.rb#1 -class Kredis::Types::CallbacksProxy - # @return [CallbacksProxy] a new instance of CallbacksProxy - # - # source://kredis//lib/kredis/types/callbacks_proxy.rb#18 - def initialize(type, callback); end - - # source://kredis//lib/kredis/types/callbacks_proxy.rb#22 - def method_missing(method, *args, **kwargs, &block); end - - # source://kredis//lib/kredis/types/callbacks_proxy.rb#3 - def to_s(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute type. - # - # source://kredis//lib/kredis/types/callbacks_proxy.rb#2 - def type; end - - private - - # source://kredis//lib/kredis/types/callbacks_proxy.rb#29 - def invoke_suitable_after_change_callback_for(method); end -end - -# source://kredis//lib/kredis/types/callbacks_proxy.rb#5 -Kredis::Types::CallbacksProxy::AFTER_CHANGE_OPERATIONS = T.let(T.unsafe(nil), Hash) - -# source://kredis//lib/kredis/types/counter.rb#1 -class Kredis::Types::Counter < ::Kredis::Types::Proxying - # source://kredis//lib/kredis/types/proxying.rb#7 - def decrby(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/counter.rb#13 - def decrement(by: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def del(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def exists?(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute expires_in. - # - # source://kredis//lib/kredis/types/counter.rb#4 - def expires_in; end - - # Sets the attribute expires_in - # - # @param value the value to set the attribute expires_in to. - # - # source://kredis//lib/kredis/types/counter.rb#4 - def expires_in=(_arg0); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def get(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def incrby(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/counter.rb#6 - def increment(by: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def multi(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/counter.rb#24 - def reset; end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def set(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/counter.rb#20 - def value; end -end - -# source://kredis//lib/kredis/types/cycle.rb#1 -class Kredis::Types::Cycle < ::Kredis::Types::Counter - # source://kredis//lib/kredis/types/counter.rb#20 - def index; end - - # source://kredis//lib/kredis/types/cycle.rb#10 - def next; end - - # source://kredis//lib/kredis/types/cycle.rb#6 - def value; end - - # Returns the value of attribute values. - # - # source://kredis//lib/kredis/types/cycle.rb#2 - def values; end - - # Sets the attribute values - # - # @param value the value to set the attribute values to. - # - # source://kredis//lib/kredis/types/cycle.rb#2 - def values=(_arg0); end -end - -# source://kredis//lib/kredis/types/enum.rb#3 -class Kredis::Types::Enum < ::Kredis::Types::Proxying - # @return [Enum] a new instance of Enum - # - # source://kredis//lib/kredis/types/enum.rb#8 - def initialize(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute default. - # - # source://kredis//lib/kredis/types/enum.rb#6 - def default; end - - # Sets the attribute default - # - # @param value the value to set the attribute default to. - # - # source://kredis//lib/kredis/types/enum.rb#6 - def default=(_arg0); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def del(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def exists?(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def get(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/enum.rb#23 - def reset; end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def set(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/enum.rb#19 - def value; end - - # source://kredis//lib/kredis/types/enum.rb#13 - def value=(value); end - - # Returns the value of attribute values. - # - # source://kredis//lib/kredis/types/enum.rb#6 - def values; end - - # Sets the attribute values - # - # @param value the value to set the attribute values to. - # - # source://kredis//lib/kredis/types/enum.rb#6 - def values=(_arg0); end - - private - - # source://kredis//lib/kredis/types/enum.rb#28 - def define_predicates_for_values; end -end - -# source://kredis//lib/kredis/types/flag.rb#1 -class Kredis::Types::Flag < ::Kredis::Types::Proxying - # source://kredis//lib/kredis/types/proxying.rb#7 - def del(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def exists?(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute expires_in. - # - # source://kredis//lib/kredis/types/flag.rb#4 - def expires_in; end - - # Sets the attribute expires_in - # - # @param value the value to set the attribute expires_in to. - # - # source://kredis//lib/kredis/types/flag.rb#4 - def expires_in=(_arg0); end - - # source://kredis//lib/kredis/types/flag.rb#6 - def mark(expires_in: T.unsafe(nil), force: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://kredis//lib/kredis/types/flag.rb#10 - def marked?; end - - # source://kredis//lib/kredis/types/flag.rb#14 - def remove; end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def set(*_arg0, **_arg1, &_arg2); end -end - -# source://kredis//lib/kredis/types/hash.rb#3 -class Kredis::Types::Hash < ::Kredis::Types::Proxying - # source://kredis//lib/kredis/types/hash.rb#8 - def [](key); end - - # source://kredis//lib/kredis/types/hash.rb#12 - def []=(key, value); end - - # source://kredis//lib/kredis/types/hash.rb#28 - def clear; end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def del(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/hash.rb#24 - def delete(*keys); end - - # source://kredis//lib/kredis/types/hash.rb#33 - def entries; end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def exists?(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def hdel(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def hget(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def hgetall(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def hkeys(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def hmget(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def hset(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def hvals(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/hash.rb#38 - def keys; end - - # source://kredis//lib/kredis/types/hash.rb#28 - def remove; end - - # source://kredis//lib/kredis/types/hash.rb#33 - def to_h; end - - # Returns the value of attribute typed. - # - # source://kredis//lib/kredis/types/hash.rb#6 - def typed; end - - # Sets the attribute typed - # - # @param value the value to set the attribute typed to. - # - # source://kredis//lib/kredis/types/hash.rb#6 - def typed=(_arg0); end - - # source://kredis//lib/kredis/types/hash.rb#16 - def update(**entries); end - - # source://kredis//lib/kredis/types/hash.rb#42 - def values; end - - # source://kredis//lib/kredis/types/hash.rb#20 - def values_at(*keys); end -end - -# source://kredis//lib/kredis/types/list.rb#1 -class Kredis::Types::List < ::Kredis::Types::Proxying - # source://kredis//lib/kredis/types/list.rb#19 - def <<(*elements); end - - # source://kredis//lib/kredis/types/list.rb#19 - def append(*elements); end - - # source://kredis//lib/kredis/types/list.rb#24 - def clear; end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def del(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/list.rb#6 - def elements; end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def exists?(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/list.rb#28 - def last(n = T.unsafe(nil)); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def lpush(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def lrange(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def lrem(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def ltrim(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/list.rb#15 - def prepend(*elements); end - - # source://kredis//lib/kredis/types/list.rb#11 - def remove(*elements); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def rpush(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/list.rb#6 - def to_a; end - - # Returns the value of attribute typed. - # - # source://kredis//lib/kredis/types/list.rb#4 - def typed; end - - # Sets the attribute typed - # - # @param value the value to set the attribute typed to. - # - # source://kredis//lib/kredis/types/list.rb#4 - def typed=(_arg0); end -end - -# source://kredis//lib/kredis/types/ordered_set.rb#1 -class Kredis::Types::OrderedSet < ::Kredis::Types::Proxying - # source://kredis//lib/kredis/types/ordered_set.rb#20 - def <<(elements); end - - # source://kredis//lib/kredis/types/ordered_set.rb#20 - def append(elements); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def del(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/ordered_set.rb#7 - def elements; end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def exists?(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute limit. - # - # source://kredis//lib/kredis/types/ordered_set.rb#5 - def limit; end - - # source://kredis//lib/kredis/types/ordered_set.rb#25 - def limit=(limit); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def multi(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/ordered_set.rb#16 - def prepend(elements); end - - # source://kredis//lib/kredis/types/ordered_set.rb#12 - def remove(*elements); end - - # source://kredis//lib/kredis/types/ordered_set.rb#7 - def to_a; end - - # Returns the value of attribute typed. - # - # source://kredis//lib/kredis/types/ordered_set.rb#4 - def typed; end - - # Sets the attribute typed - # - # @param value the value to set the attribute typed to. - # - # source://kredis//lib/kredis/types/ordered_set.rb#4 - def typed=(_arg0); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def zadd(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def zcard(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def zrange(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def zrem(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def zremrangebyrank(*_arg0, **_arg1, &_arg2); end - - private - - # source://kredis//lib/kredis/types/ordered_set.rb#54 - def base_score; end - - # source://kredis//lib/kredis/types/ordered_set.rb#32 - def insert(elements, prepending: T.unsafe(nil)); end - - # source://kredis//lib/kredis/types/ordered_set.rb#58 - def process_start_time; end - - # source://kredis//lib/kredis/types/ordered_set.rb#62 - def process_uptime; end - - # source://kredis//lib/kredis/types/ordered_set.rb#66 - def trim(from_beginning:); end -end - -# source://kredis//lib/kredis/types/proxy.rb#1 -class Kredis::Types::Proxy - include ::Kredis::Types::Proxy::Failsafe - - # @return [Proxy] a new instance of Proxy - # - # source://kredis//lib/kredis/types/proxy.rb#9 - def initialize(redis, key, **options); end - - # Returns the value of attribute key. - # - # source://kredis//lib/kredis/types/proxy.rb#5 - def key; end - - # Sets the attribute key - # - # @param value the value to set the attribute key to. - # - # source://kredis//lib/kredis/types/proxy.rb#5 - def key=(_arg0); end - - # source://kredis//lib/kredis/types/proxy.rb#23 - def method_missing(method, *args, **kwargs); end - - # source://kredis//lib/kredis/types/proxy.rb#14 - def multi(*args, **kwargs, &block); end - - # source://activesupport/7.0.5/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#56 - def pipeline; end - - # source://activesupport/7.0.5/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#100 - def pipeline=(obj); end - - private - - # source://kredis//lib/kredis/types/proxy.rb#36 - def log_message(method, *args, **kwargs); end - - # source://kredis//lib/kredis/types/proxy.rb#32 - def redis; end - - class << self - # source://activesupport/7.0.5/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#48 - def pipeline; end - - # source://activesupport/7.0.5/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#92 - def pipeline=(obj); end - end -end - -# source://kredis//lib/kredis/types/proxy/failsafe.rb#1 -module Kredis::Types::Proxy::Failsafe - # source://kredis//lib/kredis/types/proxy/failsafe.rb#2 - def initialize(*_arg0); end - - # source://kredis//lib/kredis/types/proxy/failsafe.rb#7 - def failsafe; end - - # source://kredis//lib/kredis/types/proxy/failsafe.rb#13 - def suppress_failsafe_with(returning: T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://kredis//lib/kredis/types/proxy/failsafe.rb#23 - def fail_safe_suppressed?; end -end - -# source://kredis//lib/kredis/types/proxying.rb#3 -class Kredis::Types::Proxying - # @return [Proxying] a new instance of Proxying - # - # source://kredis//lib/kredis/types/proxying.rb#10 - def initialize(redis, key, **options); end - - # source://kredis//lib/kredis/types/proxying.rb#17 - def failsafe(returning: T.unsafe(nil), &block); end - - # Returns the value of attribute key. - # - # source://kredis//lib/kredis/types/proxying.rb#4 - def key; end - - # Sets the attribute key - # - # @param value the value to set the attribute key to. - # - # source://kredis//lib/kredis/types/proxying.rb#4 - def key=(_arg0); end - - # Returns the value of attribute proxy. - # - # source://kredis//lib/kredis/types/proxying.rb#4 - def proxy; end - - # Sets the attribute proxy - # - # @param value the value to set the attribute proxy to. - # - # source://kredis//lib/kredis/types/proxying.rb#4 - def proxy=(_arg0); end - - # source://kredis//lib/kredis/types/proxying.rb#28 - def string_to_type(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#28 - def strings_to_types(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#28 - def type_to_string(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#28 - def types_to_strings(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#21 - def unproxied_redis; end - - class << self - # source://kredis//lib/kredis/types/proxying.rb#6 - def proxying(*commands); end - end -end - -# source://kredis//lib/kredis/types/scalar.rb#1 -class Kredis::Types::Scalar < ::Kredis::Types::Proxying - # @return [Boolean] - # - # source://kredis//lib/kredis/types/scalar.rb#24 - def assigned?; end - - # source://kredis//lib/kredis/types/scalar.rb#28 - def clear; end - - # Returns the value of attribute default. - # - # source://kredis//lib/kredis/types/scalar.rb#4 - def default; end - - # Sets the attribute default - # - # @param value the value to set the attribute default to. - # - # source://kredis//lib/kredis/types/scalar.rb#4 - def default=(_arg0); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def del(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def exists?(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def expire(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/scalar.rb#36 - def expire_at(datetime); end - - # source://kredis//lib/kredis/types/scalar.rb#32 - def expire_in(seconds); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def expireat(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute expires_in. - # - # source://kredis//lib/kredis/types/scalar.rb#4 - def expires_in; end - - # Sets the attribute expires_in - # - # @param value the value to set the attribute expires_in to. - # - # source://kredis//lib/kredis/types/scalar.rb#4 - def expires_in=(_arg0); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def get(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def set(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/scalar.rb#20 - def to_s; end - - # Returns the value of attribute typed. - # - # source://kredis//lib/kredis/types/scalar.rb#4 - def typed; end - - # Sets the attribute typed - # - # @param value the value to set the attribute typed to. - # - # source://kredis//lib/kredis/types/scalar.rb#4 - def typed=(_arg0); end - - # source://kredis//lib/kredis/types/scalar.rb#10 - def value; end - - # source://kredis//lib/kredis/types/scalar.rb#6 - def value=(value); end -end - -# source://kredis//lib/kredis/types/set.rb#1 -class Kredis::Types::Set < ::Kredis::Types::Proxying - # source://kredis//lib/kredis/types/set.rb#11 - def <<(*members); end - - # source://kredis//lib/kredis/types/set.rb#11 - def add(*members); end - - # source://kredis//lib/kredis/types/set.rb#39 - def clear; end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def del(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def exists?(*_arg0, **_arg1, &_arg2); end - - # @return [Boolean] - # - # source://kredis//lib/kredis/types/set.rb#27 - def include?(member); end - - # source://kredis//lib/kredis/types/set.rb#6 - def members; end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def multi(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/set.rb#16 - def remove(*members); end - - # source://kredis//lib/kredis/types/set.rb#20 - def replace(*members); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def sadd(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/set.rb#43 - def sample(count = T.unsafe(nil)); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def scard(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def sismember(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/set.rb#31 - def size; end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def smembers(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def spop(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def srandmember(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def srem(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/set.rb#35 - def take; end - - # source://kredis//lib/kredis/types/set.rb#6 - def to_a; end - - # Returns the value of attribute typed. - # - # source://kredis//lib/kredis/types/set.rb#4 - def typed; end - - # Sets the attribute typed - # - # @param value the value to set the attribute typed to. - # - # source://kredis//lib/kredis/types/set.rb#4 - def typed=(_arg0); end -end - -# source://kredis//lib/kredis/types/slots.rb#1 -class Kredis::Types::Slots < ::Kredis::Types::Proxying - # Returns the value of attribute available. - # - # source://kredis//lib/kredis/types/slots.rb#6 - def available; end - - # Sets the attribute available - # - # @param value the value to set the attribute available to. - # - # source://kredis//lib/kredis/types/slots.rb#6 - def available=(_arg0); end - - # @return [Boolean] - # - # source://kredis//lib/kredis/types/slots.rb#41 - def available?; end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def decr(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def del(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def exists?(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def get(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def incr(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/slots.rb#32 - def release; end - - # source://kredis//lib/kredis/types/slots.rb#8 - def reserve; end - - # source://kredis//lib/kredis/types/slots.rb#47 - def reset; end - - # source://kredis//lib/kredis/types/slots.rb#51 - def taken; end -end - -# source://kredis//lib/kredis/types/slots.rb#2 -class Kredis::Types::Slots::NotAvailable < ::StandardError; end - -# You'd normally call this a set, but Redis already has another data type for that -# -# source://kredis//lib/kredis/types/unique_list.rb#2 -class Kredis::Types::UniqueList < ::Kredis::Types::List - # source://kredis//lib/kredis/types/unique_list.rb#18 - def <<(elements); end - - # source://kredis//lib/kredis/types/unique_list.rb#18 - def append(elements); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def exists?(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute limit. - # - # source://kredis//lib/kredis/types/unique_list.rb#5 - def limit; end - - # Sets the attribute limit - # - # @param value the value to set the attribute limit to. - # - # source://kredis//lib/kredis/types/unique_list.rb#5 - def limit=(_arg0); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def ltrim(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/proxying.rb#7 - def multi(*_arg0, **_arg1, &_arg2); end - - # source://kredis//lib/kredis/types/unique_list.rb#7 - def prepend(elements); end - - # Returns the value of attribute typed. - # - # source://kredis//lib/kredis/types/unique_list.rb#5 - def typed; end - - # Sets the attribute typed - # - # @param value the value to set the attribute typed to. - # - # source://kredis//lib/kredis/types/unique_list.rb#5 - def typed=(_arg0); end -end - -# source://kredis//lib/kredis/version.rb#2 -Kredis::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/kredis@1.7.0.rbi b/sorbet/rbi/gems/kredis@1.7.0.rbi new file mode 100644 index 000000000..7002911e5 --- /dev/null +++ b/sorbet/rbi/gems/kredis@1.7.0.rbi @@ -0,0 +1,1354 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `kredis` gem. +# Please instead update this file by running `bin/tapioca gem kredis`. + +# source://kredis//lib/kredis/version.rb#1 +module Kredis + include ::Kredis::Types + include ::Kredis::TypeCasting + include ::Kredis::Namespace + include ::Kredis::Connections + extend ::Kredis::Types + extend ::Kredis::TypeCasting + extend ::Kredis::Namespace + extend ::Kredis::Connections + extend ::Kredis + + # source://kredis//lib/kredis.rb#31 + def instrument(channel, **options, &block); end + + # source://kredis//lib/kredis.rb#25 + def logger; end + + # source://kredis//lib/kredis.rb#25 + def logger=(val); end + + # source://kredis//lib/kredis.rb#27 + def redis(config: T.unsafe(nil)); end + + class << self + # source://kredis//lib/kredis.rb#25 + def logger; end + + # source://kredis//lib/kredis.rb#25 + def logger=(val); end + end +end + +# source://kredis//lib/kredis/attributes.rb#3 +module Kredis::Attributes + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::Kredis::Attributes::ClassMethods + + private + + # source://kredis//lib/kredis/attributes.rb#123 + def enrich_after_change_with_record_access(type, original_after_change); end + + # source://kredis//lib/kredis/attributes.rb#119 + def extract_kredis_id; end + + # source://kredis//lib/kredis/attributes.rb#130 + def kredis_default_evaluated(default); end + + # source://kredis//lib/kredis/attributes.rb#107 + def kredis_key_evaluated(key); end + + # source://kredis//lib/kredis/attributes.rb#115 + def kredis_key_for_attribute(name); end +end + +# source://kredis//lib/kredis/attributes.rb#0 +module Kredis::Attributes::ClassMethods + # source://kredis//lib/kredis/attributes.rb#83 + def kredis_boolean(name, key: T.unsafe(nil), default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#71 + def kredis_counter(name, key: T.unsafe(nil), default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#23 + def kredis_datetime(name, key: T.unsafe(nil), default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#19 + def kredis_decimal(name, key: T.unsafe(nil), default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#39 + def kredis_enum(name, values:, default:, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#27 + def kredis_flag(name, key: T.unsafe(nil), default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#35 + def kredis_float(name, key: T.unsafe(nil), default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#79 + def kredis_hash(name, key: T.unsafe(nil), default: T.unsafe(nil), typed: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#15 + def kredis_integer(name, key: T.unsafe(nil), default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#43 + def kredis_json(name, key: T.unsafe(nil), default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#75 + def kredis_limiter(name, limit:, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#47 + def kredis_list(name, key: T.unsafe(nil), default: T.unsafe(nil), typed: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#59 + def kredis_ordered_set(name, limit: T.unsafe(nil), default: T.unsafe(nil), key: T.unsafe(nil), typed: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#7 + def kredis_proxy(name, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#55 + def kredis_set(name, key: T.unsafe(nil), default: T.unsafe(nil), typed: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#63 + def kredis_slot(name, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#67 + def kredis_slots(name, available:, key: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#11 + def kredis_string(name, key: T.unsafe(nil), default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/attributes.rb#51 + def kredis_unique_list(name, limit: T.unsafe(nil), key: T.unsafe(nil), default: T.unsafe(nil), typed: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + private + + # source://kredis//lib/kredis/attributes.rb#88 + def kredis_connection_with(method, name, key, **options); end +end + +# source://kredis//lib/kredis/connections.rb#5 +module Kredis::Connections + # source://kredis//lib/kredis/connections.rb#25 + def clear_all; end + + # source://kredis//lib/kredis/connections.rb#10 + def configurator; end + + # source://kredis//lib/kredis/connections.rb#10 + def configurator=(val); end + + # source://kredis//lib/kredis/connections.rb#13 + def configured_for(name); end + + # source://kredis//lib/kredis/connections.rb#9 + def connections; end + + # source://kredis//lib/kredis/connections.rb#9 + def connections=(val); end + + # source://kredis//lib/kredis/connections.rb#11 + def connector; end + + # source://kredis//lib/kredis/connections.rb#11 + def connector=(val); end + + class << self + # source://kredis//lib/kredis/connections.rb#10 + def configurator; end + + # source://kredis//lib/kredis/connections.rb#10 + def configurator=(val); end + + # source://kredis//lib/kredis/connections.rb#9 + def connections; end + + # source://kredis//lib/kredis/connections.rb#9 + def connections=(val); end + + # source://kredis//lib/kredis/connections.rb#11 + def connector; end + + # source://kredis//lib/kredis/connections.rb#11 + def connector=(val); end + end +end + +# source://kredis//lib/kredis/connections.rb#7 +Kredis::Connections::DEFAULT_REDIS_TIMEOUT = T.let(T.unsafe(nil), Integer) + +# source://kredis//lib/kredis/connections.rb#6 +Kredis::Connections::DEFAULT_REDIS_URL = T.let(T.unsafe(nil), String) + +# source://kredis//lib/kredis/default_values.rb#3 +module Kredis::DefaultValues + extend ::ActiveSupport::Concern + + # source://kredis//lib/kredis/default_values.rb#25 + def initialize(*_arg0, **_arg1, &_arg2); end +end + +# source://kredis//lib/kredis/log_subscriber.rb#5 +class Kredis::LogSubscriber < ::ActiveSupport::LogSubscriber + # source://kredis//lib/kredis/log_subscriber.rb#14 + def meta(event); end + + # source://kredis//lib/kredis/log_subscriber.rb#10 + def migration(event); end + + # source://kredis//lib/kredis/log_subscriber.rb#6 + def proxy(event); end + + private + + # source://kredis//lib/kredis/log_subscriber.rb#19 + def formatted_in(color, event, type: T.unsafe(nil)); end +end + +# source://kredis//lib/kredis/migration.rb#5 +class Kredis::Migration + # @return [Migration] a new instance of Migration + # + # source://kredis//lib/kredis/migration.rb#8 + def initialize(config = T.unsafe(nil)); end + + # source://kredis//lib/kredis/migration.rb#35 + def delete_all(*key_patterns); end + + # source://kredis//lib/kredis/migration.rb#23 + def migrate(from:, to:, pipeline: T.unsafe(nil)); end + + # source://kredis//lib/kredis/migration.rb#14 + def migrate_all(key_pattern); end + + private + + # source://kredis//lib/kredis/migration.rb#50 + def each_key_batch_matching(key_pattern, &block); end + + # source://kredis//lib/kredis/migration.rb#58 + def log_migration(message, &block); end + + class << self + # source://kredis//lib/kredis/migration.rb#6 + def delete_all(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/migration.rb#6 + def migrate(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/migration.rb#6 + def migrate_all(*_arg0, **_arg1, &_arg2); end + end +end + +# source://kredis//lib/kredis/migration.rb#48 +Kredis::Migration::SCAN_BATCH_SIZE = T.let(T.unsafe(nil), Integer) + +# source://kredis//lib/kredis/namespace.rb#3 +module Kredis::Namespace + # source://kredis//lib/kredis/namespace.rb#8 + def namespace; end + + # source://kredis//lib/kredis/namespace.rb#4 + def namespace=(namespace); end + + # source://kredis//lib/kredis/namespace.rb#12 + def namespaced_key(key); end +end + +# source://kredis//lib/kredis/railtie.rb#3 +class Kredis::Railtie < ::Rails::Railtie; end + +# source://kredis//lib/kredis/type/boolean.rb#4 +module Kredis::Type; end + +# source://kredis//lib/kredis/type/boolean.rb#5 +class Kredis::Type::Boolean < ::ActiveModel::Type::Boolean + # source://kredis//lib/kredis/type/boolean.rb#6 + def serialize(value); end +end + +# source://kredis//lib/kredis/type/datetime.rb#5 +class Kredis::Type::DateTime < ::ActiveModel::Type::DateTime + # source://kredis//lib/kredis/type/datetime.rb#10 + def cast_value(value); end + + # source://kredis//lib/kredis/type/datetime.rb#6 + def serialize(value); end +end + +# source://kredis//lib/kredis/type/json.rb#5 +class Kredis::Type::Json < ::ActiveModel::Type::Value + # source://kredis//lib/kredis/type/json.rb#10 + def cast_value(value); end + + # source://kredis//lib/kredis/type/json.rb#14 + def serialize(value); end + + # source://kredis//lib/kredis/type/json.rb#6 + def type; end +end + +# source://kredis//lib/kredis/type_casting.rb#9 +module Kredis::TypeCasting + # @raise [InvalidType] + # + # source://kredis//lib/kredis/type_casting.rb#28 + def string_to_type(value, type); end + + # source://kredis//lib/kredis/type_casting.rb#38 + def strings_to_types(values, type); end + + # @raise [InvalidType] + # + # source://kredis//lib/kredis/type_casting.rb#22 + def type_to_string(value, type); end + + # source://kredis//lib/kredis/type_casting.rb#34 + def types_to_strings(values, type); end +end + +# source://kredis//lib/kredis/type_casting.rb#10 +class Kredis::TypeCasting::InvalidType < ::StandardError; end + +# source://kredis//lib/kredis/type_casting.rb#12 +Kredis::TypeCasting::TYPES = T.let(T.unsafe(nil), Hash) + +# source://kredis//lib/kredis/types.rb#3 +module Kredis::Types + # source://kredis//lib/kredis/types.rb#31 + def boolean(key, default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#44 + def counter(key, expires_in: T.unsafe(nil), default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#48 + def cycle(key, values:, expires_in: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#35 + def datetime(key, default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#23 + def decimal(key, default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#56 + def enum(key, values:, default:, config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#52 + def flag(key, default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#27 + def float(key, default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#60 + def hash(key, typed: T.unsafe(nil), default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#19 + def integer(key, default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#39 + def json(key, default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#88 + def limiter(key, limit:, expires_in: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#64 + def list(key, default: T.unsafe(nil), typed: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#76 + def ordered_set(key, default: T.unsafe(nil), typed: T.unsafe(nil), limit: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#6 + def proxy(key, config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#11 + def scalar(key, typed: T.unsafe(nil), default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#72 + def set(key, default: T.unsafe(nil), typed: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#80 + def slot(key, config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#84 + def slots(key, available:, config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#15 + def string(key, default: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil), expires_in: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types.rb#68 + def unique_list(key, default: T.unsafe(nil), typed: T.unsafe(nil), limit: T.unsafe(nil), config: T.unsafe(nil), after_change: T.unsafe(nil)); end + + private + + # source://kredis//lib/kredis/types.rb#93 + def type_from(type_klass, config, key, after_change: T.unsafe(nil), **options); end +end + +# source://kredis//lib/kredis/types/callbacks_proxy.rb#3 +class Kredis::Types::CallbacksProxy + # @return [CallbacksProxy] a new instance of CallbacksProxy + # + # source://kredis//lib/kredis/types/callbacks_proxy.rb#20 + def initialize(type, callback); end + + # source://kredis//lib/kredis/types/callbacks_proxy.rb#24 + def method_missing(method, *args, **kwargs, &block); end + + # source://kredis//lib/kredis/types/callbacks_proxy.rb#5 + def to_s(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute type. + # + # source://kredis//lib/kredis/types/callbacks_proxy.rb#4 + def type; end + + private + + # source://kredis//lib/kredis/types/callbacks_proxy.rb#31 + def invoke_suitable_after_change_callback_for(method); end +end + +# source://kredis//lib/kredis/types/callbacks_proxy.rb#7 +Kredis::Types::CallbacksProxy::AFTER_CHANGE_OPERATIONS = T.let(T.unsafe(nil), Hash) + +# source://kredis//lib/kredis/types/counter.rb#3 +class Kredis::Types::Counter < ::Kredis::Types::Proxying + include ::Kredis::DefaultValues + + # source://kredis//lib/kredis/types/proxying.rb#9 + def decrby(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/counter.rb#17 + def decrement(by: T.unsafe(nil)); end + + # source://kredis//lib/kredis/default_values.rb#11 + def default; end + + # source://kredis//lib/kredis/default_values.rb#7 + def default=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def del(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def exists?(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute expires_in. + # + # source://kredis//lib/kredis/types/counter.rb#8 + def expires_in; end + + # Sets the attribute expires_in + # + # @param value the value to set the attribute expires_in to. + # + # source://kredis//lib/kredis/types/counter.rb#8 + def expires_in=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def get(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def incrby(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/counter.rb#10 + def increment(by: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def multi(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/counter.rb#28 + def reset; end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def set(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def unwatch(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/counter.rb#24 + def value; end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def watch(*_arg0, **_arg1, &_arg2); end + + private + + # source://kredis//lib/kredis/types/counter.rb#33 + def set_default; end +end + +# source://kredis//lib/kredis/types/cycle.rb#3 +class Kredis::Types::Cycle < ::Kredis::Types::Counter + # source://kredis//lib/kredis/types/counter.rb#24 + def index; end + + # source://kredis//lib/kredis/types/cycle.rb#12 + def next; end + + # source://kredis//lib/kredis/types/cycle.rb#8 + def value; end + + # Returns the value of attribute values. + # + # source://kredis//lib/kredis/types/cycle.rb#4 + def values; end + + # Sets the attribute values + # + # @param value the value to set the attribute values to. + # + # source://kredis//lib/kredis/types/cycle.rb#4 + def values=(_arg0); end +end + +# source://kredis//lib/kredis/types/enum.rb#5 +class Kredis::Types::Enum < ::Kredis::Types::Proxying + include ::Kredis::DefaultValues + + # @return [Enum] a new instance of Enum + # + # source://kredis//lib/kredis/default_values.rb#25 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/default_values.rb#11 + def default; end + + # source://kredis//lib/kredis/default_values.rb#7 + def default=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def del(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def exists?(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def get(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def multi(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/enum.rb#29 + def reset; end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def set(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def unwatch(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/enum.rb#25 + def value; end + + # source://kredis//lib/kredis/types/enum.rb#19 + def value=(value); end + + # Returns the value of attribute values. + # + # source://kredis//lib/kredis/types/enum.rb#12 + def values; end + + # Sets the attribute values + # + # @param value the value to set the attribute values to. + # + # source://kredis//lib/kredis/types/enum.rb#12 + def values=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def watch(*_arg0, **_arg1, &_arg2); end + + private + + # source://kredis//lib/kredis/types/enum.rb#37 + def define_predicates_for_values; end + + # source://kredis//lib/kredis/types/enum.rb#44 + def set_default; end +end + +# source://kredis//lib/kredis/types/enum.rb#8 +class Kredis::Types::Enum::InvalidDefault < ::StandardError; end + +# source://kredis//lib/kredis/types/flag.rb#3 +class Kredis::Types::Flag < ::Kredis::Types::Proxying + include ::Kredis::DefaultValues + + # source://kredis//lib/kredis/default_values.rb#11 + def default; end + + # source://kredis//lib/kredis/default_values.rb#7 + def default=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def del(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def exists?(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute expires_in. + # + # source://kredis//lib/kredis/types/flag.rb#8 + def expires_in; end + + # Sets the attribute expires_in + # + # @param value the value to set the attribute expires_in to. + # + # source://kredis//lib/kredis/types/flag.rb#8 + def expires_in=(_arg0); end + + # source://kredis//lib/kredis/types/flag.rb#10 + def mark(expires_in: T.unsafe(nil), force: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://kredis//lib/kredis/types/flag.rb#14 + def marked?; end + + # source://kredis//lib/kredis/types/flag.rb#18 + def remove; end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def set(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def unwatch(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def watch(*_arg0, **_arg1, &_arg2); end + + private + + # source://kredis//lib/kredis/types/flag.rb#23 + def set_default; end +end + +# source://kredis//lib/kredis/types/hash.rb#5 +class Kredis::Types::Hash < ::Kredis::Types::Proxying + include ::Kredis::DefaultValues + + # source://kredis//lib/kredis/types/hash.rb#12 + def [](key); end + + # source://kredis//lib/kredis/types/hash.rb#16 + def []=(key, value); end + + # source://kredis//lib/kredis/types/hash.rb#32 + def clear; end + + # source://kredis//lib/kredis/default_values.rb#11 + def default; end + + # source://kredis//lib/kredis/default_values.rb#7 + def default=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def del(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/hash.rb#28 + def delete(*keys); end + + # source://kredis//lib/kredis/types/hash.rb#37 + def entries; end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def exists?(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def hdel(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def hget(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def hgetall(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def hkeys(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def hmget(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def hset(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def hvals(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/hash.rb#42 + def keys; end + + # source://kredis//lib/kredis/types/hash.rb#32 + def remove; end + + # source://kredis//lib/kredis/types/hash.rb#37 + def to_h; end + + # Returns the value of attribute typed. + # + # source://kredis//lib/kredis/types/hash.rb#10 + def typed; end + + # Sets the attribute typed + # + # @param value the value to set the attribute typed to. + # + # source://kredis//lib/kredis/types/hash.rb#10 + def typed=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def unwatch(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/hash.rb#20 + def update(**entries); end + + # source://kredis//lib/kredis/types/hash.rb#46 + def values; end + + # source://kredis//lib/kredis/types/hash.rb#24 + def values_at(*keys); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def watch(*_arg0, **_arg1, &_arg2); end + + private + + # source://kredis//lib/kredis/types/hash.rb#51 + def set_default; end +end + +# A limiter is a specialized form of a counter that can be checked whether it has been exceeded and is provided fail safe. This means it can be used to guard login screens from brute force attacks without denying access in case Redis is offline. +# +# It will usually be used as an expiring limiter. Note that the limiter expires in total after the `expires_in` time used upon the first poke. +# +# It offers no guarentee that you can't poke yourself above the limit. You're responsible for checking `#exceeded?` yourself first, and this may produce a race condition. So only use this when the exact number of pokes is not critical. +# +# source://kredis//lib/kredis/types/limiter.rb#8 +class Kredis::Types::Limiter < ::Kredis::Types::Counter + # @return [Boolean] + # + # source://kredis//lib/kredis/types/limiter.rb#19 + def exceeded?; end + + # Returns the value of attribute limit. + # + # source://kredis//lib/kredis/types/limiter.rb#11 + def limit; end + + # Sets the attribute limit + # + # @param value the value to set the attribute limit to. + # + # source://kredis//lib/kredis/types/limiter.rb#11 + def limit=(_arg0); end + + # source://kredis//lib/kredis/types/limiter.rb#13 + def poke; end +end + +# source://kredis//lib/kredis/types/limiter.rb#9 +class Kredis::Types::Limiter::LimitExceeded < ::StandardError; end + +# source://kredis//lib/kredis/types/list.rb#3 +class Kredis::Types::List < ::Kredis::Types::Proxying + include ::Kredis::DefaultValues + + # source://kredis//lib/kredis/types/list.rb#23 + def <<(*elements); end + + # source://kredis//lib/kredis/types/list.rb#23 + def append(*elements); end + + # source://kredis//lib/kredis/types/list.rb#28 + def clear; end + + # source://kredis//lib/kredis/default_values.rb#11 + def default; end + + # source://kredis//lib/kredis/default_values.rb#7 + def default=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def del(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/list.rb#10 + def elements; end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def exists?(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/list.rb#32 + def last(n = T.unsafe(nil)); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def lpush(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def lrange(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def lrem(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def ltrim(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/list.rb#19 + def prepend(*elements); end + + # source://kredis//lib/kredis/types/list.rb#15 + def remove(*elements); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def rpush(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/list.rb#10 + def to_a; end + + # Returns the value of attribute typed. + # + # source://kredis//lib/kredis/types/list.rb#8 + def typed; end + + # Sets the attribute typed + # + # @param value the value to set the attribute typed to. + # + # source://kredis//lib/kredis/types/list.rb#8 + def typed=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def unwatch(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def watch(*_arg0, **_arg1, &_arg2); end + + private + + # source://kredis//lib/kredis/types/list.rb#37 + def set_default; end +end + +# source://kredis//lib/kredis/types/ordered_set.rb#3 +class Kredis::Types::OrderedSet < ::Kredis::Types::Proxying + include ::Kredis::DefaultValues + + # source://kredis//lib/kredis/types/ordered_set.rb#28 + def <<(elements); end + + # source://kredis//lib/kredis/types/ordered_set.rb#28 + def append(elements); end + + # source://kredis//lib/kredis/default_values.rb#11 + def default; end + + # source://kredis//lib/kredis/default_values.rb#7 + def default=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def del(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/ordered_set.rb#11 + def elements; end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def exists?(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://kredis//lib/kredis/types/ordered_set.rb#20 + def include?(element); end + + # Returns the value of attribute limit. + # + # source://kredis//lib/kredis/types/ordered_set.rb#9 + def limit; end + + # source://kredis//lib/kredis/types/ordered_set.rb#33 + def limit=(limit); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def multi(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/ordered_set.rb#24 + def prepend(elements); end + + # source://kredis//lib/kredis/types/ordered_set.rb#16 + def remove(*elements); end + + # source://kredis//lib/kredis/types/ordered_set.rb#11 + def to_a; end + + # Returns the value of attribute typed. + # + # source://kredis//lib/kredis/types/ordered_set.rb#8 + def typed; end + + # Sets the attribute typed + # + # @param value the value to set the attribute typed to. + # + # source://kredis//lib/kredis/types/ordered_set.rb#8 + def typed=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def unwatch(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def watch(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def zadd(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def zcard(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def zrange(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def zrem(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def zremrangebyrank(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def zscore(*_arg0, **_arg1, &_arg2); end + + private + + # source://kredis//lib/kredis/types/ordered_set.rb#62 + def base_score; end + + # source://kredis//lib/kredis/types/ordered_set.rb#40 + def insert(elements, prepending: T.unsafe(nil)); end + + # source://kredis//lib/kredis/types/ordered_set.rb#66 + def process_start_time; end + + # source://kredis//lib/kredis/types/ordered_set.rb#70 + def process_uptime; end + + # source://kredis//lib/kredis/types/ordered_set.rb#84 + def set_default; end + + # source://kredis//lib/kredis/types/ordered_set.rb#74 + def trim(from_beginning:); end +end + +# source://kredis//lib/kredis/types/proxy.rb#3 +class Kredis::Types::Proxy + include ::Kredis::Types::Proxy::Failsafe + + # @return [Proxy] a new instance of Proxy + # + # source://kredis//lib/kredis/types/proxy.rb#11 + def initialize(redis, key, **options); end + + # Returns the value of attribute key. + # + # source://kredis//lib/kredis/types/proxy.rb#7 + def key; end + + # Sets the attribute key + # + # @param value the value to set the attribute key to. + # + # source://kredis//lib/kredis/types/proxy.rb#7 + def key=(_arg0); end + + # source://kredis//lib/kredis/types/proxy.rb#35 + def method_missing(method, *args, **kwargs); end + + # source://kredis//lib/kredis/types/proxy.rb#16 + def multi(*args, **kwargs, &block); end + + # source://activesupport/7.1.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#74 + def pipeline; end + + # source://activesupport/7.1.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#116 + def pipeline=(obj); end + + # source://kredis//lib/kredis/types/proxy.rb#31 + def unwatch; end + + # source://kredis//lib/kredis/types/proxy.rb#25 + def watch(&block); end + + private + + # source://kredis//lib/kredis/types/proxy.rb#48 + def log_message(method, *args, **kwargs); end + + # source://kredis//lib/kredis/types/proxy.rb#44 + def redis; end + + class << self + # source://activesupport/7.1.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 + def pipeline; end + + # source://activesupport/7.1.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 + def pipeline=(obj); end + end +end + +# source://kredis//lib/kredis/types/proxy/failsafe.rb#3 +module Kredis::Types::Proxy::Failsafe + # source://kredis//lib/kredis/types/proxy/failsafe.rb#4 + def initialize(*_arg0); end + + # source://kredis//lib/kredis/types/proxy/failsafe.rb#9 + def failsafe; end + + # source://kredis//lib/kredis/types/proxy/failsafe.rb#15 + def suppress_failsafe_with(returning: T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://kredis//lib/kredis/types/proxy/failsafe.rb#25 + def fail_safe_suppressed?; end +end + +# source://kredis//lib/kredis/types/proxying.rb#5 +class Kredis::Types::Proxying + # @return [Proxying] a new instance of Proxying + # + # source://kredis//lib/kredis/types/proxying.rb#12 + def initialize(redis, key, **options); end + + # source://kredis//lib/kredis/types/proxying.rb#19 + def failsafe(returning: T.unsafe(nil), &block); end + + # Returns the value of attribute key. + # + # source://kredis//lib/kredis/types/proxying.rb#6 + def key; end + + # Sets the attribute key + # + # @param value the value to set the attribute key to. + # + # source://kredis//lib/kredis/types/proxying.rb#6 + def key=(_arg0); end + + # Returns the value of attribute proxy. + # + # source://kredis//lib/kredis/types/proxying.rb#6 + def proxy; end + + # Sets the attribute proxy + # + # @param value the value to set the attribute proxy to. + # + # source://kredis//lib/kredis/types/proxying.rb#6 + def proxy=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#30 + def string_to_type(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#30 + def strings_to_types(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#30 + def type_to_string(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#30 + def types_to_strings(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#23 + def unproxied_redis; end + + class << self + # source://kredis//lib/kredis/types/proxying.rb#8 + def proxying(*commands); end + end +end + +# source://kredis//lib/kredis/types/scalar.rb#3 +class Kredis::Types::Scalar < ::Kredis::Types::Proxying + include ::Kredis::DefaultValues + + # @return [Boolean] + # + # source://kredis//lib/kredis/types/scalar.rb#28 + def assigned?; end + + # source://kredis//lib/kredis/types/scalar.rb#32 + def clear; end + + # source://kredis//lib/kredis/default_values.rb#11 + def default; end + + # source://kredis//lib/kredis/default_values.rb#7 + def default=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def del(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def exists?(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def expire(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/scalar.rb#40 + def expire_at(datetime); end + + # source://kredis//lib/kredis/types/scalar.rb#36 + def expire_in(seconds); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def expireat(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute expires_in. + # + # source://kredis//lib/kredis/types/scalar.rb#8 + def expires_in; end + + # Sets the attribute expires_in + # + # @param value the value to set the attribute expires_in to. + # + # source://kredis//lib/kredis/types/scalar.rb#8 + def expires_in=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def get(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def set(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/scalar.rb#24 + def to_s; end + + # Returns the value of attribute typed. + # + # source://kredis//lib/kredis/types/scalar.rb#8 + def typed; end + + # Sets the attribute typed + # + # @param value the value to set the attribute typed to. + # + # source://kredis//lib/kredis/types/scalar.rb#8 + def typed=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def unwatch(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/scalar.rb#14 + def value; end + + # source://kredis//lib/kredis/types/scalar.rb#10 + def value=(value); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def watch(*_arg0, **_arg1, &_arg2); end + + private + + # source://kredis//lib/kredis/types/scalar.rb#45 + def set_default; end +end + +# source://kredis//lib/kredis/types/set.rb#3 +class Kredis::Types::Set < ::Kredis::Types::Proxying + include ::Kredis::DefaultValues + + # source://kredis//lib/kredis/types/set.rb#15 + def <<(*members); end + + # source://kredis//lib/kredis/types/set.rb#15 + def add(*members); end + + # source://kredis//lib/kredis/types/set.rb#43 + def clear; end + + # source://kredis//lib/kredis/default_values.rb#11 + def default; end + + # source://kredis//lib/kredis/default_values.rb#7 + def default=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def del(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def exists?(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://kredis//lib/kredis/types/set.rb#31 + def include?(member); end + + # source://kredis//lib/kredis/types/set.rb#10 + def members; end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def multi(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/set.rb#20 + def remove(*members); end + + # source://kredis//lib/kredis/types/set.rb#24 + def replace(*members); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def sadd(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/set.rb#47 + def sample(count = T.unsafe(nil)); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def scard(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def sismember(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/set.rb#35 + def size; end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def smembers(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def spop(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def srandmember(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def srem(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/set.rb#39 + def take; end + + # source://kredis//lib/kredis/types/set.rb#10 + def to_a; end + + # Returns the value of attribute typed. + # + # source://kredis//lib/kredis/types/set.rb#8 + def typed; end + + # Sets the attribute typed + # + # @param value the value to set the attribute typed to. + # + # source://kredis//lib/kredis/types/set.rb#8 + def typed=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def unwatch(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def watch(*_arg0, **_arg1, &_arg2); end + + private + + # source://kredis//lib/kredis/types/set.rb#56 + def set_default; end +end + +# source://kredis//lib/kredis/types/slots.rb#3 +class Kredis::Types::Slots < ::Kredis::Types::Proxying + # Returns the value of attribute available. + # + # source://kredis//lib/kredis/types/slots.rb#8 + def available; end + + # Sets the attribute available + # + # @param value the value to set the attribute available to. + # + # source://kredis//lib/kredis/types/slots.rb#8 + def available=(_arg0); end + + # @return [Boolean] + # + # source://kredis//lib/kredis/types/slots.rb#43 + def available?; end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def decr(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def del(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def exists?(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def get(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def incr(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/slots.rb#34 + def release; end + + # source://kredis//lib/kredis/types/slots.rb#10 + def reserve; end + + # source://kredis//lib/kredis/types/slots.rb#49 + def reset; end + + # source://kredis//lib/kredis/types/slots.rb#53 + def taken; end +end + +# source://kredis//lib/kredis/types/slots.rb#4 +class Kredis::Types::Slots::NotAvailable < ::StandardError; end + +# You'd normally call this a set, but Redis already has another data type for that +# +# source://kredis//lib/kredis/types/unique_list.rb#4 +class Kredis::Types::UniqueList < ::Kredis::Types::List + # source://kredis//lib/kredis/types/unique_list.rb#20 + def <<(elements); end + + # source://kredis//lib/kredis/types/unique_list.rb#20 + def append(elements); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def exists?(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute limit. + # + # source://kredis//lib/kredis/types/unique_list.rb#7 + def limit; end + + # Sets the attribute limit + # + # @param value the value to set the attribute limit to. + # + # source://kredis//lib/kredis/types/unique_list.rb#7 + def limit=(_arg0); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def ltrim(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/proxying.rb#9 + def multi(*_arg0, **_arg1, &_arg2); end + + # source://kredis//lib/kredis/types/unique_list.rb#9 + def prepend(elements); end + + # Returns the value of attribute typed. + # + # source://kredis//lib/kredis/types/unique_list.rb#7 + def typed; end + + # Sets the attribute typed + # + # @param value the value to set the attribute typed to. + # + # source://kredis//lib/kredis/types/unique_list.rb#7 + def typed=(_arg0); end +end + +# source://kredis//lib/kredis/version.rb#2 +Kredis::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/loofah@2.21.3.rbi b/sorbet/rbi/gems/loofah@2.22.0.rbi similarity index 88% rename from sorbet/rbi/gems/loofah@2.21.3.rbi rename to sorbet/rbi/gems/loofah@2.22.0.rbi index e43c8957f..f662d4867 100644 --- a/sorbet/rbi/gems/loofah@2.21.3.rbi +++ b/sorbet/rbi/gems/loofah@2.22.0.rbi @@ -341,42 +341,42 @@ module Loofah::HTML5::Scrub class << self # @return [Boolean] # - # source://loofah//lib/loofah/html5/scrub.rb#17 + # source://loofah//lib/loofah/html5/scrub.rb#18 def allowed_element?(element_name); end - # source://loofah//lib/loofah/html5/scrub.rb#191 + # source://loofah//lib/loofah/html5/scrub.rb#192 def cdata_escape(node); end # @return [Boolean] # - # source://loofah//lib/loofah/html5/scrub.rb#186 + # source://loofah//lib/loofah/html5/scrub.rb#187 def cdata_needs_escaping?(node); end - # source://loofah//lib/loofah/html5/scrub.rb#206 + # source://loofah//lib/loofah/html5/scrub.rb#207 def escape_tags(string); end # libxml2 >= 2.9.2 fails to escape comments within some attributes. # # see comments about CVE-2018-8048 within the tests for more information # - # source://loofah//lib/loofah/html5/scrub.rb#165 + # source://loofah//lib/loofah/html5/scrub.rb#166 def force_correct_attribute_escaping!(node); end - # source://loofah//lib/loofah/html5/scrub.rb#122 + # source://loofah//lib/loofah/html5/scrub.rb#123 def scrub_attribute_that_allows_local_ref(attr_node); end # alternative implementation of the html5lib attribute scrubbing algorithm # - # source://loofah//lib/loofah/html5/scrub.rb#22 + # source://loofah//lib/loofah/html5/scrub.rb#23 def scrub_attributes(node); end - # source://loofah//lib/loofah/html5/scrub.rb#71 + # source://loofah//lib/loofah/html5/scrub.rb#72 def scrub_css(style); end - # source://loofah//lib/loofah/html5/scrub.rb#66 + # source://loofah//lib/loofah/html5/scrub.rb#67 def scrub_css_attribute(node); end - # source://loofah//lib/loofah/html5/scrub.rb#141 + # source://loofah//lib/loofah/html5/scrub.rb#142 def scrub_uri_attribute(attr_node); end end end @@ -393,10 +393,13 @@ Loofah::HTML5::Scrub::CSS_IMPORTANT = T.let(T.unsafe(nil), String) # source://loofah//lib/loofah/html5/scrub.rb#10 Loofah::HTML5::Scrub::CSS_KEYWORDISH = T.let(T.unsafe(nil), Regexp) -# source://loofah//lib/loofah/html5/scrub.rb#13 +# source://loofah//lib/loofah/html5/scrub.rb#14 Loofah::HTML5::Scrub::CSS_PROPERTY_STRING_WITHOUT_EMBEDDED_QUOTES = T.let(T.unsafe(nil), Regexp) -# source://loofah//lib/loofah/html5/scrub.rb#14 +# source://loofah//lib/loofah/html5/scrub.rb#13 +Loofah::HTML5::Scrub::CSS_WHITESPACE = T.let(T.unsafe(nil), String) + +# source://loofah//lib/loofah/html5/scrub.rb#15 Loofah::HTML5::Scrub::DATA_ATTRIBUTE_NAME = T.let(T.unsafe(nil), Regexp) # source://loofah//lib/loofah/html5/safelist.rb#1048 @@ -705,6 +708,15 @@ class Loofah::ScrubberNotFound < ::RuntimeError; end # => "ohai! I like your blog post" # # +# === Loofah::Scrubbers::TargetBlank / scrub!(:targetblank) +# +# +:targetblank+ adds a target="_blank" attribute to all links +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:targetblank) +# => "ohai! I like your blog post" +# +# # === Loofah::Scrubbers::NoOpener / scrub!(:noopener) # # +:noopener+ adds a rel="noopener" attribute to all links @@ -713,6 +725,14 @@ class Loofah::ScrubberNotFound < ::RuntimeError; end # Loofah.html5_fragment(link_farmers_markup).scrub!(:noopener) # => "ohai! I like your blog post" # +# === Loofah::Scrubbers::NoReferrer / scrub!(:noreferrer) +# +# +:noreferrer+ adds a rel="noreferrer" attribute to all links +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:noreferrer) +# => "ohai! I like your blog post" +# # # === Loofah::Scrubbers::Unprintable / scrub!(:unprintable) # @@ -728,12 +748,12 @@ class Loofah::ScrubberNotFound < ::RuntimeError; end # # http://timelessrepo.com/json-isnt-a-javascript-subset # -# source://loofah//lib/loofah/scrubbers.rb#87 +# source://loofah//lib/loofah/scrubbers.rb#104 module Loofah::Scrubbers class << self # Returns an array of symbols representing the built-in scrubbers # - # source://loofah//lib/loofah/scrubbers.rb#303 + # source://loofah//lib/loofah/scrubbers.rb#371 def scrubber_symbols; end end end @@ -746,32 +766,32 @@ end # Loofah.html5_fragment(unsafe_html).scrub!(:escape) # => "ohai!
div is safe
<foo>but foo is <b>not</b></foo>" # -# source://loofah//lib/loofah/scrubbers.rb#142 +# source://loofah//lib/loofah/scrubbers.rb#159 class Loofah::Scrubbers::Escape < ::Loofah::Scrubber # @return [Escape] a new instance of Escape # - # source://loofah//lib/loofah/scrubbers.rb#143 + # source://loofah//lib/loofah/scrubbers.rb#160 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#147 + # source://loofah//lib/loofah/scrubbers.rb#164 def scrub(node); end end # A hash that maps a symbol (like +:prune+) to the appropriate Scrubber (Loofah::Scrubbers::Prune). # -# source://loofah//lib/loofah/scrubbers.rb#288 +# source://loofah//lib/loofah/scrubbers.rb#354 Loofah::Scrubbers::MAP = T.let(T.unsafe(nil), Hash) # This class probably isn't useful publicly, but is used for #to_text's current implemention # -# source://loofah//lib/loofah/scrubbers.rb#239 +# source://loofah//lib/loofah/scrubbers.rb#305 class Loofah::Scrubbers::NewlineBlockElements < ::Loofah::Scrubber # @return [NewlineBlockElements] a new instance of NewlineBlockElements # - # source://loofah//lib/loofah/scrubbers.rb#240 + # source://loofah//lib/loofah/scrubbers.rb#306 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#244 + # source://loofah//lib/loofah/scrubbers.rb#310 def scrub(node); end end @@ -783,14 +803,14 @@ end # Loofah.html5_fragment(link_farmers_markup).scrub!(:nofollow) # => "ohai! I like your blog post" # -# source://loofah//lib/loofah/scrubbers.rb#203 +# source://loofah//lib/loofah/scrubbers.rb#220 class Loofah::Scrubbers::NoFollow < ::Loofah::Scrubber # @return [NoFollow] a new instance of NoFollow # - # source://loofah//lib/loofah/scrubbers.rb#204 + # source://loofah//lib/loofah/scrubbers.rb#221 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#208 + # source://loofah//lib/loofah/scrubbers.rb#225 def scrub(node); end end @@ -802,14 +822,33 @@ end # Loofah.html5_fragment(link_farmers_markup).scrub!(:noopener) # => "ohai! I like your blog post" # -# source://loofah//lib/loofah/scrubbers.rb#225 +# source://loofah//lib/loofah/scrubbers.rb#269 class Loofah::Scrubbers::NoOpener < ::Loofah::Scrubber # @return [NoOpener] a new instance of NoOpener # - # source://loofah//lib/loofah/scrubbers.rb#226 + # source://loofah//lib/loofah/scrubbers.rb#270 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#230 + # source://loofah//lib/loofah/scrubbers.rb#274 + def scrub(node); end +end + +# === scrub!(:noreferrer) +# +# +:noreferrer+ adds a rel="noreferrer" attribute to all links +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:noreferrer) +# => "ohai! I like your blog post" +# +# source://loofah//lib/loofah/scrubbers.rb#291 +class Loofah::Scrubbers::NoReferrer < ::Loofah::Scrubber + # @return [NoReferrer] a new instance of NoReferrer + # + # source://loofah//lib/loofah/scrubbers.rb#292 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#296 def scrub(node); end end @@ -821,14 +860,14 @@ end # Loofah.html5_fragment(unsafe_html).scrub!(:prune) # => "ohai!
div is safe
" # -# source://loofah//lib/loofah/scrubbers.rb#120 +# source://loofah//lib/loofah/scrubbers.rb#137 class Loofah::Scrubbers::Prune < ::Loofah::Scrubber # @return [Prune] a new instance of Prune # - # source://loofah//lib/loofah/scrubbers.rb#121 + # source://loofah//lib/loofah/scrubbers.rb#138 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#125 + # source://loofah//lib/loofah/scrubbers.rb#142 def scrub(node); end end @@ -840,14 +879,37 @@ end # Loofah.html5_fragment(unsafe_html).scrub!(:strip) # => "ohai!
div is safe
but foo is not" # -# source://loofah//lib/loofah/scrubbers.rb#97 +# source://loofah//lib/loofah/scrubbers.rb#114 class Loofah::Scrubbers::Strip < ::Loofah::Scrubber # @return [Strip] a new instance of Strip # - # source://loofah//lib/loofah/scrubbers.rb#98 + # source://loofah//lib/loofah/scrubbers.rb#115 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#119 + def scrub(node); end +end + +# === scrub!(:targetblank) +# +# +:targetblank+ adds a target="_blank" attribute to all links. +# If there is a target already set, replaces it with target="_blank". +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:targetblank) +# => "ohai! I like your blog post" +# +# On modern browsers, setting target="_blank" on anchor elements implicitly provides the same +# behavior as setting rel="noopener". +# +# source://loofah//lib/loofah/scrubbers.rb#246 +class Loofah::Scrubbers::TargetBlank < ::Loofah::Scrubber + # @return [TargetBlank] a new instance of TargetBlank + # + # source://loofah//lib/loofah/scrubbers.rb#247 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#102 + # source://loofah//lib/loofah/scrubbers.rb#251 def scrub(node); end end @@ -865,14 +927,14 @@ end # # http://timelessrepo.com/json-isnt-a-javascript-subset # -# source://loofah//lib/loofah/scrubbers.rb#272 +# source://loofah//lib/loofah/scrubbers.rb#338 class Loofah::Scrubbers::Unprintable < ::Loofah::Scrubber # @return [Unprintable] a new instance of Unprintable # - # source://loofah//lib/loofah/scrubbers.rb#273 + # source://loofah//lib/loofah/scrubbers.rb#339 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#277 + # source://loofah//lib/loofah/scrubbers.rb#343 def scrub(node); end end @@ -893,14 +955,14 @@ end # all kinds of cruft into its HTML output. Who needs that crap? # Certainly not me. # -# source://loofah//lib/loofah/scrubbers.rb#174 +# source://loofah//lib/loofah/scrubbers.rb#191 class Loofah::Scrubbers::Whitewash < ::Loofah::Scrubber # @return [Whitewash] a new instance of Whitewash # - # source://loofah//lib/loofah/scrubbers.rb#175 + # source://loofah//lib/loofah/scrubbers.rb#192 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#179 + # source://loofah//lib/loofah/scrubbers.rb#196 def scrub(node); end end diff --git a/sorbet/rbi/gems/mail@2.8.1.rbi b/sorbet/rbi/gems/mail@2.8.1.rbi index aed7bf431..c592819d3 100644 --- a/sorbet/rbi/gems/mail@2.8.1.rbi +++ b/sorbet/rbi/gems/mail@2.8.1.rbi @@ -127,7 +127,7 @@ module Mail # source://mail//lib/mail/mail.rb#151 def first(*args, &block); end - # source://actionmailbox/7.0.4.3/lib/action_mailbox/mail_ext/from_source.rb#4 + # source://actionmailbox/7.0.8/lib/action_mailbox/mail_ext/from_source.rb#4 def from_source(source); end # source://mail//lib/mail/mail.rb#233 @@ -276,7 +276,7 @@ class Mail::Address # source://mail//lib/mail/elements/address.rb#25 def initialize(value = T.unsafe(nil)); end - # source://actionmailbox/7.0.4.3/lib/action_mailbox/mail_ext/address_equality.rb#5 + # source://actionmailbox/7.0.8/lib/action_mailbox/mail_ext/address_equality.rb#5 def ==(other_address); end # Returns the address that is in the address itself. That is, the @@ -425,7 +425,7 @@ class Mail::Address def strip_domain_comments(value); end class << self - # source://actionmailbox/7.0.4.3/lib/action_mailbox/mail_ext/address_wrapping.rb#5 + # source://actionmailbox/7.0.8/lib/action_mailbox/mail_ext/address_wrapping.rb#5 def wrap(address); end end end @@ -3550,7 +3550,7 @@ class Mail::Message # source://mail//lib/mail/message.rb#512 def bcc=(val); end - # source://actionmailbox/7.0.4.3/lib/action_mailbox/mail_ext/addresses.rb#21 + # source://actionmailbox/7.0.8/lib/action_mailbox/mail_ext/addresses.rb#21 def bcc_addresses; end # Returns an array of addresses (the encoded value) in the Bcc field, @@ -3659,7 +3659,7 @@ class Mail::Message # source://mail//lib/mail/message.rb#553 def cc=(val); end - # source://actionmailbox/7.0.4.3/lib/action_mailbox/mail_ext/addresses.rb#17 + # source://actionmailbox/7.0.8/lib/action_mailbox/mail_ext/addresses.rb#17 def cc_addresses; end # Returns an array of addresses (the encoded value) in the Cc field, @@ -3978,7 +3978,7 @@ class Mail::Message # source://mail//lib/mail/message.rb#670 def from=(val); end - # source://actionmailbox/7.0.4.3/lib/action_mailbox/mail_ext/addresses.rb#5 + # source://actionmailbox/7.0.8/lib/action_mailbox/mail_ext/addresses.rb#5 def from_address; end # Returns an array of addresses (the encoded value) in the From field, @@ -4371,10 +4371,10 @@ class Mail::Message # source://mail//lib/mail/message.rb#751 def received=(val); end - # source://actionmailbox/7.0.4.3/lib/action_mailbox/mail_ext/recipients.rb#5 + # source://actionmailbox/7.0.8/lib/action_mailbox/mail_ext/recipients.rb#5 def recipients; end - # source://actionmailbox/7.0.4.3/lib/action_mailbox/mail_ext/addresses.rb#9 + # source://actionmailbox/7.0.8/lib/action_mailbox/mail_ext/addresses.rb#9 def recipients_addresses; end # source://mail//lib/mail/message.rb#755 @@ -4845,7 +4845,7 @@ class Mail::Message # source://mail//lib/mail/message.rb#1193 def to=(val); end - # source://actionmailbox/7.0.4.3/lib/action_mailbox/mail_ext/addresses.rb#13 + # source://actionmailbox/7.0.8/lib/action_mailbox/mail_ext/addresses.rb#13 def to_addresses; end # Returns an array of addresses (the encoded value) in the To field, @@ -4869,7 +4869,7 @@ class Mail::Message # source://mail//lib/mail/message.rb#1811 def without_attachments!; end - # source://actionmailbox/7.0.4.3/lib/action_mailbox/mail_ext/addresses.rb#25 + # source://actionmailbox/7.0.8/lib/action_mailbox/mail_ext/addresses.rb#25 def x_original_to_addresses; end private @@ -4892,6 +4892,9 @@ class Mail::Message # source://mail//lib/mail/message.rb#2056 def add_required_message_fields; end + # source://actionmailbox/7.0.8/lib/action_mailbox/mail_ext/addresses.rb#30 + def address_list(obj); end + # source://mail//lib/mail/message.rb#2025 def allowed_encodings; end diff --git a/sorbet/rbi/gems/method_source@1.0.0.rbi b/sorbet/rbi/gems/method_source@1.0.0.rbi deleted file mode 100644 index 039ac9d5d..000000000 --- a/sorbet/rbi/gems/method_source@1.0.0.rbi +++ /dev/null @@ -1,272 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `method_source` gem. -# Please instead update this file by running `bin/tapioca gem method_source`. - -# source://method_source//lib/method_source.rb#127 -class Method - include ::MethodSource::SourceLocation::MethodExtensions - include ::MethodSource::MethodExtensions -end - -# source://method_source//lib/method_source/version.rb#1 -module MethodSource - extend ::MethodSource::CodeHelpers - - class << self - # Helper method responsible for opening source file and buffering up - # the comments for a specified method. Defined here to avoid polluting - # `Method` class. - # - # @param source_location [Array] The array returned by Method#source_location - # @param method_name [String] - # @raise [SourceNotFoundError] - # @return [String] The comments up to the point of the method. - # - # source://method_source//lib/method_source.rb#38 - def comment_helper(source_location, name = T.unsafe(nil)); end - - # @deprecated — use MethodSource::CodeHelpers#expression_at - # - # source://method_source//lib/method_source.rb#66 - def extract_code(source_location); end - - # Load a memoized copy of the lines in a file. - # - # @param file_name [String] - # @param method_name [String] - # @raise [SourceNotFoundError] - # @return [Array] the contents of the file - # - # source://method_source//lib/method_source.rb#51 - def lines_for(file_name, name = T.unsafe(nil)); end - - # Helper method responsible for extracting method body. - # Defined here to avoid polluting `Method` class. - # - # @param source_location [Array] The array returned by Method#source_location - # @param method_name [String] - # @return [String] The method body - # - # source://method_source//lib/method_source.rb#23 - def source_helper(source_location, name = T.unsafe(nil)); end - - # @deprecated — use MethodSource::CodeHelpers#complete_expression? - # @return [Boolean] - # - # source://method_source//lib/method_source.rb#59 - def valid_expression?(str); end - end -end - -# source://method_source//lib/method_source/code_helpers.rb#3 -module MethodSource::CodeHelpers - # Retrieve the comment describing the expression on the given line of the given file. - # - # This is useful to get module or method documentation. - # - # @param file [Array, File, String] The file to parse, either as a File or as - # a String or an Array of lines. - # @param line_number [Integer] The line number at which to look. - # NOTE: The first line in a file is line 1! - # @return [String] The comment - # - # source://method_source//lib/method_source/code_helpers.rb#52 - def comment_describing(file, line_number); end - - # Determine if a string of code is a complete Ruby expression. - # - # @example - # complete_expression?("class Hello") #=> false - # complete_expression?("class Hello; end") #=> true - # complete_expression?("class 123") #=> SyntaxError: unexpected tINTEGER - # @param code [String] The code to validate. - # @raise [SyntaxError] Any SyntaxError that does not represent incompleteness. - # @return [Boolean] Whether or not the code is a complete Ruby expression. - # - # source://method_source//lib/method_source/code_helpers.rb#66 - def complete_expression?(str); end - - # Retrieve the first expression starting on the given line of the given file. - # - # This is useful to get module or method source code. - # - # line 1! - # - # @option options - # @option options - # @param file [Array, File, String] The file to parse, either as a File or as - # @param line_number [Integer] The line number at which to look. - # NOTE: The first line in a file is - # @param options [Hash] The optional configuration parameters. - # @raise [SyntaxError] If the first complete expression can't be identified - # @return [String] The first complete expression - # - # source://method_source//lib/method_source/code_helpers.rb#20 - def expression_at(file, line_number, options = T.unsafe(nil)); end - - private - - # Get the first expression from the input. - # - # @param lines [Array] - # @param consume [Integer] A number of lines to automatically - # consume (add to the expression buffer) without checking for validity. - # @raise [SyntaxError] - # @return [String] a valid ruby expression - # @yield a clean-up function to run before checking for complete_expression - # - # source://method_source//lib/method_source/code_helpers.rb#92 - def extract_first_expression(lines, consume = T.unsafe(nil), &block); end - - # Get the last comment from the input. - # - # @param lines [Array] - # @return [String] - # - # source://method_source//lib/method_source/code_helpers.rb#106 - def extract_last_comment(lines); end -end - -# An exception matcher that matches only subsets of SyntaxErrors that can be -# fixed by adding more input to the buffer. -# -# source://method_source//lib/method_source/code_helpers.rb#124 -module MethodSource::CodeHelpers::IncompleteExpression - class << self - # source://method_source//lib/method_source/code_helpers.rb#137 - def ===(ex); end - - # @return [Boolean] - # - # source://method_source//lib/method_source/code_helpers.rb#149 - def rbx?; end - end -end - -# source://method_source//lib/method_source/code_helpers.rb#125 -MethodSource::CodeHelpers::IncompleteExpression::GENERIC_REGEXPS = T.let(T.unsafe(nil), Array) - -# source://method_source//lib/method_source/code_helpers.rb#133 -MethodSource::CodeHelpers::IncompleteExpression::RBX_ONLY_REGEXPS = T.let(T.unsafe(nil), Array) - -# This module is to be included by `Method` and `UnboundMethod` and -# provides the `#source` functionality -# -# source://method_source//lib/method_source.rb#72 -module MethodSource::MethodExtensions - # Return the comments associated with the method as a string. - # - # @example - # Set.instance_method(:clear).comment.display - # => - # # Removes all elements and returns self. - # @raise SourceNotFoundException - # @return [String] The method's comments as a string - # - # source://method_source//lib/method_source.rb#121 - def comment; end - - # Return the sourcecode for the method as a string - # - # @example - # Set.instance_method(:clear).source.display - # => - # def clear - # @hash.clear - # self - # end - # @raise SourceNotFoundException - # @return [String] The method sourcecode as a string - # - # source://method_source//lib/method_source.rb#109 - def source; end - - class << self - # We use the included hook to patch Method#source on rubinius. - # We need to use the included hook as Rubinius defines a `source` - # on Method so including a module will have no effect (as it's - # higher up the MRO). - # - # @param klass [Class] The class that includes the module. - # - # source://method_source//lib/method_source.rb#79 - def included(klass); end - end -end - -# source://method_source//lib/method_source/source_location.rb#2 -module MethodSource::ReeSourceLocation - # Ruby enterprise edition provides all the information that's - # needed, in a slightly different way. - # - # source://method_source//lib/method_source/source_location.rb#5 - def source_location; end -end - -# source://method_source//lib/method_source/source_location.rb#10 -module MethodSource::SourceLocation; end - -# source://method_source//lib/method_source/source_location.rb#11 -module MethodSource::SourceLocation::MethodExtensions - # Return the source location of a method for Ruby 1.8. - # - # @return [Array] A two element array. First element is the - # file, second element is the line in the file where the - # method definition is found. - # - # source://method_source//lib/method_source/source_location.rb#40 - def source_location; end - - private - - # source://method_source//lib/method_source/source_location.rb#26 - def trace_func(event, file, line, id, binding, classname); end -end - -# source://method_source//lib/method_source/source_location.rb#54 -module MethodSource::SourceLocation::ProcExtensions - # Return the source location for a Proc (in implementations - # without Proc#source_location) - # - # @return [Array] A two element array. First element is the - # file, second element is the line in the file where the - # proc definition is found. - # - # source://method_source//lib/method_source/source_location.rb#74 - def source_location; end -end - -# source://method_source//lib/method_source/source_location.rb#81 -module MethodSource::SourceLocation::UnboundMethodExtensions - # Return the source location of an instance method for Ruby 1.8. - # - # @return [Array] A two element array. First element is the - # file, second element is the line in the file where the - # method definition is found. - # - # source://method_source//lib/method_source/source_location.rb#101 - def source_location; end -end - -# An Exception to mark errors that were raised trying to find the source from -# a given source_location. -# -# source://method_source//lib/method_source.rb#16 -class MethodSource::SourceNotFoundError < ::StandardError; end - -# source://method_source//lib/method_source/version.rb#2 -MethodSource::VERSION = T.let(T.unsafe(nil), String) - -# source://method_source//lib/method_source.rb#137 -class Proc - include ::MethodSource::SourceLocation::ProcExtensions - include ::MethodSource::MethodExtensions -end - -# source://method_source//lib/method_source.rb#132 -class UnboundMethod - include ::MethodSource::SourceLocation::UnboundMethodExtensions - include ::MethodSource::MethodExtensions -end diff --git a/sorbet/rbi/gems/mini_mime@1.1.2.rbi b/sorbet/rbi/gems/mini_mime@1.1.5.rbi similarity index 82% rename from sorbet/rbi/gems/mini_mime@1.1.2.rbi rename to sorbet/rbi/gems/mini_mime@1.1.5.rbi index b12ee39d9..edabba145 100644 --- a/sorbet/rbi/gems/mini_mime@1.1.2.rbi +++ b/sorbet/rbi/gems/mini_mime@1.1.5.rbi @@ -51,64 +51,66 @@ end class MiniMime::Db # @return [Db] a new instance of Db # - # source://mini_mime//lib/mini_mime.rb#154 + # source://mini_mime//lib/mini_mime.rb#173 def initialize; end - # source://mini_mime//lib/mini_mime.rb#163 + # source://mini_mime//lib/mini_mime.rb#182 def lookup_by_content_type(content_type); end - # source://mini_mime//lib/mini_mime.rb#159 + # source://mini_mime//lib/mini_mime.rb#178 def lookup_by_extension(extension); end class << self - # source://mini_mime//lib/mini_mime.rb#70 + # source://mini_mime//lib/mini_mime.rb#66 def lookup_by_content_type(content_type); end - # source://mini_mime//lib/mini_mime.rb#62 + # source://mini_mime//lib/mini_mime.rb#60 def lookup_by_extension(extension); end - # source://mini_mime//lib/mini_mime.rb#55 + # source://mini_mime//lib/mini_mime.rb#53 def lookup_by_filename(filename); end end end -# source://mini_mime//lib/mini_mime.rb#77 +# source://mini_mime//lib/mini_mime.rb#71 class MiniMime::Db::Cache # @return [Cache] a new instance of Cache # - # source://mini_mime//lib/mini_mime.rb#78 + # source://mini_mime//lib/mini_mime.rb#72 def initialize(size); end - # source://mini_mime//lib/mini_mime.rb#83 + # source://mini_mime//lib/mini_mime.rb#77 def []=(key, val); end - # source://mini_mime//lib/mini_mime.rb#89 + # source://mini_mime//lib/mini_mime.rb#83 def fetch(key, &blk); end end -# source://mini_mime//lib/mini_mime.rb#53 -MiniMime::Db::LOCK = T.let(T.unsafe(nil), Thread::Mutex) +# For Windows support +# +# source://mini_mime//lib/mini_mime.rb#89 +MiniMime::Db::PReadFile = File -# source://mini_mime//lib/mini_mime.rb#94 +# source://mini_mime//lib/mini_mime.rb#114 class MiniMime::Db::RandomAccessDb # @return [RandomAccessDb] a new instance of RandomAccessDb # - # source://mini_mime//lib/mini_mime.rb#97 + # source://mini_mime//lib/mini_mime.rb#117 def initialize(path, sort_order); end - # source://mini_mime//lib/mini_mime.rb#111 + # source://mini_mime//lib/mini_mime.rb#131 def lookup(val); end # lifted from marcandre/backports # - # source://mini_mime//lib/mini_mime.rb#127 + # source://mini_mime//lib/mini_mime.rb#147 def lookup_uncached(val); end - # source://mini_mime//lib/mini_mime.rb#148 + # source://mini_mime//lib/mini_mime.rb#168 def resolve(row); end end -# source://mini_mime//lib/mini_mime.rb#95 +# source://mini_mime//lib/mini_mime.rb#115 MiniMime::Db::RandomAccessDb::MAX_CACHED = T.let(T.unsafe(nil), Integer) # source://mini_mime//lib/mini_mime.rb#28 diff --git a/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi b/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi index 05a562673..3dea314d2 100644 --- a/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +++ b/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi @@ -7,73 +7,79 @@ # source://minitest-reporters//lib/minitest/reporters.rb#3 module Minitest class << self - # source://minitest/5.18.1/lib/minitest.rb#173 + # source://minitest/5.20.0/lib/minitest.rb#176 def __run(reporter, options); end - # source://minitest/5.18.1/lib/minitest.rb#94 + # source://minitest/5.20.0/lib/minitest.rb#97 def after_run(&block); end - # source://minitest/5.18.1/lib/minitest.rb#66 + # source://minitest/5.20.0/lib/minitest.rb#19 + def allow_fork; end + + # source://minitest/5.20.0/lib/minitest.rb#19 + def allow_fork=(_arg0); end + + # source://minitest/5.20.0/lib/minitest.rb#69 def autorun; end - # source://minitest/5.18.1/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def backtrace_filter; end - # source://minitest/5.18.1/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def backtrace_filter=(_arg0); end - # source://minitest/5.18.1/lib/minitest.rb#18 + # source://minitest/5.20.0/lib/minitest.rb#18 def cattr_accessor(name); end - # source://minitest/5.18.1/lib/minitest.rb#1073 + # source://minitest/5.20.0/lib/minitest.rb#1102 def clock_time; end - # source://minitest/5.18.1/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def extensions; end - # source://minitest/5.18.1/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def extensions=(_arg0); end - # source://minitest/5.18.1/lib/minitest.rb#264 + # source://minitest/5.20.0/lib/minitest.rb#267 def filter_backtrace(bt); end - # source://minitest/5.18.1/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def info_signal; end - # source://minitest/5.18.1/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def info_signal=(_arg0); end - # source://minitest/5.18.1/lib/minitest.rb#98 + # source://minitest/5.20.0/lib/minitest.rb#101 def init_plugins(options); end - # source://minitest/5.18.1/lib/minitest.rb#105 + # source://minitest/5.20.0/lib/minitest.rb#108 def load_plugins; end - # source://minitest/5.18.1/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def parallel_executor; end - # source://minitest/5.18.1/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def parallel_executor=(_arg0); end - # source://minitest/5.18.1/lib/minitest.rb#186 + # source://minitest/5.20.0/lib/minitest.rb#189 def process_args(args = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def reporter; end - # source://minitest/5.18.1/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def reporter=(_arg0); end - # source://minitest/5.18.1/lib/minitest.rb#140 + # source://minitest/5.20.0/lib/minitest.rb#143 def run(args = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest.rb#1064 + # source://minitest/5.20.0/lib/minitest.rb#1093 def run_one_method(klass, method_name); end - # source://minitest/5.18.1/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def seed; end - # source://minitest/5.18.1/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def seed=(_arg0); end end end @@ -401,7 +407,7 @@ end # The report is generated using ERB. A custom ERB template can be provided but it is not required # The default ERB template uses JQuery and Bootstrap, both of these are included by referencing the CDN sites # -# source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#21 +# source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#20 class Minitest::Reporters::HtmlReporter < ::Minitest::Reporters::BaseReporter # The constructor takes a hash, and uses the following keys: # :title - the title that will be used in the report, defaults to 'Test Results' diff --git a/sorbet/rbi/gems/minitest@5.19.0.rbi b/sorbet/rbi/gems/minitest@5.22.2.rbi similarity index 82% rename from sorbet/rbi/gems/minitest@5.19.0.rbi rename to sorbet/rbi/gems/minitest@5.22.2.rbi index 3ef2de490..53d0f6be5 100644 --- a/sorbet/rbi/gems/minitest@5.19.0.rbi +++ b/sorbet/rbi/gems/minitest@5.22.2.rbi @@ -56,7 +56,7 @@ module Minitest # Internal run method. Responsible for telling all Runnable # sub-classes to run. # - # source://minitest//lib/minitest.rb#173 + # source://minitest//lib/minitest.rb#197 def __run(reporter, options); end # A simple hook allowing you to run a block of code after everything @@ -64,12 +64,18 @@ module Minitest # # Minitest.after_run { p $debugging_info } # - # source://minitest//lib/minitest.rb#94 + # source://minitest//lib/minitest.rb#97 def after_run(&block); end + # source://minitest//lib/minitest.rb#19 + def allow_fork; end + + # source://minitest//lib/minitest.rb#19 + def allow_fork=(_arg0); end + # Registers Minitest to run at process exit # - # source://minitest//lib/minitest.rb#66 + # source://minitest//lib/minitest.rb#69 def autorun; end # source://minitest//lib/minitest.rb#19 @@ -81,16 +87,19 @@ module Minitest # source://minitest//lib/minitest.rb#18 def cattr_accessor(name); end - # source://minitest//lib/minitest.rb#1099 + # source://minitest//lib/minitest.rb#1146 def clock_time; end + # source://minitest//lib/minitest.rb#177 + def empty_run!(options); end + # source://minitest//lib/minitest.rb#19 def extensions; end # source://minitest//lib/minitest.rb#19 def extensions=(_arg0); end - # source://minitest//lib/minitest.rb#264 + # source://minitest//lib/minitest.rb#292 def filter_backtrace(bt); end # source://minitest//lib/minitest.rb#19 @@ -99,10 +108,10 @@ module Minitest # source://minitest//lib/minitest.rb#19 def info_signal=(_arg0); end - # source://minitest//lib/minitest.rb#98 + # source://minitest//lib/minitest.rb#101 def init_plugins(options); end - # source://minitest//lib/minitest.rb#105 + # source://minitest//lib/minitest.rb#108 def load_plugins; end # source://minitest//lib/minitest.rb#19 @@ -111,7 +120,7 @@ module Minitest # source://minitest//lib/minitest.rb#19 def parallel_executor=(_arg0); end - # source://minitest//lib/minitest.rb#186 + # source://minitest//lib/minitest.rb#210 def process_args(args = T.unsafe(nil)); end # source://minitest//lib/minitest.rb#19 @@ -130,16 +139,16 @@ module Minitest # Minitest.run(args) # Minitest.__run(reporter, options) # Runnable.runnables.each - # runnable.run(reporter, options) + # runnable_klass.run(reporter, options) # self.runnable_methods.each # self.run_one_method(self, runnable_method, reporter) # Minitest.run_one_method(klass, runnable_method) # klass.new(runnable_method).run # - # source://minitest//lib/minitest.rb#140 + # source://minitest//lib/minitest.rb#143 def run(args = T.unsafe(nil)); end - # source://minitest//lib/minitest.rb#1090 + # source://minitest//lib/minitest.rb#1137 def run_one_method(klass, method_name); end # source://minitest//lib/minitest.rb#19 @@ -153,27 +162,24 @@ end # Defines the API for Reporters. Subclass this and override whatever # you want. Go nuts. # -# source://minitest//lib/minitest.rb#618 +# source://minitest//lib/minitest.rb#638 class Minitest::AbstractReporter - include ::Mutex_m - - # source://mutex_m/0.1.1/mutex_m.rb#93 - def lock; end - - # source://mutex_m/0.1.1/mutex_m.rb#83 - def locked?; end + # @return [AbstractReporter] a new instance of AbstractReporter + # + # source://minitest//lib/minitest.rb#640 + def initialize; end # Did this run pass? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#652 + # source://minitest//lib/minitest.rb#675 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#631 + # source://minitest//lib/minitest.rb#654 def prerecord(klass, name); end # Output and record the result of the test. Call @@ -181,48 +187,45 @@ class Minitest::AbstractReporter # result character string. Stores the result of the run if the run # did not pass. # - # source://minitest//lib/minitest.rb#640 + # source://minitest//lib/minitest.rb#663 def record(result); end # Outputs the summary of the run. # - # source://minitest//lib/minitest.rb#646 + # source://minitest//lib/minitest.rb#669 def report; end # Starts reporting on the run. # - # source://minitest//lib/minitest.rb#624 + # source://minitest//lib/minitest.rb#647 def start; end - # source://mutex_m/0.1.1/mutex_m.rb#78 + # source://minitest//lib/minitest.rb#679 def synchronize(&block); end - - # source://mutex_m/0.1.1/mutex_m.rb#88 - def try_lock; end - - # source://mutex_m/0.1.1/mutex_m.rb#98 - def unlock; end end # Represents run failures. # -# source://minitest//lib/minitest.rb#935 +# source://minitest//lib/minitest.rb#962 class Minitest::Assertion < ::Exception - # source://minitest//lib/minitest.rb#936 + # source://minitest//lib/minitest.rb#965 def error; end # Where was this run before an assertion was raised? # - # source://minitest//lib/minitest.rb#943 + # source://minitest//lib/minitest.rb#972 def location; end - # source://minitest//lib/minitest.rb#952 + # source://minitest//lib/minitest.rb#980 def result_code; end - # source://minitest//lib/minitest.rb#956 + # source://minitest//lib/minitest.rb#984 def result_label; end end +# source://minitest//lib/minitest.rb#963 +Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp) + # Minitest Assertions. All assertion methods accept a +msg+ which is # printed if the assertion fails. # @@ -237,6 +240,9 @@ module Minitest::Assertions # source://minitest//lib/minitest/assertions.rb#188 def _synchronize; end + # source://minitest//lib/minitest/assertions.rb#201 + def _where; end + # Fails unless +test+ is truthy. # # source://minitest//lib/minitest/assertions.rb#178 @@ -259,7 +265,7 @@ module Minitest::Assertions # # See also: Minitest::Assertions.diff # - # source://minitest//lib/minitest/assertions.rb#216 + # source://minitest//lib/minitest/assertions.rb#221 def assert_equal(exp, act, msg = T.unsafe(nil)); end # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+ @@ -267,45 +273,45 @@ module Minitest::Assertions # # assert_in_delta Math::PI, (22.0 / 7.0), 0.01 # - # source://minitest//lib/minitest/assertions.rb#240 + # source://minitest//lib/minitest/assertions.rb#242 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#252 + # source://minitest//lib/minitest/assertions.rb#254 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#259 + # source://minitest//lib/minitest/assertions.rb#261 def assert_includes(collection, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is an instance of +cls+. # - # source://minitest//lib/minitest/assertions.rb#270 + # source://minitest//lib/minitest/assertions.rb#272 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#281 + # source://minitest//lib/minitest/assertions.rb#283 def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end # Fails unless +matcher+ =~ +obj+. # - # source://minitest//lib/minitest/assertions.rb#291 + # source://minitest//lib/minitest/assertions.rb#293 def assert_match(matcher, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is nil # - # source://minitest//lib/minitest/assertions.rb#303 + # source://minitest//lib/minitest/assertions.rb#305 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#313 + # source://minitest//lib/minitest/assertions.rb#315 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. @@ -319,12 +325,12 @@ module Minitest::Assertions # # See also: #assert_silent # - # source://minitest//lib/minitest/assertions.rb#331 + # source://minitest//lib/minitest/assertions.rb#333 def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end # Fails unless +path+ exists. # - # source://minitest//lib/minitest/assertions.rb#355 + # source://minitest//lib/minitest/assertions.rb#357 def assert_path_exists(path, msg = T.unsafe(nil)); end # For testing with pattern matching (only supported with Ruby 3.0 and later) @@ -342,7 +348,7 @@ module Minitest::Assertions # # @raise [NotImplementedError] # - # source://minitest//lib/minitest/assertions.rb#374 + # source://minitest//lib/minitest/assertions.rb#376 def assert_pattern; end # For testing with predicates. Eg: @@ -353,7 +359,7 @@ module Minitest::Assertions # # str.must_be :empty? # - # source://minitest//lib/minitest/assertions.rb#395 + # source://minitest//lib/minitest/assertions.rb#397 def assert_predicate(o1, op, msg = T.unsafe(nil)); end # Fails unless the block raises one of +exp+. Returns the @@ -377,36 +383,37 @@ module Minitest::Assertions # # assert_equal 'This is really bad', error.message # - # source://minitest//lib/minitest/assertions.rb#422 + # source://minitest//lib/minitest/assertions.rb#424 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#453 - def assert_respond_to(obj, meth, msg = T.unsafe(nil)); end + # source://minitest//lib/minitest/assertions.rb#456 + 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#463 + # source://minitest//lib/minitest/assertions.rb#466 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#476 + # source://minitest//lib/minitest/assertions.rb#479 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#492 + # source://minitest//lib/minitest/assertions.rb#493 def assert_silent; end # Fails unless the block throws +sym+ # - # source://minitest//lib/minitest/assertions.rb#501 + # source://minitest//lib/minitest/assertions.rb#502 def assert_throws(sym, msg = T.unsafe(nil)); end # Captures $stdout and $stderr into strings: @@ -423,7 +430,7 @@ module Minitest::Assertions # capture IO for subprocesses. Use #capture_subprocess_io for # that. # - # source://minitest//lib/minitest/assertions.rb#542 + # source://minitest//lib/minitest/assertions.rb#543 def capture_io; end # Captures $stdout and $stderr into strings, using Tempfile to @@ -440,7 +447,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#575 + # source://minitest//lib/minitest/assertions.rb#576 def capture_subprocess_io; end # Returns a diff between +exp+ and +act+. If there is no known @@ -455,24 +462,24 @@ module Minitest::Assertions # Returns details for exception +e+ # - # source://minitest//lib/minitest/assertions.rb#607 + # source://minitest//lib/minitest/assertions.rb#608 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#623 + # source://minitest//lib/minitest/assertions.rb#624 def fail_after(y, m, d, msg); end # Fails with +msg+. # - # source://minitest//lib/minitest/assertions.rb#630 + # source://minitest//lib/minitest/assertions.rb#631 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#638 + # source://minitest//lib/minitest/assertions.rb#639 def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end # This returns a human-readable version of +obj+. By default @@ -494,62 +501,62 @@ module Minitest::Assertions # used for counting assertions # - # source://minitest//lib/minitest/assertions.rb#649 + # source://minitest//lib/minitest/assertions.rb#650 def pass(_msg = T.unsafe(nil)); end # Fails if +test+ is truthy. # - # source://minitest//lib/minitest/assertions.rb#656 + # source://minitest//lib/minitest/assertions.rb#657 def refute(test, msg = T.unsafe(nil)); end # Fails if +obj+ is empty. # - # source://minitest//lib/minitest/assertions.rb#664 + # source://minitest//lib/minitest/assertions.rb#665 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#675 + # source://minitest//lib/minitest/assertions.rb#676 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#687 + # source://minitest//lib/minitest/assertions.rb#688 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#699 + # source://minitest//lib/minitest/assertions.rb#700 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#706 + # source://minitest//lib/minitest/assertions.rb#707 def refute_includes(collection, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is an instance of +cls+. # - # source://minitest//lib/minitest/assertions.rb#717 + # source://minitest//lib/minitest/assertions.rb#718 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#727 + # source://minitest//lib/minitest/assertions.rb#728 def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end # Fails if +matcher+ =~ +obj+. # - # source://minitest//lib/minitest/assertions.rb#735 + # source://minitest//lib/minitest/assertions.rb#736 def refute_match(matcher, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is nil. # - # source://minitest//lib/minitest/assertions.rb#745 + # source://minitest//lib/minitest/assertions.rb#746 def refute_nil(obj, msg = T.unsafe(nil)); end # Fails if +o1+ is not +op+ +o2+. Eg: @@ -557,12 +564,12 @@ module Minitest::Assertions # refute_operator 1, :>, 2 #=> pass # refute_operator 1, :<, 2 #=> fail # - # source://minitest//lib/minitest/assertions.rb#780 + # source://minitest//lib/minitest/assertions.rb#781 def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if +path+ exists. # - # source://minitest//lib/minitest/assertions.rb#789 + # source://minitest//lib/minitest/assertions.rb#790 def refute_path_exists(path, msg = T.unsafe(nil)); end # For testing with pattern matching (only supported with Ruby 3.0 and later) @@ -578,7 +585,7 @@ module Minitest::Assertions # # @raise [NotImplementedError] # - # source://minitest//lib/minitest/assertions.rb#762 + # source://minitest//lib/minitest/assertions.rb#763 def refute_pattern; end # For testing with predicates. @@ -589,17 +596,18 @@ module Minitest::Assertions # # str.wont_be :empty? # - # source://minitest//lib/minitest/assertions.rb#803 + # source://minitest//lib/minitest/assertions.rb#804 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#811 - def refute_respond_to(obj, meth, msg = T.unsafe(nil)); end + # source://minitest//lib/minitest/assertions.rb#813 + 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#820 + # source://minitest//lib/minitest/assertions.rb#822 def refute_same(exp, act, msg = T.unsafe(nil)); end # Skips the current run. If run in verbose-mode, the skipped run @@ -608,22 +616,22 @@ module Minitest::Assertions # # @raise [Minitest::Skip] # - # source://minitest//lib/minitest/assertions.rb#833 - def skip(msg = T.unsafe(nil), bt = T.unsafe(nil)); end + # source://minitest//lib/minitest/assertions.rb#835 + def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end # Skips the current run until a given date (in the local time # zone). This allows you to put some fixes on hold until a later # date, but still holds you accountable and prevents you from # forgetting it. # - # source://minitest//lib/minitest/assertions.rb#845 + # source://minitest//lib/minitest/assertions.rb#847 def skip_until(y, m, d, msg); end # Was this testcase skipped? Meant for #teardown. # # @return [Boolean] # - # source://minitest//lib/minitest/assertions.rb#854 + # source://minitest//lib/minitest/assertions.rb#856 def skipped?; end # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff. @@ -652,7 +660,7 @@ module Minitest::Assertions end end -# source://minitest//lib/minitest/assertions.rb#201 +# source://minitest//lib/minitest/assertions.rb#206 Minitest::Assertions::E = T.let(T.unsafe(nil), String) # source://minitest//lib/minitest/assertions.rb#19 @@ -662,63 +670,91 @@ Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) # # See Minitest.backtrace_filter=. # -# source://minitest//lib/minitest.rb#1067 +# source://minitest//lib/minitest.rb#1108 class Minitest::BacktraceFilter + # @return [BacktraceFilter] a new instance of BacktraceFilter + # + # source://minitest//lib/minitest.rb#1114 + 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#1075 + # source://minitest//lib/minitest.rb#1122 def filter(bt); end + + # Returns the value of attribute regexp. + # + # source://minitest//lib/minitest.rb#1112 + def regexp; end + + # Sets the attribute regexp + # + # @param value the value to set the attribute regexp to. + # + # source://minitest//lib/minitest.rb#1112 + def regexp=(_arg0); end end -# source://minitest//lib/minitest.rb#1069 +# source://minitest//lib/minitest.rb#1110 Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) # Dispatch to multiple reporters as one. # -# source://minitest//lib/minitest.rb#886 +# source://minitest//lib/minitest.rb#911 class Minitest::CompositeReporter < ::Minitest::AbstractReporter # @return [CompositeReporter] a new instance of CompositeReporter # - # source://minitest//lib/minitest.rb#890 + # source://minitest//lib/minitest.rb#917 def initialize(*reporters); end # Add another reporter to the mix. # - # source://minitest//lib/minitest.rb#902 + # source://minitest//lib/minitest.rb#929 def <<(reporter); end - # source://minitest//lib/minitest.rb#895 + # source://minitest//lib/minitest.rb#922 def io; end # @return [Boolean] # - # source://minitest//lib/minitest.rb#906 + # source://minitest//lib/minitest.rb#933 def passed?; end - # source://minitest//lib/minitest.rb#914 + # source://minitest//lib/minitest.rb#941 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#921 + # source://minitest//lib/minitest.rb#948 def record(result); end - # source://minitest//lib/minitest.rb#927 + # source://minitest//lib/minitest.rb#954 def report; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#888 + # source://minitest//lib/minitest.rb#915 def reporters; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#888 + # source://minitest//lib/minitest.rb#915 def reporters=(_arg0); end - # source://minitest//lib/minitest.rb#910 + # source://minitest//lib/minitest.rb#937 def start; end end +# Compresses backtraces. +# +# source://minitest//lib/minitest/compress.rb#5 +module Minitest::Compress + # Takes a backtrace (array of strings) and compresses repeating + # cycles in it to make it more readable. + # + # source://minitest//lib/minitest/compress.rb#11 + def compress(orig); end +end + # source://minitest//lib/minitest/spec.rb#41 class Minitest::Expectation < ::Struct def ctx; end @@ -975,48 +1011,48 @@ end # # ... lots of test methods ... # end # -# source://minitest//lib/minitest.rb#1011 +# source://minitest//lib/minitest.rb#1052 module Minitest::Guard # Is this running on jruby? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1016 + # source://minitest//lib/minitest.rb#1057 def jruby?(platform = T.unsafe(nil)); end # Is this running on maglev? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1023 + # source://minitest//lib/minitest.rb#1064 def maglev?(platform = T.unsafe(nil)); end # Is this running on mri? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1033 + # source://minitest//lib/minitest.rb#1074 def mri?(platform = T.unsafe(nil)); end # Is this running on macOS? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1040 + # source://minitest//lib/minitest.rb#1081 def osx?(platform = T.unsafe(nil)); end # Is this running on rubinius? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1047 + # source://minitest//lib/minitest.rb#1088 def rubinius?(platform = T.unsafe(nil)); end # Is this running on windows? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1057 + # source://minitest//lib/minitest.rb#1098 def windows?(platform = T.unsafe(nil)); end end @@ -1079,36 +1115,36 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#683 +# source://minitest//lib/minitest.rb#710 class Minitest::ProgressReporter < ::Minitest::Reporter - # source://minitest//lib/minitest.rb#684 + # source://minitest//lib/minitest.rb#711 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#691 + # source://minitest//lib/minitest.rb#718 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#514 +# source://minitest//lib/minitest.rb#532 module Minitest::Reportable # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#534 + # source://minitest//lib/minitest.rb#554 def class_name; end # Did this run error? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#555 + # source://minitest//lib/minitest.rb#575 def error?; end # The location identifier of this test. Depends on a method # existing called class_name. # - # source://minitest//lib/minitest.rb#529 + # source://minitest//lib/minitest.rb#549 def location; end # Did this run pass? @@ -1118,47 +1154,50 @@ module Minitest::Reportable # # @return [Boolean] # - # source://minitest//lib/minitest.rb#521 + # source://minitest//lib/minitest.rb#539 def passed?; end # Returns ".", "F", or "E" based on the result of the run. # - # source://minitest//lib/minitest.rb#541 + # source://minitest//lib/minitest.rb#561 def result_code; end # Was this run skipped? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#548 + # source://minitest//lib/minitest.rb#568 def skipped?; end end -# source://minitest//lib/minitest.rb#659 +# source://minitest//lib/minitest.rb#543 +Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String) + +# source://minitest//lib/minitest.rb#686 class Minitest::Reporter < ::Minitest::AbstractReporter # @return [Reporter] a new instance of Reporter # - # source://minitest//lib/minitest.rb#668 + # source://minitest//lib/minitest.rb#695 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # The IO used to report. # - # source://minitest//lib/minitest.rb#661 + # source://minitest//lib/minitest.rb#688 def io; end # The IO used to report. # - # source://minitest//lib/minitest.rb#661 + # source://minitest//lib/minitest.rb#688 def io=(_arg0); end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#666 + # source://minitest//lib/minitest.rb#693 def options; end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#666 + # source://minitest//lib/minitest.rb#693 def options=(_arg0); end end @@ -1168,80 +1207,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#567 +# source://minitest//lib/minitest.rb#587 class Minitest::Result < ::Minitest::Runnable include ::Minitest::Reportable - # source://minitest//lib/minitest.rb#601 + # source://minitest//lib/minitest.rb#621 def class_name; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#576 + # source://minitest//lib/minitest.rb#596 def klass; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#576 + # source://minitest//lib/minitest.rb#596 def klass=(_arg0); end # The location of the test method. # - # source://minitest//lib/minitest.rb#581 + # source://minitest//lib/minitest.rb#601 def source_location; end # The location of the test method. # - # source://minitest//lib/minitest.rb#581 + # source://minitest//lib/minitest.rb#601 def source_location=(_arg0); end - # source://minitest//lib/minitest.rb#605 + # source://minitest//lib/minitest.rb#625 def to_s; end class << self # Create a new test result from a Runnable instance. # - # source://minitest//lib/minitest.rb#586 + # source://minitest//lib/minitest.rb#606 def from(runnable); end end end # re-open # -# source://minitest//lib/minitest.rb#277 +# source://minitest//lib/minitest.rb#305 class Minitest::Runnable # @return [Runnable] a new instance of Runnable # - # source://minitest//lib/minitest.rb#445 + # source://minitest//lib/minitest.rb#463 def initialize(name); end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#281 + # source://minitest//lib/minitest.rb#309 def assertions; end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#281 + # source://minitest//lib/minitest.rb#309 def assertions=(_arg0); end - # source://minitest//lib/minitest.rb#441 + # source://minitest//lib/minitest.rb#459 def failure; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#286 + # source://minitest//lib/minitest.rb#314 def failures; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#286 + # source://minitest//lib/minitest.rb#314 def failures=(_arg0); end - # source://minitest//lib/minitest.rb#427 + # source://minitest//lib/minitest.rb#445 def marshal_dump; end - # source://minitest//lib/minitest.rb#437 + # source://minitest//lib/minitest.rb#455 def marshal_load(ary); end # Metadata you attach to the test results that get sent to the reporter. @@ -1251,29 +1290,29 @@ class Minitest::Runnable # NOTE: this data *must* be plain (read: marshal-able) data! # Hashes! Arrays! Strings! # - # source://minitest//lib/minitest.rb#460 + # source://minitest//lib/minitest.rb#478 def metadata; end # Sets metadata, mainly used for +Result.from+. # - # source://minitest//lib/minitest.rb#467 + # source://minitest//lib/minitest.rb#485 def metadata=(_arg0); end # Returns true if metadata exists. # # @return [Boolean] # - # source://minitest//lib/minitest.rb#472 + # source://minitest//lib/minitest.rb#490 def metadata?; end # Name of the run. # - # source://minitest//lib/minitest.rb#304 + # source://minitest//lib/minitest.rb#332 def name; end # Set the name of the run. # - # source://minitest//lib/minitest.rb#311 + # source://minitest//lib/minitest.rb#339 def name=(o); end # Did this run pass? @@ -1284,7 +1323,7 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#489 + # source://minitest//lib/minitest.rb#507 def passed?; end # Returns a single character string to print based on the result @@ -1293,14 +1332,14 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#498 + # source://minitest//lib/minitest.rb#516 def result_code; end # Runs a single method. Needs to return self. # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#479 + # source://minitest//lib/minitest.rb#497 def run; end # Was this run skipped? See #passed? for more information. @@ -1308,42 +1347,42 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#505 + # source://minitest//lib/minitest.rb#523 def skipped?; end # The time it took to run. # - # source://minitest//lib/minitest.rb#291 + # source://minitest//lib/minitest.rb#319 def time; end # The time it took to run. # - # source://minitest//lib/minitest.rb#291 + # source://minitest//lib/minitest.rb#319 def time=(_arg0); end - # source://minitest//lib/minitest.rb#293 + # source://minitest//lib/minitest.rb#321 def time_it; end class << self - # source://minitest//lib/minitest.rb#1109 + # source://minitest//lib/minitest.rb#1156 def inherited(klass); end # Returns all instance methods matching the pattern +re+. # - # source://minitest//lib/minitest.rb#318 + # source://minitest//lib/minitest.rb#346 def methods_matching(re); end - # source://minitest//lib/minitest.rb#397 + # source://minitest//lib/minitest.rb#415 def on_signal(name, action); end - # source://minitest//lib/minitest.rb#322 + # source://minitest//lib/minitest.rb#350 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#333 + # source://minitest//lib/minitest.rb#361 def run(reporter, options = T.unsafe(nil)); end # Runs a single method and has the reporter record the result. @@ -1351,7 +1390,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#369 + # source://minitest//lib/minitest.rb#387 def run_one_method(klass, method_name, reporter); end # Each subclass of Runnable is responsible for overriding this @@ -1359,33 +1398,33 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#414 + # source://minitest//lib/minitest.rb#432 def runnable_methods; end # Returns all subclasses of Runnable. # - # source://minitest//lib/minitest.rb#421 + # source://minitest//lib/minitest.rb#439 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#378 + # source://minitest//lib/minitest.rb#396 def test_order; end - # source://minitest//lib/minitest.rb#382 + # source://minitest//lib/minitest.rb#400 def with_info_handler(reporter, &block); end end end -# source://minitest//lib/minitest.rb#395 +# source://minitest//lib/minitest.rb#413 Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) # Assertion raised when skipping a run. # -# source://minitest//lib/minitest.rb#964 +# source://minitest//lib/minitest.rb#992 class Minitest::Skip < ::Minitest::Assertion - # source://minitest//lib/minitest.rb#965 + # source://minitest//lib/minitest.rb#993 def result_label; end end @@ -1642,113 +1681,113 @@ Minitest::Spec::TYPES = T.let(T.unsafe(nil), Array) # end # end # -# source://minitest//lib/minitest.rb#721 +# source://minitest//lib/minitest.rb#746 class Minitest::StatisticsReporter < ::Minitest::Reporter # @return [StatisticsReporter] a new instance of StatisticsReporter # - # source://minitest//lib/minitest.rb#763 + # source://minitest//lib/minitest.rb#790 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # Total number of assertions. # - # source://minitest//lib/minitest.rb#723 + # source://minitest//lib/minitest.rb#750 def assertions; end # Total number of assertions. # - # source://minitest//lib/minitest.rb#723 + # source://minitest//lib/minitest.rb#750 def assertions=(_arg0); end # Total number of test cases. # - # source://minitest//lib/minitest.rb#728 + # source://minitest//lib/minitest.rb#755 def count; end # Total number of test cases. # - # source://minitest//lib/minitest.rb#728 + # source://minitest//lib/minitest.rb#755 def count=(_arg0); end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#756 + # source://minitest//lib/minitest.rb#783 def errors; end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#756 + # source://minitest//lib/minitest.rb#783 def errors=(_arg0); end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#751 + # source://minitest//lib/minitest.rb#778 def failures; end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#751 + # source://minitest//lib/minitest.rb#778 def failures=(_arg0); end # @return [Boolean] # - # source://minitest//lib/minitest.rb#776 + # source://minitest//lib/minitest.rb#803 def passed?; end - # source://minitest//lib/minitest.rb#784 + # source://minitest//lib/minitest.rb#811 def record(result); end # Report on the tracked statistics. # - # source://minitest//lib/minitest.rb#794 + # source://minitest//lib/minitest.rb#821 def report; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#733 + # source://minitest//lib/minitest.rb#760 def results; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#733 + # source://minitest//lib/minitest.rb#760 def results=(_arg0); end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#761 + # source://minitest//lib/minitest.rb#788 def skips; end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#761 + # source://minitest//lib/minitest.rb#788 def skips=(_arg0); end - # source://minitest//lib/minitest.rb#780 + # source://minitest//lib/minitest.rb#807 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#740 + # source://minitest//lib/minitest.rb#767 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#740 + # source://minitest//lib/minitest.rb#767 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#746 + # source://minitest//lib/minitest.rb#773 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#746 + # source://minitest//lib/minitest.rb#773 def total_time=(_arg0); end end @@ -1760,48 +1799,48 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#815 +# source://minitest//lib/minitest.rb#841 class Minitest::SummaryReporter < ::Minitest::StatisticsReporter - # source://minitest//lib/minitest.rb#849 + # source://minitest//lib/minitest.rb#876 def aggregated_results(io); end # Returns the value of attribute old_sync. # - # source://minitest//lib/minitest.rb#817 + # source://minitest//lib/minitest.rb#844 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#817 + # source://minitest//lib/minitest.rb#844 def old_sync=(_arg0); end - # source://minitest//lib/minitest.rb#832 + # source://minitest//lib/minitest.rb#859 def report; end # :startdoc: # - # source://minitest//lib/minitest.rb#820 + # source://minitest//lib/minitest.rb#847 def start; end - # source://minitest//lib/minitest.rb#844 + # source://minitest//lib/minitest.rb#871 def statistics; end - # source://minitest//lib/minitest.rb#869 + # source://minitest//lib/minitest.rb#896 def summary; end # :stopdoc: # - # source://minitest//lib/minitest.rb#816 + # source://minitest//lib/minitest.rb#843 def sync; end # :stopdoc: # - # source://minitest//lib/minitest.rb#816 + # source://minitest//lib/minitest.rb#843 def sync=(_arg0); end - # source://minitest//lib/minitest.rb#865 + # source://minitest//lib/minitest.rb#892 def to_s; end end @@ -1979,33 +2018,38 @@ 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#974 +# source://minitest//lib/minitest.rb#1001 class Minitest::UnexpectedError < ::Minitest::Assertion + include ::Minitest::Compress + # @return [UnexpectedError] a new instance of UnexpectedError # - # source://minitest//lib/minitest.rb#977 + # source://minitest//lib/minitest.rb#1007 def initialize(error); end - # source://minitest//lib/minitest.rb#982 + # source://minitest//lib/minitest.rb#1020 def backtrace; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#975 + # source://minitest//lib/minitest.rb#1005 def error; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#975 + # source://minitest//lib/minitest.rb#1005 def error=(_arg0); end - # source://minitest//lib/minitest.rb#986 + # source://minitest//lib/minitest.rb#1026 def message; end - # source://minitest//lib/minitest.rb#991 + # source://minitest//lib/minitest.rb#1032 def result_label; end end +# source://minitest//lib/minitest.rb#1024 +Minitest::UnexpectedError::BASE_RE = T.let(T.unsafe(nil), Regexp) + # source://minitest//lib/minitest.rb#12 Minitest::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/mutex_m@0.2.0.rbi b/sorbet/rbi/gems/mutex_m@0.2.0.rbi new file mode 100644 index 000000000..346e6f8f4 --- /dev/null +++ b/sorbet/rbi/gems/mutex_m@0.2.0.rbi @@ -0,0 +1,93 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `mutex_m` gem. +# Please instead update this file by running `bin/tapioca gem mutex_m`. + +# = mutex_m.rb +# +# When 'mutex_m' is required, any object that extends or includes Mutex_m will +# be treated like a Mutex. +# +# Start by requiring the standard library Mutex_m: +# +# require "mutex_m.rb" +# +# From here you can extend an object with Mutex instance methods: +# +# obj = Object.new +# obj.extend Mutex_m +# +# Or mixin Mutex_m into your module to your class inherit Mutex instance +# methods --- remember to call super() in your class initialize method. +# +# class Foo +# include Mutex_m +# def initialize +# # ... +# super() +# end +# # ... +# end +# obj = Foo.new +# # this obj can be handled like Mutex +# +# source://mutex_m//lib/mutex_m.rb#41 +module Mutex_m + # source://mutex_m//lib/mutex_m.rb#111 + def initialize(*args, **_arg1); end + + # source://mutex_m//lib/mutex_m.rb#64 + def mu_extended; end + + # See Thread::Mutex#lock + # + # source://mutex_m//lib/mutex_m.rb#91 + def mu_lock; end + + # See Thread::Mutex#locked? + # + # @return [Boolean] + # + # source://mutex_m//lib/mutex_m.rb#81 + def mu_locked?; end + + # See Thread::Mutex#synchronize + # + # source://mutex_m//lib/mutex_m.rb#76 + def mu_synchronize(&block); end + + # See Thread::Mutex#try_lock + # + # source://mutex_m//lib/mutex_m.rb#86 + def mu_try_lock; end + + # See Thread::Mutex#unlock + # + # source://mutex_m//lib/mutex_m.rb#96 + def mu_unlock; end + + # See Thread::Mutex#sleep + # + # source://mutex_m//lib/mutex_m.rb#101 + def sleep(timeout = T.unsafe(nil)); end + + private + + # source://mutex_m//lib/mutex_m.rb#107 + def mu_initialize; end + + class << self + # source://mutex_m//lib/mutex_m.rb#54 + def append_features(cl); end + + # source://mutex_m//lib/mutex_m.rb#46 + def define_aliases(cl); end + + # source://mutex_m//lib/mutex_m.rb#59 + def extend_object(obj); end + end +end + +# source://mutex_m//lib/mutex_m.rb#43 +Mutex_m::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/net-imap@0.3.6.rbi b/sorbet/rbi/gems/net-imap@0.3.6.rbi deleted file mode 100644 index cb6a14017..000000000 --- a/sorbet/rbi/gems/net-imap@0.3.6.rbi +++ /dev/null @@ -1,3781 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# 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[https://tools.ietf.org/html/rfc3501]]. -# -- -# TODO: and [IMAP4rev2[https://tools.ietf.org/html/rfc9051]]. -# ++ -# -# == \IMAP Overview -# -# An \IMAP client connects to a server, and then authenticates -# itself using either #authenticate or #login. Having -# authenticated itself, there is a range of commands -# available to it. Most work with mailboxes, which may be -# arranged in an hierarchical namespace, and each of which -# contains zero or more messages. How this is implemented on -# the server is implementation-dependent; on a UNIX server, it -# will frequently be implemented as files in mailbox format -# within a hierarchy of directories. -# -# To work on the messages within a mailbox, the client must -# first select that mailbox, using either #select or #examine -# (for read-only access). Once the client has successfully -# selected a mailbox, they enter the "_selected_" state, and that -# mailbox becomes the _current_ mailbox, on which mail-item -# related commands implicitly operate. -# -# === Sequence numbers and UIDs -# -# Messages have two sorts of identifiers: message sequence -# numbers and UIDs. -# -# Message sequence numbers number messages within a mailbox -# from 1 up to the number of items in the mailbox. If a new -# message arrives during a session, it receives a sequence -# number equal to the new size of the mailbox. If messages -# are expunged from the mailbox, remaining messages have their -# sequence numbers "shuffled down" to fill the gaps. -# -# To avoid sequence number race conditions, servers must not expunge messages -# when no command is in progress, nor when responding to #fetch, #store, or -# #search. Expunges _may_ be sent during any other command, including -# #uid_fetch, #uid_store, and #uid_search. The #noop and #idle commands are -# both useful for this side-effect: they allow the server to send all mailbox -# updates, including expunges. -# -# UIDs, on the other hand, are permanently guaranteed not to -# identify another message within the same mailbox, even if -# the existing message is deleted. UIDs are required to -# be assigned in ascending (but not necessarily sequential) -# order within a mailbox; this means that if a non-IMAP client -# rearranges the order of mail items within a mailbox, the -# UIDs have to be reassigned. An \IMAP client thus cannot -# rearrange message orders. -# -# === Server capabilities and protocol extensions -# -# Net::IMAP does not modify its behavior according to server -# #capability. Users of the class must check for required capabilities before -# issuing commands. Special care should be taken to follow all #capability -# requirements for #starttls, #login, and #authenticate. -# -# See the #capability method for more information. -# -# == Examples of Usage -# -# === List sender and subject of all recent messages in the default mailbox -# -# imap = Net::IMAP.new('mail.example.com') -# imap.authenticate('LOGIN', 'joe_user', 'joes_password') -# imap.examine('INBOX') -# imap.search(["RECENT"]).each do |message_id| -# envelope = imap.fetch(message_id, "ENVELOPE")[0].attr["ENVELOPE"] -# puts "#{envelope.from[0].name}: \t#{envelope.subject}" -# end -# -# === Move all messages from April 2003 from "Mail/sent-mail" to "Mail/sent-apr03" -# -# imap = Net::IMAP.new('mail.example.com') -# imap.authenticate('LOGIN', 'joe_user', 'joes_password') -# imap.select('Mail/sent-mail') -# if not imap.list('Mail/', 'sent-apr03') -# imap.create('Mail/sent-apr03') -# end -# imap.search(["BEFORE", "30-Apr-2003", "SINCE", "1-Apr-2003"]).each do |message_id| -# imap.copy(message_id, "Mail/sent-apr03") -# imap.store(message_id, "+FLAGS", [:Deleted]) -# end -# imap.expunge -# -# == Thread Safety -# -# Net::IMAP supports concurrent threads. For example, -# -# imap = Net::IMAP.new("imap.foo.net", "imap2") -# imap.authenticate("cram-md5", "bar", "password") -# imap.select("inbox") -# fetch_thread = Thread.start { imap.fetch(1..-1, "UID") } -# search_result = imap.search(["BODY", "hello"]) -# fetch_result = fetch_thread.value -# imap.disconnect -# -# This script invokes the FETCH command and the SEARCH command concurrently. -# -# == Errors -# -# An \IMAP server can send three different types of responses to indicate -# failure: -# -# NO:: the attempted command could not be successfully completed. For -# instance, the username/password used for logging in are incorrect; -# the selected mailbox does not exist; etc. -# -# BAD:: the request from the client does not follow the server's -# understanding of the \IMAP protocol. This includes attempting -# commands from the wrong client state; for instance, attempting -# to perform a SEARCH command without having SELECTed a current -# mailbox. It can also signal an internal server -# failure (such as a disk crash) has occurred. -# -# BYE:: the server is saying goodbye. This can be part of a normal -# logout sequence, and can be used as part of a login sequence -# to indicate that the server is (for some reason) unwilling -# to accept your connection. As a response to any other command, -# it indicates either that the server is shutting down, or that -# the server is timing out the client connection due to inactivity. -# -# These three error response are represented by the errors -# Net::IMAP::NoResponseError, Net::IMAP::BadResponseError, and -# Net::IMAP::ByeResponseError, all of which are subclasses of -# Net::IMAP::ResponseError. Essentially, all methods that involve -# sending a request to the server can generate one of these errors. -# Only the most pertinent instances have been documented below. -# -# Because the IMAP class uses Sockets for communication, its methods -# are also susceptible to the various errors that can occur when -# working with sockets. These are generally represented as -# Errno errors. For instance, any method that involves sending a -# request to the server and/or receiving a response from it could -# raise an Errno::EPIPE error if the network connection unexpectedly -# goes down. See the socket(7), ip(7), tcp(7), socket(2), connect(2), -# and associated man pages. -# -# Finally, a Net::IMAP::DataFormatError is thrown if low-level data -# is found to be in an incorrect format (for instance, when converting -# between UTF-8 and UTF-16), and Net::IMAP::ResponseParseError is -# thrown if a server response is non-parseable. -# -# == What's here? -# -# * {Connection control}[rdoc-ref:Net::IMAP@Connection+control+methods] -# * {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands] -# * {...for any state}[rdoc-ref:Net::IMAP@IMAP+commands+for+any+state] -# * {...for the "not authenticated" state}[rdoc-ref:Net::IMAP@IMAP+commands+for+the+-22Not+Authenticated-22+state] -# * {...for the "authenticated" state}[rdoc-ref:Net::IMAP@IMAP+commands+for+the+-22Authenticated-22+state] -# * {...for the "selected" state}[rdoc-ref:Net::IMAP@IMAP+commands+for+the+-22Selected-22+state] -# * {...for the "logout" state}[rdoc-ref:Net::IMAP@IMAP+commands+for+the+-22Logout-22+state] -# * {Supported IMAP extensions}[rdoc-ref:Net::IMAP@Supported+IMAP+extensions] -# * {Handling server responses}[rdoc-ref:Net::IMAP@Handling+server+responses] -# -# === Connection control methods -# -# - Net::IMAP.new: A new client connects immediately and waits for a -# successful server greeting before returning the new client object. -# - #starttls: Asks the server to upgrade a clear-text connection to use TLS. -# - #logout: Tells the server to end the session. Enters the "_logout_" state. -# - #disconnect: Disconnects the connection (without sending #logout first). -# - #disconnected?: True if the connection has been closed. -# -# === Core \IMAP commands -# -# The following commands are defined either by -# the [IMAP4rev1[https://tools.ietf.org/html/rfc3501]] base specification, or -# by one of the following extensions: -# [IDLE[https://tools.ietf.org/html/rfc2177]], -# [NAMESPACE[https://tools.ietf.org/html/rfc2342]], -# [UNSELECT[https://tools.ietf.org/html/rfc3691]], -# -- -# TODO: [ENABLE[https://tools.ietf.org/html/rfc5161]], -# TODO: [LIST-EXTENDED[https://tools.ietf.org/html/rfc5258]], -# TODO: [LIST-STATUS[https://tools.ietf.org/html/rfc5819]], -# ++ -# [MOVE[https://tools.ietf.org/html/rfc6851]]. -# These extensions are widely supported by modern IMAP4rev1 servers and have -# all been integrated into [IMAP4rev2[https://tools.ietf.org/html/rfc9051]]. -# Note: Net::IMAP doesn't fully support IMAP4rev2 yet. -# -# -- -# TODO: When IMAP4rev2 is supported, add the following to the each of the -# appropriate commands below. -# Note:: CHECK has been removed from IMAP4rev2. -# Note:: LSUB is obsoleted by +LIST-EXTENDED and has been removed from IMAP4rev2. -# Some arguments require the +LIST-EXTENDED+ or +IMAP4rev2+ capability. -# Requires either the +ENABLE+ or +IMAP4rev2+ capability. -# Requires either the +NAMESPACE+ or +IMAP4rev2+ capability. -# Requires either the +IDLE+ or +IMAP4rev2+ capability. -# Requires either the +UNSELECT+ or +IMAP4rev2+ capability. -# Requires either the +UIDPLUS+ or +IMAP4rev2+ capability. -# Requires either the +MOVE+ or +IMAP4rev2+ capability. -# ++ -# -# ==== \IMAP commands for any state -# -# - #capability: Returns the server's capabilities as an array of strings. -# -# Capabilities may change after #starttls, #authenticate, or #login -# and cached capabilities must be reloaded. -# - #noop: Allows the server to send unsolicited untagged #responses. -# - #logout: Tells the server to end the session. Enters the "_logout_" state. -# -# ==== \IMAP commands for the "Not Authenticated" state -# -# In addition to the universal commands, the following commands are valid in -# the "not authenticated" state: -# -# - #starttls: Upgrades a clear-text connection to use TLS. -# -# Requires the +STARTTLS+ capability. -# - #authenticate: Identifies the client to the server using a {SASL -# mechanism}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml]. -# Enters the "_authenticated_" state. -# -# Requires the AUTH=#{mechanism} capability for the chosen -# mechanism. -# - #login: Identifies the client to the server using a plain text password. -# Using #authenticate is generally preferred. Enters the "_authenticated_" -# state. -# -# The +LOGINDISABLED+ capability must NOT be listed. -# -# ==== \IMAP commands for the "Authenticated" state -# -# In addition to the universal commands, the following commands are valid in -# the "_authenticated_" state: -# -# -- -# - #enable: Not implemented by Net::IMAP, yet. -# -# Requires the +ENABLE+ capability. -# ++ -# - #select: Open a mailbox and enter the "_selected_" state. -# - #examine: Open a mailbox read-only, and enter the "_selected_" state. -# - #create: Creates a new mailbox. -# - #delete: Permanently remove a mailbox. -# - #rename: Change the name of a mailbox. -# - #subscribe: Adds a mailbox to the "subscribed" set. -# - #unsubscribe: Removes a mailbox from the "subscribed" set. -# - #list: Returns names and attributes of mailboxes matching a given pattern. -# - #namespace: Returns mailbox namespaces, with path prefixes and delimiters. -# -# Requires the +NAMESPACE+ capability. -# - #status: Returns mailbox information, e.g. message count, unseen message -# count, +UIDVALIDITY+ and +UIDNEXT+. -# - #append: Appends a message to the end of a mailbox. -# - #idle: Allows the server to send updates to the client, without the client -# needing to poll using #noop. -# -# Requires the +IDLE+ capability. -# - #lsub: Lists mailboxes the user has declared "active" or "subscribed". -# -- -# Replaced by LIST-EXTENDED and removed from -# +IMAP4rev2+. However, Net::IMAP hasn't implemented -# LIST-EXTENDED _yet_. -# ++ -# -# ==== \IMAP commands for the "Selected" state -# -# In addition to the universal commands and the "authenticated" commands, the -# following commands are valid in the "_selected_" state: -# -# - #close: Closes the mailbox and returns to the "_authenticated_" state, -# expunging deleted messages, unless the mailbox was opened as read-only. -# - #unselect: Closes the mailbox and returns to the "_authenticated_" state, -# without expunging any messages. -# -# Requires the +UNSELECT+ capability. -# - #expunge: Permanently removes messages which have the Deleted flag set. -# - #uid_expunge: Restricts #expunge to only remove the specified UIDs. -# -# Requires the +UIDPLUS+ capability. -# - #search, #uid_search: Returns sequence numbers or UIDs of messages that -# match the given searching criteria. -# - #fetch, #uid_fetch: Returns data associated with a set of messages, -# specified by sequence number or UID. -# - #store, #uid_store: Alters a message's flags. -# - #copy, #uid_copy: Copies the specified messages to the end of the -# specified destination mailbox. -# - #move, #uid_move: Moves the specified messages to the end of the -# specified destination mailbox, expunging them from the current mailbox. -# -# Requires the +MOVE+ capability. -# - #check: Mostly obsolete. Can be replaced with #noop or #idle. -# -- -# Removed from IMAP4rev2. -# ++ -# -# ==== \IMAP commands for the "Logout" state -# -# No \IMAP commands are valid in the +logout+ state. If the socket is still -# open, Net::IMAP will close it after receiving server confirmation. -# Exceptions will be raised by \IMAP commands that have already started and -# are waiting for a response, as well as any that are called after logout. -# -# === Supported \IMAP extensions -# -# ==== RFC9051: +IMAP4rev2+ -# -# Although IMAP4rev2[https://tools.ietf.org/html/rfc9051] is not supported -# yet, Net::IMAP supports several extensions that have been folded into -# it: +IDLE+, +MOVE+, +NAMESPACE+, +UIDPLUS+, and +UNSELECT+. -# -- -# TODO: RFC4466, ABNF extensions (automatic support for other extensions) -# TODO: +ESEARCH+, ExtendedSearchData -# TODO: +SEARCHRES+, -# TODO: +ENABLE+, -# TODO: +SASL-IR+, -# TODO: +LIST-EXTENDED+, -# TODO: +LIST-STATUS+, -# TODO: +LITERAL-+, -# TODO: +BINARY+ (only the FETCH side) -# TODO: +SPECIAL-USE+ -# implicitly supported, but we can do better: Response codes: RFC5530, etc -# implicitly supported, but we can do better: STATUS=SIZE -# implicitly supported, but we can do better: STATUS DELETED -# ++ -# Commands for these extensions are included with the {Core IMAP -# commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands], above. Other supported -# extensons are listed below. -# -# ==== RFC2087: +QUOTA+ -# - #getquota: returns the resource usage and limits for a quota root -# - #getquotaroot: returns the list of quota roots for a mailbox, as well as -# their resource usage and limits. -# - #setquota: sets the resource limits for a given quota root. -# -# ==== RFC2177: +IDLE+ -# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051], so it is also -# listed with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. -# - #idle: Allows the server to send updates to the client, without the client -# needing to poll using #noop. -# -# ==== RFC2342: +NAMESPACE+ -# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051], so it is also -# listed with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. -# - #namespace: Returns mailbox namespaces, with path prefixes and delimiters. -# -# ==== RFC2971: +ID+ -# - #id: exchanges client and server implementation information. -# -# -- -# ==== RFC3502: +MULTIAPPEND+ -# TODO... -# ++ -# -# -- -# ==== RFC3516: +BINARY+ -# TODO... -# ++ -# -# ==== RFC3691: +UNSELECT+ -# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051], so it is also -# listed with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. -# - #unselect: Closes the mailbox and returns to the "_authenticated_" state, -# without expunging any messages. -# -# ==== RFC4314: +ACL+ -# - #getacl: lists the authenticated user's access rights to a mailbox. -# - #setacl: sets the access rights for a user on a mailbox -# -- -# TODO: #deleteacl, #listrights, #myrights -# ++ -# - *_Note:_* +DELETEACL+, +LISTRIGHTS+, and +MYRIGHTS+ are not supported yet. -# -# ==== RFC4315: +UIDPLUS+ -# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051], so it is also -# listed with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. -# - #uid_expunge: Restricts #expunge to only remove the specified UIDs. -# - Updates #select, #examine with the +UIDNOTSTICKY+ ResponseCode -# - Updates #append with the +APPENDUID+ ResponseCode -# - Updates #copy, #move with the +COPYUID+ ResponseCode -# -# -- -# ==== RFC4466: Collected Extensions to IMAP4 ABNF -# TODO... -# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051], this RFC updates -# the protocol to enable new optional parameters to many commands: #select, -# #examine, #create, #rename, #fetch, #uid_fetch, #store, #uid_store, #search, -# #uid_search, and #append. However, specific parameters are not defined. -# Extensions to these commands use this syntax whenever possible. Net::IMAP -# may be partially compatible with extensions to these commands, even without -# any explicit support. -# ++ -# -# -- -# ==== RFC4731 +ESEARCH+ -# TODO... -# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051]. -# - Updates #search, #uid_search to accept result options: +MIN+, +MAX+, -# +ALL+, +COUNT+, and to return ExtendedSearchData. -# ++ -# -# -- -# ==== RFC4959: +SASL-IR+ -# TODO... -# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051]. -# - Updates #authenticate to reduce round-trips for supporting mechanisms. -# ++ -# -# -- -# ==== RFC4978: COMPRESS=DEFLATE -# TODO... -# ++ -# -# -- -# ==== RFC5182 +SEARCHRES+ -# TODO... -# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051]. -# - Updates #search, #uid_search with the +SAVE+ result option. -# - Updates #copy, #uid_copy, #fetch, #uid_fetch, #move, #uid_move, #search, -# #uid_search, #store, #uid_store, and #uid_expunge with ability to -# reference the saved result of a previous #search or #uid_search command. -# ++ -# -# ==== RFC5256: +SORT+ -# - #sort, #uid_sort: An alternate version of #search or #uid_search which -# sorts the results by specified keys. -# ==== RFC5256: +THREAD+ -# - #thread, #uid_thread: An alternate version of #search or #uid_search, -# which arranges the results into ordered groups or threads according to a -# chosen algorithm. -# -# -- -# ==== RFC5258 +LIST-EXTENDED+ -# TODO... -# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051], this updates the -# protocol with new optional parameters to the #list command, adding a few of -# its own. Net::IMAP may be forward-compatible with future #list extensions, -# even without any explicit support. -# - Updates #list to accept selection options: +SUBSCRIBED+, +REMOTE+, and -# +RECURSIVEMATCH+, and return options: +SUBSCRIBED+ and +CHILDREN+. -# ++ -# -# -- -# ==== RFC5819 +LIST-STATUS+ -# TODO... -# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051]. -# - Updates #list with +STATUS+ return option. -# ++ -# -# ==== +XLIST+ (non-standard, deprecated) -# - #xlist: replaced by +SPECIAL-USE+ attributes in #list responses. -# -# -- -# ==== RFC6154 +SPECIAL-USE+ -# TODO... -# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051]. -# - Updates #list with the +SPECIAL-USE+ selection and return options. -# ++ -# -# ==== RFC6851: +MOVE+ -# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051], so it is also -# listed with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. -# - #move, #uid_move: Moves the specified messages to the end of the -# specified destination mailbox, expunging them from the current mailbox. -# -# -- -# ==== RFC6855: UTF8=ACCEPT -# TODO... -# ==== RFC6855: UTF8=ONLY -# TODO... -# ++ -# -# -- -# ==== RFC7888: LITERAL+, +LITERAL-+ -# TODO... -# ==== RFC7162: +QRESYNC+ -# TODO... -# ==== RFC7162: +CONDSTORE+ -# TODO... -# ==== RFC8474: +OBJECTID+ -# TODO... -# ==== RFC9208: +QUOTA+ -# TODO... -# ++ -# -# === Handling server responses -# -# - #greeting: The server's initial untagged response, which can indicate a -# pre-authenticated connection. -# - #responses: A hash with arrays of unhandled non-+nil+ -# UntaggedResponse and ResponseCode +#data+, keyed by +#name+. -# - #add_response_handler: Add a block to be called inside the receiver thread -# with every server response. -# - #remove_response_handler: Remove a previously added response handler. -# -# -# == References -# -- -# TODO: Consider moving references list to REFERENCES.md or REFERENCES.rdoc. -# ++ -# -# [{IMAP4rev1}[https://www.rfc-editor.org/rfc/rfc3501.html]]:: -# Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - \VERSION 4rev1", -# RFC 3501, DOI 10.17487/RFC3501, March 2003, -# . -# -# [IMAP-ABNF-EXT[https://www.rfc-editor.org/rfc/rfc4466.html]]:: -# Melnikov, A. and C. Daboo, "Collected Extensions to IMAP4 ABNF", -# RFC 4466, DOI 10.17487/RFC4466, April 2006, -# . -# -# Note: Net::IMAP cannot parse the entire RFC4466 grammar yet. -# -# [{IMAP4rev2}[https://www.rfc-editor.org/rfc/rfc9051.html]]:: -# Melnikov, A., Ed., and B. Leiba, Ed., "Internet Message Access Protocol -# (\IMAP) - Version 4rev2", RFC 9051, DOI 10.17487/RFC9051, August 2021, -# . -# -# Note: Net::IMAP is not fully compatible with IMAP4rev2 yet. -# -# [IMAP-IMPLEMENTATION[https://www.rfc-editor.org/info/rfc2683]]:: -# Leiba, B., "IMAP4 Implementation Recommendations", -# RFC 2683, DOI 10.17487/RFC2683, September 1999, -# . -# -# [IMAP-MULTIACCESS[https://www.rfc-editor.org/info/rfc2180]]:: -# Gahrns, M., "IMAP4 Multi-Accessed Mailbox Practice", RFC 2180, DOI -# 10.17487/RFC2180, July 1997, . -# -# [UTF7[https://tools.ietf.org/html/rfc2152]]:: -# Goldsmith, D. and M. Davis, "UTF-7 A Mail-Safe Transformation Format of -# Unicode", RFC 2152, DOI 10.17487/RFC2152, May 1997, -# . -# -# === Message envelope and body structure -# -# [RFC5322[https://tools.ietf.org/html/rfc5322]]:: -# Resnick, P., Ed., "Internet Message Format", -# RFC 5322, DOI 10.17487/RFC5322, October 2008, -# . -# -# Note: obsoletes -# RFC-2822[https://tools.ietf.org/html/rfc2822] (April 2001) and -# RFC-822[https://tools.ietf.org/html/rfc822] (August 1982). -# -# [CHARSET[https://tools.ietf.org/html/rfc2978]]:: -# Freed, N. and J. Postel, "IANA Charset Registration Procedures", BCP 19, -# RFC 2978, DOI 10.17487/RFC2978, October 2000, -# . -# -# [DISPOSITION[https://tools.ietf.org/html/rfc2183]]:: -# Troost, R., Dorner, S., and K. Moore, Ed., "Communicating Presentation -# Information in Internet Messages: The Content-Disposition Header -# Field", RFC 2183, DOI 10.17487/RFC2183, August 1997, -# . -# -# [MIME-IMB[https://tools.ietf.org/html/rfc2045]]:: -# Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions -# (MIME) Part One: Format of Internet Message Bodies", -# RFC 2045, DOI 10.17487/RFC2045, November 1996, -# . -# -# [MIME-IMT[https://tools.ietf.org/html/rfc2046]]:: -# Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions -# (MIME) Part Two: Media Types", RFC 2046, DOI 10.17487/RFC2046, -# November 1996, . -# -# [MIME-HDRS[https://tools.ietf.org/html/rfc2047]]:: -# Moore, K., "MIME (Multipurpose Internet Mail Extensions) Part Three: -# Message Header Extensions for Non-ASCII Text", -# RFC 2047, DOI 10.17487/RFC2047, November 1996, -# . -# -# [RFC2231[https://tools.ietf.org/html/rfc2231]]:: -# Freed, N. and K. Moore, "MIME Parameter Value and Encoded Word -# Extensions: Character Sets, Languages, and Continuations", -# RFC 2231, DOI 10.17487/RFC2231, November 1997, -# . -# -# [I18n-HDRS[https://tools.ietf.org/html/rfc6532]]:: -# Yang, A., Steele, S., and N. Freed, "Internationalized Email Headers", -# RFC 6532, DOI 10.17487/RFC6532, February 2012, -# . -# -# [LANGUAGE-TAGS[https://www.rfc-editor.org/info/rfc3282]]:: -# Alvestrand, H., "Content Language Headers", -# RFC 3282, DOI 10.17487/RFC3282, May 2002, -# . -# -# [LOCATION[https://www.rfc-editor.org/info/rfc2557]]:: -# Palme, J., Hopmann, A., and N. Shelness, "MIME Encapsulation of -# Aggregate Documents, such as HTML (MHTML)", -# RFC 2557, DOI 10.17487/RFC2557, March 1999, -# . -# -# [MD5[https://tools.ietf.org/html/rfc1864]]:: -# Myers, J. and M. Rose, "The Content-MD5 Header Field", -# RFC 1864, DOI 10.17487/RFC1864, October 1995, -# . -# -# -- -# TODO: Document IMAP keywords. -# -# [RFC3503[https://tools.ietf.org/html/rfc3503]] -# Melnikov, A., "Message Disposition Notification (MDN) -# profile for Internet Message Access Protocol (IMAP)", -# RFC 3503, DOI 10.17487/RFC3503, March 2003, -# . -# ++ -# -# === Supported \IMAP Extensions -# -# [QUOTA[https://tools.ietf.org/html/rfc2087]]:: -# Myers, J., "IMAP4 QUOTA extension", RFC 2087, DOI 10.17487/RFC2087, -# January 1997, . -# -- -# TODO: test compatibility with updated QUOTA extension: -# [QUOTA[https://tools.ietf.org/html/rfc9208]]:: -# Melnikov, A., "IMAP QUOTA Extension", RFC 9208, DOI 10.17487/RFC9208, -# March 2022, . -# ++ -# [IDLE[https://tools.ietf.org/html/rfc2177]]:: -# Leiba, B., "IMAP4 IDLE command", RFC 2177, DOI 10.17487/RFC2177, -# June 1997, . -# [NAMESPACE[https://tools.ietf.org/html/rfc2342]]:: -# Gahrns, M. and C. Newman, "IMAP4 Namespace", RFC 2342, -# DOI 10.17487/RFC2342, May 1998, . -# [ID[https://tools.ietf.org/html/rfc2971]]:: -# Showalter, T., "IMAP4 ID extension", RFC 2971, DOI 10.17487/RFC2971, -# October 2000, . -# [ACL[https://tools.ietf.org/html/rfc4314]]:: -# Melnikov, A., "IMAP4 Access Control List (ACL) Extension", RFC 4314, -# DOI 10.17487/RFC4314, December 2005, -# . -# [UIDPLUS[https://www.rfc-editor.org/rfc/rfc4315.html]]:: -# Crispin, M., "Internet Message Access Protocol (\IMAP) - UIDPLUS -# extension", RFC 4315, DOI 10.17487/RFC4315, December 2005, -# . -# [SORT[https://tools.ietf.org/html/rfc5256]]:: -# Crispin, M. and K. Murchison, "Internet Message Access Protocol - SORT and -# THREAD Extensions", RFC 5256, DOI 10.17487/RFC5256, June 2008, -# . -# [THREAD[https://tools.ietf.org/html/rfc5256]]:: -# Crispin, M. and K. Murchison, "Internet Message Access Protocol - SORT and -# THREAD Extensions", RFC 5256, DOI 10.17487/RFC5256, June 2008, -# . -# [RFC5530[https://www.rfc-editor.org/rfc/rfc5530.html]]:: -# Gulbrandsen, A., "IMAP Response Codes", RFC 5530, DOI 10.17487/RFC5530, -# May 2009, . -# [MOVE[https://tools.ietf.org/html/rfc6851]]:: -# Gulbrandsen, A. and N. Freed, Ed., "Internet Message Access Protocol -# (\IMAP) - MOVE Extension", RFC 6851, DOI 10.17487/RFC6851, January 2013, -# . -# -# === IANA registries -# -# * {IMAP Capabilities}[http://www.iana.org/assignments/imap4-capabilities] -# * {IMAP Response Codes}[https://www.iana.org/assignments/imap-response-codes/imap-response-codes.xhtml] -# * {IMAP Mailbox Name Attributes}[https://www.iana.org/assignments/imap-mailbox-name-attributes/imap-mailbox-name-attributes.xhtml] -# * {IMAP and JMAP Keywords}[https://www.iana.org/assignments/imap-jmap-keywords/imap-jmap-keywords.xhtml] -# * {IMAP Threading Algorithms}[https://www.iana.org/assignments/imap-threading-algorithms/imap-threading-algorithms.xhtml] -# -- -# * {IMAP Quota Resource Types}[http://www.iana.org/assignments/imap4-capabilities#imap-capabilities-2] -# * [{LIST-EXTENDED options and responses}[https://www.iana.org/assignments/imap-list-extended/imap-list-extended.xhtml] -# * {IMAP METADATA Server Entry and Mailbox Entry Registries}[https://www.iana.org/assignments/imap-metadata/imap-metadata.xhtml] -# * {IMAP ANNOTATE Extension Entries and Attributes}[https://www.iana.org/assignments/imap-annotate-extension/imap-annotate-extension.xhtml] -# * {IMAP URLAUTH Access Identifiers and Prefixes}[https://www.iana.org/assignments/urlauth-access-ids/urlauth-access-ids.xhtml] -# * {IMAP URLAUTH Authorization Mechanism Registry}[https://www.iana.org/assignments/urlauth-authorization-mechanism-registry/urlauth-authorization-mechanism-registry.xhtml] -# ++ -# * {SASL Mechanisms and SASL SCRAM Family Mechanisms}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] -# * {Service Name and Transport Protocol Port Number Registry}[https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml]: -# +imap+: tcp/143, +imaps+: tcp/993 -# * {GSSAPI/Kerberos/SASL Service Names}[https://www.iana.org/assignments/gssapi-service-names/gssapi-service-names.xhtml]: -# +imap+ -# * {Character sets}[https://www.iana.org/assignments/character-sets/character-sets.xhtml] -# -# source://net-imap//lib/net/imap.rb#701 -class Net::IMAP < ::Net::Protocol - include ::MonitorMixin - include ::OpenSSL - include ::OpenSSL::SSL - extend ::Net::IMAP::Authenticators - extend ::Net::IMAP::SASL - - # :call-seq: - # Net::IMAP.new(host, options = {}) - # - # Creates a new Net::IMAP object and connects it to the specified - # +host+. - # - # +options+ is an option hash, each key of which is a symbol. - # - # The available options are: - # - # port:: Port number (default value is 143 for imap, or 993 for imaps) - # ssl:: If +options[:ssl]+ is true, then an attempt will be made - # to use SSL (now TLS) to connect to the server. - # If +options[:ssl]+ is a hash, it's passed to - # OpenSSL::SSL::SSLContext#set_params as parameters. - # open_timeout:: Seconds to wait until a connection is opened - # idle_response_timeout:: Seconds to wait until an IDLE response is received - # - # The most common errors are: - # - # Errno::ECONNREFUSED:: Connection refused by +host+ or an intervening - # firewall. - # Errno::ETIMEDOUT:: Connection timed out (possibly due to packets - # being dropped by an intervening firewall). - # Errno::ENETUNREACH:: There is no route to that network. - # SocketError:: Hostname not known or other socket error. - # Net::IMAP::ByeResponseError:: The connected to the host was successful, but - # it immediately said goodbye. - # - # @return [IMAP] a new instance of IMAP - # - # source://net-imap//lib/net/imap.rb#2009 - def initialize(host, port_or_options = T.unsafe(nil), usessl = T.unsafe(nil), certs = T.unsafe(nil), verify = T.unsafe(nil)); end - - # Adds a response handler. For example, to detect when - # the server sends a new EXISTS response (which normally - # indicates new messages being added to the mailbox), - # add the following handler after selecting the - # mailbox: - # - # imap.add_response_handler { |resp| - # if resp.kind_of?(Net::IMAP::UntaggedResponse) and resp.name == "EXISTS" - # puts "Mailbox now has #{resp.data} messages" - # end - # } - # - # @raise [ArgumentError] - # - # source://net-imap//lib/net/imap.rb#1963 - 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] - # to append the +message+ to the end of the +mailbox+. The optional +flags+ - # argument is an array of flags initially passed to the new message. The - # optional +date_time+ argument specifies the creation time to assign to the - # new message; it defaults to the current time. - # - # For example: - # - # imap.append("inbox", < ok_resp - # authenticate(mech, *creds, **props) {|prop, auth| val } -> ok_resp - # authenticate(mechanism, authnid, credentials, authzid=nil) -> ok_resp - # authenticate(mechanism, **properties) -> ok_resp - # authenticate(mechanism) {|propname, authctx| prop_value } -> 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 - # "_authenticated_" state. - # - # +mechanism+ is the name of the \SASL authentication mechanism to be used. - # All other arguments are forwarded to the authenticator for the requested - # mechanism. The listed call signatures are suggestions. The - # documentation for each individual mechanism must be consulted for its - # specific parameters. - # - # An exception Net::IMAP::NoResponseError is raised if authentication fails. - # - # Related: #login, #starttls - # - # ==== Supported SASL Mechanisms - # - # +PLAIN+:: See PlainAuthenticator. - # Login using clear-text username and password. - # - # +XOAUTH2+:: See XOauth2Authenticator. - # Login using a username and OAuth2 access token. - # Non-standard and obsoleted by +OAUTHBEARER+, but widely - # supported. - # - # >>> - # *Deprecated:* Obsolete mechanisms are available for backwards - # compatibility. - # - # For +DIGEST-MD5+ see DigestMD5Authenticator. - # - # For +LOGIN+, see LoginAuthenticator. - # - # For +CRAM-MD5+, see CramMD5Authenticator. - # - # Using a deprecated mechanism will print a warning. - # - # See Net::IMAP::Authenticators for information on plugging in - # authenticators for other mechanisms. See the {SASL mechanism - # registry}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] - # for information on these and other SASL mechanisms. - # - # ===== Capabilities - # - # Clients MUST NOT attempt to authenticate with a mechanism unless - # "AUTH=#{mechanism}" for that mechanism is a server capability. - # - # Server capabilities may change after #starttls, #login, and #authenticate. - # Cached capabilities _must_ be invalidated after this method completes. - # The TaggedResponse to #authenticate may include updated capabilities in - # its ResponseCode. - # - # ===== Example - # If the authenticators ignore unhandled keyword arguments, the same config - # can be used for multiple mechanisms: - # - # password = nil # saved locally, so we don't ask more than once - # accesstok = nil # saved locally... - # creds = { - # authcid: username, - # password: proc { password ||= ui.prompt_for_password }, - # oauth2_token: proc { accesstok ||= kms.fresh_access_token }, - # } - # capa = imap.capability - # if capa.include? "AUTH=OAUTHBEARER" - # imap.authenticate "OAUTHBEARER", **creds # authcid, oauth2_token - # elsif capa.include? "AUTH=XOAUTH2" - # imap.authenticate "XOAUTH2", **creds # authcid, oauth2_token - # elsif capa.include? "AUTH=SCRAM-SHA-256" - # imap.authenticate "SCRAM-SHA-256", **creds # authcid, password - # elsif capa.include? "AUTH=PLAIN" - # imap.authenticate "PLAIN", **creds # authcid, password - # elsif capa.include? "AUTH=DIGEST-MD5" - # imap.authenticate "DIGEST-MD5", **creds # authcid, password - # elsif capa.include? "LOGINDISABLED" - # raise "the server has disabled login" - # else - # imap.login username, password - # end - # - # source://net-imap//lib/net/imap.rb#1040 - def authenticate(mechanism, *args, **props, &cb); end - - # Sends a {CAPABILITY command [IMAP4rev1 §6.1.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.1] - # and returns an array of capabilities that the server supports. Each - # capability is a string. - # - # See the {IANA IMAP4 capabilities - # registry}[http://www.iana.org/assignments/imap4-capabilities] for a list - # of all standard capabilities, and their reference RFCs. - # - # >>> - # *Note* that Net::IMAP does not currently modify its - # behaviour according to the capabilities of the server; - # it is up to the user of the class to ensure that - # a certain capability is supported by a server before - # using it. - # - # Capability requirements—other than +IMAP4rev1+—are listed in the - # documentation for each command method. - # - # ===== Basic IMAP4rev1 capabilities - # - # All IMAP4rev1 servers must include +IMAP4rev1+ in their capabilities list. - # All IMAP4rev1 servers must _implement_ the +STARTTLS+, - # AUTH=PLAIN, and +LOGINDISABLED+ capabilities, and clients must - # respect their presence or absence. See the capabilites requirements on - # #starttls, #login, and #authenticate. - # - # ===== Using IMAP4rev1 extensions - # - # IMAP4rev1 servers must not activate incompatible behavior until an - # explicit client action invokes a capability, e.g. sending a command or - # command argument specific to that capability. Extensions with backward - # compatible behavior, such as response codes or mailbox attributes, may - # be sent at any time. - # - # Invoking capabilities which are unknown to Net::IMAP may cause unexpected - # behavior and errors, for example ResponseParseError is raised when unknown - # response syntax is received. Invoking commands or command parameters that - # are unsupported by the server may raise NoResponseError, BadResponseError, - # or cause other unexpected behavior. - # - # ===== Caching +CAPABILITY+ responses - # - # Servers may send their capability list, unsolicited, using the - # +CAPABILITY+ response code or an untagged +CAPABILITY+ response. These - # responses can be retrieved and cached using #responses or - # #add_response_handler. - # - # But cached capabilities _must_ be discarded after #starttls, #login, or - # #authenticate. The OK TaggedResponse to #login and #authenticate may - # include +CAPABILITY+ response code data, but the TaggedResponse for - # #starttls is sent clear-text and cannot be trusted. - # - # source://net-imap//lib/net/imap.rb#849 - def capability; end - - # Sends a {CHECK command [IMAP4rev1 §6.4.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.1] - # to request a checkpoint of the currently selected mailbox. This performs - # implementation-specific housekeeping; for instance, reconciling the - # mailbox's in-memory and on-disk state. - # - # Related: #idle, #noop - # - # source://net-imap//lib/net/imap.rb#1503 - def check; end - - # source://net-imap//lib/net/imap.rb#737 - def client_thread; end - - # source://net-imap//lib/net/imap.rb#737 - def client_thread=(_arg0); end - - # Sends a {CLOSE command [IMAP4rev1 §6.4.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.2] - # to close the currently selected mailbox. The CLOSE command permanently - # removes from the mailbox all messages that have the \\Deleted - # flag set. - # - # Related: #unselect - # - # source://net-imap//lib/net/imap.rb#1513 - def close; 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 - # Range object. The number is a message sequence number. - # - # Related: #uid_copy - # - # ===== Capabilities - # - # If +UIDPLUS+ [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]] is - # supported, the server's response should include a +COPYUID+ response code - # with UIDPlusData. This will report the UIDVALIDITY of the destination - # mailbox, the UID set of the source messages, and the assigned UID set of - # the moved messages. - # - # source://net-imap//lib/net/imap.rb#1749 - def copy(set, mailbox); end - - # Sends a {CREATE command [IMAP4rev1 §6.3.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.3] - # to create a new +mailbox+. - # - # A Net::IMAP::NoResponseError is raised if a mailbox with that name - # cannot be created. - # - # Related: #rename, #delete - # - # source://net-imap//lib/net/imap.rb#1129 - def create(mailbox); end - - # Sends a {DELETE command [IMAP4rev1 §6.3.4]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.4] - # to remove the +mailbox+. - # - # A Net::IMAP::NoResponseError is raised if a mailbox with that name - # cannot be deleted, either because it does not exist or because the - # client does not have permission to delete it. - # - # Related: #create, #rename - # - # source://net-imap//lib/net/imap.rb#1141 - def delete(mailbox); end - - # Disconnects from the server. - # - # Related: #logout - # - # source://net-imap//lib/net/imap.rb#768 - def disconnect; end - - # Returns true if disconnected from the server. - # - # Related: #logout, #disconnect - # - # @return [Boolean] - # - # source://net-imap//lib/net/imap.rb#793 - def disconnected?; end - - # Sends a {EXAMINE command [IMAP4rev1 §6.3.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.2] - # to select a +mailbox+ so that messages in the +mailbox+ can be accessed. - # Behaves the same as #select, except that the selected +mailbox+ is - # identified as read-only. - # - # A Net::IMAP::NoResponseError is raised if the mailbox does not - # exist or is for some reason non-examinable. - # - # Related: #select - # - # source://net-imap//lib/net/imap.rb#1115 - def examine(mailbox); end - - # Sends an {EXPUNGE command [IMAP4rev1 §6.4.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.3] - # Sends a EXPUNGE command to permanently remove from the currently - # selected mailbox all messages that have the \Deleted flag set. - # - # Related: #uid_expunge - # - # source://net-imap//lib/net/imap.rb#1538 - def expunge; end - - # Sends a {FETCH command [IMAP4rev1 §6.4.5]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.5] - # to retrieve data associated with a message in the mailbox. - # - # The +set+ parameter is a number or a range between two numbers, - # or an array of those. The number is a message sequence number, - # where -1 represents a '*' for use in range notation like 100..-1 - # being interpreted as '100:*'. Beware that the +exclude_end?+ - # property of a Range object is ignored, and the contents of a - # range are independent of the order of the range endpoints as per - # the protocol specification, so 1...5, 5..1 and 5...1 are all - # equivalent to 1..5. - # - # +attr+ is a list of attributes to fetch; see the documentation - # for FetchData for a list of valid attributes. - # - # The return value is an array of FetchData or nil - # (instead of an empty array) if there is no matching message. - # - # Related: #uid_search, FetchData - # - # ===== For example: - # - # p imap.fetch(6..8, "UID") - # #=> [#98}>, \\ - # #99}>, \\ - # #100}>] - # p imap.fetch(6, "BODY[HEADER.FIELDS (SUBJECT)]") - # #=> [#"Subject: test\r\n\r\n"}>] - # data = imap.uid_fetch(98, ["RFC822.SIZE", "INTERNALDATE"])[0] - # p data.seqno - # #=> 6 - # p data.attr["RFC822.SIZE"] - # #=> 611 - # p data.attr["INTERNALDATE"] - # #=> "12-Oct-2000 22:40:59 +0900" - # p data.attr["UID"] - # #=> 98 - # - # source://net-imap//lib/net/imap.rb#1681 - def fetch(set, attr, mod = T.unsafe(nil)); end - - # Sends a {GETACL command [RFC4314 §3.3]}[https://www.rfc-editor.org/rfc/rfc4314#section-3.3] - # along with a specified +mailbox+. If this mailbox exists, an array - # containing objects of MailboxACLItem will be returned. - # - # Related: #setacl, MailboxACLItem - # - # ===== Capabilities - # - # The server's capabilities must include +ACL+ - # [RFC4314[https://tools.ietf.org/html/rfc4314]]. - # - # source://net-imap//lib/net/imap.rb#1410 - def getacl(mailbox); end - - # Sends a {GETQUOTA command [RFC2087 §4.2]}[https://www.rfc-editor.org/rfc/rfc2087#section-4.2] - # along with specified +mailbox+. If this mailbox exists, then an array - # containing a MailboxQuota object is returned. This command is generally - # only available to server admin. - # - # Related: #getquotaroot, #setquota, MailboxQuota - # - # ===== Capabilities - # - # The server's capabilities must include +QUOTA+ - # [RFC2087[https://tools.ietf.org/html/rfc2087]]. - # - # source://net-imap//lib/net/imap.rb#1354 - def getquota(mailbox); end - - # Sends a {GETQUOTAROOT command [RFC2087 §4.3]}[https://www.rfc-editor.org/rfc/rfc2087#section-4.3] - # along with the specified +mailbox+. This command is generally available - # to both admin and user. If this mailbox exists, it returns an array - # containing objects of type MailboxQuotaRoot and MailboxQuota. - # - # Related: #getquota, #setquota, MailboxQuotaRoot, MailboxQuota - # - # ===== Capabilities - # - # The server's capabilities must include +QUOTA+ - # [RFC2087[https://tools.ietf.org/html/rfc2087]]. - # - # source://net-imap//lib/net/imap.rb#1333 - def getquotaroot(mailbox); end - - # Returns the initial greeting the server, an UntaggedResponse. - # - # source://net-imap//lib/net/imap.rb#711 - def greeting; end - - # Sends an {ID command [RFC2971 §3.1]}[https://www.rfc-editor.org/rfc/rfc2971#section-3.1] - # and returns a hash of the server's response, or nil if the server does not - # identify itself. - # - # Note that the user should first check if the server supports the ID - # capability. For example: - # - # capabilities = imap.capability - # if capabilities.include?("ID") - # id = imap.id( - # name: "my IMAP client (ruby)", - # version: MyIMAP::VERSION, - # "support-url": "mailto:bugs@example.com", - # os: RbConfig::CONFIG["host_os"], - # ) - # end - # - # See [ID[https://tools.ietf.org/html/rfc2971]] for field definitions. - # - # ===== Capabilities - # - # The server's capabilities must include +ID+ - # [RFC2971[https://tools.ietf.org/html/rfc2971]] - # - # source://net-imap//lib/net/imap.rb#879 - def id(client_id = T.unsafe(nil)); end - - # Sends an {IDLE command [RFC2177 §3]}[https://www.rfc-editor.org/rfc/rfc6851#section-3] - # {[IMAP4rev2 §6.3.13]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.3.13] - # that waits for notifications of new or expunged messages. Yields - # responses from the server during the IDLE. - # - # Use #idle_done to leave IDLE. - # - # If +timeout+ is given, this method returns after +timeout+ seconds passed. - # +timeout+ can be used for keep-alive. For example, the following code - # checks the connection for each 60 seconds. - # - # loop do - # imap.idle(60) do |res| - # ... - # end - # end - # - # Related: #idle_done, #noop, #check - # - # ===== Capabilities - # - # The server's capabilities must include +IDLE+ - # [RFC2177[https://tools.ietf.org/html/rfc2177]]. - # - # @raise [LocalJumpError] - # - # source://net-imap//lib/net/imap.rb#1910 - def idle(timeout = T.unsafe(nil), &response_handler); end - - # Leaves IDLE. - # - # Related: #idle - # - # source://net-imap//lib/net/imap.rb#1942 - def idle_done; end - - # Seconds to wait until an IDLE response is received. - # - # source://net-imap//lib/net/imap.rb#735 - def idle_response_timeout; end - - # Sends a {LIST command [IMAP4rev1 §6.3.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.8] - # and returns a subset of names from the complete set of all names available - # to the client. +refname+ provides a context (for instance, a base - # directory in a directory-based mailbox hierarchy). +mailbox+ specifies a - # mailbox or (via wildcards) mailboxes under that context. Two wildcards - # may be used in +mailbox+: '*', which matches all characters *including* - # the hierarchy delimiter (for instance, '/' on a UNIX-hosted - # directory-based mailbox hierarchy); and '%', which matches all characters - # *except* the hierarchy delimiter. - # - # If +refname+ is empty, +mailbox+ is used directly to determine - # which mailboxes to match. If +mailbox+ is empty, the root - # name of +refname+ and the hierarchy delimiter are returned. - # - # The return value is an array of MailboxList. - # - # Related: #lsub, MailboxList - # - # ===== For example: - # - # imap.create("foo/bar") - # imap.create("foo/baz") - # p imap.list("", "foo/%") - # #=> [#, \\ - # #, \\ - # #] - # - # -- - # TODO: support LIST-EXTENDED extension [RFC5258]. Needed for IMAP4rev2. - # ++ - # - # source://net-imap//lib/net/imap.rb#1213 - def list(refname, mailbox); end - - # Sends a {LOGIN command [IMAP4rev1 §6.2.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.3] - # to identify the client and carries the plaintext +password+ authenticating - # this +user+. If successful, the connection enters the "_authenticated_" - # state. - # - # Using #authenticate is generally preferred over #login. The LOGIN command - # is not the same as #authenticate with the "LOGIN" +mechanism+. - # - # A Net::IMAP::NoResponseError is raised if authentication fails. - # - # Related: #authenticate, #starttls - # - # ==== Capabilities - # Clients MUST NOT call #login if +LOGINDISABLED+ is listed with the - # capabilities. - # - # Server capabilities may change after #starttls, #login, and #authenticate. - # Cached capabilities _must_ be invalidated after this method completes. - # The TaggedResponse to #login may include updated capabilities in its - # ResponseCode. - # - # source://net-imap//lib/net/imap.rb#1073 - def login(user, password); end - - # Sends a {LOGOUT command [IMAP4rev1 §6.1.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.3] - # to inform the command to inform the server that the client is done with - # the connection. - # - # Related: #disconnect - # - # source://net-imap//lib/net/imap.rb#907 - def logout; end - - # Sends a {LSUB command [IMAP4rev1 §6.3.9]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.9] - # and returns a subset of names from the set of names that the user has - # declared as being "active" or "subscribed." +refname+ and +mailbox+ are - # interpreted as for #list. - # - # The return value is an array of MailboxList objects. - # - # Related: #subscribe, #unsubscribe, #list, MailboxList - # - # source://net-imap//lib/net/imap.rb#1425 - def lsub(refname, mailbox); end - - # Sends a {MOVE command [RFC6851 §3.1]}[https://www.rfc-editor.org/rfc/rfc6851#section-3.1] - # {[IMAP4rev2 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.4.8] - # to move the specified message(s) to the end of the specified destination - # +mailbox+. The +set+ parameter is a number, an array of numbers, or a - # Range object. The number is a message sequence number. - # - # Related: #uid_move - # - # ===== Capabilities - # - # The server's capabilities must include +MOVE+ - # [RFC6851[https://tools.ietf.org/html/rfc6851]]. - # - # If +UIDPLUS+ [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]] is - # supported, the server's response should include a +COPYUID+ response code - # with UIDPlusData. This will report the UIDVALIDITY of the destination - # mailbox, the UID set of the source messages, and the assigned UID set of - # the moved messages. - # - # source://net-imap//lib/net/imap.rb#1785 - def move(set, mailbox); end - - # Sends a {NAMESPACE command [RFC2342 §5]}[https://www.rfc-editor.org/rfc/rfc2342#section-5] - # and returns the namespaces that are available. The NAMESPACE command - # allows a client to discover the prefixes of namespaces used by a server - # for personal mailboxes, other users' mailboxes, and shared mailboxes. - # - # The return value is a Namespaces object which has +personal+, +other+, and - # +shared+ fields, each an array of Namespace objects. These arrays will be - # empty when the server responds with +nil+. - # - # Many \IMAP servers are configured with the default personal namespaces as - # ("" "/"): no prefix and the "+/+" hierarchy delimiter. In that - # common case, the naive client may not have any trouble naming mailboxes. - # But many servers are configured with the default personal namespace as - # e.g. ("INBOX." "."), placing all personal folders under INBOX, - # with "+.+" as the hierarchy delimiter. If the client does not check for - # this, but naively assumes it can use the same folder names for all - # servers, then folder creation (and listing, moving, etc) can lead to - # errors. - # - # From RFC2342: - # - # Although typically a server will support only a single Personal - # Namespace, and a single Other User's Namespace, circumstances exist - # where there MAY be multiples of these, and a client MUST be prepared - # for them. If a client is configured such that it is required to create - # a certain mailbox, there can be circumstances where it is unclear which - # Personal Namespaces it should create the mailbox in. In these - # situations a client SHOULD let the user select which namespaces to - # create the mailbox in. - # - # Related: #list, Namespaces, Namespace - # - # ===== For example: - # - # capabilities = imap.capability - # if capabilities.include?("NAMESPACE") - # namespaces = imap.namespace - # if namespace = namespaces.personal.first - # prefix = namespace.prefix # e.g. "" or "INBOX." - # delim = namespace.delim # e.g. "/" or "." - # # personal folders should use the prefix and delimiter - # imap.create(prefix + "foo") - # imap.create(prefix + "bar") - # imap.create(prefix + %w[path to my folder].join(delim)) - # end - # end - # - # ===== Capabilities - # - # The server's capabilities must include +NAMESPACE+ - # [RFC2342[https://tools.ietf.org/html/rfc2342]]. - # - # source://net-imap//lib/net/imap.rb#1271 - def namespace; end - - # Sends a {NOOP command [IMAP4rev1 §6.1.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.2] - # to the server. - # - # This allows the server to send unsolicited untagged EXPUNGE #responses, - # but does not execute any client request. \IMAP servers are permitted to - # send unsolicited untagged responses at any time, except for `EXPUNGE`. - # - # * +EXPUNGE+ can only be sent while a command is in progress. - # * +EXPUNGE+ must _not_ be sent during #fetch, #store, or #search. - # * +EXPUNGE+ may be sent during #uid_fetch, #uid_store, or #uid_search. - # - # Related: #idle, #check - # - # source://net-imap//lib/net/imap.rb#898 - 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#732 - def open_timeout; end - - # Removes the response handler. - # - # source://net-imap//lib/net/imap.rb#1969 - 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] - # to change the name of the +mailbox+ to +newname+. - # - # A Net::IMAP::NoResponseError is raised if a mailbox with the - # name +mailbox+ cannot be renamed to +newname+ for whatever - # reason; for instance, because +mailbox+ does not exist, or - # because there is already a mailbox with the name +newname+. - # - # Related: #create, #delete - # - # source://net-imap//lib/net/imap.rb#1154 - def rename(mailbox, newname); end - - # Returns all response handlers. - # - # source://net-imap//lib/net/imap.rb#727 - def response_handlers; end - - # Returns a hash with arrays of unhandled non-+nil+ - # UntaggedResponse#data keyed by UntaggedResponse#name, and - # ResponseCode#data keyed by ResponseCode#name. - # - # For example: - # - # imap.select("inbox") - # p imap.responses["EXISTS"][-1] - # #=> 2 - # p imap.responses["UIDVALIDITY"][-1] - # #=> 968263756 - # - # source://net-imap//lib/net/imap.rb#724 - def responses; end - - # Sends a {SEARCH command [IMAP4rev1 §6.4.4]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.4] - # to search the mailbox for messages that match the given searching - # criteria, and returns message sequence numbers. +keys+ can either be a - # string holding the entire search string, or a single-dimension array of - # search keywords and arguments. - # - # Related: #uid_search - # - # ===== Search criteria - # - # For a full list of search criteria, - # see [{IMAP4rev1 §6.4.4}[https://www.rfc-editor.org/rfc/rfc3501.html#section-6.4.4]], - # or [{IMAP4rev2 §6.4.4}[https://www.rfc-editor.org/rfc/rfc9051.html#section-6.4.4]], - # in addition to documentation for - # any [CAPABILITIES[https://www.iana.org/assignments/imap-capabilities/imap-capabilities.xhtml]] - # reported by #capability which may define additional search filters, e.g: - # +CONDSTORE+, +WITHIN+, +FILTERS+, SEARCH=FUZZY, +OBJECTID+, or - # +SAVEDATE+. The following are some common search criteria: - # - # :: a set of message sequence numbers. "," indicates - # an interval, "+:+" indicates a range. For instance, - # "2,10:12,15" means "2,10,11,12,15". - # - # BEFORE :: messages with an internal date strictly before - # . The date argument has a format similar - # to 8-Aug-2002, and can be formatted using - # Net::IMAP.format_date. - # - # BODY :: messages that contain within their body. - # - # CC :: messages containing in their CC field. - # - # FROM :: messages that contain in their FROM field. - # - # NEW:: messages with the \Recent, but not the \Seen, flag set. - # - # NOT :: negate the following search key. - # - # OR :: "or" two search keys together. - # - # ON :: messages with an internal date exactly equal to , - # which has a format similar to 8-Aug-2002. - # - # SINCE :: messages with an internal date on or after . - # - # SUBJECT :: messages with in their subject. - # - # TO :: messages with in their TO field. - # - # ===== For example: - # - # p imap.search(["SUBJECT", "hello", "NOT", "NEW"]) - # #=> [1, 6, 7, 8] - # - # source://net-imap//lib/net/imap.rb#1631 - 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] - # to select a +mailbox+ so that messages in the +mailbox+ can be accessed. - # - # After you have selected a mailbox, you may retrieve the number of items in - # that mailbox from imap.responses["EXISTS"][-1], and the number of - # recent messages from imap.responses["RECENT"][-1]. Note that - # these values can change if new messages arrive during a session or when - # existing messages are expunged; see #add_response_handler for a way to - # detect these events. - # - # A Net::IMAP::NoResponseError is raised if the mailbox does not - # exist or is for some reason non-selectable. - # - # Related: #examine - # - # ===== Capabilities - # - # If [UIDPLUS[https://www.rfc-editor.org/rfc/rfc4315.html]] is supported, - # the server may return an untagged "NO" response with a "UIDNOTSTICKY" - # response code indicating that the mailstore does not support persistent - # UIDs: - # @responses["NO"].last.code.name == "UIDNOTSTICKY" - # - # source://net-imap//lib/net/imap.rb#1099 - def select(mailbox); end - - # Sends a {SETACL command [RFC4314 §3.1]}[https://www.rfc-editor.org/rfc/rfc4314#section-3.1] - # along with +mailbox+, +user+ and the +rights+ that user is to have on that - # mailbox. If +rights+ is nil, then that user will be stripped of any - # rights to that mailbox. - # - # Related: #getacl - # - # ===== Capabilities - # - # The server's capabilities must include +ACL+ - # [RFC4314[https://tools.ietf.org/html/rfc4314]]. - # - # source://net-imap//lib/net/imap.rb#1392 - def setacl(mailbox, user, rights); end - - # Sends a {SETQUOTA command [RFC2087 §4.1]}[https://www.rfc-editor.org/rfc/rfc2087#section-4.1] - # along with the specified +mailbox+ and +quota+. If +quota+ is nil, then - # +quota+ will be unset for that mailbox. Typically one needs to be logged - # in as a server admin for this to work. - # - # Related: #getquota, #getquotaroot - # - # ===== Capabilities - # - # The server's capabilities must include +QUOTA+ - # [RFC2087[https://tools.ietf.org/html/rfc2087]]. - # - # source://net-imap//lib/net/imap.rb#1372 - def setquota(mailbox, quota); end - - # Sends a {SORT command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] - # to search a mailbox for messages that match +search_keys+ and return an - # array of message sequence numbers, sorted by +sort_keys+. +search_keys+ - # are interpreted the same as for #search. - # - # -- - # TODO: describe +sort_keys+ - # ++ - # - # Related: #uid_sort, #search, #uid_search, #thread, #uid_thread - # - # ===== For example: - # - # p imap.sort(["FROM"], ["ALL"], "US-ASCII") - # #=> [1, 2, 3, 5, 6, 7, 8, 4, 9] - # p imap.sort(["DATE"], ["SUBJECT", "hello"], "US-ASCII") - # #=> [6, 7, 8, 1] - # - # ===== Capabilities - # - # The server's capabilities must include +SORT+ - # [RFC5256[https://tools.ietf.org/html/rfc5256]]. - # - # source://net-imap//lib/net/imap.rb#1829 - def sort(sort_keys, search_keys, charset); end - - # Sends a {STARTTLS command [IMAP4rev1 §6.2.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.1] - # to start a TLS session. - # - # Any +options+ are forwarded to OpenSSL::SSL::SSLContext#set_params. - # - # This method returns after TLS negotiation and hostname verification are - # both successful. Any error indicates that the connection has not been - # secured. - # - # *Note:* - # >>> - # Any #response_handlers added before STARTTLS should be aware that the - # TaggedResponse to STARTTLS is sent clear-text, _before_ TLS negotiation. - # TLS negotiation starts immediately after that response. - # - # Related: Net::IMAP.new, #login, #authenticate - # - # ===== Capability - # - # The server's capabilities must include +STARTTLS+. - # - # Server capabilities may change after #starttls, #login, and #authenticate. - # Cached capabilities _must_ be invalidated after this method completes. - # - # The TaggedResponse to #starttls is sent clear-text, so the server must - # *not* send capabilities in the #starttls response and clients must - # not use them if they are sent. Servers will generally send an - # unsolicited untagged response immeditely _after_ #starttls completes. - # - # source://net-imap//lib/net/imap.rb#940 - def starttls(options = T.unsafe(nil), verify = T.unsafe(nil)); end - - # Sends a {STATUS commands [IMAP4rev1 §6.3.10]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.10] - # and returns the status of the indicated +mailbox+. +attr+ is a list of one - # or more attributes whose statuses are to be requested. Supported - # attributes include: - # - # MESSAGES:: the number of messages in the mailbox. - # RECENT:: the number of recent messages in the mailbox. - # UNSEEN:: the number of unseen messages in the mailbox. - # - # The return value is a hash of attributes. For example: - # - # p imap.status("inbox", ["MESSAGES", "RECENT"]) - # #=> {"RECENT"=>0, "MESSAGES"=>44} - # - # A Net::IMAP::NoResponseError is raised if status values - # for +mailbox+ cannot be returned; for instance, because it - # does not exist. - # - # source://net-imap//lib/net/imap.rb#1449 - def status(mailbox, attr); end - - # Sends a {STORE command [IMAP4rev1 §6.4.6]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.6] - # to alter data associated with messages in the mailbox, in particular their - # flags. The +set+ parameter is a number, an array of numbers, or a Range - # object. Each number is a message sequence number. +attr+ is the name of a - # data item to store: 'FLAGS' will replace the message's flag list with the - # provided one, '+FLAGS' will add the provided flags, and '-FLAGS' will - # remove them. +flags+ is a list of flags. - # - # The return value is an array of FetchData - # - # Related: #uid_store - # - # ===== For example: - # - # p imap.store(6..8, "+FLAGS", [:Deleted]) - # #=> [#[:Seen, :Deleted]}>, \\ - # #[:Seen, :Deleted]}>, \\ - # #[:Seen, :Deleted]}>] - # - # source://net-imap//lib/net/imap.rb#1719 - def store(set, attr, flags); end - - # Sends a {SUBSCRIBE command [IMAP4rev1 §6.3.6]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.6] - # to add the specified +mailbox+ name to the server's set of "active" or - # "subscribed" mailboxes as returned by #lsub. - # - # A Net::IMAP::NoResponseError is raised if +mailbox+ cannot be - # subscribed to; for instance, because it does not exist. - # - # Related: #unsubscribe, #lsub, #list - # - # source://net-imap//lib/net/imap.rb#1166 - def subscribe(mailbox); end - - # Sends a {THREAD command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] - # to search a mailbox and return message sequence numbers in threaded - # format, as a ThreadMember tree. +search_keys+ are interpreted the same as - # for #search. - # - # The supported algorithms are: - # - # ORDEREDSUBJECT:: split into single-level threads according to subject, - # ordered by date. - # REFERENCES:: split into threads by parent/child relationships determined - # by which message is a reply to which. - # - # Unlike #search, +charset+ is a required argument. US-ASCII - # and UTF-8 are sample values. - # - # Related: #uid_thread, #search, #uid_search, #sort, #uid_sort - # - # ===== Capabilities - # - # The server's capabilities must include +THREAD+ - # [RFC5256[https://tools.ietf.org/html/rfc5256]]. - # - # source://net-imap//lib/net/imap.rb#1869 - def thread(algorithm, search_keys, charset); end - - # Sends a {UID COPY command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8] - # to copy the specified message(s) to the end of the specified destination - # +mailbox+. - # - # Similar to #copy, but +set+ contains unique identifiers. - # - # ===== Capabilities - # - # +UIDPLUS+ affects #uid_copy the same way it affects #copy. - # - # source://net-imap//lib/net/imap.rb#1762 - def uid_copy(set, mailbox); end - - # Sends a {UID EXPUNGE command [RFC4315 §2.1]}[https://www.rfc-editor.org/rfc/rfc4315#section-2.1] - # {[IMAP4rev2 §6.4.9]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.4.9] - # to permanently remove all messages that have both the \\Deleted - # flag set and a UID that is included in +uid_set+. - # - # By using #uid_expunge instead of #expunge when resynchronizing with - # the server, the client can ensure that it does not inadvertantly - # remove any messages that have been marked as \\Deleted by other - # clients between the time that the client was last connected and - # the time the client resynchronizes. - # - # *Note:* - # >>> - # Although the command takes a set of UIDs for its argument, the - # server still returns regular EXPUNGE responses, which contain - # a sequence number. These will be deleted from - # #responses and this method returns them as an array of - # sequence number integers. - # - # Related: #expunge - # - # ===== Capabilities - # - # The server's capabilities must include +UIDPLUS+ - # [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]]. - # - # source://net-imap//lib/net/imap.rb#1570 - def uid_expunge(uid_set); end - - # Sends a {UID FETCH command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8] - # to retrieve data associated with a message in the mailbox. - # - # Similar to #fetch, but the +set+ parameter contains unique identifiers - # instead of message sequence numbers. - # - # >>> - # *Note:* Servers _MUST_ implicitly include the +UID+ message data item as - # part of any +FETCH+ response caused by a +UID+ command, regardless of - # whether a +UID+ was specified as a message data item to the +FETCH+. - # - # Related: #fetch, FetchData - # - # source://net-imap//lib/net/imap.rb#1697 - def uid_fetch(set, attr, mod = T.unsafe(nil)); end - - # Sends a {UID MOVE command [RFC6851 §3.2]}[https://www.rfc-editor.org/rfc/rfc6851#section-3.2] - # {[IMAP4rev2 §6.4.9]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.4.9] - # to move the specified message(s) to the end of the specified destination - # +mailbox+. - # - # Similar to #move, but +set+ contains unique identifiers. - # - # Related: #move - # - # ===== Capabilities - # - # Same as #move: The server's capabilities must include +MOVE+ - # [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#1803 - 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] - # to search the mailbox for messages that match the given searching - # criteria, and returns unique identifiers (UIDs). - # - # See #search for documentation of search criteria. - # - # source://net-imap//lib/net/imap.rb#1640 - 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] - # to search a mailbox for messages that match +search_keys+ and return an - # array of unique identifiers, sorted by +sort_keys+. +search_keys+ are - # interpreted the same as for #search. - # - # Related: #sort, #search, #uid_search, #thread, #uid_thread - # - # ===== Capabilities - # - # The server's capabilities must include +SORT+ - # [RFC5256[https://tools.ietf.org/html/rfc5256]]. - # - # source://net-imap//lib/net/imap.rb#1844 - def uid_sort(sort_keys, search_keys, charset); end - - # Sends a {UID STORE command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8] - # to alter data associated with messages in the mailbox, in particular their - # flags. - # - # Similar to #store, but +set+ contains unique identifiers instead of - # message sequence numbers. - # - # Related: #store - # - # source://net-imap//lib/net/imap.rb#1731 - def uid_store(set, attr, flags); end - - # Sends a {UID THREAD command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] - # Similar to #thread, but returns unique identifiers instead of - # message sequence numbers. - # - # Related: #thread, #search, #uid_search, #sort, #uid_sort - # - # ===== Capabilities - # - # The server's capabilities must include +THREAD+ - # [RFC5256[https://tools.ietf.org/html/rfc5256]]. - # - # source://net-imap//lib/net/imap.rb#1883 - def uid_thread(algorithm, search_keys, charset); end - - # Sends an {UNSELECT command [RFC3691 §2]}[https://www.rfc-editor.org/rfc/rfc3691#section-3] - # {[IMAP4rev2 §6.4.2]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.4.2] - # to free the session resources for a mailbox and return to the - # "_authenticated_" state. This is the same as #close, except that - # \\Deleted messages are not removed from the mailbox. - # - # Related: #close - # - # ===== Capabilities - # - # The server's capabilities must include +UNSELECT+ - # [RFC3691[https://tools.ietf.org/html/rfc3691]]. - # - # source://net-imap//lib/net/imap.rb#1529 - def unselect; end - - # Sends an {UNSUBSCRIBE command [IMAP4rev1 §6.3.7]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.7] - # to remove the specified +mailbox+ name from the server's set of "active" - # or "subscribed" mailboxes. - # - # A Net::IMAP::NoResponseError is raised if +mailbox+ cannot be - # unsubscribed from; for instance, because the client is not currently - # subscribed to it. - # - # Related: #subscribe, #lsub, #list - # - # source://net-imap//lib/net/imap.rb#1179 - def unsubscribe(mailbox); end - - # Sends a XLIST command, and returns a subset of names from - # the complete set of all names available to the client. - # +refname+ provides a context (for instance, a base directory - # in a directory-based mailbox hierarchy). +mailbox+ specifies - # a mailbox or (via wildcards) mailboxes under that context. - # Two wildcards may be used in +mailbox+: '*', which matches - # all characters *including* the hierarchy delimiter (for instance, - # '/' on a UNIX-hosted directory-based mailbox hierarchy); and '%', - # which matches all characters *except* the hierarchy delimiter. - # - # If +refname+ is empty, +mailbox+ is used directly to determine - # which mailboxes to match. If +mailbox+ is empty, the root - # name of +refname+ and the hierarchy delimiter are returned. - # - # The XLIST command is like the LIST command except that the flags - # returned refer to the function of the folder/mailbox, e.g. :Sent - # - # The return value is an array of MailboxList objects. For example: - # - # imap.create("foo/bar") - # imap.create("foo/baz") - # p imap.xlist("", "foo/%") - # #=> [#, \\ - # #, \\ - # #] - # - # Related: #list, MailboxList - # - # ===== Capabilities - # - # The server's capabilities must include +XLIST+, - # a deprecated Gmail extension (replaced by +SPECIAL-USE+). - # -- - # TODO: Net::IMAP doesn't yet have full SPECIAL-USE support. Supporting - # servers MAY return SPECIAL-USE attributes, but are not *required* to - # unless the SPECIAL-USE return option is supplied. - # ++ - # - # source://net-imap//lib/net/imap.rb#1315 - def xlist(refname, mailbox); end - - private - - # source://net-imap//lib/net/imap.rb#2301 - def copy_internal(cmd, set, mailbox); end - - # source://net-imap//lib/net/imap.rb#2340 - def create_ssl_params(certs = T.unsafe(nil), verify = T.unsafe(nil)); end - - # source://net-imap//lib/net/imap.rb#2269 - def fetch_internal(cmd, set, attr, mod = T.unsafe(nil)); end - - # source://net-imap//lib/net/imap.rb#2233 - def generate_tag; end - - # source://net-imap//lib/net/imap.rb#2178 - def get_response; end - - # source://net-imap//lib/net/imap.rb#2151 - def get_tagged_response(tag, cmd, timeout = T.unsafe(nil)); end - - # source://net-imap//lib/net/imap.rb#2329 - def normalize_searching_criteria(keys); end - - # source://net-imap//lib/net/imap.rb#2238 - def put_string(str); end - - # source://net-imap//lib/net/imap.rb#2080 - def receive_responses; end - - # source://net-imap//lib/net/imap.rb#2198 - def record_response(name, data); end - - # source://net-imap//lib/net/imap.rb#2253 - def search_internal(cmd, keys, charset); end - - # source://net-imap//lib/net/imap.rb#2205 - def send_command(cmd, *args, &block); end - - # source://net-imap//lib/net/imap/command_data.rb#33 - def send_data(data, tag = T.unsafe(nil)); end - - # source://net-imap//lib/net/imap/command_data.rb#108 - def send_date_data(date); end - - # source://net-imap//lib/net/imap/command_data.rb#94 - def send_list_data(list, tag = T.unsafe(nil)); end - - # source://net-imap//lib/net/imap/command_data.rb#73 - def send_literal(str, tag = T.unsafe(nil)); end - - # source://net-imap//lib/net/imap/command_data.rb#90 - def send_number_data(num); end - - # source://net-imap//lib/net/imap/command_data.rb#69 - def send_quoted_string(str); end - - # source://net-imap//lib/net/imap/command_data.rb#54 - def send_string_data(str, tag = T.unsafe(nil)); end - - # source://net-imap//lib/net/imap/command_data.rb#111 - def send_symbol_data(symbol); end - - # source://net-imap//lib/net/imap/command_data.rb#109 - def send_time_data(time); end - - # source://net-imap//lib/net/imap.rb#2305 - def sort_internal(cmd, sort_keys, search_keys, charset); end - - # source://net-imap//lib/net/imap.rb#2357 - def start_tls_session(params = T.unsafe(nil)); end - - # source://net-imap//lib/net/imap.rb#2290 - def store_internal(cmd, set, attr, flags); end - - # source://net-imap//lib/net/imap.rb#2071 - def tcp_socket(host, port); end - - # source://net-imap//lib/net/imap.rb#2318 - 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. - # - # source://net-imap//lib/net/imap.rb#740 - def debug; end - - # Sets the debug mode. - # - # source://net-imap//lib/net/imap.rb#745 - def debug=(val); end - - # :call-seq: decode_date(string) -> Date - # - # Decodes +string+ as an IMAP formatted "date". - # - # Double quotes are optional. Day of month may be padded with zero or - # space. See STRFDATE. - # - # source://net-imap//lib/net/imap/data_encoding.rb#89 - def decode_date(string); end - - # :call-seq: decode_datetime(string) -> DateTime - # - # Decodes +string+ as an IMAP4 formatted "date-time". - # - # Note that double quotes are not optional. See STRFTIME. - # - # source://net-imap//lib/net/imap/data_encoding.rb#106 - def decode_datetime(string); end - - # :call-seq: decode_time(string) -> Time - # - # Decodes +string+ as an IMAP4 formatted "date-time". - # - # Same as +decode_datetime+, but returning a Time instead. - # - # source://net-imap//lib/net/imap/data_encoding.rb#115 - def decode_time(string); end - - # Decode a string from modified UTF-7 format to UTF-8. - # - # UTF-7 is a 7-bit encoding of Unicode [UTF7]. IMAP uses a - # slightly modified version of this to encode mailbox names - # containing non-ASCII characters; see [IMAP] section 5.1.3. - # - # Net::IMAP does _not_ automatically encode and decode - # mailbox names to and from UTF-7. - # - # source://net-imap//lib/net/imap/data_encoding.rb#56 - def decode_utf7(s); end - - # The default port for IMAP connections, port 143 - # - # 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#755 - def default_imaps_port; end - - # The default port for IMAP connections, port 143 - # - # 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#755 - def default_ssl_port; end - - # The default port for IMAPS connections, port 993 - # - # source://net-imap//lib/net/imap.rb#755 - def default_tls_port; end - - # Formats +time+ as an IMAP4 date. - # - # source://net-imap//lib/net/imap/data_encoding.rb#79 - def encode_date(date); end - - # :call-seq: encode_datetime(time) -> string - # - # Formats +time+ as an IMAP4 date-time. - # - # source://net-imap//lib/net/imap/data_encoding.rb#97 - def encode_datetime(time); end - - # :call-seq: encode_datetime(time) -> string - # - # Formats +time+ as an IMAP4 date-time. - # - # source://net-imap//lib/net/imap/data_encoding.rb#97 - def encode_time(time); end - - # Encode a string from UTF-8 format to modified UTF-7. - # - # source://net-imap//lib/net/imap/data_encoding.rb#67 - def encode_utf7(s); end - - # Formats +time+ as an IMAP4 date. - # - # source://net-imap//lib/net/imap/data_encoding.rb#79 - def format_date(date); end - - # DEPRECATED:: The original version returned incorrectly formatted strings. - # Strings returned by encode_datetime or format_time use the - # correct IMAP4rev1 syntax for "date-time". - # - # This invalid format has been temporarily retained for backward - # compatibility. A future release will change this method to return the - # correct format. - # - # source://net-imap//lib/net/imap/data_encoding.rb#137 - def format_datetime(time); end - - # :call-seq: encode_datetime(time) -> string - # - # Formats +time+ as an IMAP4 date-time. - # - # source://net-imap//lib/net/imap/data_encoding.rb#97 - def format_time(time); end - - # :call-seq: decode_date(string) -> Date - # - # Decodes +string+ as an IMAP formatted "date". - # - # Double quotes are optional. Day of month may be padded with zero or - # space. See STRFDATE. - # - # source://net-imap//lib/net/imap/data_encoding.rb#89 - def parse_date(string); end - - # :call-seq: decode_datetime(string) -> DateTime - # - # Decodes +string+ as an IMAP4 formatted "date-time". - # - # Note that double quotes are not optional. See STRFTIME. - # - # source://net-imap//lib/net/imap/data_encoding.rb#106 - def parse_datetime(string); end - - # :call-seq: decode_time(string) -> Time - # - # Decodes +string+ as an IMAP4 formatted "date-time". - # - # Same as +decode_datetime+, but returning a Time instead. - # - # source://net-imap//lib/net/imap/data_encoding.rb#115 - def parse_time(string); end - end -end - -# Mailbox attribute indicating that this mailbox presents all messages in -# the user's message store. Implementations MAY omit some messages, such as, -# perhaps, those in \Trash and \Junk. When this special use is supported, it -# is almost certain to represent a virtual mailbox -# -# source://net-imap//lib/net/imap/flags.rb#218 -Net::IMAP::ALL = T.let(T.unsafe(nil), Symbol) - -# Mailbox attribute indicating that this mailbox is used to archive -# messages. The meaning of an "archival" mailbox is server dependent; -# typically, it will be used to get messages out of the inbox, or otherwise -# keep them out of the user's way, while still making them accessible -# -# source://net-imap//lib/net/imap/flags.rb#224 -Net::IMAP::ARCHIVE = T.let(T.unsafe(nil), Symbol) - -# source://net-imap//lib/net/imap/command_data.rb#130 -class Net::IMAP::Atom - # @return [Atom] a new instance of Atom - # - # source://net-imap//lib/net/imap/command_data.rb#140 - def initialize(data); end - - # source://net-imap//lib/net/imap/command_data.rb#131 - def send_data(imap, tag); end - - # source://net-imap//lib/net/imap/command_data.rb#135 - def validate; end -end - -# Registry for SASL authenticators used by Net::IMAP. -# -# source://net-imap//lib/net/imap/authenticators.rb#4 -module Net::IMAP::Authenticators - # Adds an authenticator for Net::IMAP#authenticate to use. +mechanism+ is the - # {SASL mechanism}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] - # implemented by +authenticator+ (for instance, "PLAIN"). - # - # The +authenticator+ must respond to +#new+ (or #call), receiving the - # authenticator configuration and return a configured authentication session. - # The authenticator session must respond to +#process+, receiving the server's - # challenge and returning the client's response. - # - # See PlainAuthenticator, XOauth2Authenticator, and DigestMD5Authenticator for - # examples. - # - # source://net-imap//lib/net/imap/authenticators.rb#17 - def add_authenticator(auth_type, authenticator); end - - # :call-seq: - # authenticator(mechanism, ...) -> authenticator - # authenticator(mech, *creds, **props) {|prop, auth| val } -> authenticator - # authenticator(mechanism, authnid, creds, authzid=nil) -> authenticator - # authenticator(mechanism, **properties) -> authenticator - # authenticator(mechanism) {|propname, authctx| value } -> authenticator - # - # Builds a new authentication session context for +mechanism+. - # - # [Note] - # This method is intended for internal use by connection protocol code only. - # Protocol client users should see refer to their client's documentation, - # e.g. Net::IMAP#authenticate for Net::IMAP. - # - # The call signatures documented for this method are recommendations for - # authenticator implementors. All arguments (other than +mechanism+) are - # forwarded to the registered authenticator's +#new+ (or +#call+) method, and - # each authenticator must document its own arguments. - # - # The returned object represents a single authentication exchange and must - # not be reused for multiple authentication attempts. - # - # source://net-imap//lib/net/imap/authenticators.rb#42 - def authenticator(mechanism, *authargs, **properties, &callback); end - - private - - # source://net-imap//lib/net/imap/authenticators.rb#55 - def authenticators; end -end - -# Net::IMAP::BodyStructure is included by all of the structs that can be -# returned from a "BODYSTRUCTURE" or "BODY" -# FetchData#attr value. Although these classes don't share a base class, -# this module can be used to pattern match all of them. -# -# See {[IMAP4rev1] §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501.html#section-7.4.2] -# and {[IMAP4rev2] §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051.html#section-7.5.2-4.9] -# for full description of all +BODYSTRUCTURE+ fields, and also -# Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs. -# -# === Classes that include BodyStructure -# BodyTypeBasic:: Represents any message parts that are not handled by -# BodyTypeText, BodyTypeMessage, or BodyTypeMultipart. -# BodyTypeText:: Used by text/* parts. Contains all of the -# BodyTypeBasic fields. -# BodyTypeMessage:: Used by message/rfc822 and -# message/global parts. Contains all of the -# BodyTypeBasic fields. Other message/* types -# should use BodyTypeBasic. -# BodyTypeMultipart:: for multipart/* parts -# -# ==== Deprecated BodyStructure classes -# The following classes represent invalid server responses or parser bugs: -# BodyTypeExtension:: parser bug: used for message/* where -# BodyTypeBasic should have been used. -# BodyTypeAttachment:: server bug: some servers sometimes return the -# "Content-Disposition: attachment" data where the -# entire body structure for a message part is expected. -# -# source://net-imap//lib/net/imap/response_data.rb#901 -module Net::IMAP::BodyStructure; end - -# === WARNING -# BodyTypeAttachment represents a body-fld-dsp that is -# incorrectly in a position where the IMAP4rev1 grammar expects a nested -# +body+ structure. -# -# >>> -# \IMAP body structures are parenthesized lists and assign their fields -# positionally, so missing fields change the intepretation of all -# following fields. Buggy \IMAP servers sometimes leave fields missing -# rather than empty, which inevitably confuses parsers. -# BodyTypeAttachment was an attempt to parse a common type of buggy body -# structure without crashing. -# -# Currently, when Net::IMAP::ResponseParser sees "attachment" as the first -# entry in a body-type-1part, which is where the MIME type should -# be, it uses BodyTypeAttachment to capture the rest. "attachment" is not -# a valid MIME type, but _is_ a common Content-Disposition. What -# might have happened was that buggy server could not parse the message -# (which might have been incorrectly formatted) and output a -# body-type-dsp where a Net::IMAP::ResponseParser expected to see -# a +body+. -# -# A future release will replace this, probably with a ContentDisposition -# nested inside another body structure object, maybe BodyTypeBasic, or -# perhaps a new body structure class that represents any unparsable body -# structure. -# -# source://net-imap//lib/net/imap/response_data.rb#1156 -class Net::IMAP::BodyTypeAttachment < ::Struct - include ::Net::IMAP::BodyStructure - - # *invalid for BodyTypeAttachment* - # - # source://net-imap//lib/net/imap/response_data.rb#1160 - def media_type; end - - # @return [Boolean] - # - # source://net-imap//lib/net/imap/response_data.rb#1188 - def multipart?; end - - # *invalid for BodyTypeAttachment* - # - # source://net-imap//lib/net/imap/response_data.rb#1168 - def subtype; end -end - -# Net::IMAP::BodyTypeBasic represents basic body structures of messages and -# message parts, unless they have a Content-Type that is handled by -# BodyTypeText, BodyTypeMessage, or BodyTypeMultipart. -# -# See {[IMAP4rev1] §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501.html#section-7.4.2] -# and {[IMAP4rev2] §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051.html#section-7.5.2-4.9] -# for full description of all +BODYSTRUCTURE+ fields, and also -# Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs. -# -# source://net-imap//lib/net/imap/response_data.rb#917 -class Net::IMAP::BodyTypeBasic < ::Struct - include ::Net::IMAP::BodyStructure - - # :call-seq: media_subtype -> subtype - # - # >>> - # [Obsolete] - # Use +subtype+ instead. Calling this will generate a warning message - # to +stderr+, then return the value of +subtype+. - # -- - # TODO: why not just keep this as an alias? Would "media_subtype" be used - # for something else? - # ++ - # - # source://net-imap//lib/net/imap/response_data.rb#1028 - def media_subtype; end - - # :call-seq: multipart? -> false - # - # BodyTypeBasic is not used for multipart MIME parts. - # - # @return [Boolean] - # - # source://net-imap//lib/net/imap/response_data.rb#1014 - def multipart?; end -end - -# === WARNING: -# >>> -# BodyTypeExtension is (incorrectly) used for message/* parts -# (besides message/rfc822, which correctly uses BodyTypeMessage). -# -# A future release will replace this class with: -# * BodyTypeMessage for message/rfc822 and message/global -# * BodyTypeBasic for any other message/* -# -# source://net-imap//lib/net/imap/response_data.rb#1278 -class Net::IMAP::BodyTypeExtension < ::Struct - include ::Net::IMAP::BodyStructure - - # @return [Boolean] - # - # source://net-imap//lib/net/imap/response_data.rb#1281 - def multipart?; end -end - -# Net::IMAP::BodyTypeMessage represents the body structures of messages and -# message parts, when Content-Type is message/rfc822 or -# message/global. -# -# BodyTypeMessage contains all of the fields of BodyTypeBasic. See -# BodyTypeBasic for documentation of the following fields: -# * {media_type}[rdoc-ref:BodyTypeBasic#media_type] -# * subtype[rdoc-ref:BodyTypeBasic#subtype] -# * param[rdoc-ref:BodyTypeBasic#param] -# * {content_id}[rdoc-ref:BodyTypeBasic#content_id] -# * description[rdoc-ref:BodyTypeBasic#description] -# * encoding[rdoc-ref:BodyTypeBasic#encoding] -# * size[rdoc-ref:BodyTypeBasic#size] -# -# source://net-imap//lib/net/imap/response_data.rb#1097 -class Net::IMAP::BodyTypeMessage < ::Struct - include ::Net::IMAP::BodyStructure - - # Obsolete: use +subtype+ instead. Calling this will - # generate a warning message to +stderr+, then return - # the value of +subtype+. - # - # source://net-imap//lib/net/imap/response_data.rb#1123 - def media_subtype; end - - # :call-seq: multipart? -> false - # - # BodyTypeMessage is not used for multipart MIME parts. - # - # @return [Boolean] - # - # source://net-imap//lib/net/imap/response_data.rb#1116 - def multipart?; end -end - -# Net::IMAP::BodyTypeMultipart represents body structures of messages and -# message parts, when Content-Type is multipart/*. -# -# source://net-imap//lib/net/imap/response_data.rb#1198 -class Net::IMAP::BodyTypeMultipart < ::Struct - include ::Net::IMAP::BodyStructure - - # Obsolete: use +subtype+ instead. Calling this will - # generate a warning message to +stderr+, then return - # the value of +subtype+. - # - # source://net-imap//lib/net/imap/response_data.rb#1262 - def media_subtype; end - - # :call-seq: multipart? -> true - # - # BodyTypeMultipart is used for multipart MIME parts. - # - # @return [Boolean] - # - # source://net-imap//lib/net/imap/response_data.rb#1254 - def multipart?; end -end - -# Net::IMAP::BodyTypeText represents the body structures of messages and -# message parts, when Content-Type is text/*. -# -# BodyTypeText contains all of the fields of BodyTypeBasic. See -# BodyTypeBasic for documentation of the following: -# * {media_type}[rdoc-ref:BodyTypeBasic#media_type] -# * subtype[rdoc-ref:BodyTypeBasic#subtype] -# * param[rdoc-ref:BodyTypeBasic#param] -# * {content_id}[rdoc-ref:BodyTypeBasic#content_id] -# * description[rdoc-ref:BodyTypeBasic#description] -# * encoding[rdoc-ref:BodyTypeBasic#encoding] -# * size[rdoc-ref:BodyTypeBasic#size] -# -# source://net-imap//lib/net/imap/response_data.rb#1052 -class Net::IMAP::BodyTypeText < ::Struct - include ::Net::IMAP::BodyStructure - - # Obsolete: use +subtype+ instead. Calling this will - # generate a warning message to +stderr+, then return - # the value of +subtype+. - # - # source://net-imap//lib/net/imap/response_data.rb#1072 - def media_subtype; end - - # :call-seq: multipart? -> false - # - # BodyTypeText is not used for multipart MIME parts. - # - # @return [Boolean] - # - # source://net-imap//lib/net/imap/response_data.rb#1065 - def multipart?; end -end - -# source://net-imap//lib/net/imap/command_data.rb#231 -class Net::IMAP::ClientID - # @return [ClientID] a new instance of ClientID - # - # source://net-imap//lib/net/imap/command_data.rb#243 - def initialize(data); end - - # source://net-imap//lib/net/imap/command_data.rb#233 - def send_data(imap, tag); end - - # source://net-imap//lib/net/imap/command_data.rb#237 - def validate; end - - private - - # source://net-imap//lib/net/imap/command_data.rb#257 - def format_internal(client_id); end - - # source://net-imap//lib/net/imap/command_data.rb#247 - def validate_internal(client_id); end -end - -# Authenticator for the "+CRAM-MD5+" SASL mechanism, specified in -# RFC2195[https://tools.ietf.org/html/rfc2195]. See Net::IMAP#authenticate. -# -# == Deprecated -# -# +CRAM-MD5+ is obsolete and insecure. It is included for compatibility with -# existing servers. -# {draft-ietf-sasl-crammd5-to-historic}[https://tools.ietf.org/html/draft-ietf-sasl-crammd5-to-historic-00.html] -# recommends using +SCRAM-*+ or +PLAIN+ protected by TLS instead. -# -# Additionally, RFC8314[https://tools.ietf.org/html/rfc8314] discourage the use -# of cleartext and recommends TLS version 1.2 or greater be used for all -# traffic. With TLS +CRAM-MD5+ is okay, but so is +PLAIN+ -# -# source://net-imap//lib/net/imap/authenticators/cram_md5.rb#16 -class Net::IMAP::CramMD5Authenticator - # @return [CramMD5Authenticator] a new instance of CramMD5Authenticator - # - # source://net-imap//lib/net/imap/authenticators/cram_md5.rb#24 - def initialize(user, password, warn_deprecation: T.unsafe(nil), **_ignored); end - - # source://net-imap//lib/net/imap/authenticators/cram_md5.rb#17 - def process(challenge); end - - private - - # source://net-imap//lib/net/imap/authenticators/cram_md5.rb#33 - def hmac_md5(text, key); end -end - -# 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 -# mailbox, containing messages from other mailboxes that are marked with the -# "\Draft" message flag. Alternatively, this might just be advice that a -# client put drafts here -# -# source://net-imap//lib/net/imap/flags.rb#232 -Net::IMAP::DRAFTS = T.let(T.unsafe(nil), Symbol) - -# Net::IMAP authenticator for the "`DIGEST-MD5`" SASL mechanism type, specified -# in RFC2831(https://tools.ietf.org/html/rfc2831). See Net::IMAP#authenticate. -# -# == Deprecated -# -# "+DIGEST-MD5+" has been deprecated by -# {RFC6331}[https://tools.ietf.org/html/rfc6331] and should not be relied on for -# security. It is included for compatibility with existing servers. -# -# source://net-imap//lib/net/imap/authenticators/digest_md5.rb#11 -class Net::IMAP::DigestMD5Authenticator - # @return [DigestMD5Authenticator] a new instance of DigestMD5Authenticator - # - # source://net-imap//lib/net/imap/authenticators/digest_md5.rb#77 - def initialize(user, password, authname = T.unsafe(nil), warn_deprecation: T.unsafe(nil)); end - - # source://net-imap//lib/net/imap/authenticators/digest_md5.rb#12 - def process(challenge); end - - private - - # source://net-imap//lib/net/imap/authenticators/digest_md5.rb#94 - def nc(nonce); end - - # some responses need quoting - # - # source://net-imap//lib/net/imap/authenticators/digest_md5.rb#104 - def qdval(k, v); end -end - -# Alias for HAS_CHILDREN, to match the \IMAP spelling. -# -# source://net-imap//lib/net/imap/flags.rb#183 -Net::IMAP::HASCHILDREN = T.let(T.unsafe(nil), Symbol) - -# Alias for HAS_NO_CHILDREN, to match the \IMAP spelling. -# -# source://net-imap//lib/net/imap/flags.rb#185 -Net::IMAP::HASNOCHILDREN = T.let(T.unsafe(nil), Symbol) - -# The presence of this attribute indicates that the mailbox has child -# mailboxes. A server SHOULD NOT set this attribute if there are child -# mailboxes and the user does not have permission to access any of them. In -# this case, +\HasNoChildren+ SHOULD be used. In many cases, however, a -# server may not be able to efficiently compute whether a user has access to -# any child mailboxes. Note that even though the +\HasChildren+ attribute -# for a mailbox must be correct at the time of processing the mailbox, a -# client must be prepared to deal with a situation when a mailbox is marked -# with the +\HasChildren+ attribute, but no child mailbox appears in the -# response to the #list command. This might happen, for example, due to child -# mailboxes being deleted or made inaccessible to the user (using access -# control) by another client before the server is able to list them. -# -# It is an error for the server to return both a +\HasChildren+ and a -# +\HasNoChildren+ attribute in the same #list response. A client that -# encounters a #list response with both +\HasChildren+ and +\HasNoChildren+ -# attributes present should act as if both are absent in the #list response. -# -# source://net-imap//lib/net/imap/flags.rb#136 -Net::IMAP::HAS_CHILDREN = T.let(T.unsafe(nil), Symbol) - -# The presence of this attribute indicates that the mailbox has NO child -# mailboxes that are accessible to the currently authenticated user. -# -# It is an error for the server to return both a +\HasChildren+ and a -# +\HasNoChildren+ attribute in the same #list response. A client that -# encounters a #list response with both +\HasChildren+ and +\HasNoChildren+ -# attributes present should act as if both are absent in the #list response. -# -# Note: the +\HasNoChildren+ attribute should not be confused with the -# +\NoInferiors+ attribute, which indicates that no child mailboxes exist -# now and none can be created in the future. -# -# source://net-imap//lib/net/imap/flags.rb#149 -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 some -# clients to close the connection. -# -# It matches no IMAP standard. -# -# source://net-imap//lib/net/imap/response_data.rb#63 -class Net::IMAP::IgnoredResponse < ::Struct; end - -# Mailbox attribute indicating that this mailbox is where messages deemed to -# be junk mail are held. Some server implementations might put messages here -# automatically. Alternatively, this might just be advice to a client-side -# spam filter. -# -# source://net-imap//lib/net/imap/flags.rb#242 -Net::IMAP::JUNK = T.let(T.unsafe(nil), Symbol) - -# source://net-imap//lib/net/imap/command_data.rb#160 -class Net::IMAP::Literal - # @return [Literal] a new instance of Literal - # - # source://net-imap//lib/net/imap/command_data.rb#170 - def initialize(data); end - - # source://net-imap//lib/net/imap/command_data.rb#161 - def send_data(imap, tag); end - - # source://net-imap//lib/net/imap/command_data.rb#165 - def validate; end -end - -# Authenticator for the "+LOGIN+" SASL mechanism. See Net::IMAP#authenticate. -# -# +LOGIN+ authentication sends the password in cleartext. -# RFC3501[https://tools.ietf.org/html/rfc3501] encourages servers to disable -# cleartext authentication until after TLS has been negotiated. -# RFC8314[https://tools.ietf.org/html/rfc8314] recommends TLS version 1.2 or -# greater be used for all traffic, and deprecate cleartext access ASAP. +LOGIN+ -# can be secured by TLS encryption. -# -# == Deprecated -# -# The {SASL mechanisms -# registry}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] -# marks "LOGIN" as obsoleted in favor of "PLAIN". It is included here for -# compatibility with existing servers. See -# {draft-murchison-sasl-login}[https://www.iana.org/go/draft-murchison-sasl-login] -# for both specification and deprecation. -# -# source://net-imap//lib/net/imap/authenticators/login.rb#20 -class Net::IMAP::LoginAuthenticator - # @return [LoginAuthenticator] a new instance of LoginAuthenticator - # - # source://net-imap//lib/net/imap/authenticators/login.rb#36 - def initialize(user, password, warn_deprecation: T.unsafe(nil), **_ignored); end - - # source://net-imap//lib/net/imap/authenticators/login.rb#21 - def process(data); end -end - -# source://net-imap//lib/net/imap/command_data.rb#175 -class Net::IMAP::MessageSet - # @return [MessageSet] a new instance of MessageSet - # - # source://net-imap//lib/net/imap/command_data.rb#186 - def initialize(data); end - - # source://net-imap//lib/net/imap/command_data.rb#176 - def send_data(imap, tag); end - - # source://net-imap//lib/net/imap/command_data.rb#180 - def validate; end - - private - - # source://net-imap//lib/net/imap/command_data.rb#190 - def format_internal(data); end - - # source://net-imap//lib/net/imap/command_data.rb#211 - def validate_internal(data); end -end - -# The +\NonExistent+ attribute indicates that a mailbox name does not refer -# to an existing mailbox. Note that this attribute is not meaningful by -# itself, as mailbox names that match the canonical #list pattern but don't -# exist must not be returned unless one of the two conditions listed below -# is also satisfied: -# -# 1. The mailbox name also satisfies the selection criteria (for example, -# it is subscribed and the "SUBSCRIBED" selection option has been -# specified). -# -# 2. "RECURSIVEMATCH" has been specified, and the mailbox name has at least -# one descendant mailbox name that does not match the #list pattern and -# does match the selection criteria. -# -# In practice, this means that the +\NonExistent+ attribute is usually -# returned with one or more of +\Subscribed+, +\Remote+, +\HasChildren+, or -# the CHILDINFO extended data item. -# -# The client must treat the presence of the +\NonExistent+ attribute as if the -# +\NoSelect+ attribute was also sent by the server -# -# source://net-imap//lib/net/imap/flags.rb#105 -Net::IMAP::NONEXISTENT = T.let(T.unsafe(nil), Symbol) - -# Mailbox attribute indicating it is not possible for any child levels of -# hierarchy to exist under this name; no child levels exist now and none can -# be created in the future children. -# -# The client must treat the presence of the +\NoInferiors+ attribute as if the -# +\HasNoChildren+ attribute was also sent by the server -# -# source://net-imap//lib/net/imap/flags.rb#113 -Net::IMAP::NO_INFERIORS = T.let(T.unsafe(nil), Symbol) - -# Mailbox attribute indicating it is not possible to use this name as a -# selectable mailbox. -# -# source://net-imap//lib/net/imap/flags.rb#117 -Net::IMAP::NO_SELECT = T.let(T.unsafe(nil), Symbol) - -# Net::IMAP::Namespace represents a single namespace contained inside a -# NAMESPACE response. -# -# Returned by Net::IMAP#namespace, contained inside a Namespaces object. -# -# source://net-imap//lib/net/imap/response_data.rb#387 -class Net::IMAP::Namespace < ::Struct; end - -# Net::IMAP::Namespaces represents a +NAMESPACE+ server response, which -# contains lists of #personal, #shared, and #other namespaces. -# -# Net::IMAP#namespace returns a Namespaces object. -# -# source://net-imap//lib/net/imap/response_data.rb#413 -class Net::IMAP::Namespaces < ::Struct; end - -# Common validators of number and nz_number types -# -# source://net-imap//lib/net/imap/data_encoding.rb#145 -module Net::IMAP::NumValidator - private - - # Ensure argument is 'mod_sequence_value' or raise DataFormatError - # - # source://net-imap//lib/net/imap/data_encoding.rb#192 - def ensure_mod_sequence_value(num); end - - # Ensure argument is 'number' or raise DataFormatError - # - # source://net-imap//lib/net/imap/data_encoding.rb#176 - def ensure_number(num); end - - # Ensure argument is 'nz_number' or raise DataFormatError - # - # source://net-imap//lib/net/imap/data_encoding.rb#184 - def ensure_nz_number(num); end - - # Check is passed argument valid 'mod_sequence_value' in RFC 4551 terminology - # - # source://net-imap//lib/net/imap/data_encoding.rb#167 - def valid_mod_sequence_value?(num); end - - # Check is passed argument valid 'number' in RFC 3501 terminology - # - # source://net-imap//lib/net/imap/data_encoding.rb#149 - def valid_number?(num); end - - # Check is passed argument valid 'nz_number' in RFC 3501 terminology - # - # source://net-imap//lib/net/imap/data_encoding.rb#158 - def valid_nz_number?(num); end - - class << self - # Ensure argument is 'mod_sequence_value' or raise DataFormatError - # - # @raise [DataFormatError] - # - # source://net-imap//lib/net/imap/data_encoding.rb#192 - def ensure_mod_sequence_value(num); end - - # Ensure argument is 'number' or raise DataFormatError - # - # @raise [DataFormatError] - # - # source://net-imap//lib/net/imap/data_encoding.rb#176 - def ensure_number(num); end - - # Ensure argument is 'nz_number' or raise DataFormatError - # - # @raise [DataFormatError] - # - # source://net-imap//lib/net/imap/data_encoding.rb#184 - def ensure_nz_number(num); end - - # Check is passed argument valid 'mod_sequence_value' in RFC 4551 terminology - # - # @return [Boolean] - # - # source://net-imap//lib/net/imap/data_encoding.rb#167 - def valid_mod_sequence_value?(num); end - - # Check is passed argument valid 'number' in RFC 3501 terminology - # - # @return [Boolean] - # - # source://net-imap//lib/net/imap/data_encoding.rb#149 - def valid_number?(num); end - - # Check is passed argument valid 'nz_number' in RFC 3501 terminology - # - # @return [Boolean] - # - # source://net-imap//lib/net/imap/data_encoding.rb#158 - def valid_nz_number?(num); end - end -end - -# Authenticator for the "+PLAIN+" SASL mechanism, specified in -# RFC4616[https://tools.ietf.org/html/rfc4616]. See Net::IMAP#authenticate. -# -# +PLAIN+ authentication sends the password in cleartext. -# RFC3501[https://tools.ietf.org/html/rfc3501] encourages servers to disable -# cleartext authentication until after TLS has been negotiated. -# RFC8314[https://tools.ietf.org/html/rfc8314] recommends TLS version 1.2 or -# greater be used for all traffic, and deprecate cleartext access ASAP. +PLAIN+ -# can be secured by TLS encryption. -# -# source://net-imap//lib/net/imap/authenticators/plain.rb#12 -class Net::IMAP::PlainAuthenticator - # +username+ is the authentication identity, the identity whose +password+ is - # used. +username+ is referred to as +authcid+ by - # RFC4616[https://tools.ietf.org/html/rfc4616]. - # - # +authzid+ is the authorization identity (identity to act as). It can - # usually be left blank. When +authzid+ is left blank (nil or empty string) - # the server will derive an identity from the credentials and use that as the - # authorization identity. - # - # @raise [ArgumentError] - # @return [PlainAuthenticator] a new instance of PlainAuthenticator - # - # source://net-imap//lib/net/imap/authenticators/plain.rb#31 - def initialize(username, password, authzid: T.unsafe(nil)); end - - # source://net-imap//lib/net/imap/authenticators/plain.rb#14 - def process(data); end -end - -# source://net-imap//lib/net/imap/authenticators/plain.rb#19 -Net::IMAP::PlainAuthenticator::NULL = T.let(T.unsafe(nil), String) - -# source://net-imap//lib/net/imap/command_data.rb#145 -class Net::IMAP::QuotedString - # @return [QuotedString] a new instance of QuotedString - # - # source://net-imap//lib/net/imap/command_data.rb#155 - def initialize(data); end - - # source://net-imap//lib/net/imap/command_data.rb#146 - def send_data(imap, tag); end - - # source://net-imap//lib/net/imap/command_data.rb#150 - def validate; end -end - -# The mailbox is a remote mailbox. -# -# source://net-imap//lib/net/imap/flags.rb#176 -Net::IMAP::REMOTE = T.let(T.unsafe(nil), Symbol) - -# source://net-imap//lib/net/imap/errors.rb#54 -Net::IMAP::RESPONSE_ERRORS = T.let(T.unsafe(nil), Hash) - -# source://net-imap//lib/net/imap/command_data.rb#115 -class Net::IMAP::RawData - # @return [RawData] a new instance of RawData - # - # source://net-imap//lib/net/imap/command_data.rb#125 - def initialize(data); end - - # source://net-imap//lib/net/imap/command_data.rb#116 - def send_data(imap, tag); end - - # source://net-imap//lib/net/imap/command_data.rb#120 - def validate; end -end - -# Superclass of all errors used to encapsulate "fail" responses -# from the server. -# -# source://net-imap//lib/net/imap/errors.rb#20 -class Net::IMAP::ResponseError < ::Net::IMAP::Error - # @return [ResponseError] a new instance of ResponseError - # - # source://net-imap//lib/net/imap/errors.rb#25 - def initialize(response); end - - # The response that caused this error - # - # source://net-imap//lib/net/imap/errors.rb#23 - def response; end - - # The response that caused this error - # - # source://net-imap//lib/net/imap/errors.rb#23 - def response=(_arg0); end -end - -# Parses an \IMAP server response. -# -# source://net-imap//lib/net/imap/response_parser.rb#9 -class Net::IMAP::ResponseParser - # :call-seq: Net::IMAP::ResponseParser.new -> Net::IMAP::ResponseParser - # - # @return [ResponseParser] a new instance of ResponseParser - # - # source://net-imap//lib/net/imap/response_parser.rb#11 - def initialize; end - - # :call-seq: - # parse(str) -> ContinuationRequest - # parse(str) -> UntaggedResponse - # parse(str) -> TaggedResponse - # - # Raises ResponseParseError for unparsable strings. - # - # source://net-imap//lib/net/imap/response_parser.rb#24 - def parse(str); end - - private - - # like match, but does not raise error on failure. - # - # returns and shifts token on successful match - # returns nil and leaves @token unshifted on no match - # - # source://net-imap//lib/net/imap/response_parser.rb#1440 - def accept(*args); end - - # This advances @pos directly so it's safe before changing @lex_state. - # - # source://net-imap//lib/net/imap/response_parser.rb#1397 - def accept_space; end - - # The RFC is very strict about this and usually we should be too. - # But skipping spaces is usually a safe workaround for buggy servers. - # - # This advances @pos directly so it's safe before changing @lex_state. - # - # source://net-imap//lib/net/imap/response_parser.rb#1409 - def accept_spaces; end - - # source://net-imap//lib/net/imap/response_parser.rb#1223 - def address; end - - # source://net-imap//lib/net/imap/response_parser.rb#1193 - def address_list; end - - # source://net-imap//lib/net/imap/response_parser.rb#1279 - def astring; end - - # source://net-imap//lib/net/imap/response_parser.rb#1332 - def astring_chars; end - - # source://net-imap//lib/net/imap/response_parser.rb#1324 - def atom; end - - # source://net-imap//lib/net/imap/response_parser.rb#336 - def body; end - - # source://net-imap//lib/net/imap/response_parser.rb#317 - def body_data; end - - # source://net-imap//lib/net/imap/response_parser.rb#523 - def body_ext_1part; end - - # source://net-imap//lib/net/imap/response_parser.rb#559 - def body_ext_mpart; end - - # source://net-imap//lib/net/imap/response_parser.rb#649 - def body_extension; end - - # source://net-imap//lib/net/imap/response_parser.rb#635 - def body_extensions; end - - # source://net-imap//lib/net/imap/response_parser.rb#485 - def body_fields; end - - # source://net-imap//lib/net/imap/response_parser.rb#595 - def body_fld_dsp; end - - # source://net-imap//lib/net/imap/response_parser.rb#609 - def body_fld_lang; end - - # source://net-imap//lib/net/imap/response_parser.rb#498 - def body_fld_param; end - - # source://net-imap//lib/net/imap/response_parser.rb#356 - def body_type_1part; end - - # source://net-imap//lib/net/imap/response_parser.rb#442 - def body_type_attachment; end - - # source://net-imap//lib/net/imap/response_parser.rb#372 - def body_type_basic; end - - # source://net-imap//lib/net/imap/response_parser.rb#449 - def body_type_mixed; end - - # source://net-imap//lib/net/imap/response_parser.rb#456 - def body_type_mpart; end - - # source://net-imap//lib/net/imap/response_parser.rb#401 - def body_type_msg; end - - # source://net-imap//lib/net/imap/response_parser.rb#387 - def body_type_text; end - - # source://net-imap//lib/net/imap/response_parser.rb#977 - def capability_data; end - - # source://net-imap//lib/net/imap/response_parser.rb#970 - def capability_response; end - - # source://net-imap//lib/net/imap/response_parser.rb#1304 - def case_insensitive_string; end - - # See https://www.rfc-editor.org/errata/rfc3501 - # - # charset = atom / quoted - # - # source://net-imap//lib/net/imap/response_parser.rb#1351 - def charset; end - - # source://net-imap//lib/net/imap/response_parser.rb#1152 - def charset_list; end - - # source://net-imap//lib/net/imap/response_parser.rb#1336 - def combine_adjacent(*tokens); end - - # source://net-imap//lib/net/imap/response_parser.rb#118 - def continue_req; end - - # source://net-imap//lib/net/imap/response_parser.rb#248 - def envelope; end - - # source://net-imap//lib/net/imap/response_parser.rb#241 - def envelope_data; end - - # source://net-imap//lib/net/imap/response_parser.rb#1254 - def flag_list; end - - # source://net-imap//lib/net/imap/response_parser.rb#283 - def flags_data; end - - # source://net-imap//lib/net/imap/response_parser.rb#746 - def flags_response; end - - # source://net-imap//lib/net/imap/response_parser.rb#699 - def format_string(str); end - - # source://net-imap//lib/net/imap/response_parser.rb#824 - def getacl_response; end - - # source://net-imap//lib/net/imap/response_parser.rb#774 - def getquota_response; end - - # source://net-imap//lib/net/imap/response_parser.rb#807 - def getquotaroot_response; end - - # source://net-imap//lib/net/imap/response_parser.rb#993 - def id_response; end - - # source://net-imap//lib/net/imap/response_parser.rb#732 - def ignored_response; end - - # source://net-imap//lib/net/imap/response_parser.rb#290 - def internaldate_data; end - - # source://net-imap//lib/net/imap/response_parser.rb#753 - def list_response; end - - # source://net-imap//lib/net/imap/response_parser.rb#1448 - def lookahead; end - - # source://net-imap//lib/net/imap/response_parser.rb#760 - def mailbox_list; end - - # source://net-imap//lib/net/imap/response_parser.rb#1416 - def match(*args, lex_state: T.unsafe(nil)); end - - # source://net-imap//lib/net/imap/response_parser.rb#474 - def media_type; end - - # source://net-imap//lib/net/imap/response_parser.rb#722 - def modseq_data; end - - # source://net-imap//lib/net/imap/response_parser.rb#203 - def msg_att(n); end - - # source://net-imap//lib/net/imap/response_parser.rb#1056 - def namespace; end - - # source://net-imap//lib/net/imap/response_parser.rb#1022 - def namespace_response; end - - # source://net-imap//lib/net/imap/response_parser.rb#1066 - def namespace_response_extensions; end - - # source://net-imap//lib/net/imap/response_parser.rb#1038 - def namespaces; end - - # source://net-imap//lib/net/imap/response_parser.rb#1456 - def next_token; end - - # source://net-imap//lib/net/imap/response_parser.rb#1389 - def nil_atom; end - - # source://net-imap//lib/net/imap/response_parser.rb#1269 - def nstring; end - - # source://net-imap//lib/net/imap/response_parser.rb#1359 - def number; end - - # source://net-imap//lib/net/imap/response_parser.rb#187 - def numeric_response; end - - # @raise [ResponseParseError] - # - # source://net-imap//lib/net/imap/response_parser.rb#1575 - def parse_error(fmt, *args); end - - # already matched: "APPENDUID" - # - # +UIDPLUS+ ABNF:: https://www.rfc-editor.org/rfc/rfc4315.html#section-4 - # resp-code-apnd = "APPENDUID" SP nz-number SP append-uid - # append-uid = uniqueid - # append-uid =/ uid-set - # ; only permitted if client uses [MULTIAPPEND] - # ; to append multiple messages. - # - # 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#1177 - 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#1186 - def resp_code_copy__data; end - - # resp-text = ["[" resp-text-code "]" SP] text - # - # source://net-imap//lib/net/imap/response_parser.rb#1092 - def resp_text; end - - # See https://www.rfc-editor.org/errata/rfc3501 - # - # resp-text-code = "ALERT" / - # "BADCHARSET" [SP "(" charset *(SP charset) ")" ] / - # capability-data / "PARSE" / - # "PERMANENTFLAGS" SP "(" - # [flag-perm *(SP flag-perm)] ")" / - # "READ-ONLY" / "READ-WRITE" / "TRYCREATE" / - # "UIDNEXT" SP nz-number / "UIDVALIDITY" SP nz-number / - # "UNSEEN" SP nz-number / - # atom [SP 1*] - # - # +UIDPLUS+ ABNF:: https://www.rfc-editor.org/rfc/rfc4315.html#section-4 - # resp-text-code =/ resp-code-apnd / resp-code-copy / "UIDNOTSTICKY" - # - # source://net-imap//lib/net/imap/response_parser.rb#1119 - def resp_text_code; end - - # source://net-imap//lib/net/imap/response_parser.rb#99 - def response; end - - # source://net-imap//lib/net/imap/response_parser.rb#180 - def response_cond; end - - # source://net-imap//lib/net/imap/response_parser.rb#171 - def response_tagged; end - - # source://net-imap//lib/net/imap/response_parser.rb#129 - def response_untagged; end - - # source://net-imap//lib/net/imap/response_parser.rb#310 - def rfc822_size; end - - # source://net-imap//lib/net/imap/response_parser.rb#298 - def rfc822_text; end - - # source://net-imap//lib/net/imap/response_parser.rb#850 - def search_response; end - - # source://net-imap//lib/net/imap/response_parser.rb#664 - def section; end - - # source://net-imap//lib/net/imap/response_parser.rb#1452 - def shift_token; end - - # source://net-imap//lib/net/imap/response_parser.rb#943 - def status_response; end - - # source://net-imap//lib/net/imap/response_parser.rb#1288 - def string; end - - # @return [Boolean] - # - # source://net-imap//lib/net/imap/response_parser.rb#1300 - def string_token?(token); end - - # text = 1*TEXT-CHAR - # TEXT-CHAR = - # - # source://net-imap//lib/net/imap/response_parser.rb#1087 - def text; end - - # source://net-imap//lib/net/imap/response_parser.rb#739 - def text_response; end - - # source://net-imap//lib/net/imap/response_parser.rb#908 - def thread_branch(token); end - - # source://net-imap//lib/net/imap/response_parser.rb#881 - def thread_response; end - - # source://net-imap//lib/net/imap/response_parser.rb#715 - def uid_data; end - - # RFC-4315 (UIDPLUS) or RFC9051 (IMAP4rev2): - # uid-set = (uniqueid / uid-range) *("," uid-set) - # uid-range = (uniqueid ":" uniqueid) - # ; two uniqueid values and all values - # ; between these two regardless of order. - # ; Example: 2:4 and 4:2 are equivalent. - # uniqueid = nz-number - # ; Strictly ascending - # - # source://net-imap//lib/net/imap/response_parser.rb#1377 - def uid_set; end -end - -# ASTRING-CHAR = ATOM-CHAR / resp-specials -# resp-specials = "]" -# -# source://net-imap//lib/net/imap/response_parser.rb#1330 -Net::IMAP::ResponseParser::ASTRING_CHARS_TOKENS = T.let(T.unsafe(nil), Array) - -# source://net-imap//lib/net/imap/response_parser.rb#1394 -Net::IMAP::ResponseParser::SPACES_REGEXP = T.let(T.unsafe(nil), Regexp) - -# Pluggable authentication mechanisms for protocols which support SASL -# (Simple Authentication and Security Layer), such as IMAP4, SMTP, LDAP, and -# XMPP. {RFC-4422}[https://tools.ietf.org/html/rfc4422] specifies the -# common SASL framework and the +EXTERNAL+ mechanism, and the -# {SASL mechanism registry}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] -# lists the specification for others. -# -# "SASL is conceptually a framework that provides an abstraction layer -# between protocols and mechanisms as illustrated in the following diagram." -# -# SMTP LDAP XMPP Other protocols ... -# \ | | / -# \ | | / -# SASL abstraction layer -# / | | \ -# / | | \ -# EXTERNAL GSSAPI PLAIN Other mechanisms ... -# -# source://net-imap//lib/net/imap/sasl.rb#24 -module Net::IMAP::SASL - extend ::Net::IMAP::SASL - - # See SASLprep#saslprep. - # - # source://net-imap//lib/net/imap/sasl.rb#69 - def saslprep(string, **opts); end -end - -# StringPrepError raised when +string+ contains bidirectional characters -# which violate the StringPrep requirements. -# -# source://net-imap//lib/net/imap/sasl.rb#59 -class Net::IMAP::SASL::BidiStringError < ::Net::IMAP::SASL::StringPrepError; end - -# StringPrepError raised when +string+ contains a codepoint prohibited by -# +table+. -# -# source://net-imap//lib/net/imap/sasl.rb#45 -class Net::IMAP::SASL::ProhibitedCodepoint < ::Net::IMAP::SASL::StringPrepError - # @return [ProhibitedCodepoint] a new instance of ProhibitedCodepoint - # - # source://net-imap//lib/net/imap/sasl.rb#48 - def initialize(table, *args, **kwargs); end - - # Returns the value of attribute table. - # - # source://net-imap//lib/net/imap/sasl.rb#46 - def table; end -end - -# SASLprep#saslprep can be used to prepare a string according to [RFC4013]. -# -# \SASLprep maps characters three ways: to nothing, to space, and Unicode -# normalization form KC. \SASLprep prohibits codepoints from nearly all -# standard StringPrep tables (RFC3454, Appendix "C"), and uses \StringPrep's -# standard bidirectional characters requirements (Appendix "D"). \SASLprep -# also uses \StringPrep's definition of "Unassigned" codepoints (Appendix "A"). -# -# source://net-imap//lib/net/imap/sasl/saslprep_tables.rb#9 -module Net::IMAP::SASL::SASLprep - private - - # Prepares a UTF-8 +string+ for comparison, using the \SASLprep profile - # RFC4013 of the StringPrep algorithm RFC3454. - # - # By default, prohibited strings will return +nil+. When +exception+ is - # +true+, a StringPrepError describing the violation will be raised. - # - # When +stored+ is +true+, "unassigned" codepoints will be prohibited. For - # \StringPrep and the \SASLprep profile, "unassigned" refers to Unicode 3.2, - # and not later versions. See RFC3454 §7 for more information. - # - # source://net-imap//lib/net/imap/sasl/saslprep.rb#31 - def saslprep(str, stored: T.unsafe(nil), exception: T.unsafe(nil)); end - - class << self - # Prepares a UTF-8 +string+ for comparison, using the \SASLprep profile - # RFC4013 of the StringPrep algorithm RFC3454. - # - # By default, prohibited strings will return +nil+. When +exception+ is - # +true+, a StringPrepError describing the violation will be raised. - # - # When +stored+ is +true+, "unassigned" codepoints will be prohibited. For - # \StringPrep and the \SASLprep profile, "unassigned" refers to Unicode 3.2, - # and not later versions. See RFC3454 §7 for more information. - # - # source://net-imap//lib/net/imap/sasl/saslprep.rb#31 - def saslprep(str, stored: T.unsafe(nil), exception: T.unsafe(nil)); end - end -end - -# Used to short-circuit strings that don't need preparation. -# -# source://net-imap//lib/net/imap/sasl/saslprep.rb#17 -Net::IMAP::SASL::SASLprep::ASCII_NO_CTRLS = T.let(T.unsafe(nil), Regexp) - -# Bidirectional Characters [StringPrep, §6] -# -# source://net-imap//lib/net/imap/sasl/saslprep_tables.rb#68 -Net::IMAP::SASL::SASLprep::BIDI_FAILURE = T.let(T.unsafe(nil), Regexp) - -# RFC4013 §2.1 Mapping - mapped to nothing -# the "commonly mapped to nothing" characters (\StringPrep\[\"B.1\"]) -# that can be mapped to nothing. -# -# Equal to \StringPrep\[\"B.1\"]. -# Redefined here to avoid loading the StringPrep module. -# -# source://net-imap//lib/net/imap/sasl/saslprep_tables.rb#25 -Net::IMAP::SASL::SASLprep::MAP_TO_NOTHING = T.let(T.unsafe(nil), Regexp) - -# RFC4013 §2.1 Mapping - mapped to space -# * non-ASCII space characters (\StringPrep\[\"C.1.2\"]) that can be -# mapped to SPACE (U+0020), and -# -# Equal to \StringPrep\[\"C.1.2\"]. -# Redefined here to avoid loading the StringPrep module. -# -# source://net-imap//lib/net/imap/sasl/saslprep_tables.rb#17 -Net::IMAP::SASL::SASLprep::MAP_TO_SPACE = T.let(T.unsafe(nil), Regexp) - -# Matches strings prohibited by RFC4013 §2.3 and §2.4. -# -# This checks prohibited output and bidirectional characters. -# -# source://net-imap//lib/net/imap/sasl/saslprep_tables.rb#85 -Net::IMAP::SASL::SASLprep::PROHIBITED = T.let(T.unsafe(nil), Regexp) - -# Matches codepoints prohibited by RFC4013 §2.3. -# -# See TABLES_PROHIBITED. -# -# Equal to +Regexp.union+ of the TABLES_PROHIBITED tables. Redefined -# here to avoid loading the StringPrep module unless necessary. -# -# source://net-imap//lib/net/imap/sasl/saslprep_tables.rb#53 -Net::IMAP::SASL::SASLprep::PROHIBITED_OUTPUT = T.let(T.unsafe(nil), Regexp) - -# Matches codepoints prohibited by RFC4013 §2.3 and §2.5. -# -# See TABLES_PROHIBITED_STORED. -# -# source://net-imap//lib/net/imap/sasl/saslprep_tables.rb#63 -Net::IMAP::SASL::SASLprep::PROHIBITED_OUTPUT_STORED = T.let(T.unsafe(nil), Regexp) - -# Matches strings prohibited by RFC4013 §2.3, §2.4, and §2.5. -# -# This checks prohibited output, bidirectional characters, and -# unassigned codepoints. -# -# source://net-imap//lib/net/imap/sasl/saslprep_tables.rb#93 -Net::IMAP::SASL::SASLprep::PROHIBITED_STORED = T.let(T.unsafe(nil), Regexp) - -# RFC4013 §2.3 Prohibited Output:: -# * Non-ASCII space characters — \StringPrep\[\"C.1.2\"] -# * ASCII control characters — \StringPrep\[\"C.2.1\"] -# * Non-ASCII control characters — \StringPrep\[\"C.2.2\"] -# * Private Use characters — \StringPrep\[\"C.3\"] -# * Non-character code points — \StringPrep\[\"C.4\"] -# * Surrogate code points — \StringPrep\[\"C.5\"] -# * Inappropriate for plain text characters — \StringPrep\[\"C.6\"] -# * Inappropriate for canonical representation characters — \StringPrep\[\"C.7\"] -# * Change display properties or deprecated characters — \StringPrep\[\"C.8\"] -# * Tagging characters — \StringPrep\[\"C.9\"] -# -# source://net-imap//lib/net/imap/sasl/saslprep_tables.rb#38 -Net::IMAP::SASL::SASLprep::TABLES_PROHIBITED = T.let(T.unsafe(nil), Array) - -# Adds unassigned (by Unicode 3.2) codepoints to TABLES_PROHIBITED. -# -# RFC4013 §2.5 Unassigned Code Points:: -# This profile specifies the \StringPrep\[\"A.1\"] table as its list of -# unassigned code points. -# -# source://net-imap//lib/net/imap/sasl/saslprep_tables.rb#45 -Net::IMAP::SASL::SASLprep::TABLES_PROHIBITED_STORED = T.let(T.unsafe(nil), Array) - -# RFC4013 §2.5 Unassigned Code Points:: -# This profile specifies the \StringPrep\[\"A.1\"] table as its list of -# unassigned code points. -# -# source://net-imap//lib/net/imap/sasl/saslprep_tables.rb#58 -Net::IMAP::SASL::SASLprep::UNASSIGNED = T.let(T.unsafe(nil), Regexp) - -# Regexps and utility methods for implementing stringprep profiles. The -# \StringPrep algorithm is defined by -# {RFC-3454}[https://www.rfc-editor.org/rfc/rfc3454.html]. Each -# codepoint table defined in the RFC-3454 appendices is matched by a Regexp -# defined in this module. -# -- -# TODO: generic StringPrep mapping (not needed for SASLprep implementation) -# ++ -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#9 -module Net::IMAP::SASL::StringPrep - private - - # Checks that +string+ obeys all of the "Bidirectional Characters" - # requirements in RFC-3454, §6: - # - # * The characters in \StringPrep\[\"C.8\"] MUST be prohibited - # * If a string contains any RandALCat character, the string MUST NOT - # contain any LCat character. - # * If a string contains any RandALCat character, a RandALCat - # character MUST be the first character of the string, and a - # RandALCat character MUST be the last character of the string. - # - # This is usually combined with #check_prohibited!, so table "C.8" is only - # checked when c_8: true. - # - # Raises either ProhibitedCodepoint or BidiStringError unless all - # requirements are met. +profile+ is an optional string which will be - # added to any exception that is raised (it does not affect behavior). - # - # source://net-imap//lib/net/imap/sasl/stringprep.rb#58 - def check_bidi!(string, c_8: T.unsafe(nil), profile: T.unsafe(nil)); end - - # Checks +string+ for any codepoint in +tables+. Raises a - # ProhibitedCodepoint describing the first matching table. - # - # Also checks bidirectional characters, when bidi: true, which may - # raise a BidiStringError. - # - # +profile+ is an optional string which will be added to any exception that - # is raised (it does not affect behavior). - # - # source://net-imap//lib/net/imap/sasl/stringprep.rb#32 - def check_prohibited!(string, *tables, bidi: T.unsafe(nil), profile: T.unsafe(nil)); end - - class << self - # Returns a Regexp matching the given +table+ name. - # - # source://net-imap//lib/net/imap/sasl/stringprep.rb#18 - def [](table); end - - # Checks that +string+ obeys all of the "Bidirectional Characters" - # requirements in RFC-3454, §6: - # - # * The characters in \StringPrep\[\"C.8\"] MUST be prohibited - # * If a string contains any RandALCat character, the string MUST NOT - # contain any LCat character. - # * If a string contains any RandALCat character, a RandALCat - # character MUST be the first character of the string, and a - # RandALCat character MUST be the last character of the string. - # - # This is usually combined with #check_prohibited!, so table "C.8" is only - # checked when c_8: true. - # - # Raises either ProhibitedCodepoint or BidiStringError unless all - # requirements are met. +profile+ is an optional string which will be - # added to any exception that is raised (it does not affect behavior). - # - # source://net-imap//lib/net/imap/sasl/stringprep.rb#58 - def check_bidi!(string, c_8: T.unsafe(nil), profile: T.unsafe(nil)); end - - # Checks +string+ for any codepoint in +tables+. Raises a - # ProhibitedCodepoint describing the first matching table. - # - # Also checks bidirectional characters, when bidi: true, which may - # raise a BidiStringError. - # - # +profile+ is an optional string which will be added to any exception that - # is raised (it does not affect behavior). - # - # @raise [ProhibitedCodepoint] - # - # source://net-imap//lib/net/imap/sasl/stringprep.rb#32 - def check_prohibited!(string, *tables, bidi: T.unsafe(nil), profile: T.unsafe(nil)); end - end -end - -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#66 -Net::IMAP::SASL::StringPrep::BIDI_DESC_REQ2 = T.let(T.unsafe(nil), String) - -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#79 -Net::IMAP::SASL::StringPrep::BIDI_DESC_REQ3 = T.let(T.unsafe(nil), String) - -# Bidirectional Characters [StringPrep, §6], Requirement 2:: -# If a string contains any RandALCat character, the string MUST NOT -# contain any LCat character. -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#71 -Net::IMAP::SASL::StringPrep::BIDI_FAILS_REQ2 = T.let(T.unsafe(nil), Regexp) - -# Bidirectional Characters [StringPrep, §6], Requirement 3:: -# If a string contains any RandALCat character, a RandALCat -# character MUST be the first character of the string, and a -# RandALCat character MUST be the last character of the string. -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#85 -Net::IMAP::SASL::StringPrep::BIDI_FAILS_REQ3 = T.let(T.unsafe(nil), Regexp) - -# Bidirectional Characters [StringPrep, §6] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#94 -Net::IMAP::SASL::StringPrep::BIDI_FAILURE = T.let(T.unsafe(nil), Regexp) - -# Unassigned code points in Unicode 3.2 \StringPrep\[\"A.1\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#12 -Net::IMAP::SASL::StringPrep::IN_A_1 = T.let(T.unsafe(nil), Regexp) - -# Commonly mapped to nothing \StringPrep\[\"B.1\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#15 -Net::IMAP::SASL::StringPrep::IN_B_1 = T.let(T.unsafe(nil), Regexp) - -# Mapping for case-folding used with NFKC \StringPrep\[\"B.2\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#18 -Net::IMAP::SASL::StringPrep::IN_B_2 = T.let(T.unsafe(nil), Regexp) - -# Mapping for case-folding used with no normalization \StringPrep\[\"B.3\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#21 -Net::IMAP::SASL::StringPrep::IN_B_3 = T.let(T.unsafe(nil), Regexp) - -# ASCII space characters \StringPrep\[\"C.1.1\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#24 -Net::IMAP::SASL::StringPrep::IN_C_1_1 = T.let(T.unsafe(nil), Regexp) - -# Non-ASCII space characters \StringPrep\[\"C.1.2\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#27 -Net::IMAP::SASL::StringPrep::IN_C_1_2 = T.let(T.unsafe(nil), Regexp) - -# ASCII control characters \StringPrep\[\"C.2.1\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#30 -Net::IMAP::SASL::StringPrep::IN_C_2_1 = T.let(T.unsafe(nil), Regexp) - -# Non-ASCII control characters \StringPrep\[\"C.2.2\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#33 -Net::IMAP::SASL::StringPrep::IN_C_2_2 = T.let(T.unsafe(nil), Regexp) - -# Private use \StringPrep\[\"C.3\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#36 -Net::IMAP::SASL::StringPrep::IN_C_3 = T.let(T.unsafe(nil), Regexp) - -# Non-character code points \StringPrep\[\"C.4\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#39 -Net::IMAP::SASL::StringPrep::IN_C_4 = T.let(T.unsafe(nil), Regexp) - -# Surrogate codes \StringPrep\[\"C.5\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#42 -Net::IMAP::SASL::StringPrep::IN_C_5 = T.let(T.unsafe(nil), Regexp) - -# Inappropriate for plain text \StringPrep\[\"C.6\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#45 -Net::IMAP::SASL::StringPrep::IN_C_6 = T.let(T.unsafe(nil), Regexp) - -# Inappropriate for canonical representation \StringPrep\[\"C.7\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#48 -Net::IMAP::SASL::StringPrep::IN_C_7 = T.let(T.unsafe(nil), Regexp) - -# Change display properties or are deprecated \StringPrep\[\"C.8\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#51 -Net::IMAP::SASL::StringPrep::IN_C_8 = T.let(T.unsafe(nil), Regexp) - -# Tagging characters \StringPrep\[\"C.9\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#54 -Net::IMAP::SASL::StringPrep::IN_C_9 = T.let(T.unsafe(nil), Regexp) - -# Characters with bidirectional property "R" or "AL" \StringPrep\[\"D.1\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#57 -Net::IMAP::SASL::StringPrep::IN_D_1 = T.let(T.unsafe(nil), Regexp) - -# Used to check req3 of bidirectional checks -# Matches the negation of the D.1 table -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#61 -Net::IMAP::SASL::StringPrep::IN_D_1_NEGATED = T.let(T.unsafe(nil), Regexp) - -# Characters with bidirectional property "L" \StringPrep\[\"D.2\"] -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#64 -Net::IMAP::SASL::StringPrep::IN_D_2 = T.let(T.unsafe(nil), Regexp) - -# Regexps matching each codepoint table in the RFC-3454 appendices -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#132 -Net::IMAP::SASL::StringPrep::TABLE_REGEXPS = T.let(T.unsafe(nil), Hash) - -# Names of each codepoint table in the RFC-3454 appendices -# -# source://net-imap//lib/net/imap/sasl/stringprep_tables.rb#109 -Net::IMAP::SASL::StringPrep::TABLE_TITLES = T.let(T.unsafe(nil), Hash) - -# ArgumentError raised when +string+ is invalid for the stringprep -# +profile+. -# -# source://net-imap//lib/net/imap/sasl.rb#33 -class Net::IMAP::SASL::StringPrepError < ::ArgumentError - # @return [StringPrepError] a new instance of StringPrepError - # - # source://net-imap//lib/net/imap/sasl.rb#36 - def initialize(*args, string: T.unsafe(nil), profile: T.unsafe(nil)); end - - # Returns the value of attribute profile. - # - # source://net-imap//lib/net/imap/sasl.rb#34 - def profile; end - - # Returns the value of attribute string. - # - # source://net-imap//lib/net/imap/sasl.rb#34 - def string; end -end - -# Mailbox attribute indicating that this mailbox is used to hold copies of -# messages that have been sent. Some server implementations might put -# messages here automatically. Alternatively, this might just be advice that -# a client save sent messages here. -# -# source://net-imap//lib/net/imap/flags.rb#248 -Net::IMAP::SENT = T.let(T.unsafe(nil), Symbol) - -# strftime/strptime format for an IMAP4 +date+, excluding optional dquotes. -# Use via the encode_date and decode_date methods. -# -# date = date-text / DQUOTE date-text DQUOTE -# date-text = date-day "-" date-month "-" date-year -# -# date-day = 1*2DIGIT -# ; Day of month -# date-month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / -# "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec" -# date-year = 4DIGIT -# -# source://net-imap//lib/net/imap/data_encoding.rb#21 -Net::IMAP::STRFDATE = T.let(T.unsafe(nil), String) - -# strftime/strptime format for an IMAP4 +date-time+, including dquotes. -# See the encode_datetime and decode_datetime methods. -# -# date-time = DQUOTE date-day-fixed "-" date-month "-" date-year -# SP time SP zone DQUOTE -# -# date-day-fixed = (SP DIGIT) / 2DIGIT -# ; Fixed-format version of date-day -# date-month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / -# "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec" -# date-year = 4DIGIT -# time = 2DIGIT ":" 2DIGIT ":" 2DIGIT -# ; Hours minutes seconds -# zone = ("+" / "-") 4DIGIT -# ; Signed four-digit value of hhmm representing -# ; hours and minutes east of Greenwich (that is, -# ; the amount that the given time differs from -# ; Universal Time). Subtracting the timezone -# ; from the given time will give the UT form. -# ; The Universal Time zone is "+0000". -# -# Note that Time.strptime "%d" flexibly parses either space or zero -# padding. However, the DQUOTEs are *not* optional. -# -# source://net-imap//lib/net/imap/data_encoding.rb#46 -Net::IMAP::STRFTIME = T.let(T.unsafe(nil), String) - -# The mailbox name was subscribed to using the #subscribe command. -# -# source://net-imap//lib/net/imap/flags.rb#173 -Net::IMAP::SUBSCRIBED = T.let(T.unsafe(nil), Symbol) - -# source://net-imap//lib/net/imap/command_data.rb#266 -module Net::IMAP::StringFormatter - private - - # coerces non-nil using +to_s+ - # - # source://net-imap//lib/net/imap/command_data.rb#293 - def nstring(str); end - - # coerces using +to_s+ - # - # source://net-imap//lib/net/imap/command_data.rb#283 - def string(str); end - - # Allows nil, symbols, and strings - # - # source://net-imap//lib/net/imap/command_data.rb#278 - def valid_nstring?(str); end - - # Allows symbols in addition to strings - # - # source://net-imap//lib/net/imap/command_data.rb#273 - def valid_string?(str); end - - class << self - # coerces non-nil using +to_s+ - # - # source://net-imap//lib/net/imap/command_data.rb#293 - def nstring(str); end - - # coerces using +to_s+ - # - # source://net-imap//lib/net/imap/command_data.rb#283 - def string(str); end - - # Allows nil, symbols, and strings - # - # @return [Boolean] - # - # source://net-imap//lib/net/imap/command_data.rb#278 - def valid_nstring?(str); end - - # Allows symbols in addition to strings - # - # @return [Boolean] - # - # source://net-imap//lib/net/imap/command_data.rb#273 - def valid_string?(str); end - end -end - -# source://net-imap//lib/net/imap/command_data.rb#268 -Net::IMAP::StringFormatter::LITERAL_REGEX = T.let(T.unsafe(nil), Regexp) - -# Mailbox attribute indicating that this mailbox is used to hold messages -# that have been deleted or marked for deletion. In some server -# implementations, this might be a virtual mailbox, containing messages from -# other mailboxes that are marked with the +\Deleted+ message flag. -# Alternatively, this might just be advice that a client that chooses not to -# use the \IMAP +\Deleted+ model should use as its trash location. In server -# implementations that strictly expect the \IMAP +\Deleted+ model, this -# special use is likely not to be supported. -# -# source://net-imap//lib/net/imap/flags.rb#258 -Net::IMAP::TRASH = T.let(T.unsafe(nil), Symbol) - -# Net::IMAP::UIDPlusData represents the ResponseCode#data that accompanies -# the +APPENDUID+ and +COPYUID+ response codes. -# -# See [[UIDPLUS[https://www.rfc-editor.org/rfc/rfc4315.html]]. -# -# ==== Capability requirement -# -# The +UIDPLUS+ capability[rdoc-ref:Net::IMAP#capability] must be supported. -# A server that supports +UIDPLUS+ should send a UIDPlusData object inside -# every TaggedResponse returned by the append[rdoc-ref:Net::IMAP#append], -# copy[rdoc-ref:Net::IMAP#copy], move[rdoc-ref:Net::IMAP#move], {uid -# copy}[rdoc-ref:Net::IMAP#uid_copy], and {uid -# move}[rdoc-ref:Net::IMAP#uid_move] commands---unless the destination -# mailbox reports +UIDNOTSTICKY+. -# -# -- -# TODO: support MULTIAPPEND -# ++ -# -# source://net-imap//lib/net/imap/response_data.rb#237 -class Net::IMAP::UIDPlusData < ::Struct - # :call-seq: uid_mapping -> nil or a hash - # - # Returns a hash mapping each source UID to the newly assigned destination - # UID. - # - # Note:: Returns +nil+ for Net::IMAP#append. - # - # source://net-imap//lib/net/imap/response_data.rb#267 - def uid_mapping; end -end - -# Error raised upon an unknown response from the server. -# -# source://net-imap//lib/net/imap/errors.rb#51 -class Net::IMAP::UnknownResponseError < ::Net::IMAP::ResponseError; end - -# source://net-imap//lib/net/imap.rb#702 -Net::IMAP::VERSION = T.let(T.unsafe(nil), String) - -# source://net-imap//lib/net/imap/authenticators/xoauth2.rb#3 -class Net::IMAP::XOauth2Authenticator - # @return [XOauth2Authenticator] a new instance of XOauth2Authenticator - # - # source://net-imap//lib/net/imap/authenticators/xoauth2.rb#10 - def initialize(user, oauth2_token, **_); end - - # source://net-imap//lib/net/imap/authenticators/xoauth2.rb#4 - def process(_data); end - - private - - # source://net-imap//lib/net/imap/authenticators/xoauth2.rb#15 - def build_oauth2_string(user, oauth2_token); end -end diff --git a/sorbet/rbi/gems/net-imap@0.4.10.rbi b/sorbet/rbi/gems/net-imap@0.4.10.rbi new file mode 100644 index 000000000..23528cac9 --- /dev/null +++ b/sorbet/rbi/gems/net-imap@0.4.10.rbi @@ -0,0 +1,10283 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# 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] +# and {IMAP4rev2 [RFC9051]}[https://tools.ietf.org/html/rfc9051]. +# +# == \IMAP Overview +# +# An \IMAP client connects to a server, and then authenticates +# itself using either #authenticate or #login. Having +# authenticated itself, there is a range of commands +# available to it. Most work with mailboxes, which may be +# arranged in an hierarchical namespace, and each of which +# contains zero or more messages. How this is implemented on +# the server is implementation-dependent; on a UNIX server, it +# will frequently be implemented as files in mailbox format +# within a hierarchy of directories. +# +# To work on the messages within a mailbox, the client must +# first select that mailbox, using either #select or #examine +# (for read-only access). Once the client has successfully +# selected a mailbox, they enter the "_selected_" state, and that +# mailbox becomes the _current_ mailbox, on which mail-item +# related commands implicitly operate. +# +# === Sequence numbers and UIDs +# +# Messages have two sorts of identifiers: message sequence +# numbers and UIDs. +# +# Message sequence numbers number messages within a mailbox +# from 1 up to the number of items in the mailbox. If a new +# message arrives during a session, it receives a sequence +# number equal to the new size of the mailbox. If messages +# are expunged from the mailbox, remaining messages have their +# sequence numbers "shuffled down" to fill the gaps. +# +# To avoid sequence number race conditions, servers must not expunge messages +# when no command is in progress, nor when responding to #fetch, #store, or +# #search. Expunges _may_ be sent during any other command, including +# #uid_fetch, #uid_store, and #uid_search. The #noop and #idle commands are +# both useful for this side-effect: they allow the server to send all mailbox +# updates, including expunges. +# +# UIDs, on the other hand, are permanently guaranteed not to +# identify another message within the same mailbox, even if +# the existing message is deleted. UIDs are required to +# be assigned in ascending (but not necessarily sequential) +# order within a mailbox; this means that if a non-IMAP client +# rearranges the order of mail items within a mailbox, the +# UIDs have to be reassigned. An \IMAP client thus cannot +# rearrange message orders. +# +# === Examples of Usage +# +# ==== List sender and subject of all recent messages in the default mailbox +# +# imap = Net::IMAP.new('mail.example.com') +# imap.authenticate('PLAIN', 'joe_user', 'joes_password') +# imap.examine('INBOX') +# imap.search(["RECENT"]).each do |message_id| +# envelope = imap.fetch(message_id, "ENVELOPE")[0].attr["ENVELOPE"] +# puts "#{envelope.from[0].name}: \t#{envelope.subject}" +# end +# +# ==== Move all messages from April 2003 from "Mail/sent-mail" to "Mail/sent-apr03" +# +# imap = Net::IMAP.new('mail.example.com') +# imap.authenticate('PLAIN', 'joe_user', 'joes_password') +# imap.select('Mail/sent-mail') +# if not imap.list('Mail/', 'sent-apr03') +# imap.create('Mail/sent-apr03') +# end +# imap.search(["BEFORE", "30-Apr-2003", "SINCE", "1-Apr-2003"]).each do |message_id| +# imap.copy(message_id, "Mail/sent-apr03") +# imap.store(message_id, "+FLAGS", [:Deleted]) +# end +# imap.expunge +# +# == Capabilities +# +# Most Net::IMAP methods do not _currently_ modify their behaviour according +# to the server's advertised #capabilities. Users of this class must check +# that the server is capable of extension commands or command arguments before +# sending them. Special care should be taken to follow the #capabilities +# requirements for #starttls, #login, and #authenticate. +# +# See #capable?, #auth_capable?, #capabilities, #auth_mechanisms to discover +# server capabilities. For relevant capability requirements, see the +# documentation on each \IMAP command. +# +# imap = Net::IMAP.new("mail.example.com") +# imap.capable?(:IMAP4rev1) or raise "Not an IMAP4rev1 server" +# imap.capable?(:starttls) or raise "Cannot start TLS" +# imap.starttls +# +# if imap.auth_capable?("PLAIN") +# imap.authenticate "PLAIN", username, password +# elsif !imap.capability?("LOGINDISABLED") +# imap.login username, password +# else +# raise "No acceptable authentication mechanisms" +# end +# +# # Support for "UTF8=ACCEPT" implies support for "ENABLE" +# imap.enable :utf8 if imap.capable?("UTF8=ACCEPT") +# +# namespaces = imap.namespace if imap.capable?(:namespace) +# mbox_prefix = namespaces&.personal&.first&.prefix || "" +# mbox_delim = namespaces&.personal&.first&.delim || "/" +# mbox_path = prefix + %w[path to my mailbox].join(delim) +# imap.create mbox_path +# +# === Basic IMAP4rev1 capabilities +# +# IMAP4rev1 servers must advertise +IMAP4rev1+ in their capabilities list. +# IMAP4rev1 servers must _implement_ the +STARTTLS+, AUTH=PLAIN, +# and +LOGINDISABLED+ capabilities. See #starttls, #login, and #authenticate +# for the implications of these capabilities. +# +# === Caching +CAPABILITY+ responses +# +# Net::IMAP automatically stores and discards capability data according to the +# the requirements and recommendations in +# {IMAP4rev2 §6.1.1}[https://www.rfc-editor.org/rfc/rfc9051#section-6.1.1], +# {§6.2}[https://www.rfc-editor.org/rfc/rfc9051#section-6.2], and +# {§7.1}[https://www.rfc-editor.org/rfc/rfc9051#section-7.1]. +# Use #capable?, #auth_capable?, or #capabilities to use this cache and avoid +# sending the #capability command unnecessarily. +# +# The server may advertise its initial capabilities using the +CAPABILITY+ +# ResponseCode in a +PREAUTH+ or +OK+ #greeting. When TLS has started +# (#starttls) and after authentication (#login or #authenticate), the server's +# capabilities may change and cached capabilities are discarded. The server +# may send updated capabilities with an +OK+ TaggedResponse to #login or +# #authenticate, and these will be cached by Net::IMAP. But the +# TaggedResponse to #starttls MUST be ignored--it is sent before TLS starts +# and is unprotected. +# +# When storing capability values to variables, be careful that they are +# discarded or reset appropriately, especially following #starttls. +# +# === Using IMAP4rev1 extensions +# +# See the {IANA IMAP4 capabilities +# registry}[http://www.iana.org/assignments/imap4-capabilities] for a list of +# all standard capabilities, and their reference RFCs. +# +# IMAP4rev1 servers must not activate behavior that is incompatible with the +# base specification until an explicit client action invokes a capability, +# e.g. sending a command or command argument specific to that capability. +# Servers may send data with backward compatible behavior, such as response +# codes or mailbox attributes, at any time without client action. +# +# Invoking capabilities which are unknown to Net::IMAP may cause unexpected +# behavior and errors. For example, ResponseParseError is raised when +# unknown response syntax is received. Invoking commands or command +# parameters that are unsupported by the server may raise NoResponseError, +# BadResponseError, or cause other unexpected behavior. +# +# Some capabilities must be explicitly activated using the #enable command. +# See #enable for details. +# +# == Thread Safety +# +# Net::IMAP supports concurrent threads. For example, +# +# imap = Net::IMAP.new("imap.foo.net", "imap2") +# imap.authenticate("scram-md5", "bar", "password") +# imap.select("inbox") +# fetch_thread = Thread.start { imap.fetch(1..-1, "UID") } +# search_result = imap.search(["BODY", "hello"]) +# fetch_result = fetch_thread.value +# imap.disconnect +# +# This script invokes the FETCH command and the SEARCH command concurrently. +# +# == Errors +# +# An \IMAP server can send three different types of responses to indicate +# failure: +# +# NO:: the attempted command could not be successfully completed. For +# instance, the username/password used for logging in are incorrect; +# the selected mailbox does not exist; etc. +# +# BAD:: the request from the client does not follow the server's +# understanding of the \IMAP protocol. This includes attempting +# commands from the wrong client state; for instance, attempting +# to perform a SEARCH command without having SELECTed a current +# mailbox. It can also signal an internal server +# failure (such as a disk crash) has occurred. +# +# BYE:: the server is saying goodbye. This can be part of a normal +# logout sequence, and can be used as part of a login sequence +# to indicate that the server is (for some reason) unwilling +# to accept your connection. As a response to any other command, +# it indicates either that the server is shutting down, or that +# the server is timing out the client connection due to inactivity. +# +# These three error response are represented by the errors +# Net::IMAP::NoResponseError, Net::IMAP::BadResponseError, and +# Net::IMAP::ByeResponseError, all of which are subclasses of +# Net::IMAP::ResponseError. Essentially, all methods that involve +# sending a request to the server can generate one of these errors. +# Only the most pertinent instances have been documented below. +# +# Because the IMAP class uses Sockets for communication, its methods +# are also susceptible to the various errors that can occur when +# working with sockets. These are generally represented as +# Errno errors. For instance, any method that involves sending a +# request to the server and/or receiving a response from it could +# raise an Errno::EPIPE error if the network connection unexpectedly +# goes down. See the socket(7), ip(7), tcp(7), socket(2), connect(2), +# and associated man pages. +# +# Finally, a Net::IMAP::DataFormatError is thrown if low-level data +# is found to be in an incorrect format (for instance, when converting +# between UTF-8 and UTF-16), and Net::IMAP::ResponseParseError is +# thrown if a server response is non-parseable. +# +# == What's here? +# +# * {Connection control}[rdoc-ref:Net::IMAP@Connection+control+methods] +# * {Server capabilities}[rdoc-ref:Net::IMAP@Server+capabilities] +# * {Handling server responses}[rdoc-ref:Net::IMAP@Handling+server+responses] +# * {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands] +# * {for any state}[rdoc-ref:Net::IMAP@Any+state] +# * {for the "not authenticated" state}[rdoc-ref:Net::IMAP@Not+Authenticated+state] +# * {for the "authenticated" state}[rdoc-ref:Net::IMAP@Authenticated+state] +# * {for the "selected" state}[rdoc-ref:Net::IMAP@Selected+state] +# * {for the "logout" state}[rdoc-ref:Net::IMAP@Logout+state] +# * {IMAP extension support}[rdoc-ref:Net::IMAP@IMAP+extension+support] +# +# === Connection control methods +# +# - Net::IMAP.new: Creates a new \IMAP client which connects immediately and +# waits for a successful server greeting before the method returns. +# - #starttls: Asks the server to upgrade a clear-text connection to use TLS. +# - #logout: Tells the server to end the session. Enters the "_logout_" state. +# - #disconnect: Disconnects the connection (without sending #logout first). +# - #disconnected?: True if the connection has been closed. +# +# === Server capabilities +# +# - #capable?: Returns whether the server supports a given capability. +# - #capabilities: Returns the server's capabilities as an array of strings. +# - #auth_capable?: Returns whether the server advertises support for a given +# SASL mechanism, for use with #authenticate. +# - #auth_mechanisms: Returns the #authenticate SASL mechanisms which +# the server claims to support as an array of strings. +# - #clear_cached_capabilities: Clears cached capabilities. +# +# The capabilities cache is automatically cleared after completing +# #starttls, #login, or #authenticate. +# - #capability: Sends the +CAPABILITY+ command and returns the #capabilities. +# +# In general, #capable? should be used rather than explicitly sending a +# +CAPABILITY+ command to the server. +# +# === Handling server responses +# +# - #greeting: The server's initial untagged response, which can indicate a +# pre-authenticated connection. +# - #responses: Yields unhandled UntaggedResponse#data and non-+nil+ +# ResponseCode#data. +# - #clear_responses: Deletes unhandled data from #responses and returns it. +# - #add_response_handler: Add a block to be called inside the receiver thread +# with every server response. +# - #response_handlers: Returns the list of response handlers. +# - #remove_response_handler: Remove a previously added response handler. +# +# === Core \IMAP commands +# +# The following commands are defined either by +# the [IMAP4rev1[https://tools.ietf.org/html/rfc3501]] base specification, or +# by one of the following extensions: +# [IDLE[https://tools.ietf.org/html/rfc2177]], +# [NAMESPACE[https://tools.ietf.org/html/rfc2342]], +# [UNSELECT[https://tools.ietf.org/html/rfc3691]], +# [ENABLE[https://tools.ietf.org/html/rfc5161]], +# [MOVE[https://tools.ietf.org/html/rfc6851]]. +# These extensions are widely supported by modern IMAP4rev1 servers and have +# all been integrated into [IMAP4rev2[https://tools.ietf.org/html/rfc9051]]. +# *NOTE:* Net::IMAP doesn't support IMAP4rev2 yet. +# +# ==== Any state +# +# - #capability: Returns the server's capabilities as an array of strings. +# +# In general, #capable? should be used rather than explicitly sending a +# +CAPABILITY+ command to the server. +# - #noop: Allows the server to send unsolicited untagged #responses. +# - #logout: Tells the server to end the session. Enters the "_logout_" state. +# +# ==== Not Authenticated state +# +# In addition to the commands for any state, the following commands are valid +# in the "not authenticated" state: +# +# - #starttls: Upgrades a clear-text connection to use TLS. +# +# Requires the +STARTTLS+ capability. +# - #authenticate: Identifies the client to the server using the given +# {SASL mechanism}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] +# and credentials. Enters the "_authenticated_" state. +# +# The server should list "AUTH=#{mechanism}" capabilities for +# supported mechanisms. +# - #login: Identifies the client to the server using a plain text password. +# Using #authenticate is generally preferred. Enters the "_authenticated_" +# state. +# +# The +LOGINDISABLED+ capability must NOT be listed. +# +# ==== Authenticated state +# +# In addition to the commands for any state, the following commands are valid +# in the "_authenticated_" state: +# +# - #enable: Enables backwards incompatible server extensions. +# Requires the +ENABLE+ or +IMAP4rev2+ capability. +# - #select: Open a mailbox and enter the "_selected_" state. +# - #examine: Open a mailbox read-only, and enter the "_selected_" state. +# - #create: Creates a new mailbox. +# - #delete: Permanently remove a mailbox. +# - #rename: Change the name of a mailbox. +# - #subscribe: Adds a mailbox to the "subscribed" set. +# - #unsubscribe: Removes a mailbox from the "subscribed" set. +# - #list: Returns names and attributes of mailboxes matching a given pattern. +# - #namespace: Returns mailbox namespaces, with path prefixes and delimiters. +# Requires the +NAMESPACE+ or +IMAP4rev2+ capability. +# - #status: Returns mailbox information, e.g. message count, unseen message +# count, +UIDVALIDITY+ and +UIDNEXT+. +# - #append: Appends a message to the end of a mailbox. +# - #idle: Allows the server to send updates to the client, without the client +# needing to poll using #noop. +# Requires the +IDLE+ or +IMAP4rev2+ capability. +# - *Obsolete* #lsub: Replaced by LIST-EXTENDED and removed from +# +IMAP4rev2+. Lists mailboxes in the "subscribed" set. +# +# *Note:* Net::IMAP hasn't implemented LIST-EXTENDED yet. +# +# ==== Selected state +# +# In addition to the commands for any state and the "_authenticated_" +# commands, the following commands are valid in the "_selected_" state: +# +# - #close: Closes the mailbox and returns to the "_authenticated_" state, +# expunging deleted messages, unless the mailbox was opened as read-only. +# - #unselect: Closes the mailbox and returns to the "_authenticated_" state, +# without expunging any messages. +# Requires the +UNSELECT+ or +IMAP4rev2+ capability. +# - #expunge: Permanently removes messages which have the Deleted flag set. +# - #uid_expunge: Restricts expunge to only remove the specified UIDs. +# Requires the +UIDPLUS+ or +IMAP4rev2+ capability. +# - #search, #uid_search: Returns sequence numbers or UIDs of messages that +# match the given searching criteria. +# - #fetch, #uid_fetch: Returns data associated with a set of messages, +# specified by sequence number or UID. +# - #store, #uid_store: Alters a message's flags. +# - #copy, #uid_copy: Copies the specified messages to the end of the +# specified destination mailbox. +# - #move, #uid_move: Moves the specified messages to the end of the +# specified destination mailbox, expunging them from the current mailbox. +# Requires the +MOVE+ or +IMAP4rev2+ capability. +# - #check: *Obsolete:* removed from +IMAP4rev2+. +# Can be replaced with #noop or #idle. +# +# ==== Logout state +# +# No \IMAP commands are valid in the "_logout_" state. If the socket is still +# open, Net::IMAP will close it after receiving server confirmation. +# Exceptions will be raised by \IMAP commands that have already started and +# are waiting for a response, as well as any that are called after logout. +# +# === \IMAP extension support +# +# ==== RFC9051: +IMAP4rev2+ +# +# Although IMAP4rev2[https://tools.ietf.org/html/rfc9051] is not supported +# yet, Net::IMAP supports several extensions that have been folded into it: +# +ENABLE+, +IDLE+, +MOVE+, +NAMESPACE+, +SASL-IR+, +UIDPLUS+, +UNSELECT+, +# STATUS=SIZE, and the fetch side of +BINARY+. +# Commands for these extensions are listed with the {Core IMAP +# commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands], above. +# +# >>> +# The following are folded into +IMAP4rev2+ but are currently +# unsupported or incompletely supported by Net::IMAP: RFC4466 +# extensions, +ESEARCH+, +SEARCHRES+, +LIST-EXTENDED+, +LIST-STATUS+, +# +LITERAL-+, and +SPECIAL-USE+. +# +# ==== RFC2087: +QUOTA+ +# - #getquota: returns the resource usage and limits for a quota root +# - #getquotaroot: returns the list of quota roots for a mailbox, as well as +# their resource usage and limits. +# - #setquota: sets the resource limits for a given quota root. +# +# ==== RFC2177: +IDLE+ +# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051] and also included +# above with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. +# - #idle: Allows the server to send updates to the client, without the client +# needing to poll using #noop. +# +# ==== RFC2342: +NAMESPACE+ +# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051] and also included +# above with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. +# - #namespace: Returns mailbox namespaces, with path prefixes and delimiters. +# +# ==== RFC2971: +ID+ +# - #id: exchanges client and server implementation information. +# +# ==== RFC3516: +BINARY+ +# The fetch side of +BINARY+ has been folded into +# IMAP4rev2[https://tools.ietf.org/html/rfc9051]. +# - Updates #fetch and #uid_fetch with the +BINARY+, +BINARY.PEEK+, and +# +BINARY.SIZE+ items. See FetchData#binary and FetchData#binary_size. +# +# >>> +# *NOTE:* The binary extension the #append command is _not_ supported yet. +# +# ==== RFC3691: +UNSELECT+ +# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051] and also included +# above with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. +# - #unselect: Closes the mailbox and returns to the "_authenticated_" state, +# without expunging any messages. +# +# ==== RFC4314: +ACL+ +# - #getacl: lists the authenticated user's access rights to a mailbox. +# - #setacl: sets the access rights for a user on a mailbox +# >>> +# *NOTE:* +DELETEACL+, +LISTRIGHTS+, and +MYRIGHTS+ are not supported yet. +# +# ==== RFC4315: +UIDPLUS+ +# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051] and also included +# above with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. +# - #uid_expunge: Restricts #expunge to only remove the specified UIDs. +# - Updates #select, #examine with the +UIDNOTSTICKY+ ResponseCode +# - Updates #append with the +APPENDUID+ ResponseCode +# - Updates #copy, #move with the +COPYUID+ ResponseCode +# +# ==== RFC4959: +SASL-IR+ +# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051]. +# - Updates #authenticate with the option to send an initial response. +# +# ==== RFC5161: +ENABLE+ +# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051] and also included +# above with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. +# - #enable: Enables backwards incompatible server extensions. +# +# ==== RFC5256: +SORT+ +# - #sort, #uid_sort: An alternate version of #search or #uid_search which +# sorts the results by specified keys. +# ==== RFC5256: +THREAD+ +# - #thread, #uid_thread: An alternate version of #search or #uid_search, +# which arranges the results into ordered groups or threads according to a +# chosen algorithm. +# +# ==== +X-GM-EXT-1+ +# +X-GM-EXT-1+ is a non-standard Gmail extension. See {Google's +# documentation}[https://developers.google.com/gmail/imap/imap-extensions]. +# - Updates #fetch and #uid_fetch with support for +X-GM-MSGID+ (unique +# message ID), +X-GM-THRID+ (thread ID), and +X-GM-LABELS+ (Gmail labels). +# - Updates #search with the +X-GM-RAW+ search attribute. +# - #xlist: replaced by +SPECIAL-USE+ attributes in #list responses. +# +# *NOTE:* The +OBJECTID+ extension should replace +X-GM-MSGID+ and +# +X-GM-THRID+, but Gmail does not support it (as of 2023-11-10). +# +# ==== RFC6851: +MOVE+ +# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051] and also included +# above with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. +# - #move, #uid_move: Moves the specified messages to the end of the +# specified destination mailbox, expunging them from the current mailbox. +# +# ==== RFC6855: UTF8=ACCEPT, UTF8=ONLY +# +# - See #enable for information about support for UTF-8 string encoding. +# +# ==== RFC7162: +CONDSTORE+ +# +# - Updates #enable with +CONDSTORE+ parameter. +CONDSTORE+ will also be +# enabled by using any of the extension's command parameters, listed below. +# - Updates #status with the +HIGHESTMODSEQ+ status attribute. +# - Updates #select and #examine with the +condstore+ modifier, and adds +# either a +HIGHESTMODSEQ+ or +NOMODSEQ+ ResponseCode to the responses. +# - Updates #search, #uid_search, #sort, and #uid_sort with the +MODSEQ+ +# search criterion, and adds SearchResult#modseq to the search response. +# - Updates #thread and #uid_thread with the +MODSEQ+ search criterion +# (but thread responses are unchanged). +# - Updates #fetch and #uid_fetch with the +changedsince+ modifier and +# +MODSEQ+ FetchData attribute. +# - Updates #store and #uid_store with the +unchangedsince+ modifier and adds +# the +MODIFIED+ ResponseCode to the tagged response. +# +# ==== RFC8438: STATUS=SIZE +# - Updates #status with the +SIZE+ status attribute. +# +# ==== RFC8474: +OBJECTID+ +# - Adds +MAILBOXID+ ResponseCode to #create tagged response. +# - Adds +MAILBOXID+ ResponseCode to #select and #examine untagged response. +# - Updates #fetch and #uid_fetch with the +EMAILID+ and +THREADID+ items. +# See FetchData#emailid and FetchData#emailid. +# - Updates #status with support for the +MAILBOXID+ status attribute. +# +# == References +# +# [{IMAP4rev1}[https://www.rfc-editor.org/rfc/rfc3501.html]]:: +# Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - \VERSION 4rev1", +# RFC 3501, DOI 10.17487/RFC3501, March 2003, +# . +# +# [IMAP-ABNF-EXT[https://www.rfc-editor.org/rfc/rfc4466.html]]:: +# Melnikov, A. and C. Daboo, "Collected Extensions to IMAP4 ABNF", +# RFC 4466, DOI 10.17487/RFC4466, April 2006, +# . +# +# Note: Net::IMAP cannot parse the entire RFC4466 grammar yet. +# +# [{IMAP4rev2}[https://www.rfc-editor.org/rfc/rfc9051.html]]:: +# Melnikov, A., Ed., and B. Leiba, Ed., "Internet Message Access Protocol +# (\IMAP) - Version 4rev2", RFC 9051, DOI 10.17487/RFC9051, August 2021, +# . +# +# Note: Net::IMAP is not fully compatible with IMAP4rev2 yet. +# +# [IMAP-IMPLEMENTATION[https://www.rfc-editor.org/info/rfc2683]]:: +# Leiba, B., "IMAP4 Implementation Recommendations", +# RFC 2683, DOI 10.17487/RFC2683, September 1999, +# . +# +# [IMAP-MULTIACCESS[https://www.rfc-editor.org/info/rfc2180]]:: +# Gahrns, M., "IMAP4 Multi-Accessed Mailbox Practice", RFC 2180, DOI +# 10.17487/RFC2180, July 1997, . +# +# [UTF7[https://tools.ietf.org/html/rfc2152]]:: +# Goldsmith, D. and M. Davis, "UTF-7 A Mail-Safe Transformation Format of +# Unicode", RFC 2152, DOI 10.17487/RFC2152, May 1997, +# . +# +# === Message envelope and body structure +# +# [RFC5322[https://tools.ietf.org/html/rfc5322]]:: +# Resnick, P., Ed., "Internet Message Format", +# RFC 5322, DOI 10.17487/RFC5322, October 2008, +# . +# +# Note: obsoletes +# RFC-2822[https://tools.ietf.org/html/rfc2822] (April 2001) and +# RFC-822[https://tools.ietf.org/html/rfc822] (August 1982). +# +# [CHARSET[https://tools.ietf.org/html/rfc2978]]:: +# Freed, N. and J. Postel, "IANA Charset Registration Procedures", BCP 19, +# RFC 2978, DOI 10.17487/RFC2978, October 2000, +# . +# +# [DISPOSITION[https://tools.ietf.org/html/rfc2183]]:: +# Troost, R., Dorner, S., and K. Moore, Ed., "Communicating Presentation +# Information in Internet Messages: The Content-Disposition Header +# Field", RFC 2183, DOI 10.17487/RFC2183, August 1997, +# . +# +# [MIME-IMB[https://tools.ietf.org/html/rfc2045]]:: +# Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions +# (MIME) Part One: Format of Internet Message Bodies", +# RFC 2045, DOI 10.17487/RFC2045, November 1996, +# . +# +# [MIME-IMT[https://tools.ietf.org/html/rfc2046]]:: +# Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions +# (MIME) Part Two: Media Types", RFC 2046, DOI 10.17487/RFC2046, +# November 1996, . +# +# [MIME-HDRS[https://tools.ietf.org/html/rfc2047]]:: +# Moore, K., "MIME (Multipurpose Internet Mail Extensions) Part Three: +# Message Header Extensions for Non-ASCII Text", +# RFC 2047, DOI 10.17487/RFC2047, November 1996, +# . +# +# [RFC2231[https://tools.ietf.org/html/rfc2231]]:: +# Freed, N. and K. Moore, "MIME Parameter Value and Encoded Word +# Extensions: Character Sets, Languages, and Continuations", +# RFC 2231, DOI 10.17487/RFC2231, November 1997, +# . +# +# [I18n-HDRS[https://tools.ietf.org/html/rfc6532]]:: +# Yang, A., Steele, S., and N. Freed, "Internationalized Email Headers", +# RFC 6532, DOI 10.17487/RFC6532, February 2012, +# . +# +# [LANGUAGE-TAGS[https://www.rfc-editor.org/info/rfc3282]]:: +# Alvestrand, H., "Content Language Headers", +# RFC 3282, DOI 10.17487/RFC3282, May 2002, +# . +# +# [LOCATION[https://www.rfc-editor.org/info/rfc2557]]:: +# Palme, J., Hopmann, A., and N. Shelness, "MIME Encapsulation of +# Aggregate Documents, such as HTML (MHTML)", +# RFC 2557, DOI 10.17487/RFC2557, March 1999, +# . +# +# [MD5[https://tools.ietf.org/html/rfc1864]]:: +# Myers, J. and M. Rose, "The Content-MD5 Header Field", +# RFC 1864, DOI 10.17487/RFC1864, October 1995, +# . +# +# [RFC3503[https://tools.ietf.org/html/rfc3503]]:: +# Melnikov, A., "Message Disposition Notification (MDN) +# profile for Internet Message Access Protocol (IMAP)", +# RFC 3503, DOI 10.17487/RFC3503, March 2003, +# . +# +# === \IMAP Extensions +# +# [QUOTA[https://tools.ietf.org/html/rfc9208]]:: +# Melnikov, A., "IMAP QUOTA Extension", RFC 9208, DOI 10.17487/RFC9208, +# March 2022, . +# +# Note: obsoletes +# RFC-2087[https://tools.ietf.org/html/rfc2087] (January 1997). +# Net::IMAP does not fully support the RFC9208 updates yet. +# [IDLE[https://tools.ietf.org/html/rfc2177]]:: +# Leiba, B., "IMAP4 IDLE command", RFC 2177, DOI 10.17487/RFC2177, +# June 1997, . +# [NAMESPACE[https://tools.ietf.org/html/rfc2342]]:: +# Gahrns, M. and C. Newman, "IMAP4 Namespace", RFC 2342, +# DOI 10.17487/RFC2342, May 1998, . +# [ID[https://tools.ietf.org/html/rfc2971]]:: +# Showalter, T., "IMAP4 ID extension", RFC 2971, DOI 10.17487/RFC2971, +# October 2000, . +# [BINARY[https://tools.ietf.org/html/rfc3516]]:: +# Nerenberg, L., "IMAP4 Binary Content Extension", RFC 3516, +# DOI 10.17487/RFC3516, April 2003, +# . +# [ACL[https://tools.ietf.org/html/rfc4314]]:: +# Melnikov, A., "IMAP4 Access Control List (ACL) Extension", RFC 4314, +# DOI 10.17487/RFC4314, December 2005, +# . +# [UIDPLUS[https://www.rfc-editor.org/rfc/rfc4315.html]]:: +# Crispin, M., "Internet Message Access Protocol (\IMAP) - UIDPLUS +# extension", RFC 4315, DOI 10.17487/RFC4315, December 2005, +# . +# [SORT[https://tools.ietf.org/html/rfc5256]]:: +# Crispin, M. and K. Murchison, "Internet Message Access Protocol - SORT and +# THREAD Extensions", RFC 5256, DOI 10.17487/RFC5256, June 2008, +# . +# [THREAD[https://tools.ietf.org/html/rfc5256]]:: +# Crispin, M. and K. Murchison, "Internet Message Access Protocol - SORT and +# THREAD Extensions", RFC 5256, DOI 10.17487/RFC5256, June 2008, +# . +# [RFC5530[https://www.rfc-editor.org/rfc/rfc5530.html]]:: +# Gulbrandsen, A., "IMAP Response Codes", RFC 5530, DOI 10.17487/RFC5530, +# May 2009, . +# [MOVE[https://tools.ietf.org/html/rfc6851]]:: +# Gulbrandsen, A. and N. Freed, Ed., "Internet Message Access Protocol +# (\IMAP) - MOVE Extension", RFC 6851, DOI 10.17487/RFC6851, January 2013, +# . +# [UTF8=ACCEPT[https://tools.ietf.org/html/rfc6855]]:: +# [UTF8=ONLY[https://tools.ietf.org/html/rfc6855]]:: +# Resnick, P., Ed., Newman, C., Ed., and S. Shen, Ed., +# "IMAP Support for UTF-8", RFC 6855, DOI 10.17487/RFC6855, March 2013, +# . +# [CONDSTORE[https://tools.ietf.org/html/rfc7162]]:: +# [QRESYNC[https://tools.ietf.org/html/rfc7162]]:: +# Melnikov, A. and D. Cridland, "IMAP Extensions: Quick Flag Changes +# Resynchronization (CONDSTORE) and Quick Mailbox Resynchronization +# (QRESYNC)", RFC 7162, DOI 10.17487/RFC7162, May 2014, +# . +# [OBJECTID[https://tools.ietf.org/html/rfc8474]]:: +# Gondwana, B., Ed., "IMAP Extension for Object Identifiers", +# RFC 8474, DOI 10.17487/RFC8474, September 2018, +# . +# +# === IANA registries +# * {IMAP Capabilities}[http://www.iana.org/assignments/imap4-capabilities] +# * {IMAP Response Codes}[https://www.iana.org/assignments/imap-response-codes/imap-response-codes.xhtml] +# * {IMAP Mailbox Name Attributes}[https://www.iana.org/assignments/imap-mailbox-name-attributes/imap-mailbox-name-attributes.xhtml] +# * {IMAP and JMAP Keywords}[https://www.iana.org/assignments/imap-jmap-keywords/imap-jmap-keywords.xhtml] +# * {IMAP Threading Algorithms}[https://www.iana.org/assignments/imap-threading-algorithms/imap-threading-algorithms.xhtml] +# * {SASL Mechanisms and SASL SCRAM Family Mechanisms}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] +# * {Service Name and Transport Protocol Port Number Registry}[https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml]: +# +imap+: tcp/143, +imaps+: tcp/993 +# * {GSSAPI/Kerberos/SASL Service Names}[https://www.iana.org/assignments/gssapi-service-names/gssapi-service-names.xhtml]: +# +imap+ +# * {Character sets}[https://www.iana.org/assignments/character-sets/character-sets.xhtml] +# ===== For currently unsupported features: +# * {IMAP Quota Resource Types}[http://www.iana.org/assignments/imap4-capabilities#imap-capabilities-2] +# * {LIST-EXTENDED options and responses}[https://www.iana.org/assignments/imap-list-extended/imap-list-extended.xhtml] +# * {IMAP METADATA Server Entry and Mailbox Entry Registries}[https://www.iana.org/assignments/imap-metadata/imap-metadata.xhtml] +# * {IMAP ANNOTATE Extension Entries and Attributes}[https://www.iana.org/assignments/imap-annotate-extension/imap-annotate-extension.xhtml] +# * {IMAP URLAUTH Access Identifiers and Prefixes}[https://www.iana.org/assignments/urlauth-access-ids/urlauth-access-ids.xhtml] +# * {IMAP URLAUTH Authorization Mechanism Registry}[https://www.iana.org/assignments/urlauth-authorization-mechanism-registry/urlauth-authorization-mechanism-registry.xhtml] +# +# source://net-imap//lib/net/imap.rb#719 +class Net::IMAP < ::Net::Protocol + include ::Net::IMAP::DeprecatedClientOptions + include ::MonitorMixin + include ::OpenSSL + include ::OpenSSL::SSL + extend ::Net::IMAP::Authenticators + + # Creates a new Net::IMAP object and connects it to the specified + # +host+. + # + # ==== Options + # + # Accepts the following options: + # + # [port] + # Port number. Defaults to 993 when +ssl+ is truthy, and 143 otherwise. + # + # [ssl] + # If +true+, the connection will use TLS with the default params set by + # {OpenSSL::SSL::SSLContext#set_params}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-set_params]. + # 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]. + # + # [open_timeout] + # Seconds to wait until a connection is opened + # [idle_response_timeout] + # Seconds to wait until an IDLE response is received + # + # See DeprecatedClientOptions.new for deprecated arguments. + # + # ==== Examples + # + # Connect to cleartext port 143 at mail.example.com and recieve the server greeting: + # imap = Net::IMAP.new('mail.example.com', ssl: false) # => # + # imap.port => 143 + # imap.tls_verified? => false + # imap.greeting => name: ("OK" | "PREAUTH") => status + # status # => "OK" + # # The client is connected in the "Not Authenticated" state. + # + # Connect with TLS to port 993 + # imap = Net::IMAP.new('mail.example.com', ssl: true) # => # + # imap.port => 993 + # imap.tls_verified? => true + # imap.greeting => name: (/OK/i | /PREAUTH/i) => status + # case status + # in /OK/i + # # The client is connected in the "Not Authenticated" state. + # imap.authenticate("PLAIN", "joe_user", "joes_password") + # in /PREAUTH/i + # # The client is connected in the "Authenticated" state. + # end + # + # Connect with prior authentication, for example using an SSL certificate: + # ssl_ctx_params = { + # cert: OpenSSL::X509::Certificate.new(File.read("client.crt")), + # key: OpenSSL::PKey::EC.new(File.read('client.key')), + # extra_chain_cert: [ + # OpenSSL::X509::Certificate.new(File.read("intermediate.crt")), + # ], + # } + # imap = Net::IMAP.new('mail.example.com', ssl: ssl_ctx_params) + # imap.port => 993 + # imap.tls_verified? => true + # imap.greeting => name: "PREAUTH" + # # The client is connected in the "Authenticated" state. + # + # ==== Exceptions + # + # The most common errors are: + # + # [Errno::ECONNREFUSED] + # Connection refused by +host+ or an intervening firewall. + # [Errno::ETIMEDOUT] + # Connection timed out (possibly due to packets being dropped by an + # intervening firewall). + # [Errno::ENETUNREACH] + # There is no route to that network. + # [SocketError] + # Hostname not known or other socket error. + # [Net::IMAP::ByeResponseError] + # Connected to the host successfully, but it immediately said goodbye. + # + # @return [IMAP] a new instance of IMAP + # + # source://net-imap//lib/net/imap/deprecated_client_options.rb#72 + def initialize(host, port_or_options = T.unsafe(nil), *deprecated, **options); end + + # Adds a response handler. For example, to detect when + # the server sends a new EXISTS response (which normally + # indicates new messages being added to the mailbox), + # add the following handler after selecting the + # mailbox: + # + # imap.add_response_handler { |resp| + # if resp.kind_of?(Net::IMAP::UntaggedResponse) and resp.name == "EXISTS" + # puts "Mailbox now has #{resp.data} messages" + # end + # } + # + # Related: #remove_response_handler, #response_handlers + # + # @raise [ArgumentError] + # + # source://net-imap//lib/net/imap.rb#2563 + 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] + # to append the +message+ to the end of the +mailbox+. The optional +flags+ + # argument is an array of flags initially passed to the new message. The + # optional +date_time+ argument specifies the creation time to assign to the + # new message; it defaults to the current time. + # + # For example: + # + # imap.append("inbox", <"AUTH=#{mechanism.to_s.upcase}". When + # available, cached capabilities are used without sending a new #capability + # command to the server. + # + # imap.capable? "AUTH=PLAIN" # => true + # imap.auth_capable? "PLAIN" # => true + # imap.auth_capable? "blurdybloop" # => false + # + # Related: #authenticate, #auth_mechanisms, #capable?, #capabilities + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap.rb#1027 + def auth_capable?(mechanism); end + + # Returns the #authenticate mechanisms that the server claims to support. + # These are derived from the #capabilities with an AUTH= prefix. + # + # This may be different when the connection is cleartext or using TLS. Most + # servers will drop all AUTH= mechanisms from #capabilities after + # the connection has authenticated. + # + # imap = Net::IMAP.new(hostname, ssl: false) + # imap.capabilities # => ["IMAP4REV1", "LOGINDISABLED"] + # imap.auth_mechanisms # => [] + # + # imap.starttls + # imap.capabilities # => ["IMAP4REV1", "AUTH=PLAIN", "AUTH=XOAUTH2", + # # "AUTH=OAUTHBEARER"] + # imap.auth_mechanisms # => ["PLAIN", "XOAUTH2", "OAUTHBEARER"] + # + # imap.authenticate("XOAUTH2", username, oauth2_access_token) + # imap.auth_mechanisms # => [] + # + # Related: #authenticate, #auth_capable?, #capabilities + # + # source://net-imap//lib/net/imap.rb#1010 + def auth_mechanisms; end + + # :call-seq: + # authenticate(mechanism, *, sasl_ir: true, 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 + # "_authenticated_" state. + # + # +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). + # + # All other arguments are forwarded to the registered SASL authenticator for + # the requested mechanism. The documentation for each individual + # mechanism must be consulted for its specific parameters. + # + # Related: #login, #starttls, #auth_capable?, #auth_mechanisms + # + # ==== Mechanisms + # + # Each mechanism has different properties and requirements. Please consult + # the documentation for the specific mechanisms you are using: + # + # +ANONYMOUS+:: + # See AnonymousAuthenticator[rdoc-ref:Net::IMAP::SASL::AnonymousAuthenticator]. + # + # Allows the user to gain access to public services or resources without + # authenticating or disclosing an identity. + # + # +EXTERNAL+:: + # See ExternalAuthenticator[rdoc-ref:Net::IMAP::SASL::ExternalAuthenticator]. + # + # Authenticates using already established credentials, such as a TLS + # certificate or IPsec. + # + # +OAUTHBEARER+:: + # See OAuthBearerAuthenticator[rdoc-ref:Net::IMAP::SASL::OAuthBearerAuthenticator]. + # + # Login using an OAuth2 Bearer token. This is the standard mechanism + # for using OAuth2 with \SASL, but it is not yet deployed as widely as + # +XOAUTH2+. + # + # +PLAIN+:: + # See PlainAuthenticator[rdoc-ref:Net::IMAP::SASL::PlainAuthenticator]. + # + # Login using clear-text username and password. + # + # +SCRAM-SHA-1+:: + # +SCRAM-SHA-256+:: + # See ScramAuthenticator[rdoc-ref:Net::IMAP::SASL::ScramAuthenticator]. + # + # Login by username and password. The password is not sent to the + # server but is used in a salted challenge/response exchange. + # +SCRAM-SHA-1+ and +SCRAM-SHA-256+ are directly supported by + # Net::IMAP::SASL. New authenticators can easily be added for any other + # SCRAM-* mechanism if the digest algorithm is supported by + # OpenSSL::Digest. + # + # +XOAUTH2+:: + # See XOAuth2Authenticator[rdoc-ref:Net::IMAP::SASL::XOAuth2Authenticator]. + # + # Login using a username and an OAuth2 access token. Non-standard and + # obsoleted by +OAUTHBEARER+, but widely supported. + # + # See the {SASL mechanism + # registry}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] + # for a list of all SASL mechanisms and their specifications. To register + # new authenticators, see Authenticators. + # + # ===== Deprecated mechanisms + # + # Obsolete mechanisms should be avoided, but are still available for + # backwards compatibility. See Net::IMAP::SASL@Deprecated+mechanisms. + # Using a deprecated mechanism will print a warning. + # + # ==== Capabilities + # + # "AUTH=#{mechanism}" capabilities indicate server support for + # mechanisms. Use #auth_capable? or #auth_mechanisms to check for support + # before using a particular mechanism. + # + # if imap.auth_capable? "XOAUTH2" + # imap.authenticate "XOAUTH2", username, oauth2_access_token + # elsif imap.auth_capable? "PLAIN" + # imap.authenticate "PLAIN", username, password + # elsif !imap.capability? "LOGINDISABLED" + # imap.login username, password + # else + # raise "No acceptable authentication mechanism is available" + # end + # + # Although servers should list all supported \SASL mechanisms, they may + # allow authentication with an unlisted +mechanism+. + # + # If [SASL-IR[https://www.rfc-editor.org/rfc/rfc4959.html]] is supported + # and the appropriate "AUTH=#{mechanism}" capability is present, + # an "initial response" may be sent as an argument to the +AUTHENTICATE+ + # command, saving a round-trip. The SASL exchange allows for server + # challenges and client responses, but many mechanisms expect the client to + # "respond" first. The initial response will only be sent for + # "client-first" mechanisms. + # + # Server capabilities may change after #starttls, #login, and #authenticate. + # Previously cached #capabilities will be cleared when this method + # completes. If the TaggedResponse to #authenticate includes updated + # capabilities, they will be cached. + # + # source://net-imap//lib/net/imap.rb#1306 + def authenticate(mechanism, *creds, sasl_ir: T.unsafe(nil), **props, &callback); end + + # Returns the server capabilities. When available, cached capabilities are + # used without sending a new #capability command to the server. + # + # To ensure a case-insensitive comparison, #capable? can be used instead. + # + # *NOTE:* Most Net::IMAP methods do not _currently_ modify their + # behaviour according to the server's advertised #capabilities. + # + # See Net::IMAP@Capabilities for more about \IMAP capabilities. + # + # Related: #capable?, #auth_capable?, #auth_mechanisms, #capability, #enable + # + # source://net-imap//lib/net/imap.rb#986 + def capabilities; end + + # Returns whether capabilities have been cached. When true, #capable? and + # #capabilities don't require sending a #capability command to the server. + # + # See Net::IMAP@Capabilities for more about \IMAP capabilities. + # + # Related: #capable?, #capability, #clear_cached_capabilities + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap.rb#1037 + def capabilities_cached?; end + + # Sends a {CAPABILITY command [IMAP4rev1 §6.1.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.1] + # and returns an array of capabilities that are supported by the server. + # The result is stored for use by #capable? and #capabilities. + # + # *NOTE:* Most Net::IMAP methods do not _currently_ modify their + # behaviour according to the server's advertised #capabilities. + # + # Net::IMAP automatically stores and discards capability data according to + # the requirements and recommendations in + # {IMAP4rev2 §6.1.1}[https://www.rfc-editor.org/rfc/rfc9051#section-6.1.1], + # {§6.2}[https://www.rfc-editor.org/rfc/rfc9051#section-6.2], and + # {§7.1}[https://www.rfc-editor.org/rfc/rfc9051#section-7.1]. + # Use #capable?, #auth_capable?, or #capabilities to this cache and avoid + # sending the #capability command unnecessarily. + # + # See Net::IMAP@Capabilities for more about \IMAP capabilities. + # + # Related: #capable?, #auth_capable?, #capability, #enable + # + # source://net-imap//lib/net/imap.rb#1075 + def capability; end + + # Returns whether the server supports a given +capability+. When available, + # cached #capabilities are used without sending a new #capability command to + # the server. + # + # *NOTE:* Most Net::IMAP methods do not _currently_ modify their + # behaviour according to the server's advertised #capabilities. + # + # See Net::IMAP@Capabilities for more about \IMAP capabilities. + # + # Related: #auth_capable?, #capabilities, #capability, #enable + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap.rb#972 + def capability?(capability); end + + # Returns whether the server supports a given +capability+. When available, + # cached #capabilities are used without sending a new #capability command to + # the server. + # + # *NOTE:* Most Net::IMAP methods do not _currently_ modify their + # behaviour according to the server's advertised #capabilities. + # + # See Net::IMAP@Capabilities for more about \IMAP capabilities. + # + # Related: #auth_capable?, #capabilities, #capability, #enable + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap.rb#972 + def capable?(capability); end + + # Sends a {CHECK command [IMAP4rev1 §6.4.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.1] + # to request a checkpoint of the currently selected mailbox. This performs + # implementation-specific housekeeping; for instance, reconciling the + # mailbox's in-memory and on-disk state. + # + # Related: #idle, #noop + # + # source://net-imap//lib/net/imap.rb#1847 + def check; end + + # Clears capabilities that have been remembered by the Net::IMAP client. + # This forces a #capability command to be sent the next time a #capabilities + # query method is called. + # + # Net::IMAP automatically discards its cached capabilities when they can + # change. Explicitly calling this _should_ be unnecessary for well-behaved + # servers. + # + # Related: #capable?, #capability, #capabilities_cached? + # + # source://net-imap//lib/net/imap.rb#1050 + def clear_cached_capabilities; end + + # :call-seq: + # clear_responses -> hash + # clear_responses(type) -> array + # + # Clears and returns the unhandled #responses hash or the unhandled + # responses array for a single response +type+. + # + # Clearing responses is synchronized with other threads. The lock is + # released before returning. + # + # Related: #responses, #response_handlers + # + # source://net-imap//lib/net/imap.rb#2520 + def clear_responses(type = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap.rb#925 + def client_thread; end + + # Sends a {CLOSE command [IMAP4rev1 §6.4.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.2] + # to close the currently selected mailbox. The CLOSE command permanently + # removes from the mailbox all messages that have the \\Deleted + # flag set. + # + # Related: #unselect + # + # source://net-imap//lib/net/imap.rb#1857 + def close; 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 + # Range object. The number is a message sequence number. + # + # Related: #uid_copy + # + # ===== Capabilities + # + # If +UIDPLUS+ [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]] is + # supported, the server's response should include a +COPYUID+ response code + # with UIDPlusData. This will report the UIDVALIDITY of the destination + # 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 + def copy(set, mailbox); end + + # Sends a {CREATE command [IMAP4rev1 §6.3.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.3] + # to create a new +mailbox+. + # + # A Net::IMAP::NoResponseError is raised if a mailbox with that name + # cannot be created. + # + # Related: #rename, #delete + # + # source://net-imap//lib/net/imap.rb#1431 + def create(mailbox); end + + # Sends a {DELETE command [IMAP4rev1 §6.3.4]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.4] + # to remove the +mailbox+. + # + # A Net::IMAP::NoResponseError is raised if a mailbox with that name + # cannot be deleted, either because it does not exist or because the + # client does not have permission to delete it. + # + # Related: #create, #rename + # + # source://net-imap//lib/net/imap.rb#1443 + def delete(mailbox); end + + # Disconnects from the server. + # + # Related: #logout, #logout! + # + # source://net-imap//lib/net/imap.rb#933 + def disconnect; end + + # Returns true if disconnected from the server. + # + # Related: #logout, #disconnect + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap.rb#958 + def disconnected?; end + + # Sends an {ENABLE command [RFC5161 §3.2]}[https://www.rfc-editor.org/rfc/rfc5161#section-3.1] + # {[IMAP4rev2 §6.3.1]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.3.1] + # to enable the specified server +capabilities+. Each capability may be an + # array, string, or symbol. Returns a list of the capabilities that were + # enabled. + # + # The +ENABLE+ command is only valid in the _authenticated_ state, before + # any mailbox is selected. + # + # Related: #capable?, #capabilities, #capability + # + # ===== Capabilities + # + # The server's capabilities must include + # +ENABLE+ [RFC5161[https://tools.ietf.org/html/rfc5161]] + # or +IMAP4REV2+ [RFC9051[https://tools.ietf.org/html/rfc9051]]. + # + # Additionally, the server capabilities must include a capability matching + # each enabled extension (usually the same name as the enabled extension). + # The following capabilities may be enabled: + # + # [+CONDSTORE+ {[RFC7162]}[https://www.rfc-editor.org/rfc/rfc7162.html]] + # + # Updates various commands to return +CONDSTORE+ extension responses. It + # is not necessary to explicitly enable +CONDSTORE+—using any of the + # command parameters defined by the extension will implicitly enable it. + # See {[RFC7162 §3.1]}[https://www.rfc-editor.org/rfc/rfc7162.html#section-3.1]. + # + # [+:utf8+ --- an alias for "UTF8=ACCEPT"] + # + # In a future release, enable(:utf8) will enable either + # "UTF8=ACCEPT" or "IMAP4rev2", depending on server + # capabilities. + # + # ["UTF8=ACCEPT" [RFC6855[https://tools.ietf.org/html/rfc6855]]] + # + # The server's capabilities must include UTF8=ACCEPT _or_ + # UTF8=ONLY. + # + # This allows the server to send strings encoded as UTF-8 which might + # otherwise need to use a 7-bit encoding, such as {modified + # UTF-7}[::decode_utf7] for mailbox names, or RFC2047 encoded-words for + # message headers. + # + # *Note:* A future update may set string encodings slightly + # differently, e.g: "US-ASCII" when UTF-8 is not enabled, and "UTF-8" + # when it is. Currently, the encoding of strings sent as "quoted" or + # "text" will _always_ be "UTF-8", even when only ASCII characters are + # used (e.g. "Subject: Agenda") And currently, string "literals" sent + # by the server will always have an "ASCII-8BIT" (binary) + # encoding, even if they generally contain UTF-8 data, if they are + # text at all. + # + # ["UTF8=ONLY" [RFC6855[https://tools.ietf.org/html/rfc6855]]] + # + # A server that reports the UTF8=ONLY capability _requires_ that + # the client enable("UTF8=ACCEPT") before any mailboxes may be + # selected. For convenience, enable("UTF8=ONLY") is aliased to + # enable("UTF8=ACCEPT"). + # + # ===== Unsupported capabilities + # + # *Note:* Some extensions that use ENABLE permit the server to send syntax + # that Net::IMAP cannot parse, which may raise an exception and disconnect. + # Some extensions may work, but the support may be incomplete, untested, or + # experimental. + # + # Until a capability is documented here as supported, enabling it may result + # in undocumented behavior and a future release may update with incompatible + # behavior without warning or deprecation. + # + # Caution is advised. + # + # source://net-imap//lib/net/imap.rb#2373 + def enable(*capabilities); end + + # Sends a {EXAMINE command [IMAP4rev1 §6.3.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.2] + # to select a +mailbox+ so that messages in the +mailbox+ can be accessed. + # Behaves the same as #select, except that the selected +mailbox+ is + # identified as read-only. + # + # A Net::IMAP::NoResponseError is raised if the mailbox does not + # exist or is for some reason non-examinable. + # + # Related: #select + # + # source://net-imap//lib/net/imap.rb#1415 + 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] + # Sends a EXPUNGE command to permanently remove from the currently + # selected mailbox all messages that have the \Deleted flag set. + # + # Related: #uid_expunge + # + # source://net-imap//lib/net/imap.rb#1882 + def expunge; end + + # :call-seq: + # fetch(set, attr, changedsince: nil) -> array of FetchData + # + # Sends a {FETCH command [IMAP4rev1 §6.4.5]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.5] + # to retrieve data associated with a message in the mailbox. + # + # The +set+ parameter is a number or a range between two numbers, + # or an array of those. The number is a message sequence number, + # where -1 represents a '*' for use in range notation like 100..-1 + # being interpreted as '100:*'. Beware that the +exclude_end?+ + # property of a Range object is ignored, and the contents of a + # range are independent of the order of the range endpoints as per + # the protocol specification, so 1...5, 5..1 and 5...1 are all + # equivalent to 1..5. + # + # +attr+ is a list of attributes to fetch; see the documentation + # for FetchData for a list of valid attributes. + # + # +changedsince+ is an optional integer mod-sequence. It limits results to + # messages with a mod-sequence greater than +changedsince+. + # + # The return value is an array of FetchData. + # + # Related: #uid_search, FetchData + # + # ===== For example: + # + # p imap.fetch(6..8, "UID") + # #=> [#98}>, \\ + # #99}>, \\ + # #100}>] + # p imap.fetch(6, "BODY[HEADER.FIELDS (SUBJECT)]") + # #=> [#"Subject: test\r\n\r\n"}>] + # data = imap.uid_fetch(98, ["RFC822.SIZE", "INTERNALDATE"])[0] + # p data.seqno + # #=> 6 + # p data.attr["RFC822.SIZE"] + # #=> 611 + # p data.attr["INTERNALDATE"] + # #=> "12-Oct-2000 22:40:59 +0900" + # p data.attr["UID"] + # #=> 98 + # + # ===== Capabilities + # + # Many extensions define new message +attr+ names. See FetchData for a list + # of supported extension fields. + # + # The server's capabilities must include +CONDSTORE+ + # {[RFC7162]}[https://tools.ietf.org/html/rfc7162] in order to use the + # +changedsince+ argument. Using +changedsince+ implicitly enables the + # +CONDSTORE+ extension. + # + # source://net-imap//lib/net/imap.rb#2057 + 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] + # along with a specified +mailbox+. If this mailbox exists, an array + # containing objects of MailboxACLItem will be returned. + # + # Related: #setacl, MailboxACLItem + # + # ===== Capabilities + # + # The server's capabilities must include +ACL+ + # [RFC4314[https://tools.ietf.org/html/rfc4314]]. + # + # source://net-imap//lib/net/imap.rb#1711 + def getacl(mailbox); end + + # Sends a {GETQUOTA command [RFC2087 §4.2]}[https://www.rfc-editor.org/rfc/rfc2087#section-4.2] + # along with specified +mailbox+. If this mailbox exists, then an array + # containing a MailboxQuota object is returned. This command is generally + # only available to server admin. + # + # Related: #getquotaroot, #setquota, MailboxQuota + # + # ===== Capabilities + # + # The server's capabilities must include +QUOTA+ + # [RFC2087[https://tools.ietf.org/html/rfc2087]]. + # + # source://net-imap//lib/net/imap.rb#1655 + def getquota(mailbox); end + + # Sends a {GETQUOTAROOT command [RFC2087 §4.3]}[https://www.rfc-editor.org/rfc/rfc2087#section-4.3] + # along with the specified +mailbox+. This command is generally available + # to both admin and user. If this mailbox exists, it returns an array + # containing objects of type MailboxQuotaRoot and MailboxQuota. + # + # Related: #getquota, #setquota, MailboxQuotaRoot, MailboxQuota + # + # ===== Capabilities + # + # The server's capabilities must include +QUOTA+ + # [RFC2087[https://tools.ietf.org/html/rfc2087]]. + # + # source://net-imap//lib/net/imap.rb#1634 + def getquotaroot(mailbox); end + + # Returns the initial greeting the server, an UntaggedResponse. + # + # source://net-imap//lib/net/imap.rb#765 + def greeting; end + + # The hostname this client connected to + # + # source://net-imap//lib/net/imap.rb#776 + def host; end + + # Sends an {ID command [RFC2971 §3.1]}[https://www.rfc-editor.org/rfc/rfc2971#section-3.1] + # and returns a hash of the server's response, or nil if the server does not + # identify itself. + # + # Note that the user should first check if the server supports the ID + # capability. For example: + # + # if capable?(:ID) + # id = imap.id( + # name: "my IMAP client (ruby)", + # version: MyIMAP::VERSION, + # "support-url": "mailto:bugs@example.com", + # os: RbConfig::CONFIG["host_os"], + # ) + # end + # + # See [ID[https://tools.ietf.org/html/rfc2971]] for field definitions. + # + # ===== Capabilities + # + # The server's capabilities must include +ID+ + # [RFC2971[https://tools.ietf.org/html/rfc2971]]. + # + # source://net-imap//lib/net/imap.rb#1104 + def id(client_id = T.unsafe(nil)); end + + # Sends an {IDLE command [RFC2177 §3]}[https://www.rfc-editor.org/rfc/rfc6851#section-3] + # {[IMAP4rev2 §6.3.13]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.3.13] + # that waits for notifications of new or expunged messages. Yields + # responses from the server during the IDLE. + # + # Use #idle_done to leave IDLE. + # + # If +timeout+ is given, this method returns after +timeout+ seconds passed. + # +timeout+ can be used for keep-alive. For example, the following code + # checks the connection for each 60 seconds. + # + # loop do + # imap.idle(60) do |res| + # ... + # end + # end + # + # Related: #idle_done, #noop, #check + # + # ===== Capabilities + # + # The server's capabilities must include +IDLE+ + # [RFC2177[https://tools.ietf.org/html/rfc2177]]. + # + # @raise [LocalJumpError] + # + # source://net-imap//lib/net/imap.rb#2411 + def idle(timeout = T.unsafe(nil), &response_handler); end + + # Leaves IDLE. + # + # Related: #idle + # + # source://net-imap//lib/net/imap.rb#2443 + def idle_done; end + + # Seconds to wait until an IDLE response is received. + # + # source://net-imap//lib/net/imap.rb#773 + def idle_response_timeout; end + + # Sends a {LIST command [IMAP4rev1 §6.3.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.8] + # and returns a subset of names from the complete set of all names available + # to the client. +refname+ provides a context (for instance, a base + # directory in a directory-based mailbox hierarchy). +mailbox+ specifies a + # mailbox or (via wildcards) mailboxes under that context. Two wildcards + # may be used in +mailbox+: "*", which matches all characters + # *including* the hierarchy delimiter (for instance, "/" on a UNIX-hosted + # directory-based mailbox hierarchy); and "%", which matches all + # characters *except* the hierarchy delimiter. + # + # If +refname+ is empty, +mailbox+ is used directly to determine + # which mailboxes to match. If +mailbox+ is empty, the root + # name of +refname+ and the hierarchy delimiter are returned. + # + # The return value is an array of MailboxList. + # + # Related: #lsub, MailboxList + # + # ===== For example: + # + # imap.create("foo/bar") + # imap.create("foo/baz") + # p imap.list("", "foo/%") + # #=> [#, \\ + # #, \\ + # #] + # + # -- + # TODO: support LIST-EXTENDED extension [RFC5258]. Needed for IMAP4rev2. + # ++ + # + # source://net-imap//lib/net/imap.rb#1515 + def list(refname, mailbox); end + + # Sends a {LOGIN command [IMAP4rev1 §6.2.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.3] + # to identify the client and carries the plaintext +password+ authenticating + # this +user+. If successful, the connection enters the "_authenticated_" + # state. + # + # Using #authenticate {should be + # preferred}[https://www.rfc-editor.org/rfc/rfc9051.html#name-login-command] + # over #login. The LOGIN command is not the same as #authenticate with the + # "LOGIN" +mechanism+. + # + # A Net::IMAP::NoResponseError is raised if authentication fails. + # + # Related: #authenticate, #starttls + # + # ===== Capabilities + # + # An IMAP client MUST NOT call #login when the server advertises the + # +LOGINDISABLED+ capability. + # + # if imap.capability? "LOGINDISABLED" + # raise "Remote server has disabled the login command" + # else + # imap.login username, password + # end + # + # Server capabilities may change after #starttls, #login, and #authenticate. + # Cached capabilities _must_ be invalidated after this method completes. + # The TaggedResponse to #login may include updated capabilities in its + # ResponseCode. + # + # source://net-imap//lib/net/imap.rb#1359 + def login(user, password); end + + # Sends a {LOGOUT command [IMAP4rev1 §6.1.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.3] + # to inform the command to inform the server that the client is done with + # the connection. + # + # Related: #disconnect, #logout! + # + # source://net-imap//lib/net/imap.rb#1132 + def logout; end + + # Calls #logout then, after receiving the TaggedResponse for the +LOGOUT+, + # calls #disconnect. Returns the TaggedResponse from +LOGOUT+. Returns + # +nil+ when the client is already disconnected, in contrast to #logout + # which raises an exception. + # + # If #logout raises a StandardError, a warning will be printed but the + # exception will not be re-raised. + # + # This is useful in situations where the connection must be dropped, for + # example for security or after tests. If logout errors need to be handled, + # use #logout and #disconnect instead. + # + # Related: #logout, #disconnect + # + # source://net-imap//lib/net/imap.rb#1149 + def logout!; end + + # Sends a {LSUB command [IMAP4rev1 §6.3.9]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.9] + # and returns a subset of names from the set of names that the user has + # declared as being "active" or "subscribed." +refname+ and +mailbox+ are + # interpreted as for #list. + # + # The return value is an array of MailboxList objects. + # + # Related: #subscribe, #unsubscribe, #list, MailboxList + # + # source://net-imap//lib/net/imap.rb#1726 + def lsub(refname, mailbox); end + + # Sends a {MOVE command [RFC6851 §3.1]}[https://www.rfc-editor.org/rfc/rfc6851#section-3.1] + # {[IMAP4rev2 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.4.8] + # to move the specified message(s) to the end of the specified destination + # +mailbox+. The +set+ parameter is a number, an array of numbers, or a + # Range object. The number is a message sequence number. + # + # Related: #uid_move + # + # ===== Capabilities + # + # The server's capabilities must include +MOVE+ + # [RFC6851[https://tools.ietf.org/html/rfc6851]]. + # + # If +UIDPLUS+ [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]] is + # supported, the server's response should include a +COPYUID+ response code + # with UIDPlusData. This will report the UIDVALIDITY of the destination + # 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 + def move(set, mailbox); end + + # Sends a {NAMESPACE command [RFC2342 §5]}[https://www.rfc-editor.org/rfc/rfc2342#section-5] + # and returns the namespaces that are available. The NAMESPACE command + # allows a client to discover the prefixes of namespaces used by a server + # for personal mailboxes, other users' mailboxes, and shared mailboxes. + # + # The return value is a Namespaces object which has +personal+, +other+, and + # +shared+ fields, each an array of Namespace objects. These arrays will be + # empty when the server responds with +nil+. + # + # Many \IMAP servers are configured with the default personal namespaces as + # ("" "/"): no prefix and the "+/+" hierarchy delimiter. In that + # common case, the naive client may not have any trouble naming mailboxes. + # But many servers are configured with the default personal namespace as + # e.g. ("INBOX." "."), placing all personal folders under INBOX, + # with "+.+" as the hierarchy delimiter. If the client does not check for + # this, but naively assumes it can use the same folder names for all + # servers, then folder creation (and listing, moving, etc) can lead to + # errors. + # + # From RFC2342[https://tools.ietf.org/html/rfc2342]: + # >>> + # Although typically a server will support only a single Personal + # Namespace, and a single Other User's Namespace, circumstances exist + # where there MAY be multiples of these, and a client MUST be prepared + # for them. If a client is configured such that it is required to create + # a certain mailbox, there can be circumstances where it is unclear which + # Personal Namespaces it should create the mailbox in. In these + # situations a client SHOULD let the user select which namespaces to + # create the mailbox in. + # + # Related: #list, Namespaces, Namespace + # + # ===== For example: + # + # if capable?("NAMESPACE") + # namespaces = imap.namespace + # if namespace = namespaces.personal.first + # prefix = namespace.prefix # e.g. "" or "INBOX." + # delim = namespace.delim # e.g. "/" or "." + # # personal folders should use the prefix and delimiter + # imap.create(prefix + "foo") + # imap.create(prefix + "bar") + # imap.create(prefix + %w[path to my folder].join(delim)) + # end + # end + # + # ===== Capabilities + # + # The server's capabilities must include +NAMESPACE+ + # [RFC2342[https://tools.ietf.org/html/rfc2342]]. + # + # source://net-imap//lib/net/imap.rb#1572 + def namespace; end + + # Sends a {NOOP command [IMAP4rev1 §6.1.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.2] + # to the server. + # + # This allows the server to send unsolicited untagged EXPUNGE #responses, + # but does not execute any client request. \IMAP servers are permitted to + # send unsolicited untagged responses at any time, except for +EXPUNGE+: + # + # * +EXPUNGE+ can only be sent while a command is in progress. + # * +EXPUNGE+ must _not_ be sent during #fetch, #store, or #search. + # * +EXPUNGE+ may be sent during #uid_fetch, #uid_store, or #uid_search. + # + # Related: #idle, #check + # + # source://net-imap//lib/net/imap.rb#1123 + 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 + def open_timeout; end + + # The port this client connected to + # + # source://net-imap//lib/net/imap.rb#779 + def port; end + + # Removes the response handler. + # + # Related: #add_response_handler, #response_handlers + # + # source://net-imap//lib/net/imap.rb#2573 + 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] + # to change the name of the +mailbox+ to +newname+. + # + # A Net::IMAP::NoResponseError is raised if a mailbox with the + # name +mailbox+ cannot be renamed to +newname+ for whatever + # reason; for instance, because +mailbox+ does not exist, or + # because there is already a mailbox with the name +newname+. + # + # Related: #create, #delete + # + # source://net-imap//lib/net/imap.rb#1456 + def rename(mailbox, newname); end + + # Returns all response handlers, including those that are added internally + # by commands. Each response handler will be called with every new + # UntaggedResponse, TaggedResponse, and ContinuationRequest. + # + # Response handlers are called with a mutex inside the receiver thread. New + # responses cannot be processed and commands from other threads must wait + # until all response_handlers return. An exception will shut-down the + # receiver thread and close the connection. + # + # For thread-safety, the returned array is a frozen copy of the internal + # array. + # + # Related: #add_response_handler, #remove_response_handler + # + # source://net-imap//lib/net/imap.rb#2546 + def response_handlers; end + + # :call-seq: + # responses {|hash| ...} -> block result + # responses(type) {|array| ...} -> block result + # + # Yields unhandled responses and returns the result of the block. + # + # Unhandled responses are stored in a hash, with arrays of + # non-+nil+ UntaggedResponse#data keyed by UntaggedResponse#name + # and ResponseCode#data keyed by ResponseCode#name. Call without +type+ to + # yield the entire responses hash. Call with +type+ to yield only the array + # of responses for that type. + # + # For example: + # + # imap.select("inbox") + # p imap.responses("EXISTS", &:last) + # #=> 2 + # p imap.responses("UIDVALIDITY", &:last) + # #=> 968263756 + # + # >>> + # *Note:* Access to the responses hash is synchronized for thread-safety. + # The receiver thread and response_handlers cannot process new responses + # until the block completes. Accessing either the response hash or its + # response type arrays outside of the block is unsafe. + # + # Calling without a block is unsafe and deprecated. Future releases will + # raise ArgumentError unless a block is given. + # + # Previously unhandled responses are automatically cleared before entering a + # mailbox with #select or #examine. Long-lived connections can receive many + # unhandled server responses, which must be pruned or they will continually + # consume more memory. Update or clear the responses hash or arrays inside + # the block, or use #clear_responses. + # + # Only non-+nil+ data is stored. Many important response codes have no data + # of their own, but are used as "tags" on the ResponseText object they are + # attached to. ResponseText will be accessible by its response types: + # "+OK+", "+NO+", "+BAD+", "+BYE+", or "+PREAUTH+". + # + # TaggedResponse#data is not saved to #responses, nor is any + # ResponseCode#data on tagged responses. Although some command methods do + # return the TaggedResponse directly, #add_response_handler must be used to + # handle all response codes. + # + # Related: #clear_responses, #response_handlers, #greeting + # + # source://net-imap//lib/net/imap.rb#2498 + 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] + # to search the mailbox for messages that match the given searching + # criteria, and returns message sequence numbers. +keys+ can either be a + # string holding the entire search string, or a single-dimension array of + # search keywords and arguments. + # + # Returns a SearchResult object. SearchResult inherits from Array (for + # backward compatibility) but adds SearchResult#modseq when the +CONDSTORE+ + # capability has been enabled. + # + # Related: #uid_search + # + # ===== Search criteria + # + # For a full list of search criteria, + # see [{IMAP4rev1 §6.4.4}[https://www.rfc-editor.org/rfc/rfc3501.html#section-6.4.4]], + # or [{IMAP4rev2 §6.4.4}[https://www.rfc-editor.org/rfc/rfc9051.html#section-6.4.4]], + # in addition to documentation for + # any [CAPABILITIES[https://www.iana.org/assignments/imap-capabilities/imap-capabilities.xhtml]] + # reported by #capabilities which may define additional search filters, e.g: + # +CONDSTORE+, +WITHIN+, +FILTERS+, SEARCH=FUZZY, +OBJECTID+, or + # +SAVEDATE+. The following are some common search criteria: + # + # :: a set of message sequence numbers. "," indicates + # an interval, "+:+" indicates a range. For instance, + # "2,10:12,15" means "2,10,11,12,15". + # + # BEFORE :: messages with an internal date strictly before + # . The date argument has a format similar + # to 8-Aug-2002, and can be formatted using + # Net::IMAP.format_date. + # + # BODY :: messages that contain within their body. + # + # CC :: messages containing in their CC field. + # + # FROM :: messages that contain in their FROM field. + # + # NEW:: messages with the \Recent, but not the \Seen, flag set. + # + # NOT :: negate the following search key. + # + # OR :: "or" two search keys together. + # + # ON :: messages with an internal date exactly equal to , + # which has a format similar to 8-Aug-2002. + # + # SINCE :: messages with an internal date on or after . + # + # SUBJECT :: messages with in their subject. + # + # TO :: messages with in their TO field. + # + # ===== For example: + # + # p imap.search(["SUBJECT", "hello", "NOT", "NEW"]) + # #=> [1, 6, 7, 8] + # + # ===== Capabilities + # + # If [CONDSTORE[https://www.rfc-editor.org/rfc/rfc7162.html]] is supported + # and enabled for the selected mailbox, a non-empty SearchResult will + # include a +MODSEQ+ value. + # imap.select("mbox", condstore: true) + # result = imap.search(["SUBJECT", "hi there", "not", "new") + # #=> Net::IMAP::SearchResult[1, 6, 7, 8, modseq: 5594] + # result.modseq # => 5594 + # + # source://net-imap//lib/net/imap.rb#1988 + 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] + # to select a +mailbox+ so that messages in the +mailbox+ can be accessed. + # + # After you have selected a mailbox, you may retrieve the number of items in + # that mailbox from imap.responses("EXISTS", &:last), and the + # number of recent messages from imap.responses("RECENT", &:last). + # Note that these values can change if new messages arrive during a session + # or when existing messages are expunged; see #add_response_handler for a + # way to detect these events. + # + # When the +condstore+ keyword argument is true, the server is told to + # enable the extension. If +mailbox+ supports persistence of mod-sequences, + # the +HIGHESTMODSEQ+ ResponseCode will be sent as an untagged response to + # #select and all `FETCH` responses will include FetchData#modseq. + # Otherwise, the +NOMODSEQ+ ResponseCode will be sent. + # + # A Net::IMAP::NoResponseError is raised if the mailbox does not + # exist or is for some reason non-selectable. + # + # Related: #examine + # + # ===== Capabilities + # + # If [UIDPLUS[https://www.rfc-editor.org/rfc/rfc4315.html]] is supported, + # the server may return an untagged "NO" response with a "UIDNOTSTICKY" + # response code indicating that the mailstore does not support persistent + # UIDs: + # imap.responses("NO", &:last)&.code&.name == "UIDNOTSTICKY" + # + # If [CONDSTORE[https://www.rfc-editor.org/rfc/rfc7162.html]] is supported, + # the +condstore+ keyword parameter may be used. + # imap.select("mbox", condstore: true) + # modseq = imap.responses("HIGHESTMODSEQ", &:last) + # + # source://net-imap//lib/net/imap.rb#1397 + 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] + # along with +mailbox+, +user+ and the +rights+ that user is to have on that + # mailbox. If +rights+ is nil, then that user will be stripped of any + # rights to that mailbox. + # + # Related: #getacl + # + # ===== Capabilities + # + # The server's capabilities must include +ACL+ + # [RFC4314[https://tools.ietf.org/html/rfc4314]]. + # + # source://net-imap//lib/net/imap.rb#1693 + def setacl(mailbox, user, rights); end + + # Sends a {SETQUOTA command [RFC2087 §4.1]}[https://www.rfc-editor.org/rfc/rfc2087#section-4.1] + # along with the specified +mailbox+ and +quota+. If +quota+ is nil, then + # +quota+ will be unset for that mailbox. Typically one needs to be logged + # in as a server admin for this to work. + # + # Related: #getquota, #getquotaroot + # + # ===== Capabilities + # + # The server's capabilities must include +QUOTA+ + # [RFC2087[https://tools.ietf.org/html/rfc2087]]. + # + # source://net-imap//lib/net/imap.rb#1673 + def setquota(mailbox, quota); end + + # Sends a {SORT command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] + # to search a mailbox for messages that match +search_keys+ and return an + # array of message sequence numbers, sorted by +sort_keys+. +search_keys+ + # are interpreted the same as for #search. + # + # -- + # TODO: describe +sort_keys+ + # ++ + # + # Related: #uid_sort, #search, #uid_search, #thread, #uid_thread + # + # ===== For example: + # + # p imap.sort(["FROM"], ["ALL"], "US-ASCII") + # #=> [1, 2, 3, 5, 6, 7, 8, 4, 9] + # p imap.sort(["DATE"], ["SUBJECT", "hello"], "US-ASCII") + # #=> [6, 7, 8, 1] + # + # ===== Capabilities + # + # The server's capabilities must include +SORT+ + # [RFC5256[https://tools.ietf.org/html/rfc5256]]. + # + # source://net-imap//lib/net/imap.rb#2242 + def sort(sort_keys, search_keys, charset); end + + # Returns the + # {SSLContext}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html] + # used by the SSLSocket when TLS is attempted, even when the TLS handshake + # is unsuccessful. The context object will be frozen. + # + # Returns +nil+ for a plaintext connection. + # + # source://net-imap//lib/net/imap.rb#787 + def ssl_ctx; end + + # Returns the parameters that were sent to #ssl_ctx + # {set_params}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-set_params] + # when the connection tries to use TLS (even when unsuccessful). + # + # Returns +false+ for a plaintext connection. + # + # source://net-imap//lib/net/imap.rb#794 + def ssl_ctx_params; end + + # Sends a {STARTTLS command [IMAP4rev1 §6.2.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.1] + # to start a TLS session. + # + # Any +options+ are forwarded directly 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]. + # + # See DeprecatedClientOptions#starttls for deprecated arguments. + # + # This method returns after TLS negotiation and hostname verification are + # both successful. Any error indicates that the connection has not been + # secured. + # + # *Note:* + # >>> + # Any #response_handlers added before STARTTLS should be aware that the + # TaggedResponse to STARTTLS is sent clear-text, _before_ TLS negotiation. + # TLS starts immediately _after_ that response. Any response code sent + # with the response (e.g. CAPABILITY) is insecure and cannot be trusted. + # + # Related: Net::IMAP.new, #login, #authenticate + # + # ===== Capability + # Clients should not call #starttls unless the server advertises the + # +STARTTLS+ capability. + # + # Server capabilities may change after #starttls, #login, and #authenticate. + # Cached #capabilities will be cleared when this method completes. + # + # source://net-imap//lib/net/imap/deprecated_client_options.rb#104 + def starttls(*deprecated, **options); end + + # Sends a {STATUS command [IMAP4rev1 §6.3.10]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.10] + # and returns the status of the indicated +mailbox+. +attr+ is a list of one + # or more attributes whose statuses are to be requested. + # + # The return value is a hash of attributes. Most status attributes return + # integer values, but some return other value types (documented below). + # + # A Net::IMAP::NoResponseError is raised if status values + # for +mailbox+ cannot be returned; for instance, because it + # does not exist. + # + # ===== Supported attributes + # + # +MESSAGES+:: The number of messages in the mailbox. + # + # +UIDNEXT+:: The next unique identifier value of the mailbox. + # + # +UIDVALIDITY+:: The unique identifier validity value of the mailbox. + # + # +UNSEEN+:: The number of messages without the \Seen flag. + # + # +DELETED+:: The number of messages with the \Deleted flag. + # + # +SIZE+:: + # The approximate size of the mailbox---must be greater than or equal to + # the sum of all messages' +RFC822.SIZE+ fetch item values. + # + # +HIGHESTMODSEQ+:: + # The highest mod-sequence value of all messages in the mailbox. See + # +CONDSTORE+ {[RFC7162]}[https://www.rfc-editor.org/rfc/rfc7162.html]. + # + # +MAILBOXID+:: + # A server-allocated unique _string_ identifier for the mailbox. See + # +OBJECTID+ {[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html]. + # + # +RECENT+:: + # The number of messages with the \Recent flag. + # _NOTE:_ +RECENT+ was removed from IMAP4rev2. + # + # Unsupported attributes may be requested. The attribute value will be + # either an Integer or an ExtensionData object. + # + # ===== For example: + # + # p imap.status("inbox", ["MESSAGES", "RECENT"]) + # #=> {"RECENT"=>0, "MESSAGES"=>44} + # + # ===== Capabilities + # + # +SIZE+ requires the server's capabilities to include either +IMAP4rev2+ or + # STATUS=SIZE + # {[RFC8483]}[https://www.rfc-editor.org/rfc/rfc8483.html]. + # + # +DELETED+ requires the server's capabilities to include +IMAP4rev2+. + # + # +HIGHESTMODSEQ+ requires the server's capabilities to include +CONDSTORE+ + # {[RFC7162]}[https://www.rfc-editor.org/rfc/rfc7162.html]. + # + # +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 + def status(mailbox, attr); end + + # :call-seq: + # store(set, attr, value, unchangedsince: nil) -> array of FetchData + # + # Sends a {STORE command [IMAP4rev1 §6.4.6]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.6] + # to alter data associated with messages in the mailbox, in particular their + # flags. + # + # +set+ is a number, an array of numbers, or a Range object. Each number is + # a message sequence number. + # + # +attr+ is the name of a data item to store. The semantics of +value+ + # varies based on +attr+: + # * When +attr+ is "FLAGS", the flags in +value+ replace the + # message's flag list. + # * When +attr+ is "+FLAGS", the flags in +value+ are added to + # the flags for the message. + # * When +attr+ is "-FLAGS", the flags in +value+ are removed + # from the message. + # + # +unchangedsince+ is an optional integer mod-sequence. It prohibits any + # changes to messages with +mod-sequence+ greater than the specified + # +unchangedsince+ value. A SequenceSet of any messages that fail this + # check will be returned in a +MODIFIED+ ResponseCode. + # + # The return value is an array of FetchData. + # + # Related: #uid_store + # + # ===== For example: + # + # p imap.store(6..8, "+FLAGS", [:Deleted]) + # #=> [#[:Seen, :Deleted]}>, + # #[:Seen, :Deleted]}>, + # #[:Seen, :Deleted]}>] + # + # ===== Capabilities + # + # Extensions may define new data items to be used with #store. + # + # The server's capabilities must include +CONDSTORE+ + # {[RFC7162]}[https://tools.ietf.org/html/rfc7162] in order to use the + # +unchangedsince+ argument. Using +unchangedsince+ implicitly enables the + # +CONDSTORE+ extension. + # + # source://net-imap//lib/net/imap.rb#2126 + 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] + # to add the specified +mailbox+ name to the server's set of "active" or + # "subscribed" mailboxes as returned by #lsub. + # + # A Net::IMAP::NoResponseError is raised if +mailbox+ cannot be + # subscribed to; for instance, because it does not exist. + # + # Related: #unsubscribe, #lsub, #list + # + # source://net-imap//lib/net/imap.rb#1468 + def subscribe(mailbox); end + + # Sends a {THREAD command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] + # to search a mailbox and return message sequence numbers in threaded + # format, as a ThreadMember tree. +search_keys+ are interpreted the same as + # for #search. + # + # The supported algorithms are: + # + # ORDEREDSUBJECT:: split into single-level threads according to subject, + # ordered by date. + # REFERENCES:: split into threads by parent/child relationships determined + # by which message is a reply to which. + # + # Unlike #search, +charset+ is a required argument. US-ASCII + # and UTF-8 are sample values. + # + # Related: #uid_thread, #search, #uid_search, #sort, #uid_sort + # + # ===== Capabilities + # + # The server's capabilities must include +THREAD+ + # [RFC5256[https://tools.ietf.org/html/rfc5256]]. + # + # source://net-imap//lib/net/imap.rb#2282 + def thread(algorithm, search_keys, charset); end + + # Returns true after the TLS negotiation has completed and the remote + # hostname has been verified. Returns false when TLS has been established + # but peer verification was disabled. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap.rb#923 + def tls_verified?; end + + # Sends a {UID COPY command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8] + # to copy the specified message(s) to the end of the specified destination + # +mailbox+. + # + # Similar to #copy, but +set+ contains unique identifiers. + # + # ===== Capabilities + # + # +UIDPLUS+ affects #uid_copy the same way it affects #copy. + # + # source://net-imap//lib/net/imap.rb#2175 + def uid_copy(set, mailbox); end + + # Sends a {UID EXPUNGE command [RFC4315 §2.1]}[https://www.rfc-editor.org/rfc/rfc4315#section-2.1] + # {[IMAP4rev2 §6.4.9]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.4.9] + # to permanently remove all messages that have both the \\Deleted + # flag set and a UID that is included in +uid_set+. + # + # By using #uid_expunge instead of #expunge when resynchronizing with + # the server, the client can ensure that it does not inadvertantly + # remove any messages that have been marked as \\Deleted by other + # clients between the time that the client was last connected and + # the time the client resynchronizes. + # + # *Note:* + # >>> + # Although the command takes a set of UIDs for its argument, the + # server still returns regular EXPUNGE responses, which contain + # a sequence number. These will be deleted from + # #responses and this method returns them as an array of + # sequence number integers. + # + # Related: #expunge + # + # ===== Capabilities + # + # The server's capabilities must include +UIDPLUS+ + # [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]]. + # + # source://net-imap//lib/net/imap.rb#1914 + def uid_expunge(uid_set); end + + # :call-seq: + # uid_fetch(set, attr, changedsince: nil) -> array of FetchData + # + # Sends a {UID FETCH command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8] + # to retrieve data associated with a message in the mailbox. + # + # Similar to #fetch, but the +set+ parameter contains unique identifiers + # instead of message sequence numbers. + # + # >>> + # *Note:* Servers _MUST_ implicitly include the +UID+ message data item as + # part of any +FETCH+ response caused by a +UID+ command, regardless of + # whether a +UID+ was specified as a message data item to the +FETCH+. + # + # Related: #fetch, FetchData + # + # ===== Capabilities + # Same as #fetch. + # + # source://net-imap//lib/net/imap.rb#2079 + 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] + # {[IMAP4rev2 §6.4.9]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.4.9] + # to move the specified message(s) to the end of the specified destination + # +mailbox+. + # + # Similar to #move, but +set+ contains unique identifiers. + # + # Related: #move + # + # ===== Capabilities + # + # Same as #move: The server's capabilities must include +MOVE+ + # [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 + 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] + # to search the mailbox for messages that match the given searching + # criteria, and returns unique identifiers (UIDs). + # + # Returns a SearchResult object. SearchResult inherits from Array (for + # backward compatibility) but adds SearchResult#modseq when the +CONDSTORE+ + # capability has been enabled. + # + # See #search for documentation of search criteria. + # + # source://net-imap//lib/net/imap.rb#2001 + 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] + # to search a mailbox for messages that match +search_keys+ and return an + # array of unique identifiers, sorted by +sort_keys+. +search_keys+ are + # interpreted the same as for #search. + # + # Related: #sort, #search, #uid_search, #thread, #uid_thread + # + # ===== Capabilities + # + # The server's capabilities must include +SORT+ + # [RFC5256[https://tools.ietf.org/html/rfc5256]]. + # + # source://net-imap//lib/net/imap.rb#2257 + def uid_sort(sort_keys, search_keys, charset); end + + # :call-seq: + # uid_store(set, attr, value, unchangedsince: nil) -> array of FetchData + # + # Sends a {UID STORE command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8] + # to alter data associated with messages in the mailbox, in particular their + # flags. + # + # Similar to #store, but +set+ contains unique identifiers instead of + # message sequence numbers. + # + # Related: #store + # + # ===== Capabilities + # Same as #store. + # + # source://net-imap//lib/net/imap.rb#2144 + 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] + # Similar to #thread, but returns unique identifiers instead of + # message sequence numbers. + # + # Related: #thread, #search, #uid_search, #sort, #uid_sort + # + # ===== Capabilities + # + # The server's capabilities must include +THREAD+ + # [RFC5256[https://tools.ietf.org/html/rfc5256]]. + # + # source://net-imap//lib/net/imap.rb#2296 + def uid_thread(algorithm, search_keys, charset); end + + # Sends an {UNSELECT command [RFC3691 §2]}[https://www.rfc-editor.org/rfc/rfc3691#section-3] + # {[IMAP4rev2 §6.4.2]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.4.2] + # to free the session resources for a mailbox and return to the + # "_authenticated_" state. This is the same as #close, except that + # \\Deleted messages are not removed from the mailbox. + # + # Related: #close + # + # ===== Capabilities + # + # The server's capabilities must include +UNSELECT+ + # [RFC3691[https://tools.ietf.org/html/rfc3691]]. + # + # source://net-imap//lib/net/imap.rb#1873 + def unselect; end + + # Sends an {UNSUBSCRIBE command [IMAP4rev1 §6.3.7]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.7] + # to remove the specified +mailbox+ name from the server's set of "active" + # or "subscribed" mailboxes. + # + # A Net::IMAP::NoResponseError is raised if +mailbox+ cannot be + # unsubscribed from; for instance, because the client is not currently + # subscribed to it. + # + # Related: #subscribe, #lsub, #list + # + # source://net-imap//lib/net/imap.rb#1481 + def unsubscribe(mailbox); end + + # Sends a XLIST command, and returns a subset of names from + # the complete set of all names available to the client. + # +refname+ provides a context (for instance, a base directory + # in a directory-based mailbox hierarchy). +mailbox+ specifies + # a mailbox or (via wildcards) mailboxes under that context. + # Two wildcards may be used in +mailbox+: '*', which matches + # all characters *including* the hierarchy delimiter (for instance, + # '/' on a UNIX-hosted directory-based mailbox hierarchy); and '%', + # which matches all characters *except* the hierarchy delimiter. + # + # If +refname+ is empty, +mailbox+ is used directly to determine + # which mailboxes to match. If +mailbox+ is empty, the root + # name of +refname+ and the hierarchy delimiter are returned. + # + # The XLIST command is like the LIST command except that the flags + # returned refer to the function of the folder/mailbox, e.g. :Sent + # + # The return value is an array of MailboxList objects. For example: + # + # imap.create("foo/bar") + # imap.create("foo/baz") + # p imap.xlist("", "foo/%") + # #=> [#, \\ + # #, \\ + # #] + # + # Related: #list, MailboxList + # + # ===== Capabilities + # + # The server's capabilities must include +XLIST+, + # a deprecated Gmail extension (replaced by +SPECIAL-USE+). + # -- + # TODO: Net::IMAP doesn't yet have full SPECIAL-USE support. Supporting + # servers MAY return SPECIAL-USE attributes, but are not *required* to + # unless the SPECIAL-USE return option is supplied. + # ++ + # + # source://net-imap//lib/net/imap.rb#1616 + def xlist(refname, mailbox); end + + private + + # source://net-imap//lib/net/imap.rb#2915 + def build_ssl_ctx(ssl); end + + # NOTE: only call this for greeting, login, and authenticate + # + # source://net-imap//lib/net/imap.rb#2754 + def capabilities_from_resp_code(resp); end + + # source://net-imap//lib/net/imap.rb#2876 + def copy_internal(cmd, set, mailbox); end + + # source://net-imap//lib/net/imap.rb#2839 + def fetch_internal(cmd, set, attr, mod = T.unsafe(nil), changedsince: T.unsafe(nil)); end + + # source://net-imap//lib/net/imap.rb#2803 + def generate_tag; end + + # source://net-imap//lib/net/imap.rb#2717 + def get_response; end + + # @raise [Error] + # + # source://net-imap//lib/net/imap.rb#2596 + def get_server_greeting; end + + # source://net-imap//lib/net/imap.rb#2689 + def get_tagged_response(tag, cmd, timeout = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap.rb#2904 + def normalize_searching_criteria(keys); end + + # source://net-imap//lib/net/imap.rb#2808 + def put_string(str); end + + # source://net-imap//lib/net/imap.rb#2622 + def receive_responses; end + + # store name => [..., data] + # + # source://net-imap//lib/net/imap.rb#2741 + def record_untagged_response(resp); end + + # store code.name => [..., code.data] + # + # source://net-imap//lib/net/imap.rb#2747 + def record_untagged_response_code(resp); end + + # source://net-imap//lib/net/imap.rb#2944 + def sasl_adapter; end + + # source://net-imap//lib/net/imap.rb#2823 + def search_internal(cmd, keys, charset); end + + # source://net-imap//lib/net/imap.rb#2775 + 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 + def send_command_with_continuations(cmd, *args); end + + # source://net-imap//lib/net/imap/command_data.rb#33 + def send_data(data, tag = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/command_data.rb#115 + def send_date_data(date); end + + # source://net-imap//lib/net/imap/command_data.rb#101 + def send_list_data(list, tag = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/command_data.rb#80 + def send_literal(str, tag = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/command_data.rb#97 + def send_number_data(num); end + + # source://net-imap//lib/net/imap/command_data.rb#76 + def send_quoted_string(str); end + + # source://net-imap//lib/net/imap/command_data.rb#54 + def send_string_data(str, tag = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/command_data.rb#118 + def send_symbol_data(symbol); end + + # source://net-imap//lib/net/imap/command_data.rb#116 + def send_time_data(time); end + + # source://net-imap//lib/net/imap.rb#2880 + def sort_internal(cmd, sort_keys, search_keys, charset); end + + # source://net-imap//lib/net/imap.rb#2587 + def start_imap_connection; end + + # source://net-imap//lib/net/imap.rb#2604 + def start_receiver_thread; end + + # source://net-imap//lib/net/imap.rb#2930 + def start_tls_session; end + + # source://net-imap//lib/net/imap.rb#2864 + def store_internal(cmd, set, attr, flags, unchangedsince: T.unsafe(nil)); end + + # source://net-imap//lib/net/imap.rb#2613 + def tcp_socket(host, port); end + + # source://net-imap//lib/net/imap.rb#2892 + 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. + # + # source://net-imap//lib/net/imap.rb#739 + def debug; end + + # Sets the debug mode. + # + # source://net-imap//lib/net/imap.rb#744 + def debug=(val); end + + # :call-seq: decode_date(string) -> Date + # + # Decodes +string+ as an IMAP formatted "date". + # + # Double quotes are optional. Day of month may be padded with zero or + # space. See STRFDATE. + # + # source://net-imap//lib/net/imap/data_encoding.rb#90 + def decode_date(string); end + + # :call-seq: decode_datetime(string) -> DateTime + # + # Decodes +string+ as an IMAP4 formatted "date-time". + # + # NOTE: Although double-quotes are not optional in the IMAP grammar, + # Net::IMAP currently parses "date-time" values as "quoted" strings and this + # removes the quotation marks. To be useful for strings which have already + # been parsed as a quoted string, this method makes double-quotes optional. + # + # See STRFTIME. + # + # source://net-imap//lib/net/imap/data_encoding.rb#112 + def decode_datetime(string); end + + # :call-seq: decode_time(string) -> Time + # + # Decodes +string+ as an IMAP4 formatted "date-time". + # + # Same as +decode_datetime+, but returning a Time instead. + # + # source://net-imap//lib/net/imap/data_encoding.rb#124 + def decode_time(string); end + + # Decode a string from modified UTF-7 format to UTF-8. + # + # UTF-7 is a 7-bit encoding of Unicode [UTF7]. IMAP uses a + # slightly modified version of this to encode mailbox names + # containing non-ASCII characters; see [IMAP] section 5.1.3. + # + # Net::IMAP does _not_ automatically encode and decode + # mailbox names to and from UTF-7. + # + # source://net-imap//lib/net/imap/data_encoding.rb#57 + def decode_utf7(s); end + + # The default port for IMAP connections, port 143 + # + # source://net-imap//lib/net/imap.rb#749 + def default_imap_port; end + + # The default port for IMAPS connections, port 993 + # + # source://net-imap//lib/net/imap.rb#754 + def default_imaps_port; end + + # The default port for IMAP connections, port 143 + # + # source://net-imap//lib/net/imap.rb#749 + def default_port; end + + # The default port for IMAPS connections, port 993 + # + # source://net-imap//lib/net/imap.rb#754 + def default_ssl_port; end + + # The default port for IMAPS connections, port 993 + # + # source://net-imap//lib/net/imap.rb#754 + def default_tls_port; end + + # Formats +time+ as an IMAP4 date. + # + # source://net-imap//lib/net/imap/data_encoding.rb#80 + def encode_date(date); end + + # :call-seq: encode_datetime(time) -> string + # + # Formats +time+ as an IMAP4 date-time. + # + # source://net-imap//lib/net/imap/data_encoding.rb#98 + def encode_datetime(time); end + + # :call-seq: encode_datetime(time) -> string + # + # Formats +time+ as an IMAP4 date-time. + # + # source://net-imap//lib/net/imap/data_encoding.rb#98 + def encode_time(time); end + + # Encode a string from UTF-8 format to modified UTF-7. + # + # source://net-imap//lib/net/imap/data_encoding.rb#68 + def encode_utf7(s); end + + # Formats +time+ as an IMAP4 date. + # + # source://net-imap//lib/net/imap/data_encoding.rb#80 + def format_date(date); end + + # DEPRECATED:: The original version returned incorrectly formatted strings. + # Strings returned by encode_datetime or format_time use the + # correct IMAP4rev1 syntax for "date-time". + # + # This invalid format has been temporarily retained for backward + # compatibility. A future release will change this method to return the + # correct format. + # + # source://net-imap//lib/net/imap/data_encoding.rb#149 + def format_datetime(time); end + + # :call-seq: encode_datetime(time) -> string + # + # Formats +time+ as an IMAP4 date-time. + # + # source://net-imap//lib/net/imap/data_encoding.rb#98 + def format_time(time); end + + # :call-seq: decode_date(string) -> Date + # + # Decodes +string+ as an IMAP formatted "date". + # + # Double quotes are optional. Day of month may be padded with zero or + # space. See STRFDATE. + # + # source://net-imap//lib/net/imap/data_encoding.rb#90 + def parse_date(string); end + + # :call-seq: decode_datetime(string) -> DateTime + # + # Decodes +string+ as an IMAP4 formatted "date-time". + # + # NOTE: Although double-quotes are not optional in the IMAP grammar, + # Net::IMAP currently parses "date-time" values as "quoted" strings and this + # removes the quotation marks. To be useful for strings which have already + # been parsed as a quoted string, this method makes double-quotes optional. + # + # See STRFTIME. + # + # source://net-imap//lib/net/imap/data_encoding.rb#112 + def parse_datetime(string); end + + # :call-seq: decode_time(string) -> Time + # + # Decodes +string+ as an IMAP4 formatted "date-time". + # + # Same as +decode_datetime+, but returning a Time instead. + # + # source://net-imap//lib/net/imap/data_encoding.rb#124 + def parse_time(string); end + + # -- + # We could get the saslprep method by extending the SASLprep module + # directly. It's done indirectly, so SASLprep can be lazily autoloaded, + # because most users won't need it. + # ++ + # Delegates to Net::IMAP::StringPrep::SASLprep#saslprep. + # + # source://net-imap//lib/net/imap.rb#2954 + def saslprep(string, **opts); end + end +end + +# Mailbox attribute indicating that this mailbox presents all messages in +# the user's message store. Implementations MAY omit some messages, such as, +# perhaps, those in \Trash and \Junk. When this special use is supported, it +# is almost certain to represent a virtual mailbox +# +# source://net-imap//lib/net/imap/flags.rb#218 +Net::IMAP::ALL = T.let(T.unsafe(nil), Symbol) + +# Mailbox attribute indicating that this mailbox is used to archive +# messages. The meaning of an "archival" mailbox is server dependent; +# typically, it will be used to get messages out of the inbox, or otherwise +# keep them out of the user's way, while still making them accessible +# +# source://net-imap//lib/net/imap/flags.rb#224 +Net::IMAP::ARCHIVE = T.let(T.unsafe(nil), Symbol) + +# source://net-imap//lib/net/imap/command_data.rb#137 +class Net::IMAP::Atom + # @return [Atom] a new instance of Atom + # + # source://net-imap//lib/net/imap/command_data.rb#147 + def initialize(data); end + + # source://net-imap//lib/net/imap/command_data.rb#138 + def send_data(imap, tag); end + + # source://net-imap//lib/net/imap/command_data.rb#142 + def validate; end +end + +# Backward compatible delegators from Net::IMAP to Net::IMAP::SASL. +# +# source://net-imap//lib/net/imap/authenticators.rb#4 +module Net::IMAP::Authenticators + # Deprecated. Use Net::IMAP::SASL.add_authenticator instead. + # + # source://net-imap//lib/net/imap/authenticators.rb#7 + def add_authenticator(*_arg0, **_arg1, &_arg2); end + + # Deprecated. Use Net::IMAP::SASL.authenticator instead. + # + # source://net-imap//lib/net/imap/authenticators.rb#18 + def authenticator(*_arg0, **_arg1, &_arg2); end +end + +# Net::IMAP::BodyStructure is included by all of the structs that can be +# returned from a "BODYSTRUCTURE" or "BODY" +# FetchData#attr value. Although these classes don't share a base class, +# this module can be used to pattern match all of them. +# +# See {[IMAP4rev1] §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501.html#section-7.4.2] +# and {[IMAP4rev2] §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051.html#section-7.5.2-4.9] +# for full description of all +BODYSTRUCTURE+ fields, and also +# Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs. +# +# === Classes that include BodyStructure +# BodyTypeBasic:: Represents any message parts that are not handled by +# BodyTypeText, BodyTypeMessage, or BodyTypeMultipart. +# BodyTypeText:: Used by text/* parts. Contains all of the +# BodyTypeBasic fields. +# BodyTypeMessage:: Used by message/rfc822 and +# message/global parts. Contains all of the +# BodyTypeBasic fields. Other message/* types +# should use BodyTypeBasic. +# BodyTypeMultipart:: for multipart/* parts +# +# source://net-imap//lib/net/imap/response_data.rb#813 +module Net::IMAP::BodyStructure; end + +# BodyTypeAttachment is not used and will be removed in an upcoming release. +# +# === Bug Analysis +# +# \IMAP body structures are parenthesized lists and assign their fields +# positionally, so missing fields change the intepretation of all +# following fields. Additionally, different body types have a different +# number of required fields, followed by optional "extension" fields. +# +# BodyTypeAttachment was previously returned when a "message/rfc822" part, +# which should be sent as body-type-msg with ten required fields, +# was actually sent as a body-type-basic with _seven_ required +# fields. +# +# basic => type, subtype, param, id, desc, enc, octets, md5=nil, dsp=nil, lang=nil, loc=nil, *ext +# msg => type, subtype, param, id, desc, enc, octets, envelope, body, lines, md5=nil, ... +# +# 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 +# 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. +# +# === Current behavior +# +# When interpreted strictly, +envelope+ and +md5+ are incompatible. So the +# current parsing algorithm peeks ahead after it has recieved 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 => +# BodyTypeAttachment is now BodyTypeBasic#disposition => ContentDisposition. +# +# source://net-imap//lib/net/imap/response_data.rb#1077 +class Net::IMAP::BodyTypeAttachment < ::Struct + # *invalid for BodyTypeAttachment* + # + # source://net-imap//lib/net/imap/response_data.rb#1079 + def media_type; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_data.rb#1107 + def multipart?; end + + # *invalid for BodyTypeAttachment* + # + # source://net-imap//lib/net/imap/response_data.rb#1087 + def subtype; end +end + +# Net::IMAP::BodyTypeBasic represents basic body structures of messages and +# message parts, unless they have a Content-Type that is handled by +# BodyTypeText, BodyTypeMessage, or BodyTypeMultipart. +# +# See {[IMAP4rev1] §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501.html#section-7.4.2] +# and {[IMAP4rev2] §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051.html#section-7.5.2-4.9] +# for full description of all +BODYSTRUCTURE+ fields, and also +# Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs. +# +# source://net-imap//lib/net/imap/response_data.rb#830 +class Net::IMAP::BodyTypeBasic < ::Struct + include ::Net::IMAP::BodyStructure + + # :call-seq: media_subtype -> subtype + # + # >>> + # [Obsolete] + # Use +subtype+ instead. Calling this will generate a warning message + # to +stderr+, then return the value of +subtype+. + # -- + # TODO: why not just keep this as an alias? Would "media_subtype" be used + # for something else? + # ++ + # + # source://net-imap//lib/net/imap/response_data.rb#941 + def media_subtype; end + + # :call-seq: multipart? -> false + # + # BodyTypeBasic is not used for multipart MIME parts. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_data.rb#927 + def multipart?; end +end + +# === Obsolete +# BodyTypeExtension is not used and will be removed in an upcoming release. +# +# >>> +# BodyTypeExtension was (incorrectly) used for message/* parts +# (besides message/rfc822, which correctly uses BodyTypeMessage). +# +# Net::IMAP now (correctly) parses all message types (other than +# message/rfc822 or message/global) as BodyTypeBasic. +# +# source://net-imap//lib/net/imap/response_data.rb#1201 +class Net::IMAP::BodyTypeExtension < ::Struct + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_data.rb#1202 + def multipart?; end +end + +# Net::IMAP::BodyTypeMessage represents the body structures of messages and +# message parts, when Content-Type is message/rfc822 or +# message/global. +# +# BodyTypeMessage contains all of the fields of BodyTypeBasic. See +# BodyTypeBasic for documentation of the following fields: +# * {media_type}[rdoc-ref:BodyTypeBasic#media_type] +# * subtype[rdoc-ref:BodyTypeBasic#subtype] +# * param[rdoc-ref:BodyTypeBasic#param] +# * {content_id}[rdoc-ref:BodyTypeBasic#content_id] +# * description[rdoc-ref:BodyTypeBasic#description] +# * encoding[rdoc-ref:BodyTypeBasic#encoding] +# * size[rdoc-ref:BodyTypeBasic#size] +# +# source://net-imap//lib/net/imap/response_data.rb#1011 +class Net::IMAP::BodyTypeMessage < ::Struct + include ::Net::IMAP::BodyStructure + + # Obsolete: use +subtype+ instead. Calling this will + # generate a warning message to +stderr+, then return + # the value of +subtype+. + # + # source://net-imap//lib/net/imap/response_data.rb#1037 + def media_subtype; end + + # :call-seq: multipart? -> false + # + # BodyTypeMessage is not used for multipart MIME parts. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_data.rb#1030 + def multipart?; end +end + +# Net::IMAP::BodyTypeMultipart represents body structures of messages and +# message parts, when Content-Type is multipart/*. +# +# source://net-imap//lib/net/imap/response_data.rb#1120 +class Net::IMAP::BodyTypeMultipart < ::Struct + include ::Net::IMAP::BodyStructure + + # Obsolete: use +subtype+ instead. Calling this will + # generate a warning message to +stderr+, then return + # the value of +subtype+. + # + # source://net-imap//lib/net/imap/response_data.rb#1184 + def media_subtype; end + + # :call-seq: multipart? -> true + # + # BodyTypeMultipart is used for multipart MIME parts. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_data.rb#1176 + def multipart?; end +end + +# Net::IMAP::BodyTypeText represents the body structures of messages and +# message parts, when Content-Type is text/*. +# +# BodyTypeText contains all of the fields of BodyTypeBasic. See +# BodyTypeBasic for documentation of the following: +# * {media_type}[rdoc-ref:BodyTypeBasic#media_type] +# * subtype[rdoc-ref:BodyTypeBasic#subtype] +# * param[rdoc-ref:BodyTypeBasic#param] +# * {content_id}[rdoc-ref:BodyTypeBasic#content_id] +# * description[rdoc-ref:BodyTypeBasic#description] +# * encoding[rdoc-ref:BodyTypeBasic#encoding] +# * size[rdoc-ref:BodyTypeBasic#size] +# +# source://net-imap//lib/net/imap/response_data.rb#966 +class Net::IMAP::BodyTypeText < ::Struct + include ::Net::IMAP::BodyStructure + + # Obsolete: use +subtype+ instead. Calling this will + # generate a warning message to +stderr+, then return + # the value of +subtype+. + # + # source://net-imap//lib/net/imap/response_data.rb#986 + def media_subtype; end + + # :call-seq: multipart? -> false + # + # BodyTypeText is not used for multipart MIME parts. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_data.rb#979 + def multipart?; end +end + +# source://net-imap//lib/net/imap/command_data.rb#238 +class Net::IMAP::ClientID + # @return [ClientID] a new instance of ClientID + # + # source://net-imap//lib/net/imap/command_data.rb#250 + def initialize(data); end + + # source://net-imap//lib/net/imap/command_data.rb#240 + def send_data(imap, tag); end + + # source://net-imap//lib/net/imap/command_data.rb#244 + def validate; end + + private + + # source://net-imap//lib/net/imap/command_data.rb#264 + def format_internal(client_id); end + + # source://net-imap//lib/net/imap/command_data.rb#254 + def validate_internal(client_id); end +end + +# 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 +# mailbox, containing messages from other mailboxes that are marked with the +# "\Draft" message flag. Alternatively, this might just be advice that a +# client put drafts here +# +# source://net-imap//lib/net/imap/flags.rb#232 +Net::IMAP::DRAFTS = T.let(T.unsafe(nil), Symbol) + +# This module handles deprecated arguments to various Net::IMAP methods. +# +# source://net-imap//lib/net/imap/deprecated_client_options.rb#7 +module Net::IMAP::DeprecatedClientOptions + # :call-seq: + # Net::IMAP.new(host, **options) # standard keyword options + # Net::IMAP.new(host, options) # obsolete hash options + # Net::IMAP.new(host, port) # obsolete port argument + # Net::IMAP.new(host, port, usessl, certs = nil, verify = true) # deprecated SSL arguments + # + # Translates Net::IMAP.new arguments for backward compatibility. + # + # ==== Obsolete arguments + # + # Using obsolete arguments does not 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. + # + # # Obsolete: + # Net::IMAP.new("imap.example.com", options_hash) + # # Use instead: + # Net::IMAP.new("imap.example.com", **options_hash) + # + # If a second positional argument is given and it is not a hash, it is + # converted to the +port+ keyword argument. + # # Obsolete: + # Net::IMAP.new("imap.example.com", 114433) + # # Use instead: + # Net::IMAP.new("imap.example.com", port: 114433) + # + # ==== Deprecated arguments + # + # Using deprecated arguments prints a warning. Convert to keyword + # arguments to avoid the warning. Deprecated arguments will be removed in + # a future release. + # + # If +usessl+ is false, +certs+, and +verify+ are ignored. When it true, + # all three arguments are converted to the +ssl+ keyword argument. + # Without +certs+ or +verify+, it is converted to ssl: true. + # # DEPRECATED: + # Net::IMAP.new("imap.example.com", nil, true) # => prints a warning + # # Use instead: + # Net::IMAP.new("imap.example.com", ssl: true) + # + # When +certs+ is a path to a directory, it is converted to ca_path: + # certs. + # # DEPRECATED: + # Net::IMAP.new("imap.example.com", nil, true, "/path/to/certs") # => prints a warning + # # Use instead: + # Net::IMAP.new("imap.example.com", ssl: {ca_path: "/path/to/certs"}) + # + # When +certs+ is a path to a file, it is converted to ca_file: + # certs. + # # DEPRECATED: + # Net::IMAP.new("imap.example.com", nil, true, "/path/to/cert.pem") # => prints a warning + # # Use instead: + # Net::IMAP.new("imap.example.com", ssl: {ca_file: "/path/to/cert.pem"}) + # + # When +verify+ is +false+, it is converted to verify_mode: + # OpenSSL::SSL::VERIFY_NONE. + # # DEPRECATED: + # Net::IMAP.new("imap.example.com", nil, true, nil, false) # => prints a warning + # # Use instead: + # Net::IMAP.new("imap.example.com", ssl: {verify_mode: OpenSSL::SSL::VERIFY_NONE}) + # + # source://net-imap//lib/net/imap/deprecated_client_options.rb#72 + def initialize(host, port_or_options = T.unsafe(nil), *deprecated, **options); end + + # :call-seq: + # starttls(**options) # standard + # starttls(options = {}) # obsolete + # starttls(certs = nil, verify = true) # deprecated + # + # Translates Net::IMAP#starttls arguments for backward compatibility. + # + # Support for +certs+ and +verify+ will be dropped in a future release. + # + # See ::new for interpretation of +certs+ and +verify+. + # + # source://net-imap//lib/net/imap/deprecated_client_options.rb#104 + def starttls(*deprecated, **options); end + + private + + # source://net-imap//lib/net/imap/deprecated_client_options.rb#123 + def create_ssl_params(certs = T.unsafe(nil), verify = T.unsafe(nil)); end +end + +# Aliases for supported capabilities, to be used with the #enable command. +# +# source://net-imap//lib/net/imap.rb#723 +Net::IMAP::ENABLE_ALIASES = T.let(T.unsafe(nil), Hash) + +# **Note:** This represents an intentionally _unstable_ API. Where +# instances of this class are returned, future releases may return a +# different (incompatible) object without deprecation or warning. +# +# Net::IMAP::ExtensionData represents data that is parsable according to the +# forward-compatible extension syntax in RFC3501, RFC4466, or RFC9051, but +# isn't directly known or understood by Net::IMAP yet. +# +# See also: UnparsedData, UnparsedNumericResponseData, IgnoredResponse +# +# source://net-imap//lib/net/imap/response_data.rb#120 +class Net::IMAP::ExtensionData < ::Struct; end + +# Net::IMAP::FetchData represents the contents of a FETCH response. +# Net::IMAP#fetch and Net::IMAP#uid_fetch both return an array of +# FetchData objects. +# +# === Fetch attributes +# +# See {[IMAP4rev1 §7.4.2]}[https://www.rfc-editor.org/rfc/rfc3501.html#section-7.4.2] +# and {[IMAP4rev2 §7.5.2]}[https://www.rfc-editor.org/rfc/rfc9051.html#section-7.5.2] +# for a full description of the standard fetch response data items, and +# Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs. +# +# ==== Static fetch data items +# +# Most message attributes are static, and must never change for a given +# (server, account, mailbox, UIDVALIDITY, UID) tuple. +# +# The static fetch data items defined by both +# IMAP4rev1[https://www.rfc-editor.org/rfc/rfc3501.html] and +# IMAP4rev2[https://www.rfc-editor.org/rfc/rfc9051.html] are: +# +# * "UID" --- See #uid. +# * "BODY" --- See #body. +# * "BODY[#{section_spec}]", +# "BODY[#{section_spec}]<#{offset}>" --- See #message, +# #part, #header, #header_fields, #header_fields_not, #mime, and #text. +# * "BODYSTRUCTURE" --- See #bodystructure. +# * "ENVELOPE" --- See #envelope. +# * "INTERNALDATE" --- See #internaldate. +# * "RFC822.SIZE" --- See #rfc822_size. +# +# IMAP4rev2[https://www.rfc-editor.org/rfc/rfc9051.html] adds the +# additional fetch items from the +BINARY+ extension +# {[RFC3516]}[https://www.rfc-editor.org/rfc/rfc3516.html]: +# +# * "BINARY[#{part}]", +# "BINARY[#{part}]<#{offset}>" -- See #binary. +# * "BINARY.SIZE[#{part}]" -- See #binary_size. +# +# Several static message attributes in +# IMAP4rev1[https://www.rfc-editor.org/rfc/rfc3501.html] are obsolete and +# been removed from +# IMAP4rev2[https://www.rfc-editor.org/rfc/rfc9051.html]: +# +# * "RFC822" --- See #rfc822 or replace with +# "BODY[]" and #message. +# * "RFC822.HEADER" --- See #rfc822_header or replace with +# "BODY[HEADER]" and #header. +# * "RFC822.TEXT" --- See #rfc822_text or replace with +# "BODY[TEXT]" and #text. +# +# Net::IMAP supports static attributes defined by the following extensions: +# * +OBJECTID+ {[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html] +# * "EMAILID" --- See #emailid. +# * "THREADID" --- See #threadid. +# +# * +X-GM-EXT-1+ {[non-standard Gmail +# extension]}[https://developers.google.com/gmail/imap/imap-extensions] +# * "X-GM-MSGID" --- unique message ID. Access via #attr. +# * "X-GM-THRID" --- Thread ID. Access via #attr. +# +# [Note:] +# >>> +# Additional static fields are defined in other \IMAP extensions, but +# Net::IMAP can't parse them yet. +# +# ==== Dynamic message attributes +# +# Some message attributes can be dynamically changed, for example using the +# {STORE command}[rdoc-ref:Net::IMAP#store]. +# +# The only dynamic message attribute defined by +# IMAP4rev1[https://www.rfc-editor.org/rfc/rfc3501.html] and +# IMAP4rev2[https://www.rfc-editor.org/rfc/rfc9051.html] is: +# +# * "FLAGS" --- See #flags. +# +# Net::IMAP supports dynamic attributes defined by the following extensions: +# +# * +CONDSTORE+ {[RFC7162]}[https://www.rfc-editor.org/rfc/rfc7162.html]: +# * "MODSEQ" --- See #modseq. +# * +X-GM-EXT-1+ {[non-standard Gmail +# extension]}[https://developers.google.com/gmail/imap/imap-extensions] +# * "X-GM-LABELS" --- Gmail labels. Access via #attr. +# +# [Note:] +# >>> +# Additional dynamic fields are defined in other \IMAP extensions, but +# Net::IMAP can't parse them yet. +# +# === Implicitly setting \Seen and using +PEEK+ +# +# Unless the mailbox is has been opened as read-only, fetching +# BODY[#{section}] or BINARY[#{section}] +# will implicitly set the \Seen flag. To avoid this, fetch using +# BODY.PEEK[#{section}] or BINARY.PEEK[#{section}] +# instead. +# +# Note that the data will always be _returned_ without ".PEEK", in +# BODY[#{specifier}] or BINARY[#{section}]. +# +# source://net-imap//lib/net/imap/fetch_data.rb#106 +class Net::IMAP::FetchData < ::Struct + # :call-seq: attr_upcase -> hash + # + # A transformation of #attr, with all the keys converted to upper case. + # + # Header field names are case-preserved but not case-sensitive, so this is + # used by #header_fields and #header_fields_not. + # + # source://net-imap//lib/net/imap/fetch_data.rb#136 + def attr_upcase; end + + # :call-seq: + # binary(*part_nums, offset: nil) -> string or nil + # + # Returns the binary representation of a particular MIME part, which has + # already been decoded according to its Content-Transfer-Encoding. + # + # See #part for a description of +part_nums+ and +offset+. + # + # This is the same as getting the value of + # "BINARY[#{part_nums.join(".")}]" or + # "BINARY[#{part_nums.join(".")}]<#{offset}>" from #attr. + # + # The server must support either + # IMAP4rev2[https://www.rfc-editor.org/rfc/rfc9051.html] + # or the +BINARY+ extension + # {[RFC3516]}[https://www.rfc-editor.org/rfc/rfc3516.html]. + # + # See also: #binary_size, #mime + # + # source://net-imap//lib/net/imap/fetch_data.rb#430 + def binary(*part_nums, offset: T.unsafe(nil)); end + + # :call-seq: + # binary_size(*part_nums) -> integer or nil + # + # Returns the decoded size of a particular MIME part (the size to expect + # in response to a BINARY fetch request). + # + # See #part for a description of +part_nums+. + # + # This is the same as getting the value of + # "BINARY.SIZE[#{part_nums.join(".")}]" from #attr. + # + # The server must support either + # IMAP4rev2[https://www.rfc-editor.org/rfc/rfc9051.html] + # or the +BINARY+ extension + # {[RFC3516]}[https://www.rfc-editor.org/rfc/rfc3516.html]. + # + # See also: #binary, #mime + # + # source://net-imap//lib/net/imap/fetch_data.rb#451 + def binary_size(*part_nums); end + + # :call-seq: + # body -> body structure or nil + # + # Returns an alternate form of #bodystructure, without any extension data. + # + # This is the same as getting the value for "BODY" from #attr. + # + # [Note] + # Use #message, #part, #header, #header_fields, #header_fields_not, + # #text, or #mime to retrieve BODY[#{section_spec}] attributes. + # + # source://net-imap//lib/net/imap/fetch_data.rb#148 + def body; end + + # :call-seq: + # bodystructure -> BodyStructure struct or nil + # + # A BodyStructure object that describes the message, if it was fetched. + # + # This is the same as getting the value for "BODYSTRUCTURE" from + # #attr. + # + # source://net-imap//lib/net/imap/fetch_data.rb#310 + def body_structure; end + + # :call-seq: + # bodystructure -> BodyStructure struct or nil + # + # A BodyStructure object that describes the message, if it was fetched. + # + # This is the same as getting the value for "BODYSTRUCTURE" from + # #attr. + # + # source://net-imap//lib/net/imap/fetch_data.rb#310 + def bodystructure; end + + # :call-seq: emailid -> string or nil + # + # An ObjectID that uniquely identifies the immutable content of a single + # message. + # + # The server must return the same +EMAILID+ for both the source and + # destination messages after a COPY or MOVE command. However, it is + # possible for different messages with the same EMAILID to have different + # mutable attributes, such as flags. + # + # This is the same as getting the value for "EMAILID" from + # #attr. + # + # The server must support the +OBJECTID+ extension + # {[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html]. + # + # source://net-imap//lib/net/imap/fetch_data.rb#484 + def emailid; end + + # :call-seq: envelope -> Envelope or nil + # + # An Envelope object that describes the envelope structure of a message. + # See the documentation for Envelope for a description of the envelope + # structure attributes. + # + # This is the same as getting the value for "ENVELOPE" from + # #attr. + # + # source://net-imap//lib/net/imap/fetch_data.rb#321 + def envelope; end + + # :call-seq: flags -> array of Symbols and Strings + # + # A array of flags that are set for this message. System flags are + # symbols that have been capitalized by String#capitalize. Keyword flags + # are strings and their case is not changed. + # + # This is the same as getting the value for "FLAGS" from #attr. + # + # [Note] + # The +FLAGS+ field is dynamic, and can change for a uniquely identified + # message. + # + # source://net-imap//lib/net/imap/fetch_data.rb#334 + def flags; end + + # :call-seq: + # header(*part_nums, offset: nil) -> string or nil + # header(*part_nums, fields: names, offset: nil) -> string or nil + # header(*part_nums, except: names, offset: nil) -> string or nil + # + # The {[RFC5322]}[https://www.rfc-editor.org/rfc/rfc5322.html] header of a + # message or of an encapsulated + # {[MIME-IMT]}[https://www.rfc-editor.org/rfc/rfc2046.html] + # MESSAGE/RFC822 or MESSAGE/GLOBAL message. + # + # Headers can be parsed using the "mail" gem. + # + # See #part for a description of +part_nums+ and +offset+. + # + # ==== Without +fields+ or +except+ + # This is the same as getting the value from #attr for one of: + # * BODY[HEADER] + # * BODY[HEADER]<#{offset}> + # * BODY[#{part_nums.join "."}.HEADER]" + # * BODY[#{part_nums.join "."}.HEADER]<#{offset}>" + # + # ==== With +fields+ + # When +fields+ is sent, returns a subset of the header which contains + # only the header fields that match one of the names in the list. + # + # This is the same as getting the value from #attr_upcase for one of: + # * BODY[HEADER.FIELDS (#{names.join " "})] + # * BODY[HEADER.FIELDS (#{names.join " "})]<#{offset}> + # * BODY[#{part_nums.join "."}.HEADER.FIELDS (#{names.join " "})] + # * BODY[#{part_nums.join "."}.HEADER.FIELDS (#{names.join " "})]<#{offset}> + # + # See also: #header_fields + # + # ==== With +except+ + # When +except+ is sent, returns a subset of the header which contains + # only the header fields that do _not_ match one of the names in the list. + # + # This is the same as getting the value from #attr_upcase for one of: + # * BODY[HEADER.FIELDS.NOT (#{names.join " "})] + # * BODY[HEADER.FIELDS.NOT (#{names.join " "})]<#{offset}> + # * BODY[#{part_nums.join "."}.HEADER.FIELDS.NOT (#{names.join " "})] + # * BODY[#{part_nums.join "."}.HEADER.FIELDS.NOT (#{names.join " "})]<#{offset}> + # + # See also: #header_fields_not + # + # source://net-imap//lib/net/imap/fetch_data.rb#234 + def header(*part_nums, fields: T.unsafe(nil), except: T.unsafe(nil), offset: T.unsafe(nil)); end + + # :call-seq: + # header_fields(*names, part: [], offset: nil) -> string or nil + # + # The result from #header when called with fields: names. + # + # source://net-imap//lib/net/imap/fetch_data.rb#252 + def header_fields(first, *rest, part: T.unsafe(nil), offset: T.unsafe(nil)); end + + # :call-seq: + # header_fields_not(*names, part: [], offset: nil) -> string or nil + # + # The result from #header when called with except: names. + # + # source://net-imap//lib/net/imap/fetch_data.rb#260 + def header_fields_not(first, *rest, part: T.unsafe(nil), offset: T.unsafe(nil)); end + + # :call-seq: internaldate -> Time or nil + # + # The internal date and time of the message on the server. This is not + # the date and time in the [RFC5322[https://tools.ietf.org/html/rfc5322]] + # header, but rather a date and time which reflects when the message was + # received. + # + # This is similar to getting the value for "INTERNALDATE" from + # #attr. + # + # [Note] + # attr["INTERNALDATE"] returns a string, and this method + # returns a Time object. + # + # source://net-imap//lib/net/imap/fetch_data.rb#349 + def internal_date; end + + # :call-seq: internaldate -> Time or nil + # + # The internal date and time of the message on the server. This is not + # the date and time in the [RFC5322[https://tools.ietf.org/html/rfc5322]] + # header, but rather a date and time which reflects when the message was + # received. + # + # This is similar to getting the value for "INTERNALDATE" from + # #attr. + # + # [Note] + # attr["INTERNALDATE"] returns a string, and this method + # returns a Time object. + # + # source://net-imap//lib/net/imap/fetch_data.rb#349 + def internaldate; end + + # :call-seq: + # message(offset: bytes) -> string or nil + # + # The RFC5322[https://www.rfc-editor.org/rfc/rfc5322.html] + # expression of the entire message, as a string. + # + # See #part for a description of +offset+. + # + # RFC5322 messages can be parsed using the "mail" gem. + # + # This is the same as getting the value for "BODY[]" or + # "BODY[]<#{offset}>" from #attr. + # + # See also: #header, #text, and #mime. + # + # source://net-imap//lib/net/imap/fetch_data.rb#164 + def message(offset: T.unsafe(nil)); end + + # :call-seq: + # mime(*part_nums) -> string or nil + # mime(*part_nums, offset: bytes) -> string or nil + # + # The {[MIME-IMB]}[https://www.rfc-editor.org/rfc/rfc2045.html] header for + # a message part, if it was fetched. + # + # See #part for a description of +part_nums+ and +offset+. + # + # This is the same as getting the value for + # "BODY[#{part_nums}.MIME]" or + # "BODY[#{part_nums}.MIME]<#{offset}>" from #attr. + # + # See also: #message, #header, and #text. + # + # source://net-imap//lib/net/imap/fetch_data.rb#278 + def mime(part, *subparts, offset: T.unsafe(nil)); end + + # :call-seq: modseq -> Integer + # + # The modification sequence number associated with this IMAP message. + # + # This is the same as getting the value for "MODSEQ" from #attr. + # + # The server must support the +CONDSTORE+ extension + # {[RFC7162]}[https://www.rfc-editor.org/rfc/rfc7162.html]. + # + # [Note] + # The +MODSEQ+ field is dynamic, and can change for a uniquely + # identified message. + # + # source://net-imap//lib/net/imap/fetch_data.rb#467 + def modseq; end + + # :call-seq: + # part(*part_nums, offset: bytes) -> string or nil + # + # The string representation of a particular MIME part. + # + # +part_nums+ forms a path of MIME part numbers, counting up from +1+, + # which may specify an arbitrarily nested part, similarly to Array#dig. + # Messages that don't use MIME, or MIME messages that are not multipart + # and don't hold an encapsulated message, only have part +1+. + # + # If a zero-based +offset+ is given, the returned string is a substring of + # the entire contents, starting at that origin octet. This means that + # BODY[]<0> MAY be truncated, but BODY[] is never + # truncated. + # + # This is the same as getting the value of + # "BODY[#{part_nums.join(".")}]" or + # "BODY[#{part_nums.join(".")}]<#{offset}>" from #attr. + # + # See also: #message, #header, #text, and #mime. + # + # source://net-imap//lib/net/imap/fetch_data.rb#186 + def part(index, *subparts, offset: T.unsafe(nil)); end + + # :call-seq: rfc822 -> String + # + # Semantically equivalent to #message with no arguments. + # + # This is the same as getting the value for "RFC822" from #attr. + # + # [Note] + # +IMAP4rev2+ deprecates RFC822. + # + # source://net-imap//lib/net/imap/fetch_data.rb#362 + def rfc822; end + + # :call-seq: rfc822_header -> String + # + # Semantically equivalent to #header, with no arguments. + # + # This is the same as getting the value for "RFC822.HEADER" from #attr. + # + # [Note] + # +IMAP4rev2+ deprecates RFC822.HEADER. + # + # source://net-imap//lib/net/imap/fetch_data.rb#392 + def rfc822_header; end + + # :call-seq: rfc822_size -> Integer + # + # A number expressing the [RFC5322[https://tools.ietf.org/html/rfc5322]] + # size of the message. + # + # This is the same as getting the value for "RFC822.SIZE" from + # #attr. + # + # [Note] + # \IMAP was originally developed for the older + # RFC822[https://www.rfc-editor.org/rfc/rfc822.html] standard, and as a + # consequence several fetch items in \IMAP incorporate "RFC822" in their + # name. With the exception of +RFC822.SIZE+, there are more modern + # replacements; for example, the modern version of +RFC822.HEADER+ is + # BODY.PEEK[HEADER]. In all cases, "RFC822" should be + # interpreted as a reference to the updated + # RFC5322[https://www.rfc-editor.org/rfc/rfc5322.html] standard. + # + # source://net-imap//lib/net/imap/fetch_data.rb#381 + def rfc822_size; end + + # :call-seq: rfc822_text -> String + # + # Semantically equivalent to #text, with no arguments. + # + # This is the same as getting the value for "RFC822.TEXT" from + # #attr. + # + # [Note] + # +IMAP4rev2+ deprecates RFC822.TEXT. + # + # source://net-imap//lib/net/imap/fetch_data.rb#403 + def rfc822_text; end + + # :call-seq: rfc822_size -> Integer + # + # A number expressing the [RFC5322[https://tools.ietf.org/html/rfc5322]] + # size of the message. + # + # This is the same as getting the value for "RFC822.SIZE" from + # #attr. + # + # [Note] + # \IMAP was originally developed for the older + # RFC822[https://www.rfc-editor.org/rfc/rfc822.html] standard, and as a + # consequence several fetch items in \IMAP incorporate "RFC822" in their + # name. With the exception of +RFC822.SIZE+, there are more modern + # replacements; for example, the modern version of +RFC822.HEADER+ is + # BODY.PEEK[HEADER]. In all cases, "RFC822" should be + # interpreted as a reference to the updated + # RFC5322[https://www.rfc-editor.org/rfc/rfc5322.html] standard. + # + # source://net-imap//lib/net/imap/fetch_data.rb#381 + def size; end + + # :call-seq: + # text(*part_nums) -> string or nil + # text(*part_nums, offset: bytes) -> string or nil + # + # The text body of a message or a message part, if it was fetched, + # omitting the {[RFC5322]}[https://www.rfc-editor.org/rfc/rfc5322.html] + # header. + # + # See #part for a description of +part_nums+ and +offset+. + # + # This is the same as getting the value from #attr for one of: + # * "BODY[TEXT]", + # * "BODY[TEXT]<#{offset}>", + # * "BODY[#{section}.TEXT]", or + # * "BODY[#{section}.TEXT]<#{offset}>". + # + # See also: #message, #header, and #mime. + # + # source://net-imap//lib/net/imap/fetch_data.rb#299 + def text(*part, offset: T.unsafe(nil)); end + + # :call-seq: threadid -> string or nil + # + # An ObjectID that uniquely identifies a set of messages that the server + # believes should be grouped together. + # + # It is generally based on some combination of References, In-Reply-To, + # and Subject, but the exact implementation is left up to the server + # implementation. The server should return the same thread identifier for + # related messages, even if they are in different mailboxes. + # + # This is the same as getting the value for "THREADID" from + # #attr. + # + # The server must support the +OBJECTID+ extension + # {[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html]. + # + # source://net-imap//lib/net/imap/fetch_data.rb#501 + def threadid; end + + # :call-seq: uid -> Integer + # + # A number expressing the unique identifier of the message. + # + # This is the same as getting the value for "UID" from #attr. + # + # source://net-imap//lib/net/imap/fetch_data.rb#410 + def uid; end + + private + + # source://net-imap//lib/net/imap/fetch_data.rb#505 + def body_section_attr(*_arg0, **_arg1, &_arg2); end + + # source://net-imap//lib/net/imap/fetch_data.rb#507 + def section_attr(attr, part = T.unsafe(nil), text = T.unsafe(nil), offset: T.unsafe(nil)); end +end + +# Alias for HAS_CHILDREN, to match the \IMAP spelling. +# +# source://net-imap//lib/net/imap/flags.rb#183 +Net::IMAP::HASCHILDREN = T.let(T.unsafe(nil), Symbol) + +# Alias for HAS_NO_CHILDREN, to match the \IMAP spelling. +# +# source://net-imap//lib/net/imap/flags.rb#185 +Net::IMAP::HASNOCHILDREN = T.let(T.unsafe(nil), Symbol) + +# The presence of this attribute indicates that the mailbox has child +# mailboxes. A server SHOULD NOT set this attribute if there are child +# mailboxes and the user does not have permission to access any of them. In +# this case, +\HasNoChildren+ SHOULD be used. In many cases, however, a +# server may not be able to efficiently compute whether a user has access to +# any child mailboxes. Note that even though the +\HasChildren+ attribute +# for a mailbox must be correct at the time of processing the mailbox, a +# client must be prepared to deal with a situation when a mailbox is marked +# with the +\HasChildren+ attribute, but no child mailbox appears in the +# response to the #list command. This might happen, for example, due to child +# mailboxes being deleted or made inaccessible to the user (using access +# control) by another client before the server is able to list them. +# +# It is an error for the server to return both a +\HasChildren+ and a +# +\HasNoChildren+ attribute in the same #list response. A client that +# encounters a #list response with both +\HasChildren+ and +\HasNoChildren+ +# attributes present should act as if both are absent in the #list response. +# +# source://net-imap//lib/net/imap/flags.rb#136 +Net::IMAP::HAS_CHILDREN = T.let(T.unsafe(nil), Symbol) + +# The presence of this attribute indicates that the mailbox has NO child +# mailboxes that are accessible to the currently authenticated user. +# +# It is an error for the server to return both a +\HasChildren+ and a +# +\HasNoChildren+ attribute in the same #list response. A client that +# encounters a #list response with both +\HasChildren+ and +\HasNoChildren+ +# attributes present should act as if both are absent in the #list response. +# +# Note: the +\HasNoChildren+ attribute should not be confused with the +# +\NoInferiors+ attribute, which indicates that no child mailboxes exist +# now and none can be created in the future. +# +# source://net-imap//lib/net/imap/flags.rb#149 +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 +# some clients to close the connection. +# +# It matches no IMAP standard. +# +# source://net-imap//lib/net/imap/response_data.rb#65 +class Net::IMAP::IgnoredResponse < ::Net::IMAP::UntaggedResponse; end + +# Error raised when the server sends an invalid response. +# +# This is different from UnknownResponseError: the response has been +# rejected. Although it may be parsable, the server is forbidden from +# sending it in the current context. The client should automatically +# disconnect, abruptly (without logout). +# +# Note that InvalidResponseError does not inherit from ResponseError: it +# can be raised before the response is fully parsed. A related +# ResponseParseError or ResponseError may be the #cause. +# +# source://net-imap//lib/net/imap/errors.rb#60 +class Net::IMAP::InvalidResponseError < ::Net::IMAP::Error; end + +# Mailbox attribute indicating that this mailbox is where messages deemed to +# be junk mail are held. Some server implementations might put messages here +# automatically. Alternatively, this might just be advice to a client-side +# spam filter. +# +# source://net-imap//lib/net/imap/flags.rb#242 +Net::IMAP::JUNK = T.let(T.unsafe(nil), Symbol) + +# source://net-imap//lib/net/imap/command_data.rb#167 +class Net::IMAP::Literal + # @return [Literal] a new instance of Literal + # + # source://net-imap//lib/net/imap/command_data.rb#177 + def initialize(data); end + + # source://net-imap//lib/net/imap/command_data.rb#168 + def send_data(imap, tag); end + + # source://net-imap//lib/net/imap/command_data.rb#172 + def validate; end +end + +# source://net-imap//lib/net/imap/command_data.rb#182 +class Net::IMAP::MessageSet + # @return [MessageSet] a new instance of MessageSet + # + # source://net-imap//lib/net/imap/command_data.rb#193 + def initialize(data); end + + # source://net-imap//lib/net/imap/command_data.rb#183 + def send_data(imap, tag); end + + # source://net-imap//lib/net/imap/command_data.rb#187 + def validate; end + + private + + # source://net-imap//lib/net/imap/command_data.rb#197 + def format_internal(data); end + + # source://net-imap//lib/net/imap/command_data.rb#218 + def validate_internal(data); end +end + +# The +\NonExistent+ attribute indicates that a mailbox name does not refer +# to an existing mailbox. Note that this attribute is not meaningful by +# itself, as mailbox names that match the canonical #list pattern but don't +# exist must not be returned unless one of the two conditions listed below +# is also satisfied: +# +# 1. The mailbox name also satisfies the selection criteria (for example, +# it is subscribed and the "SUBSCRIBED" selection option has been +# specified). +# +# 2. "RECURSIVEMATCH" has been specified, and the mailbox name has at least +# one descendant mailbox name that does not match the #list pattern and +# does match the selection criteria. +# +# In practice, this means that the +\NonExistent+ attribute is usually +# returned with one or more of +\Subscribed+, +\Remote+, +\HasChildren+, or +# the CHILDINFO extended data item. +# +# The client must treat the presence of the +\NonExistent+ attribute as if the +# +\NoSelect+ attribute was also sent by the server +# +# source://net-imap//lib/net/imap/flags.rb#105 +Net::IMAP::NONEXISTENT = T.let(T.unsafe(nil), Symbol) + +# Mailbox attribute indicating it is not possible for any child levels of +# hierarchy to exist under this name; no child levels exist now and none can +# be created in the future children. +# +# The client must treat the presence of the +\NoInferiors+ attribute as if the +# +\HasNoChildren+ attribute was also sent by the server +# +# source://net-imap//lib/net/imap/flags.rb#113 +Net::IMAP::NO_INFERIORS = T.let(T.unsafe(nil), Symbol) + +# Mailbox attribute indicating it is not possible to use this name as a +# selectable mailbox. +# +# source://net-imap//lib/net/imap/flags.rb#117 +Net::IMAP::NO_SELECT = T.let(T.unsafe(nil), Symbol) + +# Net::IMAP::Namespace represents a single namespace contained inside a +# NAMESPACE response. +# +# Returned by Net::IMAP#namespace, contained inside a Namespaces object. +# +# source://net-imap//lib/net/imap/response_data.rb#496 +class Net::IMAP::Namespace < ::Struct; end + +# Net::IMAP::Namespaces represents a +NAMESPACE+ server response, which +# contains lists of #personal, #shared, and #other namespaces. +# +# Net::IMAP#namespace returns a Namespaces object. +# +# source://net-imap//lib/net/imap/response_data.rb#522 +class Net::IMAP::Namespaces < ::Struct; end + +# Common validators of number and nz_number types +# +# source://net-imap//lib/net/imap/data_encoding.rb#157 +module Net::IMAP::NumValidator + private + + # Ensure argument is 'mod_sequence_value' or raise DataFormatError + # + # source://net-imap//lib/net/imap/data_encoding.rb#204 + def ensure_mod_sequence_value(num); end + + # Ensure argument is 'number' or raise DataFormatError + # + # source://net-imap//lib/net/imap/data_encoding.rb#188 + def ensure_number(num); end + + # Ensure argument is 'nz_number' or raise DataFormatError + # + # source://net-imap//lib/net/imap/data_encoding.rb#196 + def ensure_nz_number(num); end + + # Check is passed argument valid 'mod_sequence_value' in RFC 4551 terminology + # + # source://net-imap//lib/net/imap/data_encoding.rb#179 + def valid_mod_sequence_value?(num); end + + # Check is passed argument valid 'number' in RFC 3501 terminology + # + # source://net-imap//lib/net/imap/data_encoding.rb#161 + def valid_number?(num); end + + # Check is passed argument valid 'nz_number' in RFC 3501 terminology + # + # source://net-imap//lib/net/imap/data_encoding.rb#170 + def valid_nz_number?(num); end + + class << self + # Ensure argument is 'mod_sequence_value' or raise DataFormatError + # + # @raise [DataFormatError] + # + # source://net-imap//lib/net/imap/data_encoding.rb#204 + def ensure_mod_sequence_value(num); end + + # Ensure argument is 'number' or raise DataFormatError + # + # @raise [DataFormatError] + # + # source://net-imap//lib/net/imap/data_encoding.rb#188 + def ensure_number(num); end + + # Ensure argument is 'nz_number' or raise DataFormatError + # + # @raise [DataFormatError] + # + # source://net-imap//lib/net/imap/data_encoding.rb#196 + def ensure_nz_number(num); end + + # Check is passed argument valid 'mod_sequence_value' in RFC 4551 terminology + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/data_encoding.rb#179 + def valid_mod_sequence_value?(num); end + + # Check is passed argument valid 'number' in RFC 3501 terminology + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/data_encoding.rb#161 + def valid_number?(num); end + + # Check is passed argument valid 'nz_number' in RFC 3501 terminology + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/data_encoding.rb#170 + def valid_nz_number?(num); end + end +end + +# source://net-imap//lib/net/imap/command_data.rb#152 +class Net::IMAP::QuotedString + # @return [QuotedString] a new instance of QuotedString + # + # source://net-imap//lib/net/imap/command_data.rb#162 + def initialize(data); end + + # source://net-imap//lib/net/imap/command_data.rb#153 + def send_data(imap, tag); end + + # source://net-imap//lib/net/imap/command_data.rb#157 + def validate; end +end + +# The mailbox is a remote mailbox. +# +# source://net-imap//lib/net/imap/flags.rb#176 +Net::IMAP::REMOTE = T.let(T.unsafe(nil), Symbol) + +# source://net-imap//lib/net/imap/errors.rb#74 +Net::IMAP::RESPONSE_ERRORS = T.let(T.unsafe(nil), Hash) + +# source://net-imap//lib/net/imap/command_data.rb#122 +class Net::IMAP::RawData + # @return [RawData] a new instance of RawData + # + # source://net-imap//lib/net/imap/command_data.rb#132 + def initialize(data); end + + # source://net-imap//lib/net/imap/command_data.rb#123 + def send_data(imap, tag); end + + # source://net-imap//lib/net/imap/command_data.rb#127 + def validate; end +end + +# Superclass of all errors used to encapsulate "fail" responses +# from the server. +# +# source://net-imap//lib/net/imap/errors.rb#20 +class Net::IMAP::ResponseError < ::Net::IMAP::Error + # @return [ResponseError] a new instance of ResponseError + # + # source://net-imap//lib/net/imap/errors.rb#25 + def initialize(response); end + + # The response that caused this error + # + # source://net-imap//lib/net/imap/errors.rb#23 + def response; end + + # The response that caused this error + # + # source://net-imap//lib/net/imap/errors.rb#23 + def response=(_arg0); end +end + +# Parses an \IMAP server response. +# +# source://net-imap//lib/net/imap/response_parser/parser_utils.rb#5 +class Net::IMAP::ResponseParser + include ::Net::IMAP::ResponseParser::ParserUtils + include ::Net::IMAP::ResponseParser::ResponseConditions + extend ::Net::IMAP::ResponseParser::ParserUtils::Generator + + # :call-seq: Net::IMAP::ResponseParser.new -> 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/parser_utils.rb#104 + def CRLF!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def CRLF?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def EOF!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def EOF?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def NIL!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def NIL?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#46 + def PLUS!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def PLUS?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#46 + def SP!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def SP?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#46 + def STAR!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def STAR?; end + + # RFC-3501 & RFC-9051: + # body-fld-enc = (DQUOTE ("7BIT" / "8BIT" / "BINARY" / "BASE64"/ + # "QUOTED-PRINTABLE") DQUOTE) / string + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def body_fld_enc; end + + # valid number ranges are not enforced by parser + # number64 = 1*DIGIT + # ; Unsigned 63-bit integer + # ; (0 <= n <= 9,223,372,036,854,775,807) + # number in 3501, number64 in 9051 + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def body_fld_lines; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def body_fld_octets; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def case_insensitive__string; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def case_insensitive__string?; end + + # date-time = DQUOTE date-day-fixed "-" date-month "-" date-year + # SP time SP zone DQUOTE + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def date_time; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#46 + def lbra; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def lbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_CRLF!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_EOF!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_NIL!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_PLUS?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_SP?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_STAR?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_body?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_case_insensitive__string!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_lbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_lpar?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_number!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_quoted!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_rbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_rpar?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_string!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_string8!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_tagged_ext_label!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_thread_list?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_thread_nested?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#46 + def lpar; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def lpar?; end + + # text/* + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def media_subtype; end + + # valid number ranges are not enforced by parser + # nz-number = digit-nz *DIGIT + # ; Non-zero unsigned 32-bit integer + # ; (0 < n < 4,294,967,296) + # valid number ranges are not enforced by parser + # nz-number64 = digit-nz *DIGIT + # ; Unsigned 63-bit integer + # ; (0 < n <= 9,223,372,036,854,775,807) + # RFC7162: + # mod-sequence-value = 1*DIGIT + # ;; Positive unsigned 63-bit integer + # ;; (mod-sequence) + # ;; (1 <= n <= 9,223,372,036,854,775,807). + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def mod_sequence_value; end + + # valid number ranges are not enforced by parser + # number64 = 1*DIGIT + # ; Unsigned 63-bit integer + # ; (0 <= n <= 9,223,372,036,854,775,807) + # RFC7162: + # mod-sequence-valzer = "0" / mod-sequence-value + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def mod_sequence_valzer; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def number; end + + # valid number ranges are not enforced by parser + # number64 = 1*DIGIT + # ; Unsigned 63-bit integer + # ; (0 <= n <= 9,223,372,036,854,775,807) + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def number64; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def number64?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def number?; end + + # valid number ranges are not enforced by parser + # 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/parser_utils.rb#104 + def nz_number; end + + # valid number ranges are not enforced by parser + # nz-number = digit-nz *DIGIT + # ; Non-zero unsigned 32-bit integer + # ; (0 < n < 4,294,967,296) + # valid number ranges are not enforced by parser + # nz-number64 = digit-nz *DIGIT + # ; Unsigned 63-bit integer + # ; (0 < n <= 9,223,372,036,854,775,807) + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def nz_number64; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def nz_number?; end + + # :call-seq: + # parse(str) -> ContinuationRequest + # parse(str) -> UntaggedResponse + # parse(str) -> TaggedResponse + # + # Raises ResponseParseError for unparsable strings. + # + # source://net-imap//lib/net/imap/response_parser.rb#28 + def parse(str); end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#30 + def peek_PLUS?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#30 + def peek_SP?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#30 + def peek_STAR?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#30 + def peek_lbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#30 + def peek_lpar?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#30 + def peek_rbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#30 + def peek_rpar?; end + + # valid number ranges are not enforced by parser + # nz-number = digit-nz *DIGIT + # ; Non-zero unsigned 32-bit integer + # ; (0 < n < 4,294,967,296) + # valid number ranges are not enforced by parser + # nz-number64 = digit-nz *DIGIT + # ; Unsigned 63-bit integer + # ; (0 < n <= 9,223,372,036,854,775,807) + # RFC7162: + # mod-sequence-value = 1*DIGIT + # ;; Positive unsigned 63-bit integer + # ;; (mod-sequence) + # ;; (1 <= n <= 9,223,372,036,854,775,807). + # RFC7162: + # permsg-modsequence = mod-sequence-value + # ;; Per-message mod-sequence. + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def permsg_modsequence; end + + # Used when servers erroneously send an extra SP. + # + # As of 2023-11-28, Outlook.com (still) sends SP + # between +address+ in env-* lists. + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def quirky_SP?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def quoted; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def quoted?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#46 + def rbra; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def rbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#46 + def rpar; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def rpar?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def string; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def string8; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def string8?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def string?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def tagged_ext_label; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def tagged_ext_label?; end + + # valid number ranges are not enforced by parser + # nz-number = digit-nz *DIGIT + # ; Non-zero unsigned 32-bit integer + # ; (0 < n < 4,294,967,296) + # valid number ranges are not enforced by parser + # uniqueid = nz-number + # ; Strictly ascending + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def uniqueid; end + + # valid number ranges are not enforced by parser + # + # a 64-bit unsigned integer and is the decimal equivalent for the ID hex + # string used in the web interface and the Gmail API. + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def x_gm_id; end + + private + + # The RFC is very strict about this and usually we should be too. + # But skipping spaces is usually a safe workaround for buggy servers. + # + # This advances @pos directly so it's safe before changing @lex_state. + # + # source://net-imap//lib/net/imap/response_parser.rb#2023 + def accept_spaces; end + + # acl-data = "ACL" SP mailbox *(SP identifier SP rights) + # + # source://net-imap//lib/net/imap/response_parser.rb#1424 + def acl_data; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#543 + def addr_adl; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#543 + def addr_host; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#543 + def addr_mailbox; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#543 + def addr_name; end + + # address = "(" addr-name SP addr-adl SP addr-mailbox SP + # addr-host ")" + # addr-adl = nstring + # addr-host = nstring + # addr-mailbox = nstring + # addr-name = nstring + # + # source://net-imap//lib/net/imap/response_parser.rb#1892 + def address; end + + # astring = 1*ASTRING-CHAR / string + # + # source://net-imap//lib/net/imap/response_parser.rb#503 + def astring; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser.rb#507 + def astring?; end + + # source://net-imap//lib/net/imap/response_parser.rb#488 + 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 + def atom; end + + # the #accept version of #atom + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser.rb#492 + def atom?; end + + # RFC-3501 & RFC-9051: + # body = "(" (body-type-1part / body-type-mpart) ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1009 + def body; end + + # RFC2060 + # body_ext_1part ::= body_fld_md5 [SPACE body_fld_dsp + # [SPACE body_fld_lang + # [SPACE 1#body_extension]]] + # ;; MUST NOT be returned on non-extensible + # ;; "BODY" fetch + # RFC3501 & RFC9051 + # body-ext-1part = body-fld-md5 [SP body-fld-dsp [SP body-fld-lang + # [SP body-fld-loc *(SP body-extension)]]] + # ; MUST NOT be returned on non-extensible + # ; "BODY" fetch + # + # source://net-imap//lib/net/imap/response_parser.rb#1180 + def body_ext_1part; end + + # RFC-2060: + # body_ext_mpart = body_fld_param [SP body_fld_dsp SP body_fld_lang + # [SP 1#body_extension]] + # ;; MUST NOT be returned on non-extensible + # ;; "BODY" fetch + # RFC-3501 & RFC-9051: + # body-ext-mpart = body-fld-param [SP body-fld-dsp [SP body-fld-lang + # [SP body-fld-loc *(SP body-extension)]]] + # ; MUST NOT be returned on non-extensible + # ; "BODY" fetch + # + # source://net-imap//lib/net/imap/response_parser.rb#1199 + def body_ext_mpart; end + + # body-extension = nstring / number / number64 / + # "(" body-extension *(SP body-extension) ")" + # ; Future expansion. Client implementations + # ; MUST accept body-extension fields. Server + # ; implementations MUST NOT generate + # ; body-extension fields except as defined by + # ; future Standard or Standards Track + # ; revisions of this specification. + # + # source://net-imap//lib/net/imap/response_parser.rb#1256 + def body_extension; end + + # body-extension *(SP body-extension) + # + # source://net-imap//lib/net/imap/response_parser.rb#1242 + 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 + def body_fields; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#543 + def body_fld_desc; end + + # body-fld-dsp = "(" string SP body-fld-param ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#1221 + def body_fld_dsp; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#543 + def body_fld_id; end + + # body-fld-lang = nstring / "(" string *(SP string) ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1230 + def body_fld_lang; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#543 + def body_fld_loc; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#543 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + def body_type_text; end + + # Returns atom.upcase + # capability = ("AUTH=" auth-type) / atom + # ; New capabilities MUST begin with "X" or be + # ; registered with IANA as standard or + # ; standards-track + # + # source://net-imap//lib/net/imap/response_parser.rb#495 + def capability; end + + # Returns atom?&.upcase + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser.rb#498 + 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 + def capability__list; end + + # The presence of "IMAP4rev1" or "IMAP4rev2" is unenforced here. + # The grammar rule is used by both response-data and resp-text-code. + # But this method only returns UntaggedResponse (response-data). + # + # RFC3501: + # capability-data = "CAPABILITY" *(SP capability) SP "IMAP4rev1" + # *(SP capability) + # RFC9051: + # capability-data = "CAPABILITY" *(SP capability) SP "IMAP4rev2" + # *(SP capability) + # + # source://net-imap//lib/net/imap/response_parser.rb#1616 + def capability_data__untagged; end + + # Returns atom.upcase + # + # source://net-imap//lib/net/imap/response_parser.rb#495 + def case_insensitive__atom; end + + # Returns atom?&.upcase + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser.rb#498 + def case_insensitive__atom?; end + + # use where nstring represents "LABEL" values + # + # source://net-imap//lib/net/imap/response_parser.rb#556 + 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 + def charset; end + + # "(" charset *(SP charset) ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1846 + def charset__list; end + + # source://net-imap//lib/net/imap/response_parser.rb#748 + def comparator_data(klass = T.unsafe(nil)); end + + # RFC3501 & RFC9051: + # continue-req = "+" SP (resp-text / base64) CRLF + # + # n.b: base64 is valid resp-text. And in the spirit of RFC9051 Appx E 23 + # (and to workaround existing servers), we use the following grammar: + # + # continue-req = "+" (SP (resp-text)) CRLF + # + # source://net-imap//lib/net/imap/response_parser.rb#673 + def continue_req; end + + # enable-data = "ENABLED" *(SP capability) + # + # source://net-imap//lib/net/imap/response_parser.rb#1621 + def enable_data; end + + # env-from = "(" 1*address ")" / nil + # env-sender = "(" 1*address ")" / nil + # env-reply-to = "(" 1*address ")" / nil + # env-to = "(" 1*address ")" / nil + # env-cc = "(" 1*address ")" / nil + # env-bcc = "(" 1*address ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#983 + def env_bcc; end + + # env-from = "(" 1*address ")" / nil + # env-sender = "(" 1*address ")" / nil + # env-reply-to = "(" 1*address ")" / nil + # env-to = "(" 1*address ")" / nil + # env-cc = "(" 1*address ")" / nil + # env-bcc = "(" 1*address ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#983 + def env_cc; end + + # nstring = string / nil + # env-date = nstring + # env-subject = nstring + # env-in-reply-to = nstring + # env-message-id = nstring + # + # source://net-imap//lib/net/imap/response_parser.rb#543 + def env_date; end + + # env-from = "(" 1*address ")" / nil + # env-sender = "(" 1*address ")" / nil + # env-reply-to = "(" 1*address ")" / nil + # env-to = "(" 1*address ")" / nil + # env-cc = "(" 1*address ")" / nil + # env-bcc = "(" 1*address ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#983 + def env_from; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#543 + def env_in_reply_to; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#543 + def env_message_id; end + + # env-from = "(" 1*address ")" / nil + # env-sender = "(" 1*address ")" / nil + # env-reply-to = "(" 1*address ")" / nil + # env-to = "(" 1*address ")" / nil + # env-cc = "(" 1*address ")" / nil + # env-bcc = "(" 1*address ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#983 + def env_reply_to; end + + # env-from = "(" 1*address ")" / nil + # env-sender = "(" 1*address ")" / nil + # env-reply-to = "(" 1*address ")" / nil + # env-to = "(" 1*address ")" / nil + # env-cc = "(" 1*address ")" / nil + # env-bcc = "(" 1*address ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#983 + def env_sender; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#543 + def env_subject; end + + # env-from = "(" 1*address ")" / nil + # env-sender = "(" 1*address ")" / nil + # env-reply-to = "(" 1*address ")" / nil + # env-to = "(" 1*address ")" / nil + # env-cc = "(" 1*address ")" / nil + # env-bcc = "(" 1*address ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#983 + def env_to; end + + # RFC3501 & RFC9051: + # envelope = "(" env-date SP env-subject SP env-from SP + # 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 + def envelope; end + + # source://net-imap//lib/net/imap/response_parser.rb#748 + def esearch_response(klass = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/response_parser.rb#748 + def expunged_resp(klass = T.unsafe(nil)); end + + # flag-list = "(" [flag *(SP flag)] ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1913 + def flag_list; end + + # "(" [flag-perm *(SP flag-perm)] ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1923 + 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 + def gt__number__lt; end + + # RFC3501 & RFC9051: + # header-fld-name = astring + # + # NOTE: Previously, Net::IMAP recreated the raw original source string. + # Now, it grabs the raw encoded value using @str and @pos. A future + # version may simply return the decoded astring value. Although that is + # technically incompatible, it should almost never make a difference: all + # standard header field names are valid atoms: + # + # https://www.iana.org/assignments/message-headers/message-headers.xhtml + # + # Although RFC3501 allows any astring, RFC5322-valid header names are one + # or more of the printable US-ASCII characters, except SP and colon. So + # empty string isn't valid, and literals aren't needed and should not be + # used. This is explicitly unchanged by [I18N-HDRS] (RFC6532). + # + # RFC5233: + # optional-field = field-name ":" unstructured CRLF + # field-name = 1*ftext + # ftext = %d33-57 / ; Printable US-ASCII + # %d59-126 ; characters not including + # ; ":". + # + # source://net-imap//lib/net/imap/response_parser.rb#1334 + def header_fld_name; end + + # header-list = "(" header-fld-name *(SP header-fld-name) ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1300 + def header_list; end + + # source://net-imap//lib/net/imap/response_parser.rb#1640 + 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 + 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 + def label_in(*labels); end + + # source://net-imap//lib/net/imap/response_parser.rb#748 + def language_data(klass = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/response_parser.rb#748 + def listrights_data(klass = T.unsafe(nil)); end + + # astring = 1*ASTRING-CHAR / string + # mailbox = "INBOX" / astring + # ; INBOX is case-insensitive. All case variants of + # ; INBOX (e.g., "iNbOx") MUST be interpreted as INBOX + # ; not as an astring. An astring which consists of + # ; the case-insensitive sequence "I" "N" "B" "O" "X" + # ; is considered to be INBOX and not an astring. + # ; Refer to section 5.1 for further + # ; semantic details of mailbox names. + # + # source://net-imap//lib/net/imap/response_parser.rb#503 + def mailbox; end + + # source://net-imap//lib/net/imap/response_parser.rb#832 + def mailbox_data__exists; end + + # mailbox-data = "FLAGS" SP flag-list / "LIST" SP mailbox-list / + # "LSUB" SP mailbox-list / "SEARCH" *(SP nz-number) / + # "STATUS" SP mailbox SP "(" [status-att-list] ")" / + # number SP "EXISTS" / number SP "RECENT" + # + # source://net-imap//lib/net/imap/response_parser.rb#1346 + def mailbox_data__flags; end + + # source://net-imap//lib/net/imap/response_parser.rb#1352 + def mailbox_data__list; end + + # source://net-imap//lib/net/imap/response_parser.rb#1352 + def mailbox_data__lsub; end + + # source://net-imap//lib/net/imap/response_parser.rb#832 + def mailbox_data__recent; end + + # RFC3501: + # mailbox-data = "SEARCH" *(SP nz-number) / ... + # RFC5256: SORT + # sort-data = "SORT" *(SP nz-number) + # RFC7162: CONDSTORE, QRESYNC + # mailbox-data =/ "SEARCH" [1*(SP nz-number) SP + # search-sort-mod-seq] + # sort-data = "SORT" [1*(SP nz-number) SP + # search-sort-mod-seq] + # ; Updates the SORT response from RFC 5256. + # search-sort-mod-seq = "(" "MODSEQ" SP mod-sequence-value ")" + # RFC9051: + # mailbox-data = obsolete-search-response / ... + # obsolete-search-response = "SEARCH" *(SP nz-number) + # + # source://net-imap//lib/net/imap/response_parser.rb#1464 + def mailbox_data__search; end + + # mailbox-data =/ "STATUS" SP mailbox SP "(" [status-att-list] ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1530 + def mailbox_data__status; end + + # source://net-imap//lib/net/imap/response_parser.rb#1352 + def mailbox_data__xlist; end + + # mailbox-list = "(" [mbx-list-flags] ")" SP + # (DQUOTE QUOTED-CHAR DQUOTE / nil) SP mailbox + # [SP mbox-list-extended] + # ; 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 + def mailbox_list; end + + # See Patterns::MBX_LIST_FLAGS + # + # source://net-imap//lib/net/imap/response_parser.rb#1941 + def mbx_list_flags; end + + # n.b. this handles both type and subtype + # + # RFC-3501 vs RFC-9051: + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "MESSAGE" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "FONT" / "MESSAGE" / "MODEL" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE "RFC822" DQUOTE + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE ("RFC822" / "GLOBAL") DQUOTE + # + # RFC-3501 & RFC-9051: + # media-text = DQUOTE "TEXT" DQUOTE SP media-subtype + # media-subtype = string + # TODO: check types + # + # source://net-imap//lib/net/imap/response_parser.rb#1128 + def media_basic; end + + # n.b. this handles both type and subtype + # + # RFC-3501 vs RFC-9051: + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "MESSAGE" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "FONT" / "MESSAGE" / "MODEL" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE "RFC822" DQUOTE + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE ("RFC822" / "GLOBAL") DQUOTE + # + # RFC-3501 & RFC-9051: + # media-text = DQUOTE "TEXT" DQUOTE SP media-subtype + # media-subtype = string + # */* --- catchall + # + # source://net-imap//lib/net/imap/response_parser.rb#1128 + def media_message; end + + # n.b. this handles both type and subtype + # + # RFC-3501 vs RFC-9051: + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "MESSAGE" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "FONT" / "MESSAGE" / "MODEL" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE "RFC822" DQUOTE + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE ("RFC822" / "GLOBAL") DQUOTE + # + # RFC-3501 & RFC-9051: + # media-text = DQUOTE "TEXT" DQUOTE SP media-subtype + # media-subtype = string + # message/rfc822, message/global + # + # source://net-imap//lib/net/imap/response_parser.rb#1128 + def media_text; end + + # n.b. this handles both type and subtype + # + # RFC-3501 vs RFC-9051: + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "MESSAGE" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "FONT" / "MESSAGE" / "MODEL" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE "RFC822" DQUOTE + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE ("RFC822" / "GLOBAL") DQUOTE + # + # RFC-3501 & RFC-9051: + # media-text = DQUOTE "TEXT" DQUOTE SP media-subtype + # media-subtype = string + # + # source://net-imap//lib/net/imap/response_parser.rb#1128 + def media_type; end + + # source://net-imap//lib/net/imap/response_parser.rb#748 + def message_data__converted(klass = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/response_parser.rb#832 + 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 + def message_data__fetch; end + + # source://net-imap//lib/net/imap/response_parser.rb#748 + def metadata_resp(klass = T.unsafe(nil)); end + + # RFC3501 & RFC9051: + # msg-att = "(" (msg-att-dynamic / msg-att-static) + # *(SP (msg-att-dynamic / msg-att-static)) ")" + # + # msg-att-dynamic = "FLAGS" SP "(" [flag-fetch *(SP flag-fetch)] ")" + # RFC5257 (ANNOTATE extension): + # msg-att-dynamic =/ "ANNOTATION" SP + # ( "(" entry-att *(SP entry-att) ")" / + # "(" entry *(SP entry) ")" ) + # RFC7162 (CONDSTORE extension): + # msg-att-dynamic =/ fetch-mod-resp + # fetch-mod-resp = "MODSEQ" SP "(" permsg-modsequence ")" + # RFC8970 (PREVIEW extension): + # msg-att-dynamic =/ "PREVIEW" SP nstring + # + # RFC3501: + # msg-att-static = "ENVELOPE" SP envelope / + # "INTERNALDATE" SP date-time / + # "RFC822" [".HEADER" / ".TEXT"] SP nstring / + # "RFC822.SIZE" SP number / + # "BODY" ["STRUCTURE"] SP body / + # "BODY" section ["<" number ">"] SP nstring / + # "UID" SP uniqueid + # RFC3516 (BINARY extension): + # msg-att-static =/ "BINARY" section-binary SP (nstring / literal8) + # / "BINARY.SIZE" section-binary SP number + # RFC8514 (SAVEDATE extension): + # msg-att-static =/ "SAVEDATE" SP (date-time / nil) + # RFC8474 (OBJECTID extension): + # msg-att-static =/ fetch-emailid-resp / fetch-threadid-resp + # fetch-emailid-resp = "EMAILID" SP "(" objectid ")" + # fetch-threadid-resp = "THREADID" SP ( "(" objectid ")" / nil ) + # RFC9051: + # msg-att-static = "ENVELOPE" SP envelope / + # "INTERNALDATE" SP date-time / + # "RFC822.SIZE" SP number64 / + # "BODY" ["STRUCTURE"] SP body / + # "BODY" section ["<" number ">"] SP nstring / + # "BINARY" section-binary SP (nstring / literal8) / + # "BINARY.SIZE" section-binary SP number / + # "UID" SP uniqueid + # + # Re https://www.rfc-editor.org/errata/eid7246, I'm adding "offset" to the + # official "BINARY" ABNF, like so: + # + # msg-att-static =/ "BINARY" section-binary ["<" number ">"] SP + # (nstring / literal8) + # + # source://net-imap//lib/net/imap/response_parser.rb#889 + def msg_att(n); end + + # appends "[section]" and "" to the base label + # + # source://net-imap//lib/net/imap/response_parser.rb#926 + def msg_att__label; end + + # source://net-imap//lib/net/imap/response_parser.rb#748 + def myrights_data(klass = T.unsafe(nil)); end + + # namespace = nil / "(" 1*namespace-descr ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1687 + 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 + def namespace_descr; end + + # namespace-response = "NAMESPACE" SP namespace + # SP namespace SP namespace + # ; The first Namespace is the Personal Namespace(s). + # ; The second Namespace is the Other Users' + # ; Namespace(s). + # ; The third Namespace is the Shared Namespace(s). + # + # source://net-imap//lib/net/imap/response_parser.rb#1675 + 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 + def namespace_response_extensions; end + + # source://net-imap//lib/net/imap/response_parser.rb#551 + def ndatetime; end + + # source://net-imap//lib/net/imap/response_parser.rb#2030 + def next_token; end + + # source://net-imap//lib/net/imap/response_parser.rb#2012 + def nil_atom; end + + # env-from = "(" 1*address ")" / nil + # env-sender = "(" 1*address ")" / nil + # env-reply-to = "(" 1*address ")" / nil + # env-to = "(" 1*address ")" / nil + # env-cc = "(" 1*address ")" / nil + # env-bcc = "(" 1*address ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#983 + def nlist__address; end + + # source://net-imap//lib/net/imap/response_parser.rb#1990 + def nparens__objectid; end + + # source://net-imap//lib/net/imap/response_parser.rb#551 + def nquoted; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#543 + def nstring; end + + # source://net-imap//lib/net/imap/response_parser.rb#547 + def nstring8; end + + # TODO: handle atom, astring_chars, and tag entirely inside the lexer + # RFC8474: + # objectid = 1*255(ALPHA / DIGIT / "_" / "-") + # ; characters in object identifiers are case + # ; significant + # + # source://net-imap//lib/net/imap/response_parser.rb#487 + def objectid; end + + # source://net-imap//lib/net/imap/response_parser.rb#1981 + def parens__modseq; end + + # source://net-imap//lib/net/imap/response_parser.rb#1989 + 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 + def quirky__flag_list(name); end + + # source://net-imap//lib/net/imap/response_parser.rb#1373 + def quota_response; end + + # source://net-imap//lib/net/imap/response_parser.rb#1406 + def quotaroot_response; end + + # reads all the way up until CRLF + # + # source://net-imap//lib/net/imap/response_parser.rb#761 + 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 + def resp_code__capability; end + + # already matched: "APPENDUID" + # + # +UIDPLUS+ ABNF:: https://www.rfc-editor.org/rfc/rfc4315.html#section-4 + # resp-code-apnd = "APPENDUID" SP nz-number SP append-uid + # append-uid = uniqueid + # append-uid =/ uid-set + # ; only permitted if client uses [MULTIAPPEND] + # ; to append multiple messages. + # + # 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 + 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 + def resp_code_copy__data; end + + # resp-cond-auth = ("OK" / "PREAUTH") SP resp-text + # + # NOTE: In the spirit of RFC9051 Appx E 23 (and to workaround existing + # servers), we don't require a final SP and instead parse this as: + # + # resp-cond-auth = ("OK" / "PREAUTH") [SP resp-text] + # + # source://net-imap//lib/net/imap/response_parser.rb#806 + 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 + def resp_cond_auth__name; end + + # resp-cond-bye = "BYE" SP resp-text + # + # NOTE: In the spirit of RFC9051 Appx E 23 (and to workaround existing + # servers), we don't require a final SP and instead parse this as: + # + # resp-cond-bye = "BYE" [SP resp-text] + # + # source://net-imap//lib/net/imap/response_parser.rb#818 + def resp_cond_bye; end + + # RFC3501 & RFC9051: + # resp-cond-state = ("OK" / "NO" / "BAD") SP resp-text + # + # NOTE: In the spirit of RFC9051 Appx E 23 (and to workaround existing + # servers), we don't require a final SP and instead parse this as: + # + # resp-cond-state = ("OK" / "NO" / "BAD") [SP resp-text] + # + # source://net-imap//lib/net/imap/response_parser.rb#792 + 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 + def resp_cond_state__name; end + + # source://net-imap//lib/net/imap/response_parser.rb#796 + def resp_cond_state__untagged; end + + # RFC3501: + # resp-text = ["[" resp-text-code "]" SP] text + # RFC9051: + # resp-text = ["[" resp-text-code "]" SP] [text] + # + # We leniently re-interpret this as + # resp-text = ["[" resp-text-code "]" [SP [text]] / [text] + # + # source://net-imap//lib/net/imap/response_parser.rb#1746 + def resp_text; end + + # RFC3501 (See https://www.rfc-editor.org/errata/rfc3501): + # resp-text-code = "ALERT" / + # "BADCHARSET" [SP "(" charset *(SP charset) ")" ] / + # capability-data / "PARSE" / + # "PERMANENTFLAGS" SP "(" [flag-perm *(SP flag-perm)] ")" / + # "READ-ONLY" / "READ-WRITE" / "TRYCREATE" / + # "UIDNEXT" SP nz-number / "UIDVALIDITY" SP nz-number / + # "UNSEEN" SP nz-number / + # atom [SP 1*] + # capability-data = "CAPABILITY" *(SP capability) SP "IMAP4rev1" + # *(SP capability) + # + # RFC5530: + # resp-text-code =/ "UNAVAILABLE" / "AUTHENTICATIONFAILED" / + # "AUTHORIZATIONFAILED" / "EXPIRED" / + # "PRIVACYREQUIRED" / "CONTACTADMIN" / "NOPERM" / + # "INUSE" / "EXPUNGEISSUED" / "CORRUPTION" / + # "SERVERBUG" / "CLIENTBUG" / "CANNOT" / + # "LIMIT" / "OVERQUOTA" / "ALREADYEXISTS" / + # "NONEXISTENT" + # RFC9051: + # resp-text-code = "ALERT" / + # "BADCHARSET" [SP "(" charset *(SP charset) ")" ] / + # capability-data / "PARSE" / + # "PERMANENTFLAGS" SP "(" [flag-perm *(SP flag-perm)] ")" / + # "READ-ONLY" / "READ-WRITE" / "TRYCREATE" / + # "UIDNEXT" SP nz-number / "UIDVALIDITY" SP nz-number / + # resp-code-apnd / resp-code-copy / "UIDNOTSTICKY" / + # "UNAVAILABLE" / "AUTHENTICATIONFAILED" / + # "AUTHORIZATIONFAILED" / "EXPIRED" / + # "PRIVACYREQUIRED" / "CONTACTADMIN" / "NOPERM" / + # "INUSE" / "EXPUNGEISSUED" / "CORRUPTION" / + # "SERVERBUG" / "CLIENTBUG" / "CANNOT" / + # "LIMIT" / "OVERQUOTA" / "ALREADYEXISTS" / + # "NONEXISTENT" / "NOTSAVED" / "HASCHILDREN" / + # "CLOSED" / + # "UNKNOWN-CTE" / + # atom [SP 1*] + # capability-data = "CAPABILITY" *(SP capability) SP "IMAP4rev2" + # *(SP capability) + # + # RFC4315 (UIDPLUS), RFC9051 (IMAP4rev2): + # resp-code-apnd = "APPENDUID" SP nz-number SP append-uid + # resp-code-copy = "COPYUID" SP nz-number SP uid-set SP uid-set + # resp-text-code =/ resp-code-apnd / resp-code-copy / "UIDNOTSTICKY" + # + # RFC7162 (CONDSTORE): + # resp-text-code =/ "HIGHESTMODSEQ" SP mod-sequence-value / + # "NOMODSEQ" / + # "MODIFIED" SP sequence-set + # RFC7162 (QRESYNC): + # resp-text-code =/ "CLOSED" + # + # RFC8474: OBJECTID + # resp-text-code =/ "MAILBOXID" SP "(" objectid ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1810 + def resp_text_code; end + + # Returns atom.upcase + # + # source://net-imap//lib/net/imap/response_parser.rb#495 + def resp_text_code__name; end + + # [RFC3501 & RFC9051:] + # response = *(continue-req / response-data) response-done + # + # For simplicity, response isn't interpreted as the combination of the + # three response types, but instead represents any individual server + # response. Our simplified interpretation is defined as: + # response = continue-req | response_data | response-tagged + # + # n.b: our "response-tagged" definition parses "greeting" too. + # + # source://net-imap//lib/net/imap/response_parser.rb#654 + def response; end + + # [RFC3501:] + # response-data = "*" SP (resp-cond-state / resp-cond-bye / + # mailbox-data / message-data / capability-data) CRLF + # [RFC4466:] + # response-data = "*" SP response-payload CRLF + # response-payload = resp-cond-state / resp-cond-bye / + # mailbox-data / message-data / capability-data + # RFC5161 (ENABLE capability): + # response-data =/ "*" SP enable-data CRLF + # RFC5255 (LANGUAGE capability) + # response-payload =/ language-data + # RFC5255 (I18NLEVEL=1 and I18NLEVEL=2 capabilities) + # response-payload =/ comparator-data + # [RFC9051:] + # response-data = "*" SP (resp-cond-state / resp-cond-bye / + # mailbox-data / message-data / capability-data / + # enable-data) CRLF + # + # [merging in greeting and response-fatal:] + # greeting = "*" SP (resp-cond-auth / resp-cond-bye) CRLF + # response-fatal = "*" SP resp-cond-bye CRLF + # response-data =/ "*" SP (resp-cond-auth / resp-cond-bye) CRLF + # [removing duplicates, this is simply] + # response-payload =/ resp-cond-auth + # + # TODO: remove resp-cond-auth and handle greeting separately + # + # source://net-imap//lib/net/imap/response_parser.rb#706 + def response_data; end + + # source://net-imap//lib/net/imap/response_parser.rb#766 + def response_data__ignored; end + + # source://net-imap//lib/net/imap/response_parser.rb#766 + def response_data__noop; end + + # source://net-imap//lib/net/imap/response_parser.rb#832 + def response_data__simple_numeric; end + + # source://net-imap//lib/net/imap/response_parser.rb#748 + 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 + def response_tagged; end + + # section = "[" [section-spec] "]" + # + # source://net-imap//lib/net/imap/response_parser.rb#1264 + def section; end + + # section-binary = "[" [section-part] "]" + # + # source://net-imap//lib/net/imap/response_parser.rb#1271 + def section_binary; end + + # TODO: handle atom, astring_chars, and tag entirely inside the lexer + # section-part = nz-number *("." nz-number) + # ; body part reference. + # ; Allows for accessing nested body parts. + # + # source://net-imap//lib/net/imap/response_parser.rb#487 + def section_part; end + + # section-spec = section-msgtext / (section-part ["." section-text]) + # section-msgtext = "HEADER" / + # "HEADER.FIELDS" [".NOT"] SP header-list / + # "TEXT" + # ; top-level or MESSAGE/RFC822 or + # ; MESSAGE/GLOBAL part + # section-part = nz-number *("." nz-number) + # ; body part reference. + # ; Allows for accessing nested body parts. + # section-text = section-msgtext / "MIME" + # ; text other than actual body part (headers, + # ; etc.) + # + # 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 + def section_spec; end + + # sequence-set = (seq-number / seq-range) ["," sequence-set] + # sequence-set =/ seq-last-command + # ; Allow for "result of the last command" + # ; indicator. + # seq-last-command = "$" + # + # *note*: doesn't match seq-last-command + # + # source://net-imap//lib/net/imap/response_parser.rb#468 + def sequence_set; end + + # RFC3501: + # mailbox-data = "SEARCH" *(SP nz-number) / ... + # RFC5256: SORT + # sort-data = "SORT" *(SP nz-number) + # RFC7162: CONDSTORE, QRESYNC + # mailbox-data =/ "SEARCH" [1*(SP nz-number) SP + # search-sort-mod-seq] + # sort-data = "SORT" [1*(SP nz-number) SP + # search-sort-mod-seq] + # ; Updates the SORT response from RFC 5256. + # search-sort-mod-seq = "(" "MODSEQ" SP mod-sequence-value ")" + # RFC9051: + # mailbox-data = obsolete-search-response / ... + # obsolete-search-response = "SEARCH" *(SP nz-number) + # + # source://net-imap//lib/net/imap/response_parser.rb#1464 + def sort_data; end + + # RFC3501 + # status-att-list = status-att SP number *(SP status-att SP number) + # 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 + def status_att_list; end + + # RFC3501 Errata: + # status-att-val = ("MESSAGES" SP number) / ("RECENT" SP number) / + # ("UIDNEXT" SP nz-number) / ("UIDVALIDITY" SP nz-number) / + # ("UNSEEN" SP number) + # RFC4466: + # status-att-val = ("MESSAGES" SP number) / + # ("RECENT" SP number) / + # ("UIDNEXT" SP nz-number) / + # ("UIDVALIDITY" SP nz-number) / + # ("UNSEEN" SP number) + # ;; Extensions to the STATUS responses + # ;; should extend this production. + # ;; Extensions should use the generic + # ;; syntax defined by tagged-ext. + # RFC9051: + # status-att-val = ("MESSAGES" SP number) / + # ("UIDNEXT" SP nz-number) / + # ("UIDVALIDITY" SP nz-number) / + # ("UNSEEN" SP number) / + # ("DELETED" SP number) / + # ("SIZE" SP number64) + # ; Extensions to the STATUS responses + # ; should extend this production. + # ; Extensions should use the generic + # ; syntax defined by tagged-ext. + # RFC7162: + # status-att-val =/ "HIGHESTMODSEQ" SP mod-sequence-valzer + # ;; Extends non-terminal defined in [RFC4466]. + # ;; Value 0 denotes that the mailbox doesn't + # ;; support persistent mod-sequences + # ;; as described in Section 3.1.2.2. + # RFC7889: + # status-att-val =/ "APPENDLIMIT" SP (number / nil) + # ;; status-att-val is defined in RFC 4466 + # RFC8438: + # status-att-val =/ "SIZE" SP number64 + # RFC8474: + # status-att-val =/ "MAILBOXID" SP "(" objectid ")" + # ; follows tagged-ext production from [RFC4466] + # + # source://net-imap//lib/net/imap/response_parser.rb#1586 + def status_att_val; end + + # source://net-imap//lib/net/imap/response_parser.rb#489 + def tag; end + + # tagged-ext-comp = astring / + # tagged-ext-comp *(SP tagged-ext-comp) / + # "(" tagged-ext-comp ")" + # ; Extensions that follow this general + # ; syntax should use nstring instead of + # ; astring when appropriate in the context + # ; of the extension. + # ; Note that a message set or a "number" + # ; can always be represented as an "atom". + # ; A URL should be represented as + # ; a "quoted" string. + # + # source://net-imap//lib/net/imap/response_parser.rb#571 + def tagged_ext_comp; end + + # tagged-ext-simple is a subset of atom + # TODO: recognize sequence-set in the lexer + # + # tagged-ext-simple = sequence-set / number / number64 + # + # source://net-imap//lib/net/imap/response_parser.rb#588 + def tagged_ext_simple; end + + # tagged-ext-val = tagged-ext-simple / + # "(" [tagged-ext-comp] ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#594 + def tagged_ext_val; end + + # TEXT-CHAR = + # RFC3501: + # text = 1*TEXT-CHAR + # RFC9051: + # text = 1*(TEXT-CHAR / UTF8-2 / UTF8-3 / UTF8-4) + # ; Non-ASCII text can only be returned + # ; after ENABLE IMAP4rev2 command + # + # source://net-imap//lib/net/imap/response_parser.rb#1730 + def text; end + + # an "accept" versiun of #text + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser.rb#1735 + def text?; end + + # 1* + # + # source://net-imap//lib/net/imap/response_parser.rb#1841 + 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 + def thread_data; end + + # RFC5256: THREAD + # thread-list = "(" (thread-members / thread-nested) ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1494 + 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 + def thread_members; end + + # RFC5256: THREAD + # thread-nested = 2*thread-list + # + # source://net-imap//lib/net/imap/response_parser.rb#1523 + def thread_nested; end + + # RFC-4315 (UIDPLUS) or RFC9051 (IMAP4rev2): + # uid-set = (uniqueid / uid-range) *("," uid-set) + # uid-range = (uniqueid ":" uniqueid) + # ; two uniqueid values and all values + # ; between these two regardless of order. + # ; Example: 2:4 and 4:2 are equivalent. + # uniqueid = nz-number + # ; Strictly ascending + # + # source://net-imap//lib/net/imap/response_parser.rb#2000 + def uid_set; end + + # source://net-imap//lib/net/imap/response_parser.rb#748 + 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 + def x_gm_label; end + + # See https://developers.google.com/gmail/imap/imap-extensions + # + # source://net-imap//lib/net/imap/response_parser.rb#1951 + def x_gm_labels; end +end + +# ASTRING-CHAR = ATOM-CHAR / resp-specials +# resp-specials = "]" +# +# source://net-imap//lib/net/imap/response_parser.rb#479 +Net::IMAP::ResponseParser::ASTRING_CHARS_TOKENS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#481 +Net::IMAP::ResponseParser::ASTRING_TOKENS = T.let(T.unsafe(nil), Array) + +# basic utility methods for parsing. +# +# (internal API, subject to change) +# +# source://net-imap//lib/net/imap/response_parser/parser_utils.rb#9 +module Net::IMAP::ResponseParser::ParserUtils + private + + # like match, but does not raise error on failure. + # + # returns and shifts token on successful match + # returns nil and leaves @token unshifted on no match + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#148 + def accept(*args); end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#193 + def accept_re(re); end + + # To be used conditionally: + # assert_no_lookahead if Net::IMAP.debug + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#158 + def assert_no_lookahead; end + + # TODO: after checking the lookahead, use a regexp for remaining chars. + # That way a loop isn't needed. + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#121 + def combine_adjacent(*tokens); end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#169 + def lookahead; end + + # like match, without consuming the token + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#174 + def lookahead!(*args); end + + # like accept, without consuming the token + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#165 + def lookahead?(*symbols); end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#133 + def match(*args); end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#199 + def match_re(re, name); end + + # @raise [ResponseParseError] + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#213 + def parse_error(fmt, *args); end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#188 + def peek_re(re); end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#183 + def peek_str?(str); end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#209 + def shift_token; end +end + +# source://net-imap//lib/net/imap/response_parser/parser_utils.rb#11 +module Net::IMAP::ResponseParser::ParserUtils::Generator + # we can skip lexer for single character matches, as a shortcut + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#17 + def def_char_matchers(name, char, token); end + + # TODO: move coersion to the token.value method? + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#62 + def def_token_matchers(name, *token_symbols, coerce: T.unsafe(nil), send: T.unsafe(nil)); end +end + +# source://net-imap//lib/net/imap/response_parser/parser_utils.rb#13 +Net::IMAP::ResponseParser::ParserUtils::Generator::LOOKAHEAD = T.let(T.unsafe(nil), String) + +# 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 +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 + def unescape_quoted(quoted); end + + # source://net-imap//lib/net/imap/response_parser.rb#346 + def unescape_quoted!(quoted); end + + class << self + # source://net-imap//lib/net/imap/response_parser.rb#352 + def unescape_quoted(quoted); end + + # source://net-imap//lib/net/imap/response_parser.rb#346 + def unescape_quoted!(quoted); end + end +end + +# source://net-imap//lib/net/imap/response_parser.rb#174 +Net::IMAP::ResponseParser::Patterns::ASTRING_CHAR = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#178 +Net::IMAP::ResponseParser::Patterns::ASTRING_CHARS = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#172 +Net::IMAP::ResponseParser::Patterns::ASTRING_SPECIALS = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#177 +Net::IMAP::ResponseParser::Patterns::ATOM = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#179 +Net::IMAP::ResponseParser::Patterns::ATOMISH = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#175 +Net::IMAP::ResponseParser::Patterns::ATOM_CHAR = T.let(T.unsafe(nil), Regexp) + +# atomish = 1* +# ; We use "atomish" for msg-att and section, in order +# ; to simplify "BODY[HEADER.FIELDS (foo bar)]". +# +# atom-specials = "(" / ")" / "{" / SP / CTL / list-wildcards / +# quoted-specials / resp-specials +# ATOM-CHAR = +# atom = 1*ATOM-CHAR +# ASTRING-CHAR = ATOM-CHAR / resp-specials +# tag = 1* +# +# source://net-imap//lib/net/imap/response_parser.rb#171 +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 +Net::IMAP::ResponseParser::Patterns::CHAR8 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#187 +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 +Net::IMAP::ResponseParser::Patterns::CODE_TEXT_CHAR = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#79 +module Net::IMAP::ResponseParser::Patterns::CharClassSubtraction; end + +# flag = "\Answered" / "\Flagged" / "\Deleted" / +# "\Seen" / "\Draft" / flag-keyword / flag-extension +# ; Does not include "\Recent" +# flag-extension = "\" atom +# ; Future expansion. Client implementations +# ; MUST accept flag-extension flags. Server +# ; implementations MUST NOT generate +# ; flag-extension flags except as defined by +# ; a future Standard or Standards Track +# ; revisions of this specification. +# flag-keyword = "$MDNSent" / "$Forwarded" / "$Junk" / +# "$NotJunk" / "$Phishing" / atom +# +# flag-perm = flag / "\*" +# +# Not checking for max one mbx-list-sflag in the parser. +# >>> +# mbx-list-oflag = "\Noinferiors" / child-mbox-flag / +# "\Subscribed" / "\Remote" / flag-extension +# ; Other flags; multiple from this list are +# ; possible per LIST response, but each flag +# ; can only appear once per LIST response +# mbx-list-sflag = "\NonExistent" / "\Noselect" / "\Marked" / +# "\Unmarked" +# ; Selectability flags; only one per LIST response +# child-mbox-flag = "\HasChildren" / "\HasNoChildren" +# ; attributes for the CHILDREN return option, at most +# ; one possible per LIST response +# +# source://net-imap//lib/net/imap/response_parser.rb#217 +Net::IMAP::ResponseParser::Patterns::FLAG = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#218 +Net::IMAP::ResponseParser::Patterns::FLAG_EXTENSION = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#219 +Net::IMAP::ResponseParser::Patterns::FLAG_KEYWORD = T.let(T.unsafe(nil), Regexp) + +# flag-list = "(" [flag *(SP flag)] ")" +# resp-text-code =/ "PERMANENTFLAGS" SP +# "(" [flag-perm *(SP flag-perm)] ")" +# mbx-list-flags = *(mbx-list-oflag SP) mbx-list-sflag +# *(SP mbx-list-oflag) / +# 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 +Net::IMAP::ResponseParser::Patterns::FLAG_LIST = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#220 +Net::IMAP::ResponseParser::Patterns::FLAG_PERM = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#231 +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 +Net::IMAP::ResponseParser::Patterns::LIST_WILDCARDS = T.let(T.unsafe(nil), Regexp) + +# RFC3501: +# literal = "{" number "}" CRLF *CHAR8 +# ; Number represents the number of CHAR8s +# RFC9051: +# literal = "{" number64 ["+"] "}" CRLF *CHAR8 +# ; represents the number of CHAR8s. +# ; A non-synchronizing literal is distinguished +# ; from a synchronizing literal by the presence of +# ; "+" before the closing "}". +# ; Non-synchronizing literals are not allowed when +# ; sent from server to the client. +# +# source://net-imap//lib/net/imap/response_parser.rb#332 +Net::IMAP::ResponseParser::Patterns::LITERAL = T.let(T.unsafe(nil), Regexp) + +# RFC3516 (BINARY): +# literal8 = "~{" number "}" CRLF *OCTET +# ; represents the number of OCTETs +# ; in the response string. +# RFC9051: +# literal8 = "~{" number64 "}" CRLF *OCTET +# ; represents the number of OCTETs +# ; in the response string. +# +# source://net-imap//lib/net/imap/response_parser.rb#342 +Net::IMAP::ResponseParser::Patterns::LITERAL8 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#221 +Net::IMAP::ResponseParser::Patterns::MBX_FLAG = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#232 +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 +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 +Net::IMAP::ResponseParser::Patterns::QUIRKY_FLAG = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#236 +Net::IMAP::ResponseParser::Patterns::QUIRKY_FLAGS_LIST = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#247 +Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_esc = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#248 +Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_rev1 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#249 +Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_rev2 = T.let(T.unsafe(nil), Regexp) + +# RFC3501: +# QUOTED-CHAR = / +# "\" quoted-specials +# RFC9051: +# QUOTED-CHAR = / +# "\" quoted-specials / UTF8-2 / UTF8-3 / UTF8-4 +# RFC3501 & RFC9051: +# quoted = DQUOTE *QUOTED-CHAR DQUOTE +# +# source://net-imap//lib/net/imap/response_parser.rb#246 +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 +Net::IMAP::ResponseParser::Patterns::QUOTED_SPECIALS = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#251 +Net::IMAP::ResponseParser::Patterns::QUOTED_rev1 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#252 +Net::IMAP::ResponseParser::Patterns::QUOTED_rev2 = T.let(T.unsafe(nil), Regexp) + +# resp-specials = "]" +# +# source://net-imap//lib/net/imap/response_parser.rb#158 +Net::IMAP::ResponseParser::Patterns::RESP_SPECIALS = T.let(T.unsafe(nil), Regexp) + +# UTF-8, a transformation format of ISO 10646 +# >>> +# UTF8-1 = %x00-7F +# UTF8-tail = %x80-BF +# UTF8-2 = %xC2-DF UTF8-tail +# UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) / +# %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail ) +# UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) / +# %xF4 %x80-8F 2( UTF8-tail ) +# UTF8-char = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4 +# UTF8-octets = *( UTF8-char ) +# +# n.b. String * Integer is used for repetition, rather than /x{3}/, +# because ruby 3.2's linear-time cache-based optimization doesn't work +# with "bounded or fixed times repetition nesting in another repetition +# (e.g. /(a{2,3})*/). It is an implementation issue entirely, but we +# 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 +module Net::IMAP::ResponseParser::Patterns::RFC3629; end + +# aka ASCII 7bit +# +# source://net-imap//lib/net/imap/response_parser.rb#132 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_1 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#134 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_2 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#135 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_3 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#139 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_4 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#142 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_CHAR = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#143 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_OCTETS = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#133 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_TAIL = T.let(T.unsafe(nil), Regexp) + +# From RFC5234, "Augmented BNF for Syntax Specifications: ABNF" +# >>> +# ALPHA = %x41-5A / %x61-7A ; A-Z / a-z +# CHAR = %x01-7F +# CRLF = CR LF +# ; Internet standard newline +# CTL = %x00-1F / %x7F +# ; controls +# DIGIT = %x30-39 +# ; 0-9 +# DQUOTE = %x22 +# ; " (Double Quote) +# HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" +# OCTET = %x00-FF +# SP = %x20 +# +# source://net-imap//lib/net/imap/response_parser.rb#101 +module Net::IMAP::ResponseParser::Patterns::RFC5234; end + +# source://net-imap//lib/net/imap/response_parser.rb#102 +Net::IMAP::ResponseParser::Patterns::RFC5234::ALPHA = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#103 +Net::IMAP::ResponseParser::Patterns::RFC5234::CHAR = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#104 +Net::IMAP::ResponseParser::Patterns::RFC5234::CRLF = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#105 +Net::IMAP::ResponseParser::Patterns::RFC5234::CTL = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#106 +Net::IMAP::ResponseParser::Patterns::RFC5234::DIGIT = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#107 +Net::IMAP::ResponseParser::Patterns::RFC5234::DQUOTE = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#108 +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 +Net::IMAP::ResponseParser::Patterns::RFC5234::OCTET = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#110 +Net::IMAP::ResponseParser::Patterns::RFC5234::SP = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#318 +Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET = T.let(T.unsafe(nil), Regexp) + +# sequence-set = (seq-number / seq-range) ["," sequence-set] +# ; set of seq-number values, regardless of order. +# ; Servers MAY coalesce overlaps and/or execute +# ; the sequence in any order. +# ; Example: a message sequence number set of +# ; 2,4:7,9,12:* for a mailbox with 15 messages is +# ; equivalent to 2,4,5,6,7,9,12,13,14,15 +# ; Example: a message sequence number set of +# ; *:4,5:7 for a mailbox with 10 messages is +# ; equivalent to 10,9,8,7,6,5,4,5,6,7 and MAY +# ; be reordered and overlap coalesced to be +# ; 4,5,6,7,8,9,10. +# +# source://net-imap//lib/net/imap/response_parser.rb#317 +Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET_ITEM = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#319 +Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET_STR = T.let(T.unsafe(nil), Regexp) + +# seq-number = nz-number / "*" +# ; message sequence number (COPY, FETCH, STORE +# ; commands) or unique identifier (UID COPY, +# ; UID FETCH, UID STORE commands). +# ; * represents the largest number in use. In +# ; the case of message sequence numbers, it is +# ; the number of messages in a non-empty mailbox. +# ; In the case of unique identifiers, it is the +# ; unique identifier of the last message in the +# ; mailbox or, if the mailbox is empty, the +# ; mailbox's current UIDNEXT value. +# ; The server should respond with a tagged BAD +# ; response to a command that uses a message +# ; sequence number greater than the number of +# ; messages in the selected mailbox. This +# ; includes "*" if the selected mailbox is empty. +# +# source://net-imap//lib/net/imap/response_parser.rb#292 +Net::IMAP::ResponseParser::Patterns::SEQ_NUMBER = T.let(T.unsafe(nil), Regexp) + +# seq-range = seq-number ":" seq-number +# ; two seq-number values and all values between +# ; these two regardless of order. +# ; Example: 2:4 and 4:2 are equivalent and +# ; indicate values 2, 3, and 4. +# ; Example: a unique identifier sequence range of +# ; 3291:* includes the UID of the last message in +# ; the mailbox, even if that value is less than +# ; 3291. +# +# source://net-imap//lib/net/imap/response_parser.rb#303 +Net::IMAP::ResponseParser::Patterns::SEQ_RANGE = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#180 +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 +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 +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 +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 +Net::IMAP::ResponseParser::Patterns::TEXT_CHAR = T.let(T.unsafe(nil), Regexp) + +# RFC3501: +# text = 1*TEXT-CHAR +# RFC9051: +# text = 1*(TEXT-CHAR / UTF8-2 / UTF8-3 / UTF8-4) +# ; Non-ASCII text can only be returned +# ; after ENABLE IMAP4rev2 command +# +# source://net-imap//lib/net/imap/response_parser.rb#260 +Net::IMAP::ResponseParser::Patterns::TEXT_rev1 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#261 +Net::IMAP::ResponseParser::Patterns::TEXT_rev2 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#678 +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 +module Net::IMAP::ResponseParser::ResponseConditions; end + +# source://net-imap//lib/net/imap/response_parser.rb#71 +Net::IMAP::ResponseParser::ResponseConditions::AUTH_CONDS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#65 +Net::IMAP::ResponseParser::ResponseConditions::BAD = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#66 +Net::IMAP::ResponseParser::ResponseConditions::BYE = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#72 +Net::IMAP::ResponseParser::ResponseConditions::GREETING_CONDS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#64 +Net::IMAP::ResponseParser::ResponseConditions::NO = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#63 +Net::IMAP::ResponseParser::ResponseConditions::OK = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#67 +Net::IMAP::ResponseParser::ResponseConditions::PREAUTH = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#73 +Net::IMAP::ResponseParser::ResponseConditions::RESP_CONDS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#69 +Net::IMAP::ResponseParser::ResponseConditions::RESP_COND_STATES = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#70 +Net::IMAP::ResponseParser::ResponseConditions::RESP_DATA_CONDS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#459 +Net::IMAP::ResponseParser::SEQUENCE_SET_TOKENS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#2017 +Net::IMAP::ResponseParser::SPACES_REGEXP = T.let(T.unsafe(nil), Regexp) + +# tag = 1* +# +# source://net-imap//lib/net/imap/response_parser.rb#484 +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 +Net::IMAP::ResponseParser::T_LITERAL8 = T.let(T.unsafe(nil), Symbol) + +# Used to avoid an allocation when ResponseText is empty +# +# source://net-imap//lib/net/imap/response_data.rb#169 +Net::IMAP::ResponseText::EMPTY = T.let(T.unsafe(nil), Net::IMAP::ResponseText) + +# Pluggable authentication mechanisms for protocols which support SASL +# (Simple Authentication and Security Layer), such as IMAP4, SMTP, LDAP, and +# XMPP. {RFC-4422}[https://tools.ietf.org/html/rfc4422] specifies the +# common \SASL framework: +# >>> +# SASL is conceptually a framework that provides an abstraction layer +# between protocols and mechanisms as illustrated in the following +# diagram. +# +# SMTP LDAP XMPP Other protocols ... +# \ | | / +# \ | | / +# SASL abstraction layer +# / | | \ +# / | | \ +# EXTERNAL GSSAPI PLAIN Other mechanisms ... +# +# Net::IMAP uses SASL via the Net::IMAP#authenticate method. +# +# == Mechanisms +# +# Each mechanism has different properties and requirements. Please consult +# the documentation for the specific mechanisms you are using: +# +# +ANONYMOUS+:: +# See AnonymousAuthenticator. +# +# Allows the user to gain access to public services or resources without +# authenticating or disclosing an identity. +# +# +EXTERNAL+:: +# See ExternalAuthenticator. +# +# Authenticates using already established credentials, such as a TLS +# certificate or IPsec. +# +# +OAUTHBEARER+:: +# See OAuthBearerAuthenticator. +# +# Login using an OAuth2 Bearer token. This is the standard mechanism +# for using OAuth2 with \SASL, but it is not yet deployed as widely as +# +XOAUTH2+. +# +# +PLAIN+:: +# See PlainAuthenticator. +# +# Login using clear-text username and password. +# +# +SCRAM-SHA-1+:: +# +SCRAM-SHA-256+:: +# See ScramAuthenticator. +# +# Login by username and password. The password is not sent to the +# server but is used in a salted challenge/response exchange. +# +SCRAM-SHA-1+ and +SCRAM-SHA-256+ are directly supported by +# Net::IMAP::SASL. New authenticators can easily be added for any other +# SCRAM-* mechanism if the digest algorithm is supported by +# OpenSSL::Digest. +# +# +XOAUTH2+:: +# See XOAuth2Authenticator. +# +# Login using a username and an OAuth2 access token. Non-standard and +# obsoleted by +OAUTHBEARER+, but widely supported. +# +# See the {SASL mechanism +# registry}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] +# for a list of all SASL mechanisms and their specifications. To register +# new authenticators, see Authenticators. +# +# === Deprecated mechanisms +# +# Obsolete mechanisms should be avoided, but are still available for +# backwards compatibility. +# +# >>> +# For +DIGEST-MD5+ see DigestMD5Authenticator. +# +# For +LOGIN+, see LoginAuthenticator. +# +# For +CRAM-MD5+, see CramMD5Authenticator. +# +# Using a deprecated mechanism will print a warning. +# +# source://net-imap//lib/net/imap/sasl.rb#90 +module Net::IMAP::SASL + private + + # See Net::IMAP::StringPrep::SASLprep#saslprep. + # + # source://net-imap//lib/net/imap/sasl.rb#173 + def saslprep(string, **opts); end + + class << self + # Delegates to ::authenticators. See Authenticators#add_authenticator. + # + # source://net-imap//lib/net/imap/sasl.rb#168 + def add_authenticator(*_arg0, **_arg1, &_arg2); end + + # Delegates to registry.new See Authenticators#new. + # + # source://net-imap//lib/net/imap/sasl.rb#163 + def authenticator(*args, registry: T.unsafe(nil), **kwargs, &block); end + + # Returns the default global SASL::Authenticators instance. + # + # source://net-imap//lib/net/imap/sasl.rb#160 + def authenticators; end + + # See Net::IMAP::StringPrep::SASLprep#saslprep. + # + # source://net-imap//lib/net/imap/sasl.rb#173 + def saslprep(string, **opts); end + end +end + +# Authenticator for the "+ANONYMOUS+" SASL mechanism, as specified by +# RFC-4505[https://tools.ietf.org/html/rfc4505]. See +# Net::IMAP#authenticate. +# +# source://net-imap//lib/net/imap/sasl/anonymous_authenticator.rb#10 +class Net::IMAP::SASL::AnonymousAuthenticator + # :call-seq: + # new(anonymous_message = "", **) -> authenticator + # new(anonymous_message: "", **) -> authenticator + # + # Creates an Authenticator for the "+ANONYMOUS+" SASL mechanism, as + # specified in RFC-4505[https://tools.ietf.org/html/rfc4505]. To use + # this, see Net::IMAP#authenticate or your client's authentication + # method. + # + # ==== Parameters + # + # * _optional_ #anonymous_message — a message to send to the server. + # + # Any other keyword arguments are silently ignored. + # + # @return [AnonymousAuthenticator] a new instance of AnonymousAuthenticator + # + # source://net-imap//lib/net/imap/sasl/anonymous_authenticator.rb#37 + def initialize(anon_msg = T.unsafe(nil), anonymous_message: T.unsafe(nil), **_arg2); end + + # An optional token sent for the +ANONYMOUS+ mechanism., up to 255 UTF-8 + # characters in length. + # + # If it contains an "@" sign, the message must be a valid email address + # (+addr-spec+ from RFC-2822[https://tools.ietf.org/html/rfc2822]). + # Email syntax is _not_ validated by AnonymousAuthenticator. + # + # Otherwise, it can be any UTF8 string which is permitted by the + # StringPrep::Trace profile. + # + # source://net-imap//lib/net/imap/sasl/anonymous_authenticator.rb#21 + def anonymous_message; end + + # Returns true when the initial client response was sent. + # + # The authentication should not succeed unless this returns true, but it + # does *not* indicate success. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/anonymous_authenticator.rb#64 + def done?; end + + # :call-seq: + # initial_response? -> true + # + # +ANONYMOUS+ can send an initial client response. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/anonymous_authenticator.rb#51 + def initial_response?; end + + # Returns #anonymous_message. + # + # source://net-imap//lib/net/imap/sasl/anonymous_authenticator.rb#54 + def process(_server_challenge_string); end +end + +# Indicates an authentication exchange that will be or has been canceled +# by the client, not due to any error or failure during processing. +# +# source://net-imap//lib/net/imap/sasl.rb#106 +class Net::IMAP::SASL::AuthenticationCanceled < ::Net::IMAP::SASL::Error; end + +# Indicates an error when processing a server challenge, e.g: an invalid +# or unparsable challenge. An underlying exception may be available as +# the exception's #cause. +# +# source://net-imap//lib/net/imap/sasl.rb#111 +class Net::IMAP::SASL::AuthenticationError < ::Net::IMAP::SASL::Error; end + +# This API is *experimental*, and may change. +# +# TODO: catch exceptions in #process and send #cancel_response. +# TODO: raise an error if the command succeeds after being canceled. +# TODO: use with more clients, to verify the API can accommodate them. +# +# Create an AuthenticationExchange from a client adapter and a mechanism +# authenticator: +# def authenticate(mechanism, ...) +# authenticator = SASL.authenticator(mechanism, ...) +# SASL::AuthenticationExchange.new( +# sasl_adapter, mechanism, authenticator +# ).authenticate +# end +# +# private +# +# def sasl_adapter = MyClientAdapter.new(self, &method(:send_command)) +# +# Or delegate creation of the authenticator to ::build: +# def authenticate(...) +# SASL::AuthenticationExchange.build(sasl_adapter, ...) +# .authenticate +# end +# +# As a convenience, ::authenticate combines ::build and #authenticate: +# def authenticate(...) +# SASL::AuthenticationExchange.authenticate(sasl_adapter, ...) +# end +# +# Likewise, ClientAdapter#authenticate delegates to #authenticate: +# def authenticate(...) = sasl_adapter.authenticate(...) +# +# source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#40 +class Net::IMAP::SASL::AuthenticationExchange + # @return [AuthenticationExchange] a new instance of AuthenticationExchange + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#52 + def initialize(client, mechanism, authenticator, sasl_ir: T.unsafe(nil)); end + + # Call #authenticate to execute an authentication exchange for #client + # using #authenticator. Authentication failures will raise an + # exception. Any exceptions other than those in RESPONSE_ERRORS will + # drop the connection. + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#64 + def authenticate; end + + # Returns the value of attribute authenticator. + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#50 + def authenticator; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#85 + def done?; end + + # Returns the value of attribute mechanism. + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#50 + def mechanism; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#77 + def send_initial_response?; end + + private + + # Returns the value of attribute client. + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#91 + def client; end + + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#93 + def initial_response; end + + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#98 + def process(challenge); end + + class << self + # Convenience method for build(...).authenticate + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#42 + def authenticate(*_arg0, **_arg1, &_arg2); end + + # Use +registry+ to override the global Authenticators registry. + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#45 + def build(client, mechanism, *args, sasl_ir: T.unsafe(nil), **kwargs, &block); end + end +end + +# Indicates that authentication cannot proceed because one of the server's +# messages has not passed integrity checks. +# +# source://net-imap//lib/net/imap/sasl.rb#115 +class Net::IMAP::SASL::AuthenticationFailed < ::Net::IMAP::SASL::Error; end + +# Indicates that authentication cannot proceed because one of the server's +# ended authentication prematurely. +# +# source://net-imap//lib/net/imap/sasl.rb#119 +class Net::IMAP::SASL::AuthenticationIncomplete < ::Net::IMAP::SASL::AuthenticationFailed + # @return [AuthenticationIncomplete] a new instance of AuthenticationIncomplete + # + # source://net-imap//lib/net/imap/sasl.rb#123 + def initialize(response, message = T.unsafe(nil)); end + + # The success response from the server + # + # source://net-imap//lib/net/imap/sasl.rb#121 + def response; end +end + +# Registry for SASL authenticators +# +# Registered authenticators must respond to +#new+ or +#call+ (e.g. a class or +# a proc), receiving any credentials and options and returning an +# authenticator instance. The returned object represents a single +# authentication exchange and must not be reused for multiple +# authentication attempts. +# +# An authenticator instance object must respond to +#process+, receiving the +# server's challenge and returning the client's response. Optionally, it may +# also respond to +#initial_response?+ and +#done?+. When +# +#initial_response?+ returns +true+, +#process+ may be called the first +# time with +nil+. When +#done?+ returns +false+, the exchange is incomplete +# and an exception should be raised if the exchange terminates prematurely. +# +# See the source for PlainAuthenticator, XOAuth2Authenticator, and +# ScramSHA1Authenticator for examples. +# +# source://net-imap//lib/net/imap/sasl/authenticators.rb#22 +class Net::IMAP::SASL::Authenticators + # Create a new Authenticators registry. + # + # This class is usually not instantiated directly. Use SASL.authenticators + # to reuse the default global registry. + # + # When +use_defaults+ is +false+, the registry will start empty. When + # +use_deprecated+ is +false+, deprecated authenticators will not be + # included with the defaults. + # + # @return [Authenticators] a new instance of Authenticators + # + # source://net-imap//lib/net/imap/sasl/authenticators.rb#32 + def initialize(use_defaults: T.unsafe(nil), use_deprecated: T.unsafe(nil)); end + + # :call-seq: + # add_authenticator(mechanism) + # add_authenticator(mechanism, authenticator_class) + # add_authenticator(mechanism, authenticator_proc) + # + # Registers an authenticator for #authenticator to use. +mechanism+ is the + # name of the + # {SASL mechanism}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] + # implemented by +authenticator_class+ (for instance, "PLAIN"). + # + # If +mechanism+ refers to an existing authenticator, + # the old authenticator will be replaced. + # + # When only a single argument is given, the authenticator class will be + # lazily loaded from Net::IMAP::SASL::#{name}Authenticator (case is + # preserved and non-alphanumeric characters are removed.. + # + # source://net-imap//lib/net/imap/sasl/authenticators.rb#67 + def add_authenticator(name, authenticator = T.unsafe(nil)); end + + # :call-seq: + # authenticator(mechanism, ...) -> auth_session + # + # Builds an authenticator instance using the authenticator registered to + # +mechanism+. The returned object represents a single authentication + # exchange and must not be reused for multiple authentication + # attempts. + # + # All arguments (except +mechanism+) are forwarded to the registered + # authenticator's +#new+ or +#call+ method. Each authenticator must + # document its own arguments. + # + # [Note] + # This method is intended for internal use by connection protocol code + # only. Protocol client users should see refer to their client's + # documentation, e.g. Net::IMAP#authenticate. + # + # source://net-imap//lib/net/imap/sasl/authenticators.rb#107 + def authenticator(mechanism, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/authenticators.rb#86 + def mechanism?(name); end + + # Returns the names of all registered SASL mechanisms. + # + # source://net-imap//lib/net/imap/sasl/authenticators.rb#49 + def names; end + + # :call-seq: + # authenticator(mechanism, ...) -> auth_session + # + # Builds an authenticator instance using the authenticator registered to + # +mechanism+. The returned object represents a single authentication + # exchange and must not be reused for multiple authentication + # attempts. + # + # All arguments (except +mechanism+) are forwarded to the registered + # authenticator's +#new+ or +#call+ method. Each authenticator must + # document its own arguments. + # + # [Note] + # This method is intended for internal use by connection protocol code + # only. Protocol client users should see refer to their client's + # documentation, e.g. Net::IMAP#authenticate. + # + # source://net-imap//lib/net/imap/sasl/authenticators.rb#107 + def new(mechanism, *_arg1, **_arg2, &_arg3); end + + # Removes the authenticator registered for +name+ + # + # source://net-imap//lib/net/imap/sasl/authenticators.rb#81 + def remove_authenticator(name); end +end + +# source://net-imap//lib/net/imap/sasl/stringprep.rb#8 +Net::IMAP::SASL::BidiStringError = Net::IMAP::StringPrep::BidiStringError + +# This API is *experimental*, and may change. +# +# TODO: use with more clients, to verify the API can accommodate them. +# +# An abstract base class for implementing a SASL authentication exchange. +# Different clients will each have their own adapter subclass, overridden +# to match their needs. +# +# Although the default implementations _may_ be sufficient, subclasses +# will probably need to override some methods. Additionally, subclasses +# may need to include a protocol adapter mixin, if the default +# ProtocolAdapters::Generic isn't sufficient. +# +# source://net-imap//lib/net/imap/sasl/client_adapter.rb#19 +class Net::IMAP::SASL::ClientAdapter + include ::Net::IMAP::SASL::ProtocolAdapters::Generic + + # +command_proc+ can used to avoid exposing private methods on #client. + # It should run a command with the arguments sent to it, yield each + # continuation payload, respond to the server with the result of each + # yield, and return the result. Non-successful results *MUST* raise an + # exception. Exceptions in the block *MUST* cause the command to fail. + # + # Subclasses that override #run_command may use #command_proc for + # other purposes. + # + # @return [ClientAdapter] a new instance of ClientAdapter + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#32 + def initialize(client, &command_proc); end + + # Does the server advertise support for the mechanism? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#43 + def auth_capable?(mechanism); end + + # Delegates to AuthenticationExchange.authenticate. + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#37 + def authenticate(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute client. + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#22 + def client; end + + # Returns the value of attribute command_proc. + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#22 + def command_proc; end + + # Drop the connection gracefully. + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#65 + def drop_connection; end + + # Drop the connection abruptly. + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#68 + def drop_connection!; end + + # Returns an array of server responses errors raised by run_command. + # Exceptions in this array won't drop the connection. + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#62 + def response_errors; end + + # Runs the authenticate command with +mechanism+ and +initial_response+. + # When +initial_response+ is nil, an initial response must NOT be sent. + # + # Yields each continuation payload, responds to the server with the + # result of each yield, and returns the result. Non-successful results + # *MUST* raise an exception. Exceptions in the block *MUST* cause the + # command to fail. + # + # Subclasses that override this may use #command_proc differently. + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#54 + def run_command(mechanism, initial_response = T.unsafe(nil), &block); end + + # Do the protocol and server both support an initial response? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#40 + def sasl_ir_capable?; end +end + +# Authenticator for the "+CRAM-MD5+" SASL mechanism, specified in +# RFC2195[https://tools.ietf.org/html/rfc2195]. See Net::IMAP#authenticate. +# +# == Deprecated +# +# +CRAM-MD5+ is obsolete and insecure. It is included for compatibility with +# existing servers. +# {draft-ietf-sasl-crammd5-to-historic}[https://tools.ietf.org/html/draft-ietf-sasl-crammd5-to-historic-00.html] +# recommends using +SCRAM-*+ or +PLAIN+ protected by TLS instead. +# +# Additionally, RFC8314[https://tools.ietf.org/html/rfc8314] discourage the use +# of cleartext and recommends TLS version 1.2 or greater be used for all +# traffic. With TLS +CRAM-MD5+ is okay, but so is +PLAIN+ +# +# source://net-imap//lib/net/imap/sasl/cram_md5_authenticator.rb#16 +class Net::IMAP::SASL::CramMD5Authenticator + # @return [CramMD5Authenticator] a new instance of CramMD5Authenticator + # + # source://net-imap//lib/net/imap/sasl/cram_md5_authenticator.rb#17 + def initialize(user = T.unsafe(nil), pass = T.unsafe(nil), authcid: T.unsafe(nil), username: T.unsafe(nil), password: T.unsafe(nil), secret: T.unsafe(nil), warn_deprecation: T.unsafe(nil), **_arg7); end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/cram_md5_authenticator.rb#40 + def done?; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/cram_md5_authenticator.rb#31 + def initial_response?; end + + # source://net-imap//lib/net/imap/sasl/cram_md5_authenticator.rb#33 + def process(challenge); end + + private + + # source://net-imap//lib/net/imap/sasl/cram_md5_authenticator.rb#44 + def hmac_md5(text, key); end +end + +# Net::IMAP authenticator for the "`DIGEST-MD5`" SASL mechanism type, specified +# in RFC-2831[https://tools.ietf.org/html/rfc2831]. See Net::IMAP#authenticate. +# +# == Deprecated +# +# "+DIGEST-MD5+" has been deprecated by +# RFC-6331[https://tools.ietf.org/html/rfc6331] and should not be relied on for +# security. It is included for compatibility with existing servers. +# +# source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#11 +class Net::IMAP::SASL::DigestMD5Authenticator + # :call-seq: + # new(username, password, authzid = nil, **options) -> authenticator + # new(username:, password:, authzid: nil, **options) -> authenticator + # new(authcid:, password:, authzid: nil, **options) -> authenticator + # + # Creates an Authenticator for the "+DIGEST-MD5+" SASL mechanism. + # + # Called by Net::IMAP#authenticate and similar methods on other clients. + # + # ==== Parameters + # + # * #authcid ― Authentication identity that is associated with #password. + # + # #username ― An alias for +authcid+. + # + # * #password ― A password or passphrase associated with this #authcid. + # + # * _optional_ #authzid ― Authorization identity to act as or on behalf of. + # + # When +authzid+ is not set, the server should derive the authorization + # identity from the authentication identity. + # + # * _optional_ +warn_deprecation+ — Set to +false+ to silence the warning. + # + # Any other keyword arguments are silently ignored. + # + # @return [DigestMD5Authenticator] a new instance of DigestMD5Authenticator + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#70 + def initialize(user = T.unsafe(nil), pass = T.unsafe(nil), authz = T.unsafe(nil), username: T.unsafe(nil), password: T.unsafe(nil), authzid: T.unsafe(nil), authcid: T.unsafe(nil), secret: T.unsafe(nil), warn_deprecation: T.unsafe(nil), **_arg9); end + + # Authentication identity: the identity that matches the #password. + # + # RFC-2831[https://tools.ietf.org/html/rfc2831] uses the term +username+. + # "Authentication identity" is the generic term used by + # RFC-4422[https://tools.ietf.org/html/rfc4422]. + # RFC-4616[https://tools.ietf.org/html/rfc4616] and many later RFCs abbreviate + # this to +authcid+. + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#24 + def authcid; end + + # Authorization identity: an identity to act as or on behalf of. The identity + # form is application protocol specific. If not provided or left blank, the + # server derives an authorization identity from the authentication identity. + # The server is responsible for verifying the client's credentials and + # verifying that the identity it associates with the client's authentication + # identity is allowed to act as (or on behalf of) the authorization identity. + # + # For example, an administrator or superuser might take on another role: + # + # imap.authenticate "DIGEST-MD5", "root", ->{passwd}, authzid: "user" + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#43 + def authzid; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#156 + def done?; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#88 + def initial_response?; end + + # A password or passphrase that matches the #username. + # + # The +password+ will be used to create the response digest. + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#30 + def password; end + + # Responds to server challenge in two stages. + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#91 + def process(challenge); end + + # Authentication identity: the identity that matches the #password. + # + # RFC-2831[https://tools.ietf.org/html/rfc2831] uses the term +username+. + # "Authentication identity" is the generic term used by + # RFC-4422[https://tools.ietf.org/html/rfc4422]. + # RFC-4616[https://tools.ietf.org/html/rfc4616] and many later RFCs abbreviate + # this to +authcid+. + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#24 + def username; end + + private + + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#160 + def nc(nonce); end + + # some responses need quoting + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#170 + def qdval(k, v); end +end + +# source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#14 +Net::IMAP::SASL::DigestMD5Authenticator::STAGE_DONE = T.let(T.unsafe(nil), Symbol) + +# source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#12 +Net::IMAP::SASL::DigestMD5Authenticator::STAGE_ONE = T.let(T.unsafe(nil), Symbol) + +# source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#13 +Net::IMAP::SASL::DigestMD5Authenticator::STAGE_TWO = T.let(T.unsafe(nil), Symbol) + +# Exception class for any client error detected during the authentication +# exchange. +# +# When the _server_ reports an authentication failure, it will respond +# with a protocol specific error instead, e.g: +BAD+ or +NO+ in IMAP. +# +# When the client encounters any error, it *must* consider the +# authentication exchange to be unsuccessful and it might need to drop the +# connection. For example, if the server reports that the authentication +# exchange was successful or the protocol does not allow additional +# authentication attempts. +# +# source://net-imap//lib/net/imap/sasl.rb#102 +class Net::IMAP::SASL::Error < ::StandardError; end + +# Authenticator for the "+EXTERNAL+" SASL mechanism, as specified by +# RFC-4422[https://tools.ietf.org/html/rfc4422]. See +# Net::IMAP#authenticate. +# +# The EXTERNAL mechanism requests that the server use client credentials +# 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 + # :call-seq: + # new(authzid: nil, **) -> authenticator + # new(username: nil, **) -> authenticator + # new(username = nil, **) -> authenticator + # + # Creates an Authenticator for the "+EXTERNAL+" SASL mechanism, as + # specified in RFC-4422[https://tools.ietf.org/html/rfc4422]. To use + # this, see Net::IMAP#authenticate or your client's authentication + # method. + # + # ==== Parameters + # + # * _optional_ #authzid ― Authorization identity to act as or on behalf of. + # + # _optional_ #username ― An alias for #authzid. + # + # Note that, unlike some other authenticators, +username+ sets the + # _authorization_ identity and not the _authentication_ identity. The + # authentication identity is established for the client by the + # external credentials. + # + # Any other keyword parameters are quietly ignored. + # + # @return [ExternalAuthenticator] a new instance of ExternalAuthenticator + # + # source://net-imap//lib/net/imap/sasl/external_authenticator.rb#52 + def initialize(user = T.unsafe(nil), authzid: T.unsafe(nil), username: T.unsafe(nil), **_arg3); end + + # Authorization identity: an identity to act as or on behalf of. The + # identity form is application protocol specific. If not provided or + # left blank, the server derives an authorization identity from the + # authentication identity. The server is responsible for verifying the + # client's credentials and verifying that the identity it associates + # with the client's authentication identity is allowed to act as (or on + # behalf of) the authorization identity. + # + # For example, an administrator or superuser might take on another role: + # + # imap.authenticate "PLAIN", "root", passwd, authzid: "user" + # + # source://net-imap//lib/net/imap/sasl/external_authenticator.rb#27 + def authzid; end + + # Returns true when the initial client response was sent. + # + # The authentication should not succeed unless this returns true, but it + # does *not* indicate success. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/external_authenticator.rb#78 + def done?; end + + # :call-seq: + # initial_response? -> true + # + # +EXTERNAL+ can send an initial client response. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/external_authenticator.rb#65 + def initial_response?; end + + # Returns #authzid, or an empty string if there is no authzid. + # + # source://net-imap//lib/net/imap/sasl/external_authenticator.rb#68 + def process(_); end + + # Authorization identity: an identity to act as or on behalf of. The + # identity form is application protocol specific. If not provided or + # left blank, the server derives an authorization identity from the + # authentication identity. The server is responsible for verifying the + # client's credentials and verifying that the identity it associates + # with the client's authentication identity is allowed to act as (or on + # behalf of) the authorization identity. + # + # For example, an administrator or superuser might take on another role: + # + # imap.authenticate "PLAIN", "root", passwd, authzid: "user" + # + # source://net-imap//lib/net/imap/sasl/external_authenticator.rb#27 + def username; end +end + +# Originally defined for the GS2 mechanism family in +# RFC5801[https://tools.ietf.org/html/rfc5801], +# several different mechanisms start with a GS2 header: +# * +GS2-*+ --- RFC5801[https://tools.ietf.org/html/rfc5801] +# * +SCRAM-*+ --- RFC5802[https://tools.ietf.org/html/rfc5802] +# (ScramAuthenticator) +# * +SAML20+ --- RFC6595[https://tools.ietf.org/html/rfc6595] +# * +OPENID20+ --- RFC6616[https://tools.ietf.org/html/rfc6616] +# * +OAUTH10A+ --- RFC7628[https://tools.ietf.org/html/rfc7628] +# * +OAUTHBEARER+ --- RFC7628[https://tools.ietf.org/html/rfc7628] +# (OAuthBearerAuthenticator) +# +# Classes that include this module must implement +#authzid+. +# +# source://net-imap//lib/net/imap/sasl/gs2_header.rb#20 +module Net::IMAP::SASL::GS2Header + # The {RFC5801 §4}[https://www.rfc-editor.org/rfc/rfc5801#section-4] + # +gs2-authzid+ header, when +#authzid+ is not empty. + # + # If +#authzid+ is empty or +nil+, an empty string is returned. + # + # source://net-imap//lib/net/imap/sasl/gs2_header.rb#59 + def gs2_authzid; end + + # The {RFC5801 §4}[https://www.rfc-editor.org/rfc/rfc5801#section-4] + # +gs2-cb-flag+: + # + # "+n+":: The client doesn't support channel binding. + # "+y+":: The client does support channel binding + # but thinks the server does not. + # "+p+":: The client requires channel binding. + # The selected channel binding follows "+p=+". + # + # The default always returns "+n+". A mechanism that supports channel + # binding must override this method. + # + # source://net-imap//lib/net/imap/sasl/gs2_header.rb#53 + def gs2_cb_flag; end + + # The {RFC5801 §4}[https://www.rfc-editor.org/rfc/rfc5801#section-4] + # +gs2-header+, which prefixes the #initial_client_response. + # + # >>> + # Note: the actual GS2 header includes an optional flag to + # indicate that the GSS mechanism is not "standard", but since all of + # the SASL mechanisms using GS2 are "standard", we don't include that + # flag. A class for a nonstandard GSSAPI mechanism should prefix with + # "+F,+". + # + # source://net-imap//lib/net/imap/sasl/gs2_header.rb#37 + def gs2_header; end + + private + + # Encodes +str+ to match RFC5801_SASLNAME. + # + # source://net-imap//lib/net/imap/sasl/gs2_header.rb#67 + def gs2_saslname_encode(str); end + + class << self + # Encodes +str+ to match RFC5801_SASLNAME. + # + # source://net-imap//lib/net/imap/sasl/gs2_header.rb#67 + def gs2_saslname_encode(str); end + end +end + +# source://net-imap//lib/net/imap/sasl/gs2_header.rb#21 +Net::IMAP::SASL::GS2Header::NO_NULL_CHARS = T.let(T.unsafe(nil), Regexp) + +# Matches {RFC5801 §4}[https://www.rfc-editor.org/rfc/rfc5801#section-4] +# +saslname+. The output from gs2_saslname_encode matches this Regexp. +# +# source://net-imap//lib/net/imap/sasl/gs2_header.rb#26 +Net::IMAP::SASL::GS2Header::RFC5801_SASLNAME = T.let(T.unsafe(nil), Regexp) + +# Authenticator for the "+LOGIN+" SASL mechanism. See Net::IMAP#authenticate. +# +# +LOGIN+ authentication sends the password in cleartext. +# RFC3501[https://tools.ietf.org/html/rfc3501] encourages servers to disable +# cleartext authentication until after TLS has been negotiated. +# RFC8314[https://tools.ietf.org/html/rfc8314] recommends TLS version 1.2 or +# greater be used for all traffic, and deprecate cleartext access ASAP. +LOGIN+ +# can be secured by TLS encryption. +# +# == Deprecated +# +# The {SASL mechanisms +# registry}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] +# marks "LOGIN" as obsoleted in favor of "PLAIN". It is included here for +# compatibility with existing servers. See +# {draft-murchison-sasl-login}[https://www.iana.org/go/draft-murchison-sasl-login] +# for both specification and deprecation. +# +# source://net-imap//lib/net/imap/sasl/login_authenticator.rb#20 +class Net::IMAP::SASL::LoginAuthenticator + # @return [LoginAuthenticator] a new instance of LoginAuthenticator + # + # source://net-imap//lib/net/imap/sasl/login_authenticator.rb#26 + def initialize(user = T.unsafe(nil), pass = T.unsafe(nil), authcid: T.unsafe(nil), username: T.unsafe(nil), password: T.unsafe(nil), secret: T.unsafe(nil), warn_deprecation: T.unsafe(nil), **_arg7); end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/login_authenticator.rb#54 + def done?; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/login_authenticator.rb#39 + def initial_response?; end + + # source://net-imap//lib/net/imap/sasl/login_authenticator.rb#41 + def process(data); end +end + +# source://net-imap//lib/net/imap/sasl/login_authenticator.rb#23 +Net::IMAP::SASL::LoginAuthenticator::STATE_DONE = T.let(T.unsafe(nil), Symbol) + +# source://net-imap//lib/net/imap/sasl/login_authenticator.rb#22 +Net::IMAP::SASL::LoginAuthenticator::STATE_PASSWORD = T.let(T.unsafe(nil), Symbol) + +# source://net-imap//lib/net/imap/sasl/login_authenticator.rb#21 +Net::IMAP::SASL::LoginAuthenticator::STATE_USER = T.let(T.unsafe(nil), Symbol) + +# Abstract base class for the SASL mechanisms defined in +# RFC7628[https://tools.ietf.org/html/rfc7628]: +# * OAUTHBEARER[rdoc-ref:OAuthBearerAuthenticator] +# (OAuthBearerAuthenticator) +# * OAUTH10A +# +# source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#14 +class Net::IMAP::SASL::OAuthAuthenticator + include ::Net::IMAP::SASL::GS2Header + + # Creates an RFC7628[https://tools.ietf.org/html/rfc7628] OAuth + # authenticator. + # + # ==== Parameters + # + # See child classes for required parameter(s). The following parameters + # are all optional, but it is worth noting that application protocols + # are allowed to require #authzid (or other parameters, such as + # #host or #port) as are specific server implementations. + # + # * _optional_ #authzid ― Authorization identity to act as or on behalf of. + # + # _optional_ #username — An alias for #authzid. + # + # Note that, unlike some other authenticators, +username+ sets the + # _authorization_ identity and not the _authentication_ identity. The + # authentication identity is established for the client by the OAuth + # token. + # + # * _optional_ #host — Hostname to which the client connected. + # * _optional_ #port — Service port to which the client connected. + # * _optional_ #mthd — HTTP method + # * _optional_ #path — HTTP path data + # * _optional_ #post — HTTP post data + # * _optional_ #qs — HTTP query string + # + # _optional_ #query — An alias for #qs + # + # Any other keyword parameters are quietly ignored. + # + # @return [OAuthAuthenticator] a new instance of OAuthAuthenticator + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#84 + def initialize(authzid: T.unsafe(nil), host: T.unsafe(nil), port: T.unsafe(nil), username: T.unsafe(nil), query: T.unsafe(nil), mthd: T.unsafe(nil), path: T.unsafe(nil), post: T.unsafe(nil), qs: T.unsafe(nil), **_arg9); end + + # Value of the HTTP Authorization header + # + # Implemented by subclasses. + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#124 + def authorization; end + + # Authorization identity: an identity to act as or on behalf of. The + # identity form is application protocol specific. If not provided or + # left blank, the server derives an authorization identity from the + # authentication identity. The server is responsible for verifying the + # client's credentials and verifying that the identity it associates + # with the client's authentication identity is allowed to act as (or on + # behalf of) the authorization identity. + # + # For example, an administrator or superuser might take on another role: + # + # imap.authenticate "PLAIN", "root", passwd, authzid: "user" + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#29 + def authzid; end + + # Returns true when the initial client response was sent. + # + # The authentication should not succeed unless this returns true, but it + # does *not* indicate success. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#119 + def done?; end + + # Hostname to which the client connected. (optional) + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#33 + def host; end + + # The {RFC7628 §3.1}[https://www.rfc-editor.org/rfc/rfc7628#section-3.1] + # formatted response. + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#99 + def initial_client_response; end + + # Stores the most recent server "challenge". When authentication fails, + # this may hold information about the failure reason, as JSON. + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#53 + def last_server_response; end + + # HTTP method. (optional) + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#39 + def mthd; end + + # HTTP path data. (optional) + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#42 + def path; end + + # Service port to which the client connected. (optional) + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#36 + def port; end + + # HTTP post data. (optional) + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#45 + def post; end + + # Returns initial_client_response the first time, then "^A". + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#108 + def process(data); end + + # The query string. (optional) + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#48 + def qs; end + + # The query string. (optional) + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#48 + def query; end + + # Authorization identity: an identity to act as or on behalf of. The + # identity form is application protocol specific. If not provided or + # left blank, the server derives an authorization identity from the + # authentication identity. The server is responsible for verifying the + # client's credentials and verifying that the identity it associates + # with the client's authentication identity is allowed to act as (or on + # behalf of) the authorization identity. + # + # For example, an administrator or superuser might take on another role: + # + # imap.authenticate "PLAIN", "root", passwd, authzid: "user" + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#29 + def username; end +end + +# Authenticator for the "+OAUTHBEARER+" SASL mechanism, specified in +# RFC7628[https://tools.ietf.org/html/rfc7628]. Authenticates using OAuth +# 2.0 bearer tokens, as described in +# RFC6750[https://tools.ietf.org/html/rfc6750]. Use via +# Net::IMAP#authenticate. +# +# RFC6750[https://tools.ietf.org/html/rfc6750] requires Transport Layer +# Security (TLS) to secure the protocol interaction between the client and +# the resource server. TLS _MUST_ be used for +OAUTHBEARER+ to protect +# the bearer token. +# +# source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#138 +class Net::IMAP::SASL::OAuthBearerAuthenticator < ::Net::IMAP::SASL::OAuthAuthenticator + # :call-seq: + # new(oauth2_token, **options) -> authenticator + # new(authzid, oauth2_token, **options) -> authenticator + # new(oauth2_token:, **options) -> authenticator + # + # Creates an Authenticator for the "+OAUTHBEARER+" SASL mechanism. + # + # Called by Net::IMAP#authenticate and similar methods on other clients. + # + # ==== Parameters + # + # * #oauth2_token — An OAuth2 bearer token + # + # All other keyword parameters are passed to + # {super}[rdoc-ref:OAuthAuthenticator::new] (see OAuthAuthenticator). + # The most common ones are: + # + # * _optional_ #authzid ― Authorization identity to act as or on behalf of. + # + # _optional_ #username — An alias for #authzid. + # + # Note that, unlike some other authenticators, +username+ sets the + # _authorization_ identity and not the _authentication_ identity. The + # authentication identity is established for the client by + # #oauth2_token. + # + # * _optional_ #host — Hostname to which the client connected. + # * _optional_ #port — Service port to which the client connected. + # + # Although only oauth2_token is required by this mechanism, it is worth + # noting that application protocols are allowed to + # require #authzid (or other parameters, such as #host + # _or_ #port) as are specific server implementations. + # + # @return [OAuthBearerAuthenticator] a new instance of OAuthBearerAuthenticator + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#177 + def initialize(arg1 = T.unsafe(nil), arg2 = T.unsafe(nil), oauth2_token: T.unsafe(nil), secret: T.unsafe(nil), **args, &blk); end + + # Value of the HTTP Authorization header + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#193 + def authorization; end + + # :call-seq: + # initial_response? -> true + # + # +OAUTHBEARER+ sends an initial client response. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#190 + def initial_response?; end + + # An OAuth 2.0 bearer token. See {RFC-6750}[https://www.rfc-editor.org/rfc/rfc6750] + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#141 + def oauth2_token; end + + # An OAuth 2.0 bearer token. See {RFC-6750}[https://www.rfc-editor.org/rfc/rfc6750] + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#141 + def secret; end +end + +# Authenticator for the "+PLAIN+" SASL mechanism, specified in +# RFC-4616[https://tools.ietf.org/html/rfc4616]. See Net::IMAP#authenticate. +# +# +PLAIN+ authentication sends the password in cleartext. +# RFC-3501[https://tools.ietf.org/html/rfc3501] encourages servers to disable +# cleartext authentication until after TLS has been negotiated. +# RFC-8314[https://tools.ietf.org/html/rfc8314] recommends TLS version 1.2 or +# greater be used for all traffic, and deprecate cleartext access ASAP. +PLAIN+ +# can be secured by TLS encryption. +# +# source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#12 +class Net::IMAP::SASL::PlainAuthenticator + # :call-seq: + # new(username, password, authzid: nil, **) -> authenticator + # new(username:, password:, authzid: nil, **) -> authenticator + # new(authcid:, password:, authzid: nil, **) -> authenticator + # + # Creates an Authenticator for the "+PLAIN+" SASL mechanism. + # + # Called by Net::IMAP#authenticate and similar methods on other clients. + # + # ==== Parameters + # + # * #authcid ― Authentication identity that is associated with #password. + # + # #username ― An alias for #authcid. + # + # * #password ― A password or passphrase associated with the #authcid. + # + # * _optional_ #authzid ― Authorization identity to act as or on behalf of. + # + # When +authzid+ is not set, the server should derive the authorization + # identity from the authentication identity. + # + # Any other keyword parameters are quietly ignored. + # + # @raise [ArgumentError] + # @return [PlainAuthenticator] a new instance of PlainAuthenticator + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#67 + def initialize(user = T.unsafe(nil), pass = T.unsafe(nil), authcid: T.unsafe(nil), secret: T.unsafe(nil), username: T.unsafe(nil), password: T.unsafe(nil), authzid: T.unsafe(nil), **_arg7); end + + # Authentication identity: the identity that matches the #password. + # + # RFC-2831[https://tools.ietf.org/html/rfc2831] uses the term +username+. + # "Authentication identity" is the generic term used by + # RFC-4422[https://tools.ietf.org/html/rfc4422]. + # RFC-4616[https://tools.ietf.org/html/rfc4616] and many later RFCs abbreviate + # this to +authcid+. + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#24 + def authcid; end + + # Authorization identity: an identity to act as or on behalf of. The identity + # form is application protocol specific. If not provided or left blank, the + # server derives an authorization identity from the authentication identity. + # The server is responsible for verifying the client's credentials and + # verifying that the identity it associates with the client's authentication + # identity is allowed to act as (or on behalf of) the authorization identity. + # + # For example, an administrator or superuser might take on another role: + # + # imap.authenticate "PLAIN", "root", passwd, authzid: "user" + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#42 + def authzid; end + + # Returns true when the initial client response was sent. + # + # The authentication should not succeed unless this returns true, but it + # does *not* indicate success. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#99 + def done?; end + + # :call-seq: + # initial_response? -> true + # + # +PLAIN+ can send an initial client response. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#86 + def initial_response?; end + + # A password or passphrase that matches the #username. + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#28 + def password; end + + # Responds with the client's credentials. + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#89 + def process(data); end + + # A password or passphrase that matches the #username. + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#28 + def secret; end + + # Authentication identity: the identity that matches the #password. + # + # RFC-2831[https://tools.ietf.org/html/rfc2831] uses the term +username+. + # "Authentication identity" is the generic term used by + # RFC-4422[https://tools.ietf.org/html/rfc4422]. + # RFC-4616[https://tools.ietf.org/html/rfc4616] and many later RFCs abbreviate + # this to +authcid+. + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#24 + def username; end +end + +# source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#14 +Net::IMAP::SASL::PlainAuthenticator::NULL = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/sasl/stringprep.rb#9 +Net::IMAP::SASL::ProhibitedCodepoint = Net::IMAP::StringPrep::ProhibitedCodepoint + +# source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#7 +module Net::IMAP::SASL::ProtocolAdapters; end + +# This API is experimental, and may change. +# +# source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#9 +module Net::IMAP::SASL::ProtocolAdapters::Generic + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#17 + def cancel_response; end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#10 + def command_name; end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#16 + def decode(string); end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#15 + def encode(string); end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#14 + def encode_ir(string); end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#12 + def host; end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#13 + def port; end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#11 + def service; end +end + +# See RFC-3501 (IMAP4rev1), RFC-4959 (SASL-IR capability), +# and RFC-9051 (IMAP4rev2). +# +# source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#22 +module Net::IMAP::SASL::ProtocolAdapters::IMAP + include ::Net::IMAP::SASL::ProtocolAdapters::Generic + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#24 + def service; end +end + +# See RFC-5034 (SASL capability). +# +# source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#35 +module Net::IMAP::SASL::ProtocolAdapters::POP + include ::Net::IMAP::SASL::ProtocolAdapters::Generic + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#37 + def command_name; end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#38 + def service; end +end + +# See RFC-4954 (AUTH capability). +# +# source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#28 +module Net::IMAP::SASL::ProtocolAdapters::SMTP + include ::Net::IMAP::SASL::ProtocolAdapters::Generic + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#30 + def command_name; end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#31 + def service; end +end + +# Alias for Net::IMAP::StringPrep::SASLprep. +# +# source://net-imap//lib/net/imap/sasl/stringprep.rb#6 +Net::IMAP::SASL::SASLprep = Net::IMAP::StringPrep::SASLprep + +# For method descriptions, +# see {RFC5802 §2.2}[https://www.rfc-editor.org/rfc/rfc5802#section-2.2] +# and {RFC5802 §3}[https://www.rfc-editor.org/rfc/rfc5802#section-3]. +# +# source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#10 +module Net::IMAP::SASL::ScramAlgorithm + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#24 + def H(str); end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#26 + def HMAC(key, data); end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#13 + def Hi(str, salt, iterations); end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#11 + def Normalize(str); end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#28 + def XOR(str1, str2); end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#35 + def auth_message; end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#48 + def client_key; end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#53 + def client_proof; end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#51 + def client_signature; end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#44 + def salted_password; end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#49 + def server_key; end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#52 + def server_signature; end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#50 + def stored_key; end +end + +# Abstract base class for the "+SCRAM-*+" family of SASL mechanisms, +# defined in RFC5802[https://tools.ietf.org/html/rfc5802]. Use via +# Net::IMAP#authenticate. +# +# Directly supported: +# * +SCRAM-SHA-1+ --- ScramSHA1Authenticator +# * +SCRAM-SHA-256+ --- ScramSHA256Authenticator +# +# New +SCRAM-*+ mechanisms can easily be added for any hash algorithm +# supported by +# OpenSSL::Digest[https://ruby.github.io/openssl/OpenSSL/Digest.html]. +# Subclasses need only set an appropriate +DIGEST_NAME+ constant. +# +# === SCRAM algorithm +# +# See the documentation and method definitions on ScramAlgorithm for an +# overview of the algorithm. The different mechanisms differ only by +# which hash function that is used (or by support for channel binding with +# +-PLUS+). +# +# See also the methods on GS2Header. +# +# ==== Server messages +# +# As server messages are received, they are validated and loaded into +# the various attributes, e.g: #snonce, #salt, #iterations, #verifier, +# #server_error, etc. +# +# Unlike many other SASL mechanisms, the +SCRAM-*+ family supports mutual +# authentication and can return server error data in the server messages. +# If #process raises an Error for the server-final-message, then +# server_error may contain error details. +# +# === TLS Channel binding +# +# The SCRAM-*-PLUS mechanisms and channel binding are not +# supported yet. +# +# === Caching SCRAM secrets +# +# Caching of salted_password, client_key, stored_key, and server_key +# is not supported yet. +# +# source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#56 +class Net::IMAP::SASL::ScramAuthenticator + include ::Net::IMAP::SASL::GS2Header + include ::Net::IMAP::SASL::ScramAlgorithm + + # :call-seq: + # new(username, password, **options) -> auth_ctx + # new(username:, password:, **options) -> auth_ctx + # new(authcid:, password:, **options) -> auth_ctx + # + # Creates an authenticator for one of the "+SCRAM-*+" SASL mechanisms. + # Each subclass defines #digest to match a specific mechanism. + # + # Called by Net::IMAP#authenticate and similar methods on other clients. + # + # === Parameters + # + # * #authcid ― Identity whose #password is used. + # + # #username - An alias for #authcid. + # * #password ― Password or passphrase associated with this #username. + # * _optional_ #authzid ― Alternate identity to act as or on behalf of. + # * _optional_ #min_iterations - Overrides the default value (4096). + # + # Any other keyword parameters are quietly ignored. + # + # @return [ScramAuthenticator] a new instance of ScramAuthenticator + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#80 + def initialize(username_arg = T.unsafe(nil), password_arg = T.unsafe(nil), authcid: T.unsafe(nil), username: T.unsafe(nil), authzid: T.unsafe(nil), password: T.unsafe(nil), secret: T.unsafe(nil), min_iterations: T.unsafe(nil), cnonce: T.unsafe(nil), **options); end + + # Authentication identity: the identity that matches the #password. + # + # RFC-2831[https://tools.ietf.org/html/rfc2831] uses the term +username+. + # "Authentication identity" is the generic term used by + # RFC-4422[https://tools.ietf.org/html/rfc4422]. + # RFC-4616[https://tools.ietf.org/html/rfc4616] and many later RFCs abbreviate + # this to +authcid+. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#107 + def authcid; end + + # Authorization identity: an identity to act as or on behalf of. The + # identity form is application protocol specific. If not provided or + # left blank, the server derives an authorization identity from the + # authentication identity. For example, an administrator or superuser + # might take on another role: + # + # imap.authenticate "SCRAM-SHA-256", "root", passwd, authzid: "user" + # + # The server is responsible for verifying the client's credentials and + # verifying that the identity it associates with the client's + # authentication identity is allowed to act as (or on behalf of) the + # authorization identity. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#126 + def authzid; end + + # See {RFC5802 §7}[https://www.rfc-editor.org/rfc/rfc5802#section-7] + # +cbind-input+. + # + # >>> + # *TODO:* implement channel binding, appending +cbind-data+ here. + # + # source://net-imap//lib/net/imap/sasl/gs2_header.rb#37 + def cbind_input; end + + # The client nonce, generated by SecureRandom + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#133 + def cnonce; end + + # Returns a new OpenSSL::Digest object, set to the appropriate hash + # function for the chosen mechanism. + # + # The class's +DIGEST_NAME+ constant must be set to the name of an + # algorithm supported by OpenSSL::Digest. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#155 + def digest; end + + # Is the authentication exchange complete? + # + # If false, another server continuation is required. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#185 + def done?; end + + # See {RFC5802 §7}[https://www.rfc-editor.org/rfc/rfc5802#section-7] + # +client-first-message+. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#159 + def initial_client_response; end + + # The iteration count for the selected hash function and user + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#142 + def iterations; end + + # The minimal allowed iteration count. Lower #iterations will raise an + # Error. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#130 + def min_iterations; end + + # A password or passphrase that matches the #username. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#111 + def password; end + + # responds to the server's challenges + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#164 + def process(challenge); end + + # The salt used by the server for this user + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#139 + def salt; end + + # A password or passphrase that matches the #username. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#111 + def secret; end + + # An error reported by the server during the \SASL exchange. + # + # Does not include errors reported by the protocol, e.g. + # Net::IMAP::NoResponseError. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#148 + def server_error; end + + # The server nonce, which must start with #cnonce + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#136 + def snonce; end + + # Authentication identity: the identity that matches the #password. + # + # RFC-2831[https://tools.ietf.org/html/rfc2831] uses the term +username+. + # "Authentication identity" is the generic term used by + # RFC-4422[https://tools.ietf.org/html/rfc4422]. + # RFC-4616[https://tools.ietf.org/html/rfc4616] and many later RFCs abbreviate + # this to +authcid+. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#107 + def username; end + + private + + # See {RFC5802 §7}[https://www.rfc-editor.org/rfc/rfc5802#section-7] + # +client-final-message-without-proof+. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#240 + def client_final_message_without_proof; end + + # See {RFC5802 §7}[https://www.rfc-editor.org/rfc/rfc5802#section-7] + # +client-first-message-bare+. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#225 + def client_first_message_bare; end + + # See {RFC5802 §7}[https://www.rfc-editor.org/rfc/rfc5802#section-7] + # +client-final-message+. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#233 + def final_message_with_proof; end + + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#192 + def format_message(hash); end + + # RFC5802 specifies "that the order of attributes in client or server + # messages is fixed, with the exception of extension attributes", but + # this parses it simply as a hash, without respect to order. Note that + # repeated keys (violating the spec) will use the last value. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#257 + def parse_challenge(challenge); end + + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#211 + def recv_server_final_message(server_final_message); end + + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#194 + def recv_server_first_message(server_first_message); end + + # Need to store this for auth_message + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#190 + def server_first_message; end +end + +# Authenticator for the "+SCRAM-SHA-1+" SASL mechanism, defined in +# RFC5802[https://tools.ietf.org/html/rfc5802]. +# +# Uses the "SHA-1" digest algorithm from OpenSSL::Digest. +# +# See ScramAuthenticator. +# +# source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#271 +class Net::IMAP::SASL::ScramSHA1Authenticator < ::Net::IMAP::SASL::ScramAuthenticator; end + +# source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#272 +Net::IMAP::SASL::ScramSHA1Authenticator::DIGEST_NAME = T.let(T.unsafe(nil), String) + +# Authenticator for the "+SCRAM-SHA-256+" SASL mechanism, defined in +# RFC7677[https://tools.ietf.org/html/rfc7677]. +# +# Uses the "SHA-256" digest algorithm from OpenSSL::Digest. +# +# See ScramAuthenticator. +# +# source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#281 +class Net::IMAP::SASL::ScramSHA256Authenticator < ::Net::IMAP::SASL::ScramAuthenticator; end + +# source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#282 +Net::IMAP::SASL::ScramSHA256Authenticator::DIGEST_NAME = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/sasl/stringprep.rb#7 +Net::IMAP::SASL::StringPrep = Net::IMAP::StringPrep + +# source://net-imap//lib/net/imap/sasl/stringprep.rb#10 +Net::IMAP::SASL::StringPrepError = Net::IMAP::StringPrep::StringPrepError + +# Authenticator for the "+XOAUTH2+" SASL mechanism. This mechanism was +# originally created for GMail and widely adopted by hosted email providers. +# +XOAUTH2+ has been documented by +# Google[https://developers.google.com/gmail/imap/xoauth2-protocol] and +# Microsoft[https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth]. +# +# This mechanism requires an OAuth2 access token which has been authorized +# with the appropriate OAuth2 scopes to access the user's services. Most of +# these scopes are not standardized---consult each service provider's +# documentation for their scopes. +# +# Although this mechanism was never standardized and has been obsoleted by +# "+OAUTHBEARER+", it is still very widely supported. +# +# See Net::IMAP::SASL::OAuthBearerAuthenticator. +# +# source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#18 +class Net::IMAP::SASL::XOAuth2Authenticator + # :call-seq: + # new(username, oauth2_token, **) -> authenticator + # new(username:, oauth2_token:, **) -> authenticator + # new(authzid:, oauth2_token:, **) -> authenticator + # + # Creates an Authenticator for the "+XOAUTH2+" SASL mechanism, as specified by + # Google[https://developers.google.com/gmail/imap/xoauth2-protocol], + # Microsoft[https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth] + # and Yahoo[https://senders.yahooinc.com/developer/documentation]. + # + # === Properties + # + # * #username --- the username for the account being accessed. + # + # #authzid --- an alias for #username. + # + # Note that, unlike some other authenticators, +username+ sets the + # _authorization_ identity and not the _authentication_ identity. The + # authenticated identity is established for the client with the OAuth token. + # + # * #oauth2_token --- An OAuth2.0 access token which is authorized to access + # the service for #username. + # + # Any other keyword parameters are quietly ignored. + # + # @return [XOAuth2Authenticator] a new instance of XOAuth2Authenticator + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#71 + def initialize(user = T.unsafe(nil), token = T.unsafe(nil), username: T.unsafe(nil), oauth2_token: T.unsafe(nil), authzid: T.unsafe(nil), secret: T.unsafe(nil), **_arg6); end + + # It is unclear from {Google's original XOAUTH2 + # documentation}[https://developers.google.com/gmail/imap/xoauth2-protocol], + # whether "User" refers to the authentication identity (+authcid+) or the + # authorization identity (+authzid+). The authentication identity is + # established for the client by the OAuth token, so it seems that +username+ + # must be the authorization identity. + # + # {Microsoft's documentation for shared + # mailboxes}[https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth#sasl-xoauth2-authentication-for-shared-mailboxes-in-office-365] + # _clearly_ indicates that the Office 365 server interprets it as the + # authorization identity. + # + # Although they _should_ validate that the token has been authorized to access + # the service for +username+, _some_ servers appear to ignore this field, + # relying only the identity and scope authorized by the token. + # Note that, unlike most other authenticators, #username is an alias for the + # authorization identity and not the authentication identity. The + # authenticated identity is established for the client by the #oauth2_token. + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#35 + def authzid; end + + # Returns true when the initial client response was sent. + # + # The authentication should not succeed unless this returns true, but it + # does *not* indicate success. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#98 + def done?; end + + # :call-seq: + # initial_response? -> true + # + # +XOAUTH2+ can send an initial client response. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#84 + def initial_response?; end + + # An OAuth2 access token which has been authorized with the appropriate OAuth2 + # scopes to use the service for #username. + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#44 + def oauth2_token; end + + # Returns the XOAUTH2 formatted response, which combines the +username+ + # with the +oauth2_token+. + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#88 + def process(_data); end + + # An OAuth2 access token which has been authorized with the appropriate OAuth2 + # scopes to use the service for #username. + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#44 + def secret; end + + # It is unclear from {Google's original XOAUTH2 + # documentation}[https://developers.google.com/gmail/imap/xoauth2-protocol], + # whether "User" refers to the authentication identity (+authcid+) or the + # authorization identity (+authzid+). The authentication identity is + # established for the client by the OAuth token, so it seems that +username+ + # must be the authorization identity. + # + # {Microsoft's documentation for shared + # mailboxes}[https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth#sasl-xoauth2-authentication-for-shared-mailboxes-in-office-365] + # _clearly_ indicates that the Office 365 server interprets it as the + # authorization identity. + # + # Although they _should_ validate that the token has been authorized to access + # the service for +username+, _some_ servers appear to ignore this field, + # relying only the identity and scope authorized by the token. + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#35 + def username; end + + private + + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#102 + def build_oauth2_string(username, oauth2_token); end +end + +# Experimental +# +# source://net-imap//lib/net/imap/sasl_adapter.rb#7 +class Net::IMAP::SASLAdapter < ::Net::IMAP::SASL::ClientAdapter + include ::Net::IMAP::SASL::ProtocolAdapters::IMAP + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl_adapter.rb#15 + def auth_capable?(mechanism); end + + # source://net-imap//lib/net/imap/sasl_adapter.rb#16 + def drop_connection; end + + # source://net-imap//lib/net/imap/sasl_adapter.rb#17 + def drop_connection!; end + + # source://net-imap//lib/net/imap/sasl_adapter.rb#13 + def response_errors; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl_adapter.rb#14 + def sasl_ir_capable?; end +end + +# source://net-imap//lib/net/imap/sasl_adapter.rb#10 +Net::IMAP::SASLAdapter::RESPONSE_ERRORS = T.let(T.unsafe(nil), Array) + +# Mailbox attribute indicating that this mailbox is used to hold copies of +# messages that have been sent. Some server implementations might put +# messages here automatically. Alternatively, this might just be advice that +# a client save sent messages here. +# +# source://net-imap//lib/net/imap/flags.rb#248 +Net::IMAP::SENT = T.let(T.unsafe(nil), Symbol) + +# strftime/strptime format for an IMAP4 +date+, excluding optional dquotes. +# Use via the encode_date and decode_date methods. +# +# date = date-text / DQUOTE date-text DQUOTE +# date-text = date-day "-" date-month "-" date-year +# +# date-day = 1*2DIGIT +# ; Day of month +# date-month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / +# "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec" +# date-year = 4DIGIT +# +# source://net-imap//lib/net/imap/data_encoding.rb#22 +Net::IMAP::STRFDATE = T.let(T.unsafe(nil), String) + +# strftime/strptime format for an IMAP4 +date-time+, including dquotes. +# See the encode_datetime and decode_datetime methods. +# +# date-time = DQUOTE date-day-fixed "-" date-month "-" date-year +# SP time SP zone DQUOTE +# +# date-day-fixed = (SP DIGIT) / 2DIGIT +# ; Fixed-format version of date-day +# date-month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / +# "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec" +# date-year = 4DIGIT +# time = 2DIGIT ":" 2DIGIT ":" 2DIGIT +# ; Hours minutes seconds +# zone = ("+" / "-") 4DIGIT +# ; Signed four-digit value of hhmm representing +# ; hours and minutes east of Greenwich (that is, +# ; the amount that the given time differs from +# ; Universal Time). Subtracting the timezone +# ; from the given time will give the UT form. +# ; The Universal Time zone is "+0000". +# +# Note that Time.strptime "%d" flexibly parses either space or zero +# padding. However, the DQUOTEs are *not* optional. +# +# source://net-imap//lib/net/imap/data_encoding.rb#47 +Net::IMAP::STRFTIME = T.let(T.unsafe(nil), String) + +# The mailbox name was subscribed to using the #subscribe command. +# +# source://net-imap//lib/net/imap/flags.rb#173 +Net::IMAP::SUBSCRIBED = T.let(T.unsafe(nil), Symbol) + +# An array of sequence numbers returned by Net::IMAP#search, or unique +# identifiers returned by Net::IMAP#uid_search. +# +# For backward compatibility, SearchResult inherits from Array. +# +# source://net-imap//lib/net/imap/search_result.rb#10 +class Net::IMAP::SearchResult < ::Array + # Returns a SearchResult populated with the given +seq_nums+. + # + # Net::IMAP::SearchResult.new([1, 3, 5], modseq: 9) + # # => Net::IMAP::SearchResult[1, 3, 5, modseq: 9] + # + # @return [SearchResult] a new instance of SearchResult + # + # source://net-imap//lib/net/imap/search_result.rb#29 + def initialize(seq_nums, modseq: T.unsafe(nil)); end + + # Returns whether +other+ is a SearchResult with the same values and the + # same #modseq. The order of numbers is irrelevant. + # + # Net::IMAP::SearchResult[123, 456, modseq: 789] == + # Net::IMAP::SearchResult[123, 456, modseq: 789] + # # => true + # Net::IMAP::SearchResult[123, 456, modseq: 789] == + # Net::IMAP::SearchResult[456, 123, modseq: 789] + # # => true + # + # Net::IMAP::SearchResult[123, 456, modseq: 789] == + # Net::IMAP::SearchResult[987, 654, modseq: 789] + # # => false + # Net::IMAP::SearchResult[123, 456, modseq: 789] == + # Net::IMAP::SearchResult[1, 2, 3, modseq: 9999] + # # => false + # + # SearchResult can be compared directly with Array, if #modseq is nil and + # the array is sorted. + # + # Net::IMAP::SearchResult[9, 8, 6, 4, 1] == [1, 4, 6, 8, 9] # => true + # Net::IMAP::SearchResult[3, 5, 7, modseq: 99] == [3, 5, 7] # => false + # + # Note that Array#== does require matching order and ignores #modseq. + # + # [9, 8, 6, 4, 1] == Net::IMAP::SearchResult[1, 4, 6, 8, 9] # => false + # [3, 5, 7] == Net::IMAP::SearchResult[3, 5, 7, modseq: 99] # => true + # + # source://net-imap//lib/net/imap/search_result.rb#62 + def ==(other); end + + # Hash equality. Unlike #==, order will be taken into account. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/search_result.rb#77 + def eql?(other); end + + # Hash equality. Unlike #==, order will be taken into account. + # + # source://net-imap//lib/net/imap/search_result.rb#71 + def hash; end + + # Returns a string that represents the SearchResult. + # + # Net::IMAP::SearchResult[123, 456, 789].inspect + # # => "[123, 456, 789]" + # + # Net::IMAP::SearchResult[543, 210, 678, modseq: 2048].inspect + # # => "Net::IMAP::SearchResult[543, 210, 678, modseq: 2048]" + # + # source://net-imap//lib/net/imap/search_result.rb#90 + def inspect; end + + # A modification sequence number, as described by the +CONDSTORE+ + # extension in {[RFC7162 + # §3.1.6]}[https://www.rfc-editor.org/rfc/rfc7162.html#section-3.1.6]. + # + # source://net-imap//lib/net/imap/search_result.rb#23 + def modseq; end + + # source://net-imap//lib/net/imap/search_result.rb#123 + def pretty_print(pp); end + + # Returns a string that follows the formal \IMAP syntax. + # + # data = Net::IMAP::SearchResult[2, 8, 32, 128, 256, 512] + # data.to_s # => "* SEARCH 2 8 32 128 256 512" + # data.to_s("SEARCH") # => "* SEARCH 2 8 32 128 256 512" + # data.to_s("SORT") # => "* SORT 2 8 32 128 256 512" + # data.to_s(nil) # => "2 8 32 128 256 512" + # + # data = Net::IMAP::SearchResult[1, 3, 16, 1024, modseq: 2048].to_s + # data.to_s # => "* SEARCH 1 3 16 1024 (MODSEQ 2048)" + # data.to_s("SORT") # => "* SORT 1 3 16 1024 (MODSEQ 2048)" + # data.to_s # => "1 3 16 1024 (MODSEQ 2048)" + # + # source://net-imap//lib/net/imap/search_result.rb#108 + def to_s(type = T.unsafe(nil)); end + + # Converts the SearchResult into a SequenceSet. + # + # Net::IMAP::SearchResult[9, 1, 2, 4, 10, 12, 3, modseq: 123_456] + # .to_sequence_set + # # => Net::IMAP::SequenceSet["1:4,9:10,12"] + # + # source://net-imap//lib/net/imap/search_result.rb#121 + def to_sequence_set; end + + class << self + # Returns a SearchResult populated with the given +seq_nums+. + # + # Net::IMAP::SearchResult[1, 3, 5, modseq: 9] + # # => Net::IMAP::SearchResult[1, 3, 5, modseq: 9] + # + # source://net-imap//lib/net/imap/search_result.rb#16 + def [](*seq_nums, modseq: T.unsafe(nil)); end + end +end + +# An \IMAP sequence set is a set of message sequence numbers or unique +# identifier numbers ("UIDs"). It contains numbers and ranges of numbers. +# The numbers are all non-zero unsigned 32-bit integers and one special +# value ("*") that represents the largest value in the mailbox. +# +# Certain types of \IMAP responses will contain a SequenceSet, for example +# the data for a "MODIFIED" ResponseCode. Some \IMAP commands may +# receive a SequenceSet as an argument, for example IMAP#search, IMAP#fetch, +# and IMAP#store. +# +# == EXPERIMENTAL API +# +# SequenceSet is currently experimental. Only two methods, ::[] and +# #valid_string, are considered stable. Although the API isn't expected to +# change much, any other methods may be removed or changed without +# deprecation. +# +# == Creating sequence sets +# +# SequenceSet.new with no arguments creates an empty sequence set. Note +# that an empty sequence set is invalid in the \IMAP grammar. +# +# set = Net::IMAP::SequenceSet.new +# set.empty? #=> true +# set.valid? #=> false +# set.valid_string #!> raises DataFormatError +# set << 1..10 +# set.empty? #=> false +# set.valid? #=> true +# set.valid_string #=> "1:10" +# +# SequenceSet.new may receive a single optional argument: a non-zero 32 bit +# unsigned integer, a range, a sequence-set formatted string, +# another sequence set, or an enumerable containing any of these. +# +# set = Net::IMAP::SequenceSet.new(1) +# set.valid_string #=> "1" +# set = Net::IMAP::SequenceSet.new(1..100) +# set.valid_string #=> "1:100" +# set = Net::IMAP::SequenceSet.new(1...100) +# set.valid_string #=> "1:99" +# set = Net::IMAP::SequenceSet.new([1, 2, 5..]) +# set.valid_string #=> "1:2,5:*" +# set = Net::IMAP::SequenceSet.new("1,2,3:7,5,6:10,2048,1024") +# set.valid_string #=> "1,2,3:7,5,6:10,2048,1024" +# set = Net::IMAP::SequenceSet.new(1, 2, 3..7, 5, 6..10, 2048, 1024) +# set.valid_string #=> "1:10,55,1024:2048" +# +# Use ::[] with one or more arguments to create a frozen SequenceSet. An +# invalid (empty) set cannot be created with ::[]. +# +# set = Net::IMAP::SequenceSet["1,2,3:7,5,6:10,2048,1024"] +# set.valid_string #=> "1,2,3:7,5,6:10,2048,1024" +# set = Net::IMAP::SequenceSet[1, 2, [3..7, 5], 6..10, 2048, 1024] +# set.valid_string #=> "1:10,55,1024:2048" +# +# == Normalized form +# +# When a sequence set is created with a single String value, that #string +# representation is preserved. SequenceSet's internal representation +# implicitly sorts all entries, de-duplicates numbers, and coalesces +# adjacent or overlapping ranges. Most enumeration methods and offset-based +# methods use this normalized representation. Most modification methods +# will convert #string to its normalized form. +# +# In some cases the order of the string representation is significant, such +# as the +ESORT+, CONTEXT=SORT, and +UIDPLUS+ extensions. Use +# #entries or #each_entry to enumerate the set in its original order. To +# preserve #string order while modifying a set, use #append, #string=, or +# #replace. +# +# == Using * +# +# \IMAP sequence sets may contain a special value "*", which +# represents the largest number in use. From +seq-number+ in +# {RFC9051 §9}[https://www.rfc-editor.org/rfc/rfc9051.html#section-9-5]: +# >>> +# In the case of message sequence numbers, it is the number of messages +# in a non-empty mailbox. In the case of unique identifiers, it is the +# unique identifier of the last message in the mailbox or, if the +# mailbox is empty, the mailbox's current UIDNEXT value. +# +# When creating a SequenceSet, * may be input as -1, +# "*", :*, an endless range, or a range ending in +# -1. When converting to #elements, #ranges, or #numbers, it will +# output as either :* or an endless range. For example: +# +# Net::IMAP::SequenceSet["1,3,*"].to_a #=> [1, 3, :*] +# Net::IMAP::SequenceSet["1,234:*"].to_a #=> [1, 234..] +# Net::IMAP::SequenceSet[1234..-1].to_a #=> [1234..] +# Net::IMAP::SequenceSet[1234..].to_a #=> [1234..] +# +# Net::IMAP::SequenceSet[1234..].to_s #=> "1234:*" +# Net::IMAP::SequenceSet[1234..-1].to_s #=> "1234:*" +# +# Use #limit to convert "*" to a maximum value. When a range +# includes "*", the maximum value will always be matched: +# +# Net::IMAP::SequenceSet["9999:*"].limit(max: 25) +# #=> Net::IMAP::SequenceSet["25"] +# +# === Surprising * behavior +# +# When a set includes *, some methods may have surprising behavior. +# +# For example, #complement treats * as its own number. This way, +# the #intersection of a set and its #complement will always be empty. +# This is not how an \IMAP server interprets the set: it will convert +# * to either the number of messages in the mailbox or +UIDNEXT+, +# as appropriate. And there _will_ be overlap between a set and its +# complement after #limit is applied to each: +# +# ~Net::IMAP::SequenceSet["*"] == Net::IMAP::SequenceSet[1..(2**32-1)] +# ~Net::IMAP::SequenceSet[1..5] == Net::IMAP::SequenceSet["6:*"] +# +# set = Net::IMAP::SequenceSet[1..5] +# (set & ~set).empty? => true +# +# (set.limit(max: 4) & (~set).limit(max: 4)).to_a => [4] +# +# When counting the number of numbers in a set, * will be counted +# _except_ when UINT32_MAX is also in the set: +# UINT32_MAX = 2**32 - 1 +# Net::IMAP::SequenceSet["*"].count => 1 +# Net::IMAP::SequenceSet[1..UINT32_MAX - 1, :*].count => UINT32_MAX +# +# Net::IMAP::SequenceSet["1:*"].count => UINT32_MAX +# Net::IMAP::SequenceSet[UINT32_MAX, :*].count => 1 +# Net::IMAP::SequenceSet[UINT32_MAX..].count => 1 +# +# == What's here? +# +# SequenceSet provides methods for: +# * {Creating a SequenceSet}[rdoc-ref:SequenceSet@Methods+for+Creating+a+SequenceSet] +# * {Comparing}[rdoc-ref:SequenceSet@Methods+for+Comparing] +# * {Querying}[rdoc-ref:SequenceSet@Methods+for+Querying] +# * {Iterating}[rdoc-ref:SequenceSet@Methods+for+Iterating] +# * {Set Operations}[rdoc-ref:SequenceSet@Methods+for+Set+Operations] +# * {Assigning}[rdoc-ref:SequenceSet@Methods+for+Assigning] +# * {Deleting}[rdoc-ref:SequenceSet@Methods+for+Deleting] +# * {IMAP String Formatting}[rdoc-ref:SequenceSet@Methods+for+IMAP+String+Formatting] +# +# === Methods for Creating a \SequenceSet +# * ::[]: Creates a validated frozen sequence set from one or more inputs. +# * ::new: Creates a new mutable sequence set, which may be empty (invalid). +# * ::try_convert: Calls +to_sequence_set+ on an object and verifies that +# the result is a SequenceSet. +# * ::empty: Returns a frozen empty (invalid) SequenceSet. +# * ::full: Returns a frozen SequenceSet containing every possible number. +# +# === Methods for Comparing +# +# Comparison to another \SequenceSet: +# - #==: Returns whether a given set contains the same numbers as +self+. +# - #eql?: Returns whether a given set uses the same #string as +self+. +# +# Comparison to objects which are convertible to \SequenceSet: +# - #===: +# Returns whether a given object is fully contained within +self+, or +# +nil+ if the object cannot be converted to a compatible type. +# - #cover? (aliased as #===): +# Returns whether a given object is fully contained within +self+. +# - #intersect? (aliased as #overlap?): +# Returns whether +self+ and a given object have any common elements. +# - #disjoint?: +# Returns whether +self+ and a given object have no common elements. +# +# === Methods for Querying +# These methods do not modify +self+. +# +# Set membership: +# - #include? (aliased as #member?): +# Returns whether a given object (nz-number, range, or *) is +# contained by the set. +# - #include_star?: Returns whether the set contains *. +# +# Minimum and maximum value elements: +# - #min: Returns the minimum number in the set. +# - #max: Returns the maximum number in the set. +# - #minmax: Returns the minimum and maximum numbers in the set. +# +# Accessing value by offset: +# - #[] (aliased as #slice): Returns the number or consecutive subset at a +# given offset or range of offsets. +# - #at: Returns the number at a given offset. +# - #find_index: Returns the given number's offset in the set +# +# Set cardinality: +# - #count (aliased as #size): Returns the count of numbers in the set. +# - #empty?: Returns whether the set has no members. \IMAP syntax does not +# allow empty sequence sets. +# - #valid?: Returns whether the set has any members. +# - #full?: Returns whether the set contains every possible value, including +# *. +# +# === Methods for Iterating +# +# - #each_element: Yields each number and range in the set, sorted and +# coalesced, and returns +self+. +# - #elements (aliased as #to_a): Returns an Array of every number and range +# in the set, sorted and coalesced. +# - #each_entry: Yields each number and range in the set, unsorted and +# without deduplicating numbers or coalescing ranges, and returns +self+. +# - #entries: Returns an Array of every number and range in the set, +# unsorted and without deduplicating numbers or coalescing ranges. +# - #each_range: +# Yields each element in the set as a Range and returns +self+. +# - #ranges: Returns an Array of every element in the set, converting +# numbers into ranges of a single value. +# - #each_number: Yields each number in the set and returns +self+. +# - #numbers: Returns an Array with every number in the set, expanding +# ranges into all of their contained numbers. +# - #to_set: Returns a Set containing all of the #numbers in the set. +# +# === Methods for \Set Operations +# These methods do not modify +self+. +# +# - #| (aliased as #union and #+): Returns a new set combining all members +# from +self+ with all members from the other object. +# - #& (aliased as #intersection): Returns a new set containing all members +# common to +self+ and the other object. +# - #- (aliased as #difference): Returns a copy of +self+ with all members +# in the other object removed. +# - #^ (aliased as #xor): Returns a new set containing all members from +# +self+ and the other object except those common to both. +# - #~ (aliased as #complement): Returns a new set containing all members +# that are not in +self+ +# - #limit: Returns a copy of +self+ which has replaced * with a +# given maximum value and removed all members over that maximum. +# +# === Methods for Assigning +# These methods add or replace elements in +self+. +# +# - #add (aliased as #<<): Adds a given object to the set; returns +self+. +# - #add?: If the given object is not an element in the set, adds it and +# returns +self+; otherwise, returns +nil+. +# - #merge: Merges multiple elements into the set; returns +self+. +# - #append: Adds a given object to the set, appending it to the existing +# string, and returns +self+. +# - #string=: Assigns a new #string value and replaces #elements to match. +# - #replace: Replaces the contents of the set with the contents +# of a given object. +# - #complement!: Replaces the contents of the set with its own #complement. +# +# === Methods for Deleting +# These methods remove elements from +self+. +# +# - #clear: Removes all elements in the set; returns +self+. +# - #delete: Removes a given object from the set; returns +self+. +# - #delete?: If the given object is an element in the set, removes it and +# returns it; otherwise, returns +nil+. +# - #delete_at: Removes the number at a given offset. +# - #slice!: Removes the number or consecutive numbers at a given offset or +# range of offsets. +# - #subtract: Removes each given object from the set; returns +self+. +# - #limit!: Replaces * with a given maximum value and removes all +# members over that maximum; returns +self+. +# +# === Methods for \IMAP String Formatting +# +# - #to_s: Returns the +sequence-set+ string, or an empty string when the +# set is empty. +# - #string: Returns the +sequence-set+ string, or nil when empty. +# - #valid_string: Returns the +sequence-set+ string, or raises +# DataFormatError when the set is empty. +# - #normalized_string: Returns a sequence-set string with its +# elements sorted and coalesced, or nil when the set is empty. +# - #normalize: Returns a new set with this set's normalized +sequence-set+ +# representation. +# - #normalize!: Updates #string to its normalized +sequence-set+ +# representation and returns +self+. +# +# source://net-imap//lib/net/imap/sequence_set.rb#279 +class Net::IMAP::SequenceSet + # Create a new SequenceSet object from +input+, which may be another + # SequenceSet, an IMAP formatted +sequence-set+ string, a number, a + # range, :*, or an enumerable of these. + # + # Use ::[] to create a frozen (non-empty) SequenceSet. + # + # @return [SequenceSet] a new instance of SequenceSet + # + # source://net-imap//lib/net/imap/sequence_set.rb#348 + def initialize(input = T.unsafe(nil)); end + + # :call-seq: + # self & other -> sequence set + # intersection(other) -> sequence set + # + # Returns a new sequence set containing only the numbers common to this + # set and +other+. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet[1..5] & [2, 4, 6] + # #=> Net::IMAP::SequenceSet["2,4"] + # + # (seqset & other) is equivalent to (seqset - ~other). + # + # source://net-imap//lib/net/imap/sequence_set.rb#623 + def &(other); end + + # :call-seq: + # self + other -> sequence set + # self | other -> sequence set + # union(other) -> sequence set + # + # Returns a new sequence set that has every number in the +other+ object + # added. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet["1:5"] | 2 | [4..6, 99] + # #=> Net::IMAP::SequenceSet["1:6,99"] + # + # Related: #add, #merge + # + # source://net-imap//lib/net/imap/sequence_set.rb#586 + def +(other); end + + # :call-seq: + # self - other -> sequence set + # difference(other) -> sequence set + # + # Returns a new sequence set built by duplicating this set and removing + # every number that appears in +other+. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet[1..5] - 2 - 4 - 6 + # #=> Net::IMAP::SequenceSet["1,3,5"] + # + # Related: #subtract + # + # source://net-imap//lib/net/imap/sequence_set.rb#605 + def -(other); end + + # :call-seq: + # add(object) -> self + # self << other -> self + # + # Adds a range or number to the set and returns +self+. + # + # #string will be regenerated. Use #merge to add many elements at once. + # + # Related: #add?, #merge, #union + # + # source://net-imap//lib/net/imap/sequence_set.rb#674 + def <<(object); end + + # :call-seq: self == other -> true or false + # + # Returns true when the other SequenceSet represents the same message + # identifiers. Encoding difference—such as order, overlaps, or + # duplicates—are ignored. + # + # Net::IMAP::SequenceSet["1:3"] == Net::IMAP::SequenceSet["1:3"] + # #=> true + # Net::IMAP::SequenceSet["1,2,3"] == Net::IMAP::SequenceSet["1:3"] + # #=> true + # Net::IMAP::SequenceSet["1,3"] == Net::IMAP::SequenceSet["3,1"] + # #=> true + # Net::IMAP::SequenceSet["9,1:*"] == Net::IMAP::SequenceSet["1:*"] + # #=> true + # + # Related: #eql?, #normalize + # + # source://net-imap//lib/net/imap/sequence_set.rb#441 + def ==(other); end + + # :call-seq: self === other -> true | false | nil + # + # Returns whether +other+ is contained within the set. Returns +nil+ if a + # StandardError is raised while converting +other+ to a comparable type. + # + # Related: #cover?, #include?, #include_star? + # + # source://net-imap//lib/net/imap/sequence_set.rb#471 + def ===(other); end + + # :call-seq: + # seqset[index] -> integer or :* or nil + # slice(index) -> integer or :* or nil + # seqset[start, length] -> sequence set or nil + # slice(start, length) -> sequence set or nil + # seqset[range] -> sequence set or nil + # slice(range) -> sequence set or nil + # + # Returns a number or a subset from +self+, without modifying the set. + # + # When an Integer argument +index+ is given, the number at offset +index+ + # is returned: + # + # set = Net::IMAP::SequenceSet["10:15,20:23,26"] + # set[0] #=> 10 + # set[5] #=> 15 + # set[10] #=> 26 + # + # If +index+ is negative, it counts relative to the end of +self+: + # set = Net::IMAP::SequenceSet["10:15,20:23,26"] + # set[-1] #=> 26 + # set[-3] #=> 22 + # set[-6] #=> 15 + # + # If +index+ is out of range, +nil+ is returned. + # + # set = Net::IMAP::SequenceSet["10:15,20:23,26"] + # set[11] #=> nil + # set[-12] #=> nil + # + # The result is based on the normalized set—sorted and de-duplicated—not + # on the assigned value of #string. + # + # set = Net::IMAP::SequenceSet["12,20:23,11:16,21"] + # set[0] #=> 11 + # set[-1] #=> 23 + # + # source://net-imap//lib/net/imap/sequence_set.rb#1088 + def [](index, length = T.unsafe(nil)); end + + # :call-seq: + # self ^ other -> sequence set + # xor(other) -> sequence set + # + # Returns a new sequence set containing numbers that are exclusive between + # this set and +other+. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet[1..5] ^ [2, 4, 6] + # #=> Net::IMAP::SequenceSet["1,3,5:6"] + # + # (seqset ^ other) is equivalent to ((seqset | other) - + # (seqset & other)). + # + # source://net-imap//lib/net/imap/sequence_set.rb#644 + def ^(other); end + + # :call-seq: + # add(object) -> self + # self << other -> self + # + # Adds a range or number to the set and returns +self+. + # + # #string will be regenerated. Use #merge to add many elements at once. + # + # Related: #add?, #merge, #union + # + # source://net-imap//lib/net/imap/sequence_set.rb#674 + def add(object); end + + # :call-seq: add?(object) -> self or nil + # + # Adds a range or number to the set and returns +self+. Returns +nil+ + # when the object is already included in the set. + # + # #string will be regenerated. Use #merge to add many elements at once. + # + # Related: #add, #merge, #union, #include? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#700 + def add?(object); end + + # Adds a range or number to the set and returns +self+. + # + # Unlike #add, #merge, or #union, the new value is appended to #string. + # This may result in a #string which has duplicates or is out-of-order. + # + # source://net-imap//lib/net/imap/sequence_set.rb#684 + def append(object); end + + # :call-seq: at(index) -> integer or nil + # + # Returns a number from +self+, without modifying the set. Behaves the + # same as #[], except that #at only allows a single integer argument. + # + # Related: #[], #slice + # + # source://net-imap//lib/net/imap/sequence_set.rb#1037 + def at(index); end + + # Removes all elements and returns self. + # + # source://net-imap//lib/net/imap/sequence_set.rb#351 + def clear; end + + # :call-seq: + # ~ self -> sequence set + # complement -> sequence set + # + # Returns the complement of self, a SequenceSet which contains all numbers + # _except_ for those in this set. + # + # ~Net::IMAP::SequenceSet.full #=> Net::IMAP::SequenceSet.empty + # ~Net::IMAP::SequenceSet.empty #=> Net::IMAP::SequenceSet.full + # ~Net::IMAP::SequenceSet["1:5,100:222"] + # #=> Net::IMAP::SequenceSet["6:99,223:*"] + # ~Net::IMAP::SequenceSet["6:99,223:*"] + # #=> Net::IMAP::SequenceSet["1:5,100:222"] + # + # Related: #complement! + # + # source://net-imap//lib/net/imap/sequence_set.rb#662 + def complement; end + + # :call-seq: complement! -> self + # + # Converts the SequenceSet to its own #complement. It will contain all + # possible values _except_ for those currently in the set. + # + # Related: #complement + # + # source://net-imap//lib/net/imap/sequence_set.rb#1168 + def complement!; end + + # Returns the count of #numbers in the set. + # + # If * and 2**32 - 1 (the maximum 32-bit unsigned + # integer value) are both in the set, they will only be counted once. + # + # source://net-imap//lib/net/imap/sequence_set.rb#989 + def count; end + + # :call-seq: cover?(other) -> true | false | nil + # + # Returns whether +other+ is contained within the set. +other+ may be any + # object that would be accepted by ::new. + # + # Related: #===, #include?, #include_star? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#483 + def cover?(other); end + + # :call-seq: delete(object) -> self + # + # Deletes the given range or number from the set and returns +self+. + # + # #string will be regenerated after deletion. Use #subtract to remove + # many elements at once. + # + # Related: #delete?, #delete_at, #subtract, #difference + # + # source://net-imap//lib/net/imap/sequence_set.rb#712 + def delete(object); end + + # :call-seq: + # delete?(number) -> integer or nil + # delete?(star) -> :* or nil + # delete?(range) -> sequence set or nil + # + # Removes a specified value from the set, and returns the removed value. + # Returns +nil+ if nothing was removed. + # + # Returns an integer when the specified +number+ argument was removed: + # set = Net::IMAP::SequenceSet.new [5..10, 20] + # set.delete?(7) #=> 7 + # set #=> # + # set.delete?("20") #=> 20 + # set #=> # + # set.delete?(30) #=> nil + # + # Returns :* when * or -1 is specified and + # removed: + # set = Net::IMAP::SequenceSet.new "5:9,20,35,*" + # set.delete?(-1) #=> :* + # set #=> # + # + # And returns a new SequenceSet when a range is specified: + # + # set = Net::IMAP::SequenceSet.new [5..10, 20] + # set.delete?(9..) #=> # + # set #=> # + # set.delete?(21..) #=> nil + # + # #string will be regenerated after deletion. + # + # Related: #delete, #delete_at, #subtract, #difference, #disjoint? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#749 + def delete?(object); end + + # :call-seq: delete_at(index) -> number or :* or nil + # + # Deletes a number the set, indicated by the given +index+. Returns the + # number that was removed, or +nil+ if nothing was removed. + # + # #string will be regenerated after deletion. + # + # Related: #delete, #delete?, #slice!, #subtract, #difference + # + # source://net-imap//lib/net/imap/sequence_set.rb#772 + def delete_at(index); end + + # :call-seq: + # self - other -> sequence set + # difference(other) -> sequence set + # + # Returns a new sequence set built by duplicating this set and removing + # every number that appears in +other+. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet[1..5] - 2 - 4 - 6 + # #=> Net::IMAP::SequenceSet["1,3,5"] + # + # Related: #subtract + # + # source://net-imap//lib/net/imap/sequence_set.rb#605 + def difference(other); end + + # Returns +true+ if the set and a given object have no common elements, + # +false+ otherwise. + # + # Net::IMAP::SequenceSet["5:10"].disjoint? "7,9,11" #=> false + # Net::IMAP::SequenceSet["5:10"].disjoint? "11:33" #=> true + # + # Related: #intersection, #intersect? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#535 + def disjoint?(other); end + + # Yields each number or range (or :*) in #elements to the block + # and returns self. Returns an enumerator when called without a block. + # + # The returned numbers are sorted and de-duplicated, even when the input + # #string is not. See #normalize. + # + # Related: #elements, #each_entry + # + # source://net-imap//lib/net/imap/sequence_set.rb#924 + def each_element; end + + # 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 + # normalized form, this will yield the same values as #each_element. + # + # Related: #entries, #each_element + # + # source://net-imap//lib/net/imap/sequence_set.rb#910 + def each_entry(&block); end + + # Yields each number in #numbers to the block and returns self. + # If the set contains a *, RangeError will be raised. + # + # Returns an enumerator when called without a block (even if the set + # contains *). + # + # Related: #numbers + # + # @raise [RangeError] + # + # source://net-imap//lib/net/imap/sequence_set.rb#964 + def each_number(&block); end + + # Yields each range in #ranges to the block and returns self. + # Returns an enumerator when called without a block. + # + # Related: #ranges + # + # source://net-imap//lib/net/imap/sequence_set.rb#946 + def each_range; end + + # Returns an array of ranges and integers and :*. + # + # The returned elements are sorted and coalesced, even when the input + # #string is not. * will sort last. See #normalize. + # + # By itself, * translates to :*. A range containing + # * translates to an endless range. Use #limit to translate both + # cases to a maximum value. + # + # If the original input was unordered or contains overlapping ranges, the + # returned ranges will be ordered and coalesced. + # + # Net::IMAP::SequenceSet["2,5:9,6,*,12:11"].elements + # #=> [2, 5..9, 11..12, :*] + # + # Related: #each_element, #ranges, #numbers + # + # source://net-imap//lib/net/imap/sequence_set.rb#851 + def elements; end + + # Returns true if the set contains no elements + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#565 + def empty?; end + + # Returns an array of ranges and integers and :*. + # + # The entries are in the same order they appear in #string, with no + # sorting, deduplication, or coalescing. When #string is in its + # normalized form, this will return the same result as #elements. + # This is useful when the given order is significant, for example in a + # ESEARCH response to IMAP#sort. + # + # Related: #each_entry, #elements + # + # source://net-imap//lib/net/imap/sequence_set.rb#833 + def entries; end + + # :call-seq: eql?(other) -> true or false + # + # Hash equality requires the same encoded #string representation. + # + # Net::IMAP::SequenceSet["1:3"] .eql? Net::IMAP::SequenceSet["1:3"] + # #=> true + # Net::IMAP::SequenceSet["1,2,3"].eql? Net::IMAP::SequenceSet["1:3"] + # #=> false + # Net::IMAP::SequenceSet["1,3"] .eql? Net::IMAP::SequenceSet["3,1"] + # #=> false + # Net::IMAP::SequenceSet["9,1:*"].eql? Net::IMAP::SequenceSet["1:*"] + # #=> false + # + # Related: #==, #normalize + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#460 + def eql?(other); end + + # Returns the index of +number+ in the set, or +nil+ if +number+ isn't in + # the set. + # + # Related: #[] + # + # source://net-imap//lib/net/imap/sequence_set.rb#1000 + def find_index(number); end + + # Freezes and returns the set. A frozen SequenceSet is Ractor-safe. + # + # source://net-imap//lib/net/imap/sequence_set.rb#418 + def freeze; end + + # Returns true if the set contains every possible element. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#568 + def full?; end + + # See #eql? + # + # source://net-imap//lib/net/imap/sequence_set.rb#463 + def hash; end + + # Returns +true+ when a given number or range is in +self+, and +false+ + # otherwise. Returns +false+ unless +number+ is an Integer, Range, or + # *. + # + # set = Net::IMAP::SequenceSet["5:10,100,111:115"] + # set.include? 1 #=> false + # set.include? 5..10 #=> true + # set.include? 11..20 #=> false + # set.include? 100 #=> true + # set.include? 6 #=> true, covered by "5:10" + # set.include? 4..9 #=> true, covered by "5:10" + # set.include? "4:9" #=> true, strings are parsed + # set.include? 4..9 #=> false, intersection is not sufficient + # set.include? "*" #=> false, use #limit to re-interpret "*" + # set.include? -1 #=> false, -1 is interpreted as "*" + # + # set = Net::IMAP::SequenceSet["5:10,100,111:*"] + # set.include? :* #=> true + # set.include? "*" #=> true + # set.include? -1 #=> true + # set.include? 200.. #=> true + # set.include? 100.. #=> false + # + # Related: #include_star?, #cover?, #=== + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#509 + def include?(element); end + + # Returns +true+ when the set contains *. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#514 + def include_star?; end + + # source://net-imap//lib/net/imap/sequence_set.rb#1214 + def inspect; end + + # Returns +true+ if the set and a given object have any common elements, + # +false+ otherwise. + # + # Net::IMAP::SequenceSet["5:10"].intersect? "7,9,11" #=> true + # Net::IMAP::SequenceSet["5:10"].intersect? "11:33" #=> false + # + # Related: #intersection, #disjoint? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#523 + def intersect?(other); end + + # :call-seq: + # self & other -> sequence set + # intersection(other) -> sequence set + # + # Returns a new sequence set containing only the numbers common to this + # set and +other+. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet[1..5] & [2, 4, 6] + # #=> Net::IMAP::SequenceSet["2,4"] + # + # (seqset & other) is equivalent to (seqset - ~other). + # + # source://net-imap//lib/net/imap/sequence_set.rb#623 + def intersection(other); end + + # Returns a frozen SequenceSet with * converted to +max+, numbers + # and ranges over +max+ removed, and ranges containing +max+ converted to + # end at +max+. + # + # Net::IMAP::SequenceSet["5,10:22,50"].limit(max: 20).to_s + # #=> "5,10:20" + # + # * is always interpreted as the maximum value. When the set + # contains *, it will be set equal to the limit. + # + # Net::IMAP::SequenceSet["*"].limit(max: 37) + # #=> Net::IMAP::SequenceSet["37"] + # Net::IMAP::SequenceSet["5:*"].limit(max: 37) + # #=> Net::IMAP::SequenceSet["5:37"] + # Net::IMAP::SequenceSet["500:*"].limit(max: 37) + # #=> Net::IMAP::SequenceSet["37"] + # + # source://net-imap//lib/net/imap/sequence_set.rb#1141 + def limit(max:); end + + # Removes all members over +max+ and returns self. If * is a + # member, it will be converted to +max+. + # + # Related: #limit + # + # source://net-imap//lib/net/imap/sequence_set.rb#1154 + def limit!(max:); end + + # :call-seq: max(star: :*) => integer or star or nil + # + # Returns the maximum value in +self+, +star+ when the set includes + # *, or +nil+ when the set is empty. + # + # source://net-imap//lib/net/imap/sequence_set.rb#543 + def max(star: T.unsafe(nil)); end + + # Returns +true+ when a given number or range is in +self+, and +false+ + # otherwise. Returns +false+ unless +number+ is an Integer, Range, or + # *. + # + # set = Net::IMAP::SequenceSet["5:10,100,111:115"] + # set.include? 1 #=> false + # set.include? 5..10 #=> true + # set.include? 11..20 #=> false + # set.include? 100 #=> true + # set.include? 6 #=> true, covered by "5:10" + # set.include? 4..9 #=> true, covered by "5:10" + # set.include? "4:9" #=> true, strings are parsed + # set.include? 4..9 #=> false, intersection is not sufficient + # set.include? "*" #=> false, use #limit to re-interpret "*" + # set.include? -1 #=> false, -1 is interpreted as "*" + # + # set = Net::IMAP::SequenceSet["5:10,100,111:*"] + # set.include? :* #=> true + # set.include? "*" #=> true + # set.include? -1 #=> true + # set.include? 200.. #=> true + # set.include? 100.. #=> false + # + # Related: #include_star?, #cover?, #=== + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#509 + def member?(element); end + + # Merges all of the elements that appear in any of the +inputs+ into the + # set, and returns +self+. + # + # The +inputs+ may be any objects that would be accepted by ::new: + # non-zero 32 bit unsigned integers, ranges, sequence-set + # formatted strings, other sequence sets, or enumerables containing any of + # these. + # + # #string will be regenerated after all inputs have been merged. + # + # Related: #add, #add?, #union + # + # source://net-imap//lib/net/imap/sequence_set.rb#805 + def merge(*inputs); end + + # :call-seq: min(star: :*) => integer or star or nil + # + # Returns the minimum value in +self+, +star+ when the only value in the + # set is *, or +nil+ when the set is empty. + # + # source://net-imap//lib/net/imap/sequence_set.rb#551 + def min(star: T.unsafe(nil)); end + + # :call-seq: minmax(star: :*) => nil or [integer, integer or star] + # + # Returns a 2-element array containing the minimum and maximum numbers in + # +self+, or +nil+ when the set is empty. + # + # source://net-imap//lib/net/imap/sequence_set.rb#559 + def minmax(star: T.unsafe(nil)); end + + # Returns a new SequenceSet with a normalized string representation. + # + # The returned set's #string is sorted and deduplicated. Adjacent or + # overlapping elements will be merged into a single larger range. + # + # Net::IMAP::SequenceSet["1:5,3:7,10:9,10:11"].normalize + # #=> Net::IMAP::SequenceSet["1:7,9:11"] + # + # Related: #normalize!, #normalized_string + # + # source://net-imap//lib/net/imap/sequence_set.rb#1187 + def normalize; end + + # Resets #string to be sorted, deduplicated, and coalesced. Returns + # +self+. + # + # Related: #normalize, #normalized_string + # + # source://net-imap//lib/net/imap/sequence_set.rb#1197 + def normalize!; end + + # Returns a normalized +sequence-set+ string representation, sorted + # and deduplicated. Adjacent or overlapping elements will be merged into + # a single larger range. Returns +nil+ when the set is empty. + # + # Net::IMAP::SequenceSet["1:5,3:7,10:9,10:11"].normalized_string + # #=> "1:7,9:11" + # + # Related: #normalize!, #normalize + # + # source://net-imap//lib/net/imap/sequence_set.rb#1210 + def normalized_string; end + + # Returns a sorted array of all of the number values in the sequence set. + # + # The returned numbers are sorted and de-duplicated, even when the input + # #string is not. See #normalize. + # + # Net::IMAP::SequenceSet["2,5:9,6,12:11"].numbers + # #=> [2, 5, 6, 7, 8, 9, 11, 12] + # + # If the set contains a *, RangeError is raised. See #limit. + # + # Net::IMAP::SequenceSet["10000:*"].numbers + # #!> RangeError + # + # *WARNING:* Even excluding sets with *, an enormous result can + # easily be created. An array with over 4 billion integers could be + # returned, requiring up to 32GiB of memory on a 64-bit architecture. + # + # Net::IMAP::SequenceSet[10000..2**32-1].numbers + # # ...probably freezes the process for a while... + # #!> NoMemoryError (probably) + # + # For safety, consider using #limit or #intersection to set an upper + # bound. Alternatively, use #each_element, #each_range, or even + # #each_number to avoid allocation of a result array. + # + # Related: #elements, #ranges, #to_set + # + # source://net-imap//lib/net/imap/sequence_set.rb#900 + def numbers; end + + # Returns +true+ if the set and a given object have any common elements, + # +false+ otherwise. + # + # Net::IMAP::SequenceSet["5:10"].intersect? "7,9,11" #=> true + # Net::IMAP::SequenceSet["5:10"].intersect? "11:33" #=> false + # + # Related: #intersection, #disjoint? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#523 + def overlap?(other); end + + # Returns an array of ranges + # + # The returned elements are sorted and coalesced, even when the input + # #string is not. * will sort last. See #normalize. + # + # * translates to an endless range. By itself, * + # translates to :*... Use #limit to set * to a maximum + # value. + # + # The returned ranges will be ordered and coalesced, even when the input + # #string is not. * will sort last. See #normalize. + # + # Net::IMAP::SequenceSet["2,5:9,6,*,12:11"].ranges + # #=> [2..2, 5..9, 11..12, :*..] + # Net::IMAP::SequenceSet["123,999:*,456:789"].ranges + # #=> [123..123, 456..789, 999..] + # + # Related: #each_range, #elements, #numbers, #to_set + # + # source://net-imap//lib/net/imap/sequence_set.rb#872 + def ranges; end + + # Replace the contents of the set with the contents of +other+ and returns + # +self+. + # + # +other+ may be another SequenceSet, or it may be an IMAP +sequence-set+ + # string, a number, a range, *, or an enumerable of these. + # + # source://net-imap//lib/net/imap/sequence_set.rb#358 + def replace(other); end + + # Unstable API: for internal use only (Net::IMAP#send_data) + # + # source://net-imap//lib/net/imap/sequence_set.rb#1234 + def send_data(imap, tag); end + + # Returns the count of #numbers in the set. + # + # If * and 2**32 - 1 (the maximum 32-bit unsigned + # integer value) are both in the set, they will only be counted once. + # + # source://net-imap//lib/net/imap/sequence_set.rb#989 + def size; end + + # :call-seq: + # seqset[index] -> integer or :* or nil + # slice(index) -> integer or :* or nil + # seqset[start, length] -> sequence set or nil + # slice(start, length) -> sequence set or nil + # seqset[range] -> sequence set or nil + # slice(range) -> sequence set or nil + # + # Returns a number or a subset from +self+, without modifying the set. + # + # When an Integer argument +index+ is given, the number at offset +index+ + # is returned: + # + # set = Net::IMAP::SequenceSet["10:15,20:23,26"] + # set[0] #=> 10 + # set[5] #=> 15 + # set[10] #=> 26 + # + # If +index+ is negative, it counts relative to the end of +self+: + # set = Net::IMAP::SequenceSet["10:15,20:23,26"] + # set[-1] #=> 26 + # set[-3] #=> 22 + # set[-6] #=> 15 + # + # If +index+ is out of range, +nil+ is returned. + # + # set = Net::IMAP::SequenceSet["10:15,20:23,26"] + # set[11] #=> nil + # set[-12] #=> nil + # + # The result is based on the normalized set—sorted and de-duplicated—not + # on the assigned value of #string. + # + # set = Net::IMAP::SequenceSet["12,20:23,11:16,21"] + # set[0] #=> 11 + # set[-1] #=> 23 + # + # source://net-imap//lib/net/imap/sequence_set.rb#1088 + def slice(index, length = T.unsafe(nil)); end + + # :call-seq: + # slice!(index) -> integer or :* or nil + # slice!(start, length) -> sequence set or nil + # slice!(range) -> sequence set or nil + # + # Deletes a number or consecutive numbers from the set, indicated by the + # given +index+, +start+ and +length+, or +range+ of offsets. Returns the + # number or sequence set that was removed, or +nil+ if nothing was + # removed. Arguments are interpreted the same as for #slice or #[]. + # + # #string will be regenerated after deletion. + # + # Related: #slice, #delete_at, #delete, #delete?, #subtract, #difference + # + # source://net-imap//lib/net/imap/sequence_set.rb#789 + def slice!(index, length = T.unsafe(nil)); end + + # Returns the \IMAP +sequence-set+ string representation, or +nil+ when + # the set is empty. Note that an empty set is invalid in the \IMAP + # syntax. + # + # Use #valid_string to raise an exception when the set is empty, or #to_s + # to return an empty string. + # + # If the set was created from a single string, it is not normalized. If + # the set is updated the string will be normalized. + # + # Related: #valid_string, #normalized_string, #to_s + # + # source://net-imap//lib/net/imap/sequence_set.rb#390 + def string; end + + # Assigns a new string to #string and resets #elements to match. It + # cannot be set to an empty string—assign +nil+ or use #clear instead. + # The string is validated but not normalized. + # + # Use #add or #merge to add a string to an existing set. + # + # Related: #replace, #clear + # + # source://net-imap//lib/net/imap/sequence_set.rb#399 + def string=(str); end + + # Removes all of the elements that appear in any of the given +objects+ + # from the set, and returns +self+. + # + # The +objects+ may be any objects that would be accepted by ::new: + # non-zero 32 bit unsigned integers, ranges, sequence-set + # formatted strings, other sequence sets, or enumerables containing any of + # these. + # + # Related: #difference + # + # source://net-imap//lib/net/imap/sequence_set.rb#819 + def subtract(*objects); end + + # Returns an array of ranges and integers and :*. + # + # The returned elements are sorted and coalesced, even when the input + # #string is not. * will sort last. See #normalize. + # + # By itself, * translates to :*. A range containing + # * translates to an endless range. Use #limit to translate both + # cases to a maximum value. + # + # If the original input was unordered or contains overlapping ranges, the + # returned ranges will be ordered and coalesced. + # + # Net::IMAP::SequenceSet["2,5:9,6,*,12:11"].elements + # #=> [2, 5..9, 11..12, :*] + # + # Related: #each_element, #ranges, #numbers + # + # source://net-imap//lib/net/imap/sequence_set.rb#851 + def to_a; end + + # Returns the \IMAP +sequence-set+ string representation, or an empty + # string when the set is empty. Note that an empty set is invalid in the + # \IMAP syntax. + # + # Related: #valid_string, #normalized_string, #to_s + # + # source://net-imap//lib/net/imap/sequence_set.rb#415 + def to_s; end + + # Returns self + def to_sequence_set; end + + # Returns a Set with all of the #numbers in the sequence set. + # + # If the set contains a *, RangeError will be raised. + # + # See #numbers for the warning about very large sets. + # + # Related: #elements, #ranges, #numbers + # + # source://net-imap//lib/net/imap/sequence_set.rb#983 + def to_set; end + + # :call-seq: + # self + other -> sequence set + # self | other -> sequence set + # union(other) -> sequence set + # + # Returns a new sequence set that has every number in the +other+ object + # added. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet["1:5"] | 2 | [4..6, 99] + # #=> Net::IMAP::SequenceSet["1:6,99"] + # + # Related: #add, #merge + # + # source://net-imap//lib/net/imap/sequence_set.rb#586 + def union(other); end + + # Returns false when the set is empty. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#562 + def valid?; end + + # Returns the \IMAP +sequence-set+ string representation, or raises a + # DataFormatError when the set is empty. + # + # Use #string to return +nil+ or #to_s to return an empty string without + # error. + # + # Related: #string, #normalized_string, #to_s + # + # @raise [DataFormatError] + # + # source://net-imap//lib/net/imap/sequence_set.rb#374 + def valid_string; end + + # Unstable API: currently for internal use only (Net::IMAP#validate_data) + # + # source://net-imap//lib/net/imap/sequence_set.rb#1228 + def validate; end + + # :call-seq: + # self ^ other -> sequence set + # xor(other) -> sequence set + # + # Returns a new sequence set containing numbers that are exclusive between + # this set and +other+. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet[1..5] ^ [2, 4, 6] + # #=> Net::IMAP::SequenceSet["1,3,5:6"] + # + # (seqset ^ other) is equivalent to ((seqset | other) - + # (seqset & other)). + # + # source://net-imap//lib/net/imap/sequence_set.rb#644 + def xor(other); end + + # :call-seq: + # self + other -> sequence set + # self | other -> sequence set + # union(other) -> sequence set + # + # Returns a new sequence set that has every number in the +other+ object + # added. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet["1:5"] | 2 | [4..6, 99] + # #=> Net::IMAP::SequenceSet["1:6,99"] + # + # Related: #add, #merge + # + # source://net-imap//lib/net/imap/sequence_set.rb#586 + def |(other); end + + # :call-seq: + # ~ self -> sequence set + # complement -> sequence set + # + # Returns the complement of self, a SequenceSet which contains all numbers + # _except_ for those in this set. + # + # ~Net::IMAP::SequenceSet.full #=> Net::IMAP::SequenceSet.empty + # ~Net::IMAP::SequenceSet.empty #=> Net::IMAP::SequenceSet.full + # ~Net::IMAP::SequenceSet["1:5,100:222"] + # #=> Net::IMAP::SequenceSet["6:99,223:*"] + # ~Net::IMAP::SequenceSet["6:99,223:*"] + # #=> Net::IMAP::SequenceSet["1:5,100:222"] + # + # Related: #complement! + # + # source://net-imap//lib/net/imap/sequence_set.rb#662 + def ~; end + + protected + + # source://net-imap//lib/net/imap/sequence_set.rb#1240 + def tuples; end + + private + + # source://net-imap//lib/net/imap/sequence_set.rb#1011 + def each_tuple_with_index; end + + # source://net-imap//lib/net/imap/sequence_set.rb#1304 + def from_tuple_int(num); end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#1313 + def include_tuple?(_arg0); end + + # frozen clones are shallow copied + # + # source://net-imap//lib/net/imap/sequence_set.rb#1247 + def initialize_clone(other); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1251 + def initialize_dup(other); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1257 + def input_to_tuple(obj); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1268 + def input_to_tuples(obj); end + + # unlike SequenceSet#try_convert, this returns an Integer, Range, + # String, Set, Array, or... any type of object. + # + # source://net-imap//lib/net/imap/sequence_set.rb#1285 + def input_try_convert(input); end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#1315 + def intersect_tuple?(_arg0); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1409 + def nz_number(num); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1404 + def range_gte_to(num); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1293 + def range_to_tuple(range); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1244 + def remain_frozen(set); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1020 + def reverse_each_tuple_with_index; end + + # @raise [ArgumentError] + # + # source://net-imap//lib/net/imap/sequence_set.rb#1099 + def slice_length(start, length); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1107 + def slice_range(range); end + + # @raise [DataFormatError] + # + # source://net-imap//lib/net/imap/sequence_set.rb#1308 + def str_to_tuple(str); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1307 + def str_to_tuples(str); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1303 + def to_tuple_int(obj); end + + # --|=====| |=====new tuple=====| append + # ?????????-|=====new tuple=====|-|===lower===|-- insert + # + # |=====new tuple=====| + # ---------??=======lower=======??--------------- noop + # + # ---------??===lower==|--|==| join remaining + # ---------??===lower==|--|==|----|===upper===|-- join until upper + # ---------??===lower==|--|==|--|=====upper===|-- join to upper + # + # source://net-imap//lib/net/imap/sequence_set.rb#1333 + def tuple_add(tuple); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1342 + def tuple_coalesce(lower, lower_idx, min, max); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1400 + def tuple_gte_with_index(num); end + + # |====tuple================| + # --|====| no more 1. noop + # --|====|---------------------------|====lower====|-- 2. noop + # -------|======lower================|---------------- 3. split + # --------|=====lower================|---------------- 4. trim beginning + # + # -------|======lower====????????????----------------- trim lower + # --------|=====lower====????????????----------------- delete lower + # + # -------??=====lower===============|----------------- 5. trim/delete one + # -------??=====lower====|--|====| no more 6. delete rest + # -------??=====lower====|--|====|---|====upper====|-- 7. delete until + # -------??=====lower====|--|====|--|=====upper====|-- 8. delete and trim + # + # source://net-imap//lib/net/imap/sequence_set.rb#1369 + def tuple_subtract(tuple); end + + # source://net-imap//lib/net/imap/sequence_set.rb#932 + def tuple_to_entry(_arg0); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1306 + def tuple_to_str(tuple); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1379 + def tuple_trim_or_split(lower, idx, tmin, tmax); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1320 + def tuples_add(tuples); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1321 + def tuples_subtract(tuples); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1386 + def tuples_trim_or_delete(lower, lower_idx, tmin, tmax); end + + class << self + # :call-seq: + # SequenceSet[*values] -> valid frozen sequence set + # + # Returns a frozen SequenceSet, constructed from +values+. + # + # An empty SequenceSet is invalid and will raise a DataFormatError. + # + # Use ::new to create a mutable or empty SequenceSet. + # + # source://net-imap//lib/net/imap/sequence_set.rb#305 + def [](first, *rest); end + + # Returns a frozen empty set singleton. Note that valid \IMAP sequence + # sets cannot be empty, so this set is _invalid_. + # + # source://net-imap//lib/net/imap/sequence_set.rb#336 + def empty; end + + # Returns a frozen full set singleton: "1:*" + # + # source://net-imap//lib/net/imap/sequence_set.rb#339 + def full; end + + # :call-seq: + # SequenceSet.try_convert(obj) -> sequence set or nil + # + # If +obj+ is a SequenceSet, returns +obj+. If +obj+ responds_to + # +to_sequence_set+, calls +obj.to_sequence_set+ and returns the result. + # Otherwise returns +nil+. + # + # If +obj.to_sequence_set+ doesn't return a SequenceSet, an exception is + # raised. + # + # @raise [DataFormatError] + # + # source://net-imap//lib/net/imap/sequence_set.rb#326 + def try_convert(obj); end + end +end + +# source://net-imap//lib/net/imap/sequence_set.rb#291 +Net::IMAP::SequenceSet::COERCIBLE = T.let(T.unsafe(nil), Proc) + +# intentionally defined after the class implementation +# +# source://net-imap//lib/net/imap/sequence_set.rb#1420 +Net::IMAP::SequenceSet::EMPTY = T.let(T.unsafe(nil), Net::IMAP::SequenceSet) + +# source://net-imap//lib/net/imap/sequence_set.rb#292 +Net::IMAP::SequenceSet::ENUMABLE = T.let(T.unsafe(nil), Proc) + +# source://net-imap//lib/net/imap/sequence_set.rb#1421 +Net::IMAP::SequenceSet::FULL = T.let(T.unsafe(nil), Net::IMAP::SequenceSet) + +# valid inputs for "*" +# +# source://net-imap//lib/net/imap/sequence_set.rb#288 +Net::IMAP::SequenceSet::STARS = T.let(T.unsafe(nil), Array) + +# represents "*" internally, to simplify sorting (etc) +# +# source://net-imap//lib/net/imap/sequence_set.rb#284 +Net::IMAP::SequenceSet::STAR_INT = T.let(T.unsafe(nil), Integer) + +# The largest possible non-zero unsigned 32-bit integer +# +# source://net-imap//lib/net/imap/sequence_set.rb#281 +Net::IMAP::SequenceSet::UINT32_MAX = T.let(T.unsafe(nil), Integer) + +# source://net-imap//lib/net/imap/command_data.rb#273 +module Net::IMAP::StringFormatter + private + + # coerces non-nil using +to_s+ + # + # source://net-imap//lib/net/imap/command_data.rb#300 + def nstring(str); end + + # coerces using +to_s+ + # + # source://net-imap//lib/net/imap/command_data.rb#290 + def string(str); end + + # Allows nil, symbols, and strings + # + # source://net-imap//lib/net/imap/command_data.rb#285 + def valid_nstring?(str); end + + # Allows symbols in addition to strings + # + # source://net-imap//lib/net/imap/command_data.rb#280 + def valid_string?(str); end + + class << self + # coerces non-nil using +to_s+ + # + # source://net-imap//lib/net/imap/command_data.rb#300 + def nstring(str); end + + # coerces using +to_s+ + # + # source://net-imap//lib/net/imap/command_data.rb#290 + def string(str); end + + # Allows nil, symbols, and strings + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/command_data.rb#285 + def valid_nstring?(str); end + + # Allows symbols in addition to strings + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/command_data.rb#280 + def valid_string?(str); end + end +end + +# source://net-imap//lib/net/imap/command_data.rb#275 +Net::IMAP::StringFormatter::LITERAL_REGEX = T.let(T.unsafe(nil), Regexp) + +# Regexps and utility methods for implementing stringprep profiles. The +# \StringPrep algorithm is defined by +# {RFC-3454}[https://www.rfc-editor.org/rfc/rfc3454.html]. Each +# codepoint table defined in the RFC-3454 appendices is matched by a Regexp +# defined in this module. +# +# source://net-imap//lib/net/imap/stringprep.rb#11 +module Net::IMAP::StringPrep + private + + # Checks that +string+ obeys all of the "Bidirectional Characters" + # requirements in RFC-3454, §6: + # + # * The characters in \StringPrep\[\"C.8\"] MUST be prohibited + # * If a string contains any RandALCat character, the string MUST NOT + # contain any LCat character. + # * If a string contains any RandALCat character, a RandALCat + # character MUST be the first character of the string, and a + # RandALCat character MUST be the last character of the string. + # + # This is usually combined with #check_prohibited!, so table "C.8" is only + # checked when c_8: true. + # + # Raises either ProhibitedCodepoint or BidiStringError unless all + # requirements are met. +profile+ is an optional string which will be + # added to any exception that is raised (it does not affect behavior). + # + # source://net-imap//lib/net/imap/stringprep.rb#144 + def check_bidi!(string, c_8: T.unsafe(nil), profile: T.unsafe(nil)); end + + # Checks +string+ for any codepoint in +tables+. Raises a + # ProhibitedCodepoint describing the first matching table. + # + # Also checks bidirectional characters, when bidi: true, which may + # raise a BidiStringError. + # + # +profile+ is an optional string which will be added to any exception that + # is raised (it does not affect behavior). + # + # source://net-imap//lib/net/imap/stringprep.rb#104 + def check_prohibited!(string, *tables, bidi: T.unsafe(nil), unassigned: T.unsafe(nil), stored: T.unsafe(nil), profile: T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/stringprep.rb#88 + def map_tables!(string, *tables); end + + # >>> + # 1. Map -- For each character in the input, check if it has a mapping + # and, if so, replace it with its mapping. This is described in + # section 3. + # + # 2. Normalize -- Possibly normalize the result of step 1 using Unicode + # normalization. This is described in section 4. + # + # 3. Prohibit -- Check for any characters that are not allowed in the + # output. If any are found, return an error. This is described in + # section 5. + # + # 4. Check bidi -- Possibly check for right-to-left characters, and if + # any are found, make sure that the whole string satisfies the + # requirements for bidirectional strings. If the string does not + # satisfy the requirements for bidirectional strings, return an + # error. This is described in section 6. + # + # The above steps MUST be performed in the order given to comply with + # this specification. + # + # source://net-imap//lib/net/imap/stringprep.rb#76 + def stringprep(string, maps:, normalization:, prohibited:, **opts); end + + class << self + # Returns a Regexp matching the given +table+ name. + # + # source://net-imap//lib/net/imap/stringprep.rb#49 + def [](table); end + + # Checks that +string+ obeys all of the "Bidirectional Characters" + # requirements in RFC-3454, §6: + # + # * The characters in \StringPrep\[\"C.8\"] MUST be prohibited + # * If a string contains any RandALCat character, the string MUST NOT + # contain any LCat character. + # * If a string contains any RandALCat character, a RandALCat + # character MUST be the first character of the string, and a + # RandALCat character MUST be the last character of the string. + # + # This is usually combined with #check_prohibited!, so table "C.8" is only + # checked when c_8: true. + # + # Raises either ProhibitedCodepoint or BidiStringError unless all + # requirements are met. +profile+ is an optional string which will be + # added to any exception that is raised (it does not affect behavior). + # + # source://net-imap//lib/net/imap/stringprep.rb#144 + def check_bidi!(string, c_8: T.unsafe(nil), profile: T.unsafe(nil)); end + + # Checks +string+ for any codepoint in +tables+. Raises a + # ProhibitedCodepoint describing the first matching table. + # + # Also checks bidirectional characters, when bidi: true, which may + # raise a BidiStringError. + # + # +profile+ is an optional string which will be added to any exception that + # is raised (it does not affect behavior). + # + # source://net-imap//lib/net/imap/stringprep.rb#104 + def check_prohibited!(string, *tables, bidi: T.unsafe(nil), unassigned: T.unsafe(nil), stored: T.unsafe(nil), profile: T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/stringprep.rb#88 + def map_tables!(string, *tables); end + + # >>> + # 1. Map -- For each character in the input, check if it has a mapping + # and, if so, replace it with its mapping. This is described in + # section 3. + # + # 2. Normalize -- Possibly normalize the result of step 1 using Unicode + # normalization. This is described in section 4. + # + # 3. Prohibit -- Check for any characters that are not allowed in the + # output. If any are found, return an error. This is described in + # section 5. + # + # 4. Check bidi -- Possibly check for right-to-left characters, and if + # any are found, make sure that the whole string satisfies the + # requirements for bidirectional strings. If the string does not + # satisfy the requirements for bidirectional strings, return an + # error. This is described in section 6. + # + # The above steps MUST be performed in the order given to comply with + # this specification. + # + # source://net-imap//lib/net/imap/stringprep.rb#76 + def stringprep(string, maps:, normalization:, prohibited:, **opts); end + end +end + +# StringPrepError raised when +string+ contains bidirectional characters +# which violate the StringPrep requirements. +# +# source://net-imap//lib/net/imap/stringprep.rb#45 +class Net::IMAP::StringPrep::BidiStringError < ::Net::IMAP::StringPrep::StringPrepError; end + +# Defined in RFC3491[https://tools.ietf.org/html/rfc3491], the +nameprep+ +# profile of "Stringprep" is: +# >>> +# used by the IDNA protocol for preparing domain names; it is not +# designed for any other purpose. It is explicitly not designed for +# processing arbitrary free text and SHOULD NOT be used for that +# purpose. +# +# ... +# +# This profile specifies prohibiting using the following tables...: +# +# - C.1.2 (Non-ASCII space characters) +# - C.2.2 (Non-ASCII control characters) +# - C.3 (Private use characters) +# - C.4 (Non-character code points) +# - C.5 (Surrogate codes) +# - C.6 (Inappropriate for plain text) +# - C.7 (Inappropriate for canonical representation) +# - C.8 (Change display properties are deprecated) +# - C.9 (Tagging characters) +# +# IMPORTANT NOTE: This profile MUST be used with the IDNA protocol. +# The IDNA protocol has additional prohibitions that are checked +# outside of this profile. +# +# source://net-imap//lib/net/imap/stringprep/nameprep.rb#32 +module Net::IMAP::StringPrep::NamePrep + private + + # source://net-imap//lib/net/imap/stringprep/nameprep.rb#54 + def nameprep(string, **opts); end + + class << self + # source://net-imap//lib/net/imap/stringprep/nameprep.rb#54 + def nameprep(string, **opts); end + end +end + +# From RFC3491[https://www.rfc-editor.org/rfc/rfc3491.html] §6 +# +# source://net-imap//lib/net/imap/stringprep/nameprep.rb#50 +Net::IMAP::StringPrep::NamePrep::CHECK_BIDI = T.let(T.unsafe(nil), TrueClass) + +# From RFC3491[https://www.rfc-editor.org/rfc/rfc3491.html] §3 +# +# source://net-imap//lib/net/imap/stringprep/nameprep.rb#41 +Net::IMAP::StringPrep::NamePrep::MAPPING_TABLES = T.let(T.unsafe(nil), Array) + +# From RFC3491[https://www.rfc-editor.org/rfc/rfc3491.html] §4 +# +# source://net-imap//lib/net/imap/stringprep/nameprep.rb#44 +Net::IMAP::StringPrep::NamePrep::NORMALIZATION = T.let(T.unsafe(nil), Symbol) + +# From RFC3491[https://www.rfc-editor.org/rfc/rfc3491.html] §5 +# +# source://net-imap//lib/net/imap/stringprep/nameprep.rb#47 +Net::IMAP::StringPrep::NamePrep::PROHIBITED_TABLES = T.let(T.unsafe(nil), Array) + +# From RFC3491[https://www.rfc-editor.org/rfc/rfc3491.html] §10 +# +# source://net-imap//lib/net/imap/stringprep/nameprep.rb#35 +Net::IMAP::StringPrep::NamePrep::STRINGPREP_PROFILE = T.let(T.unsafe(nil), String) + +# From RFC3491[https://www.rfc-editor.org/rfc/rfc3491.html] §2 +# +# source://net-imap//lib/net/imap/stringprep/nameprep.rb#38 +Net::IMAP::StringPrep::NamePrep::UNASSIGNED_TABLE = T.let(T.unsafe(nil), String) + +# StringPrepError raised when +string+ contains a codepoint prohibited by +# +table+. +# +# source://net-imap//lib/net/imap/stringprep.rb#31 +class Net::IMAP::StringPrep::ProhibitedCodepoint < ::Net::IMAP::StringPrep::StringPrepError + # @return [ProhibitedCodepoint] a new instance of ProhibitedCodepoint + # + # source://net-imap//lib/net/imap/stringprep.rb#34 + def initialize(table, *args, **kwargs); end + + # Returns the value of attribute table. + # + # source://net-imap//lib/net/imap/stringprep.rb#32 + def table; end +end + +# SASLprep#saslprep can be used to prepare a string according to [RFC4013]. +# +# \SASLprep maps characters three ways: to nothing, to space, and Unicode +# normalization form KC. \SASLprep prohibits codepoints from nearly all +# standard StringPrep tables (RFC3454, Appendix "C"), and uses +# \StringPrep's standard bidirectional characters requirements (Appendix +# "D"). \SASLprep also uses \StringPrep's definition of "Unassigned" +# codepoints (Appendix "A"). +# +# source://net-imap//lib/net/imap/stringprep/saslprep.rb#15 +module Net::IMAP::StringPrep::SASLprep + private + + # Prepares a UTF-8 +string+ for comparison, using the \SASLprep profile + # RFC4013 of the StringPrep algorithm RFC3454. + # + # By default, prohibited strings will return +nil+. When +exception+ is + # +true+, a StringPrepError describing the violation will be raised. + # + # When +stored+ is +true+, "unassigned" codepoints will be prohibited. + # For \StringPrep and the \SASLprep profile, "unassigned" refers to + # Unicode 3.2, and not later versions. See RFC3454 §7 for more + # information. + # + # source://net-imap//lib/net/imap/stringprep/saslprep.rb#42 + def saslprep(str, stored: T.unsafe(nil), exception: T.unsafe(nil)); end + + class << self + # Prepares a UTF-8 +string+ for comparison, using the \SASLprep profile + # RFC4013 of the StringPrep algorithm RFC3454. + # + # By default, prohibited strings will return +nil+. When +exception+ is + # +true+, a StringPrepError describing the violation will be raised. + # + # When +stored+ is +true+, "unassigned" codepoints will be prohibited. + # For \StringPrep and the \SASLprep profile, "unassigned" refers to + # Unicode 3.2, and not later versions. See RFC3454 §7 for more + # information. + # + # source://net-imap//lib/net/imap/stringprep/saslprep.rb#42 + def saslprep(str, stored: T.unsafe(nil), exception: T.unsafe(nil)); end + end +end + +# Used to short-circuit strings that don't need preparation. +# +# source://net-imap//lib/net/imap/stringprep/saslprep.rb#18 +Net::IMAP::StringPrep::SASLprep::ASCII_NO_CTRLS = T.let(T.unsafe(nil), Regexp) + +# Bidirectional Characters [StringPrep, §6] +# +# A Regexp for strings that don't satisfy StringPrep's Bidirectional +# Characters rules. +# +# Equal to StringPrep::Tables::BIDI_FAILURE. +# Redefined here to avoid loading StringPrep::Tables unless necessary. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#79 +Net::IMAP::StringPrep::SASLprep::BIDI_FAILURE = T.let(T.unsafe(nil), Regexp) + +# RFC4013 §2.1 Mapping - mapped to nothing +# >>> +# the "commonly mapped to nothing" characters +# (\StringPrep\[\"B.1\"]) that can be mapped to nothing. +# +# Equal to \StringPrep\[\"B.1\"]. +# Redefined here to avoid loading StringPrep::Tables unless necessary. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#27 +Net::IMAP::StringPrep::SASLprep::MAP_TO_NOTHING = T.let(T.unsafe(nil), Regexp) + +# RFC4013 §2.1 Mapping - mapped to space +# >>> +# non-ASCII space characters (\StringPrep\[\"C.1.2\"]) that can +# be mapped to SPACE (U+0020) +# +# Equal to \StringPrep\[\"C.1.2\"]. +# Redefined here to avoid loading StringPrep::Tables unless necessary. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#18 +Net::IMAP::StringPrep::SASLprep::MAP_TO_SPACE = T.let(T.unsafe(nil), Regexp) + +# A Regexp matching strings prohibited by RFC4013 §2.3 and §2.4. +# +# This combines PROHIBITED_OUTPUT and BIDI_FAILURE. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#84 +Net::IMAP::StringPrep::SASLprep::PROHIBITED = T.let(T.unsafe(nil), Regexp) + +# A Regexp matching codepoints prohibited by RFC4013 §2.3. +# +# This combines all of the TABLES_PROHIBITED tables. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#54 +Net::IMAP::StringPrep::SASLprep::PROHIBITED_OUTPUT = T.let(T.unsafe(nil), Regexp) + +# A Regexp matching codepoints prohibited by RFC4013 §2.3 and §2.5. +# +# This combines PROHIBITED_OUTPUT and UNASSIGNED. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#68 +Net::IMAP::StringPrep::SASLprep::PROHIBITED_OUTPUT_STORED = T.let(T.unsafe(nil), Regexp) + +# A Regexp matching strings prohibited by RFC4013 §2.3, §2.4, and §2.5. +# +# This combines PROHIBITED_OUTPUT_STORED and BIDI_FAILURE. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#91 +Net::IMAP::StringPrep::SASLprep::PROHIBITED_STORED = T.let(T.unsafe(nil), Regexp) + +# RFC4013 §2.3 Prohibited Output +# >>> +# * Non-ASCII space characters — \StringPrep\[\"C.1.2\"] +# * ASCII control characters — \StringPrep\[\"C.2.1\"] +# * Non-ASCII control characters — \StringPrep\[\"C.2.2\"] +# * Private Use characters — \StringPrep\[\"C.3\"] +# * Non-character code points — \StringPrep\[\"C.4\"] +# * Surrogate code points — \StringPrep\[\"C.5\"] +# * Inappropriate for plain text characters — \StringPrep\[\"C.6\"] +# * Inappropriate for canonical representation characters — \StringPrep\[\"C.7\"] +# * Change display properties or deprecated characters — \StringPrep\[\"C.8\"] +# * Tagging characters — \StringPrep\[\"C.9\"] +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#41 +Net::IMAP::StringPrep::SASLprep::TABLES_PROHIBITED = T.let(T.unsafe(nil), Array) + +# Adds unassigned (by Unicode 3.2) codepoints to TABLES_PROHIBITED. +# +# RFC4013 §2.5 Unassigned Code Points +# >>> +# This profile specifies the \StringPrep\[\"A.1\"] table as its +# list of unassigned code points. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#49 +Net::IMAP::StringPrep::SASLprep::TABLES_PROHIBITED_STORED = T.let(T.unsafe(nil), Array) + +# RFC4013 §2.5 Unassigned Code Points +# >>> +# This profile specifies the \StringPrep\[\"A.1\"] table as its +# list of unassigned code points. +# +# Equal to \StringPrep\[\"A.1\"]. +# Redefined here to avoid loading StringPrep::Tables unless necessary. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#63 +Net::IMAP::StringPrep::SASLprep::UNASSIGNED = T.let(T.unsafe(nil), Regexp) + +# ArgumentError raised when +string+ is invalid for the stringprep +# +profile+. +# +# source://net-imap//lib/net/imap/stringprep.rb#19 +class Net::IMAP::StringPrep::StringPrepError < ::ArgumentError + # @return [StringPrepError] a new instance of StringPrepError + # + # source://net-imap//lib/net/imap/stringprep.rb#22 + def initialize(*args, string: T.unsafe(nil), profile: T.unsafe(nil)); end + + # Returns the value of attribute profile. + # + # source://net-imap//lib/net/imap/stringprep.rb#20 + def profile; end + + # Returns the value of attribute string. + # + # source://net-imap//lib/net/imap/stringprep.rb#20 + def string; end +end + +# source://net-imap//lib/net/imap/stringprep/tables.rb#9 +module Net::IMAP::StringPrep::Tables; end + +# source://net-imap//lib/net/imap/stringprep/tables.rb#75 +Net::IMAP::StringPrep::Tables::BIDI_DESC_REQ2 = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/stringprep/tables.rb#83 +Net::IMAP::StringPrep::Tables::BIDI_DESC_REQ3 = T.let(T.unsafe(nil), String) + +# Bidirectional Characters [StringPrep, §6], Requirement 2 +# >>> +# If a string contains any RandALCat character, the string MUST NOT +# contain any LCat character. +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#81 +Net::IMAP::StringPrep::Tables::BIDI_FAILS_REQ2 = T.let(T.unsafe(nil), Regexp) + +# Bidirectional Characters [StringPrep, §6], Requirement 3 +# >>> +# If a string contains any RandALCat character, a RandALCat +# character MUST be the first character of the string, and a +# RandALCat character MUST be the last character of the string. +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#90 +Net::IMAP::StringPrep::Tables::BIDI_FAILS_REQ3 = T.let(T.unsafe(nil), Regexp) + +# Bidirectional Characters [StringPrep, §6] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#93 +Net::IMAP::StringPrep::Tables::BIDI_FAILURE = T.let(T.unsafe(nil), Regexp) + +# Unassigned code points in Unicode 3.2 \StringPrep\[\"A.1\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#12 +Net::IMAP::StringPrep::Tables::IN_A_1 = T.let(T.unsafe(nil), Regexp) + +# Commonly mapped to nothing \StringPrep\[\"B.1\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#15 +Net::IMAP::StringPrep::Tables::IN_B_1 = T.let(T.unsafe(nil), Regexp) + +# Mapping for case-folding used with NFKC \StringPrep\[\"B.2\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#18 +Net::IMAP::StringPrep::Tables::IN_B_2 = T.let(T.unsafe(nil), Regexp) + +# Mapping for case-folding used with no normalization \StringPrep\[\"B.3\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#21 +Net::IMAP::StringPrep::Tables::IN_B_3 = T.let(T.unsafe(nil), Regexp) + +# ASCII space characters \StringPrep\[\"C.1.1\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#33 +Net::IMAP::StringPrep::Tables::IN_C_1_1 = T.let(T.unsafe(nil), Regexp) + +# Non-ASCII space characters \StringPrep\[\"C.1.2\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#36 +Net::IMAP::StringPrep::Tables::IN_C_1_2 = T.let(T.unsafe(nil), Regexp) + +# ASCII control characters \StringPrep\[\"C.2.1\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#39 +Net::IMAP::StringPrep::Tables::IN_C_2_1 = T.let(T.unsafe(nil), Regexp) + +# Non-ASCII control characters \StringPrep\[\"C.2.2\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#42 +Net::IMAP::StringPrep::Tables::IN_C_2_2 = T.let(T.unsafe(nil), Regexp) + +# Private use \StringPrep\[\"C.3\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#45 +Net::IMAP::StringPrep::Tables::IN_C_3 = T.let(T.unsafe(nil), Regexp) + +# Non-character code points \StringPrep\[\"C.4\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#48 +Net::IMAP::StringPrep::Tables::IN_C_4 = T.let(T.unsafe(nil), Regexp) + +# Surrogate codes \StringPrep\[\"C.5\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#51 +Net::IMAP::StringPrep::Tables::IN_C_5 = T.let(T.unsafe(nil), Regexp) + +# Inappropriate for plain text \StringPrep\[\"C.6\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#54 +Net::IMAP::StringPrep::Tables::IN_C_6 = T.let(T.unsafe(nil), Regexp) + +# Inappropriate for canonical representation \StringPrep\[\"C.7\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#57 +Net::IMAP::StringPrep::Tables::IN_C_7 = T.let(T.unsafe(nil), Regexp) + +# Change display properties or are deprecated \StringPrep\[\"C.8\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#60 +Net::IMAP::StringPrep::Tables::IN_C_8 = T.let(T.unsafe(nil), Regexp) + +# Tagging characters \StringPrep\[\"C.9\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#63 +Net::IMAP::StringPrep::Tables::IN_C_9 = T.let(T.unsafe(nil), Regexp) + +# Characters with bidirectional property "R" or "AL" \StringPrep\[\"D.1\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#66 +Net::IMAP::StringPrep::Tables::IN_D_1 = T.let(T.unsafe(nil), Regexp) + +# Used to check req3 of bidirectional checks +# Matches the negation of the D.1 table +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#70 +Net::IMAP::StringPrep::Tables::IN_D_1_NEGATED = T.let(T.unsafe(nil), Regexp) + +# Characters with bidirectional property "L" \StringPrep\[\"D.2\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#73 +Net::IMAP::StringPrep::Tables::IN_D_2 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/stringprep/tables.rb#139 +Net::IMAP::StringPrep::Tables::MAPPINGS = T.let(T.unsafe(nil), Hash) + +# Replacements for IN_B.1 +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#24 +Net::IMAP::StringPrep::Tables::MAP_B_1 = T.let(T.unsafe(nil), String) + +# Replacements for IN_B.2 +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#27 +Net::IMAP::StringPrep::Tables::MAP_B_2 = T.let(T.unsafe(nil), Hash) + +# Replacements for IN_B.3 +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#30 +Net::IMAP::StringPrep::Tables::MAP_B_3 = T.let(T.unsafe(nil), Hash) + +# Regexps matching each codepoint table in the RFC-3454 appendices +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#119 +Net::IMAP::StringPrep::Tables::REGEXPS = T.let(T.unsafe(nil), Hash) + +# Names of each codepoint table in the RFC-3454 appendices +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#96 +Net::IMAP::StringPrep::Tables::TITLES = T.let(T.unsafe(nil), Hash) + +# Defined in RFC-4505[https://tools.ietf.org/html/rfc4505] §3, The +trace+ +# profile of \StringPrep is used by the +ANONYMOUS+ \SASL mechanism. +# +# source://net-imap//lib/net/imap/stringprep/trace.rb#9 +module Net::IMAP::StringPrep::Trace + private + + # From RFC-4505[https://tools.ietf.org/html/rfc4505] §3, The "trace" + # Profile of "Stringprep": + # >>> + # The character repertoire of this profile is Unicode 3.2 [Unicode]. + # + # No mapping is required by this profile. + # + # No Unicode normalization is required by this profile. + # + # The list of unassigned code points for this profile is that provided + # in Appendix A of [StringPrep]. Unassigned code points are not + # prohibited. + # + # Characters from the following tables of [StringPrep] are prohibited: + # (documented on PROHIBITED_TABLES) + # + # This profile requires bidirectional character checking per Section 6 + # of [StringPrep]. + # + # source://net-imap//lib/net/imap/stringprep/trace.rb#68 + def stringprep_trace(string, **opts); end + + class << self + # From RFC-4505[https://tools.ietf.org/html/rfc4505] §3, The "trace" + # Profile of "Stringprep": + # >>> + # The character repertoire of this profile is Unicode 3.2 [Unicode]. + # + # No mapping is required by this profile. + # + # No Unicode normalization is required by this profile. + # + # The list of unassigned code points for this profile is that provided + # in Appendix A of [StringPrep]. Unassigned code points are not + # prohibited. + # + # Characters from the following tables of [StringPrep] are prohibited: + # (documented on PROHIBITED_TABLES) + # + # This profile requires bidirectional character checking per Section 6 + # of [StringPrep]. + # + # source://net-imap//lib/net/imap/stringprep/trace.rb#68 + def stringprep_trace(string, **opts); end + end +end + +# >>> +# This profile requires bidirectional character checking per Section 6 +# of [StringPrep]. +# +# source://net-imap//lib/net/imap/stringprep/trace.rb#46 +Net::IMAP::StringPrep::Trace::CHECK_BIDI = T.let(T.unsafe(nil), TrueClass) + +# >>> +# No mapping is required by this profile. +# +# source://net-imap//lib/net/imap/stringprep/trace.rb#20 +Net::IMAP::StringPrep::Trace::MAPPING_TABLES = T.let(T.unsafe(nil), T.untyped) + +# >>> +# No Unicode normalization is required by this profile. +# +# source://net-imap//lib/net/imap/stringprep/trace.rb#24 +Net::IMAP::StringPrep::Trace::NORMALIZATION = T.let(T.unsafe(nil), T.untyped) + +# From RFC-4505[https://tools.ietf.org/html/rfc4505] §3, The "trace" +# Profile of "Stringprep": +# >>> +# Characters from the following tables of [StringPrep] are prohibited: +# +# - C.2.1 (ASCII control characters) +# - C.2.2 (Non-ASCII control characters) +# - C.3 (Private use characters) +# - C.4 (Non-character code points) +# - C.5 (Surrogate codes) +# - C.6 (Inappropriate for plain text) +# - C.8 (Change display properties are deprecated) +# - C.9 (Tagging characters) +# +# No additional characters are prohibited. +# +# source://net-imap//lib/net/imap/stringprep/trace.rb#41 +Net::IMAP::StringPrep::Trace::PROHIBITED_TABLES = T.let(T.unsafe(nil), Array) + +# Defined in RFC-4505[https://tools.ietf.org/html/rfc4505] §3. +# +# source://net-imap//lib/net/imap/stringprep/trace.rb#12 +Net::IMAP::StringPrep::Trace::STRINGPREP_PROFILE = T.let(T.unsafe(nil), String) + +# >>> +# The character repertoire of this profile is Unicode 3.2 [Unicode]. +# +# source://net-imap//lib/net/imap/stringprep/trace.rb#16 +Net::IMAP::StringPrep::Trace::UNASSIGNED_TABLE = T.let(T.unsafe(nil), String) + +# Mailbox attribute indicating that this mailbox is used to hold messages +# that have been deleted or marked for deletion. In some server +# implementations, this might be a virtual mailbox, containing messages from +# other mailboxes that are marked with the +\Deleted+ message flag. +# Alternatively, this might just be advice that a client that chooses not to +# use the \IMAP +\Deleted+ model should use as its trash location. In server +# implementations that strictly expect the \IMAP +\Deleted+ model, this +# special use is likely not to be supported. +# +# source://net-imap//lib/net/imap/flags.rb#258 +Net::IMAP::TRASH = T.let(T.unsafe(nil), Symbol) + +# Net::IMAP::ThreadMember represents a thread-node returned +# by Net::IMAP#thread. +# +# source://net-imap//lib/net/imap/response_data.rb#764 +class Net::IMAP::ThreadMember < ::Struct + # Returns a SequenceSet containing #seqno and all #children's seqno, + # recursively. + # + # source://net-imap//lib/net/imap/response_data.rb#780 + def to_sequence_set; end + + protected + + # source://net-imap//lib/net/imap/response_data.rb#786 + def all_seqnos(node = T.unsafe(nil)); end +end + +# Net::IMAP::UIDPlusData represents the ResponseCode#data that accompanies +# the +APPENDUID+ and +COPYUID+ response codes. +# +# See [[UIDPLUS[https://www.rfc-editor.org/rfc/rfc4315.html]]. +# +# ==== Capability requirement +# +# The +UIDPLUS+ capability[rdoc-ref:Net::IMAP#capability] must be supported. +# A server that supports +UIDPLUS+ should send a UIDPlusData object inside +# every TaggedResponse returned by the append[rdoc-ref:Net::IMAP#append], +# copy[rdoc-ref:Net::IMAP#copy], move[rdoc-ref:Net::IMAP#move], {uid +# copy}[rdoc-ref:Net::IMAP#uid_copy], and {uid +# move}[rdoc-ref:Net::IMAP#uid_move] commands---unless the destination +# mailbox reports +UIDNOTSTICKY+. +# +# -- +# TODO: support MULTIAPPEND +# ++ +# +# source://net-imap//lib/net/imap/response_data.rb#346 +class Net::IMAP::UIDPlusData < ::Struct + # :call-seq: uid_mapping -> nil or a hash + # + # Returns a hash mapping each source UID to the newly assigned destination + # UID. + # + # Note:: Returns +nil+ for Net::IMAP#append. + # + # source://net-imap//lib/net/imap/response_data.rb#376 + def uid_mapping; end +end + +# Error raised upon an unknown response from the server. +# +# This is different from InvalidResponseError: the response may be a +# valid extension response and the server may be allowed to send it in +# this context, but Net::IMAP either does not know how to parse it or +# how to handle it. This could result from enabling unknown or +# unhandled extensions. The connection may still be usable, +# but—depending on context—it may be prudent to disconnect. +# +# source://net-imap//lib/net/imap/errors.rb#71 +class Net::IMAP::UnknownResponseError < ::Net::IMAP::ResponseError; end + +# **Note:** This represents an intentionally _unstable_ API. Where +# instances of this class are returned, future releases may return a +# different (incompatible) object without deprecation or warning. +# +# Net::IMAP::UnparsedData represents data for unknown response types or +# unknown extensions to response types without a well-defined extension +# grammar. +# +# See also: UnparsedNumericResponseData, ExtensionData, IgnoredResponse +# +# source://net-imap//lib/net/imap/response_data.rb#77 +class Net::IMAP::UnparsedData < ::Struct; end + +# **Note:** This represents an intentionally _unstable_ API. Where +# instances of this class are returned, future releases may return a +# different (incompatible) object without deprecation or warning. +# +# Net::IMAP::UnparsedNumericResponseData represents data for unhandled +# response types with a numeric prefix. See the documentation for #number. +# +# See also: UnparsedData, ExtensionData, IgnoredResponse +# +# source://net-imap//lib/net/imap/response_data.rb#93 +class Net::IMAP::UnparsedNumericResponseData < ::Struct; end + +# source://net-imap//lib/net/imap.rb#720 +Net::IMAP::VERSION = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/authenticators.rb#35 +Net::IMAP::XOauth2Authenticator = Net::IMAP::SASL::XOAuth2Authenticator diff --git a/sorbet/rbi/gems/net-protocol@0.2.1.rbi b/sorbet/rbi/gems/net-protocol@0.2.2.rbi similarity index 54% rename from sorbet/rbi/gems/net-protocol@0.2.1.rbi rename to sorbet/rbi/gems/net-protocol@0.2.2.rbi index 17b01b7d0..232d13cbe 100644 --- a/sorbet/rbi/gems/net-protocol@0.2.1.rbi +++ b/sorbet/rbi/gems/net-protocol@0.2.2.rbi @@ -4,208 +4,212 @@ # This is an autogenerated file for types exported from the `net-protocol` gem. # Please instead update this file by running `bin/tapioca gem net-protocol`. +# source://net-protocol//lib/net/protocol.rb#115 class Net::BufferedIO # @return [BufferedIO] a new instance of BufferedIO # - # source://net-protocol//net/protocol.rb#116 + # source://net-protocol//lib/net/protocol.rb#116 def initialize(io, read_timeout: T.unsafe(nil), write_timeout: T.unsafe(nil), continue_timeout: T.unsafe(nil), debug_output: T.unsafe(nil)); end - # source://net-protocol//net/protocol.rb#285 + # source://net-protocol//lib/net/protocol.rb#285 def <<(*strs); end - # source://net-protocol//net/protocol.rb#145 + # source://net-protocol//lib/net/protocol.rb#145 def close; end # @return [Boolean] # - # source://net-protocol//net/protocol.rb#141 + # source://net-protocol//lib/net/protocol.rb#141 def closed?; end # Returns the value of attribute continue_timeout. # - # source://net-protocol//net/protocol.rb#130 + # source://net-protocol//lib/net/protocol.rb#130 def continue_timeout; end # Sets the attribute continue_timeout # # @param value the value to set the attribute continue_timeout to. # - # source://net-protocol//net/protocol.rb#130 + # source://net-protocol//lib/net/protocol.rb#130 def continue_timeout=(_arg0); end # Returns the value of attribute debug_output. # - # source://net-protocol//net/protocol.rb#131 + # source://net-protocol//lib/net/protocol.rb#131 def debug_output; end # Sets the attribute debug_output # # @param value the value to set the attribute debug_output to. # - # source://net-protocol//net/protocol.rb#131 + # source://net-protocol//lib/net/protocol.rb#131 def debug_output=(_arg0); end # @return [Boolean] # - # source://net-protocol//net/protocol.rb#137 + # source://net-protocol//lib/net/protocol.rb#137 def eof?; end - # source://net-protocol//net/protocol.rb#133 + # source://net-protocol//lib/net/protocol.rb#133 def inspect; end # Returns the value of attribute io. # - # source://net-protocol//net/protocol.rb#127 + # source://net-protocol//lib/net/protocol.rb#127 def io; end - # source://net-protocol//net/protocol.rb#155 + # source://net-protocol//lib/net/protocol.rb#155 def read(len, dest = T.unsafe(nil), ignore_eof = T.unsafe(nil)); end - # source://net-protocol//net/protocol.rb#176 + # source://net-protocol//lib/net/protocol.rb#176 def read_all(dest = T.unsafe(nil)); end # Returns the value of attribute read_timeout. # - # source://net-protocol//net/protocol.rb#128 + # source://net-protocol//lib/net/protocol.rb#128 def read_timeout; end # Sets the attribute read_timeout # # @param value the value to set the attribute read_timeout to. # - # source://net-protocol//net/protocol.rb#128 + # source://net-protocol//lib/net/protocol.rb#128 def read_timeout=(_arg0); end - # source://net-protocol//net/protocol.rb#208 + # source://net-protocol//lib/net/protocol.rb#208 def readline; end - # source://net-protocol//net/protocol.rb#194 + # source://net-protocol//lib/net/protocol.rb#194 def readuntil(terminator, ignore_eof = T.unsafe(nil)); end - # source://net-protocol//net/protocol.rb#285 + # source://net-protocol//lib/net/protocol.rb#285 def write(*strs); end # Returns the value of attribute write_timeout. # - # source://net-protocol//net/protocol.rb#129 + # source://net-protocol//lib/net/protocol.rb#129 def write_timeout; end # Sets the attribute write_timeout # # @param value the value to set the attribute write_timeout to. # - # source://net-protocol//net/protocol.rb#129 + # source://net-protocol//lib/net/protocol.rb#129 def write_timeout=(_arg0); end - # source://net-protocol//net/protocol.rb#293 + # source://net-protocol//lib/net/protocol.rb#293 def writeline(str); end private - # source://net-protocol//net/protocol.rb#356 + # source://net-protocol//lib/net/protocol.rb#356 def LOG(msg); end - # source://net-protocol//net/protocol.rb#347 + # source://net-protocol//lib/net/protocol.rb#347 def LOG_off; end - # source://net-protocol//net/protocol.rb#352 + # source://net-protocol//lib/net/protocol.rb#352 def LOG_on; end - # source://net-protocol//net/protocol.rb#257 + # source://net-protocol//lib/net/protocol.rb#257 def rbuf_consume(len = T.unsafe(nil)); end - # source://net-protocol//net/protocol.rb#253 + # source://net-protocol//lib/net/protocol.rb#253 def rbuf_consume_all; end - # source://net-protocol//net/protocol.rb#216 + # source://net-protocol//lib/net/protocol.rb#216 def rbuf_fill; end - # source://net-protocol//net/protocol.rb#241 + # source://net-protocol//lib/net/protocol.rb#241 def rbuf_flush; end - # source://net-protocol//net/protocol.rb#249 + # source://net-protocol//lib/net/protocol.rb#249 def rbuf_size; end - # source://net-protocol//net/protocol.rb#311 + # source://net-protocol//lib/net/protocol.rb#311 def write0(*strs); end - # source://net-protocol//net/protocol.rb#301 + # source://net-protocol//lib/net/protocol.rb#301 def writing; end end +# source://net-protocol//lib/net/protocol.rb#363 class Net::InternetMessageIO < ::Net::BufferedIO # @return [InternetMessageIO] a new instance of InternetMessageIO # - # source://net-protocol//net/protocol.rb#364 + # source://net-protocol//lib/net/protocol.rb#364 def initialize(*_arg0, **_arg1); end # *library private* (cannot handle 'break') # - # source://net-protocol//net/protocol.rb#386 + # source://net-protocol//lib/net/protocol.rb#386 def each_list_item; end # Read # - # source://net-protocol//net/protocol.rb#373 + # source://net-protocol//lib/net/protocol.rb#373 def each_message_chunk; end # Write # - # source://net-protocol//net/protocol.rb#404 + # source://net-protocol//lib/net/protocol.rb#404 def write_message(src); end - # source://net-protocol//net/protocol.rb#392 + # source://net-protocol//lib/net/protocol.rb#392 def write_message_0(src); end - # source://net-protocol//net/protocol.rb#417 + # source://net-protocol//lib/net/protocol.rb#417 def write_message_by_block(&block); end private - # source://net-protocol//net/protocol.rb#460 + # source://net-protocol//lib/net/protocol.rb#460 def buffer_filling(buf, src); end - # source://net-protocol//net/protocol.rb#436 + # source://net-protocol//lib/net/protocol.rb#436 def dot_stuff(s); end - # source://net-protocol//net/protocol.rb#452 + # source://net-protocol//lib/net/protocol.rb#452 def each_crlf_line(src); end - # source://net-protocol//net/protocol.rb#440 + # source://net-protocol//lib/net/protocol.rb#440 def using_each_crlf_line; end end -# source://net-protocol//net/protocol.rb#541 +# source://net-protocol//lib/net/protocol.rb#541 Net::NetPrivate::Socket = Net::InternetMessageIO -# source://net-protocol//net/protocol.rb#68 +# source://net-protocol//lib/net/protocol.rb#68 Net::ProtocRetryError = Net::ProtoRetriableError +# source://net-protocol//lib/net/protocol.rb#28 class Net::Protocol private - # source://net-protocol//net/protocol.rb#40 + # source://net-protocol//lib/net/protocol.rb#40 def ssl_socket_connect(s, timeout); end class << self - # source://net-protocol//net/protocol.rb#32 + # source://net-protocol//lib/net/protocol.rb#32 def protocol_param(name, val); end end end -# source://net-protocol//net/protocol.rb#29 +# source://net-protocol//lib/net/protocol.rb#29 Net::Protocol::VERSION = T.let(T.unsafe(nil), String) +# source://net-protocol//lib/net/protocol.rb#516 class Net::ReadAdapter # @return [ReadAdapter] a new instance of ReadAdapter # - # source://net-protocol//net/protocol.rb#517 + # source://net-protocol//lib/net/protocol.rb#517 def initialize(block); end - # source://net-protocol//net/protocol.rb#525 + # source://net-protocol//lib/net/protocol.rb#525 def <<(str); end - # source://net-protocol//net/protocol.rb#521 + # source://net-protocol//lib/net/protocol.rb#521 def inspect; end private @@ -216,66 +220,72 @@ class Net::ReadAdapter # # @yield [str] # - # source://net-protocol//net/protocol.rb#534 + # source://net-protocol//lib/net/protocol.rb#534 def call_block(str); end end # ReadTimeout, a subclass of Timeout::Error, is raised if a chunk of the # response cannot be read within the read_timeout. +# +# source://net-protocol//lib/net/protocol.rb#80 class Net::ReadTimeout < ::Timeout::Error # @return [ReadTimeout] a new instance of ReadTimeout # - # source://net-protocol//net/protocol.rb#81 + # source://net-protocol//lib/net/protocol.rb#81 def initialize(io = T.unsafe(nil)); end # Returns the value of attribute io. # - # source://net-protocol//net/protocol.rb#84 + # source://net-protocol//lib/net/protocol.rb#84 def io; end - # source://net-protocol//net/protocol.rb#86 + # source://net-protocol//lib/net/protocol.rb#86 def message; end end # The writer adapter class +# +# source://net-protocol//lib/net/protocol.rb#486 class Net::WriteAdapter # @return [WriteAdapter] a new instance of WriteAdapter # - # source://net-protocol//net/protocol.rb#487 + # source://net-protocol//lib/net/protocol.rb#487 def initialize(writer); end - # source://net-protocol//net/protocol.rb#501 + # source://net-protocol//lib/net/protocol.rb#501 def <<(str); end - # source://net-protocol//net/protocol.rb#491 + # source://net-protocol//lib/net/protocol.rb#491 def inspect; end - # source://net-protocol//net/protocol.rb#495 + # source://net-protocol//lib/net/protocol.rb#495 def print(str); end - # source://net-protocol//net/protocol.rb#510 + # source://net-protocol//lib/net/protocol.rb#510 def printf(*args); end - # source://net-protocol//net/protocol.rb#506 + # source://net-protocol//lib/net/protocol.rb#506 def puts(str = T.unsafe(nil)); end - # source://net-protocol//net/protocol.rb#495 + # source://net-protocol//lib/net/protocol.rb#495 def write(str); end end # WriteTimeout, a subclass of Timeout::Error, is raised if a chunk of the # response cannot be written within the write_timeout. Not raised on Windows. +# +# source://net-protocol//lib/net/protocol.rb#99 class Net::WriteTimeout < ::Timeout::Error # @return [WriteTimeout] a new instance of WriteTimeout # - # source://net-protocol//net/protocol.rb#100 + # source://net-protocol//lib/net/protocol.rb#100 def initialize(io = T.unsafe(nil)); end # Returns the value of attribute io. # - # source://net-protocol//net/protocol.rb#103 + # source://net-protocol//lib/net/protocol.rb#103 def io; end - # source://net-protocol//net/protocol.rb#105 + # source://net-protocol//lib/net/protocol.rb#105 def message; end end diff --git a/sorbet/rbi/gems/net-smtp@0.3.3.rbi b/sorbet/rbi/gems/net-smtp@0.4.0.1.rbi similarity index 79% rename from sorbet/rbi/gems/net-smtp@0.3.3.rbi rename to sorbet/rbi/gems/net-smtp@0.4.0.1.rbi index 54df6e622..87c5f2e1e 100644 --- a/sorbet/rbi/gems/net-smtp@0.3.3.rbi +++ b/sorbet/rbi/gems/net-smtp@0.4.0.1.rbi @@ -8,7 +8,14 @@ # # This library provides functionality to send internet # mail via SMTP, the Simple Mail Transfer Protocol. For details of -# SMTP itself, see [RFC2821] (http://www.ietf.org/rfc/rfc2821.txt). +# SMTP itself, see [RFC5321] (http://www.ietf.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 +# necessary to send messages to/from addresses containing characters +# outside the ASCII range. # # == What is This Library NOT? # @@ -18,7 +25,7 @@ # {RubyGems.org}[https://rubygems.org/] or {The Ruby # Toolbox}[https://www.ruby-toolbox.com/]. # -# FYI: the official documentation on internet mail is: [RFC2822] (http://www.ietf.org/rfc/rfc2822.txt). +# FYI: the official specification on internet mail is: [RFC5322] (http://www.ietf.org/rfc/rfc5322.txt). # # == Examples # @@ -107,7 +114,7 @@ # Net::SMTP.start('your.smtp.server', 25 # user: 'Your Account', secret: 'Your Password', authtype: :cram_md5) # -# source://net-smtp//lib/net/smtp.rb#188 +# source://net-smtp//lib/net/smtp.rb#189 class Net::SMTP < ::Net::Protocol # Creates a new Net::SMTP object. # @@ -133,42 +140,33 @@ class Net::SMTP < ::Net::Protocol # # @return [SMTP] a new instance of SMTP # - # source://net-smtp//lib/net/smtp.rb#241 + # source://net-smtp//lib/net/smtp.rb#240 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#406 + # source://net-smtp//lib/net/smtp.rb#405 def address; end - # source://net-smtp//lib/net/smtp.rb#860 - def auth_cram_md5(user, secret); end - - # source://net-smtp//lib/net/smtp.rb#849 - def auth_login(user, secret); end - - # source://net-smtp//lib/net/smtp.rb#840 - def auth_plain(user, secret); end - # source://net-smtp//lib/net/smtp.rb#834 def authenticate(user, secret, authtype = T.unsafe(nil)); end # The server capabilities by EHLO response # - # source://net-smtp//lib/net/smtp.rb#300 + # source://net-smtp//lib/net/smtp.rb#299 def capabilities; end # true if the EHLO response contains +key+. # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#294 + # source://net-smtp//lib/net/smtp.rb#293 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#329 + # source://net-smtp//lib/net/smtp.rb#328 def capable_auth_types; end # true if server advertises AUTH CRAM-MD5. @@ -176,7 +174,7 @@ class Net::SMTP < ::Net::Protocol # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#316 + # source://net-smtp//lib/net/smtp.rb#315 def capable_cram_md5_auth?; end # true if server advertises AUTH LOGIN. @@ -184,7 +182,7 @@ class Net::SMTP < ::Net::Protocol # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#310 + # source://net-smtp//lib/net/smtp.rb#309 def capable_login_auth?; end # true if server advertises AUTH PLAIN. @@ -192,7 +190,7 @@ class Net::SMTP < ::Net::Protocol # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#304 + # source://net-smtp//lib/net/smtp.rb#303 def capable_plain_auth?; end # true if server advertises STARTTLS. @@ -200,7 +198,7 @@ class Net::SMTP < ::Net::Protocol # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#289 + # source://net-smtp//lib/net/smtp.rb#288 def capable_starttls?; end # This method sends a message. @@ -226,7 +224,7 @@ class Net::SMTP < ::Net::Protocol # f.puts "Check vm.c:58879." # } # - # source://net-smtp//lib/net/smtp.rb#998 + # source://net-smtp//lib/net/smtp.rb#933 def data(msgstr = T.unsafe(nil), &block); end # WARNING: This method causes serious security holes. @@ -242,28 +240,28 @@ class Net::SMTP < ::Net::Protocol # .... # end # - # source://net-smtp//lib/net/smtp.rb#442 + # source://net-smtp//lib/net/smtp.rb#441 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#356 + # source://net-smtp//lib/net/smtp.rb#355 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#400 + # source://net-smtp//lib/net/smtp.rb#399 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#356 + # source://net-smtp//lib/net/smtp.rb#355 def disable_tls; end - # source://net-smtp//lib/net/smtp.rb#938 + # source://net-smtp//lib/net/smtp.rb#882 def ehlo(domain); end # Enables SMTP/TLS (SMTPS: SMTP over direct TLS connection) for @@ -272,7 +270,7 @@ class Net::SMTP < ::Net::Protocol # # @raise [ArgumentError] # - # source://net-smtp//lib/net/smtp.rb#345 + # source://net-smtp//lib/net/smtp.rb#344 def enable_ssl(context = T.unsafe(nil)); end # Enables SMTP/TLS (STARTTLS) for this object. @@ -280,7 +278,7 @@ class Net::SMTP < ::Net::Protocol # # @raise [ArgumentError] # - # source://net-smtp//lib/net/smtp.rb#382 + # source://net-smtp//lib/net/smtp.rb#381 def enable_starttls(context = T.unsafe(nil)); end # Enables SMTP/TLS (STARTTLS) for this object if server accepts. @@ -288,7 +286,7 @@ class Net::SMTP < ::Net::Protocol # # @raise [ArgumentError] # - # source://net-smtp//lib/net/smtp.rb#391 + # source://net-smtp//lib/net/smtp.rb#390 def enable_starttls_auto(context = T.unsafe(nil)); end # Enables SMTP/TLS (SMTPS: SMTP over direct TLS connection) for @@ -297,7 +295,7 @@ class Net::SMTP < ::Net::Protocol # # @raise [ArgumentError] # - # source://net-smtp//lib/net/smtp.rb#345 + # source://net-smtp//lib/net/smtp.rb#344 def enable_tls(context = T.unsafe(nil)); end # Set whether to use ESMTP or not. This should be done before @@ -306,7 +304,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#282 + # source://net-smtp//lib/net/smtp.rb#281 def esmtp; end # Set whether to use ESMTP or not. This should be done before @@ -315,7 +313,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#282 + # source://net-smtp//lib/net/smtp.rb#281 def esmtp=(_arg0); end # Set whether to use ESMTP or not. This should be done before @@ -325,7 +323,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#282 + # source://net-smtp//lib/net/smtp.rb#281 def esmtp?; end # Finishes the SMTP session and closes TCP connection. @@ -333,20 +331,23 @@ class Net::SMTP < ::Net::Protocol # # @raise [IOError] # - # source://net-smtp//lib/net/smtp.rb#624 + # source://net-smtp//lib/net/smtp.rb#623 def finish; end - # source://net-smtp//lib/net/smtp.rb#934 + # source://net-smtp//lib/net/smtp.rb#964 + def get_response(reqline); end + + # source://net-smtp//lib/net/smtp.rb#878 def helo(domain); end # Provide human-readable stringification of class state. # - # source://net-smtp//lib/net/smtp.rb#271 + # source://net-smtp//lib/net/smtp.rb#270 def inspect; end # +from_addr+ is +String+ or +Net::SMTP::Address+ # - # source://net-smtp//lib/net/smtp.rb#943 + # source://net-smtp//lib/net/smtp.rb#887 def mailfrom(from_addr); end # Opens a message writer stream and gives it to the block. @@ -401,45 +402,45 @@ class Net::SMTP < ::Net::Protocol # 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#414 + # source://net-smtp//lib/net/smtp.rb#413 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#414 + # source://net-smtp//lib/net/smtp.rb#413 def open_timeout=(_arg0); end # The port number of the SMTP server to connect to. # - # source://net-smtp//lib/net/smtp.rb#409 + # source://net-smtp//lib/net/smtp.rb#408 def port; end - # source://net-smtp//lib/net/smtp.rb#1025 + # source://net-smtp//lib/net/smtp.rb#960 def quit; end # +to_addr+ is +String+ or +Net::SMTP::Address+ # - # source://net-smtp//lib/net/smtp.rb#970 + # source://net-smtp//lib/net/smtp.rb#905 def rcptto(to_addr); end # @raise [ArgumentError] # - # source://net-smtp//lib/net/smtp.rb#948 + # source://net-smtp//lib/net/smtp.rb#896 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#419 + # source://net-smtp//lib/net/smtp.rb#418 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#423 + # source://net-smtp//lib/net/smtp.rb#422 def read_timeout=(sec); end # Opens a message writer stream and gives it to the block. @@ -493,7 +494,7 @@ class Net::SMTP < ::Net::Protocol # Aborts the current mail transaction # - # source://net-smtp//lib/net/smtp.rb#926 + # source://net-smtp//lib/net/smtp.rb#870 def rset; end # Sends +msgstr+ as a message. Single CR ("\r") and LF ("\n") found @@ -533,7 +534,7 @@ class Net::SMTP < ::Net::Protocol # # @raise [IOError] # - # source://net-smtp//lib/net/smtp.rb#765 + # source://net-smtp//lib/net/smtp.rb#763 def send_mail(msgstr, from_addr, *to_addrs); end # Sends +msgstr+ as a message. Single CR ("\r") and LF ("\n") found @@ -573,7 +574,7 @@ class Net::SMTP < ::Net::Protocol # # @raise [IOError] # - # source://net-smtp//lib/net/smtp.rb#765 + # source://net-smtp//lib/net/smtp.rb#763 def send_message(msgstr, from_addr, *to_addrs); end # Sends +msgstr+ as a message. Single CR ("\r") and LF ("\n") found @@ -614,7 +615,7 @@ class Net::SMTP < ::Net::Protocol # # @raise [IOError] # - # source://net-smtp//lib/net/smtp.rb#765 + # source://net-smtp//lib/net/smtp.rb#763 def sendmail(msgstr, from_addr, *to_addrs); end # WARNING: This method causes serious security holes. @@ -630,24 +631,24 @@ class Net::SMTP < ::Net::Protocol # .... # end # - # source://net-smtp//lib/net/smtp.rb#442 + # source://net-smtp//lib/net/smtp.rb#441 def set_debug_output(arg); end # true if this object uses SMTP/TLS (SMTPS). # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#336 + # source://net-smtp//lib/net/smtp.rb#335 def ssl?; end # Hash for additional SSLContext parameters. # - # source://net-smtp//lib/net/smtp.rb#268 + # source://net-smtp//lib/net/smtp.rb#267 def ssl_context_params; end # Hash for additional SSLContext parameters. # - # source://net-smtp//lib/net/smtp.rb#268 + # source://net-smtp//lib/net/smtp.rb#267 def ssl_context_params=(_arg0); end # :call-seq: @@ -706,17 +707,17 @@ class Net::SMTP < ::Net::Protocol # # @raise [ArgumentError] # - # source://net-smtp//lib/net/smtp.rb#591 + # source://net-smtp//lib/net/smtp.rb#590 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. # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#532 + # source://net-smtp//lib/net/smtp.rb#531 def started?; end - # source://net-smtp//lib/net/smtp.rb#930 + # source://net-smtp//lib/net/smtp.rb#874 def starttls; end # Returns truth value if this object uses STARTTLS. @@ -725,153 +726,136 @@ class Net::SMTP < ::Net::Protocol # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#366 + # source://net-smtp//lib/net/smtp.rb#365 def starttls?; end # true if this object uses STARTTLS. # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#371 + # source://net-smtp//lib/net/smtp.rb#370 def starttls_always?; end # true if this object uses STARTTLS when server advertises STARTTLS. # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#376 + # source://net-smtp//lib/net/smtp.rb#375 def starttls_auto?; end # true if this object uses SMTP/TLS (SMTPS). # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#336 + # source://net-smtp//lib/net/smtp.rb#335 def tls?; end # The hostname for verifying hostname in the server certificatate. # - # source://net-smtp//lib/net/smtp.rb#265 + # source://net-smtp//lib/net/smtp.rb#264 def tls_hostname; end # The hostname for verifying hostname in the server certificatate. # - # source://net-smtp//lib/net/smtp.rb#265 + # source://net-smtp//lib/net/smtp.rb#264 def tls_hostname=(_arg0); end # If +true+, verify th server's certificate. # - # source://net-smtp//lib/net/smtp.rb#262 + # source://net-smtp//lib/net/smtp.rb#261 def tls_verify; end # If +true+, verify th server's certificate. # - # source://net-smtp//lib/net/smtp.rb#262 + # source://net-smtp//lib/net/smtp.rb#261 def tls_verify=(_arg0); end private + # source://net-smtp//lib/net/smtp.rb#717 + def any_require_smtputf8(addresses); end + # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#320 + # source://net-smtp//lib/net/smtp.rb#319 def auth_capable?(type); end - # source://net-smtp//lib/net/smtp.rb#880 + # source://net-smtp//lib/net/smtp.rb#849 def auth_method(type); end - # source://net-smtp//lib/net/smtp.rb#893 - def base64_encode(str); end - - # source://net-smtp//lib/net/smtp.rb#884 + # 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#1092 - def check_auth_continue(res); end - - # source://net-smtp//lib/net/smtp.rb#874 + # source://net-smtp//lib/net/smtp.rb#843 def check_auth_method(type); end - # source://net-smtp//lib/net/smtp.rb#1086 - def check_auth_response(res); end - - # source://net-smtp//lib/net/smtp.rb#1080 + # source://net-smtp//lib/net/smtp.rb#1015 def check_continue(res); end - # source://net-smtp//lib/net/smtp.rb#1074 + # source://net-smtp//lib/net/smtp.rb#1009 def check_response(res); end - # CRAM-MD5: [RFC2195] - # - # source://net-smtp//lib/net/smtp.rb#902 - def cram_md5_response(secret, challenge); end - - # source://net-smtp//lib/net/smtp.rb#909 - def cram_secret(secret, mask); end - - # source://net-smtp//lib/net/smtp.rb#1064 + # source://net-smtp//lib/net/smtp.rb#999 def critical; end - # source://net-smtp//lib/net/smtp.rb#631 - def digest_class; end - - # source://net-smtp//lib/net/smtp.rb#714 + # source://net-smtp//lib/net/smtp.rb#700 def do_finish; end - # source://net-smtp//lib/net/smtp.rb#702 + # source://net-smtp//lib/net/smtp.rb#688 def do_helo(helo_domain); end - # source://net-smtp//lib/net/smtp.rb#650 + # source://net-smtp//lib/net/smtp.rb#634 def do_start(helo_domain, user, secret, authtype); end - # source://net-smtp//lib/net/smtp.rb#1048 - def get_response(reqline); end - - # source://net-smtp//lib/net/smtp.rb#1038 + # source://net-smtp//lib/net/smtp.rb#979 def getok(reqline); end - # source://net-smtp//lib/net/smtp.rb#1177 + # source://net-smtp//lib/net/smtp.rb#1100 def logging(msg); end - # source://net-smtp//lib/net/smtp.rb#697 + # source://net-smtp//lib/net/smtp.rb#683 def new_internet_message_io(s); end - # source://net-smtp//lib/net/smtp.rb#1054 + # source://net-smtp//lib/net/smtp.rb#989 def recv_response; end - # source://net-smtp//lib/net/smtp.rb#680 + # source://net-smtp//lib/net/smtp.rb#709 + def requires_smtputf8(address); end + + # source://net-smtp//lib/net/smtp.rb#666 def ssl_socket(socket, context); end - # source://net-smtp//lib/net/smtp.rb#641 + # source://net-smtp//lib/net/smtp.rb#630 def tcp_socket(address, port); end - # source://net-smtp//lib/net/smtp.rb#684 + # source://net-smtp//lib/net/smtp.rb#670 def tlsconnect(s, context); end - # source://net-smtp//lib/net/smtp.rb#1031 + # source://net-smtp//lib/net/smtp.rb#972 def validate_line(line); end class << self # The default SMTP port number, 25. # - # source://net-smtp//lib/net/smtp.rb#194 + # source://net-smtp//lib/net/smtp.rb#193 def default_port; end - # source://net-smtp//lib/net/smtp.rb#212 + # source://net-smtp//lib/net/smtp.rb#211 def default_ssl_context(ssl_context_params = T.unsafe(nil)); end # The default SMTPS port number, 465. # - # source://net-smtp//lib/net/smtp.rb#204 + # source://net-smtp//lib/net/smtp.rb#203 def default_ssl_port; end # The default mail submission port number, 587. # - # source://net-smtp//lib/net/smtp.rb#199 + # source://net-smtp//lib/net/smtp.rb#198 def default_submission_port; end # The default SMTPS port number, 465. # - # source://net-smtp//lib/net/smtp.rb#204 + # source://net-smtp//lib/net/smtp.rb#203 def default_tls_port; end # :call-seq: @@ -941,14 +925,14 @@ class Net::SMTP < ::Net::Protocol # # @raise [ArgumentError] # - # source://net-smtp//lib/net/smtp.rb#518 + # source://net-smtp//lib/net/smtp.rb#517 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#1182 +# source://net-smtp//lib/net/smtp.rb#1105 class Net::SMTP::Address # :call-seq: # initialize(address, parameter, ...) @@ -958,36 +942,118 @@ class Net::SMTP::Address # # @return [Address] a new instance of Address # - # source://net-smtp//lib/net/smtp.rb#1193 + # source://net-smtp//lib/net/smtp.rb#1116 def initialize(address, *args, **kw_args); end # mail address [String] # - # source://net-smtp//lib/net/smtp.rb#1184 + # source://net-smtp//lib/net/smtp.rb#1107 def address; end # parameters [Array] # - # source://net-smtp//lib/net/smtp.rb#1186 + # source://net-smtp//lib/net/smtp.rb#1109 def parameters; end - # source://net-smtp//lib/net/smtp.rb#1203 + # source://net-smtp//lib/net/smtp.rb#1127 def to_s; end end +# source://net-smtp//lib/net/smtp/auth_cram_md5.rb#9 +class Net::SMTP::AuthCramMD5 < ::Net::SMTP::Authenticator + # source://net-smtp//lib/net/smtp/auth_cram_md5.rb#12 + def auth(user, secret); end + + # CRAM-MD5: [RFC2195] + # + # source://net-smtp//lib/net/smtp/auth_cram_md5.rb#22 + def cram_md5_response(secret, challenge); end + + # source://net-smtp//lib/net/smtp/auth_cram_md5.rb#29 + def cram_secret(secret, mask); end + + # source://net-smtp//lib/net/smtp/auth_cram_md5.rb#38 + def digest_class; end +end + +# source://net-smtp//lib/net/smtp/auth_cram_md5.rb#27 +Net::SMTP::AuthCramMD5::CRAM_BUFSIZE = T.let(T.unsafe(nil), Integer) + +# source://net-smtp//lib/net/smtp/auth_cram_md5.rb#18 +Net::SMTP::AuthCramMD5::IMASK = T.let(T.unsafe(nil), Integer) + +# source://net-smtp//lib/net/smtp/auth_cram_md5.rb#19 +Net::SMTP::AuthCramMD5::OMASK = T.let(T.unsafe(nil), Integer) + +# source://net-smtp//lib/net/smtp/auth_login.rb#2 +class Net::SMTP::AuthLogin < ::Net::SMTP::Authenticator + # source://net-smtp//lib/net/smtp/auth_login.rb#5 + def auth(user, secret); end +end + +# source://net-smtp//lib/net/smtp/auth_plain.rb#2 +class Net::SMTP::AuthPlain < ::Net::SMTP::Authenticator + # source://net-smtp//lib/net/smtp/auth_plain.rb#5 + def auth(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 + def initialize(smtp); end + + # @param str [String] + # @return [String] Base64 encoded string + # + # source://net-smtp//lib/net/smtp/authenticator.rb#40 + 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 + 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 + def finish(arg); end + + # Returns the value of attribute smtp. + # + # source://net-smtp//lib/net/smtp/authenticator.rb#16 + def smtp; end + + class << self + # source://net-smtp//lib/net/smtp/authenticator.rb#12 + def auth_class(type); end + + # source://net-smtp//lib/net/smtp/authenticator.rb#4 + def auth_classes; end + + # source://net-smtp//lib/net/smtp/authenticator.rb#8 + def auth_type(type); end + end +end + # This class represents a response received by the SMTP server. Instances # of this class are created by the SMTP class; they should not be directly # 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#1102 +# source://net-smtp//lib/net/smtp.rb#1025 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#1111 + # source://net-smtp//lib/net/smtp.rb#1034 def initialize(status, string); end # Returns a hash of the human readable reply text in the response if it @@ -995,7 +1061,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#1154 + # source://net-smtp//lib/net/smtp.rb#1077 def capabilities; end # Determines whether the response received was a Positive Intermediate @@ -1003,39 +1069,39 @@ class Net::SMTP::Response # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#1135 + # source://net-smtp//lib/net/smtp.rb#1058 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#1146 + # source://net-smtp//lib/net/smtp.rb#1069 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#1166 + # source://net-smtp//lib/net/smtp.rb#1089 def exception_class; end # The first line of the human readable reply text # - # source://net-smtp//lib/net/smtp.rb#1140 + # source://net-smtp//lib/net/smtp.rb#1063 def message; end # The three digit reply code of the SMTP response # - # source://net-smtp//lib/net/smtp.rb#1117 + # source://net-smtp//lib/net/smtp.rb#1040 def status; end # Takes the first digit of the reply code to determine the status type # - # source://net-smtp//lib/net/smtp.rb#1123 + # source://net-smtp//lib/net/smtp.rb#1046 def status_type_char; end # The human readable reply text of the SMTP response # - # source://net-smtp//lib/net/smtp.rb#1120 + # source://net-smtp//lib/net/smtp.rb#1043 def string; end # Determines whether the response received was a Positive Completion @@ -1043,69 +1109,69 @@ class Net::SMTP::Response # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#1129 + # source://net-smtp//lib/net/smtp.rb#1052 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#1105 + # source://net-smtp//lib/net/smtp.rb#1028 def parse(str); end end end -# source://net-smtp//lib/net/smtp.rb#189 +# source://net-smtp//lib/net/smtp.rb#190 Net::SMTP::VERSION = T.let(T.unsafe(nil), String) -# source://net-smtp//lib/net/smtp.rb#55 +# source://net-smtp//lib/net/smtp.rb#49 class Net::SMTPAuthenticationError < ::Net::ProtoAuthError include ::Net::SMTPError end # Module mixed in to all SMTP error classes # -# source://net-smtp//lib/net/smtp.rb#33 +# source://net-smtp//lib/net/smtp.rb#27 module Net::SMTPError - # source://net-smtp//lib/net/smtp.rb#39 + # source://net-smtp//lib/net/smtp.rb#33 def initialize(response, message: T.unsafe(nil)); end - # source://net-smtp//lib/net/smtp.rb#49 + # source://net-smtp//lib/net/smtp.rb#43 def message; end # This *class* is a module for backward compatibility. # In later release, this module becomes a class. # - # source://net-smtp//lib/net/smtp.rb#37 + # source://net-smtp//lib/net/smtp.rb#31 def response; end end -# source://net-smtp//lib/net/smtp.rb#70 +# source://net-smtp//lib/net/smtp.rb#64 class Net::SMTPFatalError < ::Net::ProtoFatalError include ::Net::SMTPError end -# source://net-smtp//lib/net/smtp.rb#60 +# source://net-smtp//lib/net/smtp.rb#54 class Net::SMTPServerBusy < ::Net::ProtoServerError include ::Net::SMTPError end # class SMTP # -# source://net-smtp//lib/net/smtp.rb#1210 +# source://net-smtp//lib/net/smtp.rb#1133 Net::SMTPSession = Net::SMTP -# source://net-smtp//lib/net/smtp.rb#65 +# source://net-smtp//lib/net/smtp.rb#59 class Net::SMTPSyntaxError < ::Net::ProtoSyntaxError include ::Net::SMTPError end -# source://net-smtp//lib/net/smtp.rb#75 +# source://net-smtp//lib/net/smtp.rb#69 class Net::SMTPUnknownError < ::Net::ProtoUnknownError include ::Net::SMTPError end -# source://net-smtp//lib/net/smtp.rb#80 +# source://net-smtp//lib/net/smtp.rb#74 class Net::SMTPUnsupportedCommand < ::Net::ProtocolError include ::Net::SMTPError end diff --git a/sorbet/rbi/gems/nio4r@2.5.9.rbi b/sorbet/rbi/gems/nio4r@2.7.0.rbi similarity index 97% rename from sorbet/rbi/gems/nio4r@2.5.9.rbi rename to sorbet/rbi/gems/nio4r@2.7.0.rbi index 665dbd980..26b6d957f 100644 --- a/sorbet/rbi/gems/nio4r@2.5.9.rbi +++ b/sorbet/rbi/gems/nio4r@2.7.0.rbi @@ -6,7 +6,7 @@ # New I/O for Ruby # -# source://nio4r//lib/nio/version.rb#3 +# source://nio4r//lib/nio/version.rb#8 module NIO class << self # NIO implementation, one of the following (as a string): @@ -14,12 +14,12 @@ module NIO # * libev: as a C extension using libev # * java: using Java NIO # - # source://nio4r//lib/nio.rb#12 + # source://nio4r//lib/nio.rb#21 def engine; end # @return [Boolean] # - # source://nio4r//lib/nio.rb#16 + # source://nio4r//lib/nio.rb#25 def pure?(env = T.unsafe(nil)); end end end @@ -150,7 +150,7 @@ class NIO::ByteBuffer::OverflowError < ::IOError; end # Not enough data remaining in buffer class NIO::ByteBuffer::UnderflowError < ::IOError; end -# source://nio4r//lib/nio.rb#50 +# source://nio4r//lib/nio.rb#59 NIO::ENGINE = T.let(T.unsafe(nil), String) # Monitors watch IO objects for specific events @@ -288,5 +288,5 @@ class NIO::Selector end end -# source://nio4r//lib/nio/version.rb#4 +# source://nio4r//lib/nio/version.rb#9 NIO::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/nokogiri@1.15.4.rbi b/sorbet/rbi/gems/nokogiri@1.16.2.rbi similarity index 97% rename from sorbet/rbi/gems/nokogiri@1.15.4.rbi rename to sorbet/rbi/gems/nokogiri@1.16.2.rbi index e5a7cfd83..99b6d152b 100644 --- a/sorbet/rbi/gems/nokogiri@1.15.4.rbi +++ b/sorbet/rbi/gems/nokogiri@1.16.2.rbi @@ -92,10 +92,10 @@ module Nokogiri # @return [Boolean] # - # source://nokogiri//lib/nokogiri/version/info.rb#205 + # source://nokogiri//lib/nokogiri/version/info.rb#206 def jruby?; end - # source://nokogiri//lib/nokogiri/version/info.rb#210 + # source://nokogiri//lib/nokogiri/version/info.rb#211 def libxml2_patches; end # Create a new Nokogiri::XML::DocumentFragment @@ -110,12 +110,12 @@ module Nokogiri # @return [Boolean] # - # source://nokogiri//lib/nokogiri/version/info.rb#200 + # source://nokogiri//lib/nokogiri/version/info.rb#201 def uses_gumbo?; end # @return [Boolean] # - # source://nokogiri//lib/nokogiri/version/info.rb#192 + # source://nokogiri//lib/nokogiri/version/info.rb#193 def uses_libxml?(requirement = T.unsafe(nil)); end end end @@ -719,22 +719,6 @@ Nokogiri::CSS::XPathVisitor::DoctypeConfig::XML = T.let(T.unsafe(nil), Symbol) # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#10 Nokogiri::CSS::XPathVisitor::WILDCARD_NAMESPACES = T.let(T.unsafe(nil), TrueClass) -# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#339 -module Nokogiri::CSS::XPathVisitorAlwaysUseBuiltins - class << self - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#340 - def new; end - end -end - -# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#349 -module Nokogiri::CSS::XPathVisitorOptimallyUseBuiltins - class << self - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#350 - def new; end - end -end - # Some classes in Nokogiri are namespaced as a group, for example # Document, DocumentFragment, and Builder. # @@ -1821,30 +1805,16 @@ module Nokogiri::HTML5 # source://nokogiri//lib/nokogiri/html5.rb#238 def fragment(string, encoding = T.unsafe(nil), **options); end - # Fetch and parse a HTML document from the web, following redirects, - # handling https, and determining the character encoding using HTML5 - # rules. +uri+ may be a +String+ or a +URI+. +options+ contains - # http headers and special options. Everything which is not a - # special option is considered a header. Special options include: - # * :follow_limit => number of redirects which are followed - # * :basic_auth => [username, password] - # - # source://nokogiri//lib/nokogiri/html5.rb#249 - def get(uri, options = T.unsafe(nil)); end - # Parse an HTML 5 document. Convenience method for {Nokogiri::HTML5::Document.parse} # # source://nokogiri//lib/nokogiri/html5.rb#232 def parse(string, url = T.unsafe(nil), encoding = T.unsafe(nil), **options, &block); end - # source://nokogiri//lib/nokogiri/html5.rb#260 + # source://nokogiri//lib/nokogiri/html5.rb#243 def read_and_encode(string, encoding); end private - # source://nokogiri//lib/nokogiri/html5.rb#286 - def get_impl(uri, options = T.unsafe(nil)); end - # Charset sniffing is a complex and controversial topic that understandably isn't done _by # default_ by the Ruby Net::HTTP library. This being said, it is a very real problem for # consumers of HTML as the default for HTML is iso-8859-1, most "good" producers use utf-8, and @@ -1857,7 +1827,7 @@ module Nokogiri::HTML5 # http://bugs.ruby-lang.org/issues/2567 # http://www.w3.org/TR/html5/syntax.html#determining-the-character-encoding # - # source://nokogiri//lib/nokogiri/html5.rb#347 + # source://nokogiri//lib/nokogiri/html5.rb#281 def reencode(body, content_type = T.unsafe(nil)); end end end @@ -2118,7 +2088,7 @@ Nokogiri::VERSION = T.let(T.unsafe(nil), String) # Detailed version info about Nokogiri and the installed extension dependencies. # -# source://nokogiri//lib/nokogiri/version/info.rb#222 +# source://nokogiri//lib/nokogiri/version/info.rb#223 Nokogiri::VERSION_INFO = T.let(T.unsafe(nil), Hash) # source://nokogiri//lib/nokogiri/version/info.rb#7 @@ -2182,7 +2152,7 @@ class Nokogiri::VersionInfo # source://nokogiri//lib/nokogiri/version/info.rb#88 def to_hash; end - # source://nokogiri//lib/nokogiri/version/info.rb#180 + # source://nokogiri//lib/nokogiri/version/info.rb#181 def to_markdown; end # source://nokogiri//lib/nokogiri/version/info.rb#72 @@ -2249,8 +2219,6 @@ class Nokogiri::XML::Attr < ::Nokogiri::XML::Node # - +value+ → (String) The value of the attribute. # - +namespace+ → (Namespace, nil) The Namespace of the attribute, or +nil+ if there is no namespace. # - # ⚡ This is an experimental feature, available since v1.14.0 - # # *Example* # # doc = Nokogiri::XML.parse(<<~XML) @@ -2283,6 +2251,8 @@ class Nokogiri::XML::Attr < ::Nokogiri::XML::Node # # href = "http://nokogiri.org/ns/noko" # # })} # + # Since v1.14.0 + # # source://nokogiri//lib/nokogiri/xml/attr.rb#55 def deconstruct_keys(keys); end @@ -2769,13 +2739,13 @@ end class Nokogiri::XML::Document < ::Nokogiri::XML::Node # @return [Document] a new instance of Document # - # source://nokogiri//lib/nokogiri/xml/document.rb#178 + # source://nokogiri//lib/nokogiri/xml/document.rb#177 def initialize(*args); end - # source://nokogiri//lib/nokogiri/xml/document.rb#394 + # source://nokogiri//lib/nokogiri/xml/document.rb#393 def <<(node_or_tags); end - # source://nokogiri//lib/nokogiri/xml/document.rb#394 + # source://nokogiri//lib/nokogiri/xml/document.rb#393 def add_child(node_or_tags); end def canonicalize(*_arg0); end @@ -2817,17 +2787,17 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # # {"xmlns:foo" => "baz"} # - # source://nokogiri//lib/nokogiri/xml/document.rb#317 + # source://nokogiri//lib/nokogiri/xml/document.rb#316 def collect_namespaces; end # Create a CDATA Node containing +string+ # - # source://nokogiri//lib/nokogiri/xml/document.rb#262 + # source://nokogiri//lib/nokogiri/xml/document.rb#261 def create_cdata(string, &block); end # Create a Comment Node containing +string+ # - # source://nokogiri//lib/nokogiri/xml/document.rb#267 + # source://nokogiri//lib/nokogiri/xml/document.rb#266 def create_comment(string, &block); end # :call-seq: @@ -2878,14 +2848,14 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # # doc.create_element("div") { |node| node["class"] = "blue" if before_noon? } # - # source://nokogiri//lib/nokogiri/xml/document.rb#232 + # source://nokogiri//lib/nokogiri/xml/document.rb#231 def create_element(name, *contents_or_attrs, &block); end def create_entity(*_arg0); end # Create a Text Node with +string+ # - # source://nokogiri//lib/nokogiri/xml/document.rb#257 + # source://nokogiri//lib/nokogiri/xml/document.rb#256 def create_text_node(string, &block); end # :call-seq: deconstruct_keys(array_of_names) → Hash @@ -2899,8 +2869,6 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # instructions. If you have a use case and would like this functionality, please let us know # by opening an issue or a discussion on the github project. # - # ⚡ This is an experimental feature, available since v1.14.0 - # # *Example* # # doc = Nokogiri::XML.parse(<<~XML) @@ -2927,22 +2895,24 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # doc.deconstruct_keys([:root]) # # => {:root=>nil} # - # source://nokogiri//lib/nokogiri/xml/document.rb#458 + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/document.rb#457 def deconstruct_keys(keys); end # Apply any decorators to +node+ # - # source://nokogiri//lib/nokogiri/xml/document.rb#365 + # source://nokogiri//lib/nokogiri/xml/document.rb#364 def decorate(node); end # Get the list of decorators given +key+ # - # source://nokogiri//lib/nokogiri/xml/document.rb#324 + # source://nokogiri//lib/nokogiri/xml/document.rb#323 def decorators(key); end # A reference to +self+ # - # source://nokogiri//lib/nokogiri/xml/document.rb#277 + # source://nokogiri//lib/nokogiri/xml/document.rb#276 def document; end def dup(*_arg0); end @@ -2966,12 +2936,12 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # Create a Nokogiri::XML::DocumentFragment from +tags+ # Returns an empty fragment if +tags+ is nil. # - # source://nokogiri//lib/nokogiri/xml/document.rb#386 + # source://nokogiri//lib/nokogiri/xml/document.rb#385 def fragment(tags = T.unsafe(nil)); end # The name of this document. Always returns "document" # - # source://nokogiri//lib/nokogiri/xml/document.rb#272 + # source://nokogiri//lib/nokogiri/xml/document.rb#271 def name; end # When `true`, reparented elements without a namespace will inherit their new parent's @@ -3074,7 +3044,7 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # Get the hash of namespaces on the root Nokogiri::XML::Node # - # source://nokogiri//lib/nokogiri/xml/document.rb#379 + # source://nokogiri//lib/nokogiri/xml/document.rb#378 def namespaces; end def remove_namespaces!; end @@ -3096,10 +3066,10 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # irb> doc.slop! # ... which does absolutely nothing. # - # source://nokogiri//lib/nokogiri/xml/document.rb#354 + # source://nokogiri//lib/nokogiri/xml/document.rb#353 def slop!; end - # source://nokogiri//lib/nokogiri/xml/node.rb#1280 + # source://nokogiri//lib/nokogiri/xml/node.rb#1286 def to_xml(*args, &block); end def url; end @@ -3107,7 +3077,7 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # Validate this Document against it's DTD. Returns a list of errors on # the document or +nil+ when there is no DTD. # - # source://nokogiri//lib/nokogiri/xml/document.rb#332 + # source://nokogiri//lib/nokogiri/xml/document.rb#331 def validate; end def version; end @@ -3119,12 +3089,12 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # # See XPathVisitor for more information. # - # source://nokogiri//lib/nokogiri/xml/document.rb#414 + # source://nokogiri//lib/nokogiri/xml/document.rb#413 def xpath_doctype; end private - # source://nokogiri//lib/nokogiri/xml/document.rb#466 + # source://nokogiri//lib/nokogiri/xml/document.rb#465 def inspect_attributes; end class << self @@ -3172,7 +3142,7 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node end end -# source://nokogiri//lib/nokogiri/xml/document.rb#464 +# source://nokogiri//lib/nokogiri/xml/document.rb#463 Nokogiri::XML::Document::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) # source://nokogiri//lib/nokogiri/xml/document.rb#19 @@ -3220,8 +3190,6 @@ class Nokogiri::XML::DocumentFragment < ::Nokogiri::XML::Node # root elements, you should deconstruct the array returned by # DocumentFragment#elements. # - # ⚡ This is an experimental feature, available since v1.14.0 - # # *Example* # # frag = Nokogiri::HTML5.fragment(<<~HTML) @@ -3253,6 +3221,8 @@ class Nokogiri::XML::DocumentFragment < ::Nokogiri::XML::Node # # }), # # #(Element:0x398 { name = "div", children = [ #(Text "End")] })] # + # Since v1.14.0 + # # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#190 def deconstruct; end @@ -3461,8 +3431,6 @@ class Nokogiri::XML::Namespace # - +prefix+ → (String, nil) The namespace's prefix, or +nil+ if there is no prefix (e.g., default namespace). # - +href+ → (String) The namespace's URI # - # ⚡ This is an experimental feature, available since v1.14.0 - # # *Example* # # doc = Nokogiri::XML.parse(<<~XML) @@ -3488,7 +3456,9 @@ class Nokogiri::XML::Namespace # doc.root.elements.last.namespace.deconstruct_keys([:prefix, :href]) # # => {:prefix=>"noko", :href=>"http://nokogiri.org/ns/noko"} # - # source://nokogiri//lib/nokogiri/xml/namespace.rb#47 + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/namespace.rb#46 def deconstruct_keys(keys); end # Returns the value of attribute document. @@ -3501,7 +3471,7 @@ class Nokogiri::XML::Namespace private - # source://nokogiri//lib/nokogiri/xml/namespace.rb#53 + # source://nokogiri//lib/nokogiri/xml/namespace.rb#52 def inspect_attributes; end end @@ -3601,12 +3571,12 @@ class Nokogiri::XML::Node # Compare two Node objects with respect to their Document. Nodes from # different documents cannot be compared. # - # source://nokogiri//lib/nokogiri/xml/node.rb#1256 + # source://nokogiri//lib/nokogiri/xml/node.rb#1262 def <=>(other); end # Test to see if this Node is equal to +other+ # - # source://nokogiri//lib/nokogiri/xml/node.rb#1246 + # source://nokogiri//lib/nokogiri/xml/node.rb#1252 def ==(other); end # :call-seq: [](name) → (String, nil) @@ -3681,7 +3651,7 @@ class Nokogiri::XML::Node # Accept a visitor. This method calls "visit" on +visitor+ with self. # - # source://nokogiri//lib/nokogiri/xml/node.rb#1240 + # source://nokogiri//lib/nokogiri/xml/node.rb#1246 def accept(visitor); end # Add +node_or_tags+ as a child of this Node. @@ -3789,7 +3759,7 @@ class Nokogiri::XML::Node # Get a list of ancestor Node for this Node. If +selector+ is given, # the ancestors must match +selector+ # - # source://nokogiri//lib/nokogiri/xml/node.rb#1209 + # source://nokogiri//lib/nokogiri/xml/node.rb#1215 def ancestors(selector = T.unsafe(nil)); end # :call-seq: append_class(names) → self @@ -3942,14 +3912,14 @@ class Nokogiri::XML::Node def blank?; end - # source://nokogiri//lib/nokogiri/xml/node.rb#1407 + # source://nokogiri//lib/nokogiri/xml/node.rb#1414 def canonicalize(mode = T.unsafe(nil), inclusive_namespaces = T.unsafe(nil), with_comments = T.unsafe(nil)); end # Returns true if this is a CDATA # # @return [Boolean] # - # source://nokogiri//lib/nokogiri/xml/node.rb#1130 + # source://nokogiri//lib/nokogiri/xml/node.rb#1136 def cdata?; end def child; end @@ -3993,7 +3963,7 @@ class Nokogiri::XML::Node # # @return [Boolean] # - # source://nokogiri//lib/nokogiri/xml/node.rb#1125 + # source://nokogiri//lib/nokogiri/xml/node.rb#1131 def comment?; end def content; end @@ -4009,7 +3979,7 @@ class Nokogiri::XML::Node # Get the path to this node as a CSS expression # - # source://nokogiri//lib/nokogiri/xml/node.rb#1200 + # source://nokogiri//lib/nokogiri/xml/node.rb#1206 def css_path; end # :call-seq: deconstruct_keys(array_of_names) → Hash @@ -4025,8 +3995,6 @@ class Nokogiri::XML::Node # - +content+ → (String) The contents of all the text nodes in this node's subtree. See #content. # - +inner_html+ → (String) The inner markup for the children of this node. See #inner_html. # - # ⚡ This is an experimental feature, available since v1.14.0 - # # *Example* # # doc = Nokogiri::XML.parse(<<~XML) @@ -4061,7 +4029,9 @@ class Nokogiri::XML::Node # # value = "def" # # })]} # - # source://nokogiri//lib/nokogiri/xml/node.rb#1468 + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1475 def deconstruct_keys(keys); end # Decorate this node with the decorators set up in this node's Document @@ -4086,7 +4056,7 @@ class Nokogiri::XML::Node # Fetch the Nokogiri::HTML4::ElementDescription for this node. Returns # nil on XML documents and on unknown tags. # - # source://nokogiri//lib/nokogiri/xml/node.rb#1167 + # source://nokogiri//lib/nokogiri/xml/node.rb#1173 def description; end # Do xinclude substitution on the subtree below node. If given a block, a @@ -4104,7 +4074,7 @@ class Nokogiri::XML::Node # # @return [Boolean] # - # source://nokogiri//lib/nokogiri/xml/node.rb#1145 + # source://nokogiri//lib/nokogiri/xml/node.rb#1151 def document?; end def dup(*_arg0); end @@ -4118,14 +4088,14 @@ class Nokogiri::XML::Node # # @return [Boolean] # - # source://nokogiri//lib/nokogiri/xml/node.rb#1181 + # source://nokogiri//lib/nokogiri/xml/node.rb#1187 def elem?; end # Returns true if this is an Element node # # @return [Boolean] # - # source://nokogiri//lib/nokogiri/xml/node.rb#1181 + # source://nokogiri//lib/nokogiri/xml/node.rb#1187 def element?; end def element_children; end @@ -4144,7 +4114,7 @@ class Nokogiri::XML::Node # # @return [Boolean] # - # source://nokogiri//lib/nokogiri/xml/node.rb#1160 + # source://nokogiri//lib/nokogiri/xml/node.rb#1166 def fragment?; end # :call-seq: [](name) → (String, nil) @@ -4186,7 +4156,7 @@ class Nokogiri::XML::Node # # @return [Boolean] # - # source://nokogiri//lib/nokogiri/xml/node.rb#1140 + # source://nokogiri//lib/nokogiri/xml/node.rb#1146 def html?; end # Get the inner_html for this node's Node#children @@ -4460,7 +4430,7 @@ class Nokogiri::XML::Node # # "xmlns"=>"http://example.com/root", # # "xmlns:in_scope"=>"http://example.com/in_scope"} # - # source://nokogiri//lib/nokogiri/xml/node.rb#1116 + # source://nokogiri//lib/nokogiri/xml/node.rb#1122 def namespaces; end def native_content=(_arg0); end @@ -4542,14 +4512,14 @@ class Nokogiri::XML::Node # # @return [Boolean] # - # source://nokogiri//lib/nokogiri/xml/node.rb#1150 + # source://nokogiri//lib/nokogiri/xml/node.rb#1156 def processing_instruction?; end # Is this a read only node? # # @return [Boolean] # - # source://nokogiri//lib/nokogiri/xml/node.rb#1175 + # source://nokogiri//lib/nokogiri/xml/node.rb#1181 def read_only?; end def remove; end @@ -4633,7 +4603,7 @@ class Nokogiri::XML::Node # config.format.as_xml # end # - # source://nokogiri//lib/nokogiri/xml/node.rb#1280 + # source://nokogiri//lib/nokogiri/xml/node.rb#1286 def serialize(*args, &block); end # :call-seq: []=(name, value) → value @@ -4691,7 +4661,7 @@ class Nokogiri::XML::Node # # @return [Boolean] # - # source://nokogiri//lib/nokogiri/xml/node.rb#1155 + # source://nokogiri//lib/nokogiri/xml/node.rb#1161 def text?; end # Serialize this Node to HTML @@ -4701,13 +4671,13 @@ class Nokogiri::XML::Node # See Node#write_to for a list of +options+. For formatted output, # use Node#to_xhtml instead. # - # source://nokogiri//lib/nokogiri/xml/node.rb#1306 + # source://nokogiri//lib/nokogiri/xml/node.rb#1313 def to_html(options = T.unsafe(nil)); end # Turn this node in to a string. If the document is HTML, this method # returns html. If the document is XML, this method returns XML. # - # source://nokogiri//lib/nokogiri/xml/node.rb#1190 + # source://nokogiri//lib/nokogiri/xml/node.rb#1196 def to_s; end def to_str; end @@ -4717,7 +4687,7 @@ class Nokogiri::XML::Node # # See Node#write_to for a list of +options+ # - # source://nokogiri//lib/nokogiri/xml/node.rb#1327 + # source://nokogiri//lib/nokogiri/xml/node.rb#1334 def to_xhtml(options = T.unsafe(nil)); end # Serialize this Node to XML using +options+ @@ -4725,7 +4695,7 @@ class Nokogiri::XML::Node # # See Node#write_to for a list of +options+ # - # source://nokogiri//lib/nokogiri/xml/node.rb#1316 + # source://nokogiri//lib/nokogiri/xml/node.rb#1323 def to_xml(options = T.unsafe(nil)); end # Yields self and all children to +block+ recursively. @@ -4733,7 +4703,7 @@ class Nokogiri::XML::Node # @yield [_self] # @yieldparam _self [Nokogiri::XML::Node] the object that the method was called on # - # source://nokogiri//lib/nokogiri/xml/node.rb#1233 + # source://nokogiri//lib/nokogiri/xml/node.rb#1239 def traverse(&block); end def type; end @@ -4802,7 +4772,7 @@ class Nokogiri::XML::Node # # See Node#write_to for a list of +options+ # - # source://nokogiri//lib/nokogiri/xml/node.rb#1384 + # source://nokogiri//lib/nokogiri/xml/node.rb#1391 def write_html_to(io, options = T.unsafe(nil)); end # :call-seq: @@ -4836,7 +4806,7 @@ class Nokogiri::XML::Node # # See Node#write_to for a list of +options+ # - # source://nokogiri//lib/nokogiri/xml/node.rb#1392 + # source://nokogiri//lib/nokogiri/xml/node.rb#1399 def write_xhtml_to(io, options = T.unsafe(nil)); end # Write Node as XML to +io+ with +options+ @@ -4845,21 +4815,21 @@ class Nokogiri::XML::Node # # See Node#write_to for a list of options # - # source://nokogiri//lib/nokogiri/xml/node.rb#1402 + # source://nokogiri//lib/nokogiri/xml/node.rb#1409 def write_xml_to(io, options = T.unsafe(nil)); end # Returns true if this is an XML::Document node # # @return [Boolean] # - # source://nokogiri//lib/nokogiri/xml/node.rb#1135 + # source://nokogiri//lib/nokogiri/xml/node.rb#1141 def xml?; end protected # @raise [ArgumentError] # - # source://nokogiri//lib/nokogiri/xml/node.rb#1482 + # source://nokogiri//lib/nokogiri/xml/node.rb#1489 def coerce(data); end private @@ -4872,7 +4842,7 @@ class Nokogiri::XML::Node def add_next_sibling_node(_arg0); end def add_previous_sibling_node(_arg0); end - # source://nokogiri//lib/nokogiri/xml/node.rb#1516 + # source://nokogiri//lib/nokogiri/xml/node.rb#1523 def add_sibling(next_or_previous, node_or_tags); end def compare(_arg0); end @@ -4881,10 +4851,10 @@ class Nokogiri::XML::Node def html_standard_serialize(_arg0); end def in_context(_arg0, _arg1); end - # source://nokogiri//lib/nokogiri/xml/node.rb#1555 + # source://nokogiri//lib/nokogiri/xml/node.rb#1562 def inspect_attributes; end - # source://nokogiri//lib/nokogiri/xml/node.rb#1504 + # source://nokogiri//lib/nokogiri/xml/node.rb#1511 def keywordify(keywords); end def native_write_to(_arg0, _arg1, _arg2, _arg3); end @@ -4894,10 +4864,10 @@ class Nokogiri::XML::Node def set(_arg0, _arg1); end def set_namespace(_arg0); end - # source://nokogiri//lib/nokogiri/xml/node.rb#1541 + # source://nokogiri//lib/nokogiri/xml/node.rb#1548 def to_format(save_option, options); end - # source://nokogiri//lib/nokogiri/xml/node.rb#1548 + # source://nokogiri//lib/nokogiri/xml/node.rb#1555 def write_format_to(save_option, io, options); end class << self @@ -4925,10 +4895,10 @@ Nokogiri::XML::Node::CDATA_SECTION_NODE = T.let(T.unsafe(nil), Integer) # source://nokogiri//lib/nokogiri/xml/node.rb#77 Nokogiri::XML::Node::COMMENT_NODE = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/node.rb#1415 +# source://nokogiri//lib/nokogiri/xml/node.rb#1422 Nokogiri::XML::Node::DECONSTRUCT_KEYS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/xml/node.rb#1416 +# source://nokogiri//lib/nokogiri/xml/node.rb#1423 Nokogiri::XML::Node::DECONSTRUCT_METHODS = T.let(T.unsafe(nil), Hash) # DOCB document node type @@ -4986,7 +4956,7 @@ Nokogiri::XML::Node::ENTITY_REF_NODE = T.let(T.unsafe(nil), Integer) # source://nokogiri//lib/nokogiri/xml/node.rb#87 Nokogiri::XML::Node::HTML_DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/node.rb#1559 +# source://nokogiri//lib/nokogiri/xml/node.rb#1566 Nokogiri::XML::Node::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) # Namespace declaration type @@ -5145,7 +5115,7 @@ Nokogiri::XML::Node::SaveOptions::NO_XHTML = T.let(T.unsafe(nil), Integer) # source://nokogiri//lib/nokogiri/xml/node.rb#67 Nokogiri::XML::Node::TEXT_NODE = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/node.rb#1538 +# source://nokogiri//lib/nokogiri/xml/node.rb#1545 Nokogiri::XML::Node::USING_LIBXML_WITH_BROKEN_SERIALIZATION = T.let(T.unsafe(nil), FalseClass) # XInclude end type @@ -5336,7 +5306,7 @@ class Nokogiri::XML::NodeSet # # Returns the members of this NodeSet as an array, to use in pattern matching. # - # ⚡ This is an experimental feature, available since v1.14.0 + # Since v1.14.0 # # source://nokogiri//lib/nokogiri/xml/node_set.rb#440 def deconstruct; end @@ -6131,9 +6101,11 @@ class Nokogiri::XML::ProcessingInstruction < ::Nokogiri::XML::Node end end -# Nokogiri::XML::Reader parses an XML document similar to the way a cursor -# would move. The Reader is given an XML document, and yields nodes -# to an each block. +# Nokogiri::XML::Reader parses an XML document similar to the way a cursor would move. The +# Reader is given an XML document, and yields nodes to an each block. +# +# The Reader parser might be good for when you need the speed and low memory usage of the SAX +# parser, but do not want to write a Document handler. # # Here is an example of usage: # @@ -6150,28 +6122,26 @@ end # # end # -# Note that Nokogiri::XML::Reader#each can only be called once!! Once -# the cursor moves through the entire document, you must parse the -# document again. So make sure that you capture any information you -# need during the first iteration. +# ⚠ Nokogiri::XML::Reader#each can only be called once! Once the cursor moves through the entire +# document, you must parse the document again. It may be better to capture all information you +# need during a single iteration. # -# The Reader parser is good for when you need the speed of a SAX parser, -# but do not want to write a Document handler. +# ⚠ libxml2 does not support error recovery in the Reader parser. The `RECOVER` ParseOption is +# ignored. If a syntax error is encountered during parsing, an exception will be raised. # -# source://nokogiri//lib/nokogiri/xml/reader.rb#32 +# source://nokogiri//lib/nokogiri/xml/reader.rb#33 class Nokogiri::XML::Reader include ::Enumerable # @return [Reader] a new instance of Reader # - # source://nokogiri//lib/nokogiri/xml/reader.rb#79 + # source://nokogiri//lib/nokogiri/xml/reader.rb#80 def initialize(source, url = T.unsafe(nil), encoding = T.unsafe(nil)); end def attribute(_arg0); end def attribute_at(_arg0); end def attribute_count; end def attribute_hash; end - def attribute_nodes; end # Get the attributes and namespaces of the current node as a Hash. # @@ -6180,7 +6150,7 @@ class Nokogiri::XML::Reader # [Returns] # (Hash) Attribute names and values, and namespace prefixes and hrefs. # - # source://nokogiri//lib/nokogiri/xml/reader.rb#92 + # source://nokogiri//lib/nokogiri/xml/reader.rb#93 def attributes; end def attributes?; end @@ -6190,7 +6160,7 @@ class Nokogiri::XML::Reader # Move the cursor through the document yielding the cursor to the block # - # source://nokogiri//lib/nokogiri/xml/reader.rb#98 + # source://nokogiri//lib/nokogiri/xml/reader.rb#99 def each; end def empty_element?; end @@ -6198,12 +6168,12 @@ class Nokogiri::XML::Reader # A list of errors encountered while parsing # - # source://nokogiri//lib/nokogiri/xml/reader.rb#72 + # source://nokogiri//lib/nokogiri/xml/reader.rb#73 def errors; end # A list of errors encountered while parsing # - # source://nokogiri//lib/nokogiri/xml/reader.rb#72 + # source://nokogiri//lib/nokogiri/xml/reader.rb#73 def errors=(_arg0); end def inner_xml; end @@ -6220,7 +6190,7 @@ class Nokogiri::XML::Reader # The XML source # - # source://nokogiri//lib/nokogiri/xml/reader.rb#75 + # source://nokogiri//lib/nokogiri/xml/reader.rb#76 def source; end def state; end @@ -6236,90 +6206,90 @@ end # Attribute node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#39 +# source://nokogiri//lib/nokogiri/xml/reader.rb#40 Nokogiri::XML::Reader::TYPE_ATTRIBUTE = T.let(T.unsafe(nil), Integer) # CDATA node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#43 +# source://nokogiri//lib/nokogiri/xml/reader.rb#44 Nokogiri::XML::Reader::TYPE_CDATA = T.let(T.unsafe(nil), Integer) # Comment node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#51 +# source://nokogiri//lib/nokogiri/xml/reader.rb#52 Nokogiri::XML::Reader::TYPE_COMMENT = T.let(T.unsafe(nil), Integer) # Document node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#53 +# source://nokogiri//lib/nokogiri/xml/reader.rb#54 Nokogiri::XML::Reader::TYPE_DOCUMENT = T.let(T.unsafe(nil), Integer) # Document Fragment node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#57 +# source://nokogiri//lib/nokogiri/xml/reader.rb#58 Nokogiri::XML::Reader::TYPE_DOCUMENT_FRAGMENT = T.let(T.unsafe(nil), Integer) # Document Type node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#55 +# source://nokogiri//lib/nokogiri/xml/reader.rb#56 Nokogiri::XML::Reader::TYPE_DOCUMENT_TYPE = T.let(T.unsafe(nil), Integer) # Element node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#37 +# source://nokogiri//lib/nokogiri/xml/reader.rb#38 Nokogiri::XML::Reader::TYPE_ELEMENT = T.let(T.unsafe(nil), Integer) # Element end node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#65 +# source://nokogiri//lib/nokogiri/xml/reader.rb#66 Nokogiri::XML::Reader::TYPE_END_ELEMENT = T.let(T.unsafe(nil), Integer) # Entity end node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#67 +# source://nokogiri//lib/nokogiri/xml/reader.rb#68 Nokogiri::XML::Reader::TYPE_END_ENTITY = T.let(T.unsafe(nil), Integer) # Entity node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#47 +# source://nokogiri//lib/nokogiri/xml/reader.rb#48 Nokogiri::XML::Reader::TYPE_ENTITY = T.let(T.unsafe(nil), Integer) # Entity Reference node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#45 +# source://nokogiri//lib/nokogiri/xml/reader.rb#46 Nokogiri::XML::Reader::TYPE_ENTITY_REFERENCE = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/reader.rb#35 +# source://nokogiri//lib/nokogiri/xml/reader.rb#36 Nokogiri::XML::Reader::TYPE_NONE = T.let(T.unsafe(nil), Integer) # Notation node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#59 +# source://nokogiri//lib/nokogiri/xml/reader.rb#60 Nokogiri::XML::Reader::TYPE_NOTATION = T.let(T.unsafe(nil), Integer) # PI node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#49 +# source://nokogiri//lib/nokogiri/xml/reader.rb#50 Nokogiri::XML::Reader::TYPE_PROCESSING_INSTRUCTION = T.let(T.unsafe(nil), Integer) # Significant Whitespace node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#63 +# source://nokogiri//lib/nokogiri/xml/reader.rb#64 Nokogiri::XML::Reader::TYPE_SIGNIFICANT_WHITESPACE = T.let(T.unsafe(nil), Integer) # Text node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#41 +# source://nokogiri//lib/nokogiri/xml/reader.rb#42 Nokogiri::XML::Reader::TYPE_TEXT = T.let(T.unsafe(nil), Integer) # Whitespace node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#61 +# source://nokogiri//lib/nokogiri/xml/reader.rb#62 Nokogiri::XML::Reader::TYPE_WHITESPACE = T.let(T.unsafe(nil), Integer) # XML Declaration node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#69 +# source://nokogiri//lib/nokogiri/xml/reader.rb#70 Nokogiri::XML::Reader::TYPE_XML_DECLARATION = T.let(T.unsafe(nil), Integer) # Nokogiri::XML::RelaxNG is used for validating XML against a @@ -7284,18 +7254,41 @@ end # doc = Nokogiri::XML(File.read('some_file.xml')) # xslt = Nokogiri::XSLT(File.read('some_transformer.xslt')) # -# puts xslt.transform(doc) +# xslt.transform(doc) # => Nokogiri::XML::Document +# +# Many XSLT transformations include serialization behavior to emit a non-XML document. For these +# cases, please take care to invoke the #serialize method on the result of the transformation: +# +# doc = Nokogiri::XML(File.read('some_file.xml')) +# xslt = Nokogiri::XSLT(File.read('some_transformer.xslt')) +# xslt.serialize(xslt.transform(doc)) # => String # -# See Nokogiri::XSLT::Stylesheet#transform for more transformation -# information. +# or use the #apply_to method, which is a shortcut for `serialize(transform(document))`: # -# source://nokogiri//lib/nokogiri/xslt/stylesheet.rb#17 +# doc = Nokogiri::XML(File.read('some_file.xml')) +# xslt = Nokogiri::XSLT(File.read('some_transformer.xslt')) +# xslt.apply_to(doc) # => String +# +# See Nokogiri::XSLT::Stylesheet#transform for more information and examples. +# +# source://nokogiri//lib/nokogiri/xslt/stylesheet.rb#29 class Nokogiri::XSLT::Stylesheet - # Apply an XSLT stylesheet to an XML::Document. - # +params+ is an array of strings used as XSLT parameters. - # returns serialized document + # :call-seq: + # apply_to(document, params = []) -> String + # + # Apply an XSLT stylesheet to an XML::Document and serialize it properly. This method is + # equivalent to calling #serialize on the result of #transform. + # + # [Parameters] + # - +document+ is an instance of XML::Document to transform + # - +params+ is an array of strings used as XSLT parameters, passed into #transform + # + # [Returns] + # A string containing the serialized result of the transformation. + # + # See Nokogiri::XSLT::Stylesheet#transform for more information and examples. # - # source://nokogiri//lib/nokogiri/xslt/stylesheet.rb#22 + # source://nokogiri//lib/nokogiri/xslt/stylesheet.rb#44 def apply_to(document, params = T.unsafe(nil)); end def serialize(_arg0); end diff --git a/sorbet/rbi/gems/parallel@1.23.0.rbi b/sorbet/rbi/gems/parallel@1.24.0.rbi similarity index 95% rename from sorbet/rbi/gems/parallel@1.23.0.rbi rename to sorbet/rbi/gems/parallel@1.24.0.rbi index c8b319a36..5dd73750f 100644 --- a/sorbet/rbi/gems/parallel@1.23.0.rbi +++ b/sorbet/rbi/gems/parallel@1.24.0.rbi @@ -78,7 +78,14 @@ module Parallel # source://parallel//lib/parallel.rb#642 def instrument_finish(item, index, result, options); end - # source://parallel//lib/parallel.rb#647 + # 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 + def instrument_finish_in_order(item, index, result, options); end + + # source://parallel//lib/parallel.rb#671 def instrument_start(item, index, options); end # source://parallel//lib/parallel.rb#590 diff --git a/sorbet/rbi/gems/parser@3.2.2.3.rbi b/sorbet/rbi/gems/parser@3.3.0.5.rbi similarity index 69% rename from sorbet/rbi/gems/parser@3.2.2.3.rbi rename to sorbet/rbi/gems/parser@3.3.0.5.rbi index 680c9da48..0acdc763d 100644 --- a/sorbet/rbi/gems/parser@3.2.2.3.rbi +++ b/sorbet/rbi/gems/parser@3.3.0.5.rbi @@ -7,14 +7,7 @@ # @api public # # source://parser//lib/parser.rb#19 -module Parser - class << self - private - - # source://parser//lib/parser/current.rb#5 - def warn_syntax_deviation(feature, version); end - end -end +module Parser; end # @api public # @@ -876,7 +869,7 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#243 def initialize; end - # source://parser//lib/parser/builders/default.rb#690 + # source://parser//lib/parser/builders/default.rb#703 def __ENCODING__(__ENCODING__t); end # source://parser//lib/parser/builders/default.rb#348 @@ -885,79 +878,79 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#312 def __LINE__(__LINE__t); end - # source://parser//lib/parser/builders/default.rb#616 + # source://parser//lib/parser/builders/default.rb#622 def accessible(node); end - # source://parser//lib/parser/builders/default.rb#865 + # source://parser//lib/parser/builders/default.rb#878 def alias(alias_t, to, from); end - # source://parser//lib/parser/builders/default.rb#904 + # source://parser//lib/parser/builders/default.rb#917 def arg(name_t); end - # source://parser//lib/parser/builders/default.rb#994 + # source://parser//lib/parser/builders/default.rb#1007 def arg_expr(expr); end - # source://parser//lib/parser/builders/default.rb#874 + # source://parser//lib/parser/builders/default.rb#887 def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end # source://parser//lib/parser/builders/default.rb#440 def array(begin_t, elements, end_t); end - # source://parser//lib/parser/builders/default.rb#1577 + # source://parser//lib/parser/builders/default.rb#1590 def array_pattern(lbrack_t, elements, rbrack_t); end - # source://parser//lib/parser/builders/default.rb#754 + # source://parser//lib/parser/builders/default.rb#767 def assign(lhs, eql_t, rhs); end - # source://parser//lib/parser/builders/default.rb#699 + # source://parser//lib/parser/builders/default.rb#712 def assignable(node); end # source://parser//lib/parser/builders/default.rb#540 def associate(begin_t, pairs, end_t); end - # source://parser//lib/parser/builders/default.rb#1158 + # source://parser//lib/parser/builders/default.rb#1171 def attr_asgn(receiver, dot_t, selector_t); end - # source://parser//lib/parser/builders/default.rb#606 + # source://parser//lib/parser/builders/default.rb#612 def back_ref(token); end - # source://parser//lib/parser/builders/default.rb#1422 + # source://parser//lib/parser/builders/default.rb#1435 def begin(begin_t, body, end_t); end - # source://parser//lib/parser/builders/default.rb#1364 + # source://parser//lib/parser/builders/default.rb#1377 def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1440 + # source://parser//lib/parser/builders/default.rb#1453 def begin_keyword(begin_t, body, end_t); end - # source://parser//lib/parser/builders/default.rb#1192 + # source://parser//lib/parser/builders/default.rb#1205 def binary_op(receiver, operator_t, arg); end - # source://parser//lib/parser/builders/default.rb#1109 + # source://parser//lib/parser/builders/default.rb#1122 def block(method_call, begin_t, args, body, end_t); end - # source://parser//lib/parser/builders/default.rb#1144 + # source://parser//lib/parser/builders/default.rb#1157 def block_pass(amper_t, arg); end - # source://parser//lib/parser/builders/default.rb#969 + # source://parser//lib/parser/builders/default.rb#982 def blockarg(amper_t, name_t); end - # source://parser//lib/parser/builders/default.rb#1014 + # source://parser//lib/parser/builders/default.rb#1027 def blockarg_expr(amper_t, expr); end - # source://parser//lib/parser/builders/default.rb#1100 + # source://parser//lib/parser/builders/default.rb#1113 def call_lambda(lambda_t); end - # source://parser//lib/parser/builders/default.rb#1083 + # source://parser//lib/parser/builders/default.rb#1096 def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1055 + # source://parser//lib/parser/builders/default.rb#1068 def call_type_for_dot(dot_t); end - # source://parser//lib/parser/builders/default.rb#1297 + # source://parser//lib/parser/builders/default.rb#1310 def case(case_t, expr, when_bodies, else_t, else_body, end_t); end - # source://parser//lib/parser/builders/default.rb#1460 + # source://parser//lib/parser/builders/default.rb#1473 def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end # source://parser//lib/parser/builders/default.rb#343 @@ -966,55 +959,55 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#284 def complex(complex_t); end - # source://parser//lib/parser/builders/default.rb#1410 + # source://parser//lib/parser/builders/default.rb#1423 def compstmt(statements); end - # source://parser//lib/parser/builders/default.rb#1273 + # source://parser//lib/parser/builders/default.rb#1286 def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end - # source://parser//lib/parser/builders/default.rb#1279 + # source://parser//lib/parser/builders/default.rb#1292 def condition_mod(if_true, if_false, cond_t, cond); end - # source://parser//lib/parser/builders/default.rb#673 + # source://parser//lib/parser/builders/default.rb#686 def const(name_t); end - # source://parser//lib/parser/builders/default.rb#685 + # source://parser//lib/parser/builders/default.rb#698 def const_fetch(scope, t_colon2, name_t); end - # source://parser//lib/parser/builders/default.rb#678 + # source://parser//lib/parser/builders/default.rb#691 def const_global(t_colon3, name_t); end - # source://parser//lib/parser/builders/default.rb#750 + # source://parser//lib/parser/builders/default.rb#763 def const_op_assignable(node); end - # source://parser//lib/parser/builders/default.rb#1607 + # source://parser//lib/parser/builders/default.rb#1620 def const_pattern(const, ldelim_t, pattern, rdelim_t); end - # source://parser//lib/parser/builders/default.rb#601 + # source://parser//lib/parser/builders/default.rb#607 def cvar(token); end # source://parser//lib/parser/builders/default.rb#388 def dedent_string(node, dedent_level); end - # source://parser//lib/parser/builders/default.rb#801 + # source://parser//lib/parser/builders/default.rb#814 def def_class(class_t, name, lt_t, superclass, body, end_t); end - # source://parser//lib/parser/builders/default.rb#832 + # source://parser//lib/parser/builders/default.rb#845 def def_endless_method(def_t, name_t, args, assignment_t, body); end - # source://parser//lib/parser/builders/default.rb#850 + # source://parser//lib/parser/builders/default.rb#863 def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end - # source://parser//lib/parser/builders/default.rb#824 + # source://parser//lib/parser/builders/default.rb#837 def def_method(def_t, name_t, args, body, end_t); end - # source://parser//lib/parser/builders/default.rb#814 + # source://parser//lib/parser/builders/default.rb#827 def def_module(module_t, name, body, end_t); end - # source://parser//lib/parser/builders/default.rb#808 + # source://parser//lib/parser/builders/default.rb#821 def def_sclass(class_t, lshft_t, expr, body, end_t); end - # source://parser//lib/parser/builders/default.rb#840 + # source://parser//lib/parser/builders/default.rb#853 def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end # source://parser//lib/parser/builders/default.rb#237 @@ -1026,52 +1019,52 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#265 def false(false_t); end - # source://parser//lib/parser/builders/default.rb#1598 + # source://parser//lib/parser/builders/default.rb#1611 def find_pattern(lbrack_t, elements, rbrack_t); end # source://parser//lib/parser/builders/default.rb#276 def float(float_t); end - # source://parser//lib/parser/builders/default.rb#1318 + # source://parser//lib/parser/builders/default.rb#1331 def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end - # source://parser//lib/parser/builders/default.rb#900 + # source://parser//lib/parser/builders/default.rb#913 def forward_arg(dots_t); end - # source://parser//lib/parser/builders/default.rb#890 + # source://parser//lib/parser/builders/default.rb#903 def forward_only_args(begin_t, dots_t, end_t); end - # source://parser//lib/parser/builders/default.rb#1071 + # source://parser//lib/parser/builders/default.rb#1084 def forwarded_args(dots_t); end - # source://parser//lib/parser/builders/default.rb#1079 + # source://parser//lib/parser/builders/default.rb#1092 def forwarded_kwrestarg(dstar_t); end - # source://parser//lib/parser/builders/default.rb#1075 + # source://parser//lib/parser/builders/default.rb#1088 def forwarded_restarg(star_t); end # source://parser//lib/parser/builders/default.rb#596 def gvar(token); end - # source://parser//lib/parser/builders/default.rb#1571 + # source://parser//lib/parser/builders/default.rb#1584 def hash_pattern(lbrace_t, kwargs, rbrace_t); end # source://parser//lib/parser/builders/default.rb#586 def ident(token); end - # source://parser//lib/parser/builders/default.rb#1487 + # source://parser//lib/parser/builders/default.rb#1500 def if_guard(if_t, if_body); end - # source://parser//lib/parser/builders/default.rb#1466 + # source://parser//lib/parser/builders/default.rb#1479 def in_match(lhs, in_t, rhs); end - # source://parser//lib/parser/builders/default.rb#1481 + # source://parser//lib/parser/builders/default.rb#1494 def in_pattern(in_t, pattern, guard, then_t, body); end - # source://parser//lib/parser/builders/default.rb#1167 + # source://parser//lib/parser/builders/default.rb#1180 def index(receiver, lbrack_t, indexes, rbrack_t); end - # source://parser//lib/parser/builders/default.rb#1181 + # source://parser//lib/parser/builders/default.rb#1194 def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end # source://parser//lib/parser/builders/default.rb#272 @@ -1080,103 +1073,103 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#591 def ivar(token); end - # source://parser//lib/parser/builders/default.rb#1326 + # source://parser//lib/parser/builders/default.rb#1339 def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#931 + # source://parser//lib/parser/builders/default.rb#944 def kwarg(name_t); end - # source://parser//lib/parser/builders/default.rb#957 + # source://parser//lib/parser/builders/default.rb#970 def kwnilarg(dstar_t, nil_t); end - # source://parser//lib/parser/builders/default.rb#938 + # source://parser//lib/parser/builders/default.rb#951 def kwoptarg(name_t, value); end - # source://parser//lib/parser/builders/default.rb#945 + # source://parser//lib/parser/builders/default.rb#958 def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end # source://parser//lib/parser/builders/default.rb#535 def kwsplat(dstar_t, arg); end - # source://parser//lib/parser/builders/default.rb#1266 + # source://parser//lib/parser/builders/default.rb#1279 def logical_op(type, lhs, op_t, rhs); end - # source://parser//lib/parser/builders/default.rb#1304 + # source://parser//lib/parser/builders/default.rb#1317 def loop(type, keyword_t, cond, do_t, body, end_t); end - # source://parser//lib/parser/builders/default.rb#1309 + # source://parser//lib/parser/builders/default.rb#1322 def loop_mod(type, body, keyword_t, cond); end - # source://parser//lib/parser/builders/default.rb#1621 + # source://parser//lib/parser/builders/default.rb#1634 def match_alt(left, pipe_t, right); end - # source://parser//lib/parser/builders/default.rb#1628 + # source://parser//lib/parser/builders/default.rb#1641 def match_as(value, assoc_t, as); end - # source://parser//lib/parser/builders/default.rb#1507 + # source://parser//lib/parser/builders/default.rb#1520 def match_hash_var(name_t); end - # source://parser//lib/parser/builders/default.rb#1521 + # source://parser//lib/parser/builders/default.rb#1534 def match_hash_var_from_str(begin_t, strings, end_t); end - # source://parser//lib/parser/builders/default.rb#1659 + # source://parser//lib/parser/builders/default.rb#1672 def match_label(label_type, label); end - # source://parser//lib/parser/builders/default.rb#1635 + # source://parser//lib/parser/builders/default.rb#1648 def match_nil_pattern(dstar_t, nil_t); end - # source://parser//lib/parser/builders/default.rb#1214 + # source://parser//lib/parser/builders/default.rb#1227 def match_op(receiver, match_t, arg); end - # source://parser//lib/parser/builders/default.rb#1640 + # source://parser//lib/parser/builders/default.rb#1653 def match_pair(label_type, label, value); end - # source://parser//lib/parser/builders/default.rb#1471 + # source://parser//lib/parser/builders/default.rb#1484 def match_pattern(lhs, match_t, rhs); end - # source://parser//lib/parser/builders/default.rb#1476 + # source://parser//lib/parser/builders/default.rb#1489 def match_pattern_p(lhs, match_t, rhs); end - # source://parser//lib/parser/builders/default.rb#1560 + # source://parser//lib/parser/builders/default.rb#1573 def match_rest(star_t, name_t = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1495 + # source://parser//lib/parser/builders/default.rb#1508 def match_var(name_t); end - # source://parser//lib/parser/builders/default.rb#1603 + # source://parser//lib/parser/builders/default.rb#1616 def match_with_trailing_comma(match, comma_t); end - # source://parser//lib/parser/builders/default.rb#792 + # source://parser//lib/parser/builders/default.rb#805 def multi_assign(lhs, eql_t, rhs); end - # source://parser//lib/parser/builders/default.rb#787 + # source://parser//lib/parser/builders/default.rb#800 def multi_lhs(begin_t, items, end_t); end # source://parser//lib/parser/builders/default.rb#255 def nil(nil_t); end - # source://parser//lib/parser/builders/default.rb#1242 + # source://parser//lib/parser/builders/default.rb#1255 def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#611 + # source://parser//lib/parser/builders/default.rb#617 def nth_ref(token); end - # source://parser//lib/parser/builders/default.rb#886 + # source://parser//lib/parser/builders/default.rb#899 def numargs(max_numparam); end - # source://parser//lib/parser/builders/default.rb#1025 + # source://parser//lib/parser/builders/default.rb#1038 def objc_kwarg(kwname_t, assoc_t, name_t); end - # source://parser//lib/parser/builders/default.rb#1039 + # source://parser//lib/parser/builders/default.rb#1052 def objc_restarg(star_t, name = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1149 + # source://parser//lib/parser/builders/default.rb#1162 def objc_varargs(pair, rest_of_varargs); end - # source://parser//lib/parser/builders/default.rb#761 + # source://parser//lib/parser/builders/default.rb#774 def op_assign(lhs, op_t, rhs); end - # source://parser//lib/parser/builders/default.rb#911 + # source://parser//lib/parser/builders/default.rb#924 def optarg(name_t, eql_t, value); end # source://parser//lib/parser/builders/default.rb#488 @@ -1200,16 +1193,16 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#225 def parser=(_arg0); end - # source://parser//lib/parser/builders/default.rb#1616 + # source://parser//lib/parser/builders/default.rb#1629 def pin(pin_t, var); end - # source://parser//lib/parser/builders/default.rb#1349 + # source://parser//lib/parser/builders/default.rb#1362 def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end - # source://parser//lib/parser/builders/default.rb#1344 + # source://parser//lib/parser/builders/default.rb#1357 def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end - # source://parser//lib/parser/builders/default.rb#979 + # source://parser//lib/parser/builders/default.rb#992 def procarg0(arg); end # source://parser//lib/parser/builders/default.rb#572 @@ -1227,19 +1220,19 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#417 def regexp_options(regopt_t); end - # source://parser//lib/parser/builders/default.rb#1356 + # source://parser//lib/parser/builders/default.rb#1369 def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end - # source://parser//lib/parser/builders/default.rb#920 + # source://parser//lib/parser/builders/default.rb#933 def restarg(star_t, name_t = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1003 + # source://parser//lib/parser/builders/default.rb#1016 def restarg_expr(star_t, expr = T.unsafe(nil)); end # source://parser//lib/parser/builders/default.rb#581 def self(token); end - # source://parser//lib/parser/builders/default.rb#962 + # source://parser//lib/parser/builders/default.rb#975 def shadowarg(name_t); end # source://parser//lib/parser/builders/default.rb#445 @@ -1266,7 +1259,7 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#469 def symbols_compose(begin_t, parts, end_t); end - # source://parser//lib/parser/builders/default.rb#1284 + # source://parser//lib/parser/builders/default.rb#1297 def ternary(cond, question_t, if_true, colon_t, if_false); end # source://parser//lib/parser/builders/default.rb#260 @@ -1275,16 +1268,16 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#294 def unary_num(unary_t, numeric); end - # source://parser//lib/parser/builders/default.rb#1230 + # source://parser//lib/parser/builders/default.rb#1243 def unary_op(op_t, receiver); end - # source://parser//lib/parser/builders/default.rb#860 + # source://parser//lib/parser/builders/default.rb#873 def undef_method(undef_t, names); end - # source://parser//lib/parser/builders/default.rb#1491 + # source://parser//lib/parser/builders/default.rb#1504 def unless_guard(unless_t, unless_body); end - # source://parser//lib/parser/builders/default.rb#1291 + # source://parser//lib/parser/builders/default.rb#1304 def when(when_t, patterns, then_t, body); end # source://parser//lib/parser/builders/default.rb#455 @@ -1298,184 +1291,184 @@ class Parser::Builders::Default private - # source://parser//lib/parser/builders/default.rb#1798 + # source://parser//lib/parser/builders/default.rb#1821 def arg_name_collides?(this_name, that_name); end - # source://parser//lib/parser/builders/default.rb#1994 + # source://parser//lib/parser/builders/default.rb#2017 def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1968 + # source://parser//lib/parser/builders/default.rb#1991 def binary_op_map(left_e, op_t, right_e); end - # source://parser//lib/parser/builders/default.rb#2096 + # source://parser//lib/parser/builders/default.rb#2119 def block_map(receiver_l, begin_t, end_t); end - # source://parser//lib/parser/builders/default.rb#1773 + # source://parser//lib/parser/builders/default.rb#1796 def check_assignment_to_numparam(name, loc); end - # source://parser//lib/parser/builders/default.rb#1675 + # source://parser//lib/parser/builders/default.rb#1688 def check_condition(cond); end - # source://parser//lib/parser/builders/default.rb#1744 + # source://parser//lib/parser/builders/default.rb#1767 def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1719 + # source://parser//lib/parser/builders/default.rb#1742 def check_duplicate_args(args, map = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1831 + # source://parser//lib/parser/builders/default.rb#1854 def check_duplicate_pattern_key(name, loc); end - # source://parser//lib/parser/builders/default.rb#1821 + # source://parser//lib/parser/builders/default.rb#1844 def check_duplicate_pattern_variable(name, loc); end - # source://parser//lib/parser/builders/default.rb#1813 + # source://parser//lib/parser/builders/default.rb#1836 def check_lvar_name(name, loc); end - # source://parser//lib/parser/builders/default.rb#1788 + # source://parser//lib/parser/builders/default.rb#1811 def check_reserved_for_numparam(name, loc); end - # source://parser//lib/parser/builders/default.rb#2253 + # source://parser//lib/parser/builders/default.rb#2280 def collapse_string_parts?(parts); end - # source://parser//lib/parser/builders/default.rb#1919 + # source://parser//lib/parser/builders/default.rb#1942 def collection_map(begin_t, parts, end_t); end - # source://parser//lib/parser/builders/default.rb#2123 + # source://parser//lib/parser/builders/default.rb#2146 def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end - # source://parser//lib/parser/builders/default.rb#1954 + # source://parser//lib/parser/builders/default.rb#1977 def constant_map(scope, colon2_t, name_t); end - # source://parser//lib/parser/builders/default.rb#2027 + # source://parser//lib/parser/builders/default.rb#2050 def definition_map(keyword_t, operator_t, name_t, end_t); end - # source://parser//lib/parser/builders/default.rb#1860 + # source://parser//lib/parser/builders/default.rb#1883 def delimited_string_map(string_t); end - # source://parser//lib/parser/builders/default.rb#2275 + # source://parser//lib/parser/builders/default.rb#2302 def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#2167 + # source://parser//lib/parser/builders/default.rb#2190 def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end - # source://parser//lib/parser/builders/default.rb#2033 + # source://parser//lib/parser/builders/default.rb#2056 def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end - # source://parser//lib/parser/builders/default.rb#1915 + # source://parser//lib/parser/builders/default.rb#1938 def expr_map(loc); end - # source://parser//lib/parser/builders/default.rb#2148 + # source://parser//lib/parser/builders/default.rb#2171 def for_map(keyword_t, in_t, begin_t, end_t); end - # source://parser//lib/parser/builders/default.rb#2195 + # source://parser//lib/parser/builders/default.rb#2218 def guard_map(keyword_t, guard_body_e); end - # source://parser//lib/parser/builders/default.rb#2085 + # source://parser//lib/parser/builders/default.rb#2108 def index_map(receiver_e, lbrack_t, rbrack_t); end - # source://parser//lib/parser/builders/default.rb#1851 + # source://parser//lib/parser/builders/default.rb#1874 def join_exprs(left_expr, right_expr); end - # source://parser//lib/parser/builders/default.rb#2101 + # source://parser//lib/parser/builders/default.rb#2124 def keyword_map(keyword_t, begin_t, args, end_t); end - # source://parser//lib/parser/builders/default.rb#2118 + # source://parser//lib/parser/builders/default.rb#2141 def keyword_mod_map(pre_e, keyword_t, post_e); end - # source://parser//lib/parser/builders/default.rb#2004 + # source://parser//lib/parser/builders/default.rb#2027 def kwarg_map(name_t, value_e = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#2306 + # source://parser//lib/parser/builders/default.rb#2333 def kwargs?(node); end - # source://parser//lib/parser/builders/default.rb#2270 + # source://parser//lib/parser/builders/default.rb#2297 def loc(token); end - # source://parser//lib/parser/builders/default.rb#2017 + # source://parser//lib/parser/builders/default.rb#2040 def module_definition_map(keyword_t, name_e, operator_t, end_t); end - # source://parser//lib/parser/builders/default.rb#1843 + # source://parser//lib/parser/builders/default.rb#1866 def n(type, children, source_map); end - # source://parser//lib/parser/builders/default.rb#1847 + # source://parser//lib/parser/builders/default.rb#1870 def n0(type, source_map); end # source://parser//lib/parser/builders/default.rb#288 def numeric(kind, token); end - # source://parser//lib/parser/builders/default.rb#1885 + # source://parser//lib/parser/builders/default.rb#1908 def pair_keyword_map(key_t, value_e); end - # source://parser//lib/parser/builders/default.rb#1900 + # source://parser//lib/parser/builders/default.rb#1923 def pair_quoted_map(begin_t, end_t, value_e); end - # source://parser//lib/parser/builders/default.rb#1871 + # source://parser//lib/parser/builders/default.rb#1894 def prefix_string_map(symbol); end - # source://parser//lib/parser/builders/default.rb#1982 + # source://parser//lib/parser/builders/default.rb#2005 def range_map(start_e, op_t, end_e); end - # source://parser//lib/parser/builders/default.rb#1949 + # source://parser//lib/parser/builders/default.rb#1972 def regexp_map(begin_t, end_t, options_e); end - # source://parser//lib/parser/builders/default.rb#2154 + # source://parser//lib/parser/builders/default.rb#2177 def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end - # source://parser//lib/parser/builders/default.rb#2296 + # source://parser//lib/parser/builders/default.rb#2323 def rewrite_hash_args_to_kwargs(args); end - # source://parser//lib/parser/builders/default.rb#2067 + # source://parser//lib/parser/builders/default.rb#2090 def send_binary_op_map(lhs_e, selector_t, rhs_e); end - # source://parser//lib/parser/builders/default.rb#2090 + # source://parser//lib/parser/builders/default.rb#2113 def send_index_map(receiver_e, lbrack_t, rbrack_t); end - # source://parser//lib/parser/builders/default.rb#2041 + # source://parser//lib/parser/builders/default.rb#2064 def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#2073 + # source://parser//lib/parser/builders/default.rb#2096 def send_unary_op_map(selector_t, arg_e); end - # source://parser//lib/parser/builders/default.rb#2226 + # source://parser//lib/parser/builders/default.rb#2249 def static_regexp(parts, options); end - # source://parser//lib/parser/builders/default.rb#2246 + # source://parser//lib/parser/builders/default.rb#2269 def static_regexp_node(node); end - # source://parser//lib/parser/builders/default.rb#2209 + # source://parser//lib/parser/builders/default.rb#2232 def static_string(nodes); end - # source://parser//lib/parser/builders/default.rb#1935 + # source://parser//lib/parser/builders/default.rb#1958 def string_map(begin_t, parts, end_t); end - # source://parser//lib/parser/builders/default.rb#2262 + # source://parser//lib/parser/builders/default.rb#2289 def string_value(token); end - # source://parser//lib/parser/builders/default.rb#2143 + # source://parser//lib/parser/builders/default.rb#2166 def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end - # source://parser//lib/parser/builders/default.rb#1856 + # source://parser//lib/parser/builders/default.rb#1879 def token_map(token); end - # source://parser//lib/parser/builders/default.rb#1972 + # source://parser//lib/parser/builders/default.rb#1995 def unary_op_map(op_t, arg_e = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1880 + # source://parser//lib/parser/builders/default.rb#1903 def unquoted_map(token); end - # source://parser//lib/parser/builders/default.rb#2284 + # source://parser//lib/parser/builders/default.rb#2311 def validate_definee(definee); end - # source://parser//lib/parser/builders/default.rb#1758 + # source://parser//lib/parser/builders/default.rb#1781 def validate_no_forward_arg_after_restarg(args); end - # source://parser//lib/parser/builders/default.rb#2258 + # source://parser//lib/parser/builders/default.rb#2285 def value(token); end - # source://parser//lib/parser/builders/default.rb#2061 + # source://parser//lib/parser/builders/default.rb#2084 def var_send_map(variable_e); end - # source://parser//lib/parser/builders/default.rb#1964 + # source://parser//lib/parser/builders/default.rb#1987 def variable_map(name_t); end class << self @@ -1671,9 +1664,6 @@ class Parser::CurrentArgStack def top; end end -# source://parser//lib/parser/current.rb#111 -Parser::CurrentRuby = Parser::Ruby32 - # @api private # # source://parser//lib/parser/deprecation.rb#7 @@ -2090,69 +2080,69 @@ class Parser::Lexer protected - # source://parser//lib/parser/lexer-F1.rb#14631 + # source://parser//lib/parser/lexer-F1.rb#14692 def arg_or_cmdarg(cmd_state); end - # source://parser//lib/parser/lexer-F1.rb#14693 + # source://parser//lib/parser/lexer-F1.rb#14754 def check_ambiguous_slash(tm); end - # source://parser//lib/parser/lexer-F1.rb#14655 + # source://parser//lib/parser/lexer-F1.rb#14716 def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14661 + # source://parser//lib/parser/lexer-F1.rb#14722 def e_lbrace; end - # source://parser//lib/parser/lexer-F1.rb#14605 + # source://parser//lib/parser/lexer-F1.rb#14666 def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14714 + # source://parser//lib/parser/lexer-F1.rb#14775 def emit_class_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14742 + # source://parser//lib/parser/lexer-F1.rb#14803 def emit_colon_with_digits(p, tm, diag_msg); end - # source://parser//lib/parser/lexer-F1.rb#14639 + # source://parser//lib/parser/lexer-F1.rb#14700 def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14651 + # source://parser//lib/parser/lexer-F1.rb#14712 def emit_comment_from_range(p, pe); end - # source://parser//lib/parser/lexer-F1.rb#14621 + # source://parser//lib/parser/lexer-F1.rb#14682 def emit_do(do_block = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14704 + # source://parser//lib/parser/lexer-F1.rb#14765 def emit_global_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14722 + # source://parser//lib/parser/lexer-F1.rb#14783 def emit_instance_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14730 + # source://parser//lib/parser/lexer-F1.rb#14791 def emit_rbrace_rparen_rbrack; end - # source://parser//lib/parser/lexer-F1.rb#14752 + # source://parser//lib/parser/lexer-F1.rb#14813 def emit_singleton_class; end - # source://parser//lib/parser/lexer-F1.rb#14615 + # source://parser//lib/parser/lexer-F1.rb#14676 def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14670 + # source://parser//lib/parser/lexer-F1.rb#14731 def numeric_literal_int; end - # source://parser//lib/parser/lexer-F1.rb#14689 + # source://parser//lib/parser/lexer-F1.rb#14750 def on_newline(p); end - # source://parser//lib/parser/lexer-F1.rb#14601 + # source://parser//lib/parser/lexer-F1.rb#14662 def range(s = T.unsafe(nil), e = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14592 + # source://parser//lib/parser/lexer-F1.rb#14653 def stack_pop; end - # source://parser//lib/parser/lexer-F1.rb#14597 + # source://parser//lib/parser/lexer-F1.rb#14658 def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end # @return [Boolean] # - # source://parser//lib/parser/lexer-F1.rb#14588 + # source://parser//lib/parser/lexer-F1.rb#14649 def version?(*versions); end class << self @@ -2499,13 +2489,13 @@ end # source://parser//lib/parser/lexer/dedenter.rb#7 Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) -# source://parser//lib/parser/lexer-F1.rb#14799 +# source://parser//lib/parser/lexer-F1.rb#14860 Parser::Lexer::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) -# source://parser//lib/parser/lexer-F1.rb#14785 +# source://parser//lib/parser/lexer-F1.rb#14846 Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) -# source://parser//lib/parser/lexer-F1.rb#14792 +# source://parser//lib/parser/lexer-F1.rb#14853 Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) # source://parser//lib/parser/lexer-F1.rb#8362 @@ -2513,108 +2503,114 @@ Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) # source://parser//lib/parser/lexer/literal.rb#6 class Parser::Lexer::Literal - # source://parser//lib/parser/lexer/literal.rb#40 + # source://parser//lib/parser/lexer/literal.rb#42 def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)); end - # source://parser//lib/parser/lexer/literal.rb#114 + # source://parser//lib/parser/lexer/literal.rb#116 def backslash_delimited?; end - # source://parser//lib/parser/lexer/literal.rb#37 + # source://parser//lib/parser/lexer/literal.rb#39 def dedent_level; end - # source://parser//lib/parser/lexer/literal.rb#189 + # source://parser//lib/parser/lexer/literal.rb#191 def end_interp_brace_and_try_closing; end - # source://parser//lib/parser/lexer/literal.rb#216 + # source://parser//lib/parser/lexer/literal.rb#218 def extend_content; end - # source://parser//lib/parser/lexer/literal.rb#220 + # source://parser//lib/parser/lexer/literal.rb#222 def extend_space(ts, te); end - # source://parser//lib/parser/lexer/literal.rb#195 + # source://parser//lib/parser/lexer/literal.rb#197 def extend_string(string, ts, te); end - # source://parser//lib/parser/lexer/literal.rb#202 + # source://parser//lib/parser/lexer/literal.rb#204 def flush_string; end - # source://parser//lib/parser/lexer/literal.rb#102 + # source://parser//lib/parser/lexer/literal.rb#104 def heredoc?; end - # source://parser//lib/parser/lexer/literal.rb#37 + # source://parser//lib/parser/lexer/literal.rb#39 def heredoc_e; end - # source://parser//lib/parser/lexer/literal.rb#166 + # source://parser//lib/parser/lexer/literal.rb#168 def infer_indent_level(line); end - # source://parser//lib/parser/lexer/literal.rb#89 + # source://parser//lib/parser/lexer/literal.rb#91 def interpolate?; end - # source://parser//lib/parser/lexer/literal.rb#122 + # source://parser//lib/parser/lexer/literal.rb#124 def munge_escape?(character); end - # source://parser//lib/parser/lexer/literal.rb#132 + # source://parser//lib/parser/lexer/literal.rb#134 def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end - # source://parser//lib/parser/lexer/literal.rb#106 + # source://parser//lib/parser/lexer/literal.rb#108 def plain_heredoc?; end - # source://parser//lib/parser/lexer/literal.rb#98 + # source://parser//lib/parser/lexer/literal.rb#100 def regexp?; end - # source://parser//lib/parser/lexer/literal.rb#38 + # source://parser//lib/parser/lexer/literal.rb#40 def saved_herebody_s; end - # source://parser//lib/parser/lexer/literal.rb#38 + # source://parser//lib/parser/lexer/literal.rb#40 def saved_herebody_s=(_arg0); end - # source://parser//lib/parser/lexer/literal.rb#110 + # source://parser//lib/parser/lexer/literal.rb#112 def squiggly_heredoc?; end - # source://parser//lib/parser/lexer/literal.rb#185 + # source://parser//lib/parser/lexer/literal.rb#187 def start_interp_brace; end - # source://parser//lib/parser/lexer/literal.rb#37 + # source://parser//lib/parser/lexer/literal.rb#39 def str_s; end - # source://parser//lib/parser/lexer/literal.rb#230 + # source://parser//lib/parser/lexer/literal.rb#232 def supports_line_continuation_via_slash?; end - # source://parser//lib/parser/lexer/literal.rb#118 + # source://parser//lib/parser/lexer/literal.rb#120 def type; end - # source://parser//lib/parser/lexer/literal.rb#93 + # source://parser//lib/parser/lexer/literal.rb#95 def words?; end protected - # source://parser//lib/parser/lexer/literal.rb#248 + # source://parser//lib/parser/lexer/literal.rb#263 def clear_buffer; end - # source://parser//lib/parser/lexer/literal.rb#244 + # source://parser//lib/parser/lexer/literal.rb#259 def coerce_encoding(string); end - # source://parser//lib/parser/lexer/literal.rb#236 + # source://parser//lib/parser/lexer/literal.rb#238 def delimiter?(delimiter); end - # source://parser//lib/parser/lexer/literal.rb#264 + # source://parser//lib/parser/lexer/literal.rb#279 def emit(token, type, s, e); end - # source://parser//lib/parser/lexer/literal.rb#259 + # source://parser//lib/parser/lexer/literal.rb#274 def emit_start_tok; end end # source://parser//lib/parser/lexer/literal.rb#7 Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) +# source://parser//lib/parser/lexer/literal.rb#8 +Parser::Lexer::Literal::SPACE = T.let(T.unsafe(nil), Integer) + # source://parser//lib/parser/lexer/literal.rb#9 +Parser::Lexer::Literal::TAB = T.let(T.unsafe(nil), Integer) + +# source://parser//lib/parser/lexer/literal.rb#11 Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) # Mapping of strings to parser tokens. # -# source://parser//lib/parser/lexer-F1.rb#14759 +# source://parser//lib/parser/lexer-F1.rb#14820 Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) -# source://parser//lib/parser/lexer-F1.rb#14779 +# source://parser//lib/parser/lexer-F1.rb#14840 Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) # source://parser//lib/parser/lexer/stack_state.rb#5 @@ -3200,7 +3196,7 @@ Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) # @api private # -# source://parser//lib/parser/messages.rb#107 +# source://parser//lib/parser/messages.rb#112 module Parser::Messages class << self # Formats the message, returns a raw template if there's nothing to interpolate @@ -3210,7 +3206,7 @@ module Parser::Messages # # @api private # - # source://parser//lib/parser/messages.rb#114 + # source://parser//lib/parser/messages.rb#119 def compile(reason, arguments); end end end @@ -3315,2027 +3311,235 @@ end # source://parser//lib/parser/rewriter.rb#91 Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) -# source://parser//lib/parser/ruby32.rb#14 -class Parser::Ruby32 < ::Parser::Base - # reduce 0 omitted - # - # source://parser//lib/parser/ruby32.rb#8421 - def _reduce_1(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8475 - def _reduce_10(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9110 - def _reduce_100(val, _values, result); end +# @api public +# +# source://parser//lib/parser.rb#30 +module Parser::Source; end - # reduce 101 omitted +# A buffer with source code. {Buffer} contains the source code itself, +# associated location information (name and first line), and takes care +# of encoding. +# +# A source buffer is immutable once populated. +# +# @api public +# +# source://parser//lib/parser/source/buffer.rb#25 +class Parser::Source::Buffer + # @api public + # @return [Buffer] a new instance of Buffer # - # source://parser//lib/parser/ruby32.rb#9119 - def _reduce_102(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9125 - def _reduce_103(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9131 - def _reduce_104(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9137 - def _reduce_105(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9143 - def _reduce_106(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9149 - def _reduce_107(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9155 - def _reduce_108(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9161 - def _reduce_109(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8481 - def _reduce_11(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9167 - def _reduce_110(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9177 - def _reduce_111(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9183 - def _reduce_112(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9193 - def _reduce_113(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9200 - def _reduce_114(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9207 - def _reduce_115(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9213 - def _reduce_116(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9219 - def _reduce_117(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9225 - def _reduce_118(val, _values, result); end + # source://parser//lib/parser/source/buffer.rb#105 + def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end - # source://parser//lib/parser/ruby32.rb#9231 - def _reduce_119(val, _values, result); end + # Convert a character index into the source to a column number. + # + # @api private + # @param position [Integer] + # @return [Integer] column + # + # source://parser//lib/parser/source/buffer.rb#242 + def column_for_position(position); end - # source://parser//lib/parser/ruby32.rb#8498 - def _reduce_12(val, _values, result); end + # Convert a character index into the source to a `[line, column]` tuple. + # + # @api public + # @param position [Integer] + # @return [[Integer, Integer]] `[line, column]` + # + # source://parser//lib/parser/source/buffer.rb#217 + def decompose_position(position); end - # source://parser//lib/parser/ruby32.rb#9237 - def _reduce_120(val, _values, result); end + # First line of the buffer, 1 by default. + # + # @api public + # @return [Integer] first line + # + # source://parser//lib/parser/source/buffer.rb#26 + def first_line; end - # source://parser//lib/parser/ruby32.rb#9243 - def _reduce_121(val, _values, result); end + # @api public + # + # source://parser//lib/parser/source/buffer.rb#312 + def freeze; end - # source://parser//lib/parser/ruby32.rb#9249 - def _reduce_122(val, _values, result); end + # @api public + # + # source://parser//lib/parser/source/buffer.rb#318 + def inspect; end - # source://parser//lib/parser/ruby32.rb#9256 - def _reduce_123(val, _values, result); end + # Number of last line in the buffer + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/buffer.rb#307 + def last_line; end - # source://parser//lib/parser/ruby32.rb#9263 - def _reduce_124(val, _values, result); end + # Convert a character index into the source to a line number. + # + # @api private + # @param position [Integer] + # @return [Integer] line + # + # source://parser//lib/parser/source/buffer.rb#231 + def line_for_position(position); end - # source://parser//lib/parser/ruby32.rb#9269 - def _reduce_125(val, _values, result); end + # Extract line `lineno` as a new `Range`, taking `first_line` into account. + # + # @api public + # @param lineno [Integer] + # @raise [IndexError] if `lineno` is out of bounds + # @return [Range] + # + # source://parser//lib/parser/source/buffer.rb#284 + def line_range(lineno); end - # reduce 126 omitted + # Buffer name. If the buffer was created from a file, the name corresponds + # to relative path to the file. # - # source://parser//lib/parser/ruby32.rb#9277 - def _reduce_127(val, _values, result); end + # @api public + # @return [String] buffer name + # + # source://parser//lib/parser/source/buffer.rb#26 + def name; end - # source://parser//lib/parser/ruby32.rb#9283 - def _reduce_128(val, _values, result); end + # Populate this buffer from a string without encoding autodetection. + # + # @api public + # @param input [String] + # @raise [ArgumentError] if already populated + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#180 + def raw_source=(input); end - # source://parser//lib/parser/ruby32.rb#9289 - def _reduce_129(val, _values, result); end + # Populate this buffer from correspondingly named file. + # + # @api public + # @example + # Parser::Source::Buffer.new('foo/bar.rb').read + # @raise [ArgumentError] if already populated + # @return [Buffer] self + # + # source://parser//lib/parser/source/buffer.rb#131 + def read; end - # source://parser//lib/parser/ruby32.rb#8504 - def _reduce_13(val, _values, result); end + # @api public + # + # source://parser//lib/parser/source/buffer.rb#194 + def slice(start, length = T.unsafe(nil)); end - # reduce 134 omitted + # Source code contained in this buffer. + # + # @api public + # @raise [RuntimeError] if buffer is not populated yet + # @return [String] source code # - # source://parser//lib/parser/ruby32.rb#9305 - def _reduce_135(val, _values, result); end + # source://parser//lib/parser/source/buffer.rb#145 + def source; end - # reduce 136 omitted + # Populate this buffer from a string with encoding autodetection. + # `input` is mutated if not frozen. + # + # @api public + # @param input [String] + # @raise [ArgumentError] if already populated + # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding + # @return [String] # - # source://parser//lib/parser/ruby32.rb#9313 - def _reduce_137(val, _values, result); end + # source://parser//lib/parser/source/buffer.rb#162 + def source=(input); end - # source://parser//lib/parser/ruby32.rb#9319 - def _reduce_138(val, _values, result); end + # Extract line `lineno` from source, taking `first_line` into account. + # + # @api public + # @param lineno [Integer] + # @raise [IndexError] if `lineno` is out of bounds + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#273 + def source_line(lineno); end - # source://parser//lib/parser/ruby32.rb#9325 - def _reduce_139(val, _values, result); end + # Return an `Array` of source code lines. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/source/buffer.rb#252 + def source_lines; end - # source://parser//lib/parser/ruby32.rb#8510 - def _reduce_14(val, _values, result); end + # @api public + # @return [Range] A range covering the whole source + # + # source://parser//lib/parser/source/buffer.rb#298 + def source_range; end - # source://parser//lib/parser/ruby32.rb#8516 - def _reduce_15(val, _values, result); end + private - # source://parser//lib/parser/ruby32.rb#8522 - def _reduce_16(val, _values, result); end + # @api public + # + # source://parser//lib/parser/source/buffer.rb#348 + def bsearch(line_begins, position); end - # reduce 17 omitted + # @api public # - # source://parser//lib/parser/ruby32.rb#8530 - def _reduce_18(val, _values, result); end + # source://parser//lib/parser/source/buffer.rb#325 + def line_begins; end - # source://parser//lib/parser/ruby32.rb#8536 - def _reduce_19(val, _values, result); end + # @api public + # + # source://parser//lib/parser/source/buffer.rb#339 + def line_index_for_position(position); end - # source://parser//lib/parser/ruby32.rb#8428 - def _reduce_2(val, _values, result); end + class << self + # Try to recognize encoding of `string` as Ruby would, i.e. by looking for + # magic encoding comment or UTF-8 BOM. `string` can be in any encoding. + # + # @api public + # @param string [String] + # @return [String, nil] encoding name, if recognized + # + # source://parser//lib/parser/source/buffer.rb#51 + def recognize_encoding(string); end - # source://parser//lib/parser/ruby32.rb#8542 - def _reduce_20(val, _values, result); end + # Recognize encoding of `input` and process it so it could be lexed. + # + # * If `input` does not contain BOM or magic encoding comment, it is + # kept in the original encoding. + # * If the detected encoding is binary, `input` is kept in binary. + # * Otherwise, `input` is re-encoded into UTF-8 and returned as a + # new string. + # + # This method mutates the encoding of `input`, but not its content. + # + # @api public + # @param input [String] + # @raise [EncodingError] + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#90 + def reencode_string(input); end + end +end - # source://parser//lib/parser/ruby32.rb#8548 - def _reduce_21(val, _values, result); end +# @api private +# +# source://parser//lib/parser/source/buffer.rb#31 +Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) - # reduce 210 omitted +# A comment in the source code. +# +# @api public +# +# source://parser//lib/parser/source/comment.rb#17 +class Parser::Source::Comment + # @api public + # @param range [Parser::Source::Range] + # @return [Comment] a new instance of Comment # - # source://parser//lib/parser/ruby32.rb#9473 - def _reduce_211(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9479 - def _reduce_212(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9485 - def _reduce_213(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9494 - def _reduce_214(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9503 - def _reduce_215(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9512 - def _reduce_216(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9521 - def _reduce_217(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9529 - def _reduce_218(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9537 - def _reduce_219(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8556 - def _reduce_22(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9543 - def _reduce_220(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9549 - def _reduce_221(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9555 - def _reduce_222(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9561 - def _reduce_223(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9567 - def _reduce_224(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9573 - def _reduce_225(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9579 - def _reduce_226(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9585 - def _reduce_227(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9591 - def _reduce_228(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9597 - def _reduce_229(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8564 - def _reduce_23(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9603 - def _reduce_230(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9609 - def _reduce_231(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9615 - def _reduce_232(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9623 - def _reduce_233(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9629 - def _reduce_234(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9635 - def _reduce_235(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9641 - def _reduce_236(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9647 - def _reduce_237(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9653 - def _reduce_238(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8570 - def _reduce_24(val, _values, result); end - - # reduce 239 omitted - # - # source://parser//lib/parser/ruby32.rb#9661 - def _reduce_240(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9667 - def _reduce_241(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9673 - def _reduce_242(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9679 - def _reduce_243(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9685 - def _reduce_244(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9691 - def _reduce_245(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9697 - def _reduce_246(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9703 - def _reduce_247(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9709 - def _reduce_248(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9715 - def _reduce_249(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8576 - def _reduce_25(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9721 - def _reduce_250(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9727 - def _reduce_251(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9733 - def _reduce_252(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9740 - def _reduce_253(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9747 - def _reduce_254(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9761 - def _reduce_255(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9781 - def _reduce_256(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9795 - def _reduce_257(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8583 - def _reduce_26(val, _values, result); end - - # reduce 262 omitted - # - # source://parser//lib/parser/ruby32.rb#9825 - def _reduce_263(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9831 - def _reduce_264(val, _values, result); end - - # reduce 267 omitted - # - # source://parser//lib/parser/ruby32.rb#9843 - def _reduce_268(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9849 - def _reduce_269(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8590 - def _reduce_27(val, _values, result); end - - # reduce 270 omitted - # - # source://parser//lib/parser/ruby32.rb#9857 - def _reduce_271(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9867 - def _reduce_272(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9873 - def _reduce_273(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9883 - def _reduce_274(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9893 - def _reduce_275(val, _values, result); end - - # reduce 276 omitted - # - # source://parser//lib/parser/ruby32.rb#9901 - def _reduce_277(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8596 - def _reduce_28(val, _values, result); end - - # reduce 279 omitted - # - # source://parser//lib/parser/ruby32.rb#9911 - def _reduce_280(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9917 - def _reduce_281(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9923 - def _reduce_282(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9929 - def _reduce_283(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9935 - def _reduce_284(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9942 - def _reduce_285(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9950 - def _reduce_286(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9956 - def _reduce_287(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9983 - def _reduce_288(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10004 - def _reduce_289(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8602 - def _reduce_29(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10010 - def _reduce_290(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10020 - def _reduce_291(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10026 - def _reduce_292(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10032 - def _reduce_293(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10038 - def _reduce_294(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10044 - def _reduce_295(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10054 - def _reduce_296(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10060 - def _reduce_297(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10066 - def _reduce_298(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10076 - def _reduce_299(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8437 - def _reduce_3(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8612 - def _reduce_30(val, _values, result); end - - # reduce 300 omitted - # - # source://parser//lib/parser/ruby32.rb#10084 - def _reduce_301(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10090 - def _reduce_302(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10096 - def _reduce_303(val, _values, result); end - - # reduce 313 omitted - # - # source://parser//lib/parser/ruby32.rb#10122 - def _reduce_314(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10128 - def _reduce_315(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10134 - def _reduce_316(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10142 - def _reduce_317(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10148 - def _reduce_318(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10154 - def _reduce_319(val, _values, result); end - - # reduce 31 omitted - # - # source://parser//lib/parser/ruby32.rb#8620 - def _reduce_32(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10160 - def _reduce_320(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10166 - def _reduce_321(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10172 - def _reduce_322(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10178 - def _reduce_323(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10184 - def _reduce_324(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10190 - def _reduce_325(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10196 - def _reduce_326(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10202 - def _reduce_327(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10208 - def _reduce_328(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10214 - def _reduce_329(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8626 - def _reduce_33(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10220 - def _reduce_330(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10226 - def _reduce_331(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10234 - def _reduce_332(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10240 - def _reduce_333(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10246 - def _reduce_334(val, _values, result); end - - # reduce 335 omitted - # - # source://parser//lib/parser/ruby32.rb#10258 - def _reduce_336(val, _values, result); end - - # reduce 337 omitted - # - # source://parser//lib/parser/ruby32.rb#10268 - def _reduce_338(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10277 - def _reduce_339(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8633 - def _reduce_34(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10286 - def _reduce_340(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10292 - def _reduce_341(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10298 - def _reduce_342(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10308 - def _reduce_343(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10318 - def _reduce_344(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10328 - def _reduce_345(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10334 - def _reduce_346(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10341 - def _reduce_347(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10357 - def _reduce_348(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10365 - def _reduce_349(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8644 - def _reduce_35(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10377 - def _reduce_350(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10384 - def _reduce_351(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10398 - def _reduce_352(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10410 - def _reduce_353(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10422 - def _reduce_354(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10428 - def _reduce_355(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10434 - def _reduce_356(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10440 - def _reduce_357(val, _values, result); end - - # reduce 358 omitted - # - # source://parser//lib/parser/ruby32.rb#10448 - def _reduce_359(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10454 - def _reduce_360(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10460 - def _reduce_361(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10467 - def _reduce_362(val, _values, result); end - - # reduce 364 omitted - # - # source://parser//lib/parser/ruby32.rb#10479 - def _reduce_365(val, _values, result); end - - # reduce 368 omitted - # - # source://parser//lib/parser/ruby32.rb#10491 - def _reduce_369(val, _values, result); end - - # reduce 36 omitted - # - # source://parser//lib/parser/ruby32.rb#8652 - def _reduce_37(val, _values, result); end - - # reduce 370 omitted - # - # source://parser//lib/parser/ruby32.rb#10504 - def _reduce_371(val, _values, result); end - - # reduce 373 omitted - # - # source://parser//lib/parser/ruby32.rb#10514 - def _reduce_374(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10520 - def _reduce_375(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10526 - def _reduce_376(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10532 - def _reduce_377(val, _values, result); end - - # reduce 378 omitted - # - # source://parser//lib/parser/ruby32.rb#10540 - def _reduce_379(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8658 - def _reduce_38(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10547 - def _reduce_380(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10555 - def _reduce_381(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10561 - def _reduce_382(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10567 - def _reduce_383(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10573 - def _reduce_384(val, _values, result); end - - # reduce 386 omitted - # - # source://parser//lib/parser/ruby32.rb#10583 - def _reduce_387(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10589 - def _reduce_388(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10595 - def _reduce_389(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8664 - def _reduce_39(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10601 - def _reduce_390(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10607 - def _reduce_391(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10613 - def _reduce_392(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10619 - def _reduce_393(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10625 - def _reduce_394(val, _values, result); end - - # reduce 395 omitted - # - # source://parser//lib/parser/ruby32.rb#10633 - def _reduce_396(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10642 - def _reduce_397(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10652 - def _reduce_398(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10660 - def _reduce_399(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8443 - def _reduce_4(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8673 - def _reduce_40(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10669 - def _reduce_400(val, _values, result); end - - # reduce 401 omitted - # - # source://parser//lib/parser/ruby32.rb#10679 - def _reduce_402(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10688 - def _reduce_403(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10698 - def _reduce_404(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10706 - def _reduce_405(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10715 - def _reduce_406(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10722 - def _reduce_407(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10730 - def _reduce_408(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10737 - def _reduce_409(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8682 - def _reduce_41(val, _values, result); end - - # reduce 410 omitted - # - # source://parser//lib/parser/ruby32.rb#10747 - def _reduce_411(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10753 - def _reduce_412(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10759 - def _reduce_413(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10768 - def _reduce_414(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10777 - def _reduce_415(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10783 - def _reduce_416(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10789 - def _reduce_417(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10795 - def _reduce_418(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10801 - def _reduce_419(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8691 - def _reduce_42(val, _values, result); end - - # reduce 420 omitted - # - # source://parser//lib/parser/ruby32.rb#10810 - def _reduce_421(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10819 - def _reduce_422(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10825 - def _reduce_423(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10841 - def _reduce_424(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10849 - def _reduce_425(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10859 - def _reduce_426(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10866 - def _reduce_427(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10873 - def _reduce_428(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10880 - def _reduce_429(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8699 - def _reduce_43(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10887 - def _reduce_430(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10894 - def _reduce_431(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10901 - def _reduce_432(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10909 - def _reduce_433(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10917 - def _reduce_434(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10929 - def _reduce_435(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10940 - def _reduce_436(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10948 - def _reduce_437(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10956 - def _reduce_438(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10964 - def _reduce_439(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8708 - def _reduce_44(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10970 - def _reduce_440(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10978 - def _reduce_441(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10986 - def _reduce_442(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10994 - def _reduce_443(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11000 - def _reduce_444(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11006 - def _reduce_445(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11013 - def _reduce_446(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11020 - def _reduce_447(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11027 - def _reduce_448(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11034 - def _reduce_449(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8722 - def _reduce_45(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11041 - def _reduce_450(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11051 - def _reduce_451(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11058 - def _reduce_452(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11064 - def _reduce_453(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11075 - def _reduce_454(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11082 - def _reduce_455(val, _values, result); end - - # reduce 456 omitted - # - # source://parser//lib/parser/ruby32.rb#11090 - def _reduce_457(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11102 - def _reduce_458(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11110 - def _reduce_459(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8742 - def _reduce_46(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11117 - def _reduce_460(val, _values, result); end - - # reduce 461 omitted - # - # source://parser//lib/parser/ruby32.rb#11125 - def _reduce_462(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11131 - def _reduce_463(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11137 - def _reduce_464(val, _values, result); end - - # reduce 465 omitted - # - # source://parser//lib/parser/ruby32.rb#11145 - def _reduce_466(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11155 - def _reduce_467(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11161 - def _reduce_468(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11167 - def _reduce_469(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8756 - def _reduce_47(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11173 - def _reduce_470(val, _values, result); end - - # reduce 471 omitted - # - # source://parser//lib/parser/ruby32.rb#11181 - def _reduce_472(val, _values, result); end - - # reduce 473 omitted - # - # source://parser//lib/parser/ruby32.rb#11189 - def _reduce_474(val, _values, result); end - - # reduce 475 omitted - # - # source://parser//lib/parser/ruby32.rb#11197 - def _reduce_476(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11204 - def _reduce_477(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8776 - def _reduce_48(val, _values, result); end - - # reduce 479 omitted - # - # source://parser//lib/parser/ruby32.rb#11215 - def _reduce_480(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11223 - def _reduce_481(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11231 - def _reduce_482(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11239 - def _reduce_483(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11246 - def _reduce_484(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11254 - def _reduce_485(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11262 - def _reduce_486(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11270 - def _reduce_487(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11277 - def _reduce_488(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11283 - def _reduce_489(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11289 - def _reduce_490(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11295 - def _reduce_491(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11303 - def _reduce_492(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11311 - def _reduce_493(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11317 - def _reduce_494(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11323 - def _reduce_495(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11330 - def _reduce_496(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11336 - def _reduce_497(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11342 - def _reduce_498(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11348 - def _reduce_499(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8449 - def _reduce_5(val, _values, result); end - - # reduce 49 omitted - # - # source://parser//lib/parser/ruby32.rb#8784 - def _reduce_50(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11354 - def _reduce_500(val, _values, result); end - - # reduce 501 omitted - # - # source://parser//lib/parser/ruby32.rb#11362 - def _reduce_502(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11372 - def _reduce_503(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11382 - def _reduce_504(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11388 - def _reduce_505(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11394 - def _reduce_506(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11400 - def _reduce_507(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11406 - def _reduce_508(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11412 - def _reduce_509(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11418 - def _reduce_510(val, _values, result); end - - # reduce 511 omitted - # - # source://parser//lib/parser/ruby32.rb#11426 - def _reduce_512(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11432 - def _reduce_513(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11438 - def _reduce_514(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11444 - def _reduce_515(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11450 - def _reduce_516(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11456 - def _reduce_517(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11462 - def _reduce_518(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11468 - def _reduce_519(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11474 - def _reduce_520(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11480 - def _reduce_521(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11486 - def _reduce_522(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11492 - def _reduce_523(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11498 - def _reduce_524(val, _values, result); end - - # reduce 525 omitted - # - # source://parser//lib/parser/ruby32.rb#11506 - def _reduce_526(val, _values, result); end - - # reduce 527 omitted - # - # source://parser//lib/parser/ruby32.rb#11514 - def _reduce_528(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11520 - def _reduce_529(val, _values, result); end - - # reduce 52 omitted - # - # source://parser//lib/parser/ruby32.rb#8798 - def _reduce_53(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11526 - def _reduce_530(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11532 - def _reduce_531(val, _values, result); end - - # reduce 534 omitted - # - # source://parser//lib/parser/ruby32.rb#11544 - def _reduce_535(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11550 - def _reduce_536(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8804 - def _reduce_54(val, _values, result); end - - # reduce 544 omitted - # - # source://parser//lib/parser/ruby32.rb#11572 - def _reduce_545(val, _values, result); end - - # reduce 546 omitted - # - # source://parser//lib/parser/ruby32.rb#11580 - def _reduce_547(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11586 - def _reduce_548(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11598 - def _reduce_549(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8810 - def _reduce_55(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11605 - def _reduce_550(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11612 - def _reduce_551(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11618 - def _reduce_552(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11624 - def _reduce_553(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11630 - def _reduce_554(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11645 - def _reduce_555(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11651 - def _reduce_556(val, _values, result); end - - # reduce 558 omitted - # - # source://parser//lib/parser/ruby32.rb#11661 - def _reduce_559(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8816 - def _reduce_56(val, _values, result); end - - # reduce 560 omitted - # - # source://parser//lib/parser/ruby32.rb#11669 - def _reduce_561(val, _values, result); end - - # reduce 564 omitted - # - # source://parser//lib/parser/ruby32.rb#11681 - def _reduce_565(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11687 - def _reduce_566(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11693 - def _reduce_567(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11699 - def _reduce_568(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11706 - def _reduce_569(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8822 - def _reduce_57(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11713 - def _reduce_570(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11719 - def _reduce_571(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11726 - def _reduce_572(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11733 - def _reduce_573(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11739 - def _reduce_574(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11745 - def _reduce_575(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11751 - def _reduce_576(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11757 - def _reduce_577(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11763 - def _reduce_578(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11769 - def _reduce_579(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8834 - def _reduce_58(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11775 - def _reduce_580(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11781 - def _reduce_581(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11787 - def _reduce_582(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11793 - def _reduce_583(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11799 - def _reduce_584(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11805 - def _reduce_585(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11811 - def _reduce_586(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11817 - def _reduce_587(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11823 - def _reduce_588(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11829 - def _reduce_589(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8843 - def _reduce_59(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11835 - def _reduce_590(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11841 - def _reduce_591(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11847 - def _reduce_592(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11853 - def _reduce_593(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11859 - def _reduce_594(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11865 - def _reduce_595(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11872 - def _reduce_596(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11881 - def _reduce_597(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11887 - def _reduce_598(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11893 - def _reduce_599(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8455 - def _reduce_6(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8855 - def _reduce_60(val, _values, result); end - - # reduce 602 omitted - # - # source://parser//lib/parser/ruby32.rb#11905 - def _reduce_603(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11912 - def _reduce_604(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11919 - def _reduce_605(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11925 - def _reduce_606(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11936 - def _reduce_607(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11943 - def _reduce_608(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11950 - def _reduce_609(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11957 - def _reduce_610(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11964 - def _reduce_611(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11970 - def _reduce_612(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11976 - def _reduce_613(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11982 - def _reduce_614(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11988 - def _reduce_615(val, _values, result); end - - # reduce 616 omitted - # - # source://parser//lib/parser/ruby32.rb#11996 - def _reduce_617(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12002 - def _reduce_618(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12008 - def _reduce_619(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12014 - def _reduce_620(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12020 - def _reduce_621(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12026 - def _reduce_622(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12032 - def _reduce_623(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12038 - def _reduce_624(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12044 - def _reduce_625(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12050 - def _reduce_626(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12056 - def _reduce_627(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12062 - def _reduce_628(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12068 - def _reduce_629(val, _values, result); end - - # reduce 62 omitted - # - # source://parser//lib/parser/ruby32.rb#8868 - def _reduce_63(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12074 - def _reduce_630(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12080 - def _reduce_631(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12086 - def _reduce_632(val, _values, result); end - - # reduce 633 omitted - # - # source://parser//lib/parser/ruby32.rb#12094 - def _reduce_634(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12101 - def _reduce_635(val, _values, result); end - - # reduce 636 omitted - # - # source://parser//lib/parser/ruby32.rb#12112 - def _reduce_637(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12120 - def _reduce_638(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12128 - def _reduce_639(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8874 - def _reduce_64(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12134 - def _reduce_640(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12140 - def _reduce_641(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12146 - def _reduce_642(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12152 - def _reduce_643(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12159 - def _reduce_644(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12165 - def _reduce_645(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12171 - def _reduce_646(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12180 - def _reduce_647(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12190 - def _reduce_648(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12198 - def _reduce_649(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8881 - def _reduce_65(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12207 - def _reduce_650(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12215 - def _reduce_651(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12224 - def _reduce_652(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12231 - def _reduce_653(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12239 - def _reduce_654(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12248 - def _reduce_655(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12255 - def _reduce_656(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12263 - def _reduce_657(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12270 - def _reduce_658(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12278 - def _reduce_659(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8891 - def _reduce_66(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12284 - def _reduce_660(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12290 - def _reduce_661(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12296 - def _reduce_662(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12302 - def _reduce_663(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12308 - def _reduce_664(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12314 - def _reduce_665(val, _values, result); end - - # reduce 666 omitted - # - # source://parser//lib/parser/ruby32.rb#12322 - def _reduce_667(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12332 - def _reduce_668(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12339 - def _reduce_669(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8897 - def _reduce_67(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12346 - def _reduce_670(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12352 - def _reduce_671(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12358 - def _reduce_672(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12364 - def _reduce_673(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12379 - def _reduce_674(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12387 - def _reduce_675(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12395 - def _reduce_676(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12402 - def _reduce_677(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12409 - def _reduce_678(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12415 - def _reduce_679(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8904 - def _reduce_68(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12421 - def _reduce_680(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12427 - def _reduce_681(val, _values, result); end - - # reduce 683 omitted - # - # source://parser//lib/parser/ruby32.rb#12437 - def _reduce_684(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12443 - def _reduce_685(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12451 - def _reduce_686(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12459 - def _reduce_687(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12467 - def _reduce_688(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12475 - def _reduce_689(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12481 - def _reduce_690(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12487 - def _reduce_691(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12493 - def _reduce_692(val, _values, result); end - - # reduce 694 omitted - # - # source://parser//lib/parser/ruby32.rb#12503 - def _reduce_695(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12511 - def _reduce_696(val, _values, result); end - - # reduce 698 omitted - # - # source://parser//lib/parser/ruby32.rb#12523 - def _reduce_699(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8461 - def _reduce_7(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12531 - def _reduce_700(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12539 - def _reduce_701(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12545 - def _reduce_702(val, _values, result); end - - # reduce 703 omitted - # - # source://parser//lib/parser/ruby32.rb#12553 - def _reduce_704(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12559 - def _reduce_705(val, _values, result); end - - # reduce 706 omitted - # - # source://parser//lib/parser/ruby32.rb#12567 - def _reduce_707(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12573 - def _reduce_708(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12579 - def _reduce_709(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12585 - def _reduce_710(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12591 - def _reduce_711(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12597 - def _reduce_712(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12603 - def _reduce_713(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12609 - def _reduce_714(val, _values, result); end - - # reduce 71 omitted - # - # source://parser//lib/parser/ruby32.rb#8916 - def _reduce_72(val, _values, result); end - - # reduce 724 omitted - # - # source://parser//lib/parser/ruby32.rb#12639 - def _reduce_725(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12645 - def _reduce_726(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8923 - def _reduce_73(val, _values, result); end - - # reduce 730 omitted - # - # source://parser//lib/parser/ruby32.rb#12659 - def _reduce_731(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12665 - def _reduce_732(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12671 - def _reduce_733(val, _values, result); end - - # reduce 735 omitted - # - # source://parser//lib/parser/ruby32.rb#12681 - def _reduce_736(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8930 - def _reduce_74(val, _values, result); end - - # reduce 739 omitted - # - # source://parser//lib/parser/ruby32.rb#12693 - def _reduce_740(val, _values, result); end - - # reduce 75 omitted - # - # source://parser//lib/parser/ruby32.rb#8939 - def _reduce_76(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8946 - def _reduce_77(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8957 - def _reduce_78(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8964 - def _reduce_79(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8975 - def _reduce_80(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8982 - def _reduce_81(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8993 - def _reduce_82(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9000 - def _reduce_83(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9007 - def _reduce_84(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9014 - def _reduce_85(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9021 - def _reduce_86(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9028 - def _reduce_87(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9034 - def _reduce_88(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9040 - def _reduce_89(val, _values, result); end - - # reduce 8 omitted - # - # source://parser//lib/parser/ruby32.rb#8469 - def _reduce_9(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9046 - def _reduce_90(val, _values, result); end - - # reduce 91 omitted - # - # source://parser//lib/parser/ruby32.rb#9054 - def _reduce_92(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9061 - def _reduce_93(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9068 - def _reduce_94(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9076 - def _reduce_95(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9083 - def _reduce_96(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9091 - def _reduce_97(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9097 - def _reduce_98(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9104 - def _reduce_99(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12699 - def _reduce_none(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#21 - def default_encoding; end - - # source://parser//lib/parser/ruby32.rb#25 - def endless_method_name(name_t); end - - # source://parser//lib/parser/ruby32.rb#38 - def local_pop; end - - # source://parser//lib/parser/ruby32.rb#31 - def local_push; end - - # source://parser//lib/parser/ruby32.rb#45 - def try_declare_numparam(node); end - - # source://parser//lib/parser/ruby32.rb#17 - def version; end -end - -# source://parser//lib/parser/ruby32.rb#8008 -Parser::Ruby32::Racc_arg = T.let(T.unsafe(nil), Array) - -# source://parser//lib/parser/ruby32.rb#8415 -Parser::Ruby32::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) - -# source://parser//lib/parser/ruby32.rb#8025 -Parser::Ruby32::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) - -# @api public -# -# source://parser//lib/parser.rb#30 -module Parser::Source; end - -# A buffer with source code. {Buffer} contains the source code itself, -# associated location information (name and first line), and takes care -# of encoding. -# -# A source buffer is immutable once populated. -# -# @api public -# -# source://parser//lib/parser/source/buffer.rb#25 -class Parser::Source::Buffer - # @api public - # @return [Buffer] a new instance of Buffer - # - # source://parser//lib/parser/source/buffer.rb#105 - def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end - - # Convert a character index into the source to a column number. - # - # @api private - # @param position [Integer] - # @return [Integer] column - # - # source://parser//lib/parser/source/buffer.rb#242 - def column_for_position(position); end - - # Convert a character index into the source to a `[line, column]` tuple. - # - # @api public - # @param position [Integer] - # @return [[Integer, Integer]] `[line, column]` - # - # source://parser//lib/parser/source/buffer.rb#217 - def decompose_position(position); end - - # First line of the buffer, 1 by default. - # - # @api public - # @return [Integer] first line - # - # source://parser//lib/parser/source/buffer.rb#26 - def first_line; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#312 - def freeze; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#318 - def inspect; end - - # Number of last line in the buffer - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/buffer.rb#307 - def last_line; end - - # Convert a character index into the source to a line number. - # - # @api private - # @param position [Integer] - # @return [Integer] line - # - # source://parser//lib/parser/source/buffer.rb#231 - def line_for_position(position); end - - # Extract line `lineno` as a new `Range`, taking `first_line` into account. - # - # @api public - # @param lineno [Integer] - # @raise [IndexError] if `lineno` is out of bounds - # @return [Range] - # - # source://parser//lib/parser/source/buffer.rb#284 - def line_range(lineno); end - - # Buffer name. If the buffer was created from a file, the name corresponds - # to relative path to the file. - # - # @api public - # @return [String] buffer name - # - # source://parser//lib/parser/source/buffer.rb#26 - def name; end - - # Populate this buffer from a string without encoding autodetection. - # - # @api public - # @param input [String] - # @raise [ArgumentError] if already populated - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#180 - def raw_source=(input); end - - # Populate this buffer from correspondingly named file. - # - # @api public - # @example - # Parser::Source::Buffer.new('foo/bar.rb').read - # @raise [ArgumentError] if already populated - # @return [Buffer] self - # - # source://parser//lib/parser/source/buffer.rb#131 - def read; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#194 - def slice(start, length = T.unsafe(nil)); end - - # Source code contained in this buffer. - # - # @api public - # @raise [RuntimeError] if buffer is not populated yet - # @return [String] source code - # - # source://parser//lib/parser/source/buffer.rb#145 - def source; end - - # Populate this buffer from a string with encoding autodetection. - # `input` is mutated if not frozen. - # - # @api public - # @param input [String] - # @raise [ArgumentError] if already populated - # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#162 - def source=(input); end - - # Extract line `lineno` from source, taking `first_line` into account. - # - # @api public - # @param lineno [Integer] - # @raise [IndexError] if `lineno` is out of bounds - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#273 - def source_line(lineno); end - - # Return an `Array` of source code lines. - # - # @api public - # @return [Array] - # - # source://parser//lib/parser/source/buffer.rb#252 - def source_lines; end - - # @api public - # @return [Range] A range covering the whole source - # - # source://parser//lib/parser/source/buffer.rb#298 - def source_range; end - - private - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#348 - def bsearch(line_begins, position); end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#325 - def line_begins; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#339 - def line_index_for_position(position); end - - class << self - # Try to recognize encoding of `string` as Ruby would, i.e. by looking for - # magic encoding comment or UTF-8 BOM. `string` can be in any encoding. - # - # @api public - # @param string [String] - # @return [String, nil] encoding name, if recognized - # - # source://parser//lib/parser/source/buffer.rb#51 - def recognize_encoding(string); end - - # Recognize encoding of `input` and process it so it could be lexed. - # - # * If `input` does not contain BOM or magic encoding comment, it is - # kept in the original encoding. - # * If the detected encoding is binary, `input` is kept in binary. - # * Otherwise, `input` is re-encoded into UTF-8 and returned as a - # new string. - # - # This method mutates the encoding of `input`, but not its content. - # - # @api public - # @param input [String] - # @raise [EncodingError] - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#90 - def reencode_string(input); end - end -end - -# @api private -# -# source://parser//lib/parser/source/buffer.rb#31 -Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) - -# A comment in the source code. -# -# @api public -# -# source://parser//lib/parser/source/comment.rb#17 -class Parser::Source::Comment - # @api public - # @param range [Parser::Source::Range] - # @return [Comment] a new instance of Comment - # - # source://parser//lib/parser/source/comment.rb#67 - def initialize(range); end + # source://parser//lib/parser/source/comment.rb#67 + def initialize(range); end # Compares comments. Two comments are equal if they # correspond to the same source range. @@ -5452,7 +3656,7 @@ class Parser::Source::Comment::Associator # source://parser//lib/parser/source/comment/associator.rb#115 def associate_by_identity; end - # source://parser//lib/parser/source/comment/associator.rb#103 + # source://parser//lib/parser/source/comment/associator.rb#104 def associate_locations; end # source://parser//lib/parser/source/comment/associator.rb#46 @@ -7020,10 +5224,10 @@ class Parser::StaticEnvironment # source://parser//lib/parser/static_environment.rb#58 def declare_anonymous_blockarg; end - # source://parser//lib/parser/static_environment.rb#74 + # source://parser//lib/parser/static_environment.rb#82 def declare_anonymous_kwrestarg; end - # source://parser//lib/parser/static_environment.rb#66 + # source://parser//lib/parser/static_environment.rb#70 def declare_anonymous_restarg; end # source://parser//lib/parser/static_environment.rb#50 @@ -7041,12 +5245,12 @@ class Parser::StaticEnvironment # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#78 + # source://parser//lib/parser/static_environment.rb#86 def declared_anonymous_kwrestarg?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#70 + # source://parser//lib/parser/static_environment.rb#74 def declared_anonymous_restarg?; end # @return [Boolean] @@ -7056,7 +5260,7 @@ class Parser::StaticEnvironment # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#82 + # source://parser//lib/parser/static_environment.rb#94 def empty?; end # source://parser//lib/parser/static_environment.rb#27 @@ -7065,6 +5269,21 @@ class Parser::StaticEnvironment # source://parser//lib/parser/static_environment.rb#20 def extend_static; end + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#66 + def parent_has_anonymous_blockarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#90 + def parent_has_anonymous_kwrestarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#78 + def parent_has_anonymous_restarg?; end + # source://parser//lib/parser/static_environment.rb#15 def reset; end diff --git a/sorbet/rbi/gems/prism@0.24.0.rbi b/sorbet/rbi/gems/prism@0.24.0.rbi new file mode 100644 index 000000000..07688d12c --- /dev/null +++ b/sorbet/rbi/gems/prism@0.24.0.rbi @@ -0,0 +1,31040 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `prism` gem. +# Please instead update this file by running `bin/tapioca gem prism`. + +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism.rbi.erb +# if you are looking to modify the template +# =end + +# The Prism Ruby parser. +# +# "Parsing Ruby is suddenly manageable!" +# - You, hopefully +# +# source://prism//lib/prism.rb#8 +module Prism + class << self + # Mirror the Prism.dump API by using the serialization API. + def dump(*_arg0); end + + # Mirror the Prism.dump_file API by using the serialization API. + def dump_file(*_arg0); end + + # Mirror the Prism.lex API by using the serialization API. + def lex(*_arg0); end + + # :call-seq: + # Prism::lex_compat(source, **options) -> ParseResult + # + # Returns a parse result whose value is an array of tokens that closely + # resembles the return value of Ripper::lex. The main difference is that the + # `:on_sp` token is not emitted. + # + # For supported options, see Prism::parse. + # + # source://prism//lib/prism.rb#46 + def lex_compat(source, **options); end + + # Mirror the Prism.lex_file API by using the serialization API. + def lex_file(*_arg0); end + + # :call-seq: + # Prism::lex_ripper(source) -> Array + # + # This lexes with the Ripper lex. It drops any space events but otherwise + # returns the same tokens. Raises SyntaxError if the syntax in source is + # invalid. + # + # source://prism//lib/prism.rb#56 + def lex_ripper(source); end + + # :call-seq: + # Prism::load(source, serialized) -> ParseResult + # + # Load the serialized AST using the source as a reference into a tree. + # + # source://prism//lib/prism.rb#64 + def load(source, serialized); end + + # Mirror the Prism.parse API by using the serialization API. + def parse(*_arg0); end + + # Mirror the Prism.parse_comments API by using the serialization API. + def parse_comments(*_arg0); end + + # :call-seq: + # Prism::parse_failure?(source, **options) -> bool + # + # Returns true if the source parses with errors. + # + # @return [Boolean] + # + # source://prism//lib/prism.rb#72 + def parse_failure?(source, **options); end + + # Mirror the Prism.parse_file API by using the serialization API. This uses + # native strings instead of Ruby strings because it allows us to use mmap when + # it is available. + def parse_file(*_arg0); end + + # Mirror the Prism.parse_file_comments API by using the serialization + # API. This uses native strings instead of Ruby strings because it allows us + # to use mmap when it is available. + def parse_file_comments(*_arg0); end + + # :call-seq: + # Prism::parse_file_failure?(filepath, **options) -> bool + # + # Returns true if the file at filepath parses with errors. + # + # @return [Boolean] + # + # source://prism//lib/prism.rb#80 + def parse_file_failure?(filepath, **options); end + + # Mirror the Prism.parse_file_success? API by using the serialization API. + # + # @return [Boolean] + def parse_file_success?(*_arg0); end + + # Mirror the Prism.parse_lex API by using the serialization API. + def parse_lex(*_arg0); end + + # Mirror the Prism.parse_lex_file API by using the serialization API. + def parse_lex_file(*_arg0); end + + # Mirror the Prism.parse_success? API by using the serialization API. + # + # @return [Boolean] + def parse_success?(*_arg0); end + end +end + +# Represents the use of the `alias` keyword to alias a global variable. +# +# alias $foo $bar +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#97 +class Prism::AliasGlobalVariableNode < ::Prism::Node + # def initialize: (Node new_name, Node old_name, Location keyword_loc, Location location) -> void + # + # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode + # + # source://prism//lib/prism/node.rb#99 + def initialize(source, new_name, old_name, keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#109 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#114 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#124 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#119 + def compact_child_nodes; end + + # def copy: (**params) -> AliasGlobalVariableNode + # + # source://prism//lib/prism/node.rb#129 + sig { params(params: T.untyped).returns(Prism::AliasGlobalVariableNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#114 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Node, old_name: Node, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#143 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#166 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#161 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#154 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader new_name: Node + # + # source://prism//lib/prism/node.rb#148 + sig { returns(Prism::Node) } + def new_name; end + + # attr_reader old_name: Node + # + # source://prism//lib/prism/node.rb#151 + 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. + # + # 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#190 + 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#200 + def type; end + end +end + +# Represents the use of the `alias` keyword to alias a method. +# +# alias foo bar +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#209 +class Prism::AliasMethodNode < ::Prism::Node + # def initialize: (Node new_name, Node old_name, Location keyword_loc, Location location) -> void + # + # @return [AliasMethodNode] a new instance of AliasMethodNode + # + # source://prism//lib/prism/node.rb#211 + def initialize(source, new_name, old_name, keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#221 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#226 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#236 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#231 + def compact_child_nodes; end + + # def copy: (**params) -> AliasMethodNode + # + # source://prism//lib/prism/node.rb#241 + sig { params(params: T.untyped).returns(Prism::AliasMethodNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#226 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Node, old_name: Node, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#255 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#278 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#273 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#266 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader new_name: Node + # + # source://prism//lib/prism/node.rb#260 + sig { returns(Prism::Node) } + def new_name; end + + # attr_reader old_name: Node + # + # source://prism//lib/prism/node.rb#263 + 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. + # + # 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#302 + 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#312 + def type; end + end +end + +# Represents an alternation pattern in pattern matching. +# +# foo => bar | baz +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#321 +class Prism::AlternationPatternNode < ::Prism::Node + # def initialize: (Node left, Node right, Location operator_loc, Location location) -> void + # + # @return [AlternationPatternNode] a new instance of AlternationPatternNode + # + # source://prism//lib/prism/node.rb#323 + def initialize(source, left, right, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#333 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#338 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#348 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#343 + def compact_child_nodes; end + + # def copy: (**params) -> AlternationPatternNode + # + # source://prism//lib/prism/node.rb#353 + sig { params(params: T.untyped).returns(Prism::AlternationPatternNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#338 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Node, right: Node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#367 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#390 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://prism//lib/prism/node.rb#372 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#385 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#378 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Node + # + # source://prism//lib/prism/node.rb#375 + 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. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#414 + 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#424 + def type; end + end +end + +# Represents the use of the `&&` operator or the `and` keyword. +# +# left and right +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#433 +class Prism::AndNode < ::Prism::Node + # def initialize: (Node left, Node right, Location operator_loc, Location location) -> void + # + # @return [AndNode] a new instance of AndNode + # + # source://prism//lib/prism/node.rb#435 + def initialize(source, left, right, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#445 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#450 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#460 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#455 + def compact_child_nodes; end + + # def copy: (**params) -> AndNode + # + # source://prism//lib/prism/node.rb#465 + sig { params(params: T.untyped).returns(Prism::AndNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#450 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Node, right: Node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#479 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#517 + def inspect(inspector = T.unsafe(nil)); end + + # Represents the left 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). + # + # left and right + # ^^^^ + # + # 1 && 2 + # ^ + # + # source://prism//lib/prism/node.rb#490 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#512 + sig { returns(String) } + def operator; end + + # The location of the `and` keyword or the `&&` operator. + # + # left and right + # ^^^ + # + # source://prism//lib/prism/node.rb#505 + 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). + # + # left && right + # ^^^^^ + # + # 1 and 2 + # ^ + # + # source://prism//lib/prism/node.rb#499 + 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. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#541 + 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#551 + def type; end + end +end + +# Represents a set of arguments to a method or a keyword. +# +# return foo, bar, baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#560 +class Prism::ArgumentsNode < ::Prism::Node + # def initialize: (Integer flags, Array[Node] arguments, Location location) -> void + # + # @return [ArgumentsNode] a new instance of ArgumentsNode + # + # source://prism//lib/prism/node.rb#562 + def initialize(source, flags, arguments, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#571 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: Array[Node] + # + # source://prism//lib/prism/node.rb#613 + sig { returns(T::Array[Prism::Node]) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#576 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#586 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#581 + def compact_child_nodes; end + + # def contains_keyword_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#617 + sig { returns(T::Boolean) } + def contains_keyword_splat?; end + + # def copy: (**params) -> ArgumentsNode + # + # source://prism//lib/prism/node.rb#591 + sig { params(params: T.untyped).returns(Prism::ArgumentsNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#576 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Node], location: Location } + # + # source://prism//lib/prism/node.rb#604 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#622 + def inspect(inspector = T.unsafe(nil)); 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#644 + def type; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#609 + 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#654 + def type; end + end +end + +# Flags for arguments nodes. +# +# source://prism//lib/prism/node.rb#19241 +module Prism::ArgumentsNodeFlags; end + +# if arguments contain keyword splat +# +# source://prism//lib/prism/node.rb#19243 +Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_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#663 +class Prism::ArrayNode < ::Prism::Node + # def initialize: (Integer flags, Array[Node] elements, Location? opening_loc, Location? closing_loc, Location location) -> void + # + # @return [ArrayNode] a new instance of ArrayNode + # + # source://prism//lib/prism/node.rb#665 + def initialize(source, flags, elements, opening_loc, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#676 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#681 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#758 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#735 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#691 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#686 + def compact_child_nodes; end + + # def contains_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#748 + sig { returns(T::Boolean) } + def contains_splat?; end + + # def copy: (**params) -> ArrayNode + # + # source://prism//lib/prism/node.rb#696 + sig { params(params: T.untyped).returns(Prism::ArrayNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#681 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#711 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://prism//lib/prism/node.rb#720 + sig { returns(T::Array[Prism::Node]) } + def elements; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#763 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#753 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#723 + 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 + # + # source://prism//lib/prism/node.rb#787 + def type; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#716 + 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#797 + def type; end + end +end + +# Flags for array nodes. +# +# source://prism//lib/prism/node.rb#19247 +module Prism::ArrayNodeFlags; end + +# if array contains splat nodes +# +# source://prism//lib/prism/node.rb#19249 +Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) + +# Represents an array pattern in pattern matching. +# +# foo in 1, 2 +# ^^^^^^^^^^^ +# +# foo in [1, 2] +# ^^^^^^^^^^^^^ +# +# foo in *1 +# ^^^^^^^^^ +# +# foo in Bar[] +# ^^^^^^^^^^^^ +# +# foo in Bar[1, 2, 3] +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#818 +class Prism::ArrayPatternNode < ::Prism::Node + # def initialize: (Node? constant, Array[Node] requireds, Node? rest, Array[Node] posts, Location? opening_loc, Location? closing_loc, Location location) -> void + # + # @return [ArrayPatternNode] a new instance of ArrayPatternNode + # + # source://prism//lib/prism/node.rb#820 + def initialize(source, constant, requireds, rest, posts, opening_loc, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#833 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#838 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#922 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#904 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#853 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#843 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://prism//lib/prism/node.rb#880 + sig { returns(T.nilable(Prism::Node)) } + def constant; end + + # def copy: (**params) -> ArrayPatternNode + # + # source://prism//lib/prism/node.rb#858 + sig { params(params: T.untyped).returns(Prism::ArrayPatternNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#838 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#875 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#927 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#917 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#892 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader posts: Array[Node] + # + # source://prism//lib/prism/node.rb#889 + sig { returns(T::Array[Prism::Node]) } + def posts; end + + # attr_reader requireds: Array[Node] + # + # source://prism//lib/prism/node.rb#883 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#886 + 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. + # + # 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#962 + 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#972 + def type; end + end +end + +# Represents a hash key/value pair. +# +# { a => b } +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#981 +class Prism::AssocNode < ::Prism::Node + # def initialize: (Node key, Node value, Location? operator_loc, Location location) -> void + # + # @return [AssocNode] a new instance of AssocNode + # + # source://prism//lib/prism/node.rb#983 + def initialize(source, key, value, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#993 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#998 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1008 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1003 + def compact_child_nodes; end + + # def copy: (**params) -> AssocNode + # + # source://prism//lib/prism/node.rb#1013 + sig { params(params: T.untyped).returns(Prism::AssocNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#998 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { key: Node, value: Node, operator_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#1027 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#1074 + def inspect(inspector = T.unsafe(nil)); end + + # The key of the association. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # { a: b } + # ^ + # + # { foo => bar } + # ^^^ + # + # { def a; end => 1 } + # ^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#1041 + sig { returns(Prism::Node) } + def key; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#1069 + sig { returns(T.nilable(String)) } + def operator; end + + # The location of the `=>` operator, if present. + # + # { foo => bar } + # ^^ + # + # source://prism//lib/prism/node.rb#1056 + 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. + # + # 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#1098 + def type; end + + # The value of the association, if present. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # { foo => bar } + # ^^^ + # + # { x: 1 } + # ^ + # + # source://prism//lib/prism/node.rb#1050 + 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 + # + # source://prism//lib/prism/node.rb#1108 + def type; end + end +end + +# Represents a splat in a hash literal. +# +# { **foo } +# ^^^^^ +# +# source://prism//lib/prism/node.rb#1117 +class Prism::AssocSplatNode < ::Prism::Node + # def initialize: (Node? value, Location operator_loc, Location location) -> void + # + # @return [AssocSplatNode] a new instance of AssocSplatNode + # + # source://prism//lib/prism/node.rb#1119 + def initialize(source, value, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1128 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1133 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1145 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1138 + def compact_child_nodes; end + + # def copy: (**params) -> AssocSplatNode + # + # source://prism//lib/prism/node.rb#1150 + sig { params(params: T.untyped).returns(Prism::AssocSplatNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1133 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#1163 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#1189 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1184 + sig { returns(String) } + def operator; end + + # The location of the `**` operator. + # + # { **x } + # ^^ + # + # source://prism//lib/prism/node.rb#1177 + 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 + # + # source://prism//lib/prism/node.rb#1215 + def type; end + + # The value to be splatted, if present. Will be missing when keyword rest argument forwarding is used. + # + # { **foo } + # ^^^ + # + # source://prism//lib/prism/node.rb#1171 + 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 + # + # source://prism//lib/prism/node.rb#1225 + def type; end + end +end + +Prism::BACKEND = T.let(T.unsafe(nil), Symbol) + +# Represents reading a reference to a field in the previous match. +# +# $' +# ^^ +# +# source://prism//lib/prism/node.rb#1234 +class Prism::BackReferenceReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1236 + def initialize(source, name, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1244 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1249 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1259 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1254 + def compact_child_nodes; end + + # def copy: (**params) -> BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1264 + sig { params(params: T.untyped).returns(Prism::BackReferenceReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1249 + sig { 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#1276 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#1289 + def inspect(inspector = T.unsafe(nil)); end + + # The name of the back-reference variable, including the leading `$`. + # + # $& # name `:$&` + # + # $+ # name `:$+` + # + # source://prism//lib/prism/node.rb#1285 + 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#1309 + 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#1319 + def type; end + end +end + +# A class that knows how to walk down the tree. None of the individual visit +# methods are implemented on this visitor, so it forces the consumer to +# implement each one that they need. For a default implementation that +# continues walking the tree, see the Visitor class. +# +# source://prism//lib/prism/visitor.rb#13 +class Prism::BasicVisitor + # Calls `accept` on the given node if it is not `nil`, which in turn should + # call back into this visitor by calling the appropriate `visit_*` method. + # + # source://prism//lib/prism/visitor.rb#16 + sig { params(node: T.nilable(Prism::Node)).void } + def visit(node); end + + # Visits each node in `nodes` by calling `accept` on each one. + # + # source://prism//lib/prism/visitor.rb#21 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void } + def visit_all(nodes); end + + # Visits the child nodes of `node` by calling `accept` on each one. + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::Node).void } + def visit_child_nodes(node); end +end + +# Represents a begin statement. +# +# begin +# foo +# end +# ^^^^^ +# +# source://prism//lib/prism/node.rb#1330 +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 + # + # @return [BeginNode] a new instance of BeginNode + # + # source://prism//lib/prism/node.rb#1332 + def initialize(source, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1345 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def begin_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1433 + sig { returns(T.nilable(String)) } + def begin_keyword; end + + # attr_reader begin_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#1396 + sig { returns(T.nilable(Prism::Location)) } + def begin_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1354 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1369 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1359 + def compact_child_nodes; end + + # def copy: (**params) -> BeginNode + # + # source://prism//lib/prism/node.rb#1374 + sig { params(params: T.untyped).returns(Prism::BeginNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1354 + sig { 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 } + # + # source://prism//lib/prism/node.rb#1391 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader else_clause: ElseNode? + # + # source://prism//lib/prism/node.rb#1414 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1438 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#1420 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # attr_reader ensure_clause: EnsureNode? + # + # source://prism//lib/prism/node.rb#1417 + sig { returns(T.nilable(Prism::EnsureNode)) } + def ensure_clause; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#1443 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader rescue_clause: RescueNode? + # + # source://prism//lib/prism/node.rb#1411 + sig { returns(T.nilable(Prism::RescueNode)) } + def rescue_clause; end + + # source://prism//lib/prism/node.rb#1349 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#1408 + 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 + # + # source://prism//lib/prism/node.rb#1488 + 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#1498 + def type; end + end +end + +# Represents block method arguments. +# +# bar(&args) +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1507 +class Prism::BlockArgumentNode < ::Prism::Node + # def initialize: (Node? expression, Location operator_loc, Location location) -> void + # + # @return [BlockArgumentNode] a new instance of BlockArgumentNode + # + # source://prism//lib/prism/node.rb#1509 + def initialize(source, expression, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1518 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1523 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1535 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1528 + def compact_child_nodes; end + + # def copy: (**params) -> BlockArgumentNode + # + # source://prism//lib/prism/node.rb#1540 + sig { params(params: T.untyped).returns(Prism::BlockArgumentNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1523 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Node?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#1553 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader expression: Node? + # + # source://prism//lib/prism/node.rb#1558 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#1573 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1568 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1561 + 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 + # + # source://prism//lib/prism/node.rb#1599 + 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#1609 + def type; end + end +end + +# Represents a block local variable. +# +# a { |; b| } +# ^ +# +# source://prism//lib/prism/node.rb#1618 +class Prism::BlockLocalVariableNode < ::Prism::Node + # def initialize: (Integer flags, Symbol name, Location location) -> void + # + # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode + # + # source://prism//lib/prism/node.rb#1620 + def initialize(source, flags, name, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1629 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1634 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1644 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1639 + def compact_child_nodes; end + + # def copy: (**params) -> BlockLocalVariableNode + # + # source://prism//lib/prism/node.rb#1649 + sig { params(params: T.untyped).returns(Prism::BlockLocalVariableNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1634 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#1662 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#1680 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#1671 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#1675 + 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 + # + # source://prism//lib/prism/node.rb#1702 + def type; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#1667 + 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#1712 + def type; end + end +end + +# Represents a block of ruby code. +# +# [1, 2, 3].each { |i| puts x } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1721 +class Prism::BlockNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Node? parameters, Node? body, Location opening_loc, Location closing_loc, Location location) -> void + # + # @return [BlockNode] a new instance of BlockNode + # + # source://prism//lib/prism/node.rb#1723 + def initialize(source, locals, parameters, body, opening_loc, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1735 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#1785 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1740 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#1806 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#1794 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1753 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1745 + def compact_child_nodes; end + + # def copy: (**params) -> BlockNode + # + # source://prism//lib/prism/node.rb#1758 + sig { params(params: T.untyped).returns(Prism::BlockNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1740 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], parameters: Node?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#1774 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#1811 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#1779 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#1801 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#1788 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parameters: Node? + # + # source://prism//lib/prism/node.rb#1782 + sig { returns(T.nilable(Prism::Node)) } + 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. + # + # 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#1845 + 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#1855 + def type; end + end +end + +# Represents a block parameter to a method, block, or lambda definition. +# +# def a(&b) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#1865 +class Prism::BlockParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + # + # @return [BlockParameterNode] a new instance of BlockParameterNode + # + # source://prism//lib/prism/node.rb#1867 + def initialize(source, flags, name, name_loc, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1878 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1883 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1893 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1888 + def compact_child_nodes; end + + # def copy: (**params) -> BlockParameterNode + # + # source://prism//lib/prism/node.rb#1898 + sig { params(params: T.untyped).returns(Prism::BlockParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1883 + sig { 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 } + # + # source://prism//lib/prism/node.rb#1913 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#1954 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#1922 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#1925 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1949 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1937 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#1944 + 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 + # + # source://prism//lib/prism/node.rb#1982 + def type; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#1918 + 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#1992 + def type; end + end +end + +# Represents a block's parameters declaration. +# +# -> (a, b = 1; local) { } +# ^^^^^^^^^^^^^^^^^ +# +# foo do |a, b = 1; local| +# ^^^^^^^^^^^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#2005 +class Prism::BlockParametersNode < ::Prism::Node + # def initialize: (ParametersNode? parameters, Array[Node] locals, Location? opening_loc, Location? closing_loc, Location location) -> void + # + # @return [BlockParametersNode] a new instance of BlockParametersNode + # + # source://prism//lib/prism/node.rb#2007 + def initialize(source, parameters, locals, opening_loc, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2018 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2023 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#2097 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#2079 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2036 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2028 + def compact_child_nodes; end + + # def copy: (**params) -> BlockParametersNode + # + # source://prism//lib/prism/node.rb#2041 + sig { params(params: T.untyped).returns(Prism::BlockParametersNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2023 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#2056 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#2102 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Node] + # + # source://prism//lib/prism/node.rb#2064 + sig { returns(T::Array[Prism::Node]) } + def locals; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#2092 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#2067 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#2061 + 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. + # + # 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#2130 + 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#2140 + def type; end + end +end + +# Represents the use of the `break` keyword. +# +# break foo +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2149 +class Prism::BreakNode < ::Prism::Node + # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void + # + # @return [BreakNode] a new instance of BreakNode + # + # source://prism//lib/prism/node.rb#2151 + def initialize(source, arguments, keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2160 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#2200 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2165 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2177 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2170 + def compact_child_nodes; end + + # def copy: (**params) -> BreakNode + # + # source://prism//lib/prism/node.rb#2182 + sig { params(params: T.untyped).returns(Prism::BreakNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2165 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#2195 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#2215 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#2210 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#2203 + 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. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2241 + 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#2251 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call. +# +# foo.bar &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2260 +class Prism::CallAndWriteNode < ::Prism::Node + # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Node value, Location location) -> void + # + # @return [CallAndWriteNode] a new instance of CallAndWriteNode + # + # source://prism//lib/prism/node.rb#2262 + def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2277 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2381 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2391 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2331 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2282 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2295 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2287 + def compact_child_nodes; end + + # def copy: (**params) -> CallAndWriteNode + # + # source://prism//lib/prism/node.rb#2300 + sig { params(params: T.untyped).returns(Prism::CallAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2282 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location } + # + # source://prism//lib/prism/node.rb#2319 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2386 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#2406 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2396 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2343 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2401 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2361 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2355 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#2328 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2371 + 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 + # + # source://prism//lib/prism/node.rb#2440 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#2367 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2376 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2358 + sig { returns(Symbol) } + def write_name; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2324 + 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#2450 + def type; end + end +end + +# Represents a method call, in all of the various forms that can take. +# +# foo +# ^^^ +# +# foo() +# ^^^^^ +# +# +foo +# ^^^^ +# +# foo + bar +# ^^^^^^^^^ +# +# foo.bar +# ^^^^^^^ +# +# foo&.bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2474 +class Prism::CallNode < ::Prism::Node + # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc, Node? block, Location location) -> void + # + # @return [CallNode] a new instance of CallNode + # + # source://prism//lib/prism/node.rb#2476 + def initialize(source, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2492 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#2596 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2625 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#2611 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2635 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2557 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2497 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#2650 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#2599 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2511 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2502 + def compact_child_nodes; end + + # def copy: (**params) -> CallNode + # + # source://prism//lib/prism/node.rb#2516 + sig { params(params: T.untyped).returns(Prism::CallNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2497 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, location: Location } + # + # source://prism//lib/prism/node.rb#2536 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2630 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#2655 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2640 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2572 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#2569 + sig { returns(Symbol) } + def name; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#2645 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#2584 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo.bar + # ^^^ + # + # +foo + # ^^^ + # + # foo + bar + # ^^^ + # + # source://prism//lib/prism/node.rb#2554 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2615 + 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 + # + # source://prism//lib/prism/node.rb#2699 + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2620 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2541 + 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#2709 + def type; end + end +end + +# Flags for call nodes. +# +# source://prism//lib/prism/node.rb#19253 +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#19261 +Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) + +# a call that ignores method visibility +# +# source://prism//lib/prism/node.rb#19264 +Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) + +# &. operator +# +# source://prism//lib/prism/node.rb#19255 +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#19258 +Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) + +# Represents the use of an assignment operator on a call. +# +# foo.bar += baz +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2718 +class Prism::CallOperatorWriteNode < ::Prism::Node + # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol operator, Location operator_loc, Node value, Location location) -> void + # + # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode + # + # source://prism//lib/prism/node.rb#2720 + def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2736 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2844 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2854 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2791 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2741 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2754 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2746 + def compact_child_nodes; end + + # def copy: (**params) -> CallOperatorWriteNode + # + # source://prism//lib/prism/node.rb#2759 + sig { params(params: T.untyped).returns(Prism::CallOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2741 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location } + # + # source://prism//lib/prism/node.rb#2779 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2849 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#2864 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2859 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2803 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#2821 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2824 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2815 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#2788 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2834 + 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 + # + # source://prism//lib/prism/node.rb#2899 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#2830 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2839 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2818 + sig { returns(Symbol) } + def write_name; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2784 + 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#2909 + def type; end + end +end + +# Represents the use of the `||=` operator on a call. +# +# foo.bar ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2918 +class Prism::CallOrWriteNode < ::Prism::Node + # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Node value, Location location) -> void + # + # @return [CallOrWriteNode] a new instance of CallOrWriteNode + # + # source://prism//lib/prism/node.rb#2920 + def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2935 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3039 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#3049 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2989 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2940 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2953 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2945 + def compact_child_nodes; end + + # def copy: (**params) -> CallOrWriteNode + # + # source://prism//lib/prism/node.rb#2958 + sig { params(params: T.untyped).returns(Prism::CallOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2940 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location } + # + # source://prism//lib/prism/node.rb#2977 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3044 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#3064 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#3054 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#3001 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3059 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3019 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#3013 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#2986 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3029 + 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 + # + # source://prism//lib/prism/node.rb#3098 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3025 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3034 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#3016 + sig { returns(Symbol) } + def write_name; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2982 + 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#3108 + def type; end + end +end + +# Represents assigning to a method call. +# +# foo.bar, = 1 +# ^^^^^^^ +# +# begin +# rescue => foo.bar +# ^^^^^^^ +# end +# +# for foo.bar in baz do end +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#3125 +class Prism::CallTargetNode < ::Prism::Node + # def initialize: (Integer flags, Node receiver, Location call_operator_loc, Symbol name, Location message_loc, Location location) -> void + # + # @return [CallTargetNode] a new instance of CallTargetNode + # + # source://prism//lib/prism/node.rb#3127 + def initialize(source, flags, receiver, call_operator_loc, name, message_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3139 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3213 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String + # + # source://prism//lib/prism/node.rb#3223 + sig { returns(String) } + def call_operator; end + + # attr_reader call_operator_loc: Location + # + # source://prism//lib/prism/node.rb#3187 + sig { returns(Prism::Location) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3144 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3154 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3149 + def compact_child_nodes; end + + # def copy: (**params) -> CallTargetNode + # + # source://prism//lib/prism/node.rb#3159 + sig { params(params: T.untyped).returns(Prism::CallTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3144 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#3175 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3218 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#3233 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String + # + # source://prism//lib/prism/node.rb#3228 + sig { returns(String) } + def message; end + + # attr_reader message_loc: Location + # + # source://prism//lib/prism/node.rb#3196 + sig { returns(Prism::Location) } + def message_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3193 + sig { returns(Symbol) } + def name; end + + # attr_reader receiver: Node + # + # source://prism//lib/prism/node.rb#3184 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3203 + 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 + # + # source://prism//lib/prism/node.rb#3259 + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3208 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#3180 + 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#3269 + def type; end + end +end + +# Represents assigning to a local variable in pattern matching. +# +# foo => [bar => baz] +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3278 +class Prism::CapturePatternNode < ::Prism::Node + # def initialize: (Node value, Node target, Location operator_loc, Location location) -> void + # + # @return [CapturePatternNode] a new instance of CapturePatternNode + # + # source://prism//lib/prism/node.rb#3280 + def initialize(source, value, target, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3290 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3295 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3305 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3300 + def compact_child_nodes; end + + # def copy: (**params) -> CapturePatternNode + # + # source://prism//lib/prism/node.rb#3310 + sig { params(params: T.untyped).returns(Prism::CapturePatternNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3295 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, target: Node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#3324 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#3347 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3342 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3335 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: Node + # + # source://prism//lib/prism/node.rb#3332 + sig { returns(Prism::Node) } + 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 + # + # source://prism//lib/prism/node.rb#3371 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3329 + 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 + # + # source://prism//lib/prism/node.rb#3381 + def type; end + end +end + +# Represents the use of a case statement for pattern matching. +# +# case true +# in false +# end +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3392 +class Prism::CaseMatchNode < ::Prism::Node + # def initialize: (Node? predicate, Array[Node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void + # + # @return [CaseMatchNode] a new instance of CaseMatchNode + # + # source://prism//lib/prism/node.rb#3394 + def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3406 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3473 + sig { returns(String) } + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3460 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3411 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3425 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3416 + def compact_child_nodes; end + + # attr_reader conditions: Array[Node] + # + # source://prism//lib/prism/node.rb#3454 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # attr_reader consequent: ElseNode? + # + # source://prism//lib/prism/node.rb#3457 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # def copy: (**params) -> CaseMatchNode + # + # source://prism//lib/prism/node.rb#3430 + sig { params(params: T.untyped).returns(Prism::CaseMatchNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3411 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#3446 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3478 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3466 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#3483 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader predicate: Node? + # + # source://prism//lib/prism/node.rb#3451 + 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 + # + # source://prism//lib/prism/node.rb#3517 + 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#3527 + def type; end + end +end + +# Represents the use of a case statement. +# +# case true +# when false +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3538 +class Prism::CaseNode < ::Prism::Node + # def initialize: (Node? predicate, Array[Node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void + # + # @return [CaseNode] a new instance of CaseNode + # + # source://prism//lib/prism/node.rb#3540 + def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3552 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3619 + sig { returns(String) } + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3606 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3557 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3571 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3562 + def compact_child_nodes; end + + # attr_reader conditions: Array[Node] + # + # source://prism//lib/prism/node.rb#3600 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # attr_reader consequent: ElseNode? + # + # source://prism//lib/prism/node.rb#3603 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # def copy: (**params) -> CaseNode + # + # source://prism//lib/prism/node.rb#3576 + sig { params(params: T.untyped).returns(Prism::CaseNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3557 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#3592 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3624 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3612 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#3629 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader predicate: Node? + # + # source://prism//lib/prism/node.rb#3597 + 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 + # + # source://prism//lib/prism/node.rb#3663 + 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#3673 + def type; end + end +end + +# Represents a class declaration involving the `class` keyword. +# +# class Foo end +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3682 +class Prism::ClassNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Node constant_path, Location? inheritance_operator_loc, Node? superclass, Node? body, Location end_keyword_loc, Symbol name, Location location) -> void + # + # @return [ClassNode] a new instance of ClassNode + # + # source://prism//lib/prism/node.rb#3684 + def initialize(source, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3699 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#3774 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3704 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3787 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3750 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3718 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3709 + def compact_child_nodes; end + + # attr_reader constant_path: Node + # + # source://prism//lib/prism/node.rb#3756 + sig { returns(Prism::Node) } + def constant_path; end + + # def copy: (**params) -> ClassNode + # + # source://prism//lib/prism/node.rb#3723 + sig { params(params: T.untyped).returns(Prism::ClassNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3704 + sig { 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: Node, inheritance_operator_loc: Location?, superclass: Node?, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#3742 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3797 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3777 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def inheritance_operator: () -> String? + # + # source://prism//lib/prism/node.rb#3792 + sig { returns(T.nilable(String)) } + def inheritance_operator; end + + # attr_reader inheritance_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#3759 + sig { returns(T.nilable(Prism::Location)) } + def inheritance_operator_loc; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#3802 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#3747 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3783 + sig { returns(Symbol) } + def name; end + + # attr_reader superclass: Node? + # + # source://prism//lib/prism/node.rb#3771 + 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. + # + # 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#3840 + 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#3850 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a class variable. +# +# @@target &&= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3859 +class Prism::ClassVariableAndWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # + # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#3861 + def initialize(source, name, name_loc, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3872 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3877 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3887 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3882 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#3892 + sig { params(params: T.untyped).returns(Prism::ClassVariableAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3877 + sig { 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: Node, location: Location } + # + # source://prism//lib/prism/node.rb#3907 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#125 + def desugar; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#3936 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3912 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3915 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3931 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3921 + 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 + # + # source://prism//lib/prism/node.rb#3960 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3927 + 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 + # + # source://prism//lib/prism/node.rb#3970 + def type; end + end +end + +# Represents assigning to a class variable using an operator that isn't `=`. +# +# @@target += value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3979 +class Prism::ClassVariableOperatorWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + # + # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3981 + def initialize(source, name, name_loc, operator_loc, value, operator, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3993 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3998 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4008 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4003 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4013 + sig { params(params: T.untyped).returns(Prism::ClassVariableOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3998 + sig { 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: Node, operator: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#4029 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#137 + def desugar; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#4056 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4034 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4037 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#4052 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4043 + 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 + # + # source://prism//lib/prism/node.rb#4081 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4049 + 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 + # + # source://prism//lib/prism/node.rb#4091 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a class variable. +# +# @@target ||= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4100 +class Prism::ClassVariableOrWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # + # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#4102 + def initialize(source, name, name_loc, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4113 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4118 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4128 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4123 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#4133 + sig { params(params: T.untyped).returns(Prism::ClassVariableOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4118 + sig { 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: Node, location: Location } + # + # source://prism//lib/prism/node.rb#4148 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#131 + def desugar; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#4177 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4153 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4156 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4172 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4162 + 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 + # + # source://prism//lib/prism/node.rb#4201 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4168 + 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 + # + # source://prism//lib/prism/node.rb#4211 + def type; end + end +end + +# Represents referencing a class variable. +# +# @@foo +# ^^^^^ +# +# source://prism//lib/prism/node.rb#4220 +class Prism::ClassVariableReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#4222 + def initialize(source, name, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4230 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4235 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4245 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4240 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#4250 + sig { params(params: T.untyped).returns(Prism::ClassVariableReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4235 + sig { 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#4262 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#4275 + def inspect(inspector = T.unsafe(nil)); end + + # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @@abc # name `:@@abc` + # + # @@_test # name `:@@_test` + # + # source://prism//lib/prism/node.rb#4271 + 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#4295 + 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#4305 + def type; end + end +end + +# Represents writing to a class variable in a context that doesn't have an explicit value. +# +# @@foo, @@bar = baz +# ^^^^^ ^^^^^ +# +# source://prism//lib/prism/node.rb#4314 +class Prism::ClassVariableTargetNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#4316 + def initialize(source, name, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4324 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4329 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4339 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4334 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#4344 + sig { params(params: T.untyped).returns(Prism::ClassVariableTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4329 + sig { 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#4356 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#4365 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4361 + 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#4385 + 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#4395 + def type; end + end +end + +# Represents writing to a class variable. +# +# @@foo = 1 +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4404 +class Prism::ClassVariableWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Node value, Location? operator_loc, Location location) -> void + # + # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#4406 + def initialize(source, name, name_loc, value, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4417 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4422 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4432 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4427 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#4437 + sig { params(params: T.untyped).returns(Prism::ClassVariableWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4422 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#4452 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#4487 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4457 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4460 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#4482 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#4469 + 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. + # + # 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#4511 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4466 + 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 + # + # source://prism//lib/prism/node.rb#4521 + def type; end + 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#258 +class Prism::Comment + # Create a new comment object with the given location. + # + # @return [Comment] a new instance of Comment + # + # source://prism//lib/prism/parse_result.rb#263 + def initialize(location); end + + # Implement the hash pattern matching interface for Comment. + # + # source://prism//lib/prism/parse_result.rb#268 + def deconstruct_keys(keys); end + + # The location of this comment in the source. + # + # source://prism//lib/prism/parse_result.rb#260 + sig { returns(Prism::Location) } + def location; end + + sig { returns(T::Boolean) } + def trailing?; end +end + +# A compiler is a visitor that returns the value of each node as it visits. +# This is as opposed to a visitor which will only walk the tree. This can be +# useful when you are trying to compile a tree into a different format. +# +# For example, to build a representation of the tree as s-expressions, you +# could write: +# +# class SExpressions < Prism::Compiler +# def visit_arguments_node(node) = [:arguments, super] +# def visit_call_node(node) = [:call, super] +# def visit_integer_node(node) = [:integer] +# def visit_program_node(node) = [:program, super] +# end +# +# Prism.parse("1 + 2").value.accept(SExpressions.new) +# # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] +# +# source://prism//lib/prism/compiler.rb#26 +class Prism::Compiler + # Visit an individual node. + # + # source://prism//lib/prism/compiler.rb#28 + def visit(node); end + + # Visit the child nodes of the given node. + # Compile a AliasGlobalVariableNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_alias_global_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a AliasMethodNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_alias_method_node(node); end + + # Visit a list of nodes. + # + # source://prism//lib/prism/compiler.rb#33 + def visit_all(nodes); end + + # Visit the child nodes of the given node. + # Compile a AlternationPatternNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_alternation_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AndNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_and_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArgumentsNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_array_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayPatternNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_array_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_assoc_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocSplatNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_assoc_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a BackReferenceReadNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_back_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a BeginNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_begin_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockArgumentNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_block_argument_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockLocalVariableNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_block_local_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_block_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_block_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParametersNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_block_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a BreakNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_break_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_call_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_call_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_call_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_call_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_call_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a CapturePatternNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_capture_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a CaseMatchNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_case_match_node(node); end + + # Visit the child nodes of the given node. + # Compile a CaseNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_case_node(node); end + + # Visit the child nodes of the given node. + # + # source://prism//lib/prism/compiler.rb#38 + def visit_child_nodes(node); end + + # Visit the child nodes of the given node. + # Compile a ClassNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_class_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_class_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_class_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_class_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_class_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_class_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_path_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_path_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_path_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_path_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_path_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_path_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantReadNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_def_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefinedNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_defined_node(node); end + + # Visit the child nodes of the given node. + # Compile a ElseNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_else_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedStatementsNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_embedded_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedVariableNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_embedded_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a EnsureNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_ensure_node(node); end + + # Visit the child nodes of the given node. + # Compile a FalseNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_false_node(node); end + + # Visit the child nodes of the given node. + # Compile a FindPatternNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_find_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a FlipFlopNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_flip_flop_node(node); end + + # Visit the child nodes of the given node. + # Compile a FloatNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_float_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_for_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingArgumentsNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_forwarding_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_forwarding_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingSuperNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_forwarding_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_global_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_global_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_global_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_global_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_global_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_global_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashPatternNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_hash_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a IfNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_if_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImaginaryNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_imaginary_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImplicitNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_implicit_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImplicitRestNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_implicit_rest_node(node); end + + # Visit the child nodes of the given node. + # Compile a InNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_in_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_index_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_index_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_index_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_index_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_instance_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_instance_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_instance_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_instance_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_instance_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_instance_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IntegerNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_integer_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_interpolated_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_interpolated_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedStringNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_interpolated_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedSymbolNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_interpolated_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedXStringNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_interpolated_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordHashNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_keyword_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordRestParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_keyword_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a LambdaNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_lambda_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_local_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_local_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_local_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_local_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_local_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_local_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchLastLineNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchPredicateNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_match_predicate_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchRequiredNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_match_required_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_match_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MissingNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_missing_node(node); end + + # Visit the child nodes of the given node. + # Compile a ModuleNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_module_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_multi_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_multi_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a NextNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_next_node(node); end + + # Visit the child nodes of the given node. + # Compile a NilNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_nil_node(node); end + + # Visit the child nodes of the given node. + # Compile a NoKeywordsParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_no_keywords_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a NumberedParametersNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_numbered_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a NumberedReferenceReadNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_numbered_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_optional_keyword_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a OptionalParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_optional_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a OrNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_or_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParametersNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParenthesesNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_parentheses_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedExpressionNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_pinned_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedVariableNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_pinned_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a PostExecutionNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_post_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a PreExecutionNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_pre_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a ProgramNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_program_node(node); end + + # Visit the child nodes of the given node. + # Compile a RangeNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_range_node(node); end + + # Visit the child nodes of the given node. + # Compile a RationalNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_rational_node(node); end + + # Visit the child nodes of the given node. + # Compile a RedoNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_redo_node(node); end + + # Visit the child nodes of the given node. + # Compile a RegularExpressionNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_required_keyword_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_required_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueModifierNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_rescue_modifier_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_rescue_node(node); end + + # Visit the child nodes of the given node. + # Compile a RestParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RetryNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_retry_node(node); end + + # Visit the child nodes of the given node. + # Compile a ReturnNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_return_node(node); end + + # Visit the child nodes of the given node. + # Compile a SelfNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_self_node(node); end + + # Visit the child nodes of the given node. + # Compile a SingletonClassNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_singleton_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceEncodingNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_source_encoding_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceFileNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_source_file_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceLineNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_source_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a SplatNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a StatementsNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a StringNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a SuperNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a SymbolNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a TrueNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_true_node(node); end + + # Visit the child nodes of the given node. + # Compile a UndefNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_undef_node(node); end + + # Visit the child nodes of the given node. + # Compile a UnlessNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_unless_node(node); end + + # Visit the child nodes of the given node. + # Compile a UntilNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_until_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhenNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_when_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhileNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_while_node(node); end + + # Visit the child nodes of the given node. + # Compile a XStringNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a YieldNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_yield_node(node); end +end + +# Represents the use of the `&&=` operator for assignment to a constant. +# +# Target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4530 +class Prism::ConstantAndWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # + # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#4532 + def initialize(source, name, name_loc, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4543 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4548 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4558 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4553 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#4563 + sig { params(params: T.untyped).returns(Prism::ConstantAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4548 + sig { 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: Node, location: Location } + # + # source://prism//lib/prism/node.rb#4578 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#143 + def desugar; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#4607 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4583 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4586 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4602 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4592 + 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 + # + # source://prism//lib/prism/node.rb#4631 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4598 + 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 + # + # source://prism//lib/prism/node.rb#4641 + def type; end + end +end + +# Represents assigning to a constant using an operator that isn't `=`. +# +# Target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4650 +class Prism::ConstantOperatorWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + # + # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4652 + def initialize(source, name, name_loc, operator_loc, value, operator, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4664 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4669 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4679 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4674 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4684 + sig { params(params: T.untyped).returns(Prism::ConstantOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4669 + sig { 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: Node, operator: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#4700 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#155 + def desugar; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#4727 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4705 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4708 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#4723 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4714 + 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 + # + # source://prism//lib/prism/node.rb#4752 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4720 + 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 + # + # source://prism//lib/prism/node.rb#4762 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant. +# +# Target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4771 +class Prism::ConstantOrWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # + # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#4773 + def initialize(source, name, name_loc, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4784 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4789 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4799 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4794 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#4804 + sig { params(params: T.untyped).returns(Prism::ConstantOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4789 + sig { 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: Node, location: Location } + # + # source://prism//lib/prism/node.rb#4819 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#149 + def desugar; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#4848 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4824 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4827 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4843 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4833 + 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 + # + # source://prism//lib/prism/node.rb#4872 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4839 + 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 + # + # source://prism//lib/prism/node.rb#4882 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a constant path. +# +# Parent::Child &&= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4891 +class Prism::ConstantPathAndWriteNode < ::Prism::Node + # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void + # + # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode + # + # source://prism//lib/prism/node.rb#4893 + def initialize(source, target, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4903 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4908 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4918 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4913 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathAndWriteNode + # + # source://prism//lib/prism/node.rb#4923 + sig { params(params: T.untyped).returns(Prism::ConstantPathAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4908 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, location: Location } + # + # source://prism//lib/prism/node.rb#4937 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#4960 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4955 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4945 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#4942 + 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 + # + # source://prism//lib/prism/node.rb#4984 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4951 + 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 + # + # source://prism//lib/prism/node.rb#4994 + def type; end + end +end + +# Represents accessing a constant through a path of `::` operators. +# +# Foo::Bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5003 +class Prism::ConstantPathNode < ::Prism::Node + # def initialize: (Node? parent, Node child, Location delimiter_loc, Location location) -> void + # + # @return [ConstantPathNode] a new instance of ConstantPathNode + # + # source://prism//lib/prism/node.rb#5005 + def initialize(source, parent, child, delimiter_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5015 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader child: Node + # + # source://prism//lib/prism/node.rb#5060 + sig { returns(Prism::Node) } + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5020 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5033 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5025 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathNode + # + # source://prism//lib/prism/node.rb#5038 + sig { params(params: T.untyped).returns(Prism::ConstantPathNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5020 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Node?, child: Node, delimiter_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#5052 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#5070 + sig { returns(String) } + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://prism//lib/prism/node.rb#5063 + sig { returns(Prism::Location) } + def delimiter_loc; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#129 + 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#112 + def full_name_parts; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#5075 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader parent: Node? + # + # source://prism//lib/prism/node.rb#5057 + 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 + # + # source://prism//lib/prism/node.rb#5103 + 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#5113 + def type; end + end +end + +# An error class raised when dynamic parts are found while computing a +# constant path's full name. For example: +# Foo::Bar::Baz -> does not raise because all parts of the constant path are +# simple constants +# var::Bar::Baz -> raises because the first part of the constant path is a +# local variable +# +# source://prism//lib/prism/node_ext.rb#108 +class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end + +# Represents assigning to a constant path using an operator that isn't `=`. +# +# Parent::Child += value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5122 +class Prism::ConstantPathOperatorWriteNode < ::Prism::Node + # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Symbol operator, Location location) -> void + # + # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode + # + # source://prism//lib/prism/node.rb#5124 + def initialize(source, target, operator_loc, value, operator, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5135 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5140 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5150 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5145 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathOperatorWriteNode + # + # source://prism//lib/prism/node.rb#5155 + sig { params(params: T.untyped).returns(Prism::ConstantPathOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5140 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#5170 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#5191 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#5187 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5178 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#5175 + 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 + # + # source://prism//lib/prism/node.rb#5216 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#5184 + 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 + # + # source://prism//lib/prism/node.rb#5226 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant path. +# +# Parent::Child ||= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5235 +class Prism::ConstantPathOrWriteNode < ::Prism::Node + # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void + # + # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode + # + # source://prism//lib/prism/node.rb#5237 + def initialize(source, target, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5247 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5252 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5262 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5257 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathOrWriteNode + # + # source://prism//lib/prism/node.rb#5267 + sig { params(params: T.untyped).returns(Prism::ConstantPathOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5252 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, location: Location } + # + # source://prism//lib/prism/node.rb#5281 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#5304 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5299 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5289 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#5286 + 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 + # + # source://prism//lib/prism/node.rb#5328 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#5295 + 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 + # + # source://prism//lib/prism/node.rb#5338 + def type; end + end +end + +# Represents writing to a constant path in a context that doesn't have an explicit value. +# +# Foo::Foo, Bar::Bar = baz +# ^^^^^^^^ ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5347 +class Prism::ConstantPathTargetNode < ::Prism::Node + # def initialize: (Node? parent, Node child, Location delimiter_loc, Location location) -> void + # + # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode + # + # source://prism//lib/prism/node.rb#5349 + def initialize(source, parent, child, delimiter_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5359 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader child: Node + # + # source://prism//lib/prism/node.rb#5404 + sig { returns(Prism::Node) } + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5364 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5377 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5369 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathTargetNode + # + # source://prism//lib/prism/node.rb#5382 + sig { params(params: T.untyped).returns(Prism::ConstantPathTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5364 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Node?, child: Node, delimiter_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#5396 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#5414 + sig { returns(String) } + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://prism//lib/prism/node.rb#5407 + sig { returns(Prism::Location) } + def delimiter_loc; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#152 + 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#137 + def full_name_parts; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#5419 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader parent: Node? + # + # source://prism//lib/prism/node.rb#5401 + 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 + # + # source://prism//lib/prism/node.rb#5447 + 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#5457 + def type; end + end +end + +# Represents writing to a constant path. +# +# ::Foo = 1 +# ^^^^^^^^^ +# +# Foo::Bar = 1 +# ^^^^^^^^^^^^ +# +# ::Foo::Bar = 1 +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5472 +class Prism::ConstantPathWriteNode < ::Prism::Node + # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void + # + # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode + # + # source://prism//lib/prism/node.rb#5474 + def initialize(source, target, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5484 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5489 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5499 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5494 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathWriteNode + # + # source://prism//lib/prism/node.rb#5504 + sig { params(params: T.untyped).returns(Prism::ConstantPathWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5489 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, location: Location } + # + # source://prism//lib/prism/node.rb#5518 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#5541 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5536 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5526 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#5523 + 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 + # + # source://prism//lib/prism/node.rb#5565 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#5532 + 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 + # + # source://prism//lib/prism/node.rb#5575 + def type; end + end +end + +# Represents referencing a constant. +# +# Foo +# ^^^ +# +# source://prism//lib/prism/node.rb#5584 +class Prism::ConstantReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [ConstantReadNode] a new instance of ConstantReadNode + # + # source://prism//lib/prism/node.rb#5586 + def initialize(source, name, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5594 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5599 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5609 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5604 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantReadNode + # + # source://prism//lib/prism/node.rb#5614 + sig { params(params: T.untyped).returns(Prism::ConstantReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5599 + sig { 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#5626 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#96 + 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#91 + def full_name_parts; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#5639 + def inspect(inspector = T.unsafe(nil)); end + + # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). + # + # X # name `:X` + # + # SOME_CONSTANT # name `:SOME_CONSTANT` + # + # source://prism//lib/prism/node.rb#5635 + 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#5659 + 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#5669 + def type; end + end +end + +# Represents writing to a constant in a context that doesn't have an explicit value. +# +# Foo, Bar = baz +# ^^^ ^^^ +# +# source://prism//lib/prism/node.rb#5678 +class Prism::ConstantTargetNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [ConstantTargetNode] a new instance of ConstantTargetNode + # + # source://prism//lib/prism/node.rb#5680 + def initialize(source, name, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5688 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5693 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5703 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5698 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantTargetNode + # + # source://prism//lib/prism/node.rb#5708 + sig { params(params: T.untyped).returns(Prism::ConstantTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5693 + sig { 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#5720 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#165 + 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#160 + def full_name_parts; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#5729 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#5725 + 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#5749 + 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#5759 + def type; end + end +end + +# Represents writing to a constant. +# +# Foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#5768 +class Prism::ConstantWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void + # + # @return [ConstantWriteNode] a new instance of ConstantWriteNode + # + # source://prism//lib/prism/node.rb#5770 + def initialize(source, name, name_loc, value, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5781 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5786 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5796 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5791 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantWriteNode + # + # source://prism//lib/prism/node.rb#5801 + sig { params(params: T.untyped).returns(Prism::ConstantWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5786 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#5816 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#5845 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#5821 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#5824 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5840 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5833 + 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 + # + # source://prism//lib/prism/node.rb#5869 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#5830 + 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 + # + # source://prism//lib/prism/node.rb#5879 + def type; end + end +end + +class Prism::DATAComment < Prism::Comment; end + +# The DSL module provides a set of methods that can be used to create prism +# nodes in a more concise manner. For example, instead of writing: +# +# source = Prism::Source.new("[1]") +# +# Prism::ArrayNode.new( +# [ +# Prism::IntegerNode.new( +# Prism::IntegerBaseFlags::DECIMAL, +# Prism::Location.new(source, 1, 1), +# source +# ) +# ], +# Prism::Location.new(source, 0, 1), +# Prism::Location.new(source, 2, 1), +# source +# ) +# +# you could instead write: +# +# source = Prism::Source.new("[1]") +# +# ArrayNode( +# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, Location(source, 1, 1)), source), +# Location(source, 0, 1), +# Location(source, 2, 1), +# source +# ) +# +# This is mostly helpful in the context of writing tests, but can also be used +# to generate trees programmatically. +# +# source://prism//lib/prism/dsl.rb#40 +module Prism::DSL + private + + # Create a new AliasGlobalVariableNode node + # + # source://prism//lib/prism/dsl.rb#49 + def AliasGlobalVariableNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new AliasMethodNode node + # + # source://prism//lib/prism/dsl.rb#54 + def AliasMethodNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new AlternationPatternNode node + # + # source://prism//lib/prism/dsl.rb#59 + def AlternationPatternNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new AndNode node + # + # source://prism//lib/prism/dsl.rb#64 + def AndNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ArgumentsNode node + # + # source://prism//lib/prism/dsl.rb#69 + def ArgumentsNode(flags, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ArrayNode node + # + # source://prism//lib/prism/dsl.rb#74 + def ArrayNode(flags, elements, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ArrayPatternNode node + # + # source://prism//lib/prism/dsl.rb#79 + def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new AssocNode node + # + # source://prism//lib/prism/dsl.rb#84 + def AssocNode(key, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new AssocSplatNode node + # + # source://prism//lib/prism/dsl.rb#89 + def AssocSplatNode(value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BackReferenceReadNode node + # + # source://prism//lib/prism/dsl.rb#94 + def BackReferenceReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BeginNode node + # + # source://prism//lib/prism/dsl.rb#99 + def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BlockArgumentNode node + # + # source://prism//lib/prism/dsl.rb#104 + def BlockArgumentNode(expression, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BlockLocalVariableNode node + # + # source://prism//lib/prism/dsl.rb#109 + def BlockLocalVariableNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BlockNode node + # + # source://prism//lib/prism/dsl.rb#114 + def BlockNode(locals, parameters, body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BlockParameterNode node + # + # source://prism//lib/prism/dsl.rb#119 + def BlockParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BlockParametersNode node + # + # source://prism//lib/prism/dsl.rb#124 + def BlockParametersNode(parameters, locals, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BreakNode node + # + # source://prism//lib/prism/dsl.rb#129 + def BreakNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CallAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#134 + 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 + + # Create a new CallNode node + # + # source://prism//lib/prism/dsl.rb#139 + 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 + + # Create a new CallOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#144 + def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CallOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#149 + 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 + + # Create a new CallTargetNode node + # + # source://prism//lib/prism/dsl.rb#154 + def CallTargetNode(flags, receiver, call_operator_loc, name, message_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CapturePatternNode node + # + # source://prism//lib/prism/dsl.rb#159 + def CapturePatternNode(value, target, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CaseMatchNode node + # + # source://prism//lib/prism/dsl.rb#164 + def CaseMatchNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CaseNode node + # + # source://prism//lib/prism/dsl.rb#169 + def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassNode node + # + # source://prism//lib/prism/dsl.rb#174 + 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 + + # Create a new ClassVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#179 + def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#184 + def ClassVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#189 + def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#194 + def ClassVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#199 + def ClassVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#204 + def ClassVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#209 + def ConstantAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#214 + def ConstantOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#219 + def ConstantOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#224 + def ConstantPathAndWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathNode node + # + # source://prism//lib/prism/dsl.rb#229 + def ConstantPathNode(parent, child, delimiter_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#234 + def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#239 + def ConstantPathOrWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathTargetNode node + # + # source://prism//lib/prism/dsl.rb#244 + def ConstantPathTargetNode(parent, child, delimiter_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathWriteNode node + # + # source://prism//lib/prism/dsl.rb#249 + def ConstantPathWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantReadNode node + # + # source://prism//lib/prism/dsl.rb#254 + def ConstantReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantTargetNode node + # + # source://prism//lib/prism/dsl.rb#259 + def ConstantTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantWriteNode node + # + # source://prism//lib/prism/dsl.rb#264 + def ConstantWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new DefNode node + # + # source://prism//lib/prism/dsl.rb#269 + 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 + + # Create a new DefinedNode node + # + # source://prism//lib/prism/dsl.rb#274 + def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ElseNode node + # + # source://prism//lib/prism/dsl.rb#279 + def ElseNode(else_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new EmbeddedStatementsNode node + # + # source://prism//lib/prism/dsl.rb#284 + def EmbeddedStatementsNode(opening_loc, statements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new EmbeddedVariableNode node + # + # source://prism//lib/prism/dsl.rb#289 + def EmbeddedVariableNode(operator_loc, variable, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new EnsureNode node + # + # source://prism//lib/prism/dsl.rb#294 + def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new FalseNode node + # + # source://prism//lib/prism/dsl.rb#299 + def FalseNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new FindPatternNode node + # + # source://prism//lib/prism/dsl.rb#304 + def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new FlipFlopNode node + # + # source://prism//lib/prism/dsl.rb#309 + def FlipFlopNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new FloatNode node + # + # source://prism//lib/prism/dsl.rb#314 + def FloatNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ForNode node + # + # source://prism//lib/prism/dsl.rb#319 + 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 + + # Create a new ForwardingArgumentsNode node + # + # source://prism//lib/prism/dsl.rb#324 + def ForwardingArgumentsNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ForwardingParameterNode node + # + # source://prism//lib/prism/dsl.rb#329 + def ForwardingParameterNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ForwardingSuperNode node + # + # source://prism//lib/prism/dsl.rb#334 + def ForwardingSuperNode(block, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#339 + def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#344 + def GlobalVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#349 + def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#354 + def GlobalVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#359 + def GlobalVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#364 + def GlobalVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new HashNode node + # + # source://prism//lib/prism/dsl.rb#369 + def HashNode(opening_loc, elements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new HashPatternNode node + # + # source://prism//lib/prism/dsl.rb#374 + def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IfNode node + # + # source://prism//lib/prism/dsl.rb#379 + def IfNode(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ImaginaryNode node + # + # source://prism//lib/prism/dsl.rb#384 + def ImaginaryNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ImplicitNode node + # + # source://prism//lib/prism/dsl.rb#389 + def ImplicitNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ImplicitRestNode node + # + # source://prism//lib/prism/dsl.rb#394 + def ImplicitRestNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InNode node + # + # source://prism//lib/prism/dsl.rb#399 + def InNode(pattern, statements, in_loc, then_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IndexAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#404 + 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 + + # Create a new IndexOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#409 + def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IndexOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#414 + 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 + + # Create a new IndexTargetNode node + # + # source://prism//lib/prism/dsl.rb#419 + def IndexTargetNode(flags, receiver, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#424 + def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#429 + def InstanceVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#434 + def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#439 + def InstanceVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#444 + def InstanceVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#449 + def InstanceVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IntegerNode node + # + # source://prism//lib/prism/dsl.rb#454 + def IntegerNode(flags, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/dsl.rb#459 + def InterpolatedMatchLastLineNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/dsl.rb#464 + def InterpolatedRegularExpressionNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InterpolatedStringNode node + # + # source://prism//lib/prism/dsl.rb#469 + def InterpolatedStringNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InterpolatedSymbolNode node + # + # source://prism//lib/prism/dsl.rb#474 + def InterpolatedSymbolNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InterpolatedXStringNode node + # + # source://prism//lib/prism/dsl.rb#479 + def InterpolatedXStringNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new KeywordHashNode node + # + # source://prism//lib/prism/dsl.rb#484 + def KeywordHashNode(flags, elements, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new KeywordRestParameterNode node + # + # source://prism//lib/prism/dsl.rb#489 + def KeywordRestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LambdaNode node + # + # source://prism//lib/prism/dsl.rb#494 + def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#499 + def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#504 + def LocalVariableOperatorWriteNode(name_loc, operator_loc, value, name, operator, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#509 + def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#514 + def LocalVariableReadNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#519 + def LocalVariableTargetNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#524 + def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new Location object + # + # source://prism//lib/prism/dsl.rb#44 + def Location(source = T.unsafe(nil), start_offset = T.unsafe(nil), length = T.unsafe(nil)); end + + # Create a new MatchLastLineNode node + # + # source://prism//lib/prism/dsl.rb#529 + def MatchLastLineNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MatchPredicateNode node + # + # source://prism//lib/prism/dsl.rb#534 + def MatchPredicateNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MatchRequiredNode node + # + # source://prism//lib/prism/dsl.rb#539 + def MatchRequiredNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MatchWriteNode node + # + # source://prism//lib/prism/dsl.rb#544 + def MatchWriteNode(call, targets, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MissingNode node + # + # source://prism//lib/prism/dsl.rb#549 + def MissingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ModuleNode node + # + # source://prism//lib/prism/dsl.rb#554 + def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MultiTargetNode node + # + # source://prism//lib/prism/dsl.rb#559 + def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MultiWriteNode node + # + # source://prism//lib/prism/dsl.rb#564 + def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NextNode node + # + # source://prism//lib/prism/dsl.rb#569 + def NextNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NilNode node + # + # source://prism//lib/prism/dsl.rb#574 + def NilNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NoKeywordsParameterNode node + # + # source://prism//lib/prism/dsl.rb#579 + def NoKeywordsParameterNode(operator_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NumberedParametersNode node + # + # source://prism//lib/prism/dsl.rb#584 + def NumberedParametersNode(maximum, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NumberedReferenceReadNode node + # + # source://prism//lib/prism/dsl.rb#589 + def NumberedReferenceReadNode(number, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new OptionalKeywordParameterNode node + # + # source://prism//lib/prism/dsl.rb#594 + def OptionalKeywordParameterNode(flags, name, name_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new OptionalParameterNode node + # + # source://prism//lib/prism/dsl.rb#599 + def OptionalParameterNode(flags, name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new OrNode node + # + # source://prism//lib/prism/dsl.rb#604 + def OrNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ParametersNode node + # + # source://prism//lib/prism/dsl.rb#609 + def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ParenthesesNode node + # + # source://prism//lib/prism/dsl.rb#614 + def ParenthesesNode(body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new PinnedExpressionNode node + # + # source://prism//lib/prism/dsl.rb#619 + def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new PinnedVariableNode node + # + # source://prism//lib/prism/dsl.rb#624 + def PinnedVariableNode(variable, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new PostExecutionNode node + # + # source://prism//lib/prism/dsl.rb#629 + def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new PreExecutionNode node + # + # source://prism//lib/prism/dsl.rb#634 + def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ProgramNode node + # + # source://prism//lib/prism/dsl.rb#639 + def ProgramNode(locals, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RangeNode node + # + # source://prism//lib/prism/dsl.rb#644 + def RangeNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RationalNode node + # + # source://prism//lib/prism/dsl.rb#649 + def RationalNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RedoNode node + # + # source://prism//lib/prism/dsl.rb#654 + def RedoNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RegularExpressionNode node + # + # source://prism//lib/prism/dsl.rb#659 + def RegularExpressionNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RequiredKeywordParameterNode node + # + # source://prism//lib/prism/dsl.rb#664 + def RequiredKeywordParameterNode(flags, name, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RequiredParameterNode node + # + # source://prism//lib/prism/dsl.rb#669 + def RequiredParameterNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RescueModifierNode node + # + # source://prism//lib/prism/dsl.rb#674 + def RescueModifierNode(expression, keyword_loc, rescue_expression, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RescueNode node + # + # source://prism//lib/prism/dsl.rb#679 + def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RestParameterNode node + # + # source://prism//lib/prism/dsl.rb#684 + def RestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RetryNode node + # + # source://prism//lib/prism/dsl.rb#689 + def RetryNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ReturnNode node + # + # source://prism//lib/prism/dsl.rb#694 + def ReturnNode(keyword_loc, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SelfNode node + # + # source://prism//lib/prism/dsl.rb#699 + def SelfNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SingletonClassNode node + # + # source://prism//lib/prism/dsl.rb#704 + def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SourceEncodingNode node + # + # source://prism//lib/prism/dsl.rb#709 + def SourceEncodingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SourceFileNode node + # + # source://prism//lib/prism/dsl.rb#714 + def SourceFileNode(filepath, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SourceLineNode node + # + # source://prism//lib/prism/dsl.rb#719 + def SourceLineNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SplatNode node + # + # source://prism//lib/prism/dsl.rb#724 + def SplatNode(operator_loc, expression, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new StatementsNode node + # + # source://prism//lib/prism/dsl.rb#729 + def StatementsNode(body, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new StringNode node + # + # source://prism//lib/prism/dsl.rb#734 + def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SuperNode node + # + # source://prism//lib/prism/dsl.rb#739 + def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SymbolNode node + # + # source://prism//lib/prism/dsl.rb#744 + def SymbolNode(flags, opening_loc, value_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new TrueNode node + # + # source://prism//lib/prism/dsl.rb#749 + def TrueNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new UndefNode node + # + # source://prism//lib/prism/dsl.rb#754 + def UndefNode(names, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new UnlessNode node + # + # source://prism//lib/prism/dsl.rb#759 + def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new UntilNode node + # + # source://prism//lib/prism/dsl.rb#764 + def UntilNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new WhenNode node + # + # source://prism//lib/prism/dsl.rb#769 + def WhenNode(keyword_loc, conditions, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new WhileNode node + # + # source://prism//lib/prism/dsl.rb#774 + def WhileNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new XStringNode node + # + # source://prism//lib/prism/dsl.rb#779 + def XStringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new YieldNode node + # + # source://prism//lib/prism/dsl.rb#784 + def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end +end + +# This module is used for testing and debugging and is not meant to be used by +# consumers of this library. +# +# source://prism//lib/prism/debug.rb#6 +module Prism::Debug + class << self + # :call-seq: + # Debug::cruby_locals(source) -> Array + # + # For the given source, compiles with CRuby and returns a list of all of the + # sets of local variables that were encountered. + # + # source://prism//lib/prism/debug.rb#54 + def cruby_locals(source); end + + def format_errors(_arg0, _arg1); end + def inspect_node(_arg0); end + def memsize(_arg0); end + def named_captures(_arg0); end + + # :call-seq: + # Debug::newlines(source) -> Array + # + # For the given source string, return the byte offsets of every newline in + # the source. + # + # source://prism//lib/prism/debug.rb#202 + def newlines(source); end + + # :call-seq: + # Debug::prism_locals(source) -> Array + # + # For the given source, parses with prism and returns a list of all of the + # sets of local variables that were encountered. + # + # source://prism//lib/prism/debug.rb#98 + def prism_locals(source); end + + def profile_file(_arg0); end + end +end + +# Used to hold the place of a local that will be in the local table but +# cannot be accessed directly from the source code. For example, the +# iteration variable in a for loop or the positional parameter on a method +# definition that is destructured. +# +# source://prism//lib/prism/debug.rb#90 +Prism::Debug::AnonymousLocal = T.let(T.unsafe(nil), Object) + +# A wrapper around a RubyVM::InstructionSequence that provides a more +# convenient interface for accessing parts of the iseq. +# +# source://prism//lib/prism/debug.rb#9 +class Prism::Debug::ISeq + # @return [ISeq] a new instance of ISeq + # + # source://prism//lib/prism/debug.rb#12 + def initialize(parts); end + + # source://prism//lib/prism/debug.rb#28 + def each_child; end + + # source://prism//lib/prism/debug.rb#24 + def instructions; end + + # source://prism//lib/prism/debug.rb#20 + def local_table; end + + # source://prism//lib/prism/debug.rb#10 + def parts; end + + # source://prism//lib/prism/debug.rb#16 + def type; end +end + +# Represents a method definition. +# +# def method +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5889 +class Prism::DefNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Node? receiver, ParametersNode? parameters, 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 + # + # @return [DefNode] a new instance of DefNode + # + # source://prism//lib/prism/node.rb#5891 + 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 accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5910 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#5977 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5915 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5929 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5920 + def compact_child_nodes; end + + # def copy: (**params) -> DefNode + # + # source://prism//lib/prism/node.rb#5934 + sig { params(params: T.untyped).returns(Prism::DefNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5915 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: 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 } + # + # source://prism//lib/prism/node.rb#5957 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def def_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6050 + sig { returns(String) } + def def_keyword; end + + # attr_reader def_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5983 + sig { returns(Prism::Location) } + def def_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#6075 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#6037 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def equal: () -> String? + # + # source://prism//lib/prism/node.rb#6070 + sig { returns(T.nilable(String)) } + def equal; end + + # attr_reader equal_loc: Location? + # + # source://prism//lib/prism/node.rb#6025 + sig { returns(T.nilable(Prism::Location)) } + def equal_loc; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#6080 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#5980 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#6060 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#6001 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#5962 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#5965 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#6055 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#5989 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#5974 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#5971 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#6065 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#6013 + 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 + # + # source://prism//lib/prism/node.rb#6126 + 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#6136 + def type; end + end +end + +# Represents the use of the `defined?` keyword. +# +# defined?(a) +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6145 +class Prism::DefinedNode < ::Prism::Node + # def initialize: (Location? lparen_loc, Node value, Location? rparen_loc, Location keyword_loc, Location location) -> void + # + # @return [DefinedNode] a new instance of DefinedNode + # + # source://prism//lib/prism/node.rb#6147 + def initialize(source, lparen_loc, value, rparen_loc, keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6158 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6163 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6173 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6168 + def compact_child_nodes; end + + # def copy: (**params) -> DefinedNode + # + # source://prism//lib/prism/node.rb#6178 + sig { params(params: T.untyped).returns(Prism::DefinedNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6163 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#6193 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#6247 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#6242 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6225 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#6232 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#6198 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#6237 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#6213 + 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 + # + # source://prism//lib/prism/node.rb#6271 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#6210 + 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 + # + # source://prism//lib/prism/node.rb#6281 + def type; end + end +end + +# source://prism//lib/prism/desugar_compiler.rb#4 +class Prism::DesugarAndWriteNode + # @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 + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def arguments; end + + # Desugar `x &&= y` to `x && x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#16 + def compile; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + 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 + 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#216 +class Prism::DesugarCompiler < ::Prism::MutationCompiler + # @@foo &&= bar + # + # becomes + # + # @@foo && @@foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#222 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # + # becomes + # + # @@foo = @@foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#240 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # + # becomes + # + # defined?(@@foo) ? @@foo : @@foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#231 + def visit_class_variable_or_write_node(node); end + + # Foo &&= bar + # + # becomes + # + # Foo && Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#249 + def visit_constant_and_write_node(node); end + + # Foo += bar + # + # becomes + # + # Foo = Foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#267 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # + # becomes + # + # defined?(Foo) ? Foo : Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#258 + def visit_constant_or_write_node(node); end + + # $foo &&= bar + # + # becomes + # + # $foo && $foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#276 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # + # becomes + # + # $foo = $foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#294 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # + # becomes + # + # defined?($foo) ? $foo : $foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#285 + def visit_global_variable_or_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#303 + def visit_instance_variable_and_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#321 + def visit_instance_variable_operator_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#312 + def visit_instance_variable_or_write_node(node); end + + # foo &&= bar + # + # becomes + # + # foo && foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#330 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # + # becomes + # + # foo = foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#348 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # + # becomes + # + # foo || foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#339 + def visit_local_variable_or_write_node(node); end +end + +# source://prism//lib/prism/desugar_compiler.rb#63 +class Prism::DesugarOperatorWriteNode + # @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 + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def arguments; end + + # Desugar `x += y` to `x = x + y` + # + # source://prism//lib/prism/desugar_compiler.rb#75 + def compile; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + 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 + def write_class; end +end + +# source://prism//lib/prism/desugar_compiler.rb#27 +class Prism::DesugarOrWriteDefinedNode + # @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 + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def arguments; end + + # Desugar `x ||= y` to `defined?(x) ? x : x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#39 + def compile; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + 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 + def write_class; end +end + +# source://prism//lib/prism/desugar_compiler.rb#99 +class Prism::DesugarOrWriteNode + # @return [DesugarOrWriteNode] a new instance of DesugarOrWriteNode + # + # source://prism//lib/prism/desugar_compiler.rb#102 + def initialize(node, source, read_class, write_class, *arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#100 + def arguments; end + + # Desugar `x ||= y` to `x || x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#111 + def compile; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#100 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#100 + def read_class; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/desugar_compiler.rb#100 + def source; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#100 + def write_class; end +end + +# The dispatcher class fires events for nodes that are found while walking an +# AST to all registered listeners. It's useful for performing different types +# of analysis on the AST while only having to walk the tree once. +# +# To use the dispatcher, you would first instantiate it and register listeners +# for the events you're interested in: +# +# class OctalListener +# def on_integer_node_enter(node) +# if node.octal? && !node.slice.start_with?("0o") +# warn("Octal integers should be written with the 0o prefix") +# end +# end +# end +# +# dispatcher = Dispatcher.new +# dispatcher.register(listener, :on_integer_node_enter) +# +# Then, you can walk any number of trees and dispatch events to the listeners: +# +# result = Prism.parse("001 + 002 + 003") +# dispatcher.dispatch(result.value) +# +# Optionally, you can also use `#dispatch_once` to dispatch enter and leave +# events for a single node without recursing further down the tree. This can +# be useful in circumstances where you want to reuse the listeners you already +# have registers but want to stop walking the tree at a certain point. +# +# integer = result.value.statements.body.first.receiver.receiver +# dispatcher.dispatch_once(integer) +# +# source://prism//lib/prism/dispatcher.rb#40 +class Prism::Dispatcher < ::Prism::Visitor + # Initialize a new dispatcher. + # + # @return [Dispatcher] a new instance of Dispatcher + # + # source://prism//lib/prism/dispatcher.rb#45 + def initialize; end + + # Walks `root` dispatching events to all registered listeners. + # + # def dispatch: (Node) -> void + # + # source://prism//lib/prism/visitor.rb#16 + def dispatch(node); end + + # Dispatches a single event for `node` to all registered listeners. + # + # def dispatch_once: (Node) -> void + # + # source://prism//lib/prism/dispatcher.rb#64 + def dispatch_once(node); end + + # attr_reader listeners: Hash[Symbol, Array[Listener]] + # + # source://prism//lib/prism/dispatcher.rb#42 + def listeners; end + + # Register a listener for one or more events. + # + # def register: (Listener, *Symbol) -> void + # + # source://prism//lib/prism/dispatcher.rb#52 + def register(listener, *events); end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#70 + 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#78 + 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#86 + 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#94 + 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#102 + 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#110 + 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#118 + 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#126 + 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#134 + 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#142 + 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#150 + 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#158 + 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#166 + 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#174 + 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#182 + 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#190 + 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#198 + 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#206 + 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#214 + 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#222 + 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#230 + 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#238 + 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#246 + 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#254 + 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#262 + 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#270 + 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#278 + 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#286 + 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#294 + 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#302 + 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#310 + 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#318 + 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#326 + 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#334 + 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#342 + 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#350 + 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#358 + 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#366 + 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#374 + 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#382 + 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#390 + 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#398 + 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#406 + 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#414 + 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#422 + 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#430 + 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#438 + 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#446 + 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#454 + 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#462 + 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#470 + 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#478 + 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#486 + 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#494 + 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#502 + 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#510 + 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#518 + 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#526 + 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#534 + 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#542 + 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#550 + 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#558 + 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#566 + 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#574 + 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#582 + 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#590 + 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#598 + 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#606 + 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#614 + 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#622 + 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#630 + 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#638 + 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#646 + 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#654 + 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#662 + 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#670 + 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#678 + 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#686 + 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#694 + 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#702 + 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#710 + 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#718 + 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#726 + 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#734 + 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#742 + 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#750 + 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#758 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#766 + 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#774 + 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#782 + 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#790 + 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#798 + 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#806 + 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#814 + 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#822 + 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#830 + 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#838 + 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#846 + 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#854 + 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#862 + 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#870 + 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#878 + 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#886 + 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#894 + 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#902 + 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#910 + 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#918 + 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#926 + 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#934 + 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#942 + 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#950 + 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#958 + 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#966 + 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#974 + 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#982 + 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#990 + 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#998 + 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#1006 + 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#1014 + 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#1022 + 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#1030 + 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#1038 + 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#1046 + 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#1054 + 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#1062 + 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#1070 + 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#1078 + 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#1086 + 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#1094 + 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#1102 + 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#1110 + def visit_self_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1118 + 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#1126 + 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#1134 + 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#1142 + 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#1150 + 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#1158 + 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#1166 + 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#1174 + 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#1182 + 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#1190 + 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#1198 + 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#1206 + 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#1214 + 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#1222 + 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#1230 + 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#1238 + 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#1246 + def visit_yield_node(node); end +end + +# source://prism//lib/prism/dispatcher.rb#1252 +class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor + # @return [DispatchOnce] a new instance of DispatchOnce + # + # source://prism//lib/prism/dispatcher.rb#1255 + def initialize(listeners); end + + # Returns the value of attribute listeners. + # + # source://prism//lib/prism/dispatcher.rb#1253 + def listeners; end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1260 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1266 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1272 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1278 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1284 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1290 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1296 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1302 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1308 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1314 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1320 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1326 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1332 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1338 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1344 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1350 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1356 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1362 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1368 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1374 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1380 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CallTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1386 + def visit_call_target_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1392 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseMatchNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1398 + def visit_case_match_node(node); end + + # Dispatch enter and leave events for CaseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1404 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1410 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1416 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1422 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1428 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1434 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1440 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1446 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1452 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1458 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1464 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1470 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1476 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1482 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1488 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1494 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1500 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1506 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1512 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1518 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1524 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1530 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1536 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1542 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1548 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1554 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1560 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1566 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1572 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1578 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1584 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1590 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1596 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1602 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1608 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1614 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1620 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1626 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1632 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1638 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1644 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1650 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1656 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1662 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1668 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for ImplicitRestNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1674 + def visit_implicit_rest_node(node); end + + # Dispatch enter and leave events for InNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1680 + def visit_in_node(node); end + + # Dispatch enter and leave events for IndexAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1686 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1692 + def visit_index_operator_write_node(node); end + + # Dispatch enter and leave events for IndexOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1698 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for IndexTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1704 + def visit_index_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1710 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1716 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1722 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1728 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1734 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1740 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1746 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1752 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1758 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1764 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1770 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1776 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1782 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1788 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1794 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1800 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1806 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1812 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1818 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1824 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1830 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1836 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1842 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1848 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1854 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1860 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1866 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1872 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1878 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1884 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1890 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1896 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1902 + def visit_numbered_parameters_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1908 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1914 + def visit_optional_keyword_parameter_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1920 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1926 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1932 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1938 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1944 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1950 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1956 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1962 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1968 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1974 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1980 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1986 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1992 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1998 + def visit_required_keyword_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2004 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2010 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2016 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2022 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2028 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2034 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2040 + def visit_self_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2046 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2052 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2058 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2064 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2070 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2076 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2082 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2088 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2094 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2100 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2106 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2112 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2118 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2124 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2130 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2136 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2142 + def visit_yield_node(node); end +end + +# This visitor provides the ability to call Node#to_dot, which converts a +# subtree into a graphviz dot graph. +# +# source://prism//lib/prism/dot_visitor.rb#13 +class Prism::DotVisitor < ::Prism::Visitor + # Initialize a new dot visitor. + # + # @return [DotVisitor] a new instance of DotVisitor + # + # source://prism//lib/prism/dot_visitor.rb#105 + def initialize; end + + # The digraph that is being built. + # + # source://prism//lib/prism/dot_visitor.rb#102 + def digraph; end + + # Convert this visitor into a graphviz dot graph string. + # + # source://prism//lib/prism/dot_visitor.rb#110 + def to_dot; end + + # Visit a AliasGlobalVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#115 + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node. + # + # source://prism//lib/prism/dot_visitor.rb#140 + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#165 + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node. + # + # source://prism//lib/prism/dot_visitor.rb#190 + def visit_and_node(node); end + + # Visit a ArgumentsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#215 + def visit_arguments_node(node); end + + # Visit a ArrayNode node. + # + # source://prism//lib/prism/dot_visitor.rb#245 + def visit_array_node(node); end + + # Visit a ArrayPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#285 + def visit_array_pattern_node(node); end + + # Visit a AssocNode node. + # + # source://prism//lib/prism/dot_visitor.rb#347 + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#374 + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#397 + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node. + # + # source://prism//lib/prism/dot_visitor.rb#414 + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node. + # + # source://prism//lib/prism/dot_visitor.rb#462 + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#485 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node. + # + # source://prism//lib/prism/dot_visitor.rb#505 + def visit_block_node(node); end + + # Visit a BlockParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#540 + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#568 + def visit_block_parameters_node(node); end + + # Visit a BreakNode node. + # + # source://prism//lib/prism/dot_visitor.rb#611 + def visit_break_node(node); end + + # Visit a CallAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#634 + def visit_call_and_write_node(node); end + + # Visit a CallNode node. + # + # source://prism//lib/prism/dot_visitor.rb#680 + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#738 + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#787 + def visit_call_or_write_node(node); end + + # Visit a CallTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#833 + def visit_call_target_node(node); end + + # Visit a CapturePatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#863 + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node. + # + # source://prism//lib/prism/dot_visitor.rb#888 + def visit_case_match_node(node); end + + # Visit a CaseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#933 + def visit_case_node(node); end + + # Visit a ClassNode node. + # + # source://prism//lib/prism/dot_visitor.rb#978 + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1025 + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1052 + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1082 + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1109 + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1126 + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1143 + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1172 + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1199 + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1229 + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1256 + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1281 + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1308 + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1336 + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1361 + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1388 + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1413 + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1430 + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1447 + def visit_constant_write_node(node); end + + # Visit a DefNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1474 + def visit_def_node(node); end + + # Visit a DefinedNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1543 + def visit_defined_node(node); end + + # Visit a ElseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1574 + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1602 + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1628 + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1649 + def visit_ensure_node(node); end + + # Visit a FalseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1675 + def visit_false_node(node); end + + # Visit a FindPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1689 + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1740 + def visit_flip_flop_node(node); end + + # Visit a FloatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1772 + def visit_float_node(node); end + + # Visit a ForNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1786 + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1828 + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1842 + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1856 + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1876 + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1903 + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1933 + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1960 + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1977 + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1994 + def visit_global_variable_write_node(node); end + + # Visit a HashNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2021 + def visit_hash_node(node); end + + # Visit a HashPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2054 + def visit_hash_pattern_node(node); end + + # Visit a IfNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2103 + def visit_if_node(node); end + + # Visit a ImaginaryNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2148 + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2166 + def visit_implicit_node(node); end + + # Visit a ImplicitRestNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2184 + def visit_implicit_rest_node(node); end + + # Visit a InNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2198 + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2230 + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2283 + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2339 + def visit_index_or_write_node(node); end + + # Visit a IndexTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2392 + def visit_index_target_node(node); end + + # Visit a InstanceVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2431 + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2458 + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2488 + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2515 + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2532 + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2549 + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2576 + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2593 + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2629 + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2665 + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2702 + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2739 + def visit_interpolated_x_string_node(node); end + + # Visit a KeywordHashNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2772 + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2802 + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2830 + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2868 + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2898 + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2931 + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2961 + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2981 + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3001 + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3031 + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3060 + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3085 + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3110 + def visit_match_write_node(node); end + + # Visit a MissingNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3141 + def visit_missing_node(node); end + + # Visit a ModuleNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3155 + def visit_module_node(node); end + + # Visit a MultiTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3191 + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3247 + def visit_multi_write_node(node); end + + # Visit a NextNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3310 + def visit_next_node(node); end + + # Visit a NilNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3333 + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3347 + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3367 + def visit_numbered_parameters_node(node); end + + # Visit a NumberedReferenceReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3384 + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3401 + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3428 + def visit_optional_parameter_node(node); end + + # Visit a OrNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3458 + def visit_or_node(node); end + + # Visit a ParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3483 + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3567 + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3593 + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3620 + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3641 + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3670 + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3699 + def visit_program_node(node); end + + # Visit a RangeNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3720 + def visit_range_node(node); end + + # Visit a RationalNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3752 + def visit_rational_node(node); end + + # Visit a RedoNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3770 + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3784 + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3813 + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3836 + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3856 + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3881 + def visit_rescue_node(node); end + + # Visit a RestParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3934 + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3962 + def visit_retry_node(node); end + + # Visit a ReturnNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3976 + def visit_return_node(node); end + + # Visit a SelfNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3999 + def visit_self_node(node); end + + # Visit a SingletonClassNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4013 + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4049 + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4063 + def visit_source_file_node(node); end + + # Visit a SourceLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4080 + def visit_source_line_node(node); end + + # Visit a SplatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4094 + def visit_splat_node(node); end + + # Visit a StatementsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4117 + def visit_statements_node(node); end + + # Visit a StringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4144 + def visit_string_node(node); end + + # Visit a SuperNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4177 + def visit_super_node(node); end + + # Visit a SymbolNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4216 + def visit_symbol_node(node); end + + # Visit a TrueNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4251 + def visit_true_node(node); end + + # Visit a UndefNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4265 + def visit_undef_node(node); end + + # Visit a UnlessNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4295 + def visit_unless_node(node); end + + # Visit a UntilNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4338 + def visit_until_node(node); end + + # Visit a WhenNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4373 + def visit_when_node(node); end + + # Visit a WhileNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4409 + def visit_while_node(node); end + + # Visit a XStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4444 + def visit_x_string_node(node); end + + # Visit a YieldNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4473 + def visit_yield_node(node); end + + private + + # 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#4519 + def arguments_node_flags_inspect(node); end + + # Inspect a node that has array_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4527 + def array_node_flags_inspect(node); end + + # Inspect a node that has call_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4535 + def call_node_flags_inspect(node); end + + # Inspect a node that has encoding_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4546 + def encoding_flags_inspect(node); end + + # Inspect a node that has integer_base_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4555 + def integer_base_flags_inspect(node); end + + # Inspect a node that has keyword_hash_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4566 + def keyword_hash_node_flags_inspect(node); end + + # Inspect a location to display the start and end line and column numbers. + # + # source://prism//lib/prism/dot_visitor.rb#4513 + def location_inspect(location); end + + # Inspect a node that has loop_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4574 + def loop_flags_inspect(node); end + + # Generate a unique node ID for a node throughout the digraph. + # + # source://prism//lib/prism/dot_visitor.rb#4508 + def node_id(node); end + + # Inspect a node that has parameter_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4582 + def parameter_flags_inspect(node); end + + # Inspect a node that has range_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4590 + def range_flags_inspect(node); end + + # Inspect a node that has regular_expression_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4598 + def regular_expression_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#4616 + 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#4626 + def symbol_flags_inspect(node); end +end + +# source://prism//lib/prism/dot_visitor.rb#58 +class Prism::DotVisitor::Digraph + # @return [Digraph] a new instance of Digraph + # + # source://prism//lib/prism/dot_visitor.rb#61 + def initialize; end + + # source://prism//lib/prism/dot_visitor.rb#75 + def edge(value); end + + # Returns the value of attribute edges. + # + # source://prism//lib/prism/dot_visitor.rb#59 + def edges; end + + # source://prism//lib/prism/dot_visitor.rb#67 + def node(value); end + + # Returns the value of attribute nodes. + # + # source://prism//lib/prism/dot_visitor.rb#59 + def nodes; end + + # source://prism//lib/prism/dot_visitor.rb#79 + def to_dot; end + + # source://prism//lib/prism/dot_visitor.rb#71 + def waypoint(value); end + + # Returns the value of attribute waypoints. + # + # source://prism//lib/prism/dot_visitor.rb#59 + def waypoints; end +end + +# source://prism//lib/prism/dot_visitor.rb#14 +class Prism::DotVisitor::Field + # @return [Field] a new instance of Field + # + # source://prism//lib/prism/dot_visitor.rb#17 + def initialize(name, value, port); end + + # Returns the value of attribute name. + # + # source://prism//lib/prism/dot_visitor.rb#15 + def name; end + + # Returns the value of attribute port. + # + # source://prism//lib/prism/dot_visitor.rb#15 + def port; end + + # source://prism//lib/prism/dot_visitor.rb#23 + def to_dot; end + + # Returns the value of attribute value. + # + # source://prism//lib/prism/dot_visitor.rb#15 + def value; end +end + +# source://prism//lib/prism/dot_visitor.rb#32 +class Prism::DotVisitor::Table + # @return [Table] a new instance of Table + # + # source://prism//lib/prism/dot_visitor.rb#35 + def initialize(name); end + + # source://prism//lib/prism/dot_visitor.rb#40 + def field(name, value = T.unsafe(nil), port: T.unsafe(nil)); end + + # Returns the value of attribute fields. + # + # source://prism//lib/prism/dot_visitor.rb#33 + def fields; end + + # Returns the value of attribute name. + # + # source://prism//lib/prism/dot_visitor.rb#33 + def name; end + + # source://prism//lib/prism/dot_visitor.rb#44 + def to_dot; end +end + +# Represents an `else` clause in a `case`, `if`, or `unless` statement. +# +# if a then b else c end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6290 +class Prism::ElseNode < ::Prism::Node + # def initialize: (Location else_keyword_loc, StatementsNode? statements, Location? end_keyword_loc, Location location) -> void + # + # @return [ElseNode] a new instance of ElseNode + # + # source://prism//lib/prism/node.rb#6292 + def initialize(source, else_keyword_loc, statements, end_keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6302 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6307 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6319 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6312 + def compact_child_nodes; end + + # def copy: (**params) -> ElseNode + # + # source://prism//lib/prism/node.rb#6324 + sig { params(params: T.untyped).returns(Prism::ElseNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6307 + sig { 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 } + # + # source://prism//lib/prism/node.rb#6338 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def else_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6365 + sig { returns(String) } + def else_keyword; end + + # attr_reader else_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6343 + sig { returns(Prism::Location) } + def else_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#6370 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#6352 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#6375 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#6349 + 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 + # + # source://prism//lib/prism/node.rb#6402 + 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#6412 + def type; end + end +end + +# EmbDocComment objects correspond to comments that are surrounded by =begin +# and =end. +# +# source://prism//lib/prism/parse_result.rb#290 +class Prism::EmbDocComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#297 + def inspect; end + + # This can only be true for inline comments. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#292 + def trailing?; end +end + +# Represents an interpolated set of statements. +# +# "foo #{bar}" +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#6421 +class Prism::EmbeddedStatementsNode < ::Prism::Node + # def initialize: (Location opening_loc, StatementsNode? statements, Location closing_loc, Location location) -> void + # + # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#6423 + def initialize(source, opening_loc, statements, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6433 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6438 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#6495 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#6483 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6450 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6443 + def compact_child_nodes; end + + # def copy: (**params) -> EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#6455 + sig { params(params: T.untyped).returns(Prism::EmbeddedStatementsNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6438 + sig { 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 } + # + # source://prism//lib/prism/node.rb#6469 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#6500 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#6490 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#6474 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#6480 + 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 + # + # source://prism//lib/prism/node.rb#6527 + 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#6537 + def type; end + end +end + +# Represents an interpolated variable. +# +# "foo #@bar" +# ^^^^^ +# +# source://prism//lib/prism/node.rb#6546 +class Prism::EmbeddedVariableNode < ::Prism::Node + # def initialize: (Location operator_loc, Node variable, Location location) -> void + # + # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#6548 + def initialize(source, operator_loc, variable, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6557 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6562 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6572 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6567 + def compact_child_nodes; end + + # def copy: (**params) -> EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#6577 + sig { params(params: T.untyped).returns(Prism::EmbeddedVariableNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6562 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Node, location: Location } + # + # source://prism//lib/prism/node.rb#6590 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#6610 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6605 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6595 + 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 + # + # source://prism//lib/prism/node.rb#6632 + def type; end + + # attr_reader variable: Node + # + # source://prism//lib/prism/node.rb#6601 + sig { returns(Prism::Node) } + 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 + # + # source://prism//lib/prism/node.rb#6642 + def type; end + end +end + +# Flags for nodes that have unescaped content. +# +# source://prism//lib/prism/node.rb#19268 +module Prism::EncodingFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19273 +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#19270 +Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# Represents an `ensure` clause in a `begin` statement. +# +# begin +# foo +# ensure +# ^^^^^^ +# bar +# end +# +# source://prism//lib/prism/node.rb#6655 +class Prism::EnsureNode < ::Prism::Node + # def initialize: (Location ensure_keyword_loc, StatementsNode? statements, Location end_keyword_loc, Location location) -> void + # + # @return [EnsureNode] a new instance of EnsureNode + # + # source://prism//lib/prism/node.rb#6657 + def initialize(source, ensure_keyword_loc, statements, end_keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6667 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6672 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6684 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6677 + def compact_child_nodes; end + + # def copy: (**params) -> EnsureNode + # + # source://prism//lib/prism/node.rb#6689 + sig { params(params: T.untyped).returns(Prism::EnsureNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6672 + sig { 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 } + # + # source://prism//lib/prism/node.rb#6703 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6729 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6717 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def ensure_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6724 + sig { returns(String) } + def ensure_keyword; end + + # attr_reader ensure_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6708 + sig { returns(Prism::Location) } + def ensure_keyword_loc; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#6734 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#6714 + 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 + # + # source://prism//lib/prism/node.rb#6761 + 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#6771 + def type; end + end +end + +# Represents the use of the literal `false` keyword. +# +# false +# ^^^^^ +# +# source://prism//lib/prism/node.rb#6780 +class Prism::FalseNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [FalseNode] a new instance of FalseNode + # + # source://prism//lib/prism/node.rb#6782 + def initialize(source, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6789 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6794 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6804 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6799 + def compact_child_nodes; end + + # def copy: (**params) -> FalseNode + # + # source://prism//lib/prism/node.rb#6809 + sig { params(params: T.untyped).returns(Prism::FalseNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6794 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#6820 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#6826 + def inspect(inspector = T.unsafe(nil)); 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#6845 + 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#6855 + def type; end + end +end + +# Represents a find pattern in pattern matching. +# +# foo in *bar, baz, *qux +# ^^^^^^^^^^^^^^^ +# +# foo in [*bar, baz, *qux] +# ^^^^^^^^^^^^^^^^^ +# +# foo in Foo(*bar, baz, *qux) +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6870 +class Prism::FindPatternNode < ::Prism::Node + # def initialize: (Node? constant, Node left, Array[Node] requireds, Node right, Location? opening_loc, Location? closing_loc, Location location) -> void + # + # @return [FindPatternNode] a new instance of FindPatternNode + # + # source://prism//lib/prism/node.rb#6872 + def initialize(source, constant, left, requireds, right, opening_loc, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6885 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6890 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#6974 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#6956 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6905 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6895 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://prism//lib/prism/node.rb#6932 + sig { returns(T.nilable(Prism::Node)) } + def constant; end + + # def copy: (**params) -> FindPatternNode + # + # source://prism//lib/prism/node.rb#6910 + sig { params(params: T.untyped).returns(Prism::FindPatternNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6890 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#6927 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#6979 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://prism//lib/prism/node.rb#6935 + sig { returns(Prism::Node) } + def left; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#6969 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#6944 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader requireds: Array[Node] + # + # source://prism//lib/prism/node.rb#6938 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader right: Node + # + # source://prism//lib/prism/node.rb#6941 + 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. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7011 + 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#7021 + def type; end + end +end + +# Represents the use of the `..` or `...` operators to create flip flops. +# +# baz if foo .. bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7030 +class Prism::FlipFlopNode < ::Prism::Node + # def initialize: (Integer flags, Node? left, Node? right, Location operator_loc, Location location) -> void + # + # @return [FlipFlopNode] a new instance of FlipFlopNode + # + # source://prism//lib/prism/node.rb#7032 + def initialize(source, flags, left, right, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7043 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7048 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7061 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7053 + def compact_child_nodes; end + + # def copy: (**params) -> FlipFlopNode + # + # source://prism//lib/prism/node.rb#7066 + sig { params(params: T.untyped).returns(Prism::FlipFlopNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7048 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#7081 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#7103 + sig { returns(T::Boolean) } + def exclude_end?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#7113 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node? + # + # source://prism//lib/prism/node.rb#7090 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#7108 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7096 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Node? + # + # source://prism//lib/prism/node.rb#7093 + 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 + # + # source://prism//lib/prism/node.rb#7147 + def type; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#7086 + 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#7157 + def type; end + end +end + +# Represents a floating point number literal. +# +# 1.0 +# ^^^ +# +# source://prism//lib/prism/node.rb#7166 +class Prism::FloatNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [FloatNode] a new instance of FloatNode + # + # source://prism//lib/prism/node.rb#7168 + def initialize(source, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7175 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7180 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7190 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7185 + def compact_child_nodes; end + + # def copy: (**params) -> FloatNode + # + # source://prism//lib/prism/node.rb#7195 + sig { params(params: T.untyped).returns(Prism::FloatNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7180 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#7206 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#7212 + def inspect(inspector = T.unsafe(nil)); 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#7231 + def type; end + + # Returns the value of the node as a Ruby Float. + # + # source://prism//lib/prism/node_ext.rb#62 + 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 + # + # source://prism//lib/prism/node.rb#7241 + def type; end + end +end + +# Represents the use of the `for` keyword. +# +# for i in a end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7250 +class Prism::ForNode < ::Prism::Node + # def initialize: (Node index, Node collection, StatementsNode? statements, Location for_keyword_loc, Location in_keyword_loc, Location? do_keyword_loc, Location end_keyword_loc, Location location) -> void + # + # @return [ForNode] a new instance of ForNode + # + # source://prism//lib/prism/node.rb#7252 + def initialize(source, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7266 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7271 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # attr_reader collection: Node + # + # source://prism//lib/prism/node.rb#7316 + sig { returns(Prism::Node) } + def collection; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7285 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7276 + def compact_child_nodes; end + + # def copy: (**params) -> ForNode + # + # source://prism//lib/prism/node.rb#7290 + sig { params(params: T.untyped).returns(Prism::ForNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7271 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#7308 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7363 + sig { returns(T.nilable(String)) } + def do_keyword; end + + # attr_reader do_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#7334 + sig { returns(T.nilable(Prism::Location)) } + def do_keyword_loc; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#7368 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#7346 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def for_keyword: () -> String + # + # source://prism//lib/prism/node.rb#7353 + sig { returns(String) } + def for_keyword; end + + # attr_reader for_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#7322 + sig { returns(Prism::Location) } + def for_keyword_loc; end + + # def in_keyword: () -> String + # + # source://prism//lib/prism/node.rb#7358 + sig { returns(String) } + def in_keyword; end + + # attr_reader in_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#7328 + sig { returns(Prism::Location) } + def in_keyword_loc; end + + # attr_reader index: Node + # + # source://prism//lib/prism/node.rb#7313 + sig { returns(Prism::Node) } + def index; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#7373 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#7319 + 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 + # + # source://prism//lib/prism/node.rb#7406 + 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#7416 + def type; end + end +end + +# Represents forwarding all arguments to this method to another method. +# +# def foo(...) +# bar(...) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#7427 +class Prism::ForwardingArgumentsNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#7429 + def initialize(source, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7436 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7441 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7451 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7446 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#7456 + sig { params(params: T.untyped).returns(Prism::ForwardingArgumentsNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7441 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#7467 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#7473 + def inspect(inspector = T.unsafe(nil)); 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#7492 + 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#7502 + def type; end + end +end + +# Represents the use of the forwarding parameter in a method, block, or lambda declaration. +# +# def foo(...) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#7512 +class Prism::ForwardingParameterNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#7514 + def initialize(source, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7521 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7526 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7536 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7531 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#7541 + sig { params(params: T.untyped).returns(Prism::ForwardingParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7526 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#7552 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#7558 + def inspect(inspector = T.unsafe(nil)); 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#7577 + 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#7587 + def type; end + end +end + +# Represents the use of the `super` keyword without parentheses or arguments. +# +# super +# ^^^^^ +# +# source://prism//lib/prism/node.rb#7596 +class Prism::ForwardingSuperNode < ::Prism::Node + # def initialize: (BlockNode? block, Location location) -> void + # + # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#7598 + def initialize(source, block, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7606 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader block: BlockNode? + # + # source://prism//lib/prism/node.rb#7645 + sig { returns(T.nilable(Prism::BlockNode)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7611 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7623 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7616 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#7628 + sig { params(params: T.untyped).returns(Prism::ForwardingSuperNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7611 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { block: BlockNode?, location: Location } + # + # source://prism//lib/prism/node.rb#7640 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#7649 + def inspect(inspector = T.unsafe(nil)); 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#7674 + 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#7684 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a global variable. +# +# $target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7693 +class Prism::GlobalVariableAndWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # + # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#7695 + def initialize(source, name, name_loc, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7706 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7711 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7721 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7716 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#7726 + sig { params(params: T.untyped).returns(Prism::GlobalVariableAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7711 + sig { 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: Node, location: Location } + # + # source://prism//lib/prism/node.rb#7741 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#161 + def desugar; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#7770 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#7746 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#7749 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#7765 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7755 + 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 + # + # source://prism//lib/prism/node.rb#7794 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#7761 + 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 + # + # source://prism//lib/prism/node.rb#7804 + def type; end + end +end + +# Represents assigning to a global variable using an operator that isn't `=`. +# +# $target += value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7813 +class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + # + # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#7815 + def initialize(source, name, name_loc, operator_loc, value, operator, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7827 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7832 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7842 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7837 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#7847 + sig { params(params: T.untyped).returns(Prism::GlobalVariableOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7832 + sig { 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: Node, operator: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#7863 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#173 + def desugar; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#7890 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#7868 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#7871 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#7886 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7877 + 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 + # + # source://prism//lib/prism/node.rb#7915 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#7883 + 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 + # + # source://prism//lib/prism/node.rb#7925 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a global variable. +# +# $target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7934 +class Prism::GlobalVariableOrWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # + # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#7936 + def initialize(source, name, name_loc, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7947 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7952 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7962 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7957 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#7967 + sig { params(params: T.untyped).returns(Prism::GlobalVariableOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7952 + sig { 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: Node, location: Location } + # + # source://prism//lib/prism/node.rb#7982 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#167 + def desugar; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#8011 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#7987 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#7990 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8006 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7996 + 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 + # + # source://prism//lib/prism/node.rb#8035 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#8002 + 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 + # + # source://prism//lib/prism/node.rb#8045 + def type; end + end +end + +# Represents referencing a global variable. +# +# $foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#8054 +class Prism::GlobalVariableReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#8056 + def initialize(source, name, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8064 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8069 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8079 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8074 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#8084 + sig { params(params: T.untyped).returns(Prism::GlobalVariableReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8069 + sig { 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#8096 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#8109 + def inspect(inspector = T.unsafe(nil)); end + + # The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol. + # + # $foo # name `:$foo` + # + # $_Test # name `:$_Test` + # + # source://prism//lib/prism/node.rb#8105 + 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#8129 + 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#8139 + def type; end + end +end + +# Represents writing to a global variable in a context that doesn't have an explicit value. +# +# $foo, $bar = baz +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#8148 +class Prism::GlobalVariableTargetNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#8150 + def initialize(source, name, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8158 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8163 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8173 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8168 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#8178 + sig { params(params: T.untyped).returns(Prism::GlobalVariableTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8163 + sig { 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#8190 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#8199 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8195 + 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#8219 + 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#8229 + def type; end + end +end + +# Represents writing to a global variable. +# +# $foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8238 +class Prism::GlobalVariableWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void + # + # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#8240 + def initialize(source, name, name_loc, value, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8251 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8256 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8266 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8261 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#8271 + sig { params(params: T.untyped).returns(Prism::GlobalVariableWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8256 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#8286 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#8315 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8291 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8294 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8310 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8303 + 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 + # + # source://prism//lib/prism/node.rb#8339 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#8300 + 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 + # + # source://prism//lib/prism/node.rb#8349 + def type; end + end +end + +# Represents a hash literal. +# +# { a => b } +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8358 +class Prism::HashNode < ::Prism::Node + # def initialize: (Location opening_loc, Array[Node] elements, Location closing_loc, Location location) -> void + # + # @return [HashNode] a new instance of HashNode + # + # source://prism//lib/prism/node.rb#8360 + def initialize(source, opening_loc, elements, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8370 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8375 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8442 + sig { returns(String) } + def closing; end + + # The location of the closing brace. + # + # { a => b } + # ^ + # + # source://prism//lib/prism/node.rb#8430 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8385 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8380 + def compact_child_nodes; end + + # def copy: (**params) -> HashNode + # + # source://prism//lib/prism/node.rb#8390 + sig { params(params: T.untyped).returns(Prism::HashNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8375 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#8404 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. + # + # { a: b } + # ^^^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/node.rb#8424 + sig { returns(T::Array[Prism::Node]) } + def elements; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#8447 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8437 + sig { returns(String) } + def opening; end + + # The location of the opening brace. + # + # { a => b } + # ^ + # + # source://prism//lib/prism/node.rb#8412 + 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 + # + # source://prism//lib/prism/node.rb#8469 + 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#8479 + def type; end + end +end + +# Represents a hash pattern in pattern matching. +# +# foo => { a: 1, b: 2 } +# ^^^^^^^^^^^^^^ +# +# foo => { a: 1, b: 2, **c } +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8491 +class Prism::HashPatternNode < ::Prism::Node + # def initialize: (Node? constant, Array[Node] elements, Node? rest, Location? opening_loc, Location? closing_loc, Location location) -> void + # + # @return [HashPatternNode] a new instance of HashPatternNode + # + # source://prism//lib/prism/node.rb#8493 + def initialize(source, constant, elements, rest, opening_loc, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8505 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8510 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#8589 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#8571 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8524 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8515 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://prism//lib/prism/node.rb#8550 + sig { returns(T.nilable(Prism::Node)) } + def constant; end + + # def copy: (**params) -> HashPatternNode + # + # source://prism//lib/prism/node.rb#8529 + sig { params(params: T.untyped).returns(Prism::HashPatternNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8510 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Node?, elements: Array[Node], rest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#8545 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://prism//lib/prism/node.rb#8553 + sig { returns(T::Array[Prism::Node]) } + def elements; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#8594 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#8584 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#8559 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#8556 + 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. + # + # 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#8628 + 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#8638 + def type; end + end +end + +# source://prism//lib/prism/node_ext.rb#35 +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#37 + def heredoc?; end +end + +# Represents the use of the `if` keyword, either in the block form or the modifier form. +# +# bar if foo +# ^^^^^^^^^^ +# +# if foo then bar end +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8650 +class Prism::IfNode < ::Prism::Node + # def initialize: (Location? if_keyword_loc, Node predicate, Location? then_keyword_loc, StatementsNode? statements, Node? consequent, Location? end_keyword_loc, Location location) -> void + # + # @return [IfNode] a new instance of IfNode + # + # source://prism//lib/prism/node.rb#8652 + def initialize(source, if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8665 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8674 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8688 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8679 + def compact_child_nodes; end + + # attr_reader consequent: Node? + # + # source://prism//lib/prism/node.rb#8745 + sig { returns(T.nilable(Prism::Node)) } + def consequent; end + + # def copy: (**params) -> IfNode + # + # source://prism//lib/prism/node.rb#8693 + sig { params(params: T.untyped).returns(Prism::IfNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8674 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { if_keyword_loc: Location?, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#8710 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#8771 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#8748 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def if_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#8761 + sig { returns(T.nilable(String)) } + def if_keyword; end + + # attr_reader if_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#8715 + sig { returns(T.nilable(Prism::Location)) } + def if_keyword_loc; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#8776 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader predicate: Node + # + # source://prism//lib/prism/node.rb#8727 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#8669 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#8742 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#8766 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # attr_reader then_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#8730 + 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 + # + # source://prism//lib/prism/node.rb#8812 + 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#8822 + def type; end + end +end + +# Represents an imaginary number literal. +# +# 1.0i +# ^^^^ +# +# source://prism//lib/prism/node.rb#8831 +class Prism::ImaginaryNode < ::Prism::Node + # def initialize: (Node numeric, Location location) -> void + # + # @return [ImaginaryNode] a new instance of ImaginaryNode + # + # source://prism//lib/prism/node.rb#8833 + def initialize(source, numeric, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8841 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8846 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8856 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8851 + def compact_child_nodes; end + + # def copy: (**params) -> ImaginaryNode + # + # source://prism//lib/prism/node.rb#8861 + sig { params(params: T.untyped).returns(Prism::ImaginaryNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8846 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Node, location: Location } + # + # source://prism//lib/prism/node.rb#8873 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#8882 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader numeric: Node + # + # source://prism//lib/prism/node.rb#8878 + sig { returns(Prism::Node) } + 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. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8903 + def type; end + + # Returns the value of the node as a Ruby Complex. + # + # source://prism//lib/prism/node_ext.rb#69 + 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 + # + # source://prism//lib/prism/node.rb#8913 + def type; end + end +end + +# Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source. +# +# { foo: } +# ^^^^ +# +# { Foo: } +# ^^^^ +# +# foo in { bar: } +# ^^^^ +# +# source://prism//lib/prism/node.rb#8928 +class Prism::ImplicitNode < ::Prism::Node + # def initialize: (Node value, Location location) -> void + # + # @return [ImplicitNode] a new instance of ImplicitNode + # + # source://prism//lib/prism/node.rb#8930 + def initialize(source, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8938 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8943 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8953 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8948 + def compact_child_nodes; end + + # def copy: (**params) -> ImplicitNode + # + # source://prism//lib/prism/node.rb#8958 + sig { params(params: T.untyped).returns(Prism::ImplicitNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8943 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, location: Location } + # + # source://prism//lib/prism/node.rb#8970 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#8979 + def inspect(inspector = T.unsafe(nil)); 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#9000 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#8975 + 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 + # + # source://prism//lib/prism/node.rb#9010 + def type; end + end +end + +# Represents using a trailing comma to indicate an implicit rest parameter. +# +# foo { |bar,| } +# ^ +# +# foo in [bar,] +# ^ +# +# for foo, in bar do end +# ^ +# +# foo, = bar +# ^ +# +# source://prism//lib/prism/node.rb#9028 +class Prism::ImplicitRestNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ImplicitRestNode] a new instance of ImplicitRestNode + # + # source://prism//lib/prism/node.rb#9030 + def initialize(source, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9037 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9042 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9052 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9047 + def compact_child_nodes; end + + # def copy: (**params) -> ImplicitRestNode + # + # source://prism//lib/prism/node.rb#9057 + sig { params(params: T.untyped).returns(Prism::ImplicitRestNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9042 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#9068 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#9074 + def inspect(inspector = T.unsafe(nil)); 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#9093 + 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#9103 + def type; end + end +end + +# Represents the use of the `in` keyword in a case statement. +# +# case a; in b then c end +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9112 +class Prism::InNode < ::Prism::Node + # def initialize: (Node pattern, StatementsNode? statements, Location in_loc, Location? then_loc, Location location) -> void + # + # @return [InNode] a new instance of InNode + # + # source://prism//lib/prism/node.rb#9114 + def initialize(source, pattern, statements, in_loc, then_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9125 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9130 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9143 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9135 + def compact_child_nodes; end + + # def copy: (**params) -> InNode + # + # source://prism//lib/prism/node.rb#9148 + sig { params(params: T.untyped).returns(Prism::InNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9130 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#9163 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def in: () -> String + # + # source://prism//lib/prism/node.rb#9193 + sig { returns(String) } + def in; end + + # attr_reader in_loc: Location + # + # source://prism//lib/prism/node.rb#9174 + sig { returns(Prism::Location) } + def in_loc; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#9203 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader pattern: Node + # + # source://prism//lib/prism/node.rb#9168 + sig { returns(Prism::Node) } + def pattern; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#9171 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then: () -> String? + # + # source://prism//lib/prism/node.rb#9198 + sig { returns(T.nilable(String)) } + def then; end + + # attr_reader then_loc: Location? + # + # source://prism//lib/prism/node.rb#9180 + 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. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9232 + 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#9242 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call to the `[]` method. +# +# foo.bar[baz] &&= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9251 +class Prism::IndexAndWriteNode < ::Prism::Node + # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location operator_loc, Node value, Location location) -> void + # + # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#9253 + def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9269 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#9344 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9376 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#9353 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#9386 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#9326 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9274 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9396 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9347 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9289 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9279 + def compact_child_nodes; end + + # def copy: (**params) -> IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#9294 + sig { params(params: T.untyped).returns(Prism::IndexAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9274 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location } + # + # source://prism//lib/prism/node.rb#9314 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9381 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#9406 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9391 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9338 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#9401 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#9356 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#9323 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9366 + 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 + # + # source://prism//lib/prism/node.rb#9451 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#9362 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9371 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#9319 + 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#9461 + def type; end + end +end + +# Represents the use of an assignment operator on a call to `[]`. +# +# foo.bar[baz] += value +# ^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9470 +class Prism::IndexOperatorWriteNode < ::Prism::Node + # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Symbol operator, Location operator_loc, Node value, Location location) -> void + # + # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#9472 + def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9489 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#9565 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9600 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#9574 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#9610 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#9547 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9494 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9620 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9568 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9509 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9499 + def compact_child_nodes; end + + # def copy: (**params) -> IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#9514 + sig { params(params: T.untyped).returns(Prism::IndexOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9494 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator: Symbol, operator_loc: Location, value: Node, location: Location } + # + # source://prism//lib/prism/node.rb#9535 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9605 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#9625 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9615 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9559 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#9577 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#9580 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#9544 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9590 + 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 + # + # source://prism//lib/prism/node.rb#9671 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#9586 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9595 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#9540 + 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#9681 + def type; end + end +end + +# Represents the use of the `||=` operator on a call to `[]`. +# +# foo.bar[baz] ||= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9690 +class Prism::IndexOrWriteNode < ::Prism::Node + # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location operator_loc, Node value, Location location) -> void + # + # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#9692 + def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9708 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#9783 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9815 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#9792 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#9825 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#9765 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9713 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9835 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9786 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9728 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9718 + def compact_child_nodes; end + + # def copy: (**params) -> IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#9733 + sig { params(params: T.untyped).returns(Prism::IndexOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9713 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location } + # + # source://prism//lib/prism/node.rb#9753 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9820 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#9845 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9830 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9777 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#9840 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#9795 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#9762 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9805 + 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 + # + # source://prism//lib/prism/node.rb#9890 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#9801 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9810 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#9758 + 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#9900 + def type; end + end +end + +# Represents assigning to an index. +# +# foo[bar], = 1 +# ^^^^^^^^ +# +# begin +# rescue => foo[bar] +# ^^^^^^^^ +# end +# +# for foo[bar] in baz do end +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9917 +class Prism::IndexTargetNode < ::Prism::Node + # def initialize: (Integer flags, Node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location location) -> void + # + # @return [IndexTargetNode] a new instance of IndexTargetNode + # + # source://prism//lib/prism/node.rb#9919 + def initialize(source, flags, receiver, opening_loc, arguments, closing_loc, block, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9932 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#9991 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10014 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#10000 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9937 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10029 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9994 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9951 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9942 + def compact_child_nodes; end + + # def copy: (**params) -> IndexTargetNode + # + # source://prism//lib/prism/node.rb#9956 + sig { params(params: T.untyped).returns(Prism::IndexTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9937 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, location: Location } + # + # source://prism//lib/prism/node.rb#9973 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10019 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#10034 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#10024 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9985 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader receiver: Node + # + # source://prism//lib/prism/node.rb#9982 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10004 + 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 + # + # source://prism//lib/prism/node.rb#10071 + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10009 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#9978 + 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#10081 + def type; end + end +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#275 +class Prism::InlineComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#283 + def inspect; end + + # Returns true if this comment happens on the same line as other code and + # false if the comment is by itself. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#278 + sig { override.returns(T::Boolean) } + def trailing?; end +end + +# Represents the use of the `&&=` operator for assignment to an instance variable. +# +# @target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10090 +class Prism::InstanceVariableAndWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # + # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#10092 + def initialize(source, name, name_loc, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10103 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10108 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10118 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10113 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#10123 + sig { params(params: T.untyped).returns(Prism::InstanceVariableAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10108 + sig { 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: Node, location: Location } + # + # source://prism//lib/prism/node.rb#10138 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#179 + def desugar; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#10167 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10143 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10146 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10162 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10152 + 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 + # + # source://prism//lib/prism/node.rb#10191 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#10158 + 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 + # + # source://prism//lib/prism/node.rb#10201 + def type; end + end +end + +# Represents assigning to an instance variable using an operator that isn't `=`. +# +# @target += value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10210 +class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + # + # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#10212 + def initialize(source, name, name_loc, operator_loc, value, operator, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10224 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10229 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10239 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10234 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#10244 + sig { params(params: T.untyped).returns(Prism::InstanceVariableOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10229 + sig { 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: Node, operator: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#10260 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#191 + def desugar; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#10287 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10265 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10268 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#10283 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10274 + 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 + # + # source://prism//lib/prism/node.rb#10312 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#10280 + 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 + # + # source://prism//lib/prism/node.rb#10322 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to an instance variable. +# +# @target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10331 +class Prism::InstanceVariableOrWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # + # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#10333 + def initialize(source, name, name_loc, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10344 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10349 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10359 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10354 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#10364 + sig { params(params: T.untyped).returns(Prism::InstanceVariableOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10349 + sig { 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: Node, location: Location } + # + # source://prism//lib/prism/node.rb#10379 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#185 + def desugar; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#10408 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10384 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10387 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10403 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10393 + 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 + # + # source://prism//lib/prism/node.rb#10432 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#10399 + 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 + # + # source://prism//lib/prism/node.rb#10442 + def type; end + end +end + +# Represents referencing an instance variable. +# +# @foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#10451 +class Prism::InstanceVariableReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#10453 + def initialize(source, name, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10461 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10466 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10476 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10471 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#10481 + sig { params(params: T.untyped).returns(Prism::InstanceVariableReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10466 + sig { 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#10493 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#10506 + def inspect(inspector = T.unsafe(nil)); end + + # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @x # name `:@x` + # + # @_test # name `:@_test` + # + # source://prism//lib/prism/node.rb#10502 + 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#10526 + 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#10536 + def type; end + end +end + +# Represents writing to an instance variable in a context that doesn't have an explicit value. +# +# @foo, @bar = baz +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#10545 +class Prism::InstanceVariableTargetNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#10547 + def initialize(source, name, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10555 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10560 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10570 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10565 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#10575 + sig { params(params: T.untyped).returns(Prism::InstanceVariableTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10560 + sig { 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#10587 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#10596 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10592 + 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#10616 + 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#10626 + def type; end + end +end + +# Represents writing to an instance variable. +# +# @foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10635 +class Prism::InstanceVariableWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void + # + # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#10637 + def initialize(source, name, name_loc, value, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10648 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10653 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10663 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10658 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#10668 + sig { params(params: T.untyped).returns(Prism::InstanceVariableWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10653 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#10683 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#10712 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10688 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10691 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10707 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10700 + 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 + # + # source://prism//lib/prism/node.rb#10736 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#10697 + 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 + # + # source://prism//lib/prism/node.rb#10746 + def type; end + end +end + +# Flags for integer nodes that correspond to the base of the integer. +# +# source://prism//lib/prism/node.rb#19277 +module Prism::IntegerBaseFlags; end + +# 0b prefix +# +# source://prism//lib/prism/node.rb#19279 +Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) + +# 0d or no prefix +# +# source://prism//lib/prism/node.rb#19282 +Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) + +# 0x prefix +# +# source://prism//lib/prism/node.rb#19288 +Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) + +# 0o or 0 prefix +# +# source://prism//lib/prism/node.rb#19285 +Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) + +# Represents an integer number literal. +# +# 1 +# ^ +# +# source://prism//lib/prism/node.rb#10755 +class Prism::IntegerNode < ::Prism::Node + # def initialize: (Integer flags, Location location) -> void + # + # @return [IntegerNode] a new instance of IntegerNode + # + # source://prism//lib/prism/node.rb#10757 + def initialize(source, flags, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10765 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def binary?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10807 + sig { returns(T::Boolean) } + def binary?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10770 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10780 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10775 + def compact_child_nodes; end + + # def copy: (**params) -> IntegerNode + # + # source://prism//lib/prism/node.rb#10785 + sig { params(params: T.untyped).returns(Prism::IntegerNode) } + def copy(**params); end + + # def decimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10812 + sig { returns(T::Boolean) } + def decimal?; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10770 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#10797 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def hexadecimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10822 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#10827 + def inspect(inspector = T.unsafe(nil)); end + + # def octal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10817 + 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. + # + # 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#10848 + def type; end + + # Returns the value of the node as a Ruby Integer. + # + # source://prism//lib/prism/node_ext.rb#76 + def value; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#10802 + 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#10858 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO object. +# +# if /foo #{bar} baz/ then end +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10867 +class Prism::InterpolatedMatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (Integer flags, Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void + # + # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode + # + # source://prism//lib/prism/node.rb#10869 + def initialize(source, flags, opening_loc, parts, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10880 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10970 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10890 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#11005 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#10938 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10900 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10895 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedMatchLastLineNode + # + # source://prism//lib/prism/node.rb#10905 + sig { params(params: T.untyped).returns(Prism::InterpolatedMatchLastLineNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10890 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#10920 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10965 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10950 + sig { returns(T::Boolean) } + def extended?; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10990 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10995 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10985 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10945 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#11010 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10955 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10960 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11000 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#10929 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://prism//lib/prism/node.rb#10935 + sig { returns(T::Array[Prism::Node]) } + def parts; end + + # source://prism//lib/prism/node.rb#10884 + def set_newline_flag(newline_marked); 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#11034 + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10980 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10975 + sig { returns(T::Boolean) } + def windows_31j?; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#10925 + 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#11044 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation. +# +# /foo #{bar} baz/ +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11053 +class Prism::InterpolatedRegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (Integer flags, Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void + # + # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode + # + # source://prism//lib/prism/node.rb#11055 + def initialize(source, flags, opening_loc, parts, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11066 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # 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#11076 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#11191 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#11124 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11086 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11081 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedRegularExpressionNode + # + # source://prism//lib/prism/node.rb#11091 + sig { params(params: T.untyped).returns(Prism::InterpolatedRegularExpressionNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11076 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#11106 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11151 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11136 + sig { returns(T::Boolean) } + def extended?; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11176 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11181 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11171 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11131 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#11196 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11141 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11146 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11186 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#11115 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://prism//lib/prism/node.rb#11121 + sig { returns(T::Array[Prism::Node]) } + def parts; end + + # source://prism//lib/prism/node.rb#11070 + def set_newline_flag(newline_marked); 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#11220 + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11166 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11161 + sig { returns(T::Boolean) } + def windows_31j?; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#11111 + 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#11230 + def type; end + end +end + +# Represents a string literal that contains interpolation. +# +# "foo #{bar} baz" +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11239 +class Prism::InterpolatedStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # def initialize: (Location? opening_loc, Array[Node] parts, Location? closing_loc, Location location) -> void + # + # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode + # + # source://prism//lib/prism/node.rb#11241 + def initialize(source, opening_loc, parts, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11251 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11261 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#11328 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#11310 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11271 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11266 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedStringNode + # + # source://prism//lib/prism/node.rb#11276 + sig { params(params: T.untyped).returns(Prism::InterpolatedStringNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11261 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#11290 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#11333 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#11323 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#11295 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://prism//lib/prism/node.rb#11307 + sig { returns(T::Array[Prism::Node]) } + def parts; end + + # source://prism//lib/prism/node.rb#11255 + def set_newline_flag(newline_marked); 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#11355 + 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#11365 + def type; end + end +end + +# Represents a symbol literal that contains interpolation. +# +# :"foo #{bar} baz" +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11374 +class Prism::InterpolatedSymbolNode < ::Prism::Node + # def initialize: (Location? opening_loc, Array[Node] parts, Location? closing_loc, Location location) -> void + # + # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#11376 + def initialize(source, opening_loc, parts, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11386 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11396 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#11463 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#11445 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11406 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11401 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#11411 + sig { params(params: T.untyped).returns(Prism::InterpolatedSymbolNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11396 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#11425 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#11468 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#11458 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#11430 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://prism//lib/prism/node.rb#11442 + sig { returns(T::Array[Prism::Node]) } + def parts; end + + # source://prism//lib/prism/node.rb#11390 + def set_newline_flag(newline_marked); 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#11490 + 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#11500 + def type; end + end +end + +# Represents an xstring literal that contains interpolation. +# +# `foo #{bar} baz` +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11509 +class Prism::InterpolatedXStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # def initialize: (Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void + # + # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode + # + # source://prism//lib/prism/node.rb#11511 + def initialize(source, opening_loc, parts, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11521 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11531 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#11586 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#11574 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11541 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11536 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedXStringNode + # + # source://prism//lib/prism/node.rb#11546 + sig { params(params: T.untyped).returns(Prism::InterpolatedXStringNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11531 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#11560 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#11591 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11581 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#11565 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://prism//lib/prism/node.rb#11571 + sig { returns(T::Array[Prism::Node]) } + def parts; end + + # source://prism//lib/prism/node.rb#11525 + def set_newline_flag(newline_marked); 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#11613 + 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#11623 + def type; end + end +end + +# Represents a hash literal without opening and closing braces. +# +# foo(a: b) +# ^^^^ +# +# source://prism//lib/prism/node.rb#11632 +class Prism::KeywordHashNode < ::Prism::Node + # def initialize: (Integer flags, Array[Node] elements, Location location) -> void + # + # @return [KeywordHashNode] a new instance of KeywordHashNode + # + # source://prism//lib/prism/node.rb#11634 + def initialize(source, flags, elements, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11643 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11648 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11658 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11653 + def compact_child_nodes; end + + # def copy: (**params) -> KeywordHashNode + # + # source://prism//lib/prism/node.rb#11663 + sig { params(params: T.untyped).returns(Prism::KeywordHashNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11648 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Node], location: Location } + # + # source://prism//lib/prism/node.rb#11676 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://prism//lib/prism/node.rb#11685 + sig { returns(T::Array[Prism::Node]) } + def elements; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#11694 + def inspect(inspector = T.unsafe(nil)); end + + # def symbol_keys?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11689 + 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 + # + # source://prism//lib/prism/node.rb#11716 + def type; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#11681 + 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#11726 + def type; end + end +end + +# Flags for keyword hash nodes. +# +# source://prism//lib/prism/node.rb#19292 +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#19294 +Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) + +# Represents a keyword rest parameter to a method, block, or lambda definition. +# +# def a(**b) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#11736 +class Prism::KeywordRestParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + # + # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#11738 + def initialize(source, flags, name, name_loc, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11749 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11754 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11764 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11759 + def compact_child_nodes; end + + # def copy: (**params) -> KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#11769 + sig { params(params: T.untyped).returns(Prism::KeywordRestParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11754 + sig { 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 } + # + # source://prism//lib/prism/node.rb#11784 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#11825 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#11793 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#11796 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11820 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11808 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11815 + 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 + # + # source://prism//lib/prism/node.rb#11853 + def type; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#11789 + 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#11863 + def type; end + end +end + +# Represents using a lambda literal (not the lambda method call). +# +# ->(value) { value * 2 } +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11872 +class Prism::LambdaNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Location operator_loc, Location opening_loc, Location closing_loc, Node? parameters, Node? body, Location location) -> void + # + # @return [LambdaNode] a new instance of LambdaNode + # + # source://prism//lib/prism/node.rb#11874 + def initialize(source, locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11887 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#11956 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11892 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#11970 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#11947 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11905 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11897 + def compact_child_nodes; end + + # def copy: (**params) -> LambdaNode + # + # source://prism//lib/prism/node.rb#11910 + sig { params(params: T.untyped).returns(Prism::LambdaNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11892 + sig { 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: Node?, body: Node?, location: Location } + # + # source://prism//lib/prism/node.rb#11927 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#11975 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#11932 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11965 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#11941 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11960 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11935 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader parameters: Node? + # + # source://prism//lib/prism/node.rb#11953 + sig { returns(T.nilable(Prism::Node)) } + 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. + # + # 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#12010 + 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#12020 + def type; end + end +end + +# This class is responsible for lexing the source using prism and then +# converting those tokens to be compatible with Ripper. In the vast majority +# of cases, this is a one-to-one mapping of the token type. Everything else +# generally lines up. However, there are a few cases that require special +# handling. +# +# source://prism//lib/prism/lex_compat.rb#12 +class Prism::LexCompat + # @return [LexCompat] a new instance of LexCompat + # + # source://prism//lib/prism/lex_compat.rb#600 + def initialize(source, **options); end + + # Returns the value of attribute options. + # + # source://prism//lib/prism/lex_compat.rb#598 + def options; end + + # source://prism//lib/prism/lex_compat.rb#605 + def result; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/lex_compat.rb#598 + def source; end +end + +# Ripper doesn't include the rest of the token in the event, so we need to +# trim it down to just the content on the first line when comparing. +# +# source://prism//lib/prism/lex_compat.rb#211 +class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#212 + def ==(other); end +end + +# A heredoc in this case is a list of tokens that belong to the body of the +# heredoc that should be appended onto the list of tokens when the heredoc +# closes. +# +# source://prism//lib/prism/lex_compat.rb#272 +module Prism::LexCompat::Heredoc + class << self + # Here we will split between the two types of heredocs and return the + # object that will store their tokens. + # + # source://prism//lib/prism/lex_compat.rb#584 + def build(opening); end + end +end + +# Dash heredocs are a little more complicated. They are a list of tokens +# that need to be split on "\\\n" to mimic Ripper's behavior. We also need +# to keep track of the state that the heredoc was opened in. +# +# source://prism//lib/prism/lex_compat.rb#296 +class Prism::LexCompat::Heredoc::DashHeredoc + # @return [DashHeredoc] a new instance of DashHeredoc + # + # source://prism//lib/prism/lex_compat.rb#299 + def initialize(split); end + + # source://prism//lib/prism/lex_compat.rb#304 + def <<(token); end + + # source://prism//lib/prism/lex_compat.rb#297 + def split; end + + # source://prism//lib/prism/lex_compat.rb#308 + def to_a; end + + # source://prism//lib/prism/lex_compat.rb#297 + def tokens; end +end + +# Heredocs that are dedenting heredocs are a little more complicated. +# Ripper outputs on_ignored_sp tokens for the whitespace that is being +# removed from the output. prism only modifies the node itself and keeps +# the token the same. This simplifies prism, but makes comparing against +# Ripper much harder because there is a length mismatch. +# +# Fortunately, we already have to pull out the heredoc tokens in order to +# insert them into the stream in the correct order. As such, we can do +# some extra manipulation on the tokens to make them match Ripper's +# output by mirroring the dedent logic that Ripper uses. +# +# source://prism//lib/prism/lex_compat.rb#355 +class Prism::LexCompat::Heredoc::DedentingHeredoc + # @return [DedentingHeredoc] a new instance of DedentingHeredoc + # + # source://prism//lib/prism/lex_compat.rb#360 + def initialize; end + + # As tokens are coming in, we track the minimum amount of common leading + # whitespace on plain string content tokens. This allows us to later + # remove that amount of whitespace from the beginning of each line. + # + # source://prism//lib/prism/lex_compat.rb#371 + def <<(token); end + + # Returns the value of attribute dedent. + # + # source://prism//lib/prism/lex_compat.rb#358 + def dedent; end + + # Returns the value of attribute dedent_next. + # + # source://prism//lib/prism/lex_compat.rb#358 + def dedent_next; end + + # Returns the value of attribute embexpr_balance. + # + # source://prism//lib/prism/lex_compat.rb#358 + def embexpr_balance; end + + # source://prism//lib/prism/lex_compat.rb#408 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://prism//lib/prism/lex_compat.rb#358 + def tokens; end +end + +# source://prism//lib/prism/lex_compat.rb#356 +Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# Heredocs that are no dash or tilde heredocs are just a list of tokens. +# We need to keep them around so that we can insert them in the correct +# order back into the token stream and set the state of the last token to +# the state that the heredoc was opened in. +# +# source://prism//lib/prism/lex_compat.rb#277 +class Prism::LexCompat::Heredoc::PlainHeredoc + # @return [PlainHeredoc] a new instance of PlainHeredoc + # + # source://prism//lib/prism/lex_compat.rb#280 + def initialize; end + + # source://prism//lib/prism/lex_compat.rb#284 + def <<(token); end + + # source://prism//lib/prism/lex_compat.rb#288 + def to_a; end + + # source://prism//lib/prism/lex_compat.rb#278 + def tokens; end +end + +# Ident tokens for the most part are exactly the same, except sometimes we +# know an ident is a local when ripper doesn't (when they are introduced +# through named captures in regular expressions). In that case we don't +# compare the state. +# +# source://prism//lib/prism/lex_compat.rb#229 +class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#230 + def ==(other); end +end + +# Tokens where state should be ignored +# used for :on_comment, :on_heredoc_end, :on_embexpr_end +# +# source://prism//lib/prism/lex_compat.rb#219 +class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#220 + def ==(other); end +end + +# Ignored newlines can occasionally have a LABEL state attached to them, so +# we compare the state differently here. +# +# source://prism//lib/prism/lex_compat.rb#240 +class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#241 + def ==(other); end +end + +# If we have an identifier that follows a method name like: +# +# def foo bar +# +# then Ripper will mark bar as END|LABEL if there is a local in a parent +# scope named bar because it hasn't pushed the local table yet. We do this +# more accurately, so we need to allow comparing against both END and +# END|LABEL. +# +# source://prism//lib/prism/lex_compat.rb#260 +class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#261 + def ==(other); end +end + +# This is a mapping of prism token types to Ripper token types. This is a +# many-to-one mapping because we split up our token types, whereas Ripper +# tends to group them. +# +# source://prism//lib/prism/lex_compat.rb#16 +Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) + +# When we produce tokens, we produce the same arrays that Ripper does. +# However, we add a couple of convenience methods onto them to make them a +# little easier to work with. We delegate all other methods to the array. +# +# source://prism//lib/prism/lex_compat.rb#187 +class Prism::LexCompat::Token < ::SimpleDelegator + # The type of the token. + # + # source://prism//lib/prism/lex_compat.rb#194 + def event; end + + # The location of the token in the source. + # + # source://prism//lib/prism/lex_compat.rb#189 + def location; end + + # The state of the lexer when this token was produced. + # + # source://prism//lib/prism/lex_compat.rb#204 + def state; end + + # The slice of the source that this token represents. + # + # source://prism//lib/prism/lex_compat.rb#199 + def value; end +end + +# This is a class that wraps the Ripper lexer to produce almost exactly the +# same tokens. +# +# source://prism//lib/prism/lex_compat.rb#853 +class Prism::LexRipper + # @return [LexRipper] a new instance of LexRipper + # + # source://prism//lib/prism/lex_compat.rb#856 + def initialize(source); end + + # source://prism//lib/prism/lex_compat.rb#860 + def result; end + + # source://prism//lib/prism/lex_compat.rb#854 + def source; end + + private + + # source://prism//lib/prism/lex_compat.rb#894 + def lex(source); end +end + +# Represents the use of the `&&=` operator for assignment to a local variable. +# +# target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12029 +class Prism::LocalVariableAndWriteNode < ::Prism::Node + # def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Integer depth, Location location) -> void + # + # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#12031 + def initialize(source, name_loc, operator_loc, value, name, depth, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12043 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12048 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12058 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12053 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#12063 + sig { params(params: T.untyped).returns(Prism::LocalVariableAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12048 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12079 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12102 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#197 + def desugar; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#12111 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12099 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12084 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12106 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12090 + 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 + # + # source://prism//lib/prism/node.rb#12136 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#12096 + 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 + # + # source://prism//lib/prism/node.rb#12146 + def type; end + end +end + +# Represents assigning to a local variable using an operator that isn't `=`. +# +# target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12155 +class Prism::LocalVariableOperatorWriteNode < ::Prism::Node + # def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Symbol operator, Integer depth, Location location) -> void + # + # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#12157 + def initialize(source, name_loc, operator_loc, value, name, operator, depth, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12170 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12175 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12185 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12180 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#12190 + sig { params(params: T.untyped).returns(Prism::LocalVariableOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12175 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12207 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12233 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#209 + def desugar; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#12237 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12227 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12212 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#12230 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12218 + 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 + # + # source://prism//lib/prism/node.rb#12263 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#12224 + 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 + # + # source://prism//lib/prism/node.rb#12273 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a local variable. +# +# target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12282 +class Prism::LocalVariableOrWriteNode < ::Prism::Node + # def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Integer depth, Location location) -> void + # + # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#12284 + def initialize(source, name_loc, operator_loc, value, name, depth, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12296 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12301 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12311 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12306 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#12316 + sig { params(params: T.untyped).returns(Prism::LocalVariableOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12301 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12332 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12355 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#203 + def desugar; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#12364 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12352 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12337 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12359 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12343 + 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 + # + # source://prism//lib/prism/node.rb#12389 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#12349 + 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 + # + # source://prism//lib/prism/node.rb#12399 + def type; end + end +end + +# Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call. +# +# foo +# ^^^ +# +# source://prism//lib/prism/node.rb#12408 +class Prism::LocalVariableReadNode < ::Prism::Node + # def initialize: (Symbol name, Integer depth, Location location) -> void + # + # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode + # + # source://prism//lib/prism/node.rb#12410 + def initialize(source, name, depth, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12419 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12424 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12434 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12429 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableReadNode + # + # source://prism//lib/prism/node.rb#12439 + sig { params(params: T.untyped).returns(Prism::LocalVariableReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12424 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12452 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # The number of visible scopes that should be searched to find the origin of this local variable. + # + # foo = 1; foo # depth 0 + # + # bar = 2; tap { bar } # depth 1 + # + # 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#12478 + sig { returns(Integer) } + def depth; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#12482 + def inspect(inspector = T.unsafe(nil)); end + + # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # x # name `:x` + # + # _Test # name `:_Test` + # + # Note that this can also be an underscore followed by a number for the default block parameters. + # + # _1 # name `:_1` + # + # Finally, for the default `it` block parameter, the name is `0it`. This is to distinguish it from an `it` local variable that is explicitly declared. + # + # it # name `:0it` + # + # source://prism//lib/prism/node.rb#12469 + 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#12503 + 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#12513 + def type; end + end +end + +# Represents writing to a local variable in a context that doesn't have an explicit value. +# +# foo, bar = baz +# ^^^ ^^^ +# +# source://prism//lib/prism/node.rb#12522 +class Prism::LocalVariableTargetNode < ::Prism::Node + # def initialize: (Symbol name, Integer depth, Location location) -> void + # + # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#12524 + def initialize(source, name, depth, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12533 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12538 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12548 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12543 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#12553 + sig { params(params: T.untyped).returns(Prism::LocalVariableTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12538 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12566 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12574 + sig { returns(Integer) } + def depth; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#12578 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12571 + 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#12599 + 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#12609 + def type; end + end +end + +# Represents writing to a local variable. +# +# foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#12618 +class Prism::LocalVariableWriteNode < ::Prism::Node + # def initialize: (Symbol name, Integer depth, Location name_loc, Node value, Location operator_loc, Location location) -> void + # + # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode + # + # source://prism//lib/prism/node.rb#12620 + def initialize(source, name, depth, name_loc, value, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12632 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12637 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12647 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12642 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableWriteNode + # + # source://prism//lib/prism/node.rb#12652 + sig { params(params: T.untyped).returns(Prism::LocalVariableWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12637 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#12668 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12676 + sig { returns(Integer) } + def depth; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#12700 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12673 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12679 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12695 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12688 + 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 + # + # source://prism//lib/prism/node.rb#12725 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#12685 + 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 + # + # source://prism//lib/prism/node.rb#12735 + def type; end + end +end + +# This represents a location in the source. +# +# source://prism//lib/prism/parse_result.rb#98 +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#116 + 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#232 + def ==(other); end + + # The list of comments attached to this location + # + # source://prism//lib/prism/parse_result.rb#112 + 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#124 + sig { params(options: T.untyped).returns(Prism::Location) } + def copy(**options); end + + # Implement the hash pattern matching interface for Location. + # + # source://prism//lib/prism/parse_result.rb#222 + 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#211 + 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#160 + 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#217 + 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#165 + 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#205 + sig { returns(Integer) } + def end_column; end + + # The line number where this location ends. + # + # source://prism//lib/prism/parse_result.rb#181 + 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#154 + sig { returns(Integer) } + def end_offset; end + + # Returns a string representation of this location. + # + # source://prism//lib/prism/parse_result.rb#133 + def inspect; end + + # Returns a new location that stretches from this location to the given + # 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#241 + def join(other); end + + # The length of this location in bytes. + # + # source://prism//lib/prism/parse_result.rb#109 + def length; end + + # Implement the pretty print interface for Location. + # + # source://prism//lib/prism/parse_result.rb#227 + def pretty_print(q); end + + # The source code that this location represents. + # + # source://prism//lib/prism/parse_result.rb#138 + sig { returns(String) } + def slice; end + + # The column number in characters where this location ends from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#193 + 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#144 + 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#199 + 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#149 + 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#187 + sig { returns(Integer) } + def start_column; end + + # The line number where this location starts. + # + # source://prism//lib/prism/parse_result.rb#170 + 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#175 + 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#106 + sig { returns(Integer) } + def start_offset; end + + protected + + # A Source object that is used to determine more information from the given + # offset and length. + # + # source://prism//lib/prism/parse_result.rb#101 + def source; end + + class << self + # Returns a null location that does not correspond to a source and points to + # the beginning of the file. Useful for when you want a location object but + # do not care where it points. + # + # source://prism//lib/prism/parse_result.rb#251 + def null; end + end +end + +# Flags for while and until loop nodes. +# +# source://prism//lib/prism/node.rb#19298 +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#19300 +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#303 +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#311 + def initialize(key_loc, value_loc); end + + # Implement the hash pattern matching interface for MagicComment. + # + # source://prism//lib/prism/parse_result.rb#327 + def deconstruct_keys(keys); end + + # Returns a string representation of this magic comment. + # + # source://prism//lib/prism/parse_result.rb#332 + def inspect; end + + # Returns the key of the magic comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#317 + def key; end + + # A Location object representing the location of the key in the source. + # + # source://prism//lib/prism/parse_result.rb#305 + 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#322 + def value; end + + # A Location object representing the location of the value in the source. + # + # source://prism//lib/prism/parse_result.rb#308 + def value_loc; end +end + +# Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object. +# +# if /foo/i then end +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#12744 +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 + # + # @return [MatchLastLineNode] a new instance of MatchLastLineNode + # + # source://prism//lib/prism/node.rb#12746 + def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12758 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12850 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12763 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#12890 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#12815 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12773 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12768 + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#12885 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#12809 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (**params) -> MatchLastLineNode + # + # source://prism//lib/prism/node.rb#12778 + sig { params(params: T.untyped).returns(Prism::MatchLastLineNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12763 + sig { 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 } + # + # source://prism//lib/prism/node.rb#12794 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12845 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12830 + sig { returns(T::Boolean) } + def extended?; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12870 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12875 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12865 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12825 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#12895 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12835 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12840 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#12880 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#12803 + 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 + # + # source://prism//lib/prism/node.rb#12920 + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#12821 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12860 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12855 + sig { returns(T::Boolean) } + def windows_31j?; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#12799 + 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#12930 + def type; end + end +end + +# Represents the use of the modifier `in` operator. +# +# foo in bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12939 +class Prism::MatchPredicateNode < ::Prism::Node + # def initialize: (Node value, Node pattern, Location operator_loc, Location location) -> void + # + # @return [MatchPredicateNode] a new instance of MatchPredicateNode + # + # source://prism//lib/prism/node.rb#12941 + def initialize(source, value, pattern, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12951 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12956 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12966 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12961 + def compact_child_nodes; end + + # def copy: (**params) -> MatchPredicateNode + # + # source://prism//lib/prism/node.rb#12971 + sig { params(params: T.untyped).returns(Prism::MatchPredicateNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12956 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, pattern: Node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#12985 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#13008 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13003 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12996 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Node + # + # source://prism//lib/prism/node.rb#12993 + 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. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13032 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#12990 + 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 + # + # source://prism//lib/prism/node.rb#13042 + def type; end + end +end + +# Represents the use of the `=>` operator. +# +# foo => bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13051 +class Prism::MatchRequiredNode < ::Prism::Node + # def initialize: (Node value, Node pattern, Location operator_loc, Location location) -> void + # + # @return [MatchRequiredNode] a new instance of MatchRequiredNode + # + # source://prism//lib/prism/node.rb#13053 + def initialize(source, value, pattern, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13063 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13068 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13078 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13073 + def compact_child_nodes; end + + # def copy: (**params) -> MatchRequiredNode + # + # source://prism//lib/prism/node.rb#13083 + sig { params(params: T.untyped).returns(Prism::MatchRequiredNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13068 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, pattern: Node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#13097 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#13120 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13115 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13108 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Node + # + # source://prism//lib/prism/node.rb#13105 + 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. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13144 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#13102 + 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 + # + # source://prism//lib/prism/node.rb#13154 + def type; end + end +end + +# Represents writing local variables using a regular expression match with named capture groups. +# +# /(?bar)/ =~ baz +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13163 +class Prism::MatchWriteNode < ::Prism::Node + # def initialize: (CallNode call, Array[Node] targets, Location location) -> void + # + # @return [MatchWriteNode] a new instance of MatchWriteNode + # + # source://prism//lib/prism/node.rb#13165 + def initialize(source, call, targets, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13174 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader call: CallNode + # + # source://prism//lib/prism/node.rb#13212 + sig { returns(Prism::CallNode) } + def call; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13179 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13189 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13184 + def compact_child_nodes; end + + # def copy: (**params) -> MatchWriteNode + # + # source://prism//lib/prism/node.rb#13194 + sig { params(params: T.untyped).returns(Prism::MatchWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13179 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[Node], location: Location } + # + # source://prism//lib/prism/node.rb#13207 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#13219 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader targets: Array[Node] + # + # source://prism//lib/prism/node.rb#13215 + sig { returns(T::Array[Prism::Node]) } + 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. + # + # 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#13241 + 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#13251 + 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#13257 +class Prism::MissingNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [MissingNode] a new instance of MissingNode + # + # source://prism//lib/prism/node.rb#13259 + def initialize(source, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13266 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13271 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13281 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13276 + def compact_child_nodes; end + + # def copy: (**params) -> MissingNode + # + # source://prism//lib/prism/node.rb#13286 + sig { params(params: T.untyped).returns(Prism::MissingNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13271 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#13297 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#13303 + def inspect(inspector = T.unsafe(nil)); 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#13322 + 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#13332 + def type; end + end +end + +# Represents a module declaration involving the `module` keyword. +# +# module Foo end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13341 +class Prism::ModuleNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Location module_keyword_loc, Node constant_path, Node? body, Location end_keyword_loc, Symbol name, Location location) -> void + # + # @return [ModuleNode] a new instance of ModuleNode + # + # source://prism//lib/prism/node.rb#13343 + def initialize(source, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13356 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#13413 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13361 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13374 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13366 + def compact_child_nodes; end + + # attr_reader constant_path: Node + # + # source://prism//lib/prism/node.rb#13410 + sig { returns(Prism::Node) } + def constant_path; end + + # def copy: (**params) -> ModuleNode + # + # source://prism//lib/prism/node.rb#13379 + sig { params(params: T.untyped).returns(Prism::ModuleNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13361 + sig { 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: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#13396 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#13431 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13416 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#13436 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#13401 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def module_keyword: () -> String + # + # source://prism//lib/prism/node.rb#13426 + sig { returns(String) } + def module_keyword; end + + # attr_reader module_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13404 + sig { returns(Prism::Location) } + def module_keyword_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#13422 + 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#13467 + 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#13477 + def type; end + end +end + +# Represents a multi-target expression. +# +# a, (b, c) = 1, 2, 3 +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#13486 +class Prism::MultiTargetNode < ::Prism::Node + # def initialize: (Array[Node] lefts, Node? rest, Array[Node] rights, Location? lparen_loc, Location? rparen_loc, Location location) -> void + # + # @return [MultiTargetNode] a new instance of MultiTargetNode + # + # source://prism//lib/prism/node.rb#13488 + def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13500 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13505 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13519 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13510 + def compact_child_nodes; end + + # def copy: (**params) -> MultiTargetNode + # + # source://prism//lib/prism/node.rb#13524 + sig { params(params: T.untyped).returns(Prism::MultiTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13505 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#13540 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#13589 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader lefts: Array[Node] + # + # source://prism//lib/prism/node.rb#13545 + sig { returns(T::Array[Prism::Node]) } + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#13579 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#13554 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#13548 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # attr_reader rights: Array[Node] + # + # source://prism//lib/prism/node.rb#13551 + sig { returns(T::Array[Prism::Node]) } + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#13584 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#13566 + 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 + # + # source://prism//lib/prism/node.rb#13618 + 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#13628 + def type; end + end +end + +# Represents a write to a multi-target expression. +# +# a, b, c = 1, 2, 3 +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13637 +class Prism::MultiWriteNode < ::Prism::Node + # def initialize: (Array[Node] lefts, Node? rest, Array[Node] rights, Location? lparen_loc, Location? rparen_loc, Location operator_loc, Node value, Location location) -> void + # + # @return [MultiWriteNode] a new instance of MultiWriteNode + # + # source://prism//lib/prism/node.rb#13639 + def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13653 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13658 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13673 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13663 + def compact_child_nodes; end + + # def copy: (**params) -> MultiWriteNode + # + # source://prism//lib/prism/node.rb#13678 + sig { params(params: T.untyped).returns(Prism::MultiWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13658 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location } + # + # source://prism//lib/prism/node.rb#13696 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#13759 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader lefts: Array[Node] + # + # source://prism//lib/prism/node.rb#13701 + sig { returns(T::Array[Prism::Node]) } + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#13744 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#13710 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13754 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13734 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#13704 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # attr_reader rights: Array[Node] + # + # source://prism//lib/prism/node.rb#13707 + sig { returns(T::Array[Prism::Node]) } + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#13749 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#13722 + 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 + # + # source://prism//lib/prism/node.rb#13791 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#13740 + 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 + # + # source://prism//lib/prism/node.rb#13801 + def type; end + end +end + +# This visitor walks through the tree and copies each node as it is being +# visited. This is useful for consumers that want to mutate the tree, as you +# can change subtrees in place without effecting the rest of the tree. +# +# source://prism//lib/prism/mutation_compiler.rb#12 +class Prism::MutationCompiler < ::Prism::Compiler + # Copy a AliasGlobalVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#14 + def visit_alias_global_variable_node(node); end + + # Copy a AliasMethodNode node + # + # source://prism//lib/prism/mutation_compiler.rb#19 + def visit_alias_method_node(node); end + + # Copy a AlternationPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#24 + def visit_alternation_pattern_node(node); end + + # Copy a AndNode node + # + # source://prism//lib/prism/mutation_compiler.rb#29 + def visit_and_node(node); end + + # Copy a ArgumentsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#34 + def visit_arguments_node(node); end + + # Copy a ArrayNode node + # + # source://prism//lib/prism/mutation_compiler.rb#39 + def visit_array_node(node); end + + # Copy a ArrayPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#44 + def visit_array_pattern_node(node); end + + # Copy a AssocNode node + # + # source://prism//lib/prism/mutation_compiler.rb#49 + def visit_assoc_node(node); end + + # Copy a AssocSplatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#54 + def visit_assoc_splat_node(node); end + + # Copy a BackReferenceReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#59 + def visit_back_reference_read_node(node); end + + # Copy a BeginNode node + # + # source://prism//lib/prism/mutation_compiler.rb#64 + def visit_begin_node(node); end + + # Copy a BlockArgumentNode node + # + # source://prism//lib/prism/mutation_compiler.rb#69 + def visit_block_argument_node(node); end + + # Copy a BlockLocalVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#74 + def visit_block_local_variable_node(node); end + + # Copy a BlockNode node + # + # source://prism//lib/prism/mutation_compiler.rb#79 + def visit_block_node(node); end + + # Copy a BlockParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#84 + def visit_block_parameter_node(node); end + + # Copy a BlockParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#89 + def visit_block_parameters_node(node); end + + # Copy a BreakNode node + # + # source://prism//lib/prism/mutation_compiler.rb#94 + def visit_break_node(node); end + + # Copy a CallAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#99 + def visit_call_and_write_node(node); end + + # Copy a CallNode node + # + # source://prism//lib/prism/mutation_compiler.rb#104 + def visit_call_node(node); end + + # Copy a CallOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#109 + def visit_call_operator_write_node(node); end + + # Copy a CallOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#114 + def visit_call_or_write_node(node); end + + # Copy a CallTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#119 + def visit_call_target_node(node); end + + # Copy a CapturePatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#124 + def visit_capture_pattern_node(node); end + + # Copy a CaseMatchNode node + # + # source://prism//lib/prism/mutation_compiler.rb#129 + def visit_case_match_node(node); end + + # Copy a CaseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#134 + def visit_case_node(node); end + + # Copy a ClassNode node + # + # source://prism//lib/prism/mutation_compiler.rb#139 + def visit_class_node(node); end + + # Copy a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#144 + def visit_class_variable_and_write_node(node); end + + # Copy a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#149 + def visit_class_variable_operator_write_node(node); end + + # Copy a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#154 + def visit_class_variable_or_write_node(node); end + + # Copy a ClassVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#159 + def visit_class_variable_read_node(node); end + + # Copy a ClassVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#164 + def visit_class_variable_target_node(node); end + + # Copy a ClassVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#169 + def visit_class_variable_write_node(node); end + + # Copy a ConstantAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#174 + def visit_constant_and_write_node(node); end + + # Copy a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#179 + def visit_constant_operator_write_node(node); end + + # Copy a ConstantOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#184 + def visit_constant_or_write_node(node); end + + # Copy a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#189 + def visit_constant_path_and_write_node(node); end + + # Copy a ConstantPathNode node + # + # source://prism//lib/prism/mutation_compiler.rb#194 + def visit_constant_path_node(node); end + + # Copy a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#199 + def visit_constant_path_operator_write_node(node); end + + # Copy a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#204 + def visit_constant_path_or_write_node(node); end + + # Copy a ConstantPathTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#209 + def visit_constant_path_target_node(node); end + + # Copy a ConstantPathWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#214 + def visit_constant_path_write_node(node); end + + # Copy a ConstantReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#219 + def visit_constant_read_node(node); end + + # Copy a ConstantTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#224 + def visit_constant_target_node(node); end + + # Copy a ConstantWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#229 + def visit_constant_write_node(node); end + + # Copy a DefNode node + # + # source://prism//lib/prism/mutation_compiler.rb#234 + def visit_def_node(node); end + + # Copy a DefinedNode node + # + # source://prism//lib/prism/mutation_compiler.rb#239 + def visit_defined_node(node); end + + # Copy a ElseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#244 + def visit_else_node(node); end + + # Copy a EmbeddedStatementsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#249 + def visit_embedded_statements_node(node); end + + # Copy a EmbeddedVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#254 + def visit_embedded_variable_node(node); end + + # Copy a EnsureNode node + # + # source://prism//lib/prism/mutation_compiler.rb#259 + def visit_ensure_node(node); end + + # Copy a FalseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#264 + def visit_false_node(node); end + + # Copy a FindPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#269 + def visit_find_pattern_node(node); end + + # Copy a FlipFlopNode node + # + # source://prism//lib/prism/mutation_compiler.rb#274 + def visit_flip_flop_node(node); end + + # Copy a FloatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#279 + def visit_float_node(node); end + + # Copy a ForNode node + # + # source://prism//lib/prism/mutation_compiler.rb#284 + def visit_for_node(node); end + + # Copy a ForwardingArgumentsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#289 + def visit_forwarding_arguments_node(node); end + + # Copy a ForwardingParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#294 + def visit_forwarding_parameter_node(node); end + + # Copy a ForwardingSuperNode node + # + # source://prism//lib/prism/mutation_compiler.rb#299 + def visit_forwarding_super_node(node); end + + # Copy a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#304 + def visit_global_variable_and_write_node(node); end + + # Copy a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#309 + def visit_global_variable_operator_write_node(node); end + + # Copy a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#314 + def visit_global_variable_or_write_node(node); end + + # Copy a GlobalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#319 + def visit_global_variable_read_node(node); end + + # Copy a GlobalVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#324 + def visit_global_variable_target_node(node); end + + # Copy a GlobalVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#329 + def visit_global_variable_write_node(node); end + + # Copy a HashNode node + # + # source://prism//lib/prism/mutation_compiler.rb#334 + def visit_hash_node(node); end + + # Copy a HashPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#339 + def visit_hash_pattern_node(node); end + + # Copy a IfNode node + # + # source://prism//lib/prism/mutation_compiler.rb#344 + def visit_if_node(node); end + + # Copy a ImaginaryNode node + # + # source://prism//lib/prism/mutation_compiler.rb#349 + def visit_imaginary_node(node); end + + # Copy a ImplicitNode node + # + # source://prism//lib/prism/mutation_compiler.rb#354 + def visit_implicit_node(node); end + + # Copy a ImplicitRestNode node + # + # source://prism//lib/prism/mutation_compiler.rb#359 + def visit_implicit_rest_node(node); end + + # Copy a InNode node + # + # source://prism//lib/prism/mutation_compiler.rb#364 + def visit_in_node(node); end + + # Copy a IndexAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#369 + def visit_index_and_write_node(node); end + + # Copy a IndexOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#374 + def visit_index_operator_write_node(node); end + + # Copy a IndexOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#379 + def visit_index_or_write_node(node); end + + # Copy a IndexTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#384 + def visit_index_target_node(node); end + + # Copy a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#389 + def visit_instance_variable_and_write_node(node); end + + # Copy a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#394 + def visit_instance_variable_operator_write_node(node); end + + # Copy a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#399 + def visit_instance_variable_or_write_node(node); end + + # Copy a InstanceVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#404 + def visit_instance_variable_read_node(node); end + + # Copy a InstanceVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#409 + def visit_instance_variable_target_node(node); end + + # Copy a InstanceVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#414 + def visit_instance_variable_write_node(node); end + + # Copy a IntegerNode node + # + # source://prism//lib/prism/mutation_compiler.rb#419 + def visit_integer_node(node); end + + # Copy a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#424 + def visit_interpolated_match_last_line_node(node); end + + # Copy a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#429 + def visit_interpolated_regular_expression_node(node); end + + # Copy a InterpolatedStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#434 + def visit_interpolated_string_node(node); end + + # Copy a InterpolatedSymbolNode node + # + # source://prism//lib/prism/mutation_compiler.rb#439 + def visit_interpolated_symbol_node(node); end + + # Copy a InterpolatedXStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#444 + def visit_interpolated_x_string_node(node); end + + # Copy a KeywordHashNode node + # + # source://prism//lib/prism/mutation_compiler.rb#449 + def visit_keyword_hash_node(node); end + + # Copy a KeywordRestParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#454 + def visit_keyword_rest_parameter_node(node); end + + # Copy a LambdaNode node + # + # source://prism//lib/prism/mutation_compiler.rb#459 + def visit_lambda_node(node); end + + # Copy a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#464 + def visit_local_variable_and_write_node(node); end + + # Copy a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#469 + def visit_local_variable_operator_write_node(node); end + + # Copy a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#474 + def visit_local_variable_or_write_node(node); end + + # Copy a LocalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#479 + def visit_local_variable_read_node(node); end + + # Copy a LocalVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#484 + def visit_local_variable_target_node(node); end + + # Copy a LocalVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#489 + def visit_local_variable_write_node(node); end + + # Copy a MatchLastLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#494 + def visit_match_last_line_node(node); end + + # Copy a MatchPredicateNode node + # + # source://prism//lib/prism/mutation_compiler.rb#499 + def visit_match_predicate_node(node); end + + # Copy a MatchRequiredNode node + # + # source://prism//lib/prism/mutation_compiler.rb#504 + def visit_match_required_node(node); end + + # Copy a MatchWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#509 + def visit_match_write_node(node); end + + # Copy a MissingNode node + # + # source://prism//lib/prism/mutation_compiler.rb#514 + def visit_missing_node(node); end + + # Copy a ModuleNode node + # + # source://prism//lib/prism/mutation_compiler.rb#519 + def visit_module_node(node); end + + # Copy a MultiTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#524 + def visit_multi_target_node(node); end + + # Copy a MultiWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#529 + def visit_multi_write_node(node); end + + # Copy a NextNode node + # + # source://prism//lib/prism/mutation_compiler.rb#534 + def visit_next_node(node); end + + # Copy a NilNode node + # + # source://prism//lib/prism/mutation_compiler.rb#539 + def visit_nil_node(node); end + + # Copy a NoKeywordsParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#544 + def visit_no_keywords_parameter_node(node); end + + # Copy a NumberedParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#549 + def visit_numbered_parameters_node(node); end + + # Copy a NumberedReferenceReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#554 + def visit_numbered_reference_read_node(node); end + + # Copy a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#559 + def visit_optional_keyword_parameter_node(node); end + + # Copy a OptionalParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#564 + def visit_optional_parameter_node(node); end + + # Copy a OrNode node + # + # source://prism//lib/prism/mutation_compiler.rb#569 + def visit_or_node(node); end + + # Copy a ParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#574 + def visit_parameters_node(node); end + + # Copy a ParenthesesNode node + # + # source://prism//lib/prism/mutation_compiler.rb#579 + def visit_parentheses_node(node); end + + # Copy a PinnedExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#584 + def visit_pinned_expression_node(node); end + + # Copy a PinnedVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#589 + def visit_pinned_variable_node(node); end + + # Copy a PostExecutionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#594 + def visit_post_execution_node(node); end + + # Copy a PreExecutionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#599 + def visit_pre_execution_node(node); end + + # Copy a ProgramNode node + # + # source://prism//lib/prism/mutation_compiler.rb#604 + def visit_program_node(node); end + + # Copy a RangeNode node + # + # source://prism//lib/prism/mutation_compiler.rb#609 + def visit_range_node(node); end + + # Copy a RationalNode node + # + # source://prism//lib/prism/mutation_compiler.rb#614 + def visit_rational_node(node); end + + # Copy a RedoNode node + # + # source://prism//lib/prism/mutation_compiler.rb#619 + def visit_redo_node(node); end + + # Copy a RegularExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#624 + def visit_regular_expression_node(node); end + + # Copy a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#629 + def visit_required_keyword_parameter_node(node); end + + # Copy a RequiredParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#634 + def visit_required_parameter_node(node); end + + # Copy a RescueModifierNode node + # + # source://prism//lib/prism/mutation_compiler.rb#639 + def visit_rescue_modifier_node(node); end + + # Copy a RescueNode node + # + # source://prism//lib/prism/mutation_compiler.rb#644 + def visit_rescue_node(node); end + + # Copy a RestParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#649 + def visit_rest_parameter_node(node); end + + # Copy a RetryNode node + # + # source://prism//lib/prism/mutation_compiler.rb#654 + def visit_retry_node(node); end + + # Copy a ReturnNode node + # + # source://prism//lib/prism/mutation_compiler.rb#659 + def visit_return_node(node); end + + # Copy a SelfNode node + # + # source://prism//lib/prism/mutation_compiler.rb#664 + def visit_self_node(node); end + + # Copy a SingletonClassNode node + # + # source://prism//lib/prism/mutation_compiler.rb#669 + def visit_singleton_class_node(node); end + + # Copy a SourceEncodingNode node + # + # source://prism//lib/prism/mutation_compiler.rb#674 + def visit_source_encoding_node(node); end + + # Copy a SourceFileNode node + # + # source://prism//lib/prism/mutation_compiler.rb#679 + def visit_source_file_node(node); end + + # Copy a SourceLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#684 + def visit_source_line_node(node); end + + # Copy a SplatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#689 + def visit_splat_node(node); end + + # Copy a StatementsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#694 + def visit_statements_node(node); end + + # Copy a StringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#699 + def visit_string_node(node); end + + # Copy a SuperNode node + # + # source://prism//lib/prism/mutation_compiler.rb#704 + def visit_super_node(node); end + + # Copy a SymbolNode node + # + # source://prism//lib/prism/mutation_compiler.rb#709 + def visit_symbol_node(node); end + + # Copy a TrueNode node + # + # source://prism//lib/prism/mutation_compiler.rb#714 + def visit_true_node(node); end + + # Copy a UndefNode node + # + # source://prism//lib/prism/mutation_compiler.rb#719 + def visit_undef_node(node); end + + # Copy a UnlessNode node + # + # source://prism//lib/prism/mutation_compiler.rb#724 + def visit_unless_node(node); end + + # Copy a UntilNode node + # + # source://prism//lib/prism/mutation_compiler.rb#729 + def visit_until_node(node); end + + # Copy a WhenNode node + # + # source://prism//lib/prism/mutation_compiler.rb#734 + def visit_when_node(node); end + + # Copy a WhileNode node + # + # source://prism//lib/prism/mutation_compiler.rb#739 + def visit_while_node(node); end + + # Copy a XStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#744 + def visit_x_string_node(node); end + + # Copy a YieldNode node + # + # source://prism//lib/prism/mutation_compiler.rb#749 + def visit_yield_node(node); end +end + +# Represents the use of the `next` keyword. +# +# next 1 +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#13810 +class Prism::NextNode < ::Prism::Node + # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void + # + # @return [NextNode] a new instance of NextNode + # + # source://prism//lib/prism/node.rb#13812 + def initialize(source, arguments, keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13821 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#13861 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13826 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13838 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13831 + def compact_child_nodes; end + + # def copy: (**params) -> NextNode + # + # source://prism//lib/prism/node.rb#13843 + sig { params(params: T.untyped).returns(Prism::NextNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13826 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#13856 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#13876 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#13871 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13864 + 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. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13902 + 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#13912 + def type; end + end +end + +# Represents the use of the `nil` keyword. +# +# nil +# ^^^ +# +# source://prism//lib/prism/node.rb#13921 +class Prism::NilNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [NilNode] a new instance of NilNode + # + # source://prism//lib/prism/node.rb#13923 + def initialize(source, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13930 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13935 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13945 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13940 + def compact_child_nodes; end + + # def copy: (**params) -> NilNode + # + # source://prism//lib/prism/node.rb#13950 + sig { params(params: T.untyped).returns(Prism::NilNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13935 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#13961 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#13967 + def inspect(inspector = T.unsafe(nil)); 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#13986 + 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#13996 + def type; end + end +end + +# Represents the use of `**nil` inside method arguments. +# +# def a(**nil) +# ^^^^^ +# end +# +# source://prism//lib/prism/node.rb#14006 +class Prism::NoKeywordsParameterNode < ::Prism::Node + # def initialize: (Location operator_loc, Location keyword_loc, Location location) -> void + # + # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode + # + # source://prism//lib/prism/node.rb#14008 + def initialize(source, operator_loc, keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14017 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14022 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14032 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14027 + def compact_child_nodes; end + + # def copy: (**params) -> NoKeywordsParameterNode + # + # source://prism//lib/prism/node.rb#14037 + sig { params(params: T.untyped).returns(Prism::NoKeywordsParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14022 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#14050 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#14078 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#14073 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14061 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14068 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14055 + 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 + # + # source://prism//lib/prism/node.rb#14099 + 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#14109 + def type; end + end +end + +# This represents a node in the tree. It is the parent class of all of the +# various node types. +# +# source://prism//lib/prism/node.rb#11 +class Prism::Node + # Accepts a visitor and calls back into the specialized visit function. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#62 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); 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#68 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # Returns an array of child nodes and locations that could potentially have + # comments attached to them. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#82 + def comment_targets; end + + # Returns an array of child nodes, excluding any `nil`s in the place of + # optional nodes that were not present. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#76 + sig { returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Returns an array of child nodes, including `nil`s in the place of optional + # nodes that were not present. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#68 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # A Location instance that represents the location of this node in the + # source. + # + # source://prism//lib/prism/node.rb#18 + sig { returns(Prism::Location) } + def location; end + + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#23 + def newline?; end + + # Similar to inspect, but respects the current level of indentation given by + # the pretty print object. + # + # source://prism//lib/prism/node.rb#42 + def pretty_print(q); end + + # source://prism//lib/prism/node.rb#27 + def set_newline_flag(newline_marked); end + + # Slice the location of the node from the source. + # + # source://prism//lib/prism/node.rb#36 + sig { returns(String) } + def slice; end + + # Convert this node into a graphviz dot graph string. + # + # source://prism//lib/prism/node.rb#50 + sig { returns(String) } + def to_dot; end + + # Returns a symbol symbolizing the type of node that this represents. This + # is particularly useful for case statements and array comparisons. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#88 + sig { returns(Symbol) } + def type; end + + private + + # A pointer to the source that this node was created from. + # + # source://prism//lib/prism/node.rb#13 + def source; end +end + +# This object is responsible for generating the output for the inspect method +# implementations of child nodes. +# +# source://prism//lib/prism/node_inspector.rb#6 +class Prism::NodeInspector + # @return [NodeInspector] a new instance of NodeInspector + # + # source://prism//lib/prism/node_inspector.rb#9 + def initialize(prefix = T.unsafe(nil)); end + + # Appends a line to the output with the current prefix. + # + # source://prism//lib/prism/node_inspector.rb#15 + sig { params(line: String).void } + def <<(line); end + + # Returns a new inspector that can be used to inspect a child node. + # + # source://prism//lib/prism/node_inspector.rb#59 + sig { params(append: String).returns(Prism::NodeInspector) } + def child_inspector(append); end + + # Generates a string that represents a child node. + # + # source://prism//lib/prism/node_inspector.rb#54 + sig { params(node: Prism::Node, append: String).returns(String) } + def child_node(node, append); end + + # This generates a string that is used as the header of the inspect output + # for any given node. + # + # source://prism//lib/prism/node_inspector.rb#21 + # This generates a string that is used as the header of the inspect output + sig { params(node: Prism::Node).returns(String) } + def header(node); end + + # Generates a string that represents a list of nodes. It handles properly + # using the box drawing characters to make the output look nice. + # + # source://prism//lib/prism/node_inspector.rb#31 + # Generates a string that represents a list of nodes. It handles properly + sig { params(prefix: String, nodes: T::Array[Prism::Node]).returns(String) } + def list(prefix, nodes); end + + # Generates a string that represents a location field on a node. + # + # source://prism//lib/prism/node_inspector.rb#45 + sig { params(value: Prism::Location).returns(String) } + def location(value); end + + # source://prism//lib/prism/node_inspector.rb#7 + sig { returns(String) } + def output; end + + # source://prism//lib/prism/node_inspector.rb#7 + sig { returns(String) } + def prefix; end + + # Returns the output as a string. + # + # source://prism//lib/prism/node_inspector.rb#64 + sig { returns(String) } + def to_str; end +end + +# 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#14118 +class Prism::NumberedParametersNode < ::Prism::Node + # def initialize: (Integer maximum, Location location) -> void + # + # @return [NumberedParametersNode] a new instance of NumberedParametersNode + # + # source://prism//lib/prism/node.rb#14120 + def initialize(source, maximum, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14128 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14133 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14143 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14138 + def compact_child_nodes; end + + # def copy: (**params) -> NumberedParametersNode + # + # source://prism//lib/prism/node.rb#14148 + sig { params(params: T.untyped).returns(Prism::NumberedParametersNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14133 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { maximum: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#14160 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#14169 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader maximum: Integer + # + # source://prism//lib/prism/node.rb#14165 + 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. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14189 + 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#14199 + def type; end + end +end + +# Represents reading a numbered reference to a capture in the previous match. +# +# $1 +# ^^ +# +# source://prism//lib/prism/node.rb#14208 +class Prism::NumberedReferenceReadNode < ::Prism::Node + # def initialize: (Integer number, Location location) -> void + # + # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#14210 + def initialize(source, number, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14218 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14223 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14233 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14228 + def compact_child_nodes; end + + # def copy: (**params) -> NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#14238 + sig { params(params: T.untyped).returns(Prism::NumberedReferenceReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14223 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { number: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#14250 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#14265 + def inspect(inspector = T.unsafe(nil)); end + + # The (1-indexed, from the left) number of the capture group. Numbered references that would overflow a `uint32` result in a `number` of exactly `2**32 - 1`. + # + # $1 # number `1` + # + # $5432 # number `5432` + # + # $4294967296 # number `4294967295` + # + # source://prism//lib/prism/node.rb#14261 + 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 + # + # source://prism//lib/prism/node.rb#14285 + 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#14295 + def type; end + end +end + +# Represents an optional keyword parameter to a method, block, or lambda definition. +# +# def a(b: 1) +# ^^^^ +# end +# +# source://prism//lib/prism/node.rb#14305 +class Prism::OptionalKeywordParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol name, Location name_loc, Node value, Location location) -> void + # + # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode + # + # source://prism//lib/prism/node.rb#14307 + def initialize(source, flags, name, name_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14318 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14323 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14333 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14328 + def compact_child_nodes; end + + # def copy: (**params) -> OptionalKeywordParameterNode + # + # source://prism//lib/prism/node.rb#14338 + sig { params(params: T.untyped).returns(Prism::OptionalKeywordParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14323 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, value: Node, location: Location } + # + # source://prism//lib/prism/node.rb#14353 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#14380 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#14362 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#14365 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14375 + 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 + # + # source://prism//lib/prism/node.rb#14405 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#14371 + sig { returns(Prism::Node) } + def value; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#14358 + 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#14415 + def type; end + end +end + +# Represents an optional parameter to a method, block, or lambda definition. +# +# def a(b = 1) +# ^^^^^ +# end +# +# source://prism//lib/prism/node.rb#14425 +class Prism::OptionalParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # + # @return [OptionalParameterNode] a new instance of OptionalParameterNode + # + # source://prism//lib/prism/node.rb#14427 + def initialize(source, flags, name, name_loc, operator_loc, value, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14439 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14444 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14454 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14449 + def compact_child_nodes; end + + # def copy: (**params) -> OptionalParameterNode + # + # source://prism//lib/prism/node.rb#14459 + sig { params(params: T.untyped).returns(Prism::OptionalParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14444 + sig { 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: Node, location: Location } + # + # source://prism//lib/prism/node.rb#14475 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#14513 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#14484 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#14487 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14508 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14493 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14503 + 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 + # + # source://prism//lib/prism/node.rb#14539 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#14499 + sig { returns(Prism::Node) } + def value; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#14480 + 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#14549 + def type; end + end +end + +# Represents the use of the `||` operator or the `or` keyword. +# +# left or right +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14558 +class Prism::OrNode < ::Prism::Node + # def initialize: (Node left, Node right, Location operator_loc, Location location) -> void + # + # @return [OrNode] a new instance of OrNode + # + # source://prism//lib/prism/node.rb#14560 + def initialize(source, left, right, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14570 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14575 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14585 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14580 + def compact_child_nodes; end + + # def copy: (**params) -> OrNode + # + # source://prism//lib/prism/node.rb#14590 + sig { params(params: T.untyped).returns(Prism::OrNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14575 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Node, right: Node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#14604 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#14642 + def inspect(inspector = T.unsafe(nil)); end + + # Represents the left 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). + # + # left or right + # ^^^^ + # + # 1 || 2 + # ^ + # + # source://prism//lib/prism/node.rb#14615 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14637 + sig { returns(String) } + def operator; end + + # The location of the `or` keyword or the `||` operator. + # + # left or right + # ^^ + # + # source://prism//lib/prism/node.rb#14630 + 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). + # + # left || right + # ^^^^^ + # + # 1 or 2 + # ^ + # + # source://prism//lib/prism/node.rb#14624 + 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. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14666 + 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#14676 + def type; end + end +end + +# A parser for the pack template language. +# +# source://prism//lib/prism/pack.rb#5 +module Prism::Pack + class << self + def parse(_arg0, _arg1, _arg2); end + end +end + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) + +# A directive in the pack template language. +# +# source://prism//lib/prism/pack.rb#59 +class Prism::Pack::Directive + # Initialize a new directive with the given values. + # + # @return [Directive] a new instance of Directive + # + # source://prism//lib/prism/pack.rb#88 + def initialize(version, variant, source, type, signed, endian, size, length_type, length); end + + # Provide a human-readable description of the directive. + # + # source://prism//lib/prism/pack.rb#130 + def describe; end + + # The type of endianness of the directive. + # + # source://prism//lib/prism/pack.rb#76 + def endian; end + + # The length of this directive (used for integers). + # + # source://prism//lib/prism/pack.rb#85 + def length; end + + # The length type of this directive (used for integers). + # + # source://prism//lib/prism/pack.rb#82 + def length_type; end + + # The type of signedness of the directive. + # + # source://prism//lib/prism/pack.rb#73 + def signed; end + + # The size of the directive. + # + # source://prism//lib/prism/pack.rb#79 + def size; end + + # A byteslice of the source string that this directive represents. + # + # source://prism//lib/prism/pack.rb#67 + def source; end + + # The type of the directive. + # + # source://prism//lib/prism/pack.rb#70 + def type; end + + # A symbol representing whether or not we are packing or unpacking. + # + # source://prism//lib/prism/pack.rb#64 + def variant; end + + # A symbol representing the version of Ruby. + # + # source://prism//lib/prism/pack.rb#61 + def version; end +end + +# The descriptions of the various types of endianness. +# +# source://prism//lib/prism/pack.rb#101 +Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of signedness. +# +# source://prism//lib/prism/pack.rb#110 +Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of sizes. +# +# source://prism//lib/prism/pack.rb#117 +Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) + +# The result of parsing a pack template. +# +# source://prism//lib/prism/pack.rb#195 +class Prism::Pack::Format + # Create a new Format with the given directives and encoding. + # + # @return [Format] a new instance of Format + # + # source://prism//lib/prism/pack.rb#203 + def initialize(directives, encoding); end + + # Provide a human-readable description of the format. + # + # source://prism//lib/prism/pack.rb#209 + def describe; end + + # A list of the directives in the template. + # + # source://prism//lib/prism/pack.rb#197 + def directives; end + + # The encoding of the template. + # + # source://prism//lib/prism/pack.rb#200 + def encoding; end +end + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) + +# Flags for parameter nodes. +# +# source://prism//lib/prism/node.rb#19304 +module Prism::ParameterFlags; end + +# a parameter name that has been repeated in the method signature +# +# source://prism//lib/prism/node.rb#19306 +Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) + +# Represents the list of parameters on a method, block, or lambda definition. +# +# def a(b, c, d) +# ^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#14686 +class Prism::ParametersNode < ::Prism::Node + # def initialize: (Array[Node] requireds, Array[Node] optionals, Node? rest, Array[Node] posts, Array[Node] keywords, Node? keyword_rest, BlockParameterNode? block, Location location) -> void + # + # @return [ParametersNode] a new instance of ParametersNode + # + # source://prism//lib/prism/node.rb#14688 + def initialize(source, requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14702 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader block: BlockParameterNode? + # + # source://prism//lib/prism/node.rb#14771 + sig { returns(T.nilable(Prism::BlockParameterNode)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14707 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14725 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14712 + def compact_child_nodes; end + + # def copy: (**params) -> ParametersNode + # + # source://prism//lib/prism/node.rb#14730 + sig { params(params: T.untyped).returns(Prism::ParametersNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14707 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { requireds: Array[Node], optionals: Array[Node], rest: Node?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location } + # + # source://prism//lib/prism/node.rb#14748 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#14775 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader keyword_rest: Node? + # + # source://prism//lib/prism/node.rb#14768 + sig { returns(T.nilable(Prism::Node)) } + def keyword_rest; end + + # attr_reader keywords: Array[Node] + # + # source://prism//lib/prism/node.rb#14765 + sig { returns(T::Array[Prism::Node]) } + def keywords; end + + # attr_reader optionals: Array[Node] + # + # source://prism//lib/prism/node.rb#14756 + sig { returns(T::Array[Prism::Node]) } + def optionals; end + + # attr_reader posts: Array[Node] + # + # source://prism//lib/prism/node.rb#14762 + sig { returns(T::Array[Prism::Node]) } + def posts; end + + # attr_reader requireds: Array[Node] + # + # source://prism//lib/prism/node.rb#14753 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#14759 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # Mirrors the Method#parameters method. + # + # source://prism//lib/prism/node_ext.rb#172 + 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. + # + # 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#14816 + 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#14826 + def type; end + end +end + +# Represents a parenthesized expression +# +# (10 + 34) +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14835 +class Prism::ParenthesesNode < ::Prism::Node + # def initialize: (Node? body, Location opening_loc, Location closing_loc, Location location) -> void + # + # @return [ParenthesesNode] a new instance of ParenthesesNode + # + # source://prism//lib/prism/node.rb#14837 + def initialize(source, body, opening_loc, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14847 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#14892 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14856 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#14913 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#14901 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14868 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14861 + def compact_child_nodes; end + + # def copy: (**params) -> ParenthesesNode + # + # source://prism//lib/prism/node.rb#14873 + sig { params(params: T.untyped).returns(Prism::ParenthesesNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14856 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { body: Node?, opening_loc: Location, closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#14887 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#14918 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#14908 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#14895 + sig { returns(Prism::Location) } + def opening_loc; end + + # source://prism//lib/prism/node.rb#14851 + def set_newline_flag(newline_marked); 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#14945 + 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#14955 + def type; end + end +end + +# This represents an error that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#338 +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#349 + def initialize(message, location, level); end + + # Implement the hash pattern matching interface for ParseError. + # + # source://prism//lib/prism/parse_result.rb#356 + def deconstruct_keys(keys); end + + # Returns a string representation of this error. + # + # source://prism//lib/prism/parse_result.rb#361 + def inspect; end + + # The level of this error. + # + # source://prism//lib/prism/parse_result.rb#346 + def level; end + + # A Location object representing the location of this error in the source. + # + # source://prism//lib/prism/parse_result.rb#343 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this error. + # + # source://prism//lib/prism/parse_result.rb#340 + sig { returns(String) } + def message; end +end + +# This represents the result of a call to ::parse or ::parse_file. It contains +# the AST, any comments that were encounters, and any errors that were +# encountered. +# +# source://prism//lib/prism/parse_result.rb#398 +class Prism::ParseResult + # Create a new parse result object with the given values. + # + # @return [ParseResult] a new instance of ParseResult + # + # source://prism//lib/prism/parse_result.rb#425 + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Attach the list of comments to their respective locations in the tree. + # + # source://prism//lib/prism/parse_result/comments.rb#173 + def attach_comments!; end + + # The list of comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#405 + sig { returns(T::Array[Prism::Comment]) } + def comments; end + + # An optional location that represents the location of the __END__ marker + # 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#413 + def data_loc; end + + # Implement the hash pattern matching interface for ParseResult. + # + # source://prism//lib/prism/parse_result.rb#436 + def deconstruct_keys(keys); end + + # The list of errors that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#416 + sig { returns(T::Array[Prism::ParseError]) } + def errors; end + + # Returns true if there were errors during parsing and false if there were + # not. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#448 + def failure?; end + + # The list of magic comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#408 + def magic_comments; end + + # Walk the tree and mark nodes that are on a new line. + # + # source://prism//lib/prism/parse_result/newlines.rb#60 + def mark_newlines!; end + + # A Source instance that represents the source code that was parsed. + # + # source://prism//lib/prism/parse_result.rb#422 + sig { returns(Prism::Source) } + def source; end + + # Returns true if there were no errors during parsing and false if there + # were. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#442 + def success?; end + + # The value that was generated by parsing. Normally this holds the AST, but + # it can sometimes how a list of tokens or other results passed back from + # the parser. + # + # source://prism//lib/prism/parse_result.rb#402 + sig { returns(Prism::ProgramNode) } + def value; end + + # The list of warnings that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#419 + sig { returns(T::Array[Prism::ParseWarning]) } + def warnings; end +end + +# When we've parsed the source, we have both the syntax tree and the list of +# comments that we found in the source. This class is responsible for +# walking the tree and finding the nearest location to attach each comment. +# +# It does this by first finding the nearest locations to each comment. +# Locations can either come from nodes directly or from location fields on +# nodes. For example, a `ClassNode` has an overall location encompassing the +# entire class, but it also has a location for the `class` keyword. +# +# Once the nearest locations are found, it determines which one to attach +# to. If it's a trailing comment (a comment on the same line as other source +# code), it will favor attaching to the nearest location that occurs before +# the comment. Otherwise it will favor attaching to the nearest location +# that is after the comment. +# +# source://prism//lib/prism/parse_result/comments.rb#19 +class Prism::ParseResult::Comments + # Create a new Comments object that will attach comments to the given + # parse result. + # + # @return [Comments] a new instance of Comments + # + # source://prism//lib/prism/parse_result/comments.rb#78 + def initialize(parse_result); end + + # Attach the comments to their respective locations in the tree by + # mutating the parse result. + # + # source://prism//lib/prism/parse_result/comments.rb#84 + def attach!; end + + # The parse result that we are attaching comments to. + # + # source://prism//lib/prism/parse_result/comments.rb#74 + def parse_result; end + + private + + # Responsible for finding the nearest targets to the given comment within + # the context of the given encapsulating node. + # + # source://prism//lib/prism/parse_result/comments.rb#103 + def nearest_targets(node, comment); end +end + +# A target for attaching comments that is based on a location field on a +# node. For example, the `end` token of a ClassNode. +# +# source://prism//lib/prism/parse_result/comments.rb#49 +class Prism::ParseResult::Comments::LocationTarget + # @return [LocationTarget] a new instance of LocationTarget + # + # source://prism//lib/prism/parse_result/comments.rb#52 + def initialize(location); end + + # source://prism//lib/prism/parse_result/comments.rb#68 + def <<(comment); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/comments.rb#64 + def encloses?(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#60 + def end_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#50 + def location; end + + # source://prism//lib/prism/parse_result/comments.rb#56 + def start_offset; end +end + +# A target for attaching comments that is based on a specific node's +# location. +# +# source://prism//lib/prism/parse_result/comments.rb#22 +class Prism::ParseResult::Comments::NodeTarget + # @return [NodeTarget] a new instance of NodeTarget + # + # source://prism//lib/prism/parse_result/comments.rb#25 + def initialize(node); end + + # source://prism//lib/prism/parse_result/comments.rb#42 + def <<(comment); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/comments.rb#37 + def encloses?(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#33 + def end_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#23 + def node; end + + # source://prism//lib/prism/parse_result/comments.rb#29 + def start_offset; 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: +# +# * if statements +# * unless statements +# * nodes that are children of statements lists +# +# In order to keep track of the newlines, we have a list of offsets that +# come back from the parser. We assign these offsets to the first nodes that +# we find in the tree that are on those lines. +# +# Note that the logic in this file should be kept in sync with the Java +# MarkNewlinesVisitor, since that visitor is responsible for marking the +# newlines for JRuby/TruffleRuby. +# +# source://prism//lib/prism/parse_result/newlines.rb#20 +class Prism::ParseResult::Newlines < ::Prism::Visitor + # Create a new Newlines visitor with the given newline offsets. + # + # @return [Newlines] a new instance of Newlines + # + # source://prism//lib/prism/parse_result/newlines.rb#22 + def initialize(newline_marked); end + + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#27 + def visit_block_node(node); end + + # Mark if/unless nodes as newlines. + # + # source://prism//lib/prism/parse_result/newlines.rb#41 + def visit_if_node(node); end + + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#27 + def visit_lambda_node(node); end + + # Permit statements lists to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#49 + def visit_statements_node(node); end + + # Mark if/unless nodes as newlines. + # + # source://prism//lib/prism/parse_result/newlines.rb#41 + def visit_unless_node(node); end +end + +# This represents a warning that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#367 +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#378 + def initialize(message, location, level); end + + # Implement the hash pattern matching interface for ParseWarning. + # + # source://prism//lib/prism/parse_result.rb#385 + def deconstruct_keys(keys); end + + # Returns a string representation of this warning. + # + # source://prism//lib/prism/parse_result.rb#390 + def inspect; end + + # The level of this warning. + # + # source://prism//lib/prism/parse_result.rb#375 + def level; end + + # A Location object representing the location of this warning in the source. + # + # source://prism//lib/prism/parse_result.rb#372 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this warning. + # + # source://prism//lib/prism/parse_result.rb#369 + sig { returns(String) } + def message; 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 ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]] +# end +# +# the pattern is the ConstantPathNode[...] expression. +# +# The pattern gets compiled into an object that responds to #call by running +# the #compile method. This method itself will run back through Prism 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 = Prism::Pattern.new("ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]]").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 Prism::Pattern::CompilationError will be +# raised. +# +# source://prism//lib/prism/pattern.rb#37 +class Prism::Pattern + # Create a new pattern with the given query. The query should be a string + # containing a Ruby pattern matching expression. + # + # @return [Pattern] a new instance of Pattern + # + # source://prism//lib/prism/pattern.rb#63 + def initialize(query); end + + # Compile the query into a callable object that can be used to match against + # nodes. + # + # source://prism//lib/prism/pattern.rb#70 + def compile; end + + # The query that this pattern was initialized with. + # + # source://prism//lib/prism/pattern.rb#59 + def query; end + + # Scan the given node and all of its children for nodes that match the + # pattern. If a block is given, it will be called with each node that + # matches the pattern. If no block is given, an enumerator will be returned + # that will yield each node that matches the pattern. + # + # source://prism//lib/prism/pattern.rb#79 + def scan(root); end + + private + + # Shortcut for combining two procs into one that returns true if both return + # true. + # + # source://prism//lib/prism/pattern.rb#95 + def combine_and(left, right); end + + # Shortcut for combining two procs into one that returns true if either + # returns true. + # + # source://prism//lib/prism/pattern.rb#101 + def combine_or(left, right); end + + # in foo | bar + # + # source://prism//lib/prism/pattern.rb#136 + def compile_alternation_pattern_node(node); end + + # in [foo, bar, baz] + # + # source://prism//lib/prism/pattern.rb#111 + def compile_array_pattern_node(node); end + + # in Prism::ConstantReadNode + # + # source://prism//lib/prism/pattern.rb#141 + def compile_constant_path_node(node); end + + # in ConstantReadNode + # in String + # + # source://prism//lib/prism/pattern.rb#153 + def compile_constant_read_node(node); end + + # Raise an error because the given node is not supported. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/pattern.rb#106 + def compile_error(node); end + + # in InstanceVariableReadNode[name: Symbol] + # in { name: Symbol } + # + # source://prism//lib/prism/pattern.rb#171 + def compile_hash_pattern_node(node); end + + # in nil + # + # source://prism//lib/prism/pattern.rb#196 + def compile_nil_node(node); end + + # Compile any kind of node. Dispatch out to the individual compilation + # methods based on the type of node. + # + # source://prism//lib/prism/pattern.rb#225 + def compile_node(node); end + + # in /foo/ + # + # source://prism//lib/prism/pattern.rb#201 + def compile_regular_expression_node(node); end + + # in "" + # in "foo" + # + # source://prism//lib/prism/pattern.rb#209 + def compile_string_node(node); end + + # in :+ + # in :foo + # + # source://prism//lib/prism/pattern.rb#217 + def compile_symbol_node(node); end +end + +# Raised when the query given to a pattern is either invalid Ruby syntax or +# is using syntax that we don't yet support. +# +# source://prism//lib/prism/pattern.rb#40 +class Prism::Pattern::CompilationError < ::StandardError + # Create a new CompilationError with the given representation of the node + # that caused the error. + # + # @return [CompilationError] a new instance of CompilationError + # + # source://prism//lib/prism/pattern.rb#43 + def initialize(repr); end +end + +# Represents the use of the `^` operator for pinning an expression in a pattern matching expression. +# +# foo in ^(bar) +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#14964 +class Prism::PinnedExpressionNode < ::Prism::Node + # def initialize: (Node expression, Location operator_loc, Location lparen_loc, Location rparen_loc, Location location) -> void + # + # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode + # + # source://prism//lib/prism/node.rb#14966 + def initialize(source, expression, operator_loc, lparen_loc, rparen_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14977 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14982 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14992 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14987 + def compact_child_nodes; end + + # def copy: (**params) -> PinnedExpressionNode + # + # source://prism//lib/prism/node.rb#14997 + sig { params(params: T.untyped).returns(Prism::PinnedExpressionNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14982 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#15012 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader expression: Node + # + # source://prism//lib/prism/node.rb#15017 + sig { returns(Prism::Node) } + def expression; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#15054 + def inspect(inspector = T.unsafe(nil)); end + + # def lparen: () -> String + # + # source://prism//lib/prism/node.rb#15044 + sig { returns(String) } + def lparen; end + + # attr_reader lparen_loc: Location + # + # source://prism//lib/prism/node.rb#15026 + sig { returns(Prism::Location) } + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15039 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#15020 + sig { returns(Prism::Location) } + def operator_loc; end + + # def rparen: () -> String + # + # source://prism//lib/prism/node.rb#15049 + sig { returns(String) } + def rparen; end + + # attr_reader rparen_loc: Location + # + # source://prism//lib/prism/node.rb#15032 + 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. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15078 + 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#15088 + def type; end + end +end + +# Represents the use of the `^` operator for pinning a variable in a pattern matching expression. +# +# foo in ^bar +# ^^^^ +# +# source://prism//lib/prism/node.rb#15097 +class Prism::PinnedVariableNode < ::Prism::Node + # def initialize: (Node variable, Location operator_loc, Location location) -> void + # + # @return [PinnedVariableNode] a new instance of PinnedVariableNode + # + # source://prism//lib/prism/node.rb#15099 + def initialize(source, variable, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15108 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15113 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15123 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15118 + def compact_child_nodes; end + + # def copy: (**params) -> PinnedVariableNode + # + # source://prism//lib/prism/node.rb#15128 + sig { params(params: T.untyped).returns(Prism::PinnedVariableNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15113 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { variable: Node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#15141 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#15161 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15156 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#15149 + 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 + # + # source://prism//lib/prism/node.rb#15183 + def type; end + + # attr_reader variable: Node + # + # source://prism//lib/prism/node.rb#15146 + sig { returns(Prism::Node) } + 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 + # + # source://prism//lib/prism/node.rb#15193 + def type; end + end +end + +# Represents the use of the `END` keyword. +# +# END { foo } +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15202 +class Prism::PostExecutionNode < ::Prism::Node + # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void + # + # @return [PostExecutionNode] a new instance of PostExecutionNode + # + # source://prism//lib/prism/node.rb#15204 + def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15215 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15220 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#15289 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#15272 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15232 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15225 + def compact_child_nodes; end + + # def copy: (**params) -> PostExecutionNode + # + # source://prism//lib/prism/node.rb#15237 + sig { params(params: T.untyped).returns(Prism::PostExecutionNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15220 + sig { 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 } + # + # source://prism//lib/prism/node.rb#15252 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#15294 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15279 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15260 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#15284 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#15266 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#15257 + 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 + # + # source://prism//lib/prism/node.rb#15322 + 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#15332 + def type; end + end +end + +# Represents the use of the `BEGIN` keyword. +# +# BEGIN { foo } +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15341 +class Prism::PreExecutionNode < ::Prism::Node + # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void + # + # @return [PreExecutionNode] a new instance of PreExecutionNode + # + # source://prism//lib/prism/node.rb#15343 + def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15354 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15359 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#15428 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#15411 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15371 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15364 + def compact_child_nodes; end + + # def copy: (**params) -> PreExecutionNode + # + # source://prism//lib/prism/node.rb#15376 + sig { params(params: T.untyped).returns(Prism::PreExecutionNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15359 + sig { 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 } + # + # source://prism//lib/prism/node.rb#15391 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#15433 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15418 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15399 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#15423 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#15405 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#15396 + 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 + # + # source://prism//lib/prism/node.rb#15461 + 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#15471 + def type; end + end +end + +# The top level node of any parse tree. +# +# source://prism//lib/prism/node.rb#15477 +class Prism::ProgramNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, StatementsNode statements, Location location) -> void + # + # @return [ProgramNode] a new instance of ProgramNode + # + # source://prism//lib/prism/node.rb#15479 + def initialize(source, locals, statements, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15488 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15493 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15503 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15498 + def compact_child_nodes; end + + # def copy: (**params) -> ProgramNode + # + # source://prism//lib/prism/node.rb#15508 + sig { params(params: T.untyped).returns(Prism::ProgramNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15493 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], statements: StatementsNode, location: Location } + # + # source://prism//lib/prism/node.rb#15521 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#15533 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#15526 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader statements: StatementsNode + # + # source://prism//lib/prism/node.rb#15529 + 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. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15555 + 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#15565 + def type; end + end +end + +# Flags for range and flip-flop nodes. +# +# source://prism//lib/prism/node.rb#19310 +module Prism::RangeFlags; end + +# ... operator +# +# source://prism//lib/prism/node.rb#19312 +Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) + +# Represents the use of the `..` or `...` operators. +# +# 1..2 +# ^^^^ +# +# c if a =~ /left/ ... b =~ /right/ +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15577 +class Prism::RangeNode < ::Prism::Node + # def initialize: (Integer flags, Node? left, Node? right, Location operator_loc, Location location) -> void + # + # @return [RangeNode] a new instance of RangeNode + # + # source://prism//lib/prism/node.rb#15579 + def initialize(source, flags, left, right, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15590 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15595 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15608 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15600 + def compact_child_nodes; end + + # def copy: (**params) -> RangeNode + # + # source://prism//lib/prism/node.rb#15613 + sig { params(params: T.untyped).returns(Prism::RangeNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15595 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#15628 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15663 + sig { returns(T::Boolean) } + def exclude_end?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#15673 + def inspect(inspector = T.unsafe(nil)); end + + # The left-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # 1... + # ^ + # + # hello...goodbye + # ^^^^^ + # + # source://prism//lib/prism/node.rb#15643 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15668 + sig { returns(String) } + def operator; end + + # The location of the `..` or `...` operator. + # + # source://prism//lib/prism/node.rb#15656 + sig { returns(Prism::Location) } + def operator_loc; end + + # The right-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # ..5 + # ^ + # + # 1...foo + # ^^^ + # If neither right-hand or left-hand side was included, this will be a MissingNode. + # + # source://prism//lib/prism/node.rb#15653 + 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 + # + # source://prism//lib/prism/node.rb#15707 + def type; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#15633 + 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#15717 + def type; end + end +end + +# Represents a rational number literal. +# +# 1.0r +# ^^^^ +# +# source://prism//lib/prism/node.rb#15726 +class Prism::RationalNode < ::Prism::Node + # def initialize: (Node numeric, Location location) -> void + # + # @return [RationalNode] a new instance of RationalNode + # + # source://prism//lib/prism/node.rb#15728 + def initialize(source, numeric, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15736 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15741 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15751 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15746 + def compact_child_nodes; end + + # def copy: (**params) -> RationalNode + # + # source://prism//lib/prism/node.rb#15756 + sig { params(params: T.untyped).returns(Prism::RationalNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15741 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Node, location: Location } + # + # source://prism//lib/prism/node.rb#15768 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#15777 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader numeric: Node + # + # source://prism//lib/prism/node.rb#15773 + sig { returns(Prism::Node) } + 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. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15798 + def type; end + + # Returns the value of the node as a Ruby Rational. + # + # source://prism//lib/prism/node_ext.rb#83 + 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 + # + # source://prism//lib/prism/node.rb#15808 + def type; end + end +end + +# Represents the use of the `redo` keyword. +# +# redo +# ^^^^ +# +# source://prism//lib/prism/node.rb#15817 +class Prism::RedoNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [RedoNode] a new instance of RedoNode + # + # source://prism//lib/prism/node.rb#15819 + def initialize(source, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15826 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15831 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15841 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15836 + def compact_child_nodes; end + + # def copy: (**params) -> RedoNode + # + # source://prism//lib/prism/node.rb#15846 + sig { params(params: T.untyped).returns(Prism::RedoNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15831 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#15857 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#15863 + def inspect(inspector = T.unsafe(nil)); 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#15882 + 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#15892 + def type; end + end +end + +# Flags for regular expression and match last line nodes. +# +# source://prism//lib/prism/node.rb#19316 +module Prism::RegularExpressionFlags; end + +# n - forces the ASCII-8BIT encoding +# +# source://prism//lib/prism/node.rb#19333 +Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) + +# e - forces the EUC-JP encoding +# +# source://prism//lib/prism/node.rb#19330 +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#19321 +Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19345 +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#19348 +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#19342 +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#19318 +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#19324 +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#19327 +Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) + +# u - forces the UTF-8 encoding +# +# source://prism//lib/prism/node.rb#19339 +Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) + +# s - forces the Windows-31J encoding +# +# source://prism//lib/prism/node.rb#19336 +Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) + +# Represents a regular expression literal with no interpolation. +# +# /foo/i +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#15901 +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 + # + # @return [RegularExpressionNode] a new instance of RegularExpressionNode + # + # source://prism//lib/prism/node.rb#15903 + def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15915 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16007 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15920 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#16047 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#15972 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15930 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15925 + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#16042 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#15966 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (**params) -> RegularExpressionNode + # + # source://prism//lib/prism/node.rb#15935 + sig { params(params: T.untyped).returns(Prism::RegularExpressionNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15920 + sig { 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 } + # + # source://prism//lib/prism/node.rb#15951 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16002 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15987 + sig { returns(T::Boolean) } + def extended?; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16027 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16032 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16022 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15982 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#16052 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15992 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15997 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#16037 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#15960 + 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 + # + # source://prism//lib/prism/node.rb#16077 + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#15978 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16017 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16012 + sig { returns(T::Boolean) } + def windows_31j?; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#15956 + 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#16087 + def type; end + end +end + +# source://prism//lib/prism/node_ext.rb#6 +module Prism::RegularExpressionOptions + # Returns a numeric value that represents the flags that were used to create + # the regular expression. + # + # source://prism//lib/prism/node_ext.rb#9 + def options; end +end + +# Represents a required keyword parameter to a method, block, or lambda definition. +# +# def a(b: ) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#16097 +class Prism::RequiredKeywordParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol name, Location name_loc, Location location) -> void + # + # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode + # + # source://prism//lib/prism/node.rb#16099 + def initialize(source, flags, name, name_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16109 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16114 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16124 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16119 + def compact_child_nodes; end + + # def copy: (**params) -> RequiredKeywordParameterNode + # + # source://prism//lib/prism/node.rb#16129 + sig { params(params: T.untyped).returns(Prism::RequiredKeywordParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16114 + sig { 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 } + # + # source://prism//lib/prism/node.rb#16143 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#16167 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#16152 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#16155 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16162 + 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 + # + # source://prism//lib/prism/node.rb#16190 + def type; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16148 + 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#16200 + def type; end + end +end + +# Represents a required parameter to a method, block, or lambda definition. +# +# def a(b) +# ^ +# end +# +# source://prism//lib/prism/node.rb#16210 +class Prism::RequiredParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol name, Location location) -> void + # + # @return [RequiredParameterNode] a new instance of RequiredParameterNode + # + # source://prism//lib/prism/node.rb#16212 + def initialize(source, flags, name, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16221 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16226 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16236 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16231 + def compact_child_nodes; end + + # def copy: (**params) -> RequiredParameterNode + # + # source://prism//lib/prism/node.rb#16241 + sig { params(params: T.untyped).returns(Prism::RequiredParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16226 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#16254 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#16272 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#16263 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16267 + 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 + # + # source://prism//lib/prism/node.rb#16294 + def type; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16259 + 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#16304 + def type; end + end +end + +# Represents an expression modified with a rescue. +# +# foo rescue nil +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16313 +class Prism::RescueModifierNode < ::Prism::Node + # def initialize: (Node expression, Location keyword_loc, Node rescue_expression, Location location) -> void + # + # @return [RescueModifierNode] a new instance of RescueModifierNode + # + # source://prism//lib/prism/node.rb#16315 + def initialize(source, expression, keyword_loc, rescue_expression, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16325 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16334 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16344 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16339 + def compact_child_nodes; end + + # def copy: (**params) -> RescueModifierNode + # + # source://prism//lib/prism/node.rb#16349 + sig { params(params: T.untyped).returns(Prism::RescueModifierNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16334 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location } + # + # source://prism//lib/prism/node.rb#16363 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader expression: Node + # + # source://prism//lib/prism/node.rb#16368 + sig { returns(Prism::Node) } + def expression; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#16386 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16381 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16371 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader rescue_expression: Node + # + # source://prism//lib/prism/node.rb#16377 + sig { returns(Prism::Node) } + def rescue_expression; end + + # source://prism//lib/prism/node.rb#16329 + def set_newline_flag(newline_marked); 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#16410 + 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#16420 + def type; end + end +end + +# Represents a rescue statement. +# +# begin +# rescue Foo, *splat, Bar => ex +# foo +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# end +# +# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field. +# +# source://prism//lib/prism/node.rb#16434 +class Prism::RescueNode < ::Prism::Node + # def initialize: (Location keyword_loc, Array[Node] exceptions, Location? operator_loc, Node? reference, StatementsNode? statements, RescueNode? consequent, Location location) -> void + # + # @return [RescueNode] a new instance of RescueNode + # + # source://prism//lib/prism/node.rb#16436 + def initialize(source, keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16449 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16454 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16469 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16459 + def compact_child_nodes; end + + # attr_reader consequent: RescueNode? + # + # source://prism//lib/prism/node.rb#16523 + sig { returns(T.nilable(Prism::RescueNode)) } + def consequent; end + + # def copy: (**params) -> RescueNode + # + # source://prism//lib/prism/node.rb#16474 + sig { params(params: T.untyped).returns(Prism::RescueNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16454 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location } + # + # source://prism//lib/prism/node.rb#16491 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader exceptions: Array[Node] + # + # source://prism//lib/prism/node.rb#16502 + sig { returns(T::Array[Prism::Node]) } + def exceptions; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#16537 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16527 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16496 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#16532 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#16505 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader reference: Node? + # + # source://prism//lib/prism/node.rb#16517 + sig { returns(T.nilable(Prism::Node)) } + def reference; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#16520 + 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 + # + # source://prism//lib/prism/node.rb#16577 + 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#16587 + def type; end + end +end + +# Represents a rest parameter to a method, block, or lambda definition. +# +# def a(*b) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#16597 +class Prism::RestParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + # + # @return [RestParameterNode] a new instance of RestParameterNode + # + # source://prism//lib/prism/node.rb#16599 + def initialize(source, flags, name, name_loc, operator_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16610 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16615 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16625 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16620 + def compact_child_nodes; end + + # def copy: (**params) -> RestParameterNode + # + # source://prism//lib/prism/node.rb#16630 + sig { params(params: T.untyped).returns(Prism::RestParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16615 + sig { 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 } + # + # source://prism//lib/prism/node.rb#16645 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#16686 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#16654 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#16657 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#16681 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#16669 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16676 + 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 + # + # source://prism//lib/prism/node.rb#16714 + def type; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16650 + 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#16724 + def type; end + end +end + +# Represents the use of the `retry` keyword. +# +# retry +# ^^^^^ +# +# source://prism//lib/prism/node.rb#16733 +class Prism::RetryNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [RetryNode] a new instance of RetryNode + # + # source://prism//lib/prism/node.rb#16735 + def initialize(source, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16742 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16747 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16757 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16752 + def compact_child_nodes; end + + # def copy: (**params) -> RetryNode + # + # source://prism//lib/prism/node.rb#16762 + sig { params(params: T.untyped).returns(Prism::RetryNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16747 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#16773 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#16779 + def inspect(inspector = T.unsafe(nil)); 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#16798 + 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#16808 + def type; end + end +end + +# Represents the use of the `return` keyword. +# +# return 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16817 +class Prism::ReturnNode < ::Prism::Node + # def initialize: (Location keyword_loc, ArgumentsNode? arguments, Location location) -> void + # + # @return [ReturnNode] a new instance of ReturnNode + # + # source://prism//lib/prism/node.rb#16819 + def initialize(source, keyword_loc, arguments, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16828 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#16874 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16833 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16845 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16838 + def compact_child_nodes; end + + # def copy: (**params) -> ReturnNode + # + # source://prism//lib/prism/node.rb#16850 + sig { params(params: T.untyped).returns(Prism::ReturnNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16833 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, arguments: ArgumentsNode?, location: Location } + # + # source://prism//lib/prism/node.rb#16863 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#16883 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16878 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16868 + 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. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16909 + 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#16919 + def type; end + end +end + +# Represents the `self` keyword. +# +# self +# ^^^^ +# +# source://prism//lib/prism/node.rb#16928 +class Prism::SelfNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [SelfNode] a new instance of SelfNode + # + # source://prism//lib/prism/node.rb#16930 + def initialize(source, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16937 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16942 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16952 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16947 + def compact_child_nodes; end + + # def copy: (**params) -> SelfNode + # + # source://prism//lib/prism/node.rb#16957 + sig { params(params: T.untyped).returns(Prism::SelfNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16942 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#16968 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#16974 + def inspect(inspector = T.unsafe(nil)); 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#16993 + 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#17003 + def type; end + end +end + +# A module responsible for deserializing parse results. +# +# source://prism//lib/prism/serialize.rb#23 +module Prism::Serialize + class << self + # Deserialize the AST represented by the given string into a parse result. + # + # source://prism//lib/prism/serialize.rb#37 + def load(input, serialized); end + + # Deserialize the tokens represented by the given string into a parse + # result. + # + # source://prism//lib/prism/serialize.rb#49 + def load_tokens(source, serialized); end + end +end + +# source://prism//lib/prism/serialize.rb#53 +class Prism::Serialize::Loader + # @return [Loader] a new instance of Loader + # + # source://prism//lib/prism/serialize.rb#58 + def initialize(source, serialized); end + + # Returns the value of attribute constant_pool. + # + # source://prism//lib/prism/serialize.rb#55 + def constant_pool; end + + # Returns the value of attribute constant_pool_offset. + # + # source://prism//lib/prism/serialize.rb#55 + def constant_pool_offset; end + + # Returns the value of attribute encoding. + # + # source://prism//lib/prism/serialize.rb#54 + def encoding; end + + # Returns the value of attribute input. + # + # source://prism//lib/prism/serialize.rb#54 + def input; end + + # Returns the value of attribute io. + # + # source://prism//lib/prism/serialize.rb#54 + def io; end + + # source://prism//lib/prism/serialize.rb#96 + def load_comments; end + + # source://prism//lib/prism/serialize.rb#82 + def load_encoding; end + + # source://prism//lib/prism/serialize.rb#73 + def load_header; end + + # source://prism//lib/prism/serialize.rb#92 + def load_line_offsets; end + + # source://prism//lib/prism/serialize.rb#106 + def load_metadata; end + + # source://prism//lib/prism/serialize.rb#140 + def load_nodes; end + + # source://prism//lib/prism/serialize.rb#154 + def load_result; end + + # source://prism//lib/prism/serialize.rb#88 + def load_start_line; end + + # source://prism//lib/prism/serialize.rb#115 + def load_tokens; end + + # source://prism//lib/prism/serialize.rb#128 + def load_tokens_result; end + + # Returns the value of attribute serialized. + # + # source://prism//lib/prism/serialize.rb#54 + def serialized; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/serialize.rb#55 + def source; end + + # Returns the value of attribute start_line. + # + # source://prism//lib/prism/serialize.rb#56 + def start_line; end + + private + + # source://prism//lib/prism/serialize.rb#217 + def load_constant(index); end + + # source://prism//lib/prism/serialize.rb#193 + def load_embedded_string; end + + # source://prism//lib/prism/serialize.rb#247 + def load_error_level; end + + # source://prism//lib/prism/serialize.rb#209 + def load_location; end + + # source://prism//lib/prism/serialize.rb#274 + def load_node; end + + # source://prism//lib/prism/serialize.rb#242 + def load_optional_constant; end + + # source://prism//lib/prism/serialize.rb#213 + def load_optional_location; end + + # source://prism//lib/prism/serialize.rb#186 + def load_optional_node; end + + # source://prism//lib/prism/serialize.rb#238 + def load_required_constant; end + + # source://prism//lib/prism/serialize.rb#182 + def load_serialized_length; end + + # source://prism//lib/prism/serialize.rb#197 + def load_string; end + + # source://prism//lib/prism/serialize.rb#177 + 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#163 + def load_varuint; end + + # source://prism//lib/prism/serialize.rb#260 + def load_warning_level; end +end + +# The major version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#26 +Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The minor version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#30 +Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The patch version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#34 +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#1482 +Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# Represents a singleton class declaration involving the `class` keyword. +# +# class << self end +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17012 +class Prism::SingletonClassNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Location operator_loc, Node expression, Node? body, Location end_keyword_loc, Location location) -> void + # + # @return [SingletonClassNode] a new instance of SingletonClassNode + # + # source://prism//lib/prism/node.rb#17014 + def initialize(source, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17027 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#17090 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17032 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#17100 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#17075 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17045 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17037 + def compact_child_nodes; end + + # def copy: (**params) -> SingletonClassNode + # + # source://prism//lib/prism/node.rb#17050 + sig { params(params: T.untyped).returns(Prism::SingletonClassNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17032 + sig { 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: Node, body: Node?, end_keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#17067 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#17110 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#17093 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # attr_reader expression: Node + # + # source://prism//lib/prism/node.rb#17087 + sig { returns(Prism::Node) } + def expression; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#17115 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#17072 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#17105 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#17081 + 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 + # + # source://prism//lib/prism/node.rb#17146 + 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#17156 + def type; end + end +end + +# This represents a source of Ruby code that has been parsed. It is used in +# conjunction with locations to allow them to resolve line numbers and source +# ranges. +# +# source://prism//lib/prism/parse_result.rb#7 +class Prism::Source + # Create a new source object with the given source code. + # + # @return [Source] a new instance of Source + # + # source://prism//lib/prism/parse_result.rb#18 + 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#53 + def character_column(byte_offset); end + + # Return the character offset for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#48 + def character_offset(byte_offset); end + + # Returns the column number in code units for the given encoding for the + # given byte offset. + # + # source://prism//lib/prism/parse_result.rb#70 + def code_units_column(byte_offset, encoding); end + + # Returns the offset from the start of the file for the given byte offset + # counting in code units for the given encoding. + # + # This method is tested with UTF-8, UTF-16, and UTF-32. If there is the + # 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#63 + def code_units_offset(byte_offset, encoding); end + + # Return the column number for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#43 + def column(byte_offset); end + + # Binary search through the offsets to find the line number for the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#32 + def line(byte_offset); end + + sig { params(value: Integer).returns(Integer) } + def line_offset(value); end + + # Return the byte offset of the start of the line corresponding to the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#38 + def line_start(byte_offset); end + + # The list of newline byte offsets in the source code. + # + # source://prism//lib/prism/parse_result.rb#15 + 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#26 + def slice(byte_offset, length); end + + # The source code that this source object represents. + # + # source://prism//lib/prism/parse_result.rb#9 + sig { returns(String) } + def source; end + + # The line number where this source starts. + # + # source://prism//lib/prism/parse_result.rb#12 + def start_line; end + + private + + # Binary search through the offsets to find the line number for the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#78 + def find_line(byte_offset); end +end + +# Represents the use of the `__ENCODING__` keyword. +# +# __ENCODING__ +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17165 +class Prism::SourceEncodingNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [SourceEncodingNode] a new instance of SourceEncodingNode + # + # source://prism//lib/prism/node.rb#17167 + def initialize(source, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17174 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17179 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17189 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17184 + def compact_child_nodes; end + + # def copy: (**params) -> SourceEncodingNode + # + # source://prism//lib/prism/node.rb#17194 + sig { params(params: T.untyped).returns(Prism::SourceEncodingNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17179 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#17205 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#17211 + def inspect(inspector = T.unsafe(nil)); 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#17230 + 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#17240 + def type; end + end +end + +# Represents the use of the `__FILE__` keyword. +# +# __FILE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17249 +class Prism::SourceFileNode < ::Prism::Node + # def initialize: (String filepath, Location location) -> void + # + # @return [SourceFileNode] a new instance of SourceFileNode + # + # source://prism//lib/prism/node.rb#17251 + def initialize(source, filepath, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17259 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17264 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17274 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17269 + def compact_child_nodes; end + + # def copy: (**params) -> SourceFileNode + # + # source://prism//lib/prism/node.rb#17279 + sig { params(params: T.untyped).returns(Prism::SourceFileNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17264 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { filepath: String, location: Location } + # + # source://prism//lib/prism/node.rb#17291 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader filepath: String + # + # source://prism//lib/prism/node.rb#17296 + sig { returns(String) } + def filepath; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#17300 + def inspect(inspector = T.unsafe(nil)); 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#17320 + 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#17330 + def type; end + end +end + +# Represents the use of the `__LINE__` keyword. +# +# __LINE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17339 +class Prism::SourceLineNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [SourceLineNode] a new instance of SourceLineNode + # + # source://prism//lib/prism/node.rb#17341 + def initialize(source, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17348 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17353 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17363 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17358 + def compact_child_nodes; end + + # def copy: (**params) -> SourceLineNode + # + # source://prism//lib/prism/node.rb#17368 + sig { params(params: T.untyped).returns(Prism::SourceLineNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17353 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#17379 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#17385 + def inspect(inspector = T.unsafe(nil)); 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#17404 + 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#17414 + def type; end + end +end + +# Represents the use of the splat operator. +# +# [*a] +# ^^ +# +# source://prism//lib/prism/node.rb#17423 +class Prism::SplatNode < ::Prism::Node + # def initialize: (Location operator_loc, Node? expression, Location location) -> void + # + # @return [SplatNode] a new instance of SplatNode + # + # source://prism//lib/prism/node.rb#17425 + def initialize(source, operator_loc, expression, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17434 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17439 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17451 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17444 + def compact_child_nodes; end + + # def copy: (**params) -> SplatNode + # + # source://prism//lib/prism/node.rb#17456 + sig { params(params: T.untyped).returns(Prism::SplatNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17439 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Node?, location: Location } + # + # source://prism//lib/prism/node.rb#17469 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader expression: Node? + # + # source://prism//lib/prism/node.rb#17480 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#17489 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#17484 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#17474 + 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 + # + # source://prism//lib/prism/node.rb#17515 + 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#17525 + def type; end + end +end + +# Represents a set of statements contained within some scope. +# +# foo; bar; baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17534 +class Prism::StatementsNode < ::Prism::Node + # def initialize: (Array[Node] body, Location location) -> void + # + # @return [StatementsNode] a new instance of StatementsNode + # + # source://prism//lib/prism/node.rb#17536 + def initialize(source, body, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17544 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Array[Node] + # + # source://prism//lib/prism/node.rb#17581 + sig { returns(T::Array[Prism::Node]) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17549 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17559 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17554 + def compact_child_nodes; end + + # def copy: (**params) -> StatementsNode + # + # source://prism//lib/prism/node.rb#17564 + sig { params(params: T.untyped).returns(Prism::StatementsNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17549 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Node], location: Location } + # + # source://prism//lib/prism/node.rb#17576 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#17585 + def inspect(inspector = T.unsafe(nil)); 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#17605 + 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#17615 + def type; end + end +end + +# Flags for string nodes. +# +# source://prism//lib/prism/node.rb#19352 +module Prism::StringFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19357 +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#19354 +Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# frozen by virtue of a `frozen_string_literal` comment +# +# source://prism//lib/prism/node.rb#19360 +Prism::StringFlags::FROZEN = 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. +# +# "foo" +# ^^^^^ +# +# %w[foo] +# ^^^ +# +# "foo #{bar} baz" +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#17630 +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 + # + # @return [StringNode] a new instance of StringNode + # + # source://prism//lib/prism/node.rb#17632 + def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17644 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17649 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#17748 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#17707 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17659 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17654 + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#17743 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#17701 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (**params) -> StringNode + # + # source://prism//lib/prism/node.rb#17664 + sig { params(params: T.untyped).returns(Prism::StringNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17649 + sig { 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 } + # + # source://prism//lib/prism/node.rb#17680 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17728 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17723 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17733 + sig { returns(T::Boolean) } + def frozen?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#17753 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#17738 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#17689 + 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 + # + # source://prism//lib/prism/node.rb#17778 + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#17719 + sig { returns(String) } + def unescaped; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#17685 + 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#17788 + def type; end + end +end + +# Represents the use of the `super` keyword with parentheses or arguments. +# +# super() +# ^^^^^^^ +# +# super foo, bar +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17800 +class Prism::SuperNode < ::Prism::Node + # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Node? block, Location location) -> void + # + # @return [SuperNode] a new instance of SuperNode + # + # source://prism//lib/prism/node.rb#17802 + def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17814 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#17876 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#17891 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17819 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17832 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17824 + def compact_child_nodes; end + + # def copy: (**params) -> SuperNode + # + # source://prism//lib/prism/node.rb#17837 + sig { params(params: T.untyped).returns(Prism::SuperNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17819 + sig { 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: Node?, location: Location } + # + # source://prism//lib/prism/node.rb#17853 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#17910 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#17895 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#17858 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#17900 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#17864 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#17905 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#17879 + 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 + # + # source://prism//lib/prism/node.rb#17944 + 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#17954 + def type; end + end +end + +# Flags for symbol nodes. +# +# source://prism//lib/prism/node.rb#19364 +module Prism::SymbolFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19369 +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#19372 +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#19366 +Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# Represents a symbol literal or a symbol contained within a `%i` list. +# +# :foo +# ^^^^ +# +# %i[foo] +# ^^^ +# +# source://prism//lib/prism/node.rb#17966 +class Prism::SymbolNode < ::Prism::Node + # def initialize: (Integer flags, Location? opening_loc, Location? value_loc, Location? closing_loc, String unescaped, Location location) -> void + # + # @return [SymbolNode] a new instance of SymbolNode + # + # source://prism//lib/prism/node.rb#17968 + def initialize(source, flags, opening_loc, value_loc, closing_loc, unescaped, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17980 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17985 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#18090 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#18049 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17995 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17990 + def compact_child_nodes; end + + # def copy: (**params) -> SymbolNode + # + # source://prism//lib/prism/node.rb#18000 + sig { params(params: T.untyped).returns(Prism::SymbolNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17985 + sig { 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 } + # + # source://prism//lib/prism/node.rb#18016 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18070 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18075 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18065 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#18095 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#18080 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#18025 + 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 + # + # source://prism//lib/prism/node.rb#18120 + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#18061 + sig { returns(String) } + def unescaped; end + + # def value: () -> String? + # + # source://prism//lib/prism/node.rb#18085 + sig { returns(T.nilable(String)) } + def value; end + + # attr_reader value_loc: Location? + # + # source://prism//lib/prism/node.rb#18037 + sig { returns(T.nilable(Prism::Location)) } + def value_loc; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#18021 + 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#18130 + def type; end + end +end + +# This represents a token from the Ruby source. +# +# source://prism//lib/prism/parse_result.rb#454 +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#466 + 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#500 + 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#474 + sig { params(keys: T.untyped).returns(T.untyped) } + def deconstruct_keys(keys); end + + # A Location object representing the location of this token in the source. + # + # source://prism//lib/prism/parse_result.rb#479 + sig { returns(Prism::Location) } + def location; end + + # Implement the pretty print interface for Token. + # + # source://prism//lib/prism/parse_result.rb#485 + sig { params(q: T.untyped).returns(T.untyped) } + def pretty_print(q); end + + # The type of token that this token is. + # + # source://prism//lib/prism/parse_result.rb#460 + sig { returns(T.untyped) } + def type; end + + # A byteslice of the source that this token represents. + # + # source://prism//lib/prism/parse_result.rb#463 + sig { returns(String) } + def value; end + + private + + # The Source object that represents the source this token came from. + # + # source://prism//lib/prism/parse_result.rb#456 + def source; end +end + +# This module is responsible for converting the prism syntax tree into other +# syntax trees. +# +# source://prism//lib/prism/translation.rb#6 +module Prism::Translation; end + +# This class is the entry-point for converting a prism syntax tree into the +# whitequark/parser gem's syntax tree. It inherits from the base parser for +# the parser gem, and overrides the parse* methods to parse with prism and +# then translate. +# +# source://prism//lib/prism/translation/parser.rb#11 +class Prism::Translation::Parser < ::Parser::Base + # The default encoding for Ruby files is UTF-8. + # + # source://prism//lib/prism/translation/parser.rb#33 + def default_encoding; end + + # Parses a source buffer and returns the AST. + # + # source://prism//lib/prism/translation/parser.rb#41 + def parse(source_buffer); end + + # Parses a source buffer and returns the AST and the source code comments. + # + # source://prism//lib/prism/translation/parser.rb#54 + def parse_with_comments(source_buffer); end + + # Parses a source buffer and returns the AST, the source code comments, + # and the tokens emitted by the lexer. + # + # source://prism//lib/prism/translation/parser.rb#71 + def tokenize(source_buffer, recover = T.unsafe(nil)); end + + # Since prism resolves num params for us, we don't need to support this + # kind of logic here. + # + # source://prism//lib/prism/translation/parser.rb#97 + def try_declare_numparam(node); end + + # source://prism//lib/prism/translation/parser.rb#28 + def version; end + + # source://prism//lib/prism/translation/parser.rb#37 + def yyerror; end + + private + + # Build the parser gem AST from the prism AST. + # + # source://prism//lib/prism/translation/parser.rb#146 + def build_ast(program, offset_cache); end + + # Build the parser gem comments from the prism comments. + # + # source://prism//lib/prism/translation/parser.rb#151 + def build_comments(comments, offset_cache); end + + # Prism deals with offsets in bytes, while the parser gem deals with + # offsets in characters. We need to handle this conversion in order to + # build the parser gem AST. + # + # If the bytesize of the source is the same as the length, then we can + # just use the offset directly. Otherwise, we build an array where the + # index is the byte offset and the value is the character offset. + # + # source://prism//lib/prism/translation/parser.rb#129 + def build_offset_cache(source); end + + # Build a range from a prism location. + # + # source://prism//lib/prism/translation/parser.rb#163 + def build_range(location, offset_cache); end + + # Build the parser gem tokens from the prism tokens. + # + # source://prism//lib/prism/translation/parser.rb#158 + def build_tokens(tokens, offset_cache); end + + # Converts the version format handled by Parser to the format handled by Prism. + # + # source://prism//lib/prism/translation/parser.rb#172 + def convert_for_prism(version); end + + # If there was a error generated during the parse, then raise an + # appropriate syntax error. Otherwise return the result. + # + # source://prism//lib/prism/translation/parser.rb#111 + def unwrap(result, offset_cache); end + + # This is a hook to allow consumers to disable some errors if they don't + # want them to block creating the syntax tree. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser.rb#105 + def valid_error?(error); end +end + +# A visitor that knows how to convert a prism syntax tree into the +# whitequark/parser gem's syntax tree. +# +# source://prism//lib/prism/translation/parser/compiler.rb#8 +class Prism::Translation::Parser::Compiler < ::Prism::Compiler + # Initialize a new compiler with the given parser, offset cache, and + # options. + # + # @return [Compiler] a new instance of Compiler + # + # source://prism//lib/prism/translation/parser/compiler.rb#39 + def initialize(parser, offset_cache, forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # The Parser::Builders::Default instance that is being used to build the + # AST. + # + # source://prism//lib/prism/translation/parser/compiler.rb#18 + def builder; end + + # The types of values that can be forwarded in the current scope. + # + # source://prism//lib/prism/translation/parser/compiler.rb#29 + def forwarding; end + + # Whether or not the current node is in a destructure. + # + # source://prism//lib/prism/translation/parser/compiler.rb#32 + def in_destructure; end + + # Whether or not the current node is in a pattern. + # + # source://prism//lib/prism/translation/parser/compiler.rb#35 + def in_pattern; end + + # The offset cache that is used to map between byte and character + # offsets in the file. + # + # source://prism//lib/prism/translation/parser/compiler.rb#26 + def offset_cache; end + + # The Parser::Base instance that is being used to build the AST. + # + # source://prism//lib/prism/translation/parser/compiler.rb#14 + def parser; end + + # The Parser::Source::Buffer instance that is holding a reference to the + # source code. + # + # source://prism//lib/prism/translation/parser/compiler.rb#22 + def source_buffer; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#58 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#52 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#64 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#70 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#101 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#76 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#82 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#107 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#141 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#151 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#157 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#195 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#201 + def visit_block_local_variable_node(node); end + + # A block on a keyword or method call. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#206 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#212 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/parser/compiler.rb#217 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#226 + def visit_break_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#300 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#238 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#300 + def visit_call_operator_write_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#300 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#327 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#339 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#358 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#345 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#371 + def visit_class_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#403 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#403 + def visit_class_variable_operator_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#403 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#384 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#421 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # @@foo, @@bar = 1 + # ^^^^^ ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#393 + def visit_class_variable_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#442 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#442 + def visit_constant_operator_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#442 + def visit_constant_or_write_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#496 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#466 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#496 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#496 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#514 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#486 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#427 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#460 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#436 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#523 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#570 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#582 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#588 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#598 + def visit_embedded_variable_node(node); end + + # begin; foo; ensure; bar; end + # ^^^^^^^^^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#604 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#610 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#616 + def visit_find_pattern_node(node); end + + # 0..5 + # ^^^^ + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1302 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#628 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#634 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#652 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#658 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#667 + def visit_forwarding_super_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#698 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#698 + def visit_global_variable_operator_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#698 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#679 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#716 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # $foo, $bar = 1 + # ^^^^ ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#688 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#722 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#732 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#750 + def visit_if_node(node); end + + # 1i + # + # source://prism//lib/prism/translation/parser/compiler.rb#791 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#797 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#803 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#809 + def visit_in_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#835 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#835 + def visit_index_operator_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#835 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#861 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#891 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#891 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#891 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#872 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#909 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # @foo, @bar = 1 + # ^^^^ ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#881 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#915 + def visit_integer_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#921 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#921 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#936 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#951 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#961 + def visit_interpolated_x_string_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#976 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#985 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # + # source://prism//lib/prism/translation/parser/compiler.rb#993 + def visit_lambda_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # foo &&= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1037 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1037 + def visit_local_variable_operator_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # foo ||= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1037 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1018 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1055 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # foo, bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1027 + def visit_local_variable_write_node(node); end + + # /foo/ + # ^^^^^ + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1336 + def visit_match_last_line_node(node); end + + # source://prism//lib/prism/translation/parser/compiler.rb#1066 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1085 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1095 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. The parser gem doesn't have such a concept, so + # we invent our own here. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1106 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1112 + def visit_module_node(node); end + + # foo, bar = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1123 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1137 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1158 + def visit_next_node(node); end + + # nil + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1170 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1176 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1186 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1192 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1198 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1204 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1210 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1216 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1255 + def visit_parentheses_node(node); end + + # foo => ^(bar) + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1265 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1271 + def visit_pinned_variable_node(node); end + + # END {} + # + # source://prism//lib/prism/translation/parser/compiler.rb#1276 + def visit_post_execution_node(node); end + + # BEGIN {} + # + # source://prism//lib/prism/translation/parser/compiler.rb#1286 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1296 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1302 + def visit_range_node(node); end + + # 1r + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1324 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1330 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1336 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1351 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1357 + def visit_required_parameter_node(node); end + + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1363 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#1381 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1390 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1396 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1405 + def visit_return_node(node); end + + # self + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1417 + def visit_self_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1423 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1435 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1441 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1447 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1459 + def visit_splat_node(node); end + + # A list of statements. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1472 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1478 + def visit_string_node(node); end + + # super(foo) + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1495 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1518 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1536 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1542 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1551 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1581 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1603 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1617 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1639 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1657 + def visit_yield_node(node); end + + private + + # Initialize a new compiler with the given option overrides, used to + # visit a subtree with the given options. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1671 + def copy_compiler(forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # When *, **, &, or ... are used as an argument in a method call, we + # check if they were allowed by the current context. To determine that + # we build this lookup table. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1678 + def find_forwarding(node); end + + # Blocks can have a special set of parameters that automatically expand + # when given arrays if they have a single required parameter and no + # other parameters. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser/compiler.rb#1693 + def procarg0?(parameters); end + + # Constructs a new source range from the given start and end offsets. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1710 + def srange(location); end + + # Constructs a new source range by finding the given tokens between the + # given start offset and end offset. If the needle is not found, it + # returns nil. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1722 + def srange_find(start_offset, end_offset, tokens); end + + # Constructs a new source range from the given start and end offsets. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1715 + def srange_offsets(start_offset, end_offset); end + + # Transform a location into a token that the parser gem expects. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1731 + def token(location); end + + # Visit a block node on a call. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1736 + def visit_block(call, block); end + + # Visit a heredoc that can be either a string or an xstring. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1769 + def visit_heredoc(node); end + + # Visit a numeric node and account for the optional sign. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1815 + def visit_numeric(node, value); end + + # Within the given block, track that we're within a pattern. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1827 + def within_pattern; end +end + +# Raised when the tree is malformed or there is a bug in the compiler. +# +# source://prism//lib/prism/translation/parser/compiler.rb#10 +class Prism::Translation::Parser::Compiler::CompilationError < ::StandardError; end + +# Locations in the parser gem AST are generated using this class. We +# store a reference to its constant to make it slightly faster to look +# up. +# +# source://prism//lib/prism/translation/parser/compiler.rb#1707 +Prism::Translation::Parser::Compiler::Range = Parser::Source::Range + +# The parser gem has a list of diagnostics with a hard-coded set of error +# messages. We create our own diagnostic class in order to set our own +# error messages. +# +# source://prism//lib/prism/translation/parser.rb#15 +class Prism::Translation::Parser::Diagnostic < ::Parser::Diagnostic + # Initialize a new diagnostic with the given message and location. + # + # @return [Diagnostic] a new instance of Diagnostic + # + # source://prism//lib/prism/translation/parser.rb#20 + def initialize(message, location); end + + # The message generated by prism. + # + # source://prism//lib/prism/translation/parser.rb#17 + def message; end +end + +# Accepts a list of prism tokens and converts them into the expected +# format for the parser gem. +# +# source://prism//lib/prism/translation/parser/lexer.rb#8 +class Prism::Translation::Parser::Lexer + # Initialize the lexer with the given source buffer, prism tokens, and + # offset cache. + # + # @return [Lexer] a new instance of Lexer + # + # source://prism//lib/prism/translation/parser/lexer.rb#193 + def initialize(source_buffer, lexed, offset_cache); end + + # An array of prism tokens that we lexed. + # + # source://prism//lib/prism/translation/parser/lexer.rb#186 + def lexed; end + + # A hash that maps offsets in bytes to offsets in characters. + # + # source://prism//lib/prism/translation/parser/lexer.rb#189 + def offset_cache; end + + # The Parser::Source::Buffer that the tokens were lexed from. + # + # source://prism//lib/prism/translation/parser/lexer.rb#183 + def source_buffer; end + + # Convert the prism tokens into the expected format for the parser gem. + # + # source://prism//lib/prism/translation/parser/lexer.rb#203 + def to_a; end + + private + + # Parse a complex from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#310 + def parse_complex(value); end + + # Parse a rational from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#323 + def parse_rational(value); end +end + +# source://prism//lib/prism/translation/parser/lexer.rb#199 +Prism::Translation::Parser::Lexer::Range = Parser::Source::Range + +# The direct translating of types between the two lexers. +# +# source://prism//lib/prism/translation/parser/lexer.rb#10 +Prism::Translation::Parser::Lexer::TYPES = T.let(T.unsafe(nil), Hash) + +# source://prism//lib/prism/translation/parser.rb#26 +Prism::Translation::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# Note: This integration is not finished, and therefore still has many +# inconsistencies with Ripper. If you'd like to help out, pull requests would +# be greatly appreciated! +# +# This class is meant to provide a compatibility layer between prism and +# Ripper. It functions by parsing the entire tree first and then walking it +# and executing each of the Ripper callbacks as it goes. +# +# This class is going to necessarily be slower than the native Ripper API. It +# is meant as a stopgap until developers migrate to using prism. It is also +# meant as a test harness for the prism parser. +# +# To use this class, you treat `Prism::Translation::Ripper` effectively as you would +# treat the `Ripper` class. +# +# source://prism//lib/prism/translation/ripper.rb#21 +class Prism::Translation::Ripper < ::Prism::Compiler + # Create a new Translation::Ripper object with the given source. + # + # @return [Ripper] a new instance of Ripper + # + # source://prism//lib/prism/translation/ripper.rb#75 + def initialize(source); end + + # The current column number of the parser. + # + # source://prism//lib/prism/translation/ripper.rb#72 + def column; end + + # True if the parser encountered an error during parsing. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#87 + def error?; end + + # The current line number of the parser. + # + # source://prism//lib/prism/translation/ripper.rb#69 + def lineno; end + + # Parse the source and return the result. + # + # source://prism//lib/prism/translation/ripper.rb#92 + def parse; end + + # The source that is being parsed. + # + # source://prism//lib/prism/translation/ripper.rb#66 + def source; end + + # Visit an AliasGlobalVariableNode. + # + # source://prism//lib/prism/translation/ripper.rb#247 + def visit_alias_global_variable_node(node); end + + # Visit an AliasMethodNode. + # + # source://prism//lib/prism/translation/ripper.rb#226 + def visit_alias_method_node(node); end + + # Visit an AndNode. + # + # source://prism//lib/prism/translation/ripper.rb#264 + def visit_and_node(node); end + + # Visit an ArrayNode node. + # + # source://prism//lib/prism/translation/ripper.rb#113 + def visit_array_node(node); end + + # Visit a BackReferenceReadNode. + # + # source://prism//lib/prism/translation/ripper.rb#258 + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node. + # This is not at all bulletproof against different structures of begin/rescue/else/ensure/end. + # + # source://prism//lib/prism/translation/ripper.rb#315 + def visit_begin_node(node); end + + # Visit a BlockNode. + # + # source://prism//lib/prism/translation/ripper.rb#191 + def visit_block_node(node); end + + # Visit a BlockParametersNode. + # + # source://prism//lib/prism/translation/ripper.rb#200 + def visit_block_parameters_node(node); end + + # Visit a BreakNode. + # + # source://prism//lib/prism/translation/ripper.rb#218 + def visit_break_node(node); end + + # Visit a CallNode node. + # Ripper distinguishes between many different method-call + # nodes -- unary and binary operators, "command" calls with + # no parentheses, and call/fcall/vcall. + # + # source://prism//lib/prism/translation/ripper.rb#123 + def visit_call_node(node); end + + # Visit an EmbeddedStatementsNode node. + # + # source://prism//lib/prism/translation/ripper.rb#371 + def visit_embedded_statements_node(node); end + + # Visit a FalseNode. + # + # source://prism//lib/prism/translation/ripper.rb#280 + def visit_false_node(node); end + + # Visit a FloatNode node. + # + # source://prism//lib/prism/translation/ripper.rb#286 + def visit_float_node(node); end + + # Visit a GlobalVariableReadNode. + # + # source://prism//lib/prism/translation/ripper.rb#252 + def visit_global_variable_read_node(node); end + + # Visit a ImaginaryNode node. + # + # source://prism//lib/prism/translation/ripper.rb#291 + def visit_imaginary_node(node); end + + # Visit an IntegerNode node. + # + # source://prism//lib/prism/translation/ripper.rb#296 + def visit_integer_node(node); end + + # Visit an InterpolatedStringNode node. + # + # source://prism//lib/prism/translation/ripper.rb#366 + def visit_interpolated_string_node(node); end + + # Visit an InterpolatedSymbolNode node. + # + # source://prism//lib/prism/translation/ripper.rb#381 + def visit_interpolated_symbol_node(node); end + + # Visit a LocalVariableAndWriteNode. + # + # source://prism//lib/prism/translation/ripper.rb#168 + def visit_local_variable_and_write_node(node); end + + # Visit nodes for +=, *=, -=, etc., called LocalVariableOperatorWriteNodes. + # + # source://prism//lib/prism/translation/ripper.rb#178 + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode. + # + # source://prism//lib/prism/translation/ripper.rb#173 + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode. + # + # source://prism//lib/prism/translation/ripper.rb#183 + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableWriteNode. + # + # source://prism//lib/prism/translation/ripper.rb#161 + def visit_local_variable_write_node(node); end + + # Visit an OrNode. + # + # source://prism//lib/prism/translation/ripper.rb#269 + def visit_or_node(node); end + + # Visit a ParametersNode. + # This will require expanding as we support more kinds of parameters. + # + # source://prism//lib/prism/translation/ripper.rb#206 + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node. + # + # source://prism//lib/prism/translation/ripper.rb#301 + def visit_parentheses_node(node); end + + # Visit a ProgramNode node. + # + # source://prism//lib/prism/translation/ripper.rb#327 + def visit_program_node(node); end + + # Visit a RangeNode node. + # + # source://prism//lib/prism/translation/ripper.rb#334 + def visit_range_node(node); end + + # Visit a RationalNode node. + # + # source://prism//lib/prism/translation/ripper.rb#347 + def visit_rational_node(node); end + + # Visit a RequiredParameterNode. + # + # source://prism//lib/prism/translation/ripper.rb#212 + def visit_required_parameter_node(node); end + + # Visit a RescueNode node. + # + # source://prism//lib/prism/translation/ripper.rb#322 + def visit_rescue_node(node); end + + # Visit a StatementsNode node. + # + # source://prism//lib/prism/translation/ripper.rb#386 + def visit_statements_node(node); end + + # Visit a StringNode node. + # + # source://prism//lib/prism/translation/ripper.rb#352 + def visit_string_node(node); end + + # Visit a SymbolNode node. + # + # source://prism//lib/prism/translation/ripper.rb#376 + def visit_symbol_node(node); end + + # Visit a TrueNode. + # + # source://prism//lib/prism/translation/ripper.rb#274 + def visit_true_node(node); end + + # Visit an XStringNode node. + # + # source://prism//lib/prism/translation/ripper.rb#359 + def visit_x_string_node(node); end + + private + + # source://prism//lib/prism/translation/ripper.rb#680 + def _dispatch0; end + + # source://prism//lib/prism/translation/ripper.rb#681 + def _dispatch1(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def _dispatch2(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#683 + def _dispatch3(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#684 + def _dispatch4(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#685 + def _dispatch5(_, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#686 + def _dispatch7(_, _, _, _, _, _, _); end + + # This method is responsible for updating lineno and column information + # to reflect the current node. + # + # 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#663 + def bounds(location); end + + # If we need to do something unusual, we can directly update the line number + # and column to reflect the current node. + # + # source://prism//lib/prism/translation/ripper.rb#670 + def bounds_values(lineno, column); end + + # For CRuby et al, "no block" in an on_block_var is false + # + # source://prism//lib/prism/translation/ripper.rb#646 + def no_block_value; end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_BEGIN(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_CHAR(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_END(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on___end__(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_alias(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_alias_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_aref(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_aref_field(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_arg_ambiguous(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_arg_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_args_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_args_add_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_args_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_args_forward; end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_args_new; end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_array(_); end + + # source://prism//lib/prism/translation/ripper.rb#684 + def on_aryptn(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_assign(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_assign_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_assoc_new(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_assoc_splat(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_assoclist_from_args(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_backref(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_backtick(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_bare_assoc_hash(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_begin(_); end + + # source://prism//lib/prism/translation/ripper.rb#683 + def on_binary(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_block_var(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_blockarg(_); end + + # source://prism//lib/prism/translation/ripper.rb#684 + def on_bodystmt(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_brace_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_break(_); end + + # source://prism//lib/prism/translation/ripper.rb#683 + def on_call(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_case(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#683 + def on_class(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_class_name_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_comma(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_command(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#684 + def on_command_call(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_comment(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_const(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_const_path_field(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_const_path_ref(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_const_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_cvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#683 + def on_def(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_defined(_); end + + # source://prism//lib/prism/translation/ripper.rb#685 + def on_defs(_, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_do_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_dot2(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_dot3(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_dyna_symbol(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_else(_); end + + # source://prism//lib/prism/translation/ripper.rb#683 + def on_elsif(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_embdoc(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_embdoc_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_embdoc_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_embexpr_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_embexpr_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_embvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_ensure(_); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_excessed_comma; end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_fcall(_); end + + # source://prism//lib/prism/translation/ripper.rb#683 + def on_field(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_float(_); end + + # source://prism//lib/prism/translation/ripper.rb#684 + def on_fndptn(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#683 + def on_for(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_gvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_hash(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_heredoc_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_heredoc_dedent(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_heredoc_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#683 + def on_hshptn(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_ident(_); end + + # source://prism//lib/prism/translation/ripper.rb#683 + def on_if(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_if_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#683 + def on_ifop(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_ignored_nl(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_ignored_sp(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_imaginary(_); end + + # source://prism//lib/prism/translation/ripper.rb#683 + def on_in(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_int(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_ivar(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_kw(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_kwrest_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_label(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_label_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_lambda(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_lbrace(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_lbracket(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_lparen(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_magic_comment(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_massign(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_method_add_arg(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_method_add_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_mlhs_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_mlhs_add_post(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_mlhs_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_mlhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_mlhs_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_module(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_mrhs_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_mrhs_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_mrhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_mrhs_new_from_args(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_next(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_nl(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_nokw_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_op(_); end + + # source://prism//lib/prism/translation/ripper.rb#683 + def on_opassign(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_operator_ambiguous(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_param_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#686 + def on_params(_, _, _, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_parse_error(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_period(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_program(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_qsymbols_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_qsymbols_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_qsymbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_qwords_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_qwords_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_qwords_new; end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_rational(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_rbrace(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_rbracket(_); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_redo; end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_regexp_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_regexp_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_regexp_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_regexp_literal(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_regexp_new; end + + # source://prism//lib/prism/translation/ripper.rb#684 + def on_rescue(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_rescue_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_rest_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_retry; end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_return(_); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_return0; end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_rparen(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_sclass(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_semicolon(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_sp(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_stmts_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_stmts_new; end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_string_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_string_concat(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_string_content; end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_string_dvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_string_embexpr(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_string_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_super(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_symbeg(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_symbol(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_symbol_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_symbols_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_symbols_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_symbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_tlambda(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_tlambeg(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_top_const_field(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_top_const_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_tstring_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_tstring_content(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_tstring_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_unary(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_undef(_); end + + # source://prism//lib/prism/translation/ripper.rb#683 + def on_unless(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_unless_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_until(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_until_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_var_alias(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_var_field(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_var_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_vcall(_); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_void_stmt; end + + # source://prism//lib/prism/translation/ripper.rb#683 + def on_when(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_while(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_while_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_word_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_word_new; end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_words_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_words_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_words_new; end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_words_sep(_); end + + # source://prism//lib/prism/translation/ripper.rb#682 + def on_xstring_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_xstring_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_xstring_new; end + + # source://prism//lib/prism/translation/ripper.rb#681 + def on_yield(_); end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_yield0; end + + # source://prism//lib/prism/translation/ripper.rb#680 + def on_zsuper; end + + # Lazily initialize the parse result. + # + # source://prism//lib/prism/translation/ripper.rb#676 + def result; end + + # In Prism this is a CallNode with :[]= as the operator. + # In Ripper it's an :aref_field. + # + # source://prism//lib/prism/translation/ripper.rb#521 + def visit_aref_field_node(node); end + + # In Prism this is a CallNode with :[] as the operator. + # In Ripper it's an :aref. + # + # source://prism//lib/prism/translation/ripper.rb#513 + def visit_aref_node(node); end + + # Visit an operation-and-assign node, such as +=. + # + # source://prism//lib/prism/translation/ripper.rb#501 + def visit_binary_op_assign(node, operator: T.unsafe(nil)); end + + # Visit a binary operator node like an AndNode or OrNode + # + # source://prism//lib/prism/translation/ripper.rb#652 + def visit_binary_operator(node); end + + # Visit a list of elements, like the elements of an array or arguments. + # + # source://prism//lib/prism/translation/ripper.rb#474 + def visit_elements(elements); end + + # Visit an InterpolatedStringNode or an InterpolatedSymbolNode node. + # + # source://prism//lib/prism/translation/ripper.rb#482 + def visit_enumerated_node(node); end + + # Generate Ripper events for a CallNode with no opening_loc + # + # source://prism//lib/prism/translation/ripper.rb#410 + def visit_no_paren_call(node); end + + # Visit a node that represents a number. We need to explicitly handle the + # unary - operator. + # + # source://prism//lib/prism/translation/ripper.rb#611 + def visit_number(node); end + + # Ripper has several methods of emitting a symbol literal. Inside an alias + # sometimes it suppresses the [:symbol] wrapper around ident. If the symbol + # is also the name of a keyword (e.g. :if) it will emit a :@kw wrapper, not + # an :@ident wrapper, with similar treatment for constants and operators. + # + # source://prism//lib/prism/translation/ripper.rb#580 + def visit_symbol_literal_node(node, no_symbol_wrapper: T.unsafe(nil)); end + + # For most Rubies and JRuby after 9.4.6.0 this is a no-op. + # + # source://prism//lib/prism/translation/ripper.rb#634 + def visit_unary_operator(value); end + + class << self + # This is a convenience method that runs the SexpBuilderPP subclass parser. + # + # source://prism//lib/prism/translation/ripper.rb#403 + def sexp(source); end + + # This is a convenience method that runs the SexpBuilder subclass parser. + # + # source://prism//lib/prism/translation/ripper.rb#398 + def sexp_raw(source); end + end +end + +# In an alias statement Ripper will emit @kw instead of @ident if the object +# being aliased is a Ruby keyword. For instance, in the line "alias :foo :if", +# the :if is treated as a lexer keyword. So we need to know what symbols are +# also keywords. +# +# source://prism//lib/prism/translation/ripper.rb#532 +Prism::Translation::Ripper::RUBY_KEYWORDS = T.let(T.unsafe(nil), Array) + +# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that +# returns the arrays of [type, *children]. +# +# source://prism//lib/prism/translation/ripper.rb#24 +class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper + private + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_BEGIN(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_CHAR(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_END(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on___end__(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_alias(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_alias_error(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_aref(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_aref_field(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_arg_ambiguous(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_arg_paren(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_args_add(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_args_add_block(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_args_add_star(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_args_forward(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_args_new(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_array(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_aryptn(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_assign(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_assign_error(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_assoc_new(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_assoc_splat(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_assoclist_from_args(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_backref(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_backtick(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_bare_assoc_hash(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_begin(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_binary(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_block_var(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_blockarg(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_bodystmt(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_brace_block(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_break(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_call(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_case(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_class(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_class_name_error(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_comma(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_command(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_command_call(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_comment(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_const(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_const_path_field(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_const_path_ref(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_const_ref(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_cvar(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_def(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_defined(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_defs(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_do_block(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_dot2(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_dot3(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_dyna_symbol(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_else(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_elsif(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_embdoc(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_embdoc_beg(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_embdoc_end(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_embexpr_beg(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_embexpr_end(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_embvar(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_ensure(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_excessed_comma(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_fcall(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_field(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_float(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_fndptn(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_for(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_gvar(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_hash(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_heredoc_beg(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_heredoc_dedent(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_heredoc_end(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_hshptn(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_ident(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_if(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_if_mod(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_ifop(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_ignored_nl(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_ignored_sp(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_imaginary(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_in(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_int(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_ivar(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_kw(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_kwrest_param(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_label(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_label_end(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_lambda(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_lbrace(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_lbracket(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_lparen(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_magic_comment(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_massign(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_method_add_arg(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_method_add_block(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_mlhs_add(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_mlhs_add_post(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_mlhs_add_star(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_mlhs_new(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_mlhs_paren(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_module(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_mrhs_add(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_mrhs_add_star(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_mrhs_new(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_mrhs_new_from_args(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_next(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_nl(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_nokw_param(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_op(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_opassign(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_operator_ambiguous(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_param_error(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_params(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_paren(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_parse_error(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_period(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_program(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_qsymbols_add(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_qsymbols_beg(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_qsymbols_new(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_qwords_add(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_qwords_beg(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_qwords_new(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_rational(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_rbrace(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_rbracket(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_redo(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_regexp_add(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_regexp_beg(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_regexp_end(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_regexp_literal(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_regexp_new(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_rescue(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_rescue_mod(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_rest_param(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_retry(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_return(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_return0(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_rparen(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_sclass(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_semicolon(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_sp(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_stmts_add(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_stmts_new(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_string_add(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_string_concat(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_string_content(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_string_dvar(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_string_embexpr(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_string_literal(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_super(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_symbeg(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_symbol(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_symbol_literal(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_symbols_add(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_symbols_beg(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_symbols_new(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_tlambda(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_tlambeg(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_top_const_field(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_top_const_ref(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_tstring_beg(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_tstring_content(value); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_tstring_end(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_unary(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_undef(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_unless(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_unless_mod(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_until(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_until_mod(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_var_alias(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_var_field(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_var_ref(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_vcall(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_void_stmt(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_when(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_while(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_while_mod(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_word_add(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_word_new(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_words_add(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_words_beg(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_words_new(*args); end + + # source://prism//lib/prism/translation/ripper.rb#34 + def on_words_sep(value); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_xstring_add(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_xstring_literal(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_xstring_new(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_yield(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_yield0(*args); end + + # source://prism//lib/prism/translation/ripper.rb#28 + def on_zsuper(*args); end +end + +# This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that +# returns the same values as ::Ripper::SexpBuilder except with a couple of +# niceties that flatten linked lists into arrays. +# +# source://prism//lib/prism/translation/ripper.rb#43 +class Prism::Translation::Ripper::SexpBuilderPP < ::Prism::Translation::Ripper::SexpBuilder + private + + # source://prism//lib/prism/translation/ripper.rb#46 + def _dispatch_event_new; end + + # source://prism//lib/prism/translation/ripper.rb#50 + def _dispatch_event_push(list, item); end + + # source://prism//lib/prism/translation/ripper.rb#50 + def on_args_add(list, item); end + + # source://prism//lib/prism/translation/ripper.rb#46 + def on_args_new; end + + # source://prism//lib/prism/translation/ripper.rb#50 + def on_mlhs_add(list, item); end + + # source://prism//lib/prism/translation/ripper.rb#46 + def on_mlhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#50 + def on_mrhs_add(list, item); end + + # source://prism//lib/prism/translation/ripper.rb#46 + def on_mrhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#50 + def on_qsymbols_add(list, item); end + + # source://prism//lib/prism/translation/ripper.rb#46 + def on_qsymbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#50 + def on_qwords_add(list, item); end + + # source://prism//lib/prism/translation/ripper.rb#46 + def on_qwords_new; end + + # source://prism//lib/prism/translation/ripper.rb#50 + def on_regexp_add(list, item); end + + # source://prism//lib/prism/translation/ripper.rb#46 + def on_regexp_new; end + + # source://prism//lib/prism/translation/ripper.rb#50 + def on_stmts_add(list, item); end + + # source://prism//lib/prism/translation/ripper.rb#46 + def on_stmts_new; end + + # source://prism//lib/prism/translation/ripper.rb#50 + def on_string_add(list, item); end + + # source://prism//lib/prism/translation/ripper.rb#50 + def on_symbols_add(list, item); end + + # source://prism//lib/prism/translation/ripper.rb#46 + def on_symbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#50 + def on_word_add(list, item); end + + # source://prism//lib/prism/translation/ripper.rb#46 + def on_word_new; end + + # source://prism//lib/prism/translation/ripper.rb#50 + def on_words_add(list, item); end + + # source://prism//lib/prism/translation/ripper.rb#46 + def on_words_new; end + + # source://prism//lib/prism/translation/ripper.rb#50 + def on_xstring_add(list, item); end + + # source://prism//lib/prism/translation/ripper.rb#46 + def on_xstring_new; end +end + +# Represents the use of the literal `true` keyword. +# +# true +# ^^^^ +# +# source://prism//lib/prism/node.rb#18139 +class Prism::TrueNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [TrueNode] a new instance of TrueNode + # + # source://prism//lib/prism/node.rb#18141 + def initialize(source, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18148 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18153 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18163 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18158 + def compact_child_nodes; end + + # def copy: (**params) -> TrueNode + # + # source://prism//lib/prism/node.rb#18168 + sig { params(params: T.untyped).returns(Prism::TrueNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18153 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#18179 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#18185 + def inspect(inspector = T.unsafe(nil)); 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#18204 + 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#18214 + def type; end + end +end + +# Represents the use of the `undef` keyword. +# +# undef :foo, :bar, :baz +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18223 +class Prism::UndefNode < ::Prism::Node + # def initialize: (Array[Node] names, Location keyword_loc, Location location) -> void + # + # @return [UndefNode] a new instance of UndefNode + # + # source://prism//lib/prism/node.rb#18225 + def initialize(source, names, keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18234 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18239 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18249 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18244 + def compact_child_nodes; end + + # def copy: (**params) -> UndefNode + # + # source://prism//lib/prism/node.rb#18254 + sig { params(params: T.untyped).returns(Prism::UndefNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18239 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[Node], keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#18267 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#18287 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18282 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18275 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader names: Array[Node] + # + # source://prism//lib/prism/node.rb#18272 + sig { returns(T::Array[Prism::Node]) } + 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#18308 + 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#18318 + 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#18330 +class Prism::UnlessNode < ::Prism::Node + # def initialize: (Location keyword_loc, 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#18332 + def initialize(source, keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18345 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18354 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18368 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18359 + def compact_child_nodes; end + + # attr_reader consequent: ElseNode? + # + # source://prism//lib/prism/node.rb#18419 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # def copy: (**params) -> UnlessNode + # + # source://prism//lib/prism/node.rb#18373 + sig { params(params: T.untyped).returns(Prism::UnlessNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18354 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#18390 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#18445 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#18422 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#18450 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18435 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18395 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://prism//lib/prism/node.rb#18401 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#18349 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#18416 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#18440 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # attr_reader then_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#18404 + 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 + # + # source://prism//lib/prism/node.rb#18486 + 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#18496 + def type; end + end +end + +# Represents the use of the `until` keyword, either in the block form or the modifier form. +# +# bar until foo +# ^^^^^^^^^^^^^ +# +# until foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18508 +class Prism::UntilNode < ::Prism::Node + # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Node predicate, StatementsNode? statements, Location location) -> void + # + # @return [UntilNode] a new instance of UntilNode + # + # source://prism//lib/prism/node.rb#18510 + def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18522 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18599 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18531 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#18609 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#18580 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18544 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18536 + def compact_child_nodes; end + + # def copy: (**params) -> UntilNode + # + # source://prism//lib/prism/node.rb#18549 + sig { params(params: T.untyped).returns(Prism::UntilNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18531 + sig { 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: Node, statements: StatementsNode?, location: Location } + # + # source://prism//lib/prism/node.rb#18565 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#18614 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18604 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18574 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://prism//lib/prism/node.rb#18592 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#18526 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#18595 + 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 + # + # source://prism//lib/prism/node.rb#18645 + def type; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#18570 + 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#18655 + def type; end + end +end + +# The version constant is set by reading the result of calling pm_version. +Prism::VERSION = T.let(T.unsafe(nil), String) + +# A visitor is a class that provides a default implementation for every accept +# method defined on the nodes. This means it can walk a tree without the +# caller needing to define any special handling. This allows you to handle a +# subset of the tree, while still walking the whole tree. +# +# For example, to find all of the method calls that call the `foo` method, you +# could write: +# +# class FooCalls < Prism::Visitor +# def visit_call_node(node) +# if node.name == "foo" +# # Do something with the node +# end +# +# # Call super so that the visitor continues walking the tree +# super +# end +# end +# +# source://prism//lib/prism/visitor.rb#50 +class Prism::Visitor < ::Prism::BasicVisitor + # Visit a AliasGlobalVariableNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::AndNode).void } + def visit_and_node(node); end + + # Visit a ArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ArgumentsNode).void } + def visit_arguments_node(node); end + + # Visit a ArrayNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ArrayNode).void } + def visit_array_node(node); end + + # Visit a ArrayPatternNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # Visit a AssocNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::AssocNode).void } + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BeginNode).void } + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BlockNode).void } + def visit_block_node(node); end + + # Visit a BlockParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # Visit a BreakNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BreakNode).void } + def visit_break_node(node); end + + # Visit a CallAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # Visit a CallNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CallNode).void } + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # Visit a CallTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CallTargetNode).void } + def visit_call_target_node(node); end + + # Visit a CapturePatternNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CaseMatchNode).void } + def visit_case_match_node(node); end + + # Visit a CaseNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CaseNode).void } + def visit_case_node(node); end + + # Visit a ClassNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ClassNode).void } + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # Visit a DefNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::DefNode).void } + def visit_def_node(node); end + + # Visit a DefinedNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::DefinedNode).void } + def visit_defined_node(node); end + + # Visit a ElseNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ElseNode).void } + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::EnsureNode).void } + def visit_ensure_node(node); end + + # Visit a FalseNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::FalseNode).void } + def visit_false_node(node); end + + # Visit a FindPatternNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::FindPatternNode).void } + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # Visit a FloatNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::FloatNode).void } + def visit_float_node(node); end + + # Visit a ForNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ForNode).void } + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # Visit a HashNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::HashNode).void } + def visit_hash_node(node); end + + # Visit a HashPatternNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # Visit a IfNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::IfNode).void } + def visit_if_node(node); end + + # Visit a ImaginaryNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ImaginaryNode).void } + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ImplicitNode).void } + def visit_implicit_node(node); end + + # Visit a ImplicitRestNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ImplicitRestNode).void } + def visit_implicit_rest_node(node); end + + # Visit a InNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InNode).void } + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # Visit a IndexTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::IndexTargetNode).void } + def visit_index_target_node(node); end + + # Visit a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::IntegerNode).void } + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # Visit a KeywordHashNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::LambdaNode).void } + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::MatchRequiredNode).void } + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::MatchWriteNode).void } + def visit_match_write_node(node); end + + # Visit a MissingNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::MissingNode).void } + def visit_missing_node(node); end + + # Visit a ModuleNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ModuleNode).void } + def visit_module_node(node); end + + # Visit a MultiTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::MultiTargetNode).void } + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # Visit a NextNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::NextNode).void } + def visit_next_node(node); end + + # Visit a NilNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::NilNode).void } + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedParametersNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::NumberedParametersNode).void } + def visit_numbered_parameters_node(node); end + + # Visit a NumberedReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::OptionalKeywordParameterNode).void } + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::OptionalParameterNode).void } + def visit_optional_parameter_node(node); end + + # Visit a OrNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::OrNode).void } + def visit_or_node(node); end + + # Visit a ParametersNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ParametersNode).void } + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ParenthesesNode).void } + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::PinnedVariableNode).void } + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::PostExecutionNode).void } + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::PreExecutionNode).void } + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ProgramNode).void } + def visit_program_node(node); end + + # Visit a RangeNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RangeNode).void } + def visit_range_node(node); end + + # Visit a RationalNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RationalNode).void } + def visit_rational_node(node); end + + # Visit a RedoNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RedoNode).void } + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RegularExpressionNode).void } + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RequiredKeywordParameterNode).void } + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RequiredParameterNode).void } + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RescueModifierNode).void } + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RescueNode).void } + def visit_rescue_node(node); end + + # Visit a RestParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RestParameterNode).void } + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RetryNode).void } + def visit_retry_node(node); end + + # Visit a ReturnNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ReturnNode).void } + def visit_return_node(node); end + + # Visit a SelfNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SelfNode).void } + def visit_self_node(node); end + + # Visit a SingletonClassNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SourceEncodingNode).void } + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SourceFileNode).void } + def visit_source_file_node(node); end + + # Visit a SourceLineNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SourceLineNode).void } + def visit_source_line_node(node); end + + # Visit a SplatNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SplatNode).void } + def visit_splat_node(node); end + + # Visit a StatementsNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::StatementsNode).void } + def visit_statements_node(node); end + + # Visit a StringNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::StringNode).void } + def visit_string_node(node); end + + # Visit a SuperNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SuperNode).void } + def visit_super_node(node); end + + # Visit a SymbolNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SymbolNode).void } + def visit_symbol_node(node); end + + # Visit a TrueNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::TrueNode).void } + def visit_true_node(node); end + + # Visit a UndefNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::UndefNode).void } + def visit_undef_node(node); end + + # Visit a UnlessNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::UnlessNode).void } + def visit_unless_node(node); end + + # Visit a UntilNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::UntilNode).void } + def visit_until_node(node); end + + # Visit a WhenNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::WhenNode).void } + def visit_when_node(node); end + + # Visit a WhileNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::WhileNode).void } + def visit_while_node(node); end + + # Visit a XStringNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::XStringNode).void } + def visit_x_string_node(node); end + + # Visit a YieldNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::YieldNode).void } + def visit_yield_node(node); end +end + +# Represents the use of the `when` keyword within a case statement. +# +# case true +# when true +# ^^^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#18666 +class Prism::WhenNode < ::Prism::Node + # def initialize: (Location keyword_loc, Array[Node] conditions, StatementsNode? statements, Location location) -> void + # + # @return [WhenNode] a new instance of WhenNode + # + # source://prism//lib/prism/node.rb#18668 + def initialize(source, keyword_loc, conditions, statements, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18678 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18683 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18696 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18688 + def compact_child_nodes; end + + # attr_reader conditions: Array[Node] + # + # source://prism//lib/prism/node.rb#18726 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # def copy: (**params) -> WhenNode + # + # source://prism//lib/prism/node.rb#18701 + sig { params(params: T.untyped).returns(Prism::WhenNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18683 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location } + # + # source://prism//lib/prism/node.rb#18715 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#18738 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18733 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18720 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#18729 + 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 + # + # source://prism//lib/prism/node.rb#18765 + 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#18775 + def type; end + end +end + +# Represents the use of the `while` keyword, either in the block form or the modifier form. +# +# bar while foo +# ^^^^^^^^^^^^^ +# +# while foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18787 +class Prism::WhileNode < ::Prism::Node + # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Node predicate, StatementsNode? statements, Location location) -> void + # + # @return [WhileNode] a new instance of WhileNode + # + # source://prism//lib/prism/node.rb#18789 + def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18801 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18878 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18810 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#18888 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#18859 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18823 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18815 + def compact_child_nodes; end + + # def copy: (**params) -> WhileNode + # + # source://prism//lib/prism/node.rb#18828 + sig { params(params: T.untyped).returns(Prism::WhileNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18810 + sig { 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: Node, statements: StatementsNode?, location: Location } + # + # source://prism//lib/prism/node.rb#18844 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#18893 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18883 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18853 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://prism//lib/prism/node.rb#18871 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#18805 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#18874 + 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 + # + # source://prism//lib/prism/node.rb#18924 + def type; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#18849 + 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#18934 + def type; end + end +end + +# Represents an xstring literal with no interpolation. +# +# `foo` +# ^^^^^ +# +# source://prism//lib/prism/node.rb#18943 +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 + # + # @return [XStringNode] a new instance of XStringNode + # + # source://prism//lib/prism/node.rb#18945 + def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18957 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18962 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#19044 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#19014 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18972 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18967 + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#19039 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#19008 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (**params) -> XStringNode + # + # source://prism//lib/prism/node.rb#18977 + sig { params(params: T.untyped).returns(Prism::XStringNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18962 + sig { 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 } + # + # source://prism//lib/prism/node.rb#18993 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#19029 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#19024 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#19049 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#19034 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#19002 + 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 + # + # source://prism//lib/prism/node.rb#19074 + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#19020 + sig { returns(String) } + def unescaped; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#18998 + 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#19084 + def type; end + end +end + +# Represents the use of the `yield` keyword. +# +# yield 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#19093 +class Prism::YieldNode < ::Prism::Node + # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Location location) -> void + # + # @return [YieldNode] a new instance of YieldNode + # + # source://prism//lib/prism/node.rb#19095 + def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#19106 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#19166 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#19111 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#19123 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#19116 + def compact_child_nodes; end + + # def copy: (**params) -> YieldNode + # + # source://prism//lib/prism/node.rb#19128 + sig { params(params: T.untyped).returns(Prism::YieldNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#19111 + sig { 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 } + # + # source://prism//lib/prism/node.rb#19143 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#19197 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#19182 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#19148 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#19187 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#19154 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#19192 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#19169 + 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 + # + # source://prism//lib/prism/node.rb#19225 + 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#19235 + def type; end + end +end diff --git a/sorbet/rbi/gems/pry-byebug@3.10.1.rbi b/sorbet/rbi/gems/pry-byebug@3.10.1.rbi deleted file mode 100644 index c6ec0371e..000000000 --- a/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +++ /dev/null @@ -1,1150 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `pry-byebug` gem. -# Please instead update this file by running `bin/tapioca gem pry-byebug`. - -# source://pry-byebug//lib/byebug/processors/pry_processor.rb#5 -module Byebug - extend ::Byebug::Helpers::ReflectionHelper - - # source://byebug/11.1.3/lib/byebug/core.rb#31 - def displays; end - - # source://byebug/11.1.3/lib/byebug/core.rb#31 - def displays=(_arg0); end - - # source://byebug/11.1.3/lib/byebug/core.rb#25 - def init_file; end - - # source://byebug/11.1.3/lib/byebug/core.rb#25 - def init_file=(_arg0); end - - # source://byebug/11.1.3/lib/byebug/core.rb#41 - def mode; end - - # source://byebug/11.1.3/lib/byebug/core.rb#41 - def mode=(_arg0); end - - # source://byebug/11.1.3/lib/byebug/core.rb#52 - def run_init_script; end - - private - - def add_catchpoint(_arg0); end - def breakpoints; end - def catchpoints; end - def contexts; end - def current_context; end - def debug_load(*_arg0); end - def lock; end - def post_mortem=(_arg0); end - def post_mortem?; end - def raised_exception; end - - # source://byebug/11.1.3/lib/byebug/core.rb#102 - def rc_dirs; end - - # source://byebug/11.1.3/lib/byebug/core.rb#91 - def run_rc_file(rc_file); end - - def start; end - def started?; end - def stop; end - def stoppable?; end - def thread_context(_arg0); end - def tracing=(_arg0); end - def tracing?; end - def unlock; end - def verbose=(_arg0); end - def verbose?; end - - class << self - # source://byebug/11.1.3/lib/byebug/remote.rb#25 - def actual_control_port; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#20 - def actual_port; end - - def add_catchpoint(_arg0); end - - # source://byebug/11.1.3/lib/byebug/attacher.rb#10 - def attach; end - - def breakpoints; end - def catchpoints; end - def contexts; end - def current_context; end - def debug_load(*_arg0); end - - # source://byebug/11.1.3/lib/byebug/core.rb#76 - def handle_post_mortem; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#32 - def interrupt; end - - # source://byebug/11.1.3/lib/byebug/core.rb#61 - def load_settings; end - - def lock; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#59 - def parse_host_and_port(host_port_spec); end - - def post_mortem=(_arg0); end - def post_mortem?; end - def raised_exception; end - - # source://byebug/11.1.3/lib/byebug/attacher.rb#21 - def spawn(host = T.unsafe(nil), port = T.unsafe(nil)); end - - def start; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#55 - def start_client(host = T.unsafe(nil), port = T.unsafe(nil)); end - - # source://byebug/11.1.3/lib/byebug/remote.rb#48 - def start_control(host = T.unsafe(nil), port = T.unsafe(nil)); end - - # source://byebug/11.1.3/lib/byebug/remote.rb#39 - def start_server(host = T.unsafe(nil), port = T.unsafe(nil)); end - - def started?; end - def stop; end - def stoppable?; end - def thread_context(_arg0); end - def tracing=(_arg0); end - def tracing?; end - def unlock; end - def verbose=(_arg0); end - def verbose?; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#17 - def wait_connection; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#17 - def wait_connection=(_arg0); end - - private - - # source://byebug/11.1.3/lib/byebug/remote.rb#66 - def client; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#76 - def control; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#70 - def server; end - end -end - -class Byebug::DebugThread < ::Thread - class << self - def inherited; end - end -end - -# Extends raw byebug's processor. -# -# source://pry-byebug//lib/byebug/processors/pry_processor.rb#9 -class Byebug::PryProcessor < ::Byebug::CommandProcessor - # Called when a breakpoint is hit. Note that `at_line`` is called - # inmediately after with the context's `stop_reason == :breakpoint`, so we - # must not resume the pry instance here - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#80 - def at_breakpoint(breakpoint); end - - # Called when the debugger wants to stop at a regular line - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#64 - def at_line; end - - # Called when the debugger wants to stop right before a method return - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#71 - def at_return(_return_value); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def bold(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output(*args, **_arg1, &block); end - - # Set up a number of navigational commands to be performed by Byebug. - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#45 - def perform(action, options = T.unsafe(nil)); end - - # Returns the value of attribute pry. - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#10 - def pry; end - - # Sets the attribute pry - # - # @param value the value to set the attribute pry to. - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#10 - def pry=(_arg0); end - - # Wrap a Pry REPL to catch navigational commands and act on them. - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#26 - def run(&_block); end - - private - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#93 - def n_hits(breakpoint); end - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#114 - def perform_backtrace(_options); end - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#142 - def perform_down(options); end - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#130 - def perform_finish(*_arg0); end - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#150 - def perform_frame(options); end - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#120 - def perform_next(options); end - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#125 - def perform_step(options); end - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#134 - def perform_up(options); end - - # Resume an existing Pry REPL at the paused point. - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#102 - def resume_pry; end - - class << self - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#16 - def start; end - end -end - -class Byebug::ThreadsTable; end - -# source://pry-byebug//lib/pry/byebug/breakpoints.rb#3 -class Pry - extend ::Forwardable - - # source://pry/0.14.2/lib/pry/pry_instance.rb#81 - def initialize(options = T.unsafe(nil)); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#212 - def add_sticky_local(name, &block); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#35 - def backtrace; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#35 - def backtrace=(_arg0); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#32 - def binding_stack; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#32 - def binding_stack=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands=(*args, **_arg1, &block); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#145 - def complete(str); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#50 - def config; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#124 - def current_binding; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#124 - def current_context; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#33 - def custom_completions; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#33 - def custom_completions=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor=(*args, **_arg1, &block); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#255 - def eval(line, options = T.unsafe(nil)); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#34 - def eval_string; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#34 - def eval_string=(_arg0); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#286 - def evaluate_ruby(code); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler=(*args, **_arg1, &block); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#394 - def exec_hook(name, *args, &block); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#42 - def exit_value; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks=(*args, **_arg1, &block); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#173 - def inject_local(name, value, binding); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#201 - def inject_sticky_locals!; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input=(*args, **_arg1, &block); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#45 - def input_ring; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#39 - def last_dir; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#39 - def last_dir=(_arg0); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#41 - def last_exception; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#418 - def last_exception=(exception); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#38 - def last_file; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#38 - def last_file=(_arg0); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#37 - def last_result; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#37 - def last_result=(_arg0); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#440 - def last_result_is_exception?; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#190 - def memory_size; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#195 - def memory_size=(size); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#538 - def output; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output=(*args, **_arg1, &block); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#48 - def output_ring; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#530 - def pager; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pager=(*args, **_arg1, &block); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#522 - def pop_prompt; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print=(*args, **_arg1, &block); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#325 - def process_command(val); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#360 - def process_command_safely(val); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#101 - def prompt; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#108 - def prompt=(new_prompt); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#131 - def push_binding(object); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#118 - def push_initial_binding(target = T.unsafe(nil)); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#506 - def push_prompt(new_prompt); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#592 - def quiet?; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#582 - def raise_up(*args); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#586 - def raise_up!(*args); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#554 - def raise_up_common(force, *args); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#282 - def repl(target = T.unsafe(nil)); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#231 - def reset_eval_string; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#375 - def run_command(val); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#453 - def select_prompt; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#409 - def set_last_result(result, code = T.unsafe(nil)); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#447 - def should_print?; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#298 - def show_result(result); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#216 - def sticky_locals; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#36 - def suppress_output; end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#36 - def suppress_output=(_arg0); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#428 - def update_input_history(code); end - - private - - # source://pry/0.14.2/lib/pry/pry_instance.rb#680 - def ensure_correct_encoding!(val); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#688 - def generate_prompt(prompt_proc, conf); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#598 - def handle_line(line, options); end - - # source://pry/0.14.2/lib/pry/pry_instance.rb#697 - def prompt_stack; end - - class << self - # source://pry/0.14.2/lib/pry/code.rb#12 - def Code(obj); end - - # source://pry/0.14.2/lib/pry/method.rb#9 - def Method(obj); end - - # source://pry/0.14.2/lib/pry/wrapped_module.rb#7 - def WrappedModule(obj); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#294 - def auto_resize!; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#347 - def binding_for(target); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#22 - def cli; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#22 - def cli=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands=(*args, **_arg1, &block); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#25 - def config; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#25 - def config=(_arg0); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#46 - def configure; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#380 - def critical_section; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#63 - def current; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#19 - def current_line; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#19 - def current_line=(_arg0); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#18 - def custom_completions; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#18 - def custom_completions=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor=(*args, **_arg1, &block); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#21 - def eval_path; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#21 - def eval_path=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals=(*args, **_arg1, &block); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#139 - def final_session_setup; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def history(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def history=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks=(*args, **_arg1, &block); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#375 - def in_critical_section?; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#338 - def init; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#257 - def initial_session?; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#129 - def initial_session_setup; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input=(*args, **_arg1, &block); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#24 - def last_internal_error; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#24 - def last_internal_error=(_arg0); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#20 - def line_buffer; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#20 - def line_buffer=(_arg0); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#69 - def load_file_at_toplevel(file); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#202 - def load_file_through_repl(file_name); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#251 - def load_history; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#77 - def load_rc_files; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#101 - def load_requires; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#109 - def load_traps; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#113 - def load_win32console; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#55 - def main; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def memory_size(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def memory_size=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pager(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pager=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prompt(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prompt=(*args, **_arg1, &block); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#23 - def quiet; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#23 - def quiet=(_arg0); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#86 - def rc_files_to_load; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#94 - def real_path_to(file); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#326 - def reset_defaults; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#277 - def run_command(command_string, options = T.unsafe(nil)); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#156 - def start(target = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#354 - def toplevel_binding; end - - # source://pry/0.14.2/lib/pry/pry_class.rb#372 - def toplevel_binding=(_arg0); end - - # source://pry/0.14.2/lib/pry/pry_class.rb#225 - def view_clip(obj, options = T.unsafe(nil)); end - - private - - # source://pry/0.14.2/lib/pry/pry_class.rb#388 - def mutex_available?; end - end -end - -# source://pry-byebug//lib/pry/byebug/breakpoints.rb#4 -module Pry::Byebug; end - -# Wrapper for Byebug.breakpoints that respects our Processor and has better -# failure behavior. Acts as an Enumerable. -# -# source://pry-byebug//lib/pry/byebug/breakpoints.rb#9 -module Pry::Byebug::Breakpoints - extend ::Enumerable - extend ::Pry::Byebug::Breakpoints - - # Adds a file breakpoint. - # - # @raise [ArgumentError] - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#63 - def add_file(file, line, expression = T.unsafe(nil)); end - - # Adds a method breakpoint. - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#51 - def add_method(method, expression = T.unsafe(nil)); end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#44 - def breakpoints; end - - # Changes the conditional expression for a breakpoint. - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#78 - def change(id, expression = T.unsafe(nil)); end - - # Deletes an existing breakpoint with the given ID. - # - # @raise [ArgumentError] - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#89 - def delete(id); end - - # Deletes all breakpoints. - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#100 - def delete_all; end - - # Disables a breakpoint with the given ID. - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#115 - def disable(id); end - - # Disables all breakpoints. - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#122 - def disable_all; end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#136 - def each(&block); end - - # Enables a disabled breakpoint with the given ID. - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#108 - def enable(id); end - - # @raise [ArgumentError] - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#144 - def find_by_id(id); end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#140 - def last; end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#132 - def size; end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#128 - def to_a; end - - private - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#153 - def change_status(id, enabled = T.unsafe(nil)); end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#159 - def validate_expression(exp); end -end - -# Breakpoint in a file:line location -# -# source://pry-byebug//lib/pry/byebug/breakpoints.rb#16 -class Pry::Byebug::Breakpoints::FileBreakpoint < ::SimpleDelegator - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#17 - def source_code; end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#21 - def to_s; end -end - -# Breakpoint in a Class#method location -# -# source://pry-byebug//lib/pry/byebug/breakpoints.rb#29 -class Pry::Byebug::Breakpoints::MethodBreakpoint < ::SimpleDelegator - # @return [MethodBreakpoint] a new instance of MethodBreakpoint - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#30 - def initialize(byebug_bp, method); end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#35 - def source_code; end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#39 - def to_s; end -end - -class Pry::REPL - extend ::Forwardable - - # source://pry/0.14.2/lib/pry/repl.rb#22 - def initialize(pry, options = T.unsafe(nil)); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output(*args, **_arg1, &block); end - - # source://pry/0.14.2/lib/pry/repl.rb#9 - def pry; end - - # source://pry/0.14.2/lib/pry/repl.rb#9 - def pry=(_arg0); end - - # source://pry/0.14.2/lib/pry/repl.rb#36 - def start; end - - private - - # source://pry/0.14.2/lib/pry/repl.rb#237 - def calculate_overhang(current_prompt, original_val, indented_val); end - - # source://pry/0.14.2/lib/pry/repl.rb#205 - def coolline_available?; end - - # source://pry/0.14.2/lib/pry/repl.rb#84 - def epilogue; end - - # source://pry/0.14.2/lib/pry/repl.rb#127 - def handle_read_errors; end - - # source://pry/0.14.2/lib/pry/repl.rb#195 - def input_readline(*args); end - - # source://pry/0.14.2/lib/pry/repl.rb#217 - def piping?; end - - # source://pry/0.14.2/lib/pry/repl.rb#47 - def prologue; end - - # source://pry/0.14.2/lib/pry/repl.rb#93 - def read; end - - # source://pry/0.14.2/lib/pry/repl.rb#169 - def read_line(current_prompt); end - - # source://pry/0.14.2/lib/pry/repl.rb#201 - def readline_available?; end - - # source://pry/0.14.2/lib/pry/repl.rb#66 - def repl; end - - # source://pry/0.14.2/lib/pry/repl.rb#224 - def set_readline_output; end - - class << self - # source://pry-byebug//lib/pry-byebug/pry_ext.rb#8 - def start(options = T.unsafe(nil)); end - - # source://pry-byebug//lib/pry-byebug/pry_ext.rb#8 - def start_with_pry_byebug(options = T.unsafe(nil)); end - - # source://pry/0.14.2/lib/pry/repl.rb#14 - def start_without_pry_byebug(options); end - end -end - -# Main container module for Pry-Byebug functionality -# -# source://pry-byebug//lib/pry-byebug/helpers/location.rb#3 -module PryByebug - # Reference to currently running pry-remote server. Used by the processor. - # - # source://pry-byebug//lib/pry-byebug/base.rb#10 - def current_remote_server; end - - # Reference to currently running pry-remote server. Used by the processor. - # - # source://pry-byebug//lib/pry-byebug/base.rb#10 - def current_remote_server=(_arg0); end - - private - - # Ensures that a command is executed in a local file context. - # - # source://pry-byebug//lib/pry-byebug/base.rb#25 - def check_file_context(target, msg = T.unsafe(nil)); end - - # Checks that a target binding is in a local file context. - # - # source://pry-byebug//lib/pry-byebug/base.rb#17 - def file_context?(target); end - - class << self - # Ensures that a command is executed in a local file context. - # - # @raise [Pry::CommandError] - # - # source://pry-byebug//lib/pry-byebug/base.rb#25 - def check_file_context(target, msg = T.unsafe(nil)); end - - # Checks that a target binding is in a local file context. - # - # @return [Boolean] - # - # source://pry-byebug//lib/pry-byebug/base.rb#17 - def file_context?(target); end - end -end - -# Display the current stack -# -# source://pry-byebug//lib/pry-byebug/commands/backtrace.rb#9 -class PryByebug::BacktraceCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - - # source://pry-byebug//lib/pry-byebug/commands/backtrace.rb#23 - def process; end -end - -# Add, show and remove breakpoints -# -# source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#12 -class PryByebug::BreakCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Breakpoints - include ::PryByebug::Helpers::Location - include ::PryByebug::Helpers::Multiline - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#50 - def options(opt); end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#62 - def process; end - - private - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#111 - def add_breakpoint(place, condition); end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#93 - def new_breakpoint; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#102 - def option_to_method(option); end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#106 - def print_all; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#88 - def process_condition; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 - def process_delete; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 - def process_delete_all; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 - def process_disable; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 - def process_disable_all; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 - def process_enable; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#84 - def process_show; end -end - -# Continue program execution until the next breakpoint -# -# source://pry-byebug//lib/pry-byebug/commands/continue.rb#11 -class PryByebug::ContinueCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - include ::PryByebug::Helpers::Breakpoints - include ::PryByebug::Helpers::Location - - # source://pry-byebug//lib/pry-byebug/commands/continue.rb#31 - def process; end -end - -# Travel down the frame stack -# -# source://pry-byebug//lib/pry-byebug/commands/down.rb#9 -class PryByebug::DownCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - - # source://pry-byebug//lib/pry-byebug/commands/down.rb#27 - def process; end -end - -# Exit pry REPL with Byebug.stop -# -# source://pry-byebug//lib/pry-byebug/commands/exit_all.rb#9 -class PryByebug::ExitAllCommand < ::Pry::Command::ExitAll - # source://pry-byebug//lib/pry-byebug/commands/exit_all.rb#10 - def process; end -end - -# Run until the end of current frame -# -# source://pry-byebug//lib/pry-byebug/commands/finish.rb#9 -class PryByebug::FinishCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - - # source://pry-byebug//lib/pry-byebug/commands/finish.rb#20 - def process; end -end - -# Move to a specific frame in the callstack -# -# source://pry-byebug//lib/pry-byebug/commands/frame.rb#9 -class PryByebug::FrameCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - - # source://pry-byebug//lib/pry-byebug/commands/frame.rb#27 - def process; end -end - -# source://pry-byebug//lib/pry-byebug/helpers/location.rb#4 -module PryByebug::Helpers; end - -# Common helpers for breakpoint related commands -# -# source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#10 -module PryByebug::Helpers::Breakpoints - # Prints a message with bold font. - # - # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#21 - def bold_puts(msg); end - - # Byebug's array of breakpoints. - # - # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#14 - def breakpoints; end - - # Max width of breakpoints id column - # - # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#77 - def max_width; end - - # Prints a header for the breakpoint list. - # - # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#63 - def print_breakpoints_header; end - - # Print out full information about a breakpoint. - # - # Includes surrounding code at that point. - # - # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#30 - def print_full_breakpoint(breakpoint); end - - # Print out concise information about a breakpoint. - # - # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#52 - def print_short_breakpoint(breakpoint); end -end - -# Compatibility helper to handle source location -# -# source://pry-byebug//lib/pry-byebug/helpers/location.rb#8 -module PryByebug::Helpers::Location - private - - # Current file in the target binding. Used as the default breakpoint - # location. - # - # source://pry-byebug//lib/pry-byebug/helpers/location.rb#15 - def current_file(source = T.unsafe(nil)); end - - class << self - # Current file in the target binding. Used as the default breakpoint - # location. - # - # source://pry-byebug//lib/pry-byebug/helpers/location.rb#15 - def current_file(source = T.unsafe(nil)); end - end -end - -# Helpers to help handling multiline inputs -# -# source://pry-byebug//lib/pry-byebug/helpers/multiline.rb#8 -module PryByebug::Helpers::Multiline - # Returns true if we are in a multiline context and, as a side effect, - # updates the partial evaluation string with the current input. - # - # Returns false otherwise - # - # source://pry-byebug//lib/pry-byebug/helpers/multiline.rb#15 - def check_multiline_context; end -end - -# Helpers to aid breaking out of the REPL loop -# -# source://pry-byebug//lib/pry-byebug/helpers/navigation.rb#8 -module PryByebug::Helpers::Navigation - # Breaks out of the REPL loop and signals tracer - # - # source://pry-byebug//lib/pry-byebug/helpers/navigation.rb#12 - def breakout_navigation(action, options = T.unsafe(nil)); end -end - -# Run a number of lines and then stop again -# -# source://pry-byebug//lib/pry-byebug/commands/next.rb#10 -class PryByebug::NextCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - include ::PryByebug::Helpers::Multiline - - # source://pry-byebug//lib/pry-byebug/commands/next.rb#29 - def process; end -end - -# Run a number of Ruby statements and then stop again -# -# source://pry-byebug//lib/pry-byebug/commands/step.rb#9 -class PryByebug::StepCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - - # source://pry-byebug//lib/pry-byebug/commands/step.rb#26 - def process; end -end - -# Travel up the frame stack -# -# source://pry-byebug//lib/pry-byebug/commands/up.rb#9 -class PryByebug::UpCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - - # source://pry-byebug//lib/pry-byebug/commands/up.rb#27 - def process; end -end diff --git a/sorbet/rbi/gems/pry@0.14.2.rbi b/sorbet/rbi/gems/pry@0.14.2.rbi deleted file mode 100644 index 667f00a46..000000000 --- a/sorbet/rbi/gems/pry@0.14.2.rbi +++ /dev/null @@ -1,10075 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `pry` gem. -# Please instead update this file by running `bin/tapioca gem pry`. - -# source://pry//lib/pry/core_extensions.rb#115 -class BasicObject - # Return a binding object for the receiver. - # - # The `self` of the binding is set to the current object, and it contains no - # local variables. - # - # The default definee (http://yugui.jp/articles/846) is set such that new - # methods defined will be added to the singleton class of the BasicObject. - # - # @return [Binding] - # - # source://pry//lib/pry/core_extensions.rb#125 - def __binding__; end -end - -# source://pry//lib/pry/core_extensions.rb#24 -class Object < ::BasicObject - include ::Kernel - include ::PP::ObjectMixin - - # Return a binding object for the receiver. - # - # The `self` of the binding is set to the current object, and it contains no - # local variables. - # - # The default definee (http://yugui.jp/articles/846) is set such that: - # - # * If `self` is a class or module, then new methods created in the binding - # will be defined in that class or module (as in `class Foo; end`). - # * If `self` is a normal object, then new methods created in the binding will - # be defined on its singleton class (as in `class << self; end`). - # * If `self` doesn't have a real singleton class (i.e. it is a Fixnum, Float, - # Symbol, nil, true, or false), then new methods will be created on the - # object's class (as in `self.class.class_eval{ }`) - # - # Newly created constants, including classes and modules, will also be added - # to the default definee. - # - # @return [Binding] - # - # source://pry//lib/pry/core_extensions.rb#70 - def __binding__; end - - # Start a Pry REPL on self. - # - # If `self` is a Binding then that will be used to evaluate expressions; - # otherwise a new binding will be created. - # - # @example With a binding - # binding.pry - # @example On any object - # "dummy".pry - # @example With options - # def my_method - # binding.pry :quiet => true - # end - # my_method() - # @param object [Object] the object or binding to pry - # (__deprecated__, use `object.pry`) - # @param hash [Hash] the options hash - # @see Pry.start - # - # source://pry//lib/pry/core_extensions.rb#43 - def pry(object = T.unsafe(nil), hash = T.unsafe(nil)); end -end - -# source://pry//lib/pry/version.rb#3 -class Pry - extend ::Forwardable - extend ::Pry::Forwardable - - # Create a new {Pry} instance. - # - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @param options [Hash] - # @return [Pry] a new instance of Pry - # - # source://pry//lib/pry/pry_instance.rb#81 - def initialize(options = T.unsafe(nil)); end - - # Add a sticky local to this Pry instance. - # A sticky local is a local that persists between all bindings in a session. - # - # @param name [Symbol] The name of the sticky local. - # @yield The block that defines the content of the local. The local - # will be refreshed at each tick of the repl loop. - # - # source://pry//lib/pry/pry_instance.rb#212 - def add_sticky_local(name, &block); end - - # Returns the value of attribute backtrace. - # - # source://pry//lib/pry/pry_instance.rb#35 - def backtrace; end - - # Sets the attribute backtrace - # - # @param value the value to set the attribute backtrace to. - # - # source://pry//lib/pry/pry_instance.rb#35 - def backtrace=(_arg0); end - - # Returns the value of attribute binding_stack. - # - # source://pry//lib/pry/pry_instance.rb#32 - def binding_stack; end - - # Sets the attribute binding_stack - # - # @param value the value to set the attribute binding_stack to. - # - # source://pry//lib/pry/pry_instance.rb#32 - def binding_stack=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands=(*args, **_arg1, &block); end - - # Generate completions. - # - # @param str [String] What the user has typed so far - # @return [Array] Possible completions - # - # source://pry//lib/pry/pry_instance.rb#145 - def complete(str); end - - # Returns the value of attribute config. - # - # source://pry//lib/pry/pry_instance.rb#50 - def config; end - - # The currently active `Binding`. - # - # @return [Binding] The currently active `Binding` for the session. - # - # source://pry//lib/pry/pry_instance.rb#124 - def current_binding; end - - # The currently active `Binding`. - # support previous API - # - # @return [Binding] The currently active `Binding` for the session. - # - # source://pry//lib/pry/pry_instance.rb#124 - def current_context; end - - # Returns the value of attribute custom_completions. - # - # source://pry//lib/pry/pry_instance.rb#33 - def custom_completions; end - - # Sets the attribute custom_completions - # - # @param value the value to set the attribute custom_completions to. - # - # source://pry//lib/pry/pry_instance.rb#33 - def custom_completions=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor=(*args, **_arg1, &block); end - - # Pass a line of input to Pry. - # - # This is the equivalent of `Binding#eval` but with extra Pry! - # - # In particular: - # 1. Pry commands will be executed immediately if the line matches. - # 2. Partial lines of input will be queued up until a complete expression has - # been accepted. - # 3. Output is written to `#output` in pretty colours, not returned. - # - # Once this method has raised an exception or returned false, this instance - # is no longer usable. {#exit_value} will return the session's breakout - # value if applicable. - # - # @option options - # @param line [String?] The line of input; `nil` if the user types `` - # @param options [Hash] a customizable set of options - # @raise [Exception] If the user uses the `raise-up` command, this method - # will raise that exception. - # @return [Boolean] Is Pry ready to accept more input? - # - # source://pry//lib/pry/pry_instance.rb#255 - def eval(line, options = T.unsafe(nil)); end - - # Returns the value of attribute eval_string. - # - # source://pry//lib/pry/pry_instance.rb#34 - def eval_string; end - - # Sets the attribute eval_string - # - # @param value the value to set the attribute eval_string to. - # - # source://pry//lib/pry/pry_instance.rb#34 - def eval_string=(_arg0); end - - # source://pry//lib/pry/pry_instance.rb#286 - def evaluate_ruby(code); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler=(*args, **_arg1, &block); end - - # Execute the specified hook. - # If executing a hook raises an exception, we log that and then continue sucessfully. - # To debug such errors, use the global variable $pry_hook_error, which is set as a - # result. - # - # @param name [Symbol] The hook name to execute - # @param args [*Object] The arguments to pass to the hook - # @return [Object, Exception] The return value of the hook or the exception raised - # - # source://pry//lib/pry/pry_instance.rb#394 - def exec_hook(name, *args, &block); end - - # Returns the value of attribute exit_value. - # - # source://pry//lib/pry/pry_instance.rb#42 - def exit_value; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks=(*args, **_arg1, &block); end - - # Injects a local variable into the provided binding. - # - # @param name [String] The name of the local to inject. - # @param value [Object] The value to set the local to. - # @param binding [Binding] The binding to set the local on. - # @return [Object] The value the local was set to. - # - # source://pry//lib/pry/pry_instance.rb#173 - def inject_local(name, value, binding); end - - # Inject all the sticky locals into the current binding. - # - # source://pry//lib/pry/pry_instance.rb#201 - def inject_sticky_locals!; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input=(*args, **_arg1, &block); end - - # @since v0.12.0 - # - # source://pry//lib/pry/pry_instance.rb#45 - def input_ring; end - - # Returns the value of attribute last_dir. - # - # source://pry//lib/pry/pry_instance.rb#39 - def last_dir; end - - # Sets the attribute last_dir - # - # @param value the value to set the attribute last_dir to. - # - # source://pry//lib/pry/pry_instance.rb#39 - def last_dir=(_arg0); end - - # Returns the value of attribute last_exception. - # - # source://pry//lib/pry/pry_instance.rb#41 - def last_exception; end - - # Set the last exception for a session. - # - # @param exception [Exception] The last exception. - # - # source://pry//lib/pry/pry_instance.rb#418 - def last_exception=(exception); end - - # Returns the value of attribute last_file. - # - # source://pry//lib/pry/pry_instance.rb#38 - def last_file; end - - # Sets the attribute last_file - # - # @param value the value to set the attribute last_file to. - # - # source://pry//lib/pry/pry_instance.rb#38 - def last_file=(_arg0); end - - # Returns the value of attribute last_result. - # - # source://pry//lib/pry/pry_instance.rb#37 - def last_result; end - - # Sets the attribute last_result - # - # @param value the value to set the attribute last_result to. - # - # source://pry//lib/pry/pry_instance.rb#37 - def last_result=(_arg0); end - - # @return [Boolean] True if the last result is an exception that was raised, - # as opposed to simply an instance of Exception (like the result of - # Exception.new) - # - # source://pry//lib/pry/pry_instance.rb#440 - def last_result_is_exception?; end - - # @return [Integer] The maximum amount of objects remembered by the inp and - # out arrays. Defaults to 100. - # - # source://pry//lib/pry/pry_instance.rb#190 - def memory_size; end - - # source://pry//lib/pry/pry_instance.rb#195 - def memory_size=(size); end - - # Returns an output device - # - # @example - # pry_instance.output.puts "ohai!" - # - # source://pry//lib/pry/pry_instance.rb#538 - def output; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output=(*args, **_arg1, &block); end - - # @since v0.12.0 - # - # source://pry//lib/pry/pry_instance.rb#48 - def output_ring; end - - # Returns the currently configured pager - # - # @example - # pry_instance.pager.page text - # - # source://pry//lib/pry/pry_instance.rb#530 - def pager; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pager=(*args, **_arg1, &block); end - - # Pops the current prompt off of the prompt stack. If the prompt you are - # popping is the last prompt, it will not be popped. Use this to restore the - # previous prompt. - # - # @example - # pry = Pry.new(prompt: Pry::Prompt[:my_prompt1]) - # pry.push_prompt(Pry::Prompt[:my_prompt2]) - # pry.pop_prompt # => prompt2 - # pry.pop_prompt # => prompt1 - # pry.pop_prompt # => prompt1 - # @return [Pry::Prompt] the prompt being popped - # - # source://pry//lib/pry/pry_instance.rb#522 - def pop_prompt; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print=(*args, **_arg1, &block); end - - # If the given line is a valid command, process it in the context of the - # current `eval_string` and binding. - # - # @param val [String] The line to process. - # @return [Boolean] `true` if `val` is a command, `false` otherwise - # - # source://pry//lib/pry/pry_instance.rb#325 - def process_command(val); end - - # Same as process_command, but outputs exceptions to `#output` instead of - # raising. - # - # @param val [String] The line to process. - # @return [Boolean] `true` if `val` is a command, `false` otherwise - # - # source://pry//lib/pry/pry_instance.rb#360 - def process_command_safely(val); end - - # This is the prompt at the top of the prompt stack. - # - # @return [Pry::Prompt] the current prompt - # - # source://pry//lib/pry/pry_instance.rb#101 - def prompt; end - - # Sets the Pry prompt. - # - # @param new_prompt [Pry::Prompt] - # @return [void] - # - # source://pry//lib/pry/pry_instance.rb#108 - def prompt=(new_prompt); end - - # Push a binding for the given object onto the stack. If this instance is - # currently stopped, mark it as usable again. - # - # source://pry//lib/pry/pry_instance.rb#131 - def push_binding(object); end - - # Initialize this instance by pushing its initial context into the binding - # stack. If no target is given, start at the top level. - # - # source://pry//lib/pry/pry_instance.rb#118 - def push_initial_binding(target = T.unsafe(nil)); end - - # Pushes the current prompt onto a stack that it can be restored from later. - # Use this if you wish to temporarily change the prompt. - # - # @example - # push_prompt(Pry::Prompt[:my_prompt]) - # @param new_prompt [Pry::Prompt] - # @return [Pry::Prompt] new_prompt - # - # source://pry//lib/pry/pry_instance.rb#506 - def push_prompt(new_prompt); end - - # Convenience accessor for the `quiet` config key. - # - # @return [Boolean] - # - # source://pry//lib/pry/pry_instance.rb#592 - def quiet?; end - - # source://pry//lib/pry/pry_instance.rb#582 - def raise_up(*args); end - - # source://pry//lib/pry/pry_instance.rb#586 - def raise_up!(*args); end - - # Raise an exception out of Pry. - # - # See Kernel#raise for documentation of parameters. - # See rb_make_exception for the inbuilt implementation. - # - # This is necessary so that the raise-up command can tell the - # difference between an exception the user has decided to raise, - # and a mistake in specifying that exception. - # - # (i.e. raise-up RunThymeError.new should not be the same as - # raise-up NameError, "unititialized constant RunThymeError") - # - # @raise [TypeError] - # - # source://pry//lib/pry/pry_instance.rb#554 - def raise_up_common(force, *args); end - - # Potentially deprecated. Use `Pry::REPL.new(pry, :target => target).start` - # (If nested sessions are going to exist, this method is fine, but a goal is - # to come up with an alternative to nested sessions altogether.) - # - # source://pry//lib/pry/pry_instance.rb#282 - def repl(target = T.unsafe(nil)); end - - # Reset the current eval string. If the user has entered part of a multiline - # expression, this discards that input. - # - # source://pry//lib/pry/pry_instance.rb#231 - def reset_eval_string; end - - # Run the specified command. - # - # @example - # pry_instance.run_command("ls -m") - # @param val [String] The command (and its params) to execute. - # @return [Pry::Command::VOID_VALUE] - # - # source://pry//lib/pry/pry_instance.rb#375 - def run_command(val); end - - # Returns the appropriate prompt to use. - # - # @return [String] The prompt. - # - # source://pry//lib/pry/pry_instance.rb#453 - def select_prompt; end - - # Set the last result of an eval. - # This method should not need to be invoked directly. - # - # @param result [Object] The result. - # @param code [String] The code that was run. - # - # source://pry//lib/pry/pry_instance.rb#409 - def set_last_result(result, code = T.unsafe(nil)); end - - # Whether the print proc should be invoked. - # Currently only invoked if the output is not suppressed. - # - # @return [Boolean] Whether the print proc should be invoked. - # - # source://pry//lib/pry/pry_instance.rb#447 - def should_print?; end - - # Output the result or pass to an exception handler (if result is an exception). - # - # source://pry//lib/pry/pry_instance.rb#298 - def show_result(result); end - - # source://pry//lib/pry/pry_instance.rb#216 - def sticky_locals; end - - # Returns the value of attribute suppress_output. - # - # source://pry//lib/pry/pry_instance.rb#36 - def suppress_output; end - - # Sets the attribute suppress_output - # - # @param value the value to set the attribute suppress_output to. - # - # source://pry//lib/pry/pry_instance.rb#36 - def suppress_output=(_arg0); end - - # Update Pry's internal state after evalling code. - # This method should not need to be invoked directly. - # - # @param code [String] The code we just eval'd - # - # source://pry//lib/pry/pry_instance.rb#428 - def update_input_history(code); end - - private - - # Force `eval_string` into the encoding of `val`. [Issue #284] - # - # source://pry//lib/pry/pry_instance.rb#680 - def ensure_correct_encoding!(val); end - - # source://pry//lib/pry/pry_instance.rb#688 - def generate_prompt(prompt_proc, conf); end - - # source://pry//lib/pry/pry_instance.rb#598 - def handle_line(line, options); end - - # the array that the prompt stack is stored in - # - # source://pry//lib/pry/pry_instance.rb#697 - def prompt_stack; end - - class << self - # Convert the given object into an instance of `Pry::Code`, if it isn't - # already one. - # - # @param obj [Code, Method, UnboundMethod, Proc, Pry::Method, String, Array, IO] - # - # source://pry//lib/pry/code.rb#12 - def Code(obj); end - - # If the given object is a `Pry::Method`, return it unaltered. If it's - # anything else, return it wrapped in a `Pry::Method` instance. - # - # source://pry//lib/pry/method.rb#9 - def Method(obj); end - - # If the given object is a `Pry::WrappedModule`, return it unaltered. If it's - # anything else, return it wrapped in a `Pry::WrappedModule` instance. - # - # source://pry//lib/pry/wrapped_module.rb#7 - def WrappedModule(obj); end - - # source://pry//lib/pry/pry_class.rb#294 - def auto_resize!; end - - # Return a `Binding` object for `target` or return `target` if it is - # already a `Binding`. - # In the case where `target` is top-level then return `TOPLEVEL_BINDING` - # - # @param target [Object] The object to get a `Binding` object for. - # @return [Binding] The `Binding` object. - # - # source://pry//lib/pry/pry_class.rb#347 - def binding_for(target); end - - # Returns the value of attribute cli. - # - # source://pry//lib/pry/pry_class.rb#22 - def cli; end - - # Sets the attribute cli - # - # @param value the value to set the attribute cli to. - # - # source://pry//lib/pry/pry_class.rb#22 - def cli=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands=(*args, **_arg1, &block); end - - # Returns the value of attribute config. - # - # source://pry//lib/pry/pry_class.rb#25 - def config; end - - # Sets the attribute config - # - # @param value the value to set the attribute config to. - # - # source://pry//lib/pry/pry_class.rb#25 - def config=(_arg0); end - - # @example - # Pry.configure do |config| - # config.eager_load! # optional - # config.input = # .. - # config.foo = 2 - # end - # @yield [config] Yields a block with {Pry.config} as its argument. - # - # source://pry//lib/pry/pry_class.rb#46 - def configure; end - - # source://pry//lib/pry/pry_class.rb#380 - def critical_section; end - - # @return [Pry::Config] Returns a value store for an instance of Pry running on the current thread. - # - # source://pry//lib/pry/pry_class.rb#63 - def current; end - - # Returns the value of attribute current_line. - # - # source://pry//lib/pry/pry_class.rb#19 - def current_line; end - - # Sets the attribute current_line - # - # @param value the value to set the attribute current_line to. - # - # source://pry//lib/pry/pry_class.rb#19 - def current_line=(_arg0); end - - # Returns the value of attribute custom_completions. - # - # source://pry//lib/pry/pry_class.rb#18 - def custom_completions; end - - # Sets the attribute custom_completions - # - # @param value the value to set the attribute custom_completions to. - # - # source://pry//lib/pry/pry_class.rb#18 - def custom_completions=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor=(*args, **_arg1, &block); end - - # Returns the value of attribute eval_path. - # - # source://pry//lib/pry/pry_class.rb#21 - def eval_path; end - - # Sets the attribute eval_path - # - # @param value the value to set the attribute eval_path to. - # - # source://pry//lib/pry/pry_class.rb#21 - def eval_path=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals=(*args, **_arg1, &block); end - - # source://pry//lib/pry/pry_class.rb#139 - def final_session_setup; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def history(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def history=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks=(*args, **_arg1, &block); end - - # @return [Boolean] - # - # source://pry//lib/pry/pry_class.rb#375 - def in_critical_section?; end - - # Basic initialization. - # - # source://pry//lib/pry/pry_class.rb#338 - def init; end - - # @return [Boolean] Whether this is the first time a Pry session has - # been started since loading the Pry class. - # - # source://pry//lib/pry/pry_class.rb#257 - def initial_session?; end - - # Do basic setup for initial session including: loading pryrc, plugins, - # requires, and history. - # - # source://pry//lib/pry/pry_class.rb#129 - def initial_session_setup; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input=(*args, **_arg1, &block); end - - # Returns the value of attribute last_internal_error. - # - # source://pry//lib/pry/pry_class.rb#24 - def last_internal_error; end - - # Sets the attribute last_internal_error - # - # @param value the value to set the attribute last_internal_error to. - # - # source://pry//lib/pry/pry_class.rb#24 - def last_internal_error=(_arg0); end - - # Returns the value of attribute line_buffer. - # - # source://pry//lib/pry/pry_class.rb#20 - def line_buffer; end - - # Sets the attribute line_buffer - # - # @param value the value to set the attribute line_buffer to. - # - # source://pry//lib/pry/pry_class.rb#20 - def line_buffer=(_arg0); end - - # Load the given file in the context of `Pry.toplevel_binding` - # - # @param file [String] The unexpanded file path. - # - # source://pry//lib/pry/pry_class.rb#69 - def load_file_at_toplevel(file); end - - # Execute the file through the REPL loop, non-interactively. - # - # @param file_name [String] File name to load through the REPL. - # - # source://pry//lib/pry/pry_class.rb#202 - def load_file_through_repl(file_name); end - - # Load Readline history if required. - # - # source://pry//lib/pry/pry_class.rb#251 - def load_history; end - - # Load RC files if appropriate This method can also be used to reload the - # files if they have changed. - # - # source://pry//lib/pry/pry_class.rb#77 - def load_rc_files; end - - # Load any Ruby files specified with the -r flag on the command line. - # - # source://pry//lib/pry/pry_class.rb#101 - def load_requires; end - - # Trap interrupts on jruby, and make them behave like MRI so we can - # catch them. - # - # source://pry//lib/pry/pry_class.rb#109 - def load_traps; end - - # source://pry//lib/pry/pry_class.rb#113 - def load_win32console; end - - # @return [main] returns the special instance of Object, "main". - # - # source://pry//lib/pry/pry_class.rb#55 - def main; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def memory_size(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def memory_size=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pager(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pager=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prompt(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prompt=(*args, **_arg1, &block); end - - # Returns the value of attribute quiet. - # - # source://pry//lib/pry/pry_class.rb#23 - def quiet; end - - # Sets the attribute quiet - # - # @param value the value to set the attribute quiet to. - # - # source://pry//lib/pry/pry_class.rb#23 - def quiet=(_arg0); end - - # Load the local RC file (./.pryrc) - # - # source://pry//lib/pry/pry_class.rb#86 - def rc_files_to_load; end - - # Expand a file to its canonical name (following symlinks as appropriate) - # - # source://pry//lib/pry/pry_class.rb#94 - def real_path_to(file); end - - # Set all the configurable options back to their default values - # - # source://pry//lib/pry/pry_class.rb#326 - def reset_defaults; end - - # Run a Pry command from outside a session. The commands available are - # those referenced by `Pry.config.commands` (the default command set). - # - # @example Run under Pry class, returning only public methods. - # Pry.run_command "ls -m", :target => Pry - # @example Run at top-level with no output. - # Pry.run_command "ls" - # @example Display command output. - # Pry.run_command "ls -av", :show_output => true - # @option options - # @option options - # @param command_string [String] The Pry command (including arguments, - # if any). - # @param options [Hash] Optional named parameters. - # @return [nil] - # - # source://pry//lib/pry/pry_class.rb#277 - def run_command(command_string, options = T.unsafe(nil)); end - - # Start a Pry REPL. - # This method also loads `pryrc` as necessary the first time it is invoked. - # - # @example - # Pry.start(Object.new, :input => MyInput.new) - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @param target [Object, Binding] The receiver of the Pry session - # @param options [Hash] - # - # source://pry//lib/pry/pry_class.rb#156 - def start(target = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://pry//lib/pry/pry_class.rb#354 - def toplevel_binding; end - - # Sets the attribute toplevel_binding - # - # @param value the value to set the attribute toplevel_binding to. - # - # source://pry//lib/pry/pry_class.rb#372 - def toplevel_binding=(_arg0); end - - # An inspector that clips the output to `max_length` chars. - # In case of > `max_length` chars the `# notation is used. - # - # @option options - # @option options - # @param obj [Object] The object to view. - # @param options [Hash] - # @return [String] The string representation of `obj`. - # - # source://pry//lib/pry/pry_class.rb#225 - def view_clip(obj, options = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://pry//lib/pry/pry_class.rb#388 - def mutex_available?; end - end -end - -# @return [Array] Code of the method used when implementing Pry's -# __binding__, along with line indication to be used with instance_eval (and -# friends). -# @see Object#__binding__ -# -# source://pry//lib/pry/core_extensions.rb#9 -Pry::BINDING_METHOD_IMPL = T.let(T.unsafe(nil), Array) - -# source://pry//lib/pry/basic_object.rb#4 -class Pry::BasicObject < ::BasicObject - include ::Kernel -end - -# source://pry//lib/pry/basic_object.rb#6 -Pry::BasicObject::Dir = Dir - -# source://pry//lib/pry/basic_object.rb#6 -Pry::BasicObject::ENV = T.let(T.unsafe(nil), Object) - -# source://pry//lib/pry/basic_object.rb#6 -Pry::BasicObject::File = File - -# source://pry//lib/pry/basic_object.rb#6 -Pry::BasicObject::Kernel = Kernel - -# source://pry//lib/pry/basic_object.rb#6 -Pry::BasicObject::LoadError = LoadError - -# source://pry//lib/pry/basic_object.rb#6 -Pry::BasicObject::Pry = Pry - -# A super-class for Commands that are created with a single block. -# -# This class ensures that the block is called with the correct number of -# arguments and the right context. -# -# Create subclasses using {Pry::CommandSet#command}. -# -# source://pry//lib/pry/block_command.rb#10 -class Pry::BlockCommand < ::Pry::Command - # Call the block that was registered with this command. - # - # @param args [Array] The arguments passed - # @return [Object] The return value of the block - # - # source://pry//lib/pry/block_command.rb#14 - def call(*args); end - - # source://pry//lib/pry/block_command.rb#18 - def help; end -end - -# Manage the processing of command line options -# -# source://pry//lib/pry/cli.rb#7 -class Pry::CLI - class << self - # Add a block responsible for processing parsed options. - # - # source://pry//lib/pry/cli.rb#39 - def add_option_processor(&block); end - - # Add another set of CLI options (a Pry::Slop block) - # - # source://pry//lib/pry/cli.rb#24 - def add_options(&block); end - - # @return [Array] The input array of strings to process - # as CLI options. - # - # source://pry//lib/pry/cli.rb#21 - def input_args; end - - # @return [Array] The input array of strings to process - # as CLI options. - # - # source://pry//lib/pry/cli.rb#21 - def input_args=(_arg0); end - - # @return [Array] The Procs that process the parsed options. Plugins can - # utilize this facility in order to add and process their own Pry - # options. - # - # source://pry//lib/pry/cli.rb#17 - def option_processors; end - - # @return [Array] The Procs that process the parsed options. Plugins can - # utilize this facility in order to add and process their own Pry - # options. - # - # source://pry//lib/pry/cli.rb#17 - def option_processors=(_arg0); end - - # @return [Proc] The Proc defining the valid command line options. - # - # source://pry//lib/pry/cli.rb#12 - def options; end - - # @return [Proc] The Proc defining the valid command line options. - # - # source://pry//lib/pry/cli.rb#12 - def options=(_arg0); end - - # source://pry//lib/pry/cli.rb#52 - def parse_options(args = T.unsafe(nil)); end - - # Clear `options` and `option_processors` - # - # source://pry//lib/pry/cli.rb#47 - def reset; end - - # source://pry//lib/pry/cli.rb#90 - def start(opts); end - end -end - -# source://pry//lib/pry/cli.rb#8 -class Pry::CLI::NoOptionsError < ::StandardError; end - -# A super-class of Commands with structure. -# -# This class implements the bare-minimum functionality that a command should -# have, namely a --help switch, and then delegates actual processing to its -# subclasses. -# -# Create subclasses using {Pry::CommandSet#create_command}, and override the -# `options(opt)` method to set up an instance of Pry::Slop, and the `process` -# method to actually run the command. If necessary, you can also override -# `setup` which will be called before `options`, for example to require any -# gems your command needs to run, or to set up state. -# -# source://pry//lib/pry/class_command.rb#15 -class Pry::ClassCommand < ::Pry::Command - # Returns the value of attribute args. - # - # source://pry//lib/pry/class_command.rb#64 - def args; end - - # Sets the attribute args - # - # @param value the value to set the attribute args to. - # - # source://pry//lib/pry/class_command.rb#64 - def args=(_arg0); end - - # Set up `opts` and `args`, and then call `process`. - # - # This method will display help if necessary. - # - # @param args [Array] The arguments passed - # @return [Object] The return value of `process` or VOID_VALUE - # - # source://pry//lib/pry/class_command.rb#72 - def call(*args); end - - # Generate shell completions - # - # @param search [String] The line typed so far - # @return [Array] the words to complete - # - # source://pry//lib/pry/class_command.rb#105 - def complete(search); end - - # Return the help generated by Pry::Slop for this command. - # - # source://pry//lib/pry/class_command.rb#87 - def help; end - - # A method to setup Pry::Slop so it can parse the options your command expects. - # - # method, as it may be called by Pry at any time for introspection reasons. - # If you need to set up default values, use `setup` instead. - # - # @example - # def options(opt) - # opt.banner "Gists methods or classes" - # opt.on(:c, :class, "gist a class") do - # @action = :class - # end - # end - # @note Please don't do anything side-effecty in the main part of this - # - # source://pry//lib/pry/class_command.rb#171 - def options(opt); end - - # Returns the value of attribute opts. - # - # source://pry//lib/pry/class_command.rb#63 - def opts; end - - # Sets the attribute opts - # - # @param value the value to set the attribute opts to. - # - # source://pry//lib/pry/class_command.rb#63 - def opts=(_arg0); end - - # The actual body of your command should go here. - # - # The `opts` mehod can be called to get the options that Pry::Slop has passed, - # and `args` gives the remaining, unparsed arguments. - # - # The return value of this method is discarded unless the command was - # created with `:keep_retval => true`, in which case it is returned to the - # repl. - # - # @example - # def process - # if opts.present?(:class) - # gist_class - # else - # gist_method - # end - # end - # @raise [CommandError] - # - # source://pry//lib/pry/class_command.rb#190 - def process; end - - # A method called just before `options(opt)` as part of `call`. - # - # This method can be used to set up any context your command needs to run, - # for example requiring gems, or setting default values for options. - # - # @example - # def setup - # require 'gist' - # @action = :method - # end - # - # source://pry//lib/pry/class_command.rb#121 - def setup; end - - # Return an instance of Pry::Slop that can parse either subcommands or the - # options that this command accepts. - # - # source://pry//lib/pry/class_command.rb#93 - def slop; end - - # A method to setup Pry::Slop commands so it can parse the subcommands your - # command expects. If you need to set up default values, use `setup` - # instead. - # - # @example A minimal example - # def subcommands(cmd) - # cmd.command :download do |opt| - # description 'Downloads a content from a server' - # - # opt.on :verbose, 'Use verbose output' - # - # run do |options, arguments| - # ContentDownloader.download(options, arguments) - # end - # end - # end - # @example Define the invokation block anywhere you want - # def subcommands(cmd) - # cmd.command :download do |opt| - # description 'Downloads a content from a server' - # - # opt.on :verbose, 'Use verbose output' - # end - # end - # - # def process - # # Perform calculations... - # opts.fetch_command(:download).run do |options, arguments| - # ContentDownloader.download(options, arguments) - # end - # # More calculations... - # end - # - # source://pry//lib/pry/class_command.rb#156 - def subcommands(cmd); end - - class << self - # source://pry//lib/pry/class_command.rb#29 - def doc; end - - # source://pry//lib/pry/class_command.rb#37 - def file; end - - # Ensure that subclasses inherit the options, description and - # match from a ClassCommand super class. - # - # source://pry//lib/pry/class_command.rb#19 - def inherited(klass); end - - # source://pry//lib/pry/class_command.rb#42 - def line; end - - # source://pry//lib/pry/class_command.rb#25 - def source; end - - # source://pry//lib/pry/class_command.rb#37 - def source_file; end - - # source://pry//lib/pry/class_command.rb#42 - def source_line; end - - # source://pry//lib/pry/class_command.rb#33 - def source_location; end - - private - - # The object used to extract the source for the command. - # - # This should be a `Pry::Method(block)` for a command made with `create_command` - # and a `Pry::WrappedModule(self)` for a command that's a standard class. - # - # @return [Pry::WrappedModule, Pry::Method] - # - # source://pry//lib/pry/class_command.rb#54 - def source_object; end - end -end - -# `Pry::Code` is a class that encapsulates lines of source code and their -# line numbers and formats them for terminal output. It can read from a file -# or method definition or be instantiated with a `String` or an `Array`. -# -# In general, the formatting methods in `Code` return a new `Code` object -# which will format the text as specified when `#to_s` is called. This allows -# arbitrary chaining of formatting methods without mutating the original -# object. -# -# source://pry//lib/pry/code.rb#32 -class Pry::Code - extend ::MethodSource::CodeHelpers - - # Instantiate a `Code` object containing code from the given `Array`, - # `String`, or `IO`. The first line will be line 1 unless specified - # otherwise. If you need non-contiguous line numbers, you can create an - # empty `Code` object and then use `#push` to insert the lines. - # - # @param lines [Array, String, IO] - # @param start_line [Integer?] - # @param code_type [Symbol?] - # @return [Code] a new instance of Code - # - # source://pry//lib/pry/code.rb#87 - def initialize(lines = T.unsafe(nil), start_line = T.unsafe(nil), code_type = T.unsafe(nil)); end - - # Append the given line. +lineno+ is one more than the last existing - # line, unless specified otherwise. - # - # @param line [String] - # @return [void] - # - # source://pry//lib/pry/code.rb#102 - def <<(line); end - - # Two `Code` objects are equal if they contain the same lines with the same - # numbers. Otherwise, call `to_s` and `chomp` and compare as Strings. - # - # @param other [Code, Object] - # @return [Boolean] - # - # source://pry//lib/pry/code.rb#325 - def ==(other); end - - # Remove all lines except for the +lines+ after and excluding +lineno+. - # - # @param lineno [Integer] - # @param lines [Integer] - # @return [Code] - # - # source://pry//lib/pry/code.rb#195 - def after(lineno, lines = T.unsafe(nil)); end - - # Remove all lines except for the +lines+ on either side of and including - # +lineno+. - # - # @param lineno [Integer] - # @param lines [Integer] - # @return [Code] - # - # source://pry//lib/pry/code.rb#182 - def around(lineno, lines = T.unsafe(nil)); end - - # Remove all lines except for the +lines+ up to and excluding +lineno+. - # - # @param lineno [Integer] - # @param lines [Integer] - # @return [Code] - # - # source://pry//lib/pry/code.rb#168 - def before(lineno, lines = T.unsafe(nil)); end - - # Remove all lines that aren't in the given range, expressed either as a - # `Range` object or a first and last line number (inclusive). Negative - # indices count from the end of the array of lines. - # - # @param start_line [Range, Integer] - # @param end_line [Integer?] - # @return [Code] - # - # source://pry//lib/pry/code.rb#135 - def between(start_line, end_line = T.unsafe(nil)); end - - # @return [Symbol] The type of code stored in this wrapper. - # - # source://pry//lib/pry/code.rb#77 - def code_type; end - - # @return [Symbol] The type of code stored in this wrapper. - # - # source://pry//lib/pry/code.rb#77 - def code_type=(_arg0); end - - # Get the comment that describes the expression on the given line number. - # - # @param line_number [Integer] (1-based) - # @return [String] the code. - # - # source://pry//lib/pry/code.rb#286 - def comment_describing(line_number); end - - # Get the multiline expression that starts on the given line number. - # - # @param line_number [Integer] (1-based) - # @return [String] the code. - # - # source://pry//lib/pry/code.rb#294 - def expression_at(line_number, consume = T.unsafe(nil)); end - - # Remove all lines that don't match the given `pattern`. - # - # @param pattern [Regexp] - # @return [Code] - # - # source://pry//lib/pry/code.rb#207 - def grep(pattern); end - - # @return [String] a (possibly highlighted) copy of the source code. - # - # source://pry//lib/pry/code.rb#263 - def highlighted; end - - # Return the number of lines stored. - # - # @return [Integer] - # - # source://pry//lib/pry/code.rb#316 - def length; end - - # @return [Integer] the number of digits in the last line. - # - # source://pry//lib/pry/code.rb#252 - def max_lineno_width; end - - # Forward any missing methods to the output of `#to_s`. - # - # source://pry//lib/pry/code.rb#335 - def method_missing(method_name, *args, &block); end - - # Get the (approximate) Module.nesting at the give line number. - # - # @param line_number [Integer] line number starting from 1 - # @return [Array] a list of open modules. - # - # source://pry//lib/pry/code.rb#302 - def nesting_at(line_number); end - - # Writes a formatted representation (based on the configuration of the - # object) to the given output, which must respond to `#<<`. - # - # source://pry//lib/pry/code.rb#269 - def print_to_output(output, color = T.unsafe(nil)); end - - # Append the given line. +lineno+ is one more than the last existing - # line, unless specified otherwise. - # - # @param line [String] - # @return [void] - # - # source://pry//lib/pry/code.rb#102 - def push(line); end - - # Return an unformatted String of the code. - # - # @return [String] - # - # source://pry//lib/pry/code.rb#309 - def raw; end - - # Filter the lines using the given block. - # - # @return [Code] - # @yield [LOC] - # - # source://pry//lib/pry/code.rb#122 - def reject(&block); end - - # Filter the lines using the given block. - # - # @return [Code] - # @yield [LOC] - # - # source://pry//lib/pry/code.rb#112 - def select(&block); end - - # Take `num_lines` from `start_line`, forward or backwards. - # - # @param start_line [Integer] - # @param num_lines [Integer] - # @return [Code] - # - # source://pry//lib/pry/code.rb#150 - def take_lines(start_line, num_lines); end - - # @return [String] a formatted representation (based on the configuration of - # the object). - # - # source://pry//lib/pry/code.rb#258 - def to_s; end - - # Format output with the specified number of spaces in front of every line, - # unless `spaces` is falsy. - # - # @param spaces [Integer?] - # @return [Code] - # - # source://pry//lib/pry/code.rb#244 - def with_indentation(spaces = T.unsafe(nil)); end - - # Format output with line numbers next to it, unless `y_n` is falsy. - # - # @param y_n [Boolean?] - # @return [Code] - # - # source://pry//lib/pry/code.rb#221 - def with_line_numbers(y_n = T.unsafe(nil)); end - - # Format output with a marker next to the given +lineno+, unless +lineno+ is - # falsy. - # - # @param lineno [Integer?] - # @return [Code] - # - # source://pry//lib/pry/code.rb#232 - def with_marker(lineno = T.unsafe(nil)); end - - protected - - # An abstraction of the `dup.instance_eval` pattern used throughout this - # class. - # - # source://pry//lib/pry/code.rb#353 - def alter(&block); end - - private - - # Check whether String responds to missing methods. - # - # @return [Boolean] - # - # source://pry//lib/pry/code.rb#345 - def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end - - class << self - # Instantiate a `Code` object containing code loaded from a file or - # Pry's line buffer. - # - # @param filename [String] The name of a file, or "(pry)". - # @param code_type [Symbol] The type of code the file contains. - # @return [Code] - # - # source://pry//lib/pry/code.rb#42 - def from_file(filename, code_type = T.unsafe(nil)); end - - # Instantiate a `Code` object containing code extracted from a - # `::Method`, `UnboundMethod`, `Proc`, or `Pry::Method` object. - # - # @param meth [::Method, UnboundMethod, Proc, Pry::Method] The method - # object. - # @param start_line [Integer, nil] The line number to start on, or nil to - # use the method's original line numbers. - # @return [Code] - # - # source://pry//lib/pry/code.rb#55 - def from_method(meth, start_line = T.unsafe(nil)); end - - # Attempt to extract the source code for module (or class) `mod`. - # - # @param mod [Module, Class] The module (or class) of interest. - # @param candidate_rank [Integer] The module candidate (by rank) - # to use (see `Pry::WrappedModule::Candidate` for more information). - # @param start_line [Integer, nil] The line number to start on, or nil to - # use the method's original line numbers. - # @return [Code] - # - # source://pry//lib/pry/code.rb#69 - def from_module(mod, candidate_rank = T.unsafe(nil), start_line = T.unsafe(nil)); end - end -end - -# Represents a range of lines in a code listing. -# -# @api private -# -# source://pry//lib/pry/code/code_range.rb#8 -class Pry::Code::CodeRange - # @api private - # @param start_line [Integer] - # @param end_line [Integer?] - # @return [CodeRange] a new instance of CodeRange - # - # source://pry//lib/pry/code/code_range.rb#11 - def initialize(start_line, end_line = T.unsafe(nil)); end - - # @api private - # @param lines [Array] - # @return [Range] - # - # source://pry//lib/pry/code/code_range.rb#19 - def indices_range(lines); end - - private - - # @api private - # - # source://pry//lib/pry/code/code_range.rb#27 - def end_line; end - - # @api private - # @return [Integer] - # - # source://pry//lib/pry/code/code_range.rb#57 - def find_end_index(lines); end - - # @api private - # @return [Integer] - # - # source://pry//lib/pry/code/code_range.rb#50 - def find_start_index(lines); end - - # If `end_line` is equal to `nil`, then calculate it from the first - # parameter, `start_line`. Otherwise, leave it as it is. - # - # @api private - # @return [void] - # - # source://pry//lib/pry/code/code_range.rb#32 - def force_set_end_line; end - - # Finds indices of `start_line` and `end_line` in the given Array of - # +lines+. - # - # @api private - # @param lines [Array] - # @return [Array] - # - # source://pry//lib/pry/code/code_range.rb#45 - def indices(lines); end - - # For example, if the range is 4..10, then `start_line` would be equal to - # 4 and `end_line` to 10. - # - # @api private - # @return [void] - # - # source://pry//lib/pry/code/code_range.rb#66 - def set_end_line_from_range; end - - # @api private - # - # source://pry//lib/pry/code/code_range.rb#25 - def start_line; end -end - -# Represents a line of code (which may, in fact, contain multiple lines if -# the entirety was eval'd as a single unit following the `edit` command). -# -# A line of code is a tuple, which consists of a line and a line number. A -# `LOC` object's state (namely, the line parameter) can be changed via -# instance methods. `Pry::Code` heavily uses this class. -# -# @api private -# @example -# loc = LOC.new("def example\n :example\nend", 1) -# puts loc.line -# def example -# :example -# end -# #=> nil -# -# loc.indent(3) -# loc.line #=> " def example\n :example\nend" -# -# source://pry//lib/pry/code/loc.rb#23 -class Pry::Code::LOC - # @api private - # @param line [String] The line of code. - # @param lineno [Integer] The position of the +line+. - # @return [LOC] a new instance of LOC - # - # source://pry//lib/pry/code/loc.rb#29 - def initialize(line, lineno); end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/code/loc.rb#34 - def ==(other); end - - # Prepends the line number `lineno` to the `line`. - # - # @api private - # @param max_width [Integer] - # @return [void] - # - # source://pry//lib/pry/code/loc.rb#64 - def add_line_number(max_width = T.unsafe(nil), color = T.unsafe(nil)); end - - # Prepends a marker "=>" or an empty marker to the +line+. - # - # @api private - # @param marker_lineno [Integer] If it is equal to the `lineno`, then - # prepend a hashrocket. Otherwise, an empty marker. - # @return [void] - # - # source://pry//lib/pry/code/loc.rb#81 - def add_marker(marker_lineno); end - - # Paints the `line` of code. - # - # @api private - # @param code_type [Symbol] - # @return [void] - # - # source://pry//lib/pry/code/loc.rb#56 - def colorize(code_type); end - - # @api private - # - # source://pry//lib/pry/code/loc.rb#38 - def dup; end - - # @api private - # - # source://pry//lib/pry/code/loc.rb#98 - def handle_multiline_entries_from_edit_command(line, max_width); end - - # Indents the `line` with +distance+ spaces. - # - # @api private - # @param distance [Integer] - # @return [void] - # - # source://pry//lib/pry/code/loc.rb#94 - def indent(distance); end - - # @api private - # @return [String] - # - # source://pry//lib/pry/code/loc.rb#43 - def line; end - - # @api private - # @return [Integer] - # - # source://pry//lib/pry/code/loc.rb#48 - def lineno; end - - # @api private - # @return [Array] - # - # source://pry//lib/pry/code/loc.rb#25 - def tuple; end -end - -# source://pry//lib/pry/code/code_file.rb#6 -class Pry::CodeFile - # @param filename [String] The name of a file with code to be detected - # @param code_type [Symbol] The type of code the `filename` contains - # @return [CodeFile] a new instance of CodeFile - # - # source://pry//lib/pry/code/code_file.rb#41 - def initialize(filename, code_type = T.unsafe(nil)); end - - # @return [String] The code contained in the current `@filename`. - # - # source://pry//lib/pry/code/code_file.rb#47 - def code; end - - # @return [Symbol] The type of code stored in this wrapper. - # - # source://pry//lib/pry/code/code_file.rb#37 - def code_type; end - - private - - # @raise [MethodSource::SourceNotFoundError] if the `filename` is not - # readable for some reason. - # @return [String] absolute path for the given `filename`. - # - # source://pry//lib/pry/code/code_file.rb#64 - def abs_path; end - - # @return [Array] All the paths that contain code that Pry can use for its - # API's. Skips directories. - # - # source://pry//lib/pry/code/code_file.rb#80 - def code_path; end - - # @return [String] - # - # source://pry//lib/pry/code/code_file.rb#110 - def from_load_path; end - - # @return [String] - # - # source://pry//lib/pry/code/code_file.rb#105 - def from_pry_init_pwd; end - - # @return [String] - # - # source://pry//lib/pry/code/code_file.rb#100 - def from_pwd; end - - # @param path [String] - # @return [Boolean] if the path, with or without the default ext, - # is a readable file then `true`, otherwise `false`. - # - # source://pry//lib/pry/code/code_file.rb#73 - def readable?(path); end - - # @param filename [String] - # @param default [Symbol] (:unknown) the file type to assume if none could be - # detected. - # @return [Symbol, nil] The SyntaxHighlighter type of a file from its - # extension, or `nil` if `:unknown`. - # - # source://pry//lib/pry/code/code_file.rb#89 - def type_from_filename(filename, default = T.unsafe(nil)); end -end - -# source://pry//lib/pry/code/code_file.rb#7 -Pry::CodeFile::DEFAULT_EXT = T.let(T.unsafe(nil), String) - -# List of all supported languages. -# -# @return [Hash] -# -# source://pry//lib/pry/code/code_file.rb#11 -Pry::CodeFile::EXTENSIONS = T.let(T.unsafe(nil), Hash) - -# source://pry//lib/pry/code/code_file.rb#28 -Pry::CodeFile::FILES = T.let(T.unsafe(nil), Hash) - -# Store the current working directory. This allows show-source etc. to work if -# your process has changed directory since boot. [Issue #675] -# -# source://pry//lib/pry/code/code_file.rb#34 -Pry::CodeFile::INITIAL_PWD = T.let(T.unsafe(nil), String) - -# This class is responsible for taking a string (identifying a -# command/class/method/etc) and returning the relevant type of object. -# For example, if the user looks up "show-source" then a -# `Pry::Command` will be returned. Alternatively, if the user passes in "Pry#repl" then -# a `Pry::Method` object will be returned. -# -# The `CodeObject.lookup` method is responsible for 1. figuring out what kind of -# object the user wants (applying precedence rules in doing so -- i.e methods -# get precedence over commands with the same name) and 2. Returning -# the appropriate object. If the user fails to provide a string -# identifer for the object (i.e they pass in `nil` or "") then the -# object looked up will be the 'current method' or 'current class' -# associated with the Binding. -# -# TODO: This class is a clusterfuck. We need a much more robust -# concept of what a "Code Object" really is. Currently -# commands/classes/candidates/methods and so on just share a very -# ill-defined interface. -# -# source://pry//lib/pry/code_object.rb#22 -class Pry::CodeObject - include ::Pry::Helpers::OptionsHelpers - include ::Pry::Helpers::CommandHelpers - - # @return [CodeObject] a new instance of CodeObject - # - # source://pry//lib/pry/code_object.rb#82 - def initialize(str, pry_instance, options = T.unsafe(nil)); end - - # TODO: just make it so find_command_by_match_or_listing doesn't raise? - # - # source://pry//lib/pry/code_object.rb#94 - def command_lookup; end - - # lookup variables and constants and `self` that are not modules - # - # source://pry//lib/pry/code_object.rb#118 - def default_lookup; end - - # when no paramter is given (i.e CodeObject.lookup(nil)), then we - # lookup the 'current object' from the binding. - # - # source://pry//lib/pry/code_object.rb#102 - def empty_lookup; end - - # source://pry//lib/pry/code_object.rb#136 - def method_or_class_lookup; end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/code_object.rb#79 - def pry_instance; end - - # Sets the attribute pry_instance - # - # @param value the value to set the attribute pry_instance to. - # - # source://pry//lib/pry/code_object.rb#79 - def pry_instance=(_arg0); end - - # Returns the value of attribute str. - # - # source://pry//lib/pry/code_object.rb#77 - def str; end - - # Sets the attribute str - # - # @param value the value to set the attribute str to. - # - # source://pry//lib/pry/code_object.rb#77 - def str=(_arg0); end - - # Returns the value of attribute super_level. - # - # source://pry//lib/pry/code_object.rb#80 - def super_level; end - - # Sets the attribute super_level - # - # @param value the value to set the attribute super_level to. - # - # source://pry//lib/pry/code_object.rb#80 - def super_level=(_arg0); end - - # Returns the value of attribute target. - # - # source://pry//lib/pry/code_object.rb#78 - def target; end - - # Sets the attribute target - # - # @param value the value to set the attribute target to. - # - # source://pry//lib/pry/code_object.rb#78 - def target=(_arg0); end - - private - - # Returns true if `str` looks like a method, i.e Klass#method - # We need to consider this case because method lookups should fall - # through to the `method_or_class_lookup()` method but a - # defined?() on a "Klass#method` string will see the `#` as a - # comment and only evaluate the `Klass` part. - # - # @param str [String] - # @return [Boolean] Whether the string looks like an instance method. - # - # source://pry//lib/pry/code_object.rb#163 - def looks_like_an_instance_method?(str); end - - # grab the nth (`super_level`) super of `obj - # - # @param obj [Object] - # @param super_level [Fixnum] How far up the super chain to ascend. - # @raise [Pry::CommandError] - # - # source://pry//lib/pry/code_object.rb#188 - def lookup_super(obj, super_level); end - - # We use this method to decide whether code is safe to eval. Method's are - # generally not, but everything else is. - # TODO: is just checking != "method" enough?? - # TODO: see duplication of this method in Pry::WrappedModule - # - # @param str [String] The string to lookup - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#173 - def safe_to_evaluate?(str); end - - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#152 - def sourcable_object?(obj); end - - # source://pry//lib/pry/code_object.rb#181 - def target_self; end - - class << self - # source://pry//lib/pry/code_object.rb#69 - def lookup(str, pry_instance, options = T.unsafe(nil)); end - end -end - -# source://pry//lib/pry/code_object.rb#23 -module Pry::CodeObject::Helpers - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#30 - def c_method?; end - - # @note If a module defined by C was extended with a lot of methods written - # in Ruby, this method would fail. - # @return [Boolean] `true` if this module was defined by means of the C API, - # `false` if it's a Ruby module. - # - # source://pry//lib/pry/code_object.rb#46 - def c_module?; end - - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#38 - def command?; end - - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#34 - def module_with_yard_docs?; end - - # we need this helper as some Pry::Method objects can wrap Procs - # - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#26 - def real_method_object?; end -end - -# PP subclass for streaming inspect output in color. -# -# source://pry//lib/pry/color_printer.rb#8 -class Pry::ColorPrinter < ::PP - # source://pry//lib/pry/color_printer.rb#25 - def pp(object); end - - # source://pry//lib/pry/color_printer.rb#37 - def text(str, max_width = T.unsafe(nil)); end - - private - - # source://pry//lib/pry/color_printer.rb#49 - def highlight_object_literal(object_literal); end - - # source://pry//lib/pry/color_printer.rb#55 - def inspect_object(object); end - - class << self - # source://pry//lib/pry/color_printer.rb#11 - def default(_output, value, pry_instance); end - - # source://pry//lib/pry/color_printer.rb#18 - def pp(obj, output = T.unsafe(nil), max_width = T.unsafe(nil)); end - end -end - -# N.B. using a regular expresion here so that "raise-up 'foo'" does the right thing. -# -# source://pry//lib/pry/command.rb#11 -class Pry::Command - include ::Pry::Helpers::BaseHelpers - include ::Pry::Helpers::OptionsHelpers - include ::Pry::Helpers::CommandHelpers - include ::Pry::Helpers::Text - extend ::Pry::Helpers::DocumentationHelpers - extend ::Pry::CodeObject::Helpers - - # Instantiate a command, in preparation for calling it. - # - # @param context [Hash] The runtime context to use with this command. - # @return [Command] a new instance of Command - # - # source://pry//lib/pry/command.rb#230 - def initialize(context = T.unsafe(nil)); end - - # source://pry//lib/pry/command.rb#292 - def _pry_; end - - # Sets the attribute pry_instance - # - # @param value the value to set the attribute pry_instance to. - # - # source://pry//lib/pry/command.rb#217 - def _pry_=(_arg0); end - - # Returns the value of attribute arg_string. - # - # source://pry//lib/pry/command.rb#213 - def arg_string; end - - # Sets the attribute arg_string - # - # @param value the value to set the attribute arg_string to. - # - # source://pry//lib/pry/command.rb#213 - def arg_string=(_arg0); end - - # source://pry//lib/pry/command.rb#253 - def block; end - - # Returns the value of attribute captures. - # - # source://pry//lib/pry/command.rb#211 - def captures; end - - # Sets the attribute captures - # - # @param value the value to set the attribute captures to. - # - # source://pry//lib/pry/command.rb#211 - def captures=(_arg0); end - - # Display a warning if a command collides with a local/method in - # the current scope. - # - # source://pry//lib/pry/command.rb#329 - def check_for_command_collision(command_match, arg_string); end - - # The block we pass *into* a command so long as `:takes_block` is - # not equal to `false` - # - # @example - # my-command | do - # puts "block content" - # end - # - # source://pry//lib/pry/command.rb#226 - def command_block; end - - # The block we pass *into* a command so long as `:takes_block` is - # not equal to `false` - # - # @example - # my-command | do - # puts "block content" - # end - # - # source://pry//lib/pry/command.rb#226 - def command_block=(_arg0); end - - # source://pry//lib/pry/command.rb#261 - def command_name; end - - # source://pry//lib/pry/command.rb#257 - def command_options; end - - # Returns the value of attribute command_set. - # - # source://pry//lib/pry/command.rb#215 - def command_set; end - - # Sets the attribute command_set - # - # @param value the value to set the attribute command_set to. - # - # source://pry//lib/pry/command.rb#215 - def command_set=(_arg0); end - - # source://pry//lib/pry/command.rb#284 - def commands; end - - # Generate completions for this command - # - # @param _search [String] The line typed so far - # @return [Array] Completion words - # - # source://pry//lib/pry/command.rb#411 - def complete(_search); end - - # Returns the value of attribute context. - # - # source://pry//lib/pry/command.rb#214 - def context; end - - # Sets the attribute context - # - # @param value the value to set the attribute context to. - # - # source://pry//lib/pry/command.rb#214 - def context=(_arg0); end - - # source://pry//lib/pry/command.rb#249 - def description; end - - # Returns the value of attribute eval_string. - # - # source://pry//lib/pry/command.rb#212 - def eval_string; end - - # Sets the attribute eval_string - # - # @param value the value to set the attribute eval_string to. - # - # source://pry//lib/pry/command.rb#212 - def eval_string=(_arg0); end - - # Returns the value of attribute hooks. - # - # source://pry//lib/pry/command.rb#216 - def hooks; end - - # Sets the attribute hooks - # - # @param value the value to set the attribute hooks to. - # - # source://pry//lib/pry/command.rb#216 - def hooks=(_arg0); end - - # Revaluate the string (str) and perform interpolation. - # - # @param str [String] The string to reevaluate with interpolation. - # @return [String] The reevaluated string with interpolations - # applied (if any). - # - # source://pry//lib/pry/command.rb#318 - def interpolate_string(str); end - - # source://pry//lib/pry/command.rb#245 - def match; end - - # Make those properties accessible to instances - # - # source://pry//lib/pry/command.rb#241 - def name; end - - # Properties of one execution of a command (passed by {Pry#run_command} as a hash of - # context and expanded in `#initialize` - # - # source://pry//lib/pry/command.rb#209 - def output; end - - # Properties of one execution of a command (passed by {Pry#run_command} as a hash of - # context and expanded in `#initialize` - # - # source://pry//lib/pry/command.rb#209 - def output=(_arg0); end - - # Process a line that Command.matches? this command. - # - # @param line [String] The line to process - # @return [Object, Command::VOID_VALUE] - # - # source://pry//lib/pry/command.rb#394 - def process_line(line); end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/command.rb#217 - def pry_instance; end - - # Sets the attribute pry_instance - # - # @param value the value to set the attribute pry_instance to. - # - # source://pry//lib/pry/command.rb#217 - def pry_instance=(_arg0); end - - # Run a command from another command. - # - # @example - # run "show-input" - # @example - # run ".ls" - # @example - # run "amend-line", "5", 'puts "hello world"' - # @param command_string [String] The string that invokes the command - # @param args [Array] Further arguments to pass to the command - # - # source://pry//lib/pry/command.rb#278 - def run(command_string, *args); end - - # source://pry//lib/pry/command.rb#265 - def source; end - - # @example - # state.my_state = "my state" # this will not conflict with any - # # `state.my_state` used in another command. - # @return [Hash] Pry commands can store arbitrary state - # here. This state persists between subsequent command invocations. - # All state saved here is unique to the command, it does not - # need to be namespaced. - # - # source://pry//lib/pry/command.rb#309 - def state; end - - # Returns the value of attribute target. - # - # source://pry//lib/pry/command.rb#210 - def target; end - - # Sets the attribute target - # - # @param value the value to set the attribute target to. - # - # source://pry//lib/pry/command.rb#210 - def target=(_arg0); end - - # @return [Object] The value of `self` inside the `target` binding. - # - # source://pry//lib/pry/command.rb#298 - def target_self; end - - # Extract necessary information from a line that Command.matches? this - # command. - # - # Returns an array of four elements: - # - # ``` - # [String] the portion of the line that matched with the Command match - # [String] a string of all the arguments (i.e. everything but the match) - # [Array] the captures caught by the command_regex - # [Array] the arguments obtained by splitting the arg_string - # ``` - # - # @param val [String] The line of input - # @return [Array] - # - # source://pry//lib/pry/command.rb#356 - def tokenize(val); end - - # source://pry//lib/pry/command.rb#288 - def void; end - - private - - # source://pry//lib/pry/command.rb#485 - def after_hooks; end - - # source://pry//lib/pry/command.rb#481 - def before_hooks; end - - # Run the command with the given `args`. - # - # This is a public wrapper around `#call` which ensures all preconditions - # are met. - # - # @param args [Array] The arguments to pass to this command. - # @return [Object] The return value of the `#call` method, or - # {Command::VOID_VALUE}. - # - # source://pry//lib/pry/command.rb#425 - def call_safely(*args); end - - # Run the `#call` method and all the registered hooks. - # - # @param args [Array] The arguments to `#call` - # @return [Object] The return value from `#call` - # - # source://pry//lib/pry/command.rb#492 - def call_with_hooks(*args); end - - # source://pry//lib/pry/command.rb#476 - def find_hooks(event); end - - # Normalize method arguments according to its arity. - # - # @param method [Integer] - # @param args [Array] - # @return [Array] a (possibly shorter) array of the arguments to pass - # - # source://pry//lib/pry/command.rb#509 - def normalize_method_args(method, args); end - - # Pass a block argument to a command. - # - # @param arg_string [String] The arguments (as a string) passed to the command. - # We inspect these for a '| do' or a '| {' and if we find it we use it - # to start a block input sequence. Once we have a complete - # block, we save it to an accessor that can be retrieved from the command context. - # Note that if we find the '| do' or '| {' we delete this and the - # elements following it from `arg_string`. - # - # source://pry//lib/pry/command.rb#451 - def pass_block(arg_string); end - - # source://pry//lib/pry/command.rb#436 - def use_unpatched_symbol; end - - class << self - # Define or get the command's banner - # - # source://pry//lib/pry/command.rb#61 - def banner(arg = T.unsafe(nil)); end - - # source://pry//lib/pry/command.rb#66 - def block; end - - # Sets the attribute block - # - # @param value the value to set the attribute block to. - # - # source://pry//lib/pry/command.rb#30 - def block=(_arg0); end - - # source://pry//lib/pry/command.rb#109 - def command_name; end - - # Define or get the command's options - # - # source://pry//lib/pry/command.rb#51 - def command_options(arg = T.unsafe(nil)); end - - # Sets the attribute command_options - # - # @param value the value to set the attribute command_options to. - # - # source://pry//lib/pry/command.rb#32 - def command_options=(_arg0); end - - # source://pry//lib/pry/command.rb#165 - def command_regex; end - - # source://pry//lib/pry/command.rb#172 - def convert_to_regex(obj); end - - # source://pry//lib/pry/command.rb#89 - def default_options(match); end - - # Define or get the command's description - # - # source://pry//lib/pry/command.rb#45 - def description(arg = T.unsafe(nil)); end - - # Sets the attribute description - # - # @param value the value to set the attribute description to. - # - # source://pry//lib/pry/command.rb#31 - def description=(_arg0); end - - # source://pry//lib/pry/command.rb#75 - def doc; end - - # source://pry//lib/pry/command.rb#79 - def file; end - - # The group in which the command should be displayed in "help" output. - # This is usually auto-generated from directory naming, but it can be - # manually overridden if necessary. - # Group should not be changed once it is initialized. - # - # source://pry//lib/pry/command.rb#185 - def group(name = T.unsafe(nil)); end - - # source://pry//lib/pry/command.rb#105 - def inspect; end - - # source://pry//lib/pry/command.rb#84 - def line; end - - # source://pry//lib/pry/command.rb#35 - def match(arg = T.unsafe(nil)); end - - # Sets the attribute match - # - # @param value the value to set the attribute match to. - # - # source://pry//lib/pry/command.rb#33 - def match=(_arg0); end - - # How well does this command match the given line? - # - # Higher scores are better because they imply that this command matches - # the line more closely. - # - # The score is calculated by taking the number of characters at the start - # of the string that are used only to identify the command, not as part of - # the arguments. - # - # @example - # /\.(.*)/.match_score(".foo") #=> 1 - # /\.*(.*)/.match_score("...foo") #=> 3 - # 'hi'.match_score("hi there") #=> 2 - # @param val [String] A line input at the REPL - # @return [Fixnum] - # - # source://pry//lib/pry/command.rb#153 - def match_score(val); end - - # Should this command be called for the given line? - # - # @param val [String] A line input at the REPL - # @return [Boolean] - # - # source://pry//lib/pry/command.rb#133 - def matches?(val); end - - # source://pry//lib/pry/command.rb#101 - def name; end - - # Define or get the command's options - # backward compatibility - # - # source://pry//lib/pry/command.rb#51 - def options(arg = T.unsafe(nil)); end - - # Sets the attribute command_options - # - # @param value the value to set the attribute command_options to. - # - # source://pry//lib/pry/command.rb#32 - def options=(_arg0); end - - # source://pry//lib/pry/command.rb#70 - def source; end - - # source://pry//lib/pry/command.rb#79 - def source_file; end - - # source://pry//lib/pry/command.rb#84 - def source_line; end - - # source://pry//lib/pry/command.rb#202 - def state; end - - # Create a new command with the given properties. - # - # @param match [String, Regex] The thing that triggers this command - # @param description [String] The description to appear in `help` - # @param options [Hash] Behavioral options (see {Pry::CommandSet#command}) - # @param helpers [Module] A module of helper functions to be included. - # @return [Class] (a subclass of {Pry::Command}) - # @yield optional, used for BlockCommands - # - # source://pry//lib/pry/command.rb#120 - def subclass(match, description, options, helpers, &block); end - end -end - -# source://pry//lib/pry/commands/amend_line.rb#5 -class Pry::Command::AmendLine < ::Pry::ClassCommand - # @raise [CommandError] - # - # source://pry//lib/pry/commands/amend_line.rb#22 - def process; end - - private - - # @return [String] A new string with the amendments applied to it. - # - # source://pry//lib/pry/commands/amend_line.rb#33 - def amend_input; end - - # source://pry//lib/pry/commands/amend_line.rb#47 - def delete_from_array(array, range); end - - # source://pry//lib/pry/commands/amend_line.rb#51 - def insert_into_array(array, range); end - - # @return [Fixnum] The number of lines currently in `eval_string` (the - # input buffer) - # - # source://pry//lib/pry/commands/amend_line.rb#62 - def line_count; end - - # The lines (or line) that will be modified by the `amend-line`. - # - # @return [Range, Fixnum] The lines or line. - # - # source://pry//lib/pry/commands/amend_line.rb#90 - def line_range; end - - # source://pry//lib/pry/commands/amend_line.rb#56 - def replace_in_array(array, range); end - - # Returns the (one-indexed) start and end lines given by the user. - # The lines in this range will be affected by the `amend-line`. - # Returns `nil` if no lines were specified by the user. - # - # @return [Array, nil] - # - # source://pry//lib/pry/commands/amend_line.rb#70 - def start_and_end_line_number; end - - # Takes two numbers that are 1-indexed, and returns a range (or - # number) that is 0-indexed. 1-indexed means the first element is - # indentified by 1 rather than by 0 (as is the case for Ruby arrays). - # - # @param start_line_number [Fixnum] One-indexed number. - # @param end_line_number [Fixnum] One-indexed number. - # @return [Range] The zero-indexed range. - # - # source://pry//lib/pry/commands/amend_line.rb#83 - def zero_indexed_range_from_one_indexed_numbers(start_line_number, end_line_number); end -end - -# source://pry//lib/pry/commands/bang.rb#5 -class Pry::Command::Bang < ::Pry::ClassCommand - # source://pry//lib/pry/commands/bang.rb#16 - def process; end -end - -# source://pry//lib/pry/commands/bang_pry.rb#5 -class Pry::Command::BangPry < ::Pry::ClassCommand - # source://pry//lib/pry/commands/bang_pry.rb#14 - def process; end -end - -# source://pry//lib/pry/commands/cat.rb#5 -class Pry::Command::Cat < ::Pry::ClassCommand - # source://pry//lib/pry/commands/cat.rb#53 - def complete(search); end - - # source://pry//lib/pry/commands/cat.rb#57 - def load_path_completions; end - - # source://pry//lib/pry/commands/cat.rb#23 - def options(opt); end - - # source://pry//lib/pry/commands/cat.rb#38 - def process; end -end - -# source://pry//lib/pry/commands/cat/abstract_formatter.rb#6 -class Pry::Command::Cat::AbstractFormatter - include ::Pry::Helpers::OptionsHelpers - include ::Pry::Helpers::CommandHelpers - include ::Pry::Helpers::BaseHelpers - - private - - # source://pry//lib/pry/commands/cat/abstract_formatter.rb#26 - def between_lines; end - - # source://pry//lib/pry/commands/cat/abstract_formatter.rb#18 - def code_type; end - - # source://pry//lib/pry/commands/cat/abstract_formatter.rb#12 - def decorate(content); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/cat/abstract_formatter.rb#22 - def use_line_numbers?; end -end - -# source://pry//lib/pry/commands/cat/exception_formatter.rb#6 -class Pry::Command::Cat::ExceptionFormatter < ::Pry::Command::Cat::AbstractFormatter - include ::Pry::Helpers::Text - - # @return [ExceptionFormatter] a new instance of ExceptionFormatter - # - # source://pry//lib/pry/commands/cat/exception_formatter.rb#12 - def initialize(exception, pry_instance, opts); end - - # Returns the value of attribute ex. - # - # source://pry//lib/pry/commands/cat/exception_formatter.rb#7 - def ex; end - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#18 - def format; end - - # Returns the value of attribute opts. - # - # source://pry//lib/pry/commands/cat/exception_formatter.rb#8 - def opts; end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/commands/cat/exception_formatter.rb#9 - def pry_instance; end - - private - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#56 - def backtrace_file; end - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#37 - def backtrace_level; end - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#60 - def backtrace_line; end - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/cat/exception_formatter.rb#64 - def check_for_errors; end - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#33 - def code_window_size; end - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#78 - def header; end - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#52 - def increment_backtrace_level; end - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#71 - def start_and_end_line_for_code_window; end -end - -# source://pry//lib/pry/commands/cat/file_formatter.rb#6 -class Pry::Command::Cat::FileFormatter < ::Pry::Command::Cat::AbstractFormatter - # @return [FileFormatter] a new instance of FileFormatter - # - # source://pry//lib/pry/commands/cat/file_formatter.rb#11 - def initialize(file_with_embedded_line, pry_instance, opts); end - - # source://pry//lib/pry/commands/cat/file_formatter.rb#27 - def file_and_line; end - - # Returns the value of attribute file_with_embedded_line. - # - # source://pry//lib/pry/commands/cat/file_formatter.rb#7 - def file_with_embedded_line; end - - # source://pry//lib/pry/commands/cat/file_formatter.rb#22 - def format; end - - # Returns the value of attribute opts. - # - # source://pry//lib/pry/commands/cat/file_formatter.rb#8 - def opts; end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/commands/cat/file_formatter.rb#9 - def pry_instance; end - - private - - # source://pry//lib/pry/commands/cat/file_formatter.rb#55 - def code_type; end - - # source://pry//lib/pry/commands/cat/file_formatter.rb#43 - def code_window_size; end - - # source://pry//lib/pry/commands/cat/file_formatter.rb#47 - def decorate(content); end - - # source://pry//lib/pry/commands/cat/file_formatter.rb#59 - def detect_code_type_from_file(file_name); end - - # source://pry//lib/pry/commands/cat/file_formatter.rb#35 - def file_name; end - - # source://pry//lib/pry/commands/cat/file_formatter.rb#39 - def line_number; end -end - -# source://pry//lib/pry/commands/cat/input_expression_formatter.rb#6 -class Pry::Command::Cat::InputExpressionFormatter < ::Pry::Command::Cat::AbstractFormatter - # @return [InputExpressionFormatter] a new instance of InputExpressionFormatter - # - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#10 - def initialize(input_expressions, opts); end - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#15 - def format; end - - # Returns the value of attribute input_expressions. - # - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#7 - def input_expressions; end - - # Sets the attribute input_expressions - # - # @param value the value to set the attribute input_expressions to. - # - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#7 - def input_expressions=(_arg0); end - - # Returns the value of attribute opts. - # - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#8 - def opts; end - - # Sets the attribute opts - # - # @param value the value to set the attribute opts to. - # - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#8 - def opts=(_arg0); end - - private - - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#42 - def normalized_expression_range; end - - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#37 - def numbered_input_items; end - - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#33 - def selected_input_items; end -end - -# source://pry//lib/pry/commands/cd.rb#5 -class Pry::Command::Cd < ::Pry::ClassCommand - # source://pry//lib/pry/commands/cd.rb#25 - def process; end -end - -# source://pry//lib/pry/commands/change_inspector.rb#5 -class Pry::Command::ChangeInspector < ::Pry::ClassCommand - # source://pry//lib/pry/commands/change_inspector.rb#17 - def process(inspector); end - - private - - # source://pry//lib/pry/commands/change_inspector.rb#28 - def inspector_map; end -end - -# source://pry//lib/pry/commands/change_prompt.rb#5 -class Pry::Command::ChangePrompt < ::Pry::ClassCommand - # source://pry//lib/pry/commands/change_prompt.rb#16 - def options(opt); end - - # source://pry//lib/pry/commands/change_prompt.rb#20 - def process(prompt); end - - private - - # source://pry//lib/pry/commands/change_prompt.rb#38 - def change_prompt(prompt); end - - # source://pry//lib/pry/commands/change_prompt.rb#30 - def list_prompts; end -end - -# source://pry//lib/pry/commands/clear_screen.rb#5 -class Pry::Command::ClearScreen < ::Pry::ClassCommand - # source://pry//lib/pry/commands/clear_screen.rb#10 - def process; end -end - -# source://pry//lib/pry/commands/code_collector.rb#5 -class Pry::Command::CodeCollector - include ::Pry::Helpers::OptionsHelpers - include ::Pry::Helpers::CommandHelpers - - # @return [CodeCollector] a new instance of CodeCollector - # - # source://pry//lib/pry/commands/code_collector.rb#23 - def initialize(args, opts, pry_instance); end - - # Returns the value of attribute args. - # - # source://pry//lib/pry/commands/code_collector.rb#8 - def args; end - - # The code object - # - # @return [Pry::WrappedModule, Pry::Method, Pry::Command] - # - # source://pry//lib/pry/commands/code_collector.rb#86 - def code_object; end - - # The content (i.e code/docs) for the selected object. - # If the user provided a bare code object, it returns the source. - # If the user provided the `-i` or `-o` switches, it returns the - # selected input/output lines joined as a string. If the user used - # `-d CODE_OBJECT` it returns the docs for that code object. - # - # @return [String] - # - # source://pry//lib/pry/commands/code_collector.rb#60 - def content; end - - # The name of the explicitly given file (if any). - # - # source://pry//lib/pry/commands/code_collector.rb#13 - def file; end - - # The name of the explicitly given file (if any). - # - # source://pry//lib/pry/commands/code_collector.rb#13 - def file=(_arg0); end - - # The line range passed to `--lines`, converted to a 0-indexed range. - # - # source://pry//lib/pry/commands/code_collector.rb#123 - def line_range; end - - # Name of the object argument - # - # source://pry//lib/pry/commands/code_collector.rb#128 - def obj_name; end - - # Returns the value of attribute opts. - # - # source://pry//lib/pry/commands/code_collector.rb#9 - def opts; end - - # The selected `pry_instance.input_ring` as a string, as specified by - # the `-i` switch. - # - # @return [String] - # - # source://pry//lib/pry/commands/code_collector.rb#116 - def pry_input_content; end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/commands/code_collector.rb#10 - def pry_instance; end - - # The selected `pry_instance.output_ring` as a string, as specified by - # the `-o` switch. - # - # @return [String] - # - # source://pry//lib/pry/commands/code_collector.rb#104 - def pry_output_content; end - - # Given a string and a range, return the `range` lines of that - # string. - # - # @param content [String] - # @param range [Range, Fixnum] - # @return [String] The string restricted to the given range - # - # source://pry//lib/pry/commands/code_collector.rb#96 - def restrict_to_lines(content, range); end - - private - - # @return [Boolean] - # - # source://pry//lib/pry/commands/code_collector.rb#134 - def bad_option_combination?; end - - # source://pry//lib/pry/commands/code_collector.rb#153 - def code_object_doc; end - - # source://pry//lib/pry/commands/code_collector.rb#157 - def code_object_source_or_file; end - - # source://pry//lib/pry/commands/code_collector.rb#175 - def convert_to_range(range); end - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/code_collector.rb#171 - def could_not_locate(name); end - - # source://pry//lib/pry/commands/code_collector.rb#161 - def file_content; end - - # source://pry//lib/pry/commands/code_collector.rb#139 - def pry_array_content_as_string(array, ranges); end - - class << self - # Add the `--lines`, `-o`, `-i`, `-s`, `-d` options. - # - # source://pry//lib/pry/commands/code_collector.rb#30 - def inject_options(opt); end - - # Returns the value of attribute input_expression_ranges. - # - # source://pry//lib/pry/commands/code_collector.rb#16 - def input_expression_ranges; end - - # Sets the attribute input_expression_ranges - # - # @param value the value to set the attribute input_expression_ranges to. - # - # source://pry//lib/pry/commands/code_collector.rb#16 - def input_expression_ranges=(_arg0); end - - # Returns the value of attribute output_result_ranges. - # - # source://pry//lib/pry/commands/code_collector.rb#17 - def output_result_ranges; end - - # Sets the attribute output_result_ranges - # - # @param value the value to set the attribute output_result_ranges to. - # - # source://pry//lib/pry/commands/code_collector.rb#17 - def output_result_ranges=(_arg0); end - end -end - -# source://pry//lib/pry/commands/disable_pry.rb#5 -class Pry::Command::DisablePry < ::Pry::ClassCommand - # source://pry//lib/pry/commands/disable_pry.rb#23 - def process; end -end - -# source://pry//lib/pry/commands/edit.rb#5 -class Pry::Command::Edit < ::Pry::ClassCommand - # source://pry//lib/pry/commands/edit.rb#89 - def apply_runtime_patch; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#172 - def bad_option_combination?; end - - # source://pry//lib/pry/commands/edit.rb#152 - def code_object; end - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/edit.rb#105 - def ensure_file_name_is_valid(file_name); end - - # source://pry//lib/pry/commands/edit.rb#119 - def file_and_line; end - - # source://pry//lib/pry/commands/edit.rb#115 - def file_and_line_for_current_exception; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#78 - def file_based_exception?; end - - # source://pry//lib/pry/commands/edit.rb#135 - def file_edit; end - - # source://pry//lib/pry/commands/edit.rb#148 - def filename_argument; end - - # source://pry//lib/pry/commands/edit.rb#203 - def initial_temp_file_content; end - - # source://pry//lib/pry/commands/edit.rb#180 - def input_expression; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#195 - def never_reload?; end - - # source://pry//lib/pry/commands/edit.rb#25 - def options(opt); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#168 - def patch_exception?; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#163 - def previously_patched?(code_object); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#215 - def probably_a_file?(str); end - - # source://pry//lib/pry/commands/edit.rb#46 - def process; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#158 - def pry_method?(code_object); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#199 - def reload?(file_name = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#191 - def reloadable?; end - - # source://pry//lib/pry/commands/edit.rb#69 - def repl_edit; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#64 - def repl_edit?; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#82 - def runtime_patch?; end -end - -# source://pry//lib/pry/commands/edit/exception_patcher.rb#6 -class Pry::Command::Edit::ExceptionPatcher - # @return [ExceptionPatcher] a new instance of ExceptionPatcher - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#11 - def initialize(pry_instance, state, exception_file_and_line); end - - # Returns the value of attribute file_and_line. - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#9 - def file_and_line; end - - # Sets the attribute file_and_line - # - # @param value the value to set the attribute file_and_line to. - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#9 - def file_and_line=(_arg0); end - - # perform the patch - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#18 - def perform_patch; end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#7 - def pry_instance; end - - # Sets the attribute pry_instance - # - # @param value the value to set the attribute pry_instance to. - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#7 - def pry_instance=(_arg0); end - - # Returns the value of attribute state. - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#8 - def state; end - - # Sets the attribute state - # - # @param value the value to set the attribute state to. - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#8 - def state=(_arg0); end -end - -# source://pry//lib/pry/commands/edit/file_and_line_locator.rb#6 -module Pry::Command::Edit::FileAndLineLocator - class << self - # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#8 - def from_binding(target); end - - # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#16 - def from_code_object(code_object, filename_argument); end - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#24 - def from_exception(exception, backtrace_level); end - - # when file and line are passed as a single arg, e.g my_file.rb:30 - # - # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#38 - def from_filename_argument(filename_argument); end - end -end - -# source://pry//lib/pry/commands/exit.rb#5 -class Pry::Command::Exit < ::Pry::ClassCommand - # source://pry//lib/pry/commands/exit.rb#25 - def process; end - - # source://pry//lib/pry/commands/exit.rb#34 - def process_pop_and_return; end -end - -# source://pry//lib/pry/commands/exit_all.rb#5 -class Pry::Command::ExitAll < ::Pry::ClassCommand - # source://pry//lib/pry/commands/exit_all.rb#18 - def process; end -end - -# source://pry//lib/pry/commands/exit_program.rb#5 -class Pry::Command::ExitProgram < ::Pry::ClassCommand - # source://pry//lib/pry/commands/exit_program.rb#18 - def process; end -end - -# source://pry//lib/pry/commands/find_method.rb#5 -class Pry::Command::FindMethod < ::Pry::ClassCommand - extend ::Pry::Helpers::BaseHelpers - - # source://pry//lib/pry/commands/find_method.rb#31 - def options(opt); end - - # source://pry//lib/pry/commands/find_method.rb#36 - def process; end - - private - - # Return the matched lines of method source if `-c` is given or "" - # if `-c` was not given - # - # source://pry//lib/pry/commands/find_method.rb#100 - def additional_info(header, method); end - - # Search for all methods who's implementation matches the given regex - # within a namespace. - # - # @param namespace [Module] The namespace to search - # @return [Array] - # - # source://pry//lib/pry/commands/find_method.rb#186 - def content_search(namespace); end - - # source://pry//lib/pry/commands/find_method.rb#108 - def matched_method_lines(header, method); end - - # Search for all methods with a name that matches the given regex - # within a namespace. - # - # @param namespace [Module] The namespace to search - # @return [Array] - # - # source://pry//lib/pry/commands/find_method.rb#174 - def name_search(namespace); end - - # @return [Regexp] The pattern to search for. - # - # source://pry//lib/pry/commands/find_method.rb#48 - def pattern; end - - # pretty-print a list of matching methods. - # - # @param matches [Array] - # - # source://pry//lib/pry/commands/find_method.rb#80 - def print_matches(matches); end - - # Print matched methods for a class - # - # source://pry//lib/pry/commands/find_method.rb#90 - def print_matches_for_class(klass, grouped); end - - # Run the given block against every constant in the provided namespace. - # - # @param klass [Module] The namespace in which to start the search. - # @param done [Hash] The namespaces we've already visited (private) - # @yieldparam klass Each class/module in the namespace. - # - # source://pry//lib/pry/commands/find_method.rb#120 - def recurse_namespace(klass, done = T.unsafe(nil), &block); end - - # Gather all the methods in a namespace that pass the given block. - # - # @param namespace [Module] The namespace in which to search. - # @return [Array] - # @yieldparam method [Method] The method to test - # @yieldreturn [Boolean] - # - # source://pry//lib/pry/commands/find_method.rb#150 - def search_all_methods(namespace); end - - # The class to search for methods. - # We only search classes, so if the search object is an - # instance, return its class. If no search object is given - # search `target_self`. - # - # source://pry//lib/pry/commands/find_method.rb#67 - def search_class; end - - # Output the result of the search. - # - # @param matches [Array] - # - # source://pry//lib/pry/commands/find_method.rb#55 - def show_search_results(matches); end -end - -# source://pry//lib/pry/commands/fix_indent.rb#5 -class Pry::Command::FixIndent < ::Pry::ClassCommand - # source://pry//lib/pry/commands/fix_indent.rb#15 - def process; end -end - -# source://pry//lib/pry/commands/help.rb#5 -class Pry::Command::Help < ::Pry::ClassCommand - # Get a hash of available commands grouped by the "group" name. - # - # source://pry//lib/pry/commands/help.rb#29 - def command_groups; end - - # Display help for an individual command. - # - # @param command [Pry::Command] - # - # source://pry//lib/pry/commands/help.rb#125 - def display_command(command); end - - # Display help for a searched item, filtered by group - # - # @param search [String] The string to search for. - # @raise [CommandError] - # - # source://pry//lib/pry/commands/help.rb#111 - def display_filtered_commands(search); end - - # Display help for a searched item, filtered first by group - # and if that fails, filtered by command name. - # - # @param search [String] The string to search for. - # - # source://pry//lib/pry/commands/help.rb#98 - def display_filtered_search_results(search); end - - # Display the index view, with headings and short descriptions per command. - # - # @param groups [Hash>] - # - # source://pry//lib/pry/commands/help.rb#44 - def display_index(groups); end - - # Display help for an individual command or group. - # - # @param search [String] The string to search for. - # - # source://pry//lib/pry/commands/help.rb#86 - def display_search(search); end - - # source://pry//lib/pry/commands/help.rb#159 - def group_sort_key(group_name); end - - # Given a group name and an array of commands, - # return the help string for those commands. - # - # @param name [String] The group name. - # @param commands [Array] - # @return [String] The generated help string. - # - # source://pry//lib/pry/commands/help.rb#62 - def help_text_for_commands(name, commands); end - - # Clean search terms to make it easier to search group names - # - # @param key [String] - # @return [String] - # - # source://pry//lib/pry/commands/help.rb#155 - def normalize(key); end - - # source://pry//lib/pry/commands/help.rb#33 - def process; end - - # Find a subset of a hash that matches the user's search term. - # - # If there's an exact match a Hash of one element will be returned, - # otherwise a sub-Hash with every key that matches the search will - # be returned. - # - # @param search [String] the search term - # @param hash [Hash] the hash to search - # - # source://pry//lib/pry/commands/help.rb#137 - def search_hash(search, hash); end - - # Sort an array of commands by their `listing` name. - # - # @param commands [Array] The commands to sort - # @return [Array] commands sorted by listing name. - # - # source://pry//lib/pry/commands/help.rb#79 - def sorted_commands(commands); end - - # @param groups [Hash] - # @return [Array] An array of sorted group names. - # - # source://pry//lib/pry/commands/help.rb#71 - def sorted_group_names(groups); end - - # We only want to show commands that have descriptions, so that the - # easter eggs don't show up. - # - # source://pry//lib/pry/commands/help.rb#20 - def visible_commands; end -end - -# source://pry//lib/pry/commands/hist.rb#5 -class Pry::Command::Hist < ::Pry::ClassCommand - # source://pry//lib/pry/commands/hist.rb#25 - def options(opt); end - - # source://pry//lib/pry/commands/hist.rb#43 - def process; end - - private - - # Checks +replay_sequence+ for the presence of neighboring replay calls. - # - # @example - # [1] pry(main)> hist --show 46894 - # 46894: hist --replay 46675..46677 - # [2] pry(main)> hist --show 46675..46677 - # 46675: 1+1 - # 46676: a = 100 - # 46677: hist --tail - # [3] pry(main)> hist --replay 46894 - # Error: Replay index 46894 points out to another replay call: - # `hist -r 46675..46677` - # [4] pry(main)> - # @param replay_sequence [String] The sequence of commands to be replayed - # (per saltum) - # @raise [Pry::CommandError] If +replay_sequence+ contains another - # "hist --replay" call - # @return [Boolean] `false` if +replay_sequence+ does not contain another - # "hist --replay" call - # - # source://pry//lib/pry/commands/hist.rb#143 - def check_for_juxtaposed_replay(replay_sequence); end - - # Finds history depending on the given switch. - # - # @return [Pry::Code] if it finds `--all` (or `-a`) switch, returns all - # entries in history. Without the switch returns only the entries from the - # current Pry session. - # - # source://pry//lib/pry/commands/hist.rb#168 - def find_history; end - - # source://pry//lib/pry/commands/hist.rb#105 - def process_clear; end - - # source://pry//lib/pry/commands/hist.rb#78 - def process_display; end - - # source://pry//lib/pry/commands/hist.rb#110 - def process_replay; end - - # source://pry//lib/pry/commands/hist.rb#86 - def process_save; end -end - -# source://pry//lib/pry/commands/import_set.rb#5 -class Pry::Command::ImportSet < ::Pry::ClassCommand - # TODO: resolve unused parameter. - # - # @raise [CommandError] - # - # source://pry//lib/pry/commands/import_set.rb#17 - def process(_command_set_name); end -end - -# source://pry//lib/pry/commands/jump_to.rb#5 -class Pry::Command::JumpTo < ::Pry::ClassCommand - # source://pry//lib/pry/commands/jump_to.rb#14 - def process(break_level); end -end - -# source://pry//lib/pry/commands/list_inspectors.rb#5 -class Pry::Command::ListInspectors < ::Pry::ClassCommand - # source://pry//lib/pry/commands/list_inspectors.rb#16 - def process; end - - private - - # source://pry//lib/pry/commands/list_inspectors.rb#28 - def inspector_map; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/list_inspectors.rb#36 - def selected_inspector?(inspector); end - - # source://pry//lib/pry/commands/list_inspectors.rb#32 - def selected_text; end -end - -# source://pry//lib/pry/commands/ls/jruby_hacks.rb#5 -class Pry::Command::Ls < ::Pry::ClassCommand - # Exclude -q, -v and --grep because they, - # don't specify what the user wants to see. - # - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls.rb#85 - def no_user_opts?; end - - # source://pry//lib/pry/commands/ls.rb#52 - def options(opt); end - - # source://pry//lib/pry/commands/ls.rb#90 - def process; end - - private - - # source://pry//lib/pry/commands/ls.rb#106 - def error_list; end - - # source://pry//lib/pry/commands/ls.rb#126 - def raise_errors_if_arguments_are_weird; end -end - -# source://pry//lib/pry/commands/ls/constants.rb#6 -class Pry::Command::Ls::Constants < ::Pry::Command::Ls::Formatter - include ::Pry::Command::Ls::Interrogatable - - # @return [Constants] a new instance of Constants - # - # source://pry//lib/pry/commands/ls/constants.rb#14 - def initialize(interrogatee, no_user_opts, opts, pry_instance); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/constants.rb#23 - def correct_opts?; end - - # source://pry//lib/pry/commands/ls/constants.rb#27 - def output_self; end - - private - - # source://pry//lib/pry/commands/ls/constants.rb#39 - def format(mod, constants); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/constants.rb#35 - def show_deprecated_constants?; end -end - -# source://pry//lib/pry/commands/ls/constants.rb#7 -Pry::Command::Ls::Constants::DEPRECATED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://pry//lib/pry/commands/ls.rb#6 -Pry::Command::Ls::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://pry//lib/pry/commands/ls/formatter.rb#6 -class Pry::Command::Ls::Formatter - # @return [Formatter] a new instance of Formatter - # - # source://pry//lib/pry/commands/ls/formatter.rb#10 - def initialize(pry_instance); end - - # Sets the attribute grep - # - # @param value the value to set the attribute grep to. - # - # source://pry//lib/pry/commands/ls/formatter.rb#7 - def grep=(_arg0); end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/commands/ls/formatter.rb#8 - def pry_instance; end - - # source://pry//lib/pry/commands/ls/formatter.rb#16 - def write_out; end - - private - - # source://pry//lib/pry/commands/ls/formatter.rb#24 - def color(type, str); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/formatter.rb#41 - def correct_opts?; end - - # source://pry//lib/pry/commands/ls/formatter.rb#37 - def format_value(value); end - - # source://pry//lib/pry/commands/ls/formatter.rb#49 - def grep; end - - # Add a new section to the output. - # Outputs nothing if the section would be empty. - # - # source://pry//lib/pry/commands/ls/formatter.rb#30 - def output_section(heading, body); end - - # @raise [NotImplementedError] - # - # source://pry//lib/pry/commands/ls/formatter.rb#45 - def output_self; end -end - -# source://pry//lib/pry/commands/ls/globals.rb#6 -class Pry::Command::Ls::Globals < ::Pry::Command::Ls::Formatter - # @return [Globals] a new instance of Globals - # - # source://pry//lib/pry/commands/ls/globals.rb#24 - def initialize(opts, pry_instance); end - - # source://pry//lib/pry/commands/ls/globals.rb#29 - def output_self; end - - private - - # source://pry//lib/pry/commands/ls/globals.rb#36 - def format(globals); end -end - -# Taken from "puts global_variables.inspect". -# -# source://pry//lib/pry/commands/ls/globals.rb#8 -Pry::Command::Ls::Globals::BUILTIN_GLOBALS = T.let(T.unsafe(nil), Array) - -# `$SAFE` and `$?` are thread-local, the exception stuff only works in a -# rescue clause, everything else is basically a local variable with a `$` -# in its name. -# -# source://pry//lib/pry/commands/ls/globals.rb#19 -Pry::Command::Ls::Globals::PSEUDO_GLOBALS = T.let(T.unsafe(nil), Array) - -# source://pry//lib/pry/commands/ls/grep.rb#6 -class Pry::Command::Ls::Grep - # @return [Grep] a new instance of Grep - # - # source://pry//lib/pry/commands/ls/grep.rb#7 - def initialize(grep_regexp); end - - # source://pry//lib/pry/commands/ls/grep.rb#11 - def regexp; end -end - -# source://pry//lib/pry/commands/ls/instance_vars.rb#6 -class Pry::Command::Ls::InstanceVars < ::Pry::Command::Ls::Formatter - include ::Pry::Command::Ls::Interrogatable - - # @return [InstanceVars] a new instance of InstanceVars - # - # source://pry//lib/pry/commands/ls/instance_vars.rb#9 - def initialize(interrogatee, no_user_opts, opts, pry_instance); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/instance_vars.rb#16 - def correct_opts?; end - - # source://pry//lib/pry/commands/ls/instance_vars.rb#20 - def output_self; end - - private - - # source://pry//lib/pry/commands/ls/instance_vars.rb#34 - def format(type, vars); end -end - -# source://pry//lib/pry/commands/ls/interrogatable.rb#6 -module Pry::Command::Ls::Interrogatable - private - - # source://pry//lib/pry/commands/ls/interrogatable.rb#13 - def interrogatee_mod; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/interrogatable.rb#9 - def interrogating_a_module?; end -end - -# source://pry//lib/pry/commands/ls/jruby_hacks.rb#6 -module Pry::Command::Ls::JRubyHacks - private - - # When removing jruby aliases, we want to keep the alias that is - # "least rubbish" according to this metric. - # - # source://pry//lib/pry/commands/ls/jruby_hacks.rb#40 - def rubbishness(name); end - - # JRuby creates lots of aliases for methods imported from java in an attempt - # to make life easier for ruby programmers. (e.g. getFooBar becomes - # get_foo_bar and foo_bar, and maybe foo_bar? if it returns a Boolean). The - # full transformations are in the assignAliases method of: - # https://github.com/jruby/jruby/blob/master/src/org/jruby/javasupport/JavaClass.java - # - # This has the unfortunate side-effect of making the output of ls even more - # incredibly verbose than it normally would be for these objects; and so we - # filter out all but the nicest of these aliases here. - # - # TODO: This is a little bit vague, better heuristics could be used. - # JRuby also has a lot of scala-specific logic, which we don't copy. - # - # source://pry//lib/pry/commands/ls/jruby_hacks.rb#21 - def trim_jruby_aliases(methods); end -end - -# source://pry//lib/pry/commands/ls/local_names.rb#6 -class Pry::Command::Ls::LocalNames < ::Pry::Command::Ls::Formatter - # @return [LocalNames] a new instance of LocalNames - # - # source://pry//lib/pry/commands/ls/local_names.rb#7 - def initialize(no_user_opts, args, pry_instance); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/local_names.rb#14 - def correct_opts?; end - - # source://pry//lib/pry/commands/ls/local_names.rb#18 - def output_self; end - - private - - # source://pry//lib/pry/commands/ls/local_names.rb#25 - def format(locals); end -end - -# source://pry//lib/pry/commands/ls/local_vars.rb#6 -class Pry::Command::Ls::LocalVars < ::Pry::Command::Ls::Formatter - # @return [LocalVars] a new instance of LocalVars - # - # source://pry//lib/pry/commands/ls/local_vars.rb#7 - def initialize(opts, pry_instance); end - - # source://pry//lib/pry/commands/ls/local_vars.rb#13 - def output_self; end - - private - - # source://pry//lib/pry/commands/ls/local_vars.rb#34 - def colorized_assignment_style(lhs, rhs, desired_width = T.unsafe(nil)); end - - # source://pry//lib/pry/commands/ls/local_vars.rb#25 - def format(name_value_pairs); end -end - -# source://pry//lib/pry/commands/ls/ls_entity.rb#6 -class Pry::Command::Ls::LsEntity - # @return [LsEntity] a new instance of LsEntity - # - # source://pry//lib/pry/commands/ls/ls_entity.rb#9 - def initialize(opts); end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#18 - def entities_table; end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/commands/ls/ls_entity.rb#7 - def pry_instance; end - - private - - # source://pry//lib/pry/commands/ls/ls_entity.rb#32 - def constants; end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#56 - def entities; end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#28 - def globals; end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#24 - def grep(entity); end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#44 - def instance_vars; end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#48 - def local_names; end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#52 - def local_vars; end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#36 - def methods; end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#40 - def self_methods; end -end - -# source://pry//lib/pry/commands/ls/methods.rb#6 -class Pry::Command::Ls::Methods < ::Pry::Command::Ls::Formatter - include ::Pry::Command::Ls::Interrogatable - include ::Pry::Command::Ls::JRubyHacks - include ::Pry::Command::Ls::MethodsHelper - - # @return [Methods] a new instance of Methods - # - # source://pry//lib/pry/commands/ls/methods.rb#10 - def initialize(interrogatee, no_user_opts, opts, pry_instance); end - - # source://pry//lib/pry/commands/ls/methods.rb#22 - def output_self; end - - private - - # Get a lambda that can be used with `take_while` to prevent over-eager - # traversal of the Object's ancestry graph. - # - # source://pry//lib/pry/commands/ls/methods.rb#41 - def below_ceiling; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/methods.rb#35 - def correct_opts?; end -end - -# source://pry//lib/pry/commands/ls/methods_helper.rb#6 -module Pry::Command::Ls::MethodsHelper - include ::Pry::Command::Ls::JRubyHacks - - private - - # Get all the methods that we'll want to output. - # - # source://pry//lib/pry/commands/ls/methods_helper.rb#12 - def all_methods(instance_methods = T.unsafe(nil)); end - - # source://pry//lib/pry/commands/ls/methods_helper.rb#34 - def format(methods); end - - # source://pry//lib/pry/commands/ls/methods_helper.rb#26 - def resolution_order; end -end - -# source://pry//lib/pry/commands/ls/self_methods.rb#6 -class Pry::Command::Ls::SelfMethods < ::Pry::Command::Ls::Formatter - include ::Pry::Command::Ls::Interrogatable - include ::Pry::Command::Ls::JRubyHacks - include ::Pry::Command::Ls::MethodsHelper - - # @return [SelfMethods] a new instance of SelfMethods - # - # source://pry//lib/pry/commands/ls/self_methods.rb#10 - def initialize(interrogatee, no_user_opts, opts, pry_instance); end - - # source://pry//lib/pry/commands/ls/self_methods.rb#18 - def output_self; end - - private - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/self_methods.rb#28 - def correct_opts?; end -end - -# source://pry//lib/pry/commands/nesting.rb#5 -class Pry::Command::Nesting < ::Pry::ClassCommand - # source://pry//lib/pry/commands/nesting.rb#14 - def process; end -end - -# source://pry//lib/pry/commands/play.rb#5 -class Pry::Command::Play < ::Pry::ClassCommand - # source://pry//lib/pry/commands/play.rb#74 - def code_object; end - - # source://pry//lib/pry/commands/play.rb#82 - def content; end - - # source://pry//lib/pry/commands/play.rb#60 - def content_after_options; end - - # source://pry//lib/pry/commands/play.rb#70 - def content_at_expression; end - - # The file to play from when no code object is specified. - # e.g `play --lines 4..10` - # - # source://pry//lib/pry/commands/play.rb#92 - def default_file; end - - # source://pry//lib/pry/commands/play.rb#102 - def file_content; end - - # source://pry//lib/pry/commands/play.rb#29 - def options(opt); end - - # source://pry//lib/pry/commands/play.rb#48 - def perform_play; end - - # source://pry//lib/pry/commands/play.rb#41 - def process; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/play.rb#78 - def should_use_default_file?; end - - # source://pry//lib/pry/commands/play.rb#53 - def show_input; end -end - -# source://pry//lib/pry/commands/pry_backtrace.rb#5 -class Pry::Command::PryBacktrace < ::Pry::ClassCommand - # source://pry//lib/pry/commands/pry_backtrace.rb#22 - def process; end -end - -# source://pry//lib/pry/commands/raise_up.rb#6 -class Pry::Command::RaiseUp < ::Pry::ClassCommand - # source://pry//lib/pry/commands/raise_up.rb#27 - def process; end -end - -# source://pry//lib/pry/commands/reload_code.rb#5 -class Pry::Command::ReloadCode < ::Pry::ClassCommand - # source://pry//lib/pry/commands/reload_code.rb#20 - def process; end - - private - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/reload_code.rb#58 - def check_for_reloadability(code_object, identifier); end - - # source://pry//lib/pry/commands/reload_code.rb#32 - def current_file; end - - # source://pry//lib/pry/commands/reload_code.rb#42 - def reload_current_file; end - - # source://pry//lib/pry/commands/reload_code.rb#51 - def reload_object(identifier); end -end - -# source://pry//lib/pry/commands/reset.rb#5 -class Pry::Command::Reset < ::Pry::ClassCommand - # source://pry//lib/pry/commands/reset.rb#14 - def process; end -end - -# source://pry//lib/pry/commands/ri.rb#7 -class Pry::Command::Ri < ::Pry::ClassCommand - # source://pry//lib/pry/commands/ri.rb#21 - def process(spec); end -end - -# source://pry//lib/pry/commands/save_file.rb#5 -class Pry::Command::SaveFile < ::Pry::ClassCommand - # source://pry//lib/pry/commands/save_file.rb#50 - def display_content; end - - # source://pry//lib/pry/commands/save_file.rb#39 - def file_name; end - - # source://pry//lib/pry/commands/save_file.rb#56 - def mode; end - - # source://pry//lib/pry/commands/save_file.rb#21 - def options(opt); end - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/save_file.rb#28 - def process; end - - # source://pry//lib/pry/commands/save_file.rb#43 - def save_file; end -end - -# source://pry//lib/pry/commands/shell_command.rb#5 -class Pry::Command::ShellCommand < ::Pry::ClassCommand - # source://pry//lib/pry/commands/shell_command.rb#21 - def process(cmd); end - - private - - # source://pry//lib/pry/commands/shell_command.rb#50 - def cd_path_env; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/shell_command.rb#54 - def cd_path_exists?; end - - # source://pry//lib/pry/commands/shell_command.rb#36 - def parse_destination(dest); end - - # source://pry//lib/pry/commands/shell_command.rb#58 - def path_from_cd_path(dest); end - - # source://pry//lib/pry/commands/shell_command.rb#43 - def process_cd(dest); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/shell_command.rb#68 - def special_case_path?(dest); end -end - -# source://pry//lib/pry/commands/shell_mode.rb#5 -class Pry::Command::ShellMode < ::Pry::ClassCommand - # source://pry//lib/pry/commands/shell_mode.rb#14 - def process; end -end - -# source://pry//lib/pry/commands/show_doc.rb#5 -class Pry::Command::ShowDoc < ::Pry::Command::ShowInfo - include ::Pry::Helpers::DocumentationHelpers - - # The docs for code_object prepared for display. - # - # source://pry//lib/pry/commands/show_doc.rb#35 - def content_for(code_object); end - - # Return docs for the code_object, adjusting for whether the code_object - # has yard docs available, in which case it returns those. - # (note we only have to check yard docs for modules since they can - # have multiple docs, but methods can only be doc'd once so we - # dont need to check them) - # - # source://pry//lib/pry/commands/show_doc.rb#64 - def docs_for(code_object); end - - # Which sections to include in the 'header', can toggle: :owner, - # :signature and visibility. - # - # source://pry//lib/pry/commands/show_doc.rb#76 - def header_options; end - - # source://pry//lib/pry/commands/show_doc.rb#24 - def process; end - - # process the markup (if necessary) and apply colors - # - # source://pry//lib/pry/commands/show_doc.rb#44 - def render_doc_markup_for(code_object); end - - # figure out start line of docs by back-calculating based on - # number of lines in the comment and the start line of the code_object - # - # @return [Fixnum] start line of docs - # - # source://pry//lib/pry/commands/show_doc.rb#83 - def start_line_for(code_object); end -end - -# source://pry//lib/pry/commands/show_info.rb#5 -class Pry::Command::ShowInfo < ::Pry::ClassCommand - extend ::Pry::Helpers::BaseHelpers - - # @return [ShowInfo] a new instance of ShowInfo - # - # source://pry//lib/pry/commands/show_info.rb#10 - def initialize(*_arg0); end - - # source://pry//lib/pry/commands/show_info.rb#127 - def code_object_header(code_object, line_num); end - - # This method checks whether the `code_object` is a WrappedModule, if it - # is, then it returns the first candidate (monkeypatch) with accessible - # source (or docs). If `code_object` is not a WrappedModule (i.e a method - # or a command) then the `code_object` itself is just returned. - # - # @raise [CommandError] - # @return [Pry::WrappedModule, Pry::Method, Pry::Command] - # - # source://pry//lib/pry/commands/show_info.rb#61 - def code_object_with_accessible_source(code_object); end - - # source://pry//lib/pry/commands/show_info.rb#213 - def complete(input); end - - # source://pry//lib/pry/commands/show_info.rb#77 - def content_and_header_for_code_object(code_object); end - - # source://pry//lib/pry/commands/show_info.rb#81 - def content_and_headers_for_all_module_candidates(mod); end - - # takes into account possible yard docs, and returns yard_file / yard_line - # Also adjusts for start line of comments (using start_line_for), which it - # has to infer by subtracting number of lines of comment from start line - # of code_object - # - # source://pry//lib/pry/commands/show_info.rb#205 - def file_and_line_for(code_object); end - - # Generate a header (meta-data information) for all the code - # object types: methods, modules, commands, procs... - # - # source://pry//lib/pry/commands/show_info.rb#106 - def header(code_object); end - - # source://pry//lib/pry/commands/show_info.rb#173 - def header_options; end - - # source://pry//lib/pry/commands/show_info.rb#142 - def method_header(code_object, line_num); end - - # source://pry//lib/pry/commands/show_info.rb#165 - def method_sections(code_object); end - - # source://pry//lib/pry/commands/show_info.rb#151 - def module_header(code_object, line_num); end - - # source://pry//lib/pry/commands/show_info.rb#100 - def no_definition_message; end - - # source://pry//lib/pry/commands/show_info.rb#185 - def obj_name; end - - # source://pry//lib/pry/commands/show_info.rb#16 - def options(opt); end - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/show_info.rb#26 - def process; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/show_info.rb#181 - def show_all_modules?(code_object); end - - # source://pry//lib/pry/commands/show_info.rb#193 - def start_line_for(code_object); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/show_info.rb#189 - def use_line_numbers?; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/show_info.rb#73 - def valid_superclass?(code_object); end -end - -# source://pry//lib/pry/commands/show_input.rb#5 -class Pry::Command::ShowInput < ::Pry::ClassCommand - # source://pry//lib/pry/commands/show_input.rb#15 - def process; end -end - -# source://pry//lib/pry/commands/show_source.rb#5 -class Pry::Command::ShowSource < ::Pry::Command::ShowInfo - include ::Pry::Helpers::DocumentationHelpers - - # The source for code_object prepared for display. - # - # source://pry//lib/pry/commands/show_source.rb#48 - def content_for(code_object); end - - # Return docs for the code_object, adjusting for whether the code_object - # has yard docs available, in which case it returns those. - # (note we only have to check yard docs for modules since they can - # have multiple docs, but methods can only be doc'd once so we - # dont need to check them) - # - # source://pry//lib/pry/commands/show_source.rb#86 - def docs_for(code_object); end - - # Which sections to include in the 'header', can toggle: :owner, - # :signature and visibility. - # - # source://pry//lib/pry/commands/show_source.rb#98 - def header_options; end - - # source://pry//lib/pry/commands/show_source.rb#31 - def options(opt); end - - # source://pry//lib/pry/commands/show_source.rb#38 - def process; end - - # process the markup (if necessary) and apply colors - # - # source://pry//lib/pry/commands/show_source.rb#66 - def render_doc_markup_for(code_object); end - - # figure out start line of docs by back-calculating based on - # number of lines in the comment and the start line of the code_object - # - # @return [Fixnum] start line of docs - # - # source://pry//lib/pry/commands/show_source.rb#105 - def start_line_for(code_object); end -end - -# source://pry//lib/pry/commands/stat.rb#5 -class Pry::Command::Stat < ::Pry::ClassCommand - # source://pry//lib/pry/commands/stat.rb#19 - def options(opt); end - - # source://pry//lib/pry/commands/stat.rb#23 - def process; end -end - -# source://pry//lib/pry/commands/switch_to.rb#5 -class Pry::Command::SwitchTo < ::Pry::ClassCommand - # source://pry//lib/pry/commands/switch_to.rb#14 - def process(selection); end -end - -# source://pry//lib/pry/commands/toggle_color.rb#5 -class Pry::Command::ToggleColor < ::Pry::ClassCommand - # source://pry//lib/pry/commands/toggle_color.rb#21 - def color_toggle; end - - # source://pry//lib/pry/commands/toggle_color.rb#16 - def process; end -end - -# represents a void return value for a command -# -# source://pry//lib/pry/command.rb#20 -Pry::Command::VOID_VALUE = T.let(T.unsafe(nil), Object) - -# source://pry//lib/pry/commands/pry_version.rb#5 -class Pry::Command::Version < ::Pry::ClassCommand - # source://pry//lib/pry/commands/pry_version.rb#14 - def process; end -end - -# source://pry//lib/pry/commands/watch_expression.rb#5 -class Pry::Command::WatchExpression < ::Pry::ClassCommand - # source://pry//lib/pry/commands/watch_expression.rb#31 - def options(opt); end - - # source://pry//lib/pry/commands/watch_expression.rb#42 - def process; end - - private - - # TODO: fix arguments. - # https://github.com/pry/pry/commit/b031df2f2f5850ee6e9018f33d35f3485a9b0423 - # - # source://pry//lib/pry/commands/watch_expression.rb#93 - def add_expression(_arguments); end - - # source://pry//lib/pry/commands/watch_expression.rb#98 - def add_hook; end - - # source://pry//lib/pry/commands/watch_expression.rb#59 - def delete(index); end - - # source://pry//lib/pry/commands/watch_expression.rb#84 - def eval_and_print_changed(output); end - - # source://pry//lib/pry/commands/watch_expression.rb#55 - def expressions; end - - # source://pry//lib/pry/commands/watch_expression.rb#69 - def list; end -end - -# source://pry//lib/pry/commands/watch_expression/expression.rb#6 -class Pry::Command::WatchExpression::Expression - # @return [Expression] a new instance of Expression - # - # source://pry//lib/pry/commands/watch_expression/expression.rb#9 - def initialize(pry_instance, target, source); end - - # Has the value of the expression changed? - # - # We use the pretty-printed string represenation to detect differences - # as this avoids problems with dup (causes too many differences) and == - # (causes too few) - # - # @return [Boolean] - # - # source://pry//lib/pry/commands/watch_expression/expression.rb#29 - def changed?; end - - # source://pry//lib/pry/commands/watch_expression/expression.rb#15 - def eval!; end - - # Returns the value of attribute previous_value. - # - # source://pry//lib/pry/commands/watch_expression/expression.rb#7 - def previous_value; end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/commands/watch_expression/expression.rb#7 - def pry_instance; end - - # Returns the value of attribute source. - # - # source://pry//lib/pry/commands/watch_expression/expression.rb#7 - def source; end - - # Returns the value of attribute target. - # - # source://pry//lib/pry/commands/watch_expression/expression.rb#7 - def target; end - - # source://pry//lib/pry/commands/watch_expression/expression.rb#20 - def to_s; end - - # Returns the value of attribute value. - # - # source://pry//lib/pry/commands/watch_expression/expression.rb#7 - def value; end - - private - - # source://pry//lib/pry/commands/watch_expression/expression.rb#35 - def target_eval(target, source); end -end - -# source://pry//lib/pry/commands/whereami.rb#7 -class Pry::Command::Whereami < ::Pry::ClassCommand - # @return [Whereami] a new instance of Whereami - # - # source://pry//lib/pry/commands/whereami.rb#8 - def initialize(*_arg0); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#83 - def bad_option_combination?; end - - # source://pry//lib/pry/commands/whereami.rb#63 - def code; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#77 - def code?; end - - # source://pry//lib/pry/commands/whereami.rb#88 - def location; end - - # source://pry//lib/pry/commands/whereami.rb#55 - def options(opt); end - - # source://pry//lib/pry/commands/whereami.rb#92 - def process; end - - # source://pry//lib/pry/commands/whereami.rb#44 - def setup; end - - private - - # source://pry//lib/pry/commands/whereami.rb#171 - def class_code; end - - # source://pry//lib/pry/commands/whereami.rb#152 - def code_window; end - - # source://pry//lib/pry/commands/whereami.rb#144 - def default_code; end - - # source://pry//lib/pry/commands/whereami.rb#185 - def expand_path(filename); end - - # source://pry//lib/pry/commands/whereami.rb#132 - def handle_internal_binding; end - - # source://pry//lib/pry/commands/whereami.rb#124 - def marker; end - - # source://pry//lib/pry/commands/whereami.rb#156 - def method_code; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#116 - def nothing_to_do?; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#140 - def small_method?; end - - # This either returns the `target_self` - # or it returns the class of `target_self` if `target_self` is not a class. - # - # @return [Pry::WrappedModule] - # - # source://pry//lib/pry/commands/whereami.rb#165 - def target_class; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#128 - def top_level?; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#120 - def use_line_numbers?; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#180 - def valid_method?; end - - # source://pry//lib/pry/commands/whereami.rb#192 - def window_size; end - - class << self - # Returns the value of attribute method_size_cutoff. - # - # source://pry//lib/pry/commands/whereami.rb#15 - def method_size_cutoff; end - - # Sets the attribute method_size_cutoff - # - # @param value the value to set the attribute method_size_cutoff to. - # - # source://pry//lib/pry/commands/whereami.rb#15 - def method_size_cutoff=(_arg0); end - end -end - -# source://pry//lib/pry/commands/wtf.rb#5 -class Pry::Command::Wtf < ::Pry::ClassCommand - # source://pry//lib/pry/commands/wtf.rb#27 - def options(opt); end - - # source://pry//lib/pry/commands/wtf.rb#32 - def process; end - - private - - # source://pry//lib/pry/commands/wtf.rb#64 - def format_backtrace(backtrace); end - - # source://pry//lib/pry/commands/wtf.rb#60 - def format_header(title, exception); end - - # source://pry//lib/pry/commands/wtf.rb#83 - def read_line(file, line); end - - # source://pry//lib/pry/commands/wtf.rb#76 - def trim_backtrace(backtrace); end - - # source://pry//lib/pry/commands/wtf.rb#48 - def unwind_exceptions; end -end - -# source://pry//lib/pry/commands/wtf.rb#25 -Pry::Command::Wtf::RUBY_FRAME_PATTERN = T.let(T.unsafe(nil), Regexp) - -# CommandErrors are caught by the REPL loop and displayed to the user. They -# indicate an exceptional condition that's fatal to the current command. -# -# source://pry//lib/pry/exceptions.rb#68 -class Pry::CommandError < ::StandardError; end - -# This class is used to create sets of commands. Commands can be imported from -# different sets, aliased, removed, etc. -# -# source://pry//lib/pry/command_set.rb#12 -class Pry::CommandSet - include ::Enumerable - include ::Pry::Helpers::BaseHelpers - - # @param imported_sets [Array] Sets which will be imported automatically - # @return [CommandSet] a new instance of CommandSet - # @yield Optional block run to define commands - # - # source://pry//lib/pry/command_set.rb#20 - def initialize(*imported_sets, &block); end - - # Find a command that matches the given line - # - # @param pattern [String] The line that might be a command invocation - # @return [Pry::Command, nil] - # - # source://pry//lib/pry/command_set.rb#275 - def [](pattern); end - - # Re-assign the command found at _pattern_ with _command_. - # - # @example - # Pry.config.commands["help"] = MyHelpCommand - # @param pattern [Regexp, String] The command to add or replace(found at _pattern_). - # @param command [Pry::Command] The command to add. - # @return [Pry::Command] Returns the new command (matched with "pattern".) - # - # source://pry//lib/pry/command_set.rb#298 - def []=(pattern, command); end - - # Add a command to set. - # - # @param command [Command] a subclass of Pry::Command. - # - # source://pry//lib/pry/command_set.rb#324 - def add_command(command); end - - # Aliases a command - # - # @example Creating an alias for `ls -M` - # Pry.config.commands.alias_command "lM", "ls -M" - # @example Pass explicit description (overriding default). - # Pry.config.commands.alias_command "lM", "ls -M", :desc => "cutiepie" - # @param match [String, Regex] The match of the alias (can be a regex). - # @param action [String] The action to be performed (typically - # another command). - # @param options [Hash] The optional configuration parameters, - # accepts the same as the `command` method, but also allows the - # command description to be passed this way too as `:desc` - # - # source://pry//lib/pry/command_set.rb#190 - def alias_command(match, action, options = T.unsafe(nil)); end - - # Defines a new Pry command. - # - # @example - # MyCommands = Pry::CommandSet.new do - # command "greet", "Greet somebody" do |name| - # puts "Good afternoon #{name.capitalize}!" - # end - # end - # - # # From pry: - # # pry(main)> pry_instance.commands = MyCommands - # # pry(main)> greet john - # # Good afternoon John! - # # pry(main)> help greet - # # Greet somebody - # @example Regexp command - # MyCommands = Pry::CommandSet.new do - # command( - # /number-(\d+)/, "number-N regex command", :listing => "number" - # ) do |num, name| - # puts "hello #{name}, nice number: #{num}" - # end - # end - # - # # From pry: - # # pry(main)> pry_instance.commands = MyCommands - # # pry(main)> number-10 john - # # hello john, nice number: 10 - # # pry(main)> help number - # # number-N regex command - # @option options - # @option options - # @option options - # @option options - # @option options - # @param match [String, Regexp] The start of invocations of this command. - # @param description [String] A description of the command. - # @param options [Hash] The optional configuration parameters. - # @yield The action to perform. The parameters in the block - # determines the parameters the command will receive. All - # parameters passed into the block will be strings. Successive - # command parameters are separated by whitespace at the Pry prompt. - # - # source://pry//lib/pry/command_set.rb#78 - def block_command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # Defines a new Pry command. - # - # @example - # MyCommands = Pry::CommandSet.new do - # command "greet", "Greet somebody" do |name| - # puts "Good afternoon #{name.capitalize}!" - # end - # end - # - # # From pry: - # # pry(main)> pry_instance.commands = MyCommands - # # pry(main)> greet john - # # Good afternoon John! - # # pry(main)> help greet - # # Greet somebody - # @example Regexp command - # MyCommands = Pry::CommandSet.new do - # command( - # /number-(\d+)/, "number-N regex command", :listing => "number" - # ) do |num, name| - # puts "hello #{name}, nice number: #{num}" - # end - # end - # - # # From pry: - # # pry(main)> pry_instance.commands = MyCommands - # # pry(main)> number-10 john - # # hello john, nice number: 10 - # # pry(main)> help number - # # number-N regex command - # @option options - # @option options - # @option options - # @option options - # @option options - # @param match [String, Regexp] The start of invocations of this command. - # @param description [String] A description of the command. - # @param options [Hash] The optional configuration parameters. - # @yield The action to perform. The parameters in the block - # determines the parameters the command will receive. All - # parameters passed into the block will be strings. Successive - # command parameters are separated by whitespace at the Pry prompt. - # - # source://pry//lib/pry/command_set.rb#78 - def command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # Generate completions for the user's search. - # - # @param search [String] The line to search for - # @param context [Hash] The context to create the command with - # @return [Array] - # - # source://pry//lib/pry/command_set.rb#365 - def complete(search, context = T.unsafe(nil)); end - - # Defines a new Pry command class. - # - # @example - # Pry::Commands.create_command "echo", "echo's the input", :shellwords => false do - # def options(opt) - # opt.banner "Usage: echo [-u | -d] " - # opt.on :u, :upcase, "ensure the output is all upper-case" - # opt.on :d, :downcase, "ensure the output is all lower-case" - # end - # - # def process - # if opts.present?(:u) && opts.present?(:d) - # raise Pry::CommandError, "-u and -d makes no sense" - # end - # result = args.join(" ") - # result.downcase! if opts.present?(:downcase) - # result.upcase! if opts.present?(:upcase) - # output.puts result - # end - # end - # @param match [String, Regexp] The start of invocations of this command. - # @param description [String] A description of the command. - # @param options [Hash] The optional configuration parameters, see {#command} - # @yield The class body's definition. - # - # source://pry//lib/pry/command_set.rb#117 - def create_command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # Removes some commands from the set - # - # @param searches [Array] the matches or listings of the commands - # to remove - # - # source://pry//lib/pry/command_set.rb#138 - def delete(*searches); end - - # Sets or gets the description for a command (replacing the old - # description). Returns current description if no description - # parameter provided. - # - # @example Setting - # MyCommands = Pry::CommandSet.new do - # desc "help", "help description" - # end - # @example Getting - # Pry.config.commands.desc "amend-line" - # @param search [String, Regexp] The command match. - # @param description [String?] (nil) The command description. - # - # source://pry//lib/pry/command_set.rb#253 - def desc(search, description = T.unsafe(nil)); end - - # source://pry//lib/pry/command_set.rb#131 - def each(&block); end - - # Find a command that matches the given line - # - # @param pattern [String] The line that might be a command invocation - # @return [Pry::Command, nil] - # - # source://pry//lib/pry/command_set.rb#275 - def find_command(pattern); end - - # @param match_or_listing [String, Regexp] The match or listing of a command. - # of the command to retrieve. - # @return [Command] The command object matched. - # - # source://pry//lib/pry/command_set.rb#173 - def find_command_by_match_or_listing(match_or_listing); end - - # Find the command that the user might be trying to refer to. - # - # @param search [String] The user's search. - # @return [Pry::Command?] - # - # source://pry//lib/pry/command_set.rb#331 - def find_command_for_help(search); end - - # Returns the value of attribute helper_module. - # - # source://pry//lib/pry/command_set.rb#15 - def helper_module; end - - # Imports all the commands from one or more sets. - # - # @param sets [Array] Command sets, all of the commands of which - # will be imported. - # @return [Pry::CommandSet] Returns the reciever (a command set). - # - # source://pry//lib/pry/command_set.rb#149 - def import(*sets); end - - # Imports some commands from a set - # - # @param set [CommandSet] Set to import commands from - # @param matches [Array] Commands to import - # @return [Pry::CommandSet] Returns the reciever (a command set). - # - # source://pry//lib/pry/command_set.rb#161 - def import_from(set, *matches); end - - # @return [Array] The list of commands provided by the command set. - # - # source://pry//lib/pry/command_set.rb#262 - def keys; end - - # @return [Array] The list of commands provided by the command set. - # - # source://pry//lib/pry/command_set.rb#262 - def list_commands; end - - # Process the given line to see whether it needs executing as a command. - # - # @param val [String] The line to execute - # @param context [Hash] The context to execute the commands with - # @return [CommandSet::Result] - # - # source://pry//lib/pry/command_set.rb#351 - def process_line(val, context = T.unsafe(nil)); end - - # Rename a command. Accepts either match or listing for the search. - # - # @example Renaming the `ls` command and changing its description. - # Pry.config.commands.rename "dir", "ls", :description => "DOS friendly ls" - # @param new_match [String, Regexp] The new match for the command. - # @param search [String, Regexp] The command's current match or listing. - # @param options [Hash] The optional configuration parameters, - # accepts the same as the `command` method, but also allows the - # command description to be passed this way too. - # - # source://pry//lib/pry/command_set.rb#227 - def rename_command(new_match, search, options = T.unsafe(nil)); end - - # source://pry//lib/pry/command_set.rb#267 - def to_h; end - - # source://pry//lib/pry/command_set.rb#267 - def to_hash; end - - # Is the given line a command invocation? - # - # @param val [String] - # @return [Boolean] - # - # source://pry//lib/pry/command_set.rb#343 - def valid_command?(val); end - - private - - # Defines helpers methods for this command sets. - # Those helpers are only defined in this command set. - # - # @example - # helpers do - # def hello - # puts "Hello!" - # end - # - # include OtherModule - # end - # @yield A block defining helper methods - # - # source://pry//lib/pry/command_set.rb#390 - def helpers(&block); end -end - -# CommandState is a data structure to hold per-command state. -# -# Pry commands can store arbitrary state here. This state persists between -# subsequent command invocations. All state saved here is unique to the -# command. -# -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/command_state.rb#14 -class Pry::CommandState - # @api private - # @return [CommandState] a new instance of CommandState - # @since v0.13.0 - # - # source://pry//lib/pry/command_state.rb#19 - def initialize; end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/command_state.rb#27 - def reset(command_name); end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/command_state.rb#23 - def state_for(command_name); end - - class << self - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/command_state.rb#15 - def default; end - end -end - -# source://pry//lib/pry.rb#35 -Pry::Commands = T.let(T.unsafe(nil), Pry::CommandSet) - -# @api private -# -# source://pry//lib/pry/config/attributable.rb#4 -class Pry::Config - extend ::Pry::Config::Attributable - - # @api private - # @return [Config] a new instance of Config - # - # source://pry//lib/pry/config.rb#154 - def initialize; end - - # @api private - # - # source://pry//lib/pry/config.rb#234 - def [](attr); end - - # @api private - # - # source://pry//lib/pry/config.rb#230 - def []=(attr, value); end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 - def auto_indent; end - - # source://pry//lib/pry/config/attributable.rb#18 - def auto_indent=(_arg0); end - - # @api private - # @return [Boolean] whether or not display a warning when a command name - # collides with a method/local in the current context. - # - # source://pry//lib/pry/config/attributable.rb#13 - def collision_warning; end - - # source://pry//lib/pry/config/attributable.rb#18 - def collision_warning=(_arg0); end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 - def color; end - - # source://pry//lib/pry/config/attributable.rb#18 - def color=(_arg0); end - - # @api private - # @return [Proc] - # - # source://pry//lib/pry/config/attributable.rb#13 - def command_completions; end - - # source://pry//lib/pry/config/attributable.rb#18 - def command_completions=(_arg0); end - - # A string that must precede all commands. For example, if is is - # set to "%", the "cd" command must be invoked as "%cd"). - # - # @api private - # @return [String] - # - # source://pry//lib/pry/config/attributable.rb#13 - def command_prefix; end - - # source://pry//lib/pry/config/attributable.rb#18 - def command_prefix=(_arg0); end - - # @api private - # @return [Pry::CommandSet] - # - # source://pry//lib/pry/config/attributable.rb#13 - def commands; end - - # source://pry//lib/pry/config/attributable.rb#18 - def commands=(_arg0); end - - # @api private - # @return [#build_completion_proc] a completer to use - # - # source://pry//lib/pry/config/attributable.rb#13 - def completer; end - - # source://pry//lib/pry/config/attributable.rb#18 - def completer=(_arg0); end - - # @api private - # - # source://pry//lib/pry/config.rb#259 - def control_d_handler; end - - # @api private - # - # source://pry//lib/pry/config.rb#260 - def control_d_handler=(value); end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 - def correct_indent; end - - # source://pry//lib/pry/config/attributable.rb#18 - def correct_indent=(_arg0); end - - # @api private - # @return [Integer] The number of lines of context to show before and after - # exceptions - # - # source://pry//lib/pry/config/attributable.rb#13 - def default_window_size; end - - # source://pry//lib/pry/config/attributable.rb#18 - def default_window_size=(_arg0); end - - # @api private - # @return [Boolean] whether to disable edit-method's auto-reloading behavior - # - # source://pry//lib/pry/config/attributable.rb#13 - def disable_auto_reload; end - - # source://pry//lib/pry/config/attributable.rb#18 - def disable_auto_reload=(_arg0); end - - # If it is a String, then that String is used as the shell - # command to invoke the editor. - # - # If it responds to #call is callable then `file`, `line`, and `reloading` - # are passed to it. `reloading` indicates whether Pry will be reloading code - # after the shell command returns. All parameters are optional. - # - # @api private - # @return [String, #call] - # - # source://pry//lib/pry/config/attributable.rb#13 - def editor; end - - # source://pry//lib/pry/config/attributable.rb#18 - def editor=(_arg0); end - - # @api private - # @return [Proc] the printer for exceptions - # - # source://pry//lib/pry/config/attributable.rb#13 - def exception_handler; end - - # source://pry//lib/pry/config/attributable.rb#18 - def exception_handler=(_arg0); end - - # @api private - # @deprecated - # @return [Array] Exception that Pry shouldn't rescue - # - # source://pry//lib/pry/config/attributable.rb#13 - def exception_whitelist; end - - # source://pry//lib/pry/config/attributable.rb#18 - def exception_whitelist=(_arg0); end - - # @api private - # @return [String] a line of code to execute in context before the session - # starts - # - # source://pry//lib/pry/config/attributable.rb#13 - def exec_string; end - - # source://pry//lib/pry/config/attributable.rb#18 - def exec_string=(_arg0); end - - # @api private - # @return [Hash{Symbol=>Proc}] - # - # source://pry//lib/pry/config/attributable.rb#13 - def extra_sticky_locals; end - - # source://pry//lib/pry/config/attributable.rb#18 - def extra_sticky_locals=(_arg0); end - - # @api private - # @return [Proc] - # - # source://pry//lib/pry/config/attributable.rb#13 - def file_completions; end - - # source://pry//lib/pry/config/attributable.rb#18 - def file_completions=(_arg0); end - - # @api private - # @return [Pry::History] - # - # source://pry//lib/pry/config/attributable.rb#13 - def history; end - - # source://pry//lib/pry/config/attributable.rb#18 - def history=(_arg0); end - - # @api private - # @return [String] - # - # source://pry//lib/pry/config/attributable.rb#13 - def history_file; end - - # source://pry//lib/pry/config/attributable.rb#18 - def history_file=(_arg0); end - - # @api private - # @return [Array] - # - # source://pry//lib/pry/config/attributable.rb#13 - def history_ignorelist; end - - # source://pry//lib/pry/config/attributable.rb#18 - def history_ignorelist=(_arg0); end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 - def history_load; end - - # source://pry//lib/pry/config/attributable.rb#18 - def history_load=(_arg0); end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 - def history_save; end - - # source://pry//lib/pry/config/attributable.rb#18 - def history_save=(_arg0); end - - # @api private - # @return [Pry::Hooks] - # - # source://pry//lib/pry/config/attributable.rb#13 - def hooks; end - - # source://pry//lib/pry/config/attributable.rb#18 - def hooks=(_arg0); end - - # @api private - # @return [IO, #readline] he object from which Pry retrieves its lines of - # input - # - # source://pry//lib/pry/config/attributable.rb#13 - def input; end - - # source://pry//lib/pry/config/attributable.rb#18 - def input=(_arg0); end - - # @api private - # @return [Hash] - # - # source://pry//lib/pry/config/attributable.rb#13 - def ls; end - - # source://pry//lib/pry/config/attributable.rb#18 - def ls=(_arg0); end - - # @api private - # @return [Integer] how many input/output lines to keep in memory - # - # source://pry//lib/pry/config/attributable.rb#13 - def memory_size; end - - # source://pry//lib/pry/config/attributable.rb#18 - def memory_size=(_arg0); end - - # @api private - # - # source://pry//lib/pry/config.rb#226 - def merge(config_hash); end - - # @api private - # - # source://pry//lib/pry/config.rb#221 - def merge!(config_hash); end - - # @api private - # - # source://pry//lib/pry/config.rb#239 - def method_missing(method_name, *args, &_block); end - - # @api private - # @return [IO, #puts] where Pry should output results provided by {input} - # - # source://pry//lib/pry/config/attributable.rb#13 - def output; end - - # source://pry//lib/pry/config/attributable.rb#18 - def output=(_arg0); end - - # @api private - # @return [String] - # - # source://pry//lib/pry/config/attributable.rb#13 - def output_prefix; end - - # source://pry//lib/pry/config/attributable.rb#18 - def output_prefix=(_arg0); end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 - def pager; end - - # source://pry//lib/pry/config/attributable.rb#18 - def pager=(_arg0); end - - # @api private - # @return [Proc] the printer for Ruby expressions (not commands) - # - # source://pry//lib/pry/config/attributable.rb#13 - def print; end - - # source://pry//lib/pry/config/attributable.rb#18 - def print=(_arg0); end - - # @api private - # @return [Pry::Prompt] - # - # source://pry//lib/pry/config/attributable.rb#13 - def prompt; end - - # source://pry//lib/pry/config/attributable.rb#18 - def prompt=(_arg0); end - - # @api private - # @return [String] The display name that is part of the prompt - # - # source://pry//lib/pry/config/attributable.rb#13 - def prompt_name; end - - # source://pry//lib/pry/config/attributable.rb#18 - def prompt_name=(_arg0); end - - # @api private - # @return [Array] the list of objects that are known to have a - # 1-line #inspect output suitable for prompt - # - # source://pry//lib/pry/config/attributable.rb#13 - def prompt_safe_contexts; end - - # source://pry//lib/pry/config/attributable.rb#18 - def prompt_safe_contexts=(_arg0); end - - # @api private - # @return [Boolean] suppresses whereami output on `binding.pry` - # - # source://pry//lib/pry/config/attributable.rb#13 - def quiet; end - - # source://pry//lib/pry/config/attributable.rb#18 - def quiet=(_arg0); end - - # @api private - # @return [String] - # @since v0.13.0 - # - # source://pry//lib/pry/config/attributable.rb#13 - def rc_file; end - - # source://pry//lib/pry/config/attributable.rb#18 - def rc_file=(_arg0); end - - # @api private - # @return [Array] Ruby files to be required - # - # source://pry//lib/pry/config/attributable.rb#13 - def requires; end - - # source://pry//lib/pry/config/attributable.rb#18 - def requires=(_arg0); end - - # @api private - # @return [Boolean] whether the local ./.pryrc should be loaded - # - # source://pry//lib/pry/config/attributable.rb#13 - def should_load_local_rc; end - - # source://pry//lib/pry/config/attributable.rb#18 - def should_load_local_rc=(_arg0); end - - # @api private - # @return [Boolean] whether the global ~/.pryrc should be loaded - # - # source://pry//lib/pry/config/attributable.rb#13 - def should_load_rc; end - - # source://pry//lib/pry/config/attributable.rb#18 - def should_load_rc=(_arg0); end - - # @api private - # @return [Boolean] whether to load files specified with the -r flag - # - # source://pry//lib/pry/config/attributable.rb#13 - def should_load_requires; end - - # source://pry//lib/pry/config/attributable.rb#18 - def should_load_requires=(_arg0); end - - # Whether Pry should trap SIGINT and cause it to raise an Interrupt - # exception. This is only useful on JRuby, MRI does this for us. - # - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 - def should_trap_interrupts; end - - # source://pry//lib/pry/config/attributable.rb#18 - def should_trap_interrupts=(_arg0); end - - # @api private - # @return [Proc] The proc that runs system commands - # - # source://pry//lib/pry/config/attributable.rb#13 - def system; end - - # source://pry//lib/pry/config/attributable.rb#18 - def system=(_arg0); end - - # @api private - # @return [Array] Exception that Pry shouldn't rescue - # - # source://pry//lib/pry/config/attributable.rb#13 - def unrescued_exceptions; end - - # source://pry//lib/pry/config/attributable.rb#18 - def unrescued_exceptions=(_arg0); end - - # @api private - # @return [Boolean] displays a warning about experience improvement on - # Windows - # - # source://pry//lib/pry/config/attributable.rb#13 - def windows_console_warning; end - - # source://pry//lib/pry/config/attributable.rb#18 - def windows_console_warning=(_arg0); end - - private - - # @api private - # - # source://pry//lib/pry/config.rb#303 - def default_rc_file; end - - # @api private - # - # source://pry//lib/pry/config.rb#254 - def initialize_dup(other); end - - # @api private - # - # source://pry//lib/pry/config.rb#289 - def lazy_readline; end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config.rb#250 - def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end -end - -# Attributable provides the ability to create "attribute" -# accessors. Attribute accessors create a standard "attr_writer" and a -# customised "attr_reader". This reader is Proc-aware (lazy). -# -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/config/attributable.rb#11 -module Pry::Config::Attributable - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/config/attributable.rb#12 - def attribute(attr_name); end -end - -# LazyValue is a Proc (block) wrapper. It is meant to be used as a -# configuration value. Subsequent `#call` calls always evaluate the given -# block. -# -# @api private -# @example -# num = 19 -# value = Pry::Config::LazyValue.new { num += 1 } -# value.foo # => 20 -# value.foo # => 21 -# value.foo # => 22 -# @see Pry::Config::MemoizedValue -# @since v0.13.0 -# -# source://pry//lib/pry/config/lazy_value.rb#19 -class Pry::Config::LazyValue - # @api private - # @return [LazyValue] a new instance of LazyValue - # @since v0.13.0 - # - # source://pry//lib/pry/config/lazy_value.rb#20 - def initialize(&block); end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/config/lazy_value.rb#24 - def call; end -end - -# MemoizedValue is a Proc (block) wrapper. It is meant to be used as a -# configuration value. Subsequent `#call` calls return the same memoized -# result. -# -# @api private -# @example -# num = 19 -# value = Pry::Config::MemoizedValue.new { num += 1 } -# value.call # => 20 -# value.call # => 20 -# value.call # => 20 -# @see Pry::Config::LazyValue -# @since v0.13.0 -# -# source://pry//lib/pry/config/memoized_value.rb#19 -class Pry::Config::MemoizedValue - # @api private - # @return [MemoizedValue] a new instance of MemoizedValue - # @since v0.13.0 - # - # source://pry//lib/pry/config/memoized_value.rb#20 - def initialize(&block); end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/config/memoized_value.rb#26 - def call; end -end - -# Value holds a value for the given attribute and decides how it should -# be read. Procs get called, other values are returned as is. -# -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/config/value.rb#10 -class Pry::Config::Value - # @api private - # @return [Value] a new instance of Value - # @since v0.13.0 - # - # source://pry//lib/pry/config/value.rb#11 - def initialize(value); end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/config/value.rb#15 - def call; end -end - -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/control_d_handler.rb#6 -module Pry::ControlDHandler - class << self - # Deal with the ^D key being pressed. Different behaviour in different - # cases: - # 1. In an expression behave like `!` command. - # 2. At top-level session behave like `exit` command. - # 3. In a nested session behave like `cd ..`. - # - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/control_d_handler.rb#12 - def default(pry_instance); end - end -end - -# source://pry//lib/pry/pry_instance.rb#59 -Pry::EMPTY_COMPLETIONS = T.let(T.unsafe(nil), Array) - -# source://pry//lib/pry/editor.rb#6 -class Pry::Editor - include ::Pry::Helpers::OptionsHelpers - include ::Pry::Helpers::CommandHelpers - - # @return [Editor] a new instance of Editor - # - # source://pry//lib/pry/editor.rb#27 - def initialize(pry_instance); end - - # Generate the string that's used to start the editor. This includes - # all the flags we want as well as the file and line number we - # want to open at. - # - # source://pry//lib/pry/editor.rb#60 - def build_editor_invocation_string(file, line, blocking); end - - # source://pry//lib/pry/editor.rb#31 - def edit_tempfile_with_content(initial_content, line = T.unsafe(nil)); end - - # source://pry//lib/pry/editor.rb#41 - def invoke_editor(file, line, blocking = T.unsafe(nil)); end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/editor.rb#25 - def pry_instance; end - - private - - # Some editors that run outside the terminal allow you to control whether or - # not to block the process from which they were launched (in this case, Pry). - # For those editors, return the flag that produces the desired behavior. - # - # source://pry//lib/pry/editor.rb#100 - def blocking_flag_for_editor(blocking); end - - # Get the name of the binary that Pry.config.editor points to. - # - # This is useful for deciding which flags we pass to the editor as - # we can just use the program's name and ignore any absolute paths. - # - # @example - # Pry.config.editor="/home/conrad/bin/textmate -w" - # editor_name - # # => textmate - # - # source://pry//lib/pry/editor.rb#153 - def editor_name; end - - # Start the editor running, using the calculated invocation string - # - # source://pry//lib/pry/editor.rb#76 - def open_editor(editor_invocation); end - - # We need JRuby specific code here cos just shelling out using - # system() appears to be pretty broken :/ - # - # source://pry//lib/pry/editor.rb#89 - def open_editor_on_jruby(editor_invocation); end - - # Return the syntax for a given editor for starting the editor - # and moving to a particular line within that file - # - # source://pry//lib/pry/editor.rb#115 - def start_line_syntax_for_editor(file_name, line_number); end - - class << self - # source://pry//lib/pry/editor.rb#7 - def default; end - end -end - -# Env is a helper module to work with environment variables. -# -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/env.rb#8 -module Pry::Env - class << self - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/env.rb#9 - def [](key); end - end -end - -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/exception_handler.rb#6 -module Pry::ExceptionHandler - class << self - # Will only show the first line of the backtrace. - # - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/exception_handler.rb#9 - def handle_exception(output, exception, _pry_instance); end - - private - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/exception_handler.rb#37 - def cause_text(cause); end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/exception_handler.rb#32 - def exception_text(exception); end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/exception_handler.rb#19 - def standard_error_text_for(exception); end - end -end - -# source://pry//lib/pry/forwardable.rb#4 -module Pry::Forwardable - include ::Forwardable - - # Since Ruby 2.4, Forwardable will print a warning when - # calling a method that is private on a delegate, and - # in the future it could be an error: https://bugs.ruby-lang.org/issues/12782#note-3 - # - # That's why we revert to a custom implementation for delegating one - # private method to another. - # - # source://pry//lib/pry/forwardable.rb#16 - def def_private_delegators(target, *private_delegates); end -end - -# When we try to get a binding for an object, we try to define a method on -# that Object's singleton class. This doesn't work for "frozen" Object's, and -# the exception is just a vanilla RuntimeError. -# -# source://pry//lib/pry/exceptions.rb#56 -module Pry::FrozenObjectException - class << self - # source://pry//lib/pry/exceptions.rb#57 - def ===(exception); end - end -end - -# @return [Boolean] true if this Ruby supports safe levels and tainting, -# to guard against using deprecated or unsupported features -# -# source://pry//lib/pry/pry_class.rb#11 -Pry::HAS_SAFE_LEVEL = T.let(T.unsafe(nil), FalseClass) - -# source://pry//lib/pry/helpers/base_helpers.rb#4 -module Pry::Helpers - class << self - # source://pry//lib/pry/helpers/table.rb#27 - def tablify(things, line_length, pry_instance = T.unsafe(nil)); end - - # source://pry//lib/pry/helpers/table.rb#5 - def tablify_or_one_line(heading, things, pry_instance = T.unsafe(nil)); end - - # source://pry//lib/pry/helpers/table.rb#16 - def tablify_to_screen_width(things, options, pry_instance = T.unsafe(nil)); end - end -end - -# source://pry//lib/pry/helpers/base_helpers.rb#5 -module Pry::Helpers::BaseHelpers - extend ::Pry::Helpers::BaseHelpers - - # source://pry//lib/pry/helpers/base_helpers.rb#43 - def colorize_code(code); end - - # source://pry//lib/pry/helpers/base_helpers.rb#27 - def find_command(name, set = T.unsafe(nil)); end - - # formatting - # - # source://pry//lib/pry/helpers/base_helpers.rb#54 - def heading(text); end - - # source://pry//lib/pry/helpers/base_helpers.rb#47 - def highlight(string, regexp, highlight_color = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://pry//lib/pry/helpers/base_helpers.rb#34 - def not_a_real_file?(file); end - - # Acts like send but ignores any methods defined below Object or Class in the - # inheritance hierarchy. - # This is required to introspect methods on objects like Net::HTTP::Get that - # have overridden the `method` method. - # - # source://pry//lib/pry/helpers/base_helpers.rb#22 - def safe_send(obj, method, *args, &block); end - - # source://pry//lib/pry/helpers/base_helpers.rb#8 - def silence_warnings; end - - # Send the given text through the best available pager (if Pry.config.pager is - # enabled). Infers where to send the output if used as a mixin. - # DEPRECATED. - # - # source://pry//lib/pry/helpers/base_helpers.rb#62 - def stagger_output(text, _out = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://pry//lib/pry/helpers/base_helpers.rb#38 - def use_ansi_codes?; end -end - -# source://pry//lib/pry/helpers/command_helpers.rb#7 -module Pry::Helpers::CommandHelpers - include ::Pry::Helpers::OptionsHelpers - extend ::Pry::Helpers::OptionsHelpers - extend ::Pry::Helpers::CommandHelpers - - # source://pry//lib/pry/helpers/command_helpers.rb#115 - def absolute_index_number(line_number, array_length); end - - # source://pry//lib/pry/helpers/command_helpers.rb#123 - def absolute_index_range(range_or_number, array_length); end - - # source://pry//lib/pry/helpers/command_helpers.rb#31 - def get_method_or_raise(method_name, context, opts = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://pry//lib/pry/helpers/command_helpers.rb#21 - def internal_binding?(context); end - - # source://pry//lib/pry/helpers/command_helpers.rb#97 - def one_index_number(line_number); end - - # convert a 1-index range to a 0-indexed one - # - # source://pry//lib/pry/helpers/command_helpers.rb#102 - def one_index_range(range); end - - # source://pry//lib/pry/helpers/command_helpers.rb#106 - def one_index_range_or_number(range_or_number); end - - # Restrict a string to the given range of lines (1-indexed) - # - # @param content [String] The string. - # @param lines [Range, Integer] The line(s) to restrict it to. - # @return [String] The resulting string. - # - # source://pry//lib/pry/helpers/command_helpers.rb#92 - def restrict_to_lines(content, lines); end - - # source://pry//lib/pry/helpers/command_helpers.rb#135 - def set_file_and_dir_locals(file_name, pry = T.unsafe(nil), ctx = T.unsafe(nil)); end - - # Open a temp file and yield it to the block, closing it after - # - # @return [String] The path of the temp file - # - # source://pry//lib/pry/helpers/command_helpers.rb#14 - def temp_file(ext = T.unsafe(nil)); end - - # Remove any common leading whitespace from every line in `text`. This - # can be used to make a HEREDOC line up with the left margin, without - # sacrificing the indentation level of the source code. - # - # @example - # opt.banner(unindent(<<-USAGE)) - # Lorem ipsum dolor sit amet, consectetur adipisicing elit, - # sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - # "Ut enim ad minim veniam." - # USAGE - # @param dirty_text [String] The text from which to remove indentation - # @return [String] the text with indentation stripped - # - # source://pry//lib/pry/helpers/command_helpers.rb#68 - def unindent(dirty_text, left_padding = T.unsafe(nil)); end -end - -# This class contains methods useful for extracting -# documentation from methods and classes. -# -# source://pry//lib/pry/helpers/documentation_helpers.rb#7 -module Pry::Helpers::DocumentationHelpers - private - - # Given a string that makes up a comment in a source-code file parse out the content - # that the user is intended to read. (i.e. without leading indentation, #-characters - # or shebangs) - # - # @param comment [String] - # @return [String] - # - # source://pry//lib/pry/helpers/documentation_helpers.rb#67 - def get_comment_content(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#51 - def process_comment_markup(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#15 - def process_rdoc(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#45 - def process_yardoc(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#30 - def process_yardoc_tag(comment, tag); end - - # @param code [String] - # @return [String] - # - # source://pry//lib/pry/helpers/documentation_helpers.rb#57 - def strip_comments_from_c_code(code); end - - # @param text [String] - # @return [String] - # - # source://pry//lib/pry/helpers/documentation_helpers.rb#79 - def strip_leading_whitespace(text); end - - class << self - # Given a string that makes up a comment in a source-code file parse out the content - # that the user is intended to read. (i.e. without leading indentation, #-characters - # or shebangs) - # - # @param comment [String] - # @return [String] - # - # source://pry//lib/pry/helpers/documentation_helpers.rb#67 - def get_comment_content(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#51 - def process_comment_markup(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#15 - def process_rdoc(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#45 - def process_yardoc(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#30 - def process_yardoc_tag(comment, tag); end - - # @param code [String] - # @return [String] - # - # source://pry//lib/pry/helpers/documentation_helpers.rb#57 - def strip_comments_from_c_code(code); end - - # @param text [String] - # @return [String] - # - # source://pry//lib/pry/helpers/documentation_helpers.rb#79 - def strip_leading_whitespace(text); end - end -end - -# source://pry//lib/pry/helpers/documentation_helpers.rb#8 -Pry::Helpers::DocumentationHelpers::YARD_TAGS = T.let(T.unsafe(nil), Array) - -# source://pry//lib/pry/helpers/options_helpers.rb#5 -module Pry::Helpers::OptionsHelpers - private - - # Get the method object parsed by the slop instance - # - # source://pry//lib/pry/helpers/options_helpers.rb#23 - def method_object; end - - # Add method options to the Pry::Slop instance - # - # source://pry//lib/pry/helpers/options_helpers.rb#9 - def method_options(opt); end - - class << self - # Get the method object parsed by the slop instance - # - # source://pry//lib/pry/helpers/options_helpers.rb#23 - def method_object; end - - # Add method options to the Pry::Slop instance - # - # source://pry//lib/pry/helpers/options_helpers.rb#9 - def method_options(opt); end - end -end - -# Contains methods for querying the platform that Pry is running on -# -# @api public -# @since v0.12.0 -# -# source://pry//lib/pry/helpers/platform.rb#10 -module Pry::Helpers::Platform - class << self - # @api public - # @return [Boolean] - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#35 - def jruby?; end - - # @api public - # @return [Boolean] - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#40 - def jruby_19?; end - - # @api public - # @return [Boolean] - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#17 - def linux?; end - - # @api public - # @return [Boolean] - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#12 - def mac_osx?; end - - # @api public - # @return [Boolean] - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#45 - def mri?; end - - # @api public - # @return [Boolean] - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#50 - def mri_2?; end - - # @api public - # @return [Boolean] true when Pry is running on Windows with ANSI support, - # false otherwise - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#23 - def windows?; end - - # @api public - # @return [Boolean] - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#28 - def windows_ansi?; end - end -end - -# source://pry//lib/pry/helpers/table.rb#35 -class Pry::Helpers::Table - # @return [Table] a new instance of Table - # - # source://pry//lib/pry/helpers/table.rb#37 - def initialize(items, args, pry_instance = T.unsafe(nil)); end - - # source://pry//lib/pry/helpers/table.rb#81 - def ==(other); end - - # Returns the value of attribute column_count. - # - # source://pry//lib/pry/helpers/table.rb#36 - def column_count; end - - # source://pry//lib/pry/helpers/table.rb#68 - def column_count=(count); end - - # source://pry//lib/pry/helpers/table.rb#77 - def columns; end - - # @return [Boolean] - # - # source://pry//lib/pry/helpers/table.rb#73 - def fits_on_line?(line_length); end - - # Returns the value of attribute items. - # - # source://pry//lib/pry/helpers/table.rb#36 - def items; end - - # source://pry//lib/pry/helpers/table.rb#62 - def items=(items); end - - # source://pry//lib/pry/helpers/table.rb#47 - def rows_to_s(style = T.unsafe(nil)); end - - # source://pry//lib/pry/helpers/table.rb#85 - def to_a; end - - # source://pry//lib/pry/helpers/table.rb#43 - def to_s; end - - private - - # source://pry//lib/pry/helpers/table.rb#91 - def _max_width(things); end - - # source://pry//lib/pry/helpers/table.rb#95 - def _rebuild_colorless_cache; end - - # source://pry//lib/pry/helpers/table.rb#116 - def _recall_color_for(thing); end - - # source://pry//lib/pry/helpers/table.rb#105 - def _recolumn; end -end - -# The methods defined on {Text} are available to custom commands via -# {Pry::Command#text}. -# -# source://pry//lib/pry/helpers/text.rb#7 -module Pry::Helpers::Text - extend ::Pry::Helpers::Text - - # source://pry//lib/pry/helpers/text.rb#23 - def black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#23 - def blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_yellow(text); end - - # Returns _text_ as bold text for use on a terminal. - # - # @param text [String, #to_s] - # @return [String] _text_ - # - # source://pry//lib/pry/helpers/text.rb#54 - def bold(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#23 - def cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_yellow(text); end - - # Returns `text` in the default foreground colour. - # Use this instead of "black" or "white" when you mean absence of colour. - # - # @param text [String, #to_s] - # @return [String] - # - # source://pry//lib/pry/helpers/text.rb#63 - def default(text); end - - # source://pry//lib/pry/helpers/text.rb#23 - def green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_yellow(text); end - - # Returns _text_ indented by _chars_ spaces. - # - # @param text [String] - # @param chars [Fixnum] - # - # source://pry//lib/pry/helpers/text.rb#113 - def indent(text, chars); end - - # source://pry//lib/pry/helpers/text.rb#23 - def magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_yellow(text); end - - # @return [void] - # @yield Yields a block with color turned off. - # - # source://pry//lib/pry/helpers/text.rb#73 - def no_color; end - - # @return [void] - # @yield Yields a block with paging turned off. - # - # source://pry//lib/pry/helpers/text.rb#87 - def no_pager; end - - # source://pry//lib/pry/helpers/text.rb#23 - def purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#23 - def red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_yellow(text); end - - # Remove any color codes from _text_. - # - # @param text [String, #to_s] - # @return [String] _text_ stripped of any color codes. - # - # source://pry//lib/pry/helpers/text.rb#46 - def strip_color(text); end - - # source://pry//lib/pry/helpers/text.rb#23 - def white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_yellow(text); end - - # Returns _text_ in a numbered list, beginning at _offset_. - # - # @param text [#each_line] - # @param offset [Fixnum] - # @return [String] - # - # source://pry//lib/pry/helpers/text.rb#100 - def with_line_numbers(text, offset, color = T.unsafe(nil)); end - - # source://pry//lib/pry/helpers/text.rb#23 - def yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_yellow(text); end -end - -# source://pry//lib/pry/helpers/text.rb#10 -Pry::Helpers::Text::COLORS = T.let(T.unsafe(nil), Hash) - -# The History class is responsible for maintaining the user's input history, -# both internally and within Readline. -# -# source://pry//lib/pry/history.rb#6 -class Pry::History - # @return [History] a new instance of History - # - # source://pry//lib/pry/history.rb#29 - def initialize(options = T.unsafe(nil)); end - - # Add a line to the input history, ignoring blank and duplicate lines. - # - # @param line [String] - # @return [String] The same line that was passed in - # - # source://pry//lib/pry/history.rb#53 - def <<(line); end - - # Clear this session's history. This won't affect the contents of the - # history file. - # - # source://pry//lib/pry/history.rb#74 - def clear; end - - # Filter the history with the histignore options - # - # @return [Array] An array containing all the lines that are not - # included in the histignore. - # - # source://pry//lib/pry/history.rb#95 - def filter(history); end - - # @return [Integer] total number of lines, including original lines - # - # source://pry//lib/pry/history.rb#27 - def history_line_count; end - - # Load the input history using `History.loader`. - # - # @return [Integer] The number of lines loaded - # - # source://pry//lib/pry/history.rb#40 - def load; end - - # Returns the value of attribute loader. - # - # source://pry//lib/pry/history.rb#21 - def loader; end - - # Sets the attribute loader - # - # @param value the value to set the attribute loader to. - # - # source://pry//lib/pry/history.rb#21 - def loader=(_arg0); end - - # @return [Fixnum] Number of lines in history when Pry first loaded. - # - # source://pry//lib/pry/history.rb#24 - def original_lines; end - - # Add a line to the input history, ignoring blank and duplicate lines. - # - # @param line [String] - # @return [String] The same line that was passed in - # - # source://pry//lib/pry/history.rb#53 - def push(line); end - - # Returns the value of attribute saver. - # - # source://pry//lib/pry/history.rb#21 - def saver; end - - # Sets the attribute saver - # - # @param value the value to set the attribute saver to. - # - # source://pry//lib/pry/history.rb#21 - def saver=(_arg0); end - - # @return [Fixnum] The number of lines in history from just this session. - # - # source://pry//lib/pry/history.rb#81 - def session_line_count; end - - # Return an Array containing all stored history. - # - # @return [Array] An Array containing all lines of history loaded - # or entered by the user in the current session. - # - # source://pry//lib/pry/history.rb#88 - def to_a; end - - private - - # The history file, opened for appending. - # - # source://pry//lib/pry/history.rb#127 - def history_file; end - - # source://pry//lib/pry/history.rb#143 - def history_file_path; end - - # @return [Boolean] - # - # source://pry//lib/pry/history.rb#147 - def invalid_readline_line?(line); end - - # The default loader. Yields lines from `Pry.config.history_file`. - # - # source://pry//lib/pry/history.rb#113 - def read_from_file; end - - # The default saver. Appends the given line to `Pry.config.history_file`. - # - # source://pry//lib/pry/history.rb#122 - def save_to_file(line); end - - # Check if the line match any option in the histignore - # [Pry.config.history_ignorelist] - # - # @return [Boolean] a boolean that notifies if the line was found in the - # histignore array. - # - # source://pry//lib/pry/history.rb#105 - def should_ignore?(line); end - - class << self - # source://pry//lib/pry/history.rb#7 - def default_file; end - end -end - -# Implements a hooks system for Pry. A hook is a callable that is associated -# with an event. A number of events are currently provided by Pry, these -# include: `:when_started`, `:before_session`, `:after_session`. A hook must -# have a name, and is connected with an event by the `Pry::Hooks#add_hook` -# method. -# -# @example Adding a hook for the `:before_session` event. -# Pry.config.hooks.add_hook(:before_session, :say_hi) do -# puts "hello" -# end -# -# source://pry//lib/pry/hooks.rb#14 -class Pry::Hooks - # @return [Hooks] a new instance of Hooks - # - # source://pry//lib/pry/hooks.rb#25 - def initialize; end - - # Add a new hook to be executed for the `event_name` event. - # - # @param event_name [Symbol] The name of the event. - # @param hook_name [Symbol] The name of the hook. - # @param callable [#call] The callable. - # @raise [ArgumentError] - # @return [Pry:Hooks] The receiver. - # @yield The block to use as the callable (if no `callable` provided). - # - # source://pry//lib/pry/hooks.rb#81 - def add_hook(event_name, hook_name, callable = T.unsafe(nil), &block); end - - # Clear all hooks functions for a given event. - # - # @param event_name [String] The name of the event. - # @return [void] - # - # source://pry//lib/pry/hooks.rb#165 - def clear_event_hooks(event_name); end - - # @param event_name [Symbol] The name of the event. - # @param hook_name [Symbol] The name of the hook. - # to delete. - # @return [#call] The deleted hook. - # - # source://pry//lib/pry/hooks.rb#147 - def delete_hook(event_name, hook_name); end - - # source://pry//lib/pry/hooks.rb#39 - def errors; end - - # Execute the list of hooks for the `event_name` event. - # - # @param event_name [Symbol] The name of the event. - # @param args [Array] The arguments to pass to each hook function. - # @return [Object] The return value of the last executed hook. - # - # source://pry//lib/pry/hooks.rb#108 - def exec_hook(event_name, *args, &block); end - - # @param event_name [Symbol] The name of the event. - # @param hook_name [Symbol] The name of the hook - # @return [#call] a specific hook for a given event. - # - # source://pry//lib/pry/hooks.rb#128 - def get_hook(event_name, hook_name); end - - # `add_hook`/`delete_hook` for that. - # - # @note Modifying the returned hash does not alter the hooks, use - # @param event_name [Symbol] The name of the event. - # @return [Hash] The hash of hook names / hook functions. - # - # source://pry//lib/pry/hooks.rb#139 - def get_hooks(event_name); end - - # @param event_name [Symbol] The name of the event. - # @return [Fixnum] The number of hook functions for `event_name`. - # - # source://pry//lib/pry/hooks.rb#121 - def hook_count(event_name); end - - # @param event_name [Symbol] Name of the event. - # @param hook_name [Symbol] Name of the hook. - # @return [Boolean] Whether the hook by the name `hook_name`. - # - # source://pry//lib/pry/hooks.rb#172 - def hook_exists?(event_name, hook_name); end - - # @example - # hooks = Pry::Hooks.new.add_hook(:before_session, :say_hi) { puts "hi!" } - # Pry::Hooks.new.merge(hooks) - # @param other [Pry::Hooks] The `Pry::Hooks` instance to merge - # @return [Pry::Hooks] a new `Pry::Hooks` instance containing a merge of the - # contents of two `Pry:Hooks` instances. - # - # source://pry//lib/pry/hooks.rb#69 - def merge(other); end - - # Destructively merge the contents of two `Pry:Hooks` instances. - # - # @param other [Pry::Hooks] The `Pry::Hooks` instance to merge - # @return [Pry:Hooks] The receiver. - # @see #merge - # - # source://pry//lib/pry/hooks.rb#48 - def merge!(other); end - - protected - - # Returns the value of attribute hooks. - # - # source://pry//lib/pry/hooks.rb#178 - def hooks; end - - private - - # Ensure that duplicates have their @hooks object. - # - # source://pry//lib/pry/hooks.rb#30 - def initialize_copy(_orig); end - - class << self - # source://pry//lib/pry/hooks.rb#15 - def default; end - end -end - -# Pry::Indent is a class that can be used to indent a number of lines -# containing Ruby code similar as to how IRB does it (but better). The class -# works by tokenizing a string using CodeRay and then looping over those -# tokens. Based on the tokens in a line of code that line (or the next one) -# will be indented or un-indented by correctly. -# -# source://pry//lib/pry/indent.rb#11 -class Pry::Indent - include ::Pry::Helpers::BaseHelpers - - # @return [Indent] a new instance of Indent - # - # source://pry//lib/pry/indent.rb#104 - def initialize(pry_instance = T.unsafe(nil)); end - - # Return a string which, when printed, will rewrite the previous line with - # the correct indentation. Mostly useful for fixing 'end'. - # - # @param prompt [String] The user's prompt - # @param code [String] The code the user just typed in - # @param overhang [Integer] The number of characters to erase afterwards (the - # the difference in length between the old line and the new one) - # @return [String] correctly indented line - # - # source://pry//lib/pry/indent.rb#393 - def correct_indentation(prompt, code, overhang = T.unsafe(nil)); end - - # Get the indentation for the start of the next line. - # - # This is what's used between the prompt and the cursor in pry. - # - # @return String The correct number of spaces - # - # source://pry//lib/pry/indent.rb#181 - def current_prefix; end - - # If the code just before an "if" or "while" token on a line looks like the - # end of a statement, then we want to treat that "if" as a singleline, not - # multiline statement. - # - # @return [Boolean] - # - # source://pry//lib/pry/indent.rb#264 - def end_of_statement?(last_token, last_kind); end - - # Are we currently in the middle of a string literal. - # - # This is used to determine whether to re-indent a given line, we mustn't - # re-indent within string literals because to do so would actually change - # the value of the String! - # - # @return [Boolean] Boolean - # - # source://pry//lib/pry/indent.rb#275 - def in_string?; end - - # Indents a string and returns it. This string can either be a single line - # or multiple ones. - # - # @example - # str = <] - # - # source://pry//lib/pry/indent.rb#376 - def module_nesting; end - - # All the open delimiters, in the order that they first appeared. - # - # @return [String] - # - # source://pry//lib/pry/indent.rb#312 - def open_delimiters; end - - # Return a string which restores the CodeRay string status to the correct value by - # opening HEREDOCs and strings. - # - # @return String - # - # source://pry//lib/pry/indent.rb#320 - def open_delimiters_line; end - - # reset internal state - # - # source://pry//lib/pry/indent.rb#110 - def reset; end - - # @return [Array] The stack of open tokens. - # - # source://pry//lib/pry/indent.rb#21 - def stack; end - - # Given a string of Ruby code, use CodeRay to export the tokens. - # - # @param string [String] The Ruby to lex - # @return [Array] An Array of pairs of [token_value, token_type] - # - # source://pry//lib/pry/indent.rb#283 - def tokenize(string); end - - # Update the internal state about what kind of strings are open. - # - # Most of the complication here comes from the fact that HEREDOCs can be - # nested. For normal strings (which can't be nested) we assume that CodeRay - # correctly pairs open-and-close delimiters so we don't bother checking what - # they are. - # - # @param token [String] The token (of type :delimiter) - # - # source://pry//lib/pry/indent.rb#297 - def track_delimiter(token); end - - # Update the internal state relating to module nesting. - # - # It's responsible for adding to the @module_nesting array, which looks - # something like: - # - # [ ["class", "Foo"], ["module", "Bar::Baz"], ["class <<", "self"] ] - # - # A nil value in the @module_nesting array happens in two places: either - # when @awaiting_class is true and we're still waiting for the string to - # fill that space, or when a parse was rejected. - # - # At the moment this function is quite restricted about what formats it will - # parse, for example we disallow expressions after the class keyword. This - # could maybe be improved in the future. - # - # @param token [String] a token from Coderay - # @param kind [Symbol] the kind of that token - # - # source://pry//lib/pry/indent.rb#341 - def track_module_nesting(token, kind); end - - # Update the internal state relating to module nesting on 'end'. - # - # If the current 'end' pairs up with a class or a module then we should - # pop an array off of @module_nesting - # - # @param token [String] a token from Coderay - # @param kind [Symbol] the kind of that token - # - # source://pry//lib/pry/indent.rb#366 - def track_module_nesting_end(token, kind = T.unsafe(nil)); end - - class << self - # Clean the indentation of a fragment of ruby. - # - # @param str [String] - # @return [String] - # - # source://pry//lib/pry/indent.rb#82 - def indent(str); end - - # Get the module nesting at the given point in the given string. - # - # NOTE If the line specified contains a method definition, then the nesting - # at the start of the method definition is used. Otherwise the nesting from - # the end of the line is used. - # - # @param str [String] The ruby code to analyze - # @param line_number [Fixnum] The line number (starting from 1) - # @return [Array] - # - # source://pry//lib/pry/indent.rb#95 - def nesting_at(str, line_number); end - end -end - -# Collection of token types that should be ignored. Without this list -# keywords such as "class" inside strings would cause the code to be -# indented incorrectly. -# -# :pre_constant and :preserved_constant are the CodeRay 0.9.8 and 1.0.0 -# classifications of "true", "false", and "nil". -# -# source://pry//lib/pry/indent.rb#60 -Pry::Indent::IGNORE_TOKENS = T.let(T.unsafe(nil), Array) - -# Collection of tokens that should appear dedented even though they -# don't affect the surrounding code. -# -# source://pry//lib/pry/indent.rb#76 -Pry::Indent::MIDWAY_TOKENS = T.let(T.unsafe(nil), Array) - -# Hash containing all the tokens that should increase the indentation -# level. The keys of this hash are open tokens, the values the matching -# tokens that should prevent a line from being indented if they appear on -# the same line. -# -# source://pry//lib/pry/indent.rb#30 -Pry::Indent::OPEN_TOKENS = T.let(T.unsafe(nil), Hash) - -# Which tokens can be followed by an optional "do" keyword. -# -# source://pry//lib/pry/indent.rb#52 -Pry::Indent::OPTIONAL_DO_TOKENS = T.let(T.unsafe(nil), Array) - -# Which tokens can either be open tokens, or appear as modifiers on -# a single-line. -# -# source://pry//lib/pry/indent.rb#49 -Pry::Indent::SINGLELINE_TOKENS = T.let(T.unsafe(nil), Array) - -# The amount of spaces to insert for each indent level. -# -# source://pry//lib/pry/indent.rb#24 -Pry::Indent::SPACES = T.let(T.unsafe(nil), String) - -# Tokens that indicate the end of a statement (i.e. that, if they appear -# directly before an "if" indicates that that if applies to the same line, -# not the next line) -# -# :reserved and :keywords are the CodeRay 0.9.8 and 1.0.0 respectively -# classifications of "super", "next", "return", etc. -# -# source://pry//lib/pry/indent.rb#69 -Pry::Indent::STATEMENT_END_TOKENS = T.let(T.unsafe(nil), Array) - -# Raised if {#module_nesting} would not work. -# -# source://pry//lib/pry/indent.rb#15 -class Pry::Indent::UnparseableNestingError < ::StandardError; end - -# source://pry//lib/pry/input_completer.rb#6 -class Pry::InputCompleter - # @return [InputCompleter] a new instance of InputCompleter - # - # source://pry//lib/pry/input_completer.rb#42 - def initialize(input, pry = T.unsafe(nil)); end - - # build_path seperates the input into two parts: path and input. - # input is the partial string that should be completed - # path is a proc that takes an input and builds a full path. - # - # source://pry//lib/pry/input_completer.rb#240 - def build_path(input); end - - # Return a new completion proc for use by Readline. - # - # source://pry//lib/pry/input_completer.rb#56 - def call(str, options = T.unsafe(nil)); end - - # source://pry//lib/pry/input_completer.rb#255 - def ignored_modules; end - - # source://pry//lib/pry/input_completer.rb#229 - def select_message(path, receiver, message, candidates); end -end - -# source://pry//lib/pry/input_completer.rb#8 -Pry::InputCompleter::ARRAY_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#15 -Pry::InputCompleter::CONSTANT_OR_METHOD_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#14 -Pry::InputCompleter::CONSTANT_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#17 -Pry::InputCompleter::GLOBALVARIABLE_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#16 -Pry::InputCompleter::HEX_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#7 -Pry::InputCompleter::NUMERIC_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#12 -Pry::InputCompleter::PROC_OR_HASH_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#11 -Pry::InputCompleter::REGEX_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#20 -Pry::InputCompleter::RESERVED_WORDS = T.let(T.unsafe(nil), Array) - -# source://pry//lib/pry/input_completer.rb#10 -Pry::InputCompleter::SYMBOL_METHOD_CALL_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#9 -Pry::InputCompleter::SYMBOL_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#13 -Pry::InputCompleter::TOPLEVEL_LOOKUP_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#18 -Pry::InputCompleter::VARIABLE_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#40 -Pry::InputCompleter::WORD_ESCAPE_STR = T.let(T.unsafe(nil), String) - -# There is one InputLock per input (such as STDIN) as two REPLs on the same -# input makes things delirious. InputLock serializes accesses to the input so -# that threads to not conflict with each other. The latest thread to request -# ownership of the input wins. -# -# source://pry//lib/pry/input_lock.rb#8 -class Pry::InputLock - # @return [InputLock] a new instance of InputLock - # - # source://pry//lib/pry/input_lock.rb#29 - def initialize; end - - # Adds ourselves to the ownership list. The last one in the list may access - # the input through interruptible_region(). - # - # source://pry//lib/pry/input_lock.rb#38 - def __with_ownership; end - - # source://pry//lib/pry/input_lock.rb#81 - def enter_interruptible_region; end - - # source://pry//lib/pry/input_lock.rb#108 - def interruptible_region; end - - # source://pry//lib/pry/input_lock.rb#95 - def leave_interruptible_region; end - - # source://pry//lib/pry/input_lock.rb#75 - def with_ownership(&block); end - - class << self - # source://pry//lib/pry/input_lock.rb#19 - def for(input); end - - # Returns the value of attribute global_lock. - # - # source://pry//lib/pry/input_lock.rb#13 - def global_lock; end - - # Sets the attribute global_lock - # - # @param value the value to set the attribute global_lock to. - # - # source://pry//lib/pry/input_lock.rb#13 - def global_lock=(_arg0); end - - # Returns the value of attribute input_locks. - # - # source://pry//lib/pry/input_lock.rb#12 - def input_locks; end - - # Sets the attribute input_locks - # - # @param value the value to set the attribute input_locks to. - # - # source://pry//lib/pry/input_lock.rb#12 - def input_locks=(_arg0); end - end -end - -# source://pry//lib/pry/input_lock.rb#9 -class Pry::InputLock::Interrupt < ::Exception; end - -# source://pry//lib/pry/inspector.rb#4 -class Pry::Inspector; end - -# source://pry//lib/pry/inspector.rb#5 -Pry::Inspector::MAP = T.let(T.unsafe(nil), Hash) - -# source://pry//lib/pry/pry_class.rb#7 -Pry::LOCAL_RC_FILE = T.let(T.unsafe(nil), String) - -# source://pry//lib/pry/last_exception.rb#12 -class Pry::LastException < ::BasicObject - # @return [LastException] a new instance of LastException - # - # source://pry//lib/pry/last_exception.rb#15 - def initialize(exception); end - - # Returns the value of attribute bt_index. - # - # source://pry//lib/pry/last_exception.rb#13 - def bt_index; end - - # Sets the attribute bt_index - # - # @param value the value to set the attribute bt_index to. - # - # source://pry//lib/pry/last_exception.rb#13 - def bt_index=(_arg0); end - - # source://pry//lib/pry/last_exception.rb#52 - def bt_source_location_for(index); end - - # @return [String] returns the path to a file for the current backtrace. see {#bt_index}. - # - # source://pry//lib/pry/last_exception.rb#37 - def file; end - - # source://pry//lib/pry/last_exception.rb#57 - def inc_bt_index; end - - # @return [Fixnum] returns the line for the current backtrace. see {#bt_index}. - # - # source://pry//lib/pry/last_exception.rb#43 - def line; end - - # source://pry//lib/pry/last_exception.rb#21 - def method_missing(name, *args, &block); end - - # @return [Exception] returns the wrapped exception - # - # source://pry//lib/pry/last_exception.rb#48 - def wrapped_exception; end - - private - - # @return [Boolean] - # - # source://pry//lib/pry/last_exception.rb#29 - def respond_to_missing?(name, include_all = T.unsafe(nil)); end -end - -# This class wraps the normal `Method` and `UnboundMethod` classes -# to provide extra functionality useful to Pry. -# -# source://pry//lib/pry/method.rb#20 -class Pry::Method - include ::Pry::Helpers::BaseHelpers - include ::Pry::Helpers::DocumentationHelpers - include ::Pry::CodeObject::Helpers - extend ::Pry::Helpers::BaseHelpers - extend ::Forwardable - extend ::Pry::Forwardable - - # A new instance of `Pry::Method` wrapping the given `::Method`, - # `UnboundMethod`, or `Proc`. - # - # @param method [::Method, UnboundMethod, Proc] - # @param known_info [Hash] Can be used to pre-cache expensive to compute stuff. - # @return [Pry::Method] - # - # source://pry//lib/pry/method.rb#263 - def initialize(method, known_info = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#483 - def ==(other); end - - # @return [Boolean] Is the method definitely an alias? - # - # source://pry//lib/pry/method.rb#478 - def alias?; end - - # @return [Array] All known aliases for the method. - # - # source://pry//lib/pry/method.rb#461 - def aliases; end - - # @return [Boolean] Whether the method is bound. - # - # source://pry//lib/pry/method.rb#446 - def bound_method?; end - - # source://pry//lib/pry/method.rb#515 - def comment; end - - # @return [String, nil] The documentation for the method, or `nil` if it's - # unavailable. - # - # source://pry//lib/pry/method.rb#329 - def doc; end - - # @return [Boolean] Was the method defined outside a source file? - # - # source://pry//lib/pry/method.rb#436 - def dynamically_defined?; end - - # @param klass [Class] - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#491 - def is_a?(klass); end - - # @param klass [Class] - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#491 - def kind_of?(klass); end - - # Delegate any unknown calls to the wrapped method. - # - # source://pry//lib/pry/method.rb#503 - def method_missing(method_name, *args, &block); end - - # Get the name of the method as a String, regardless of the underlying - # Method#name type. - # - # @return [String] - # - # source://pry//lib/pry/method.rb#272 - def name; end - - # Get the name of the method including the class on which it was defined. - # - # @example - # method(:puts).method_name - # => "Kernel.puts" - # @return [String] - # - # source://pry//lib/pry/method.rb#299 - def name_with_owner; end - - # @return [String, nil] The original name the method was defined under, - # before any aliasing, or `nil` if it can't be determined. - # - # source://pry//lib/pry/method.rb#429 - def original_name; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def owner(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def parameters(*args, **_arg1, &block); end - - # @return [Boolean] Was the method defined within the Pry REPL? - # - # source://pry//lib/pry/method.rb#456 - def pry_method?; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def receiver(*args, **_arg1, &block); end - - # Update the live copy of the method's source. - # - # source://pry//lib/pry/method.rb#314 - def redefine(source); end - - # @param method_name [String, Symbol] - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#498 - def respond_to?(method_name, include_all = T.unsafe(nil)); end - - # @return [String] A representation of the method's signature, including its - # name and parameters. Optional and "rest" parameters are marked with `*` - # and block parameters with `&`. Keyword arguments are shown with `:` - # If the parameter names are unavailable, they're given numbered names instead. - # Paraphrased from `awesome_print` gem. - # - # source://pry//lib/pry/method.rb#391 - def signature; end - - # @return [Boolean] Whether the method is a singleton method. - # - # source://pry//lib/pry/method.rb#451 - def singleton_method?; end - - # @return [String, nil] The source code of the method, or `nil` if it's unavailable. - # - # source://pry//lib/pry/method.rb#304 - def source; end - - # Can we get the source code for this method? - # - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#321 - def source?; end - - # @return [String, nil] The name of the file the method is defined in, or - # `nil` if the filename is unavailable. - # - # source://pry//lib/pry/method.rb#348 - def source_file; end - - # @return [Fixnum, nil] The line of code in `source_file` which begins - # the method's definition, or `nil` if that information is unavailable. - # - # source://pry//lib/pry/method.rb#361 - def source_line; end - - # @return [Range, nil] The range of lines in `source_file` which contain - # the method's definition, or `nil` if that information is unavailable. - # - # source://pry//lib/pry/method.rb#367 - def source_range; end - - # @return [Symbol] The source type of the method. The options are - # `:ruby` for Ruby methods or `:c` for methods written in C. - # - # source://pry//lib/pry/method.rb#342 - def source_type; end - - # @return [Pry::Method, nil] The wrapped method that is called when you - # use "super" in the body of this method. - # - # source://pry//lib/pry/method.rb#417 - def super(times = T.unsafe(nil)); end - - # @return [Boolean] Whether the method is unbound. - # - # source://pry//lib/pry/method.rb#441 - def unbound_method?; end - - # Is the method undefined? (aka `Disowned`) - # - # @return [Boolean] false - # - # source://pry//lib/pry/method.rb#290 - def undefined?; end - - # @return [Symbol] The visibility of the method. May be `:public`, - # `:protected`, or `:private`. - # - # source://pry//lib/pry/method.rb#373 - def visibility; end - - # Get underlying object wrapped by this Pry::Method instance - # - # @return [Method, UnboundMethod, Proc] - # - # source://pry//lib/pry/method.rb#284 - def wrapped; end - - # Get the owner of the method as a Pry::Module - # - # @return [Pry::Module] - # - # source://pry//lib/pry/method.rb#278 - def wrapped_owner; end - - private - - # source://pry//lib/pry/method.rb#578 - def c_source; end - - # @param first_ln [String] The first line of a method definition. - # @return [String, nil] - # - # source://pry//lib/pry/method.rb#564 - def method_name_from_first_line(first_ln); end - - # @raise [CommandError] when the method can't be found or `pry-doc` isn't installed. - # @return [YARD::CodeObjects::MethodObject] - # - # source://pry//lib/pry/method.rb#523 - def pry_doc_info; end - - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#511 - def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end - - # source://pry//lib/pry/method.rb#583 - def ruby_source; end - - # @param ancestors [Class, Module] The ancestors to investigate - # @return [Method] The unwrapped super-method - # - # source://pry//lib/pry/method.rb#543 - def super_using_ancestors(ancestors, times = T.unsafe(nil)); end - - class << self - # Get all of the instance methods of a `Class` or `Module` - # - # @param klass [Class, Module] - # @param include_super [Boolean] Whether to include methods from ancestors. - # @return [Array[Pry::Method]] - # - # source://pry//lib/pry/method.rb#161 - def all_from_class(klass, include_super = T.unsafe(nil)); end - - # Get all of the methods on an `Object` - # - # @param obj [Object] - # @param include_super [Boolean] indicates whether or not to include methods from ancestors. - # @return [Array[Pry::Method]] - # - # source://pry//lib/pry/method.rb#184 - def all_from_obj(obj, include_super = T.unsafe(nil)); end - - # Given a `Binding`, try to extract the `::Method` it originated from and - # use it to instantiate a `Pry::Method`. Return `nil` if this isn't - # possible. - # - # @param binding [Binding] - # @return [Pry::Method, nil] - # - # source://pry//lib/pry/method.rb#77 - def from_binding(binding); end - - # Given a `Class` or `Module` and the name of a method, try to - # instantiate a `Pry::Method` containing the instance method of - # that name. Return `nil` if no such method exists. - # - # @param klass [Class, Module] - # @param name [String] - # @param target [Binding] The binding where the method is looked up. - # @return [Pry::Method, nil] - # - # source://pry//lib/pry/method.rb#136 - def from_class(klass, name, target = T.unsafe(nil)); end - - # Given a `Class` or `Module` and the name of a method, try to - # instantiate a `Pry::Method` containing the instance method of - # that name. Return `nil` if no such method exists. - # - # @param klass [Class, Module] - # @param name [String] - # @param target [Binding] The binding where the method is looked up. - # @return [Pry::Method, nil] - # - # source://pry//lib/pry/method.rb#136 - def from_module(klass, name, target = T.unsafe(nil)); end - - # Given an object and the name of a method, try to instantiate - # a `Pry::Method` containing the method of that name bound to - # that object. Return `nil` if no such method exists. - # - # @param obj [Object] - # @param name [String] - # @param target [Binding] The binding where the method is looked up. - # @return [Pry::Method, nil] - # - # source://pry//lib/pry/method.rb#151 - def from_obj(obj, name, target = T.unsafe(nil)); end - - # Given a string representing a method name and optionally a binding to - # search in, find and return the requested method wrapped in a - # `Pry::Method` instance. - # - # @option options - # @option options - # @param name [String] The name of the method to retrieve. - # @param target [Binding] The context in which to search for the method. - # @param options [Hash] - # @return [Pry::Method, nil] A `Pry::Method` instance containing the - # requested method, or `nil` if name is `nil` or no method could be - # located matching the parameters. - # - # source://pry//lib/pry/method.rb#43 - def from_str(name, target = T.unsafe(nil), options = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#227 - def instance_method_definition?(name, definition_line); end - - # Get every `Class` and `Module`, in order, that will be checked when looking - # for methods on instances of the given `Class` or `Module`. - # This does not treat singleton classes of classes specially. - # - # @param klass [Class, Module] - # @return [Array[Class, Module]] - # - # source://pry//lib/pry/method.rb#210 - def instance_resolution_order(klass); end - - # In order to support 2.0 Refinements we need to look up methods - # inside the relevant Binding. - # - # @param obj [Object] The owner/receiver of the method. - # @param method_name [Symbol] The name of the method. - # @param method_type [Symbol] The type of method: :method or :instance_method - # @param target [Binding] The binding where the method is looked up. - # @return [Method, UnboundMethod] The 'refined' method object. - # - # source://pry//lib/pry/method.rb#114 - def lookup_method_via_binding(obj, method_name, method_type, target = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#215 - def method_definition?(name, definition_line); end - - # Get every `Class` and `Module`, in order, that will be checked when looking - # for an instance method to call on this object. - # - # @param obj [Object] - # @return [Array[Class, Module]] - # - # source://pry//lib/pry/method.rb#192 - def resolution_order(obj); end - - # source://pry//lib/pry/method.rb#247 - def singleton_class_of(obj); end - - # Get the singleton classes of superclasses that could define methods on - # the given class object, and any modules they include. - # If a module is included at multiple points in the ancestry, only - # the lowest copy will be returned. - # - # source://pry//lib/pry/method.rb#238 - def singleton_class_resolution_order(klass); end - - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#220 - def singleton_method_definition?(name, definition_line); end - end -end - -# A Disowned Method is one that's been removed from the class on which it was defined. -# -# e.g. -# class C -# def foo -# C.send(:undefine_method, :foo) -# Pry::Method.from_binding(binding) -# end -# end -# -# In this case we assume that the "owner" is the singleton class of the receiver. -# -# This occurs mainly in Sinatra applications. -# -# source://pry//lib/pry/method/disowned.rb#18 -class Pry::Method::Disowned < ::Pry::Method - # Create a new Disowned method. - # - # @param receiver [Object] - # @param method_name [String] - # @return [Disowned] a new instance of Disowned - # - # source://pry//lib/pry/method/disowned.rb#25 - def initialize(receiver, method_name); end - - # Raise a more useful error message instead of trying to forward to nil. - # - # source://pry//lib/pry/method/disowned.rb#52 - def method_missing(method_name, *args, &block); end - - # Returns the value of attribute name. - # - # source://pry//lib/pry/method/disowned.rb#19 - def name; end - - # Get the hypothesized owner of the method. - # - # @return [Object] - # - # source://pry//lib/pry/method/disowned.rb#46 - def owner; end - - # Returns the value of attribute receiver. - # - # source://pry//lib/pry/method/disowned.rb#19 - def receiver; end - - # Can we get the source for this method? - # - # @return [Boolean] false - # - # source://pry//lib/pry/method/disowned.rb#39 - def source?; end - - # Is the method undefined? (aka `Disowned`) - # - # @return [Boolean] true - # - # source://pry//lib/pry/method/disowned.rb#33 - def undefined?; end - - private - - # @return [Boolean] - # - # source://pry//lib/pry/method/disowned.rb#62 - def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end -end - -# source://pry//lib/pry/method/patcher.rb#5 -class Pry::Method::Patcher - # @return [Patcher] a new instance of Patcher - # - # source://pry//lib/pry/method/patcher.rb#12 - def initialize(method); end - - # Returns the value of attribute method. - # - # source://pry//lib/pry/method/patcher.rb#6 - def method; end - - # Sets the attribute method - # - # @param value the value to set the attribute method to. - # - # source://pry//lib/pry/method/patcher.rb#6 - def method=(_arg0); end - - # perform the patch - # - # source://pry//lib/pry/method/patcher.rb#21 - def patch_in_ram(source); end - - private - - # source://pry//lib/pry/method/patcher.rb#38 - def cache_key; end - - # Update the definition line so that it can be eval'd directly on the Method's - # owner instead of from the original context. - # - # In particular this takes `def self.foo` and turns it into `def foo` so that we - # don't end up creating the method on the singleton class of the singleton class - # by accident. - # - # This is necessarily done by String manipulation because we can't find out what - # syntax is needed for the argument list by ruby-level introspection. - # - # @param line [String] The original definition line. e.g. def self.foo(bar, baz=1) - # @return [String] The new definition line. e.g. def foo(bar, baz=1) - # - # source://pry//lib/pry/method/patcher.rb#78 - def definition_for_owner(line); end - - # source://pry//lib/pry/method/patcher.rb#33 - def redefine(source); end - - # Run some code ensuring that at the end target#meth_name will not have changed. - # - # When we're redefining aliased methods we will overwrite the method at the - # unaliased name (so that super continues to work). By wrapping that code in a - # transation we make that not happen, which means that alias_method_chains, etc. - # continue to work. - # - # source://pry//lib/pry/method/patcher.rb#49 - def with_method_transaction; end - - # Apply wrap_for_owner and wrap_for_nesting successively to `source` - # - # @param source [String] - # @return [String] The wrapped source. - # - # source://pry//lib/pry/method/patcher.rb#91 - def wrap(source); end - - # Update the new source code to have the correct Module.nesting. - # - # This method uses syntactic analysis of the original source file to determine - # the new nesting, so that we can tell the difference between: - # - # class A; def self.b; end; end - # class << A; def b; end; end - # - # The resulting code should be evaluated in the TOPLEVEL_BINDING. - # - # @param source [String] The source to wrap. - # @return [String] - # - # source://pry//lib/pry/method/patcher.rb#122 - def wrap_for_nesting(source); end - - # Update the source code so that when it has the right owner when eval'd. - # - # This (combined with definition_for_owner) is backup for the case that - # wrap_for_nesting fails, to ensure that the method will stil be defined in - # the correct place. - # - # @param source [String] The source to wrap - # @return [String] - # - # source://pry//lib/pry/method/patcher.rb#103 - def wrap_for_owner(source); end - - class << self - # source://pry//lib/pry/method/patcher.rb#16 - def code_for(filename); end - end -end - -# This class is responsible for locating the *real* `Pry::Method` -# object captured by a binding. -# -# Given a `Binding` from inside a method and a 'seed' Pry::Method object, -# there are primarily two situations where the seed method doesn't match -# the Binding: -# 1. The Pry::Method is from a subclass -# 2. The Pry::Method represents a method of the same name while the original -# was renamed to something else. For 1. we search vertically up the -# inheritance chain, and for 2. we search laterally along the object's -# method table. -# -# When we locate the method that matches the Binding we wrap it in -# Pry::Method and return it, or return nil if we fail. -# -# source://pry//lib/pry/method/weird_method_locator.rb#19 -class Pry::Method::WeirdMethodLocator - # @param method [Pry::Method] The seed method. - # @param target [Binding] The Binding that captures the method - # we want to locate. - # @return [WeirdMethodLocator] a new instance of WeirdMethodLocator - # - # source://pry//lib/pry/method/weird_method_locator.rb#55 - def initialize(method, target); end - - # @return [Pry::Method, nil] The Pry::Method that matches the - # given binding. - # - # source://pry//lib/pry/method/weird_method_locator.rb#62 - def find_method; end - - # @return [Boolean] Whether the Pry::Method is unrecoverable - # This usually happens when the method captured by the Binding - # has been subsequently deleted. - # - # source://pry//lib/pry/method/weird_method_locator.rb#69 - def lost_method?; end - - # Returns the value of attribute method. - # - # source://pry//lib/pry/method/weird_method_locator.rb#49 - def method; end - - # Sets the attribute method - # - # @param value the value to set the attribute method to. - # - # source://pry//lib/pry/method/weird_method_locator.rb#49 - def method=(_arg0); end - - # Returns the value of attribute target. - # - # source://pry//lib/pry/method/weird_method_locator.rb#50 - def target; end - - # Sets the attribute target - # - # @param value the value to set the attribute target to. - # - # source://pry//lib/pry/method/weird_method_locator.rb#50 - def target=(_arg0); end - - private - - # source://pry//lib/pry/method/weird_method_locator.rb#215 - def all_methods_for(obj); end - - # source://pry//lib/pry/method/weird_method_locator.rb#167 - def expanded_source_location(source_location); end - - # it's possible in some cases that the method we find by this approach is - # a sub-method of the one we're currently in, consider: - # - # class A; def b; binding.pry; end; end - # class B < A; def b; super; end; end - # - # Given that we can normally find the source_range of methods, and that we - # know which __FILE__ and __LINE__ the binding is at, we can hope to - # disambiguate these cases. - # - # This obviously won't work if the source is unavaiable for some reason, - # or if both methods have the same __FILE__ and __LINE__. - # - # @return [Pry::Method, nil] The Pry::Method representing the - # superclass method. - # - # source://pry//lib/pry/method/weird_method_locator.rb#131 - def find_method_in_superclass; end - - # This is the case where the name of a method has changed - # (via alias_method) so we locate the Method object for the - # renamed method. - # - # @return [Pry::Method, nil] The Pry::Method representing the - # renamed method - # - # source://pry//lib/pry/method/weird_method_locator.rb#156 - def find_renamed_method; end - - # source://pry//lib/pry/method/weird_method_locator.rb#197 - def index_to_line_number(index); end - - # source://pry//lib/pry/method/weird_method_locator.rb#206 - def lines_for_file(file); end - - # @return [Boolean] - # - # source://pry//lib/pry/method/weird_method_locator.rb#80 - def normal_method?(method); end - - # @return [Boolean] - # - # source://pry//lib/pry/method/weird_method_locator.rb#106 - def pry_file?; end - - # Use static analysis to locate the start of the method definition. - # We have the `__FILE__` and `__LINE__` from the binding and the - # original name of the method so we search up until we find a - # def/define_method, etc defining a method of the appropriate name. - # - # @return [Array] The `source_location` of the - # renamed method - # - # source://pry//lib/pry/method/weird_method_locator.rb#184 - def renamed_method_source_location; end - - # @return [Boolean] - # - # source://pry//lib/pry/method/weird_method_locator.rb#75 - def skip_superclass_search?; end - - # source://pry//lib/pry/method/weird_method_locator.rb#88 - def target_file; end - - # source://pry//lib/pry/method/weird_method_locator.rb#98 - def target_line; end - - # source://pry//lib/pry/method/weird_method_locator.rb#84 - def target_self; end - - # @return [Boolean] - # - # source://pry//lib/pry/method/weird_method_locator.rb#202 - def valid_file?(file); end - - class << self - # Whether the given method object matches the associated binding. - # If the method object does not match the binding, then it's - # most likely not the method captured by the binding, and we - # must commence a search. - # - # @param method [Pry::Method] - # @param binding [Binding] - # @return [Boolean] - # - # source://pry//lib/pry/method/weird_method_locator.rb#29 - def normal_method?(method, binding); end - - # @return [Boolean] - # - # source://pry//lib/pry/method/weird_method_locator.rb#44 - def weird_method?(method, binding); end - end -end - -# source://pry//lib/pry/exceptions.rb#69 -class Pry::MethodNotFound < ::Pry::CommandError; end - -# source://pry//lib/pry/command_set.rb#4 -class Pry::NoCommandError < ::StandardError - # @return [NoCommandError] a new instance of NoCommandError - # - # source://pry//lib/pry/command_set.rb#5 - def initialize(match, owner); end -end - -# `ObjectPath` implements the resolution of "object paths", which are strings -# that are similar to filesystem paths but meant for traversing Ruby objects. -# Examples of valid object paths include: -# -# x -# @foo/@bar -# "string"/upcase -# Pry/Method -# -# Object paths are mostly relevant in the context of the `cd` command. -# -# @see https://github.com/pry/pry/wiki/State-navigation -# -# source://pry//lib/pry/object_path.rb#17 -class Pry::ObjectPath - # @param path_string [String] The object path expressed as a string. - # @param current_stack [Array] The current state of the binding - # stack. - # @return [ObjectPath] a new instance of ObjectPath - # - # source://pry//lib/pry/object_path.rb#23 - def initialize(path_string, current_stack); end - - # @return [Array] a new stack resulting from applying the given - # path to the current stack. - # - # source://pry//lib/pry/object_path.rb#30 - def resolve; end - - private - - # @return [Boolean] - # - # source://pry//lib/pry/object_path.rb#74 - def complete?(segment); end - - # source://pry//lib/pry/object_path.rb#78 - def handle_failure(context, err); end -end - -# source://pry//lib/pry/object_path.rb#18 -Pry::ObjectPath::SPECIAL_TERMS = T.let(T.unsafe(nil), Array) - -# indicates obsolete API -# -# source://pry//lib/pry/exceptions.rb#72 -class Pry::ObsoleteError < ::StandardError; end - -# source://pry//lib/pry/output.rb#4 -class Pry::Output - # @return [Output] a new instance of Output - # - # source://pry//lib/pry/output.rb#10 - def initialize(pry_instance); end - - # source://pry//lib/pry/output.rb#28 - def <<(*objs); end - - # source://pry//lib/pry/output.rb#53 - def decolorize_maybe(str); end - - # Return a screen height or the default if that fails. - # - # source://pry//lib/pry/output.rb#74 - def height; end - - # source://pry//lib/pry/output.rb#41 - def method_missing(method_name, *args, &block); end - - # source://pry//lib/pry/output.rb#28 - def print(*objs); end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/output.rb#8 - def pry_instance; end - - # source://pry//lib/pry/output.rb#15 - def puts(*objs); end - - # @return [Array] a pair of [rows, columns] which gives the size of - # the window. If the window size cannot be determined, the default value. - # - # source://pry//lib/pry/output.rb#61 - def size; end - - # @return [Boolean] - # - # source://pry//lib/pry/output.rb#37 - def tty?; end - - # Return a screen width or the default if that fails. - # - # source://pry//lib/pry/output.rb#69 - def width; end - - # source://pry//lib/pry/output.rb#28 - def write(*objs); end - - private - - # source://pry//lib/pry/output.rb#80 - def actual_screen_size; end - - # source://pry//lib/pry/output.rb#125 - def ansicon_env_size; end - - # source://pry//lib/pry/output.rb#109 - def env_size; end - - # source://pry//lib/pry/output.rb#92 - def io_console_size; end - - # @return [Boolean] - # - # source://pry//lib/pry/output.rb#132 - def nonzero_column?(size); end - - # source://pry//lib/pry/output.rb#114 - def readline_size; end - - # @return [Boolean] - # - # source://pry//lib/pry/output.rb#49 - def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end -end - -# @return [Array] default terminal screen size [rows, cols] -# -# source://pry//lib/pry/output.rb#6 -Pry::Output::DEFAULT_SIZE = T.let(T.unsafe(nil), Array) - -# source://pry//lib/pry/pager.rb#7 -class Pry::Pager - # @return [Pager] a new instance of Pager - # - # source://pry//lib/pry/pager.rb#13 - def initialize(pry_instance); end - - # Yields a pager object (`NullPager`, `SimplePager`, or `SystemPager`). - # All pagers accept output with `#puts`, `#print`, `#write`, and `#<<`. - # - # source://pry//lib/pry/pager.rb#33 - def open; end - - # Send the given text through the best available pager (if - # `Pry.config.pager` is enabled). If you want to send text through in - # chunks as you generate it, use `open` to get a writable object - # instead. - # - # @param text [String] Text to run through a pager. - # - # source://pry//lib/pry/pager.rb#25 - def page(text); end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/pager.rb#11 - def pry_instance; end - - private - - # Return an instance of the "best" available pager class -- - # `SystemPager` if possible, `SimplePager` if `SystemPager` isn't - # available, and `NullPager` if the user has disabled paging. All - # pagers accept output with `#puts`, `#print`, `#write`, and `#<<`. You - # must call `#close` when you're done writing output to a pager, and - # you must rescue `Pry::Pager::StopPaging`. These requirements can be - # avoided by using `.open` instead. - # - # source://pry//lib/pry/pager.rb#56 - def best_available; end - - # @return [Boolean] - # - # source://pry//lib/pry/pager.rb#43 - def enabled?; end - - # Returns the value of attribute output. - # - # source://pry//lib/pry/pager.rb#47 - def output; end -end - -# `NullPager` is a "pager" that actually just prints all output as it -# comes in. Used when `Pry.config.pager` is false. -# -# source://pry//lib/pry/pager.rb#68 -class Pry::Pager::NullPager - # @return [NullPager] a new instance of NullPager - # - # source://pry//lib/pry/pager.rb#69 - def initialize(out); end - - # source://pry//lib/pry/pager.rb#77 - def <<(str); end - - # source://pry//lib/pry/pager.rb#86 - def close; end - - # source://pry//lib/pry/pager.rb#77 - def print(str); end - - # source://pry//lib/pry/pager.rb#73 - def puts(str); end - - # source://pry//lib/pry/pager.rb#82 - def write(str); end - - private - - # source://pry//lib/pry/pager.rb#90 - def height; end - - # source://pry//lib/pry/pager.rb#94 - def width; end -end - -# `PageTracker` tracks output to determine whether it's likely to take -# up a whole page. This doesn't need to be super precise, but we can -# use it for `SimplePager` and to avoid invoking the system pager -# unnecessarily. -# -# One simplifying assumption is that we don't need `#page?` to return -# `true` on the basis of an incomplete line. Long lines should be -# counted as multiple lines, but we don't have to transition from -# `false` to `true` until we see a newline. -# -# source://pry//lib/pry/pager.rb#213 -class Pry::Pager::PageTracker - # @return [PageTracker] a new instance of PageTracker - # - # source://pry//lib/pry/pager.rb#214 - def initialize(rows, cols); end - - # @return [Boolean] - # - # source://pry//lib/pry/pager.rb#231 - def page?; end - - # source://pry//lib/pry/pager.rb#220 - def record(str); end - - # source://pry//lib/pry/pager.rb#235 - def reset; end - - private - - # Approximation of the printable length of a given line, without the - # newline and without ANSI color codes. - # - # source://pry//lib/pry/pager.rb#244 - def line_length(line); end -end - -# `SimplePager` is a straightforward pure-Ruby pager. We use it on -# JRuby and when we can't find a usable external pager. -# -# source://pry//lib/pry/pager.rb#101 -class Pry::Pager::SimplePager < ::Pry::Pager::NullPager - # @return [SimplePager] a new instance of SimplePager - # - # source://pry//lib/pry/pager.rb#102 - def initialize(*_arg0); end - - # source://pry//lib/pry/pager.rb#107 - def write(str); end -end - -# source://pry//lib/pry/pager.rb#8 -class Pry::Pager::StopPaging < ::StandardError; end - -# `SystemPager` buffers output until we're pretty sure it's at least a -# page long, then invokes an external pager and starts streaming output -# to it. If `#close` is called before then, it just prints out the -# buffered content. -# -# source://pry//lib/pry/pager.rb#129 -class Pry::Pager::SystemPager < ::Pry::Pager::NullPager - # @return [SystemPager] a new instance of SystemPager - # - # source://pry//lib/pry/pager.rb#161 - def initialize(*_arg0); end - - # source://pry//lib/pry/pager.rb#181 - def close; end - - # source://pry//lib/pry/pager.rb#168 - def write(str); end - - private - - # @return [Boolean] - # - # source://pry//lib/pry/pager.rb#195 - def invoked_pager?; end - - # source://pry//lib/pry/pager.rb#199 - def pager; end - - # source://pry//lib/pry/pager.rb#191 - def write_to_pager(text); end - - class << self - # @return [Boolean] - # - # source://pry//lib/pry/pager.rb#142 - def available?; end - - # source://pry//lib/pry/pager.rb#130 - def default_pager; end - end -end - -# Prompt represents the Pry prompt, which can be used with Readline-like -# libraries. It defines a few default prompts (default prompt, simple prompt, -# etc) and also provides an API for adding and implementing custom prompts. -# -# @api public -# @example Registering a new Pry prompt -# Pry::Prompt.add( -# :ipython, -# 'IPython-like prompt', [':', '...:'] -# ) do |_context, _nesting, pry_instance, sep| -# sep == ':' ? "In [#{pry_instance.input_ring.count}]: " : ' ...: ' -# end -# -# # Produces: -# # In [3]: def foo -# # ...: puts 'foo' -# # ...: end -# # => :foo -# # In [4]: -# @example Manually instantiating the Prompt class -# prompt_procs = [ -# proc { '#{rand(1)}>" }, -# proc { "#{('a'..'z').to_a.sample}*" } -# ] -# prompt = Pry::Prompt.new( -# :random, -# 'Random number or letter prompt.', -# prompt_procs -# ) -# prompt.wait_proc.call(...) #=> -# prompt.incomplete_proc.call(...) -# @since v0.11.0 -# -# source://pry//lib/pry/prompt.rb#38 -class Pry::Prompt - # @api public - # @param name [String] - # @param description [String] - # @param prompt_procs [Array] - # @return [Prompt] a new instance of Prompt - # @since v0.11.0 - # - # source://pry//lib/pry/prompt.rb#117 - def initialize(name, description, prompt_procs); end - - # @api public - # @deprecated Use a `Pry::Prompt` instance directly - # @since v0.11.0 - # - # source://pry//lib/pry/prompt.rb#135 - def [](key); end - - # @api public - # @return [String] - # @since v0.11.0 - # - # source://pry//lib/pry/prompt.rb#108 - def description; end - - # @api public - # @return [Proc] the proc which builds the prompt when in the middle of an - # expression such as open method, etc. (`*`) - # @since v0.11.0 - # - # source://pry//lib/pry/prompt.rb#130 - def incomplete_proc; end - - # @api public - # @return [String] - # @since v0.11.0 - # - # source://pry//lib/pry/prompt.rb#105 - def name; end - - # @api public - # @return [Array] the array of procs that hold - # `[wait_proc, incomplete_proc]` - # @since v0.11.0 - # - # source://pry//lib/pry/prompt.rb#112 - def prompt_procs; end - - # @api public - # @return [Proc] the proc which builds the wait prompt (`>`) - # @since v0.11.0 - # - # source://pry//lib/pry/prompt.rb#124 - def wait_proc; end - - class << self - # Retrieves a prompt. - # - # @api public - # @example - # Prompt[:my_prompt] - # @param name [Symbol] The name of the prompt you want to access - # @return [Hash{Symbol=>Object}] - # @since v0.12.0 - # - # source://pry//lib/pry/prompt.rb#52 - def [](name); end - - # Adds a new prompt to the prompt hash. - # - # @api public - # @param name [Symbol] - # @param description [String] - # @param separators [Array] The separators to differentiate - # between prompt modes (default mode and class/method definition mode). - # The Array *must* have a size of 2. - # @raise [ArgumentError] if the size of `separators` is not 2 - # @raise [ArgumentError] if `prompt_name` is already occupied - # @return [nil] - # @since v0.12.0 - # @yield [context, nesting, pry_instance, sep] - # @yieldparam context [Object] the context where Pry is currently in - # @yieldparam nesting [Integer] whether the context is nested - # @yieldparam pry_instance [Pry] the Pry instance - # @yieldparam separator [String] separator string - # - # source://pry//lib/pry/prompt.rb#79 - def add(name, description = T.unsafe(nil), separators = T.unsafe(nil)); end - - # @api public - # @note Use this for read-only operations - # @return [Hash{Symbol=>Hash}] the duplicate of the internal prompts hash - # @since v0.12.0 - # - # source://pry//lib/pry/prompt.rb#59 - def all; end - end -end - -# source://pry//lib/pry/repl.rb#4 -class Pry::REPL - extend ::Forwardable - extend ::Pry::Forwardable - - # Create an instance of {REPL} wrapping the given {Pry}. - # - # @option options - # @param pry [Pry] The instance of {Pry} that this {REPL} will control. - # @param options [Hash] Options for this {REPL} instance. - # @return [REPL] a new instance of REPL - # - # source://pry//lib/pry/repl.rb#22 - def initialize(pry, options = T.unsafe(nil)); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output(*args, **_arg1, &block); end - - # @return [Pry] The instance of {Pry} that the user is controlling. - # - # source://pry//lib/pry/repl.rb#9 - def pry; end - - # @return [Pry] The instance of {Pry} that the user is controlling. - # - # source://pry//lib/pry/repl.rb#9 - def pry=(_arg0); end - - # Start the read-eval-print loop. - # - # @raise [Exception] If the session throws `:raise_up`, raise the exception - # thrown with it. - # @return [Object?] If the session throws `:breakout`, return the value - # thrown with it. - # - # source://pry//lib/pry/repl.rb#36 - def start; end - - private - - # Calculates correct overhang for current line. Supports vi Readline - # mode and its indicators such as "(ins)" or "(cmd)". - # - # @note This doesn't calculate overhang for Readline's emacs mode with an - # indicator because emacs is the default mode and it doesn't use - # indicators in 99% of cases. - # @return [Integer] - # - # source://pry//lib/pry/repl.rb#237 - def calculate_overhang(current_prompt, original_val, indented_val); end - - # @return [Boolean] - # - # source://pry//lib/pry/repl.rb#205 - def coolline_available?; end - - # Clean up after the repl session. - # - # @return [void] - # - # source://pry//lib/pry/repl.rb#84 - def epilogue; end - - # Manage switching of input objects on encountering `EOFError`s. - # - # @return [Object] Whatever the given block returns. - # @return [:no_more_input] Indicates that no more input can be read. - # - # source://pry//lib/pry/repl.rb#127 - def handle_read_errors; end - - # source://pry//lib/pry/repl.rb#195 - def input_readline(*args); end - - # If `$stdout` is not a tty, it's probably a pipe. - # - # @example - # # `piping?` returns `false` - # % pry - # [1] pry(main) - # - # # `piping?` returns `true` - # % pry | tee log - # @return [Boolean] - # - # source://pry//lib/pry/repl.rb#217 - def piping?; end - - # Set up the repl session. - # - # @return [void] - # - # source://pry//lib/pry/repl.rb#47 - def prologue; end - - # Read a line of input from the user. - # - # @return [String] The line entered by the user. - # @return [nil] On ``. - # @return [:control_c] On ``. - # @return [:no_more_input] On EOF. - # - # source://pry//lib/pry/repl.rb#93 - def read; end - - # Returns the next line of input to be sent to the {Pry} instance. - # - # @param current_prompt [String] The prompt to use for input. - # @return [String?] The next line of input, or `nil` on . - # - # source://pry//lib/pry/repl.rb#169 - def read_line(current_prompt); end - - # @return [Boolean] - # - # source://pry//lib/pry/repl.rb#201 - def readline_available?; end - - # The actual read-eval-print loop. - # - # The {REPL} instance is responsible for reading and looping, whereas the - # {Pry} instance is responsible for evaluating user input and printing - # return values and command output. - # - # @raise [Exception] If the session throws `:raise_up`, raise the exception - # thrown with it. - # @return [Object?] If the session throws `:breakout`, return the value - # thrown with it. - # - # source://pry//lib/pry/repl.rb#66 - def repl; end - - # @return [void] - # - # source://pry//lib/pry/repl.rb#224 - def set_readline_output; end - - class << self - # Instantiate a new {Pry} instance with the given options, then start a - # {REPL} instance wrapping it. - # - # @option options - # @param options [Hash] a customizable set of options - # - # source://pry-byebug/3.10.1/lib/pry-byebug/pry_ext.rb#8 - def start(options = T.unsafe(nil)); end - - # source://pry-byebug/3.10.1/lib/pry-byebug/pry_ext.rb#8 - def start_with_pry_byebug(options = T.unsafe(nil)); end - - # source://pry//lib/pry/repl.rb#14 - def start_without_pry_byebug(options); end - end -end - -# A class to manage the loading of files through the REPL loop. -# This is an interesting trick as it processes your file as if it -# was user input in an interactive session. As a result, all Pry -# commands are available, and they are executed non-interactively. Furthermore -# the session becomes interactive when the repl loop processes a -# 'make-interactive' command in the file. The session also becomes -# interactive when an exception is encountered, enabling you to fix -# the error before returning to non-interactive processing with the -# 'make-non-interactive' command. -# -# source://pry//lib/pry/repl_file_loader.rb#14 -class Pry::REPLFileLoader - # @return [REPLFileLoader] a new instance of REPLFileLoader - # - # source://pry//lib/pry/repl_file_loader.rb#15 - def initialize(file_name); end - - # Define a few extra commands useful for flipping back & forth - # between interactive/non-interactive modes - # - # source://pry//lib/pry/repl_file_loader.rb#59 - def define_additional_commands; end - - # Switch to interactive mode, i.e take input from the user - # and use the regular print and exception handlers. - # - # @param pry_instance [Pry] the Pry instance to make interactive. - # - # source://pry//lib/pry/repl_file_loader.rb#26 - def interactive_mode(pry_instance); end - - # Actually load the file through the REPL by setting file content - # as the REPL input stream. - # - # source://pry//lib/pry/repl_file_loader.rb#75 - def load; end - - # Switch to non-interactive mode. Essentially - # this means there is no result output - # and that the session becomes interactive when an exception is encountered. - # - # @param pry_instance [Pry] the Pry instance to make non-interactive. - # - # source://pry//lib/pry/repl_file_loader.rb#37 - def non_interactive_mode(pry_instance, content); end -end - -# As a REPL, we often want to catch any unexpected exceptions that may have -# been raised; however we don't want to go overboard and prevent the user -# from exiting Pry when they want to. -# -# source://pry//lib/pry/exceptions.rb#7 -module Pry::RescuableException - class << self - # source://pry//lib/pry/exceptions.rb#8 - def ===(exception); end - end -end - -# Wraps the return result of process_commands, indicates if the -# result IS a command and what kind of command (e.g void) -# -# source://pry//lib/pry/command_set.rb#397 -class Pry::Result - # @return [Result] a new instance of Result - # - # source://pry//lib/pry/command_set.rb#400 - def initialize(is_command, retval = T.unsafe(nil)); end - - # Is the result a command? - # - # @return [Boolean] - # - # source://pry//lib/pry/command_set.rb#407 - def command?; end - - # Returns the value of attribute retval. - # - # source://pry//lib/pry/command_set.rb#398 - def retval; end - - # Is the result a command and if it is, is it a void command? - # (one that does not return a value) - # - # @return [Boolean] - # - # source://pry//lib/pry/command_set.rb#414 - def void_command?; end -end - -# A ring is a thread-safe fixed-capacity array to which you can only add -# elements. Older entries are overwritten as you add new elements, so that the -# ring can never contain more than `max_size` elemens. -# -# @api public -# @example -# ring = Pry::Ring.new(3) -# ring << 1 << 2 << 3 -# ring.to_a #=> [1, 2, 3] -# ring << 4 -# ring.to_a #=> [2, 3, 4] -# -# ring[0] #=> 2 -# ring[-1] #=> 4 -# ring.clear -# ring[0] #=> nil -# @since v0.12.0 -# -# source://pry//lib/pry/ring.rb#22 -class Pry::Ring - # @api public - # @param max_size [Integer] Maximum buffer size. The buffer will start - # overwriting elements once its reaches its maximum capacity - # @return [Ring] a new instance of Ring - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#33 - def initialize(max_size); end - - # Push `value` to the current index. - # - # @api public - # @param value [Object] - # @return [self] - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#43 - def <<(value); end - - # Read the value stored at `index`. - # - # @api public - # @param index [Integer, Range] The element (if Integer) or elements - # (if Range) associated with `index` - # @return [Object, Array, nil] element(s) at `index`, `nil` if none - # exist - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#57 - def [](index); end - - # Clear the buffer and reset count. - # - # @api public - # @return [void] - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#75 - def clear; end - - # @api public - # @return [Integer] how many objects were added during the lifetime of the - # ring - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#28 - def count; end - - # @api public - # @return [Integer] maximum buffer size - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#24 - def max_size; end - - # @api public - # @return [Integer] how many objects were added during the lifetime of the - # ring - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#28 - def size; end - - # @api public - # @return [Array] the buffer as unwinded array - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#67 - def to_a; end - - private - - # @api public - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#84 - def transpose_buffer_tail; end -end - -# source://pry//lib/pry/slop.rb#5 -class Pry::Slop - include ::Enumerable - - # Create a new instance of Slop and optionally build options via a block. - # - # config - A Hash of configuration options. - # block - An optional block used to specify options. - # - # @return [Slop] a new instance of Slop - # - # source://pry//lib/pry/slop.rb#127 - def initialize(config = T.unsafe(nil), &block); end - - # Fetch an options argument value. - # - # key - The Symbol or String option short or long flag. - # - # Returns the Object value for this option, or nil. - # - # source://pry//lib/pry/slop.rb#278 - def [](key); end - - # Add a callback. - # - # label - The Symbol identifier to attach this callback. - # - # Returns nothing. - # - # source://pry//lib/pry/slop.rb#398 - def add_callback(label, &block); end - - # Get or set the banner. - # - # banner - The String to set the banner. - # - # Returns the banner String. - # - # source://pry//lib/pry/slop.rb#168 - def banner(banner = T.unsafe(nil)); end - - # Set the banner. - # - # banner - The String to set the banner. - # - # source://pry//lib/pry/slop.rb#159 - def banner=(banner); end - - # Add a new command. - # - # command - The Symbol or String used to identify this command. - # options - A Hash of configuration options (see Slop::new) - # - # Returns a new instance of Slop mapped to this command. - # - # source://pry//lib/pry/slop.rb#196 - def command(command, options = T.unsafe(nil), &block); end - - # The Hash of configuration options for this Slop instance. - # - # source://pry//lib/pry/slop.rb#118 - def config; end - - # Get or set the description (used for commands). - # - # desc - The String to set the description. - # - # Returns the description String. - # - # source://pry//lib/pry/slop.rb#185 - def description(desc = T.unsafe(nil)); end - - # Set the description (used for commands). - # - # desc - The String to set the description. - # - # source://pry//lib/pry/slop.rb#176 - def description=(desc); end - - # Enumerable interface. Yields each Slop::Option. - # - # source://pry//lib/pry/slop.rb#297 - def each(&block); end - - # Fetch a Slop object associated with this command. - # - # command - The String or Symbol name of the command. - # - # Examples: - # - # opts.command :foo do - # on :v, :verbose, 'Enable verbose mode' - # end - # - # # ruby run.rb foo -v - # opts.fetch_command(:foo).verbose? #=> true - # - # source://pry//lib/pry/slop.rb#389 - def fetch_command(command); end - - # Fetch a Slop::Option object. - # - # key - The Symbol or String option key. - # - # Examples: - # - # opts.on(:foo, 'Something fooey', :argument => :optional) - # opt = opts.fetch_option(:foo) - # opt.class #=> Slop::Option - # opt.accepts_optional_argument? #=> true - # - # Returns an Option or nil if none were found. - # - # source://pry//lib/pry/slop.rb#373 - def fetch_option(key); end - - # Fetch an options argument value. - # - # key - The Symbol or String option short or long flag. - # - # Returns the Object value for this option, or nil. - # - # source://pry//lib/pry/slop.rb#278 - def get(key); end - - # Print a handy Slop help string. - # - # Returns the banner followed by available option help strings. - # - # source://pry//lib/pry/slop.rb#416 - def help; end - - # Fetch a list of options which were missing from the parsed list. - # - # Examples: - # - # opts = Slop.new do - # on :n, :name= - # on :p, :password= - # end - # - # opts.parse %w[ --name Lee ] - # opts.missing #=> ['password'] - # - # Returns an Array of Strings representing missing options. - # - # source://pry//lib/pry/slop.rb#357 - def missing; end - - # Add an Option. - # - # objects - An Array with an optional Hash as the last element. - # - # Examples: - # - # on '-u', '--username=', 'Your username' - # on :v, :verbose, 'Enable verbose mode' - # - # Returns the created instance of Slop::Option. - # - # source://pry//lib/pry/slop.rb#265 - def on(*objects, &block); end - - # Add an Option. - # - # objects - An Array with an optional Hash as the last element. - # - # Examples: - # - # on '-u', '--username=', 'Your username' - # on :v, :verbose, 'Enable verbose mode' - # - # Returns the created instance of Slop::Option. - # - # source://pry//lib/pry/slop.rb#265 - def opt(*objects, &block); end - - # Add an Option. - # - # objects - An Array with an optional Hash as the last element. - # - # Examples: - # - # on '-u', '--username=', 'Your username' - # on :v, :verbose, 'Enable verbose mode' - # - # Returns the created instance of Slop::Option. - # - # source://pry//lib/pry/slop.rb#265 - def option(*objects, &block); end - - # The Array of Slop::Option objects tied to this Slop instance. - # - # source://pry//lib/pry/slop.rb#121 - def options; end - - # Parse a list of items, executing and gathering options along the way. - # - # items - The Array of items to extract options from (default: ARGV). - # block - An optional block which when used will yield non options. - # - # Returns an Array of original items. - # - # source://pry//lib/pry/slop.rb#206 - def parse(items = T.unsafe(nil), &block); end - - # Parse a list of items, executing and gathering options along the way. - # unlike parse() this method will remove any options and option arguments - # from the original Array. - # - # items - The Array of items to extract options from (default: ARGV). - # block - An optional block which when used will yield non options. - # - # Returns an Array of original items with options removed. - # - # source://pry//lib/pry/slop.rb#219 - def parse!(items = T.unsafe(nil), &block); end - - # Check for an options presence. - # - # Examples: - # - # opts.parse %w( --foo ) - # opts.present?(:foo) #=> true - # opts.present?(:bar) #=> false - # - # Returns true if all of the keys are present in the parsed arguments. - # - # @return [Boolean] - # - # source://pry//lib/pry/slop.rb#333 - def present?(*keys); end - - # Specify code to be executed when these options are parsed. - # - # callable - An object responding to a call method. - # - # yields - The instance of Slop parsing these options - # An Array of unparsed arguments - # - # Example: - # - # Slop.parse do - # on :v, :verbose - # - # run do |opts, args| - # puts "Arguments: #{args.inspect}" if opts.verbose? - # end - # end - # - # @raise [ArgumentError] - # - # source://pry//lib/pry/slop.rb#317 - def run(callable = T.unsafe(nil), &block); end - - # Add string separators between options. - # - # text - The String text to print. - # - # source://pry//lib/pry/slop.rb#405 - def separator(text); end - - # Is strict mode enabled? - # - # Returns true if strict mode is enabled, false otherwise. - # - # @return [Boolean] - # - # source://pry//lib/pry/slop.rb#152 - def strict?; end - - # Returns a new Hash with option flags as keys and option values as values. - # - # include_commands - If true, merge options from all sub-commands. - # - # source://pry//lib/pry/slop.rb#287 - def to_h(include_commands = T.unsafe(nil)); end - - # Returns a new Hash with option flags as keys and option values as values. - # - # include_commands - If true, merge options from all sub-commands. - # - # source://pry//lib/pry/slop.rb#287 - def to_hash(include_commands = T.unsafe(nil)); end - - # Print a handy Slop help string. - # - # Returns the banner followed by available option help strings. - # - # source://pry//lib/pry/slop.rb#416 - def to_s; end - - private - - # Autocreate an option on the fly. See the :autocreate Slop config option. - # - # items - The Array of items we're parsing. - # index - The current Integer index for the item we're processing. - # - # Returns nothing. - # - # source://pry//lib/pry/slop.rb#590 - def autocreate(items, index); end - - # Build an option from a list of objects. - # - # objects - An Array of objects used to build this option. - # - # Returns a new instance of Slop::Option. - # - # source://pry//lib/pry/slop.rb#606 - def build_option(objects, &block); end - - # Remove any leading -- characters from a string. - # - # object - The Object we want to cast to a String and clean. - # - # Returns the newly cleaned String with leading -- characters removed. - # - # source://pry//lib/pry/slop.rb#659 - def clean(object); end - - # source://pry//lib/pry/slop.rb#663 - def commands_to_help; end - - # Execute a `-abc` type option where a, b and c are all options. This - # method is only executed if the multiple_switches argument is true. - # - # option - The first Option object. - # argument - The argument to this option. (Split into multiple Options). - # index - The index of the current item being processed. - # - # Returns nothing. - # - # source://pry//lib/pry/slop.rb#552 - def execute_multiple_switches(option, argument, index); end - - # Execute an option, firing off callbacks and assigning arguments. - # - # option - The Slop::Option object found by #process_item. - # argument - The argument Object to assign to this option. - # index - The current Integer index of the object we're processing. - # item - The optional String item we're processing. - # - # Returns nothing. - # - # source://pry//lib/pry/slop.rb#519 - def execute_option(option, argument, index, item = T.unsafe(nil)); end - - # Extract the long flag from an item. - # - # objects - The Array of objects passed from #build_option. - # config - The Hash of configuration options built in #build_option. - # - # source://pry//lib/pry/slop.rb#644 - def extract_long_flag(objects, config); end - - # Extract an option from a flag. - # - # flag - The flag key used to extract an option. - # - # Returns an Array of [option, argument]. - # - # source://pry//lib/pry/slop.rb#567 - def extract_option(flag); end - - # Extract the short flag from an item. - # - # objects - The Array of objects passed from #build_option. - # config - The Hash of configuration options built in #build_option. - # - # source://pry//lib/pry/slop.rb#626 - def extract_short_flag(objects, config); end - - # Convenience method for present?(:option). - # - # Examples: - # - # opts.parse %( --verbose ) - # opts.verbose? #=> true - # opts.other? #=> false - # - # Returns true if this option is present. If this method does not end - # with a ? character it will instead call super(). - # - # source://pry//lib/pry/slop.rb#454 - def method_missing(method, *args, &block); end - - # Process a list item, figure out if it's an option, execute any - # callbacks, assign any option arguments, and do some sanity checks. - # - # items - The Array of items to process. - # index - The current Integer index of the item we want to process. - # block - An optional block which when passed will yield non options. - # - # Returns nothing. - # - # source://pry//lib/pry/slop.rb#472 - def process_item(items, index, &block); end - - # Override this method so we can check if an option? method exists. - # - # Returns true if this option key exists in our list of options. - # - # @return [Boolean] - # - # source://pry//lib/pry/slop.rb#340 - def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end - - class << self - # Build a Slop object from a option specification. - # - # This allows you to design your options via a simple String rather - # than programatically. Do note though that with this method, you're - # unable to pass any advanced options to the on() method when creating - # options. - # - # string - The optspec String - # config - A Hash of configuration options to pass to Slop.new - # - # Examples: - # - # opts = Slop.optspec(<<-SPEC) - # ruby foo.rb [options] - # --- - # n,name= Your name - # a,age= Your age - # A,auth Sign in with auth - # p,passcode= Your secret pass code - # SPEC - # - # opts.fetch_option(:name).description #=> "Your name" - # - # Returns a new instance of Slop. - # - # source://pry//lib/pry/slop.rb#97 - def optspec(string, config = T.unsafe(nil)); end - - # items - The Array of items to extract options from (default: ARGV). - # config - The Hash of configuration options to send to Slop.new(). - # block - An optional block used to add options. - # - # Examples: - # - # Slop.parse(ARGV, :help => true) do - # on '-n', '--name', 'Your username', :argument => true - # end - # - # Returns a new instance of Slop. - # - # source://pry//lib/pry/slop.rb#54 - def parse(items = T.unsafe(nil), config = T.unsafe(nil), &block); end - - # items - The Array of items to extract options from (default: ARGV). - # config - The Hash of configuration options to send to Slop.new(). - # block - An optional block used to add options. - # - # Returns a new instance of Slop. - # - # source://pry//lib/pry/slop.rb#63 - def parse!(items = T.unsafe(nil), config = T.unsafe(nil), &block); end - end -end - -# source://pry//lib/pry/slop/commands.rb#5 -class Pry::Slop::Commands - include ::Enumerable - - # Create a new instance of Slop::Commands and optionally build - # Slop instances via a block. Any configuration options used in - # this method will be the default configuration options sent to - # each Slop object created. - # - # config - An optional configuration Hash. - # block - Optional block used to define commands. - # - # Examples: - # - # commands = Slop::Commands.new do - # on :new do - # on '-o', '--outdir=', 'The output directory' - # on '-v', '--verbose', 'Enable verbose mode' - # end - # - # on :generate do - # on '--assets', 'Generate assets', :default => true - # end - # - # global do - # on '-D', '--debug', 'Enable debug mode', :default => false - # end - # end - # - # commands[:new].class #=> Slop - # commands.parse - # - # @return [Commands] a new instance of Commands - # - # source://pry//lib/pry/slop/commands.rb#39 - def initialize(config = T.unsafe(nil), &block); end - - # Fetch the instance of Slop tied to a command. - # - # key - The String or Symbol key used to locate this command. - # - # Returns the Slop instance if this key is found, nil otherwise. - # - # source://pry//lib/pry/slop/commands.rb#100 - def [](key); end - - # Returns the value of attribute arguments. - # - # source://pry//lib/pry/slop/commands.rb#8 - def arguments; end - - # Optionally set the banner for this command help output. - # - # banner - The String text to set the banner. - # - # Returns the String banner if one is set. - # - # source://pry//lib/pry/slop/commands.rb#59 - def banner(banner = T.unsafe(nil)); end - - # Sets the attribute banner - # - # @param value the value to set the attribute banner to. - # - # source://pry//lib/pry/slop/commands.rb#9 - def banner=(_arg0); end - - # Returns the value of attribute commands. - # - # source://pry//lib/pry/slop/commands.rb#8 - def commands; end - - # Returns the value of attribute config. - # - # source://pry//lib/pry/slop/commands.rb#8 - def config; end - - # Add a Slop instance used when no other commands exist. - # - # config - A Hash of configuration options to pass to Slop. - # block - An optional block used to pass options to Slop. - # - # Returns the newly created Slop instance mapped to default. - # - # source://pry//lib/pry/slop/commands.rb#81 - def default(config = T.unsafe(nil), &block); end - - # Enumerable interface. - # - # source://pry//lib/pry/slop/commands.rb#119 - def each(&block); end - - # Fetch the instance of Slop tied to a command. - # - # key - The String or Symbol key used to locate this command. - # - # Returns the Slop instance if this key is found, nil otherwise. - # - # source://pry//lib/pry/slop/commands.rb#100 - def get(key); end - - # Add a global Slop instance. - # - # config - A Hash of configuration options to pass to Slop. - # block - An optional block used to pass options to Slop. - # - # Returns the newly created Slop instance mapped to global. - # - # source://pry//lib/pry/slop/commands.rb#91 - def global(config = T.unsafe(nil), &block); end - - # Returns the help String. - # - # source://pry//lib/pry/slop/commands.rb#158 - def help; end - - # Returns the inspection String. - # - # source://pry//lib/pry/slop/commands.rb#170 - def inspect; end - - # Add a Slop instance for a specific command. - # - # command - A String or Symbol key used to identify this command. - # config - A Hash of configuration options to pass to Slop. - # block - An optional block used to pass options to Slop. - # - # Returns the newly created Slop instance mapped to command. - # - # source://pry//lib/pry/slop/commands.rb#71 - def on(command, config = T.unsafe(nil), &block); end - - # Parse a list of items. - # - # items - The Array of items to parse. - # - # Returns the original Array of items. - # - # source://pry//lib/pry/slop/commands.rb#128 - def parse(items = T.unsafe(nil)); end - - # Parse a list of items, removing any options or option arguments found. - # - # items - The Array of items to parse. - # - # Returns the original Array of items with options removed. - # - # source://pry//lib/pry/slop/commands.rb#138 - def parse!(items = T.unsafe(nil)); end - - # Check for a command presence. - # - # Examples: - # - # cmds.parse %w( foo ) - # cmds.present?(:foo) #=> true - # cmds.present?(:bar) #=> false - # - # Returns true if the given key is present in the parsed arguments. - # - # @return [Boolean] - # - # source://pry//lib/pry/slop/commands.rb#114 - def present?(key); end - - # Returns a nested Hash with Slop options and values. See Slop#to_hash. - # - # source://pry//lib/pry/slop/commands.rb#153 - def to_hash; end - - # Returns the help String. - # - # source://pry//lib/pry/slop/commands.rb#158 - def to_s; end - - private - - # Returns nothing. - # - # source://pry//lib/pry/slop/commands.rb#177 - def execute_arguments!(items); end - - # Returns nothing. - # - # source://pry//lib/pry/slop/commands.rb#183 - def execute_global_opts!(items); end -end - -# Returns a default Hash of configuration options this Slop instance uses. -# -# source://pry//lib/pry/slop.rb#30 -Pry::Slop::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# The main Error class, all Exception classes inherit from this class. -# -# source://pry//lib/pry/slop.rb#12 -class Pry::Slop::Error < ::StandardError; end - -# Raised when an argument does not match its intended match constraint. -# -# source://pry//lib/pry/slop.rb#21 -class Pry::Slop::InvalidArgumentError < ::Pry::Slop::Error; end - -# Raised when an invalid command is found and the strict flag is enabled. -# -# source://pry//lib/pry/slop.rb#27 -class Pry::Slop::InvalidCommandError < ::Pry::Slop::Error; end - -# Raised when an invalid option is found and the strict flag is enabled. -# -# source://pry//lib/pry/slop.rb#24 -class Pry::Slop::InvalidOptionError < ::Pry::Slop::Error; end - -# Raised when an option argument is expected but none are given. -# -# source://pry//lib/pry/slop.rb#15 -class Pry::Slop::MissingArgumentError < ::Pry::Slop::Error; end - -# Raised when an option is expected/required but not present. -# -# source://pry//lib/pry/slop.rb#18 -class Pry::Slop::MissingOptionError < ::Pry::Slop::Error; end - -# source://pry//lib/pry/slop/option.rb#5 -class Pry::Slop::Option - # Incapsulate internal option information, mainly used to store - # option specific configuration data, most of the meat of this - # class is found in the #value method. - # - # slop - The instance of Slop tied to this Option. - # short - The String or Symbol short flag. - # long - The String or Symbol long flag. - # description - The String description text. - # config - A Hash of configuration options. - # block - An optional block used as a callback. - # - # @return [Option] a new instance of Option - # - # source://pry//lib/pry/slop/option.rb#35 - def initialize(slop, short, long, description, config = T.unsafe(nil), &block); end - - # Returns true if this option accepts an optional argument. - # - # @return [Boolean] - # - # source://pry//lib/pry/slop/option.rb#72 - def accepts_optional_argument?; end - - # Returns the value of attribute argument_in_value. - # - # source://pry//lib/pry/slop/option.rb#23 - def argument_in_value; end - - # Sets the attribute argument_in_value - # - # @param value the value to set the attribute argument_in_value to. - # - # source://pry//lib/pry/slop/option.rb#23 - def argument_in_value=(_arg0); end - - # Call this options callback if one exists, and it responds to call(). - # - # Returns nothing. - # - # source://pry//lib/pry/slop/option.rb#84 - def call(*objects); end - - # Returns the value of attribute config. - # - # source://pry//lib/pry/slop/option.rb#22 - def config; end - - # Returns the value of attribute count. - # - # source://pry//lib/pry/slop/option.rb#23 - def count; end - - # Sets the attribute count - # - # @param value the value to set the attribute count to. - # - # source://pry//lib/pry/slop/option.rb#23 - def count=(_arg0); end - - # Returns the value of attribute description. - # - # source://pry//lib/pry/slop/option.rb#22 - def description; end - - # Returns true if this option expects an argument. - # - # @return [Boolean] - # - # source://pry//lib/pry/slop/option.rb#67 - def expects_argument?; end - - # Returns the help String for this option. - # - # source://pry//lib/pry/slop/option.rb#124 - def help; end - - # Returns the String inspection text. - # - # source://pry//lib/pry/slop/option.rb#143 - def inspect; end - - # Returns the String flag of this option. Preferring the long flag. - # - # source://pry//lib/pry/slop/option.rb#77 - def key; end - - # Returns the value of attribute long. - # - # source://pry//lib/pry/slop/option.rb#22 - def long; end - - # Returns the value of attribute short. - # - # source://pry//lib/pry/slop/option.rb#22 - def short; end - - # Returns the help String for this option. - # - # source://pry//lib/pry/slop/option.rb#124 - def to_s; end - - # Returns the value of attribute types. - # - # source://pry//lib/pry/slop/option.rb#22 - def types; end - - # Fetch the argument value for this option. - # - # Returns the Object once any type conversions have taken place. - # - # source://pry//lib/pry/slop/option.rb#108 - def value; end - - # Set the new argument value for this option. - # - # We use this setter method to handle concatenating lists. That is, - # when an array type is specified and used more than once, values from - # both options will be grouped together and flattened into a single array. - # - # source://pry//lib/pry/slop/option.rb#93 - def value=(new_value); end - - private - - # Convert an object to a Float if possible. - # - # value - The Object we want to convert to a float. - # - # Returns the Float value if possible to convert, else a zero. - # - # source://pry//lib/pry/slop/option.rb#173 - def value_to_float(value); end - - # Convert an object to an Integer if possible. - # - # value - The Object we want to convert to an integer. - # - # Returns the Integer value if possible to convert, else a zero. - # - # source://pry//lib/pry/slop/option.rb#156 - def value_to_integer(value); end - - # Convert an object to a Range if possible. - # - # value - The Object we want to convert to a range. - # - # Returns the Range value if one could be found, else the original object. - # - # source://pry//lib/pry/slop/option.rb#190 - def value_to_range(value); end -end - -# The default Hash of configuration options this class uses. -# -# source://pry//lib/pry/slop/option.rb#7 -Pry::Slop::Option::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://pry//lib/pry/slop.rb#9 -Pry::Slop::VERSION = T.let(T.unsafe(nil), String) - -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/syntax_highlighter.rb#8 -class Pry::SyntaxHighlighter - class << self - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/syntax_highlighter.rb#9 - def highlight(code, language = T.unsafe(nil)); end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/syntax_highlighter.rb#17 - def keyword_token_color; end - - # Sets comment token to blue (black by default), so it's more legible. - # - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/syntax_highlighter.rb#22 - def overwrite_coderay_comment_token!; end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/syntax_highlighter.rb#13 - def tokenize(code, language = T.unsafe(nil)); end - end -end - -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/system_command_handler.rb#6 -module Pry::SystemCommandHandler - class << self - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/system_command_handler.rb#8 - def default(output, command, _pry_instance); end - end -end - -# Catches SecurityErrors if $SAFE is set -# -# source://pry//lib/pry/exceptions.rb#28 -module Pry::TooSafeException - class << self - # source://pry//lib/pry/exceptions.rb#29 - def ===(exception); end - end -end - -# An Exception Tag (cf. Exceptional Ruby) that instructs Pry to show the error -# in a more user-friendly manner. This should be used when the exception -# happens within Pry itself as a direct consequence of the user typing -# something wrong. -# -# This allows us to distinguish between the user typing: -# -# pry(main)> def ) -# SyntaxError: unexpected ) -# -# pry(main)> method_that_evals("def )") -# SyntaxError: (eval):1: syntax error, unexpected ')' -# from ./a.rb:2 in `eval' -# -# source://pry//lib/pry/exceptions.rb#51 -module Pry::UserError; end - -# source://pry//lib/pry/version.rb#4 -Pry::VERSION = T.let(T.unsafe(nil), String) - -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/warning.rb#6 -module Pry::Warning - class << self - # Prints a warning message with exact file and line location, similar to how - # Ruby's -W prints warnings. - # - # @api private - # @param message [String] - # @return [void] - # @since v0.13.0 - # - # source://pry//lib/pry/warning.rb#12 - def warn(message); end - end -end - -# source://pry//lib/pry/wrapped_module.rb#16 -class Pry::WrappedModule - include ::Pry::Helpers::BaseHelpers - include ::Pry::CodeObject::Helpers - - # @param mod [Module] - # @raise [ArgumentError] if the argument is not a `Module` - # @return [WrappedModule] a new instance of WrappedModule - # - # source://pry//lib/pry/wrapped_module.rb#56 - def initialize(mod); end - - # Return a candidate for this module of specified rank. A `rank` - # of 0 is equivalent to the 'primary candidate', which is the - # module definition with the highest number of methods. A `rank` - # of 1 is the module definition with the second highest number of - # methods, and so on. Module candidates are necessary as modules - # can be reopened multiple times and in multiple places in Ruby, - # the candidate API gives you access to the module definition - # representing each of those reopenings. - # - # @param rank [Fixnum] - # @raise [Pry::CommandError] If the `rank` is out of range. That - # is greater than `number_of_candidates - 1`. - # @return [Pry::WrappedModule::Candidate] - # - # source://pry//lib/pry/wrapped_module.rb#239 - def candidate(rank); end - - # @return [Array] - # - # source://pry//lib/pry/wrapped_module.rb#250 - def candidates; end - - # Is this strictly a class? - # - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#126 - def class?; end - - # Returns an array of the names of the constants accessible in the wrapped - # module. This avoids the problem of accidentally calling the singleton - # method `Module.constants`. - # - # @param inherit [Boolean] Include the names of constants from included - # modules? - # - # source://pry//lib/pry/wrapped_module.rb#76 - def constants(inherit = T.unsafe(nil)); end - - # Returns documentation for the module. - # This documentation is for the primary candidate, if - # you would like documentation for other candidates use - # `WrappedModule#candidate` to select the candidate you're - # interested in. - # - # @raise [Pry::CommandError] If documentation cannot be found. - # @return [String] The documentation for the module. - # - # source://pry//lib/pry/wrapped_module.rb#195 - def doc; end - - # @return [String, nil] The associated file for the module (i.e - # the primary candidate: highest ranked monkeypatch). - # - # source://pry//lib/pry/wrapped_module.rb#176 - def file; end - - # @return [Fixnum, nil] The associated line for the module (i.e - # the primary candidate: highest ranked monkeypatch). - # - # source://pry//lib/pry/wrapped_module.rb#183 - def line; end - - # Forward method invocations to the wrapped module - # - # source://pry//lib/pry/wrapped_module.rb#150 - def method_missing(method_name, *args, &block); end - - # The prefix that would appear before methods defined on this class. - # - # i.e. the "String." or "String#" in String.new and String#initialize. - # - # @return String - # - # source://pry//lib/pry/wrapped_module.rb#85 - def method_prefix; end - - # Is this strictly a module? (does not match classes) - # - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#120 - def module?; end - - # The name of the Module if it has one, otherwise #. - # - # @return [String] - # - # source://pry//lib/pry/wrapped_module.rb#100 - def nonblank_name; end - - # @return [Fixnum] The number of candidate definitions for the - # current module. - # - # source://pry//lib/pry/wrapped_module.rb#245 - def number_of_candidates; end - - # Is this a singleton class? - # - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#110 - def singleton_class?; end - - # Get the instance associated with this singleton class. - # - # @raise ArgumentError: tried to get instance of non singleton class - # @return [Object] - # - # source://pry//lib/pry/wrapped_module.rb#135 - def singleton_instance; end - - # Returns the source for the module. - # This source is for the primary candidate, if - # you would like source for other candidates use - # `WrappedModule#candidate` to select the candidate you're - # interested in. - # - # @raise [Pry::CommandError] If source cannot be found. - # @return [String] The source for the module. - # - # source://pry//lib/pry/wrapped_module.rb#206 - def source; end - - # @return [String, nil] The associated file for the module (i.e - # the primary candidate: highest ranked monkeypatch). - # - # source://pry//lib/pry/wrapped_module.rb#176 - def source_file; end - - # @return [Fixnum, nil] The associated line for the module (i.e - # the primary candidate: highest ranked monkeypatch). - # - # source://pry//lib/pry/wrapped_module.rb#183 - def source_line; end - - # Retrieve the source location of a module. Return value is in same - # format as Method#source_location. If the source location - # cannot be found this method returns `nil`. - # - # @return [Array, nil] The source location of the - # module (or class), or `nil` if no source location found. - # - # source://pry//lib/pry/wrapped_module.rb#168 - def source_location; end - - # @param times [Fixnum] How far to travel up the ancestor chain. - # @return [Pry::WrappedModule, nil] The wrapped module that is the - # superclass. - # When `self` is a `Module` then return the - # nth ancestor, otherwise (in the case of classes) return the - # nth ancestor that is a class. - # - # source://pry//lib/pry/wrapped_module.rb#270 - def super(times = T.unsafe(nil)); end - - # Returns the value of attribute wrapped. - # - # source://pry//lib/pry/wrapped_module.rb#20 - def wrapped; end - - # @return [String] Return the YARD docs for this module. - # - # source://pry//lib/pry/wrapped_module.rb#223 - def yard_doc; end - - # @return [Boolean] Whether YARD docs are available for this module. - # - # source://pry//lib/pry/wrapped_module.rb#260 - def yard_docs?; end - - # @return [String] Return the associated file for the - # module from YARD, if one exists. - # - # source://pry//lib/pry/wrapped_module.rb#212 - def yard_file; end - - # @return [Fixnum] Return the associated line for the - # module from YARD, if one exists. - # - # source://pry//lib/pry/wrapped_module.rb#218 - def yard_line; end - - private - - # Return all methods (instance methods and class methods) for a - # given module. - # - # @return [Array] - # - # source://pry//lib/pry/wrapped_module.rb#347 - def all_methods_for(mod); end - - # We only want methods that have a non-nil `source_location`. We also - # skip some spooky internal methods. - # - # @return [Array] - # - # source://pry//lib/pry/wrapped_module.rb#329 - def all_relevant_methods_for(mod); end - - # A helper method. - # - # source://pry//lib/pry/wrapped_module.rb#310 - def all_source_locations_by_popularity; end - - # memoized lines for file - # - # source://pry//lib/pry/wrapped_module.rb#371 - def lines_for_file(file); end - - # @return [Array>] The array of `Pry::Method` objects, - # there are two associated with each candidate. The first is the 'base - # method' for a candidate and it serves as the start point for - # the search in uncovering the module definition. The second is - # the last method defined for that candidate and it is used to - # speed up source code extraction. - # - # source://pry//lib/pry/wrapped_module.rb#302 - def method_candidates; end - - # Detect methods that are defined with `def_delegator` from the Forwardable - # module. We want to reject these methods as they screw up module - # extraction since the `source_location` for such methods points at forwardable.rb - # TODO: make this more robust as valid user-defined files called - # forwardable.rb are also skipped. - # - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#366 - def method_defined_by_forwardable_module?(method); end - - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#351 - def nested_module?(parent, name); end - - # @return [Pry::WrappedModule::Candidate] The candidate with the - # highest rank, that is the 'monkey patch' of this module with the - # highest number of methods, which contains a source code line that - # defines the module. It is considered the 'canonical' definition - # for the module. In the absense of a suitable candidate, the - # candidate of rank 0 will be returned, or a CommandError raised if - # there are no candidates at all. - # - # source://pry//lib/pry/wrapped_module.rb#292 - def primary_candidate; end - - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#158 - def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end - - class << self - # Convert a string to a module. - # - # @example - # Pry::WrappedModule.from_str("Pry::Code") - # @param mod_name [String] - # @param target [Binding] The binding where the lookup takes place. - # @return [Module, nil] The module or `nil` (if conversion failed). - # - # source://pry//lib/pry/wrapped_module.rb#29 - def from_str(mod_name, target = T.unsafe(nil)); end - - private - - # We use this method to decide whether code is safe to eval. Method's are - # generally not, but everything else is. - # TODO: is just checking != "method" enough?? - # TODO: see duplication of this method in Pry::CodeObject - # - # @param str [String] The string to lookup. - # @param target [Binding] Where the lookup takes place. - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#45 - def safe_to_evaluate?(str, target); end - end -end - -# This class represents a single candidate for a module/class definition. -# It provides access to the source, documentation, line and file -# for a monkeypatch (reopening) of a class/module. -# -# source://pry//lib/pry/wrapped_module/candidate.rb#8 -class Pry::WrappedModule::Candidate - include ::Pry::Helpers::DocumentationHelpers - include ::Pry::CodeObject::Helpers - extend ::Forwardable - extend ::Pry::Forwardable - - # @param wrapper [Pry::WrappedModule] The associated - # `Pry::WrappedModule` instance that owns the candidates. - # @param rank [Fixnum] The rank of the candidate to - # retrieve. Passing 0 returns 'primary candidate' (the candidate with largest - # number of methods), passing 1 retrieves candidate with - # second largest number of methods, and so on, up to - # `Pry::WrappedModule#number_of_candidates() - 1` - # @raise [Pry::CommandError] If `rank` is out of bounds. - # @return [Candidate] a new instance of Candidate - # - # source://pry//lib/pry/wrapped_module/candidate.rb#38 - def initialize(wrapper, rank); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def class?(*args, **_arg1, &block); end - - # @raise [Pry::CommandError] If documentation cannot be found. - # @return [String] The documentation for the candidate. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#70 - def doc; end - - # @return [String] The file where the module definition is located. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#14 - def file; end - - # @return [Fixnum] The line where the module definition is located. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#18 - def line; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def module?(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def nonblank_name(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def number_of_candidates(*args, **_arg1, &block); end - - # @raise [Pry::CommandError] If source code cannot be found. - # @return [String] The source for the candidate, i.e the - # complete module/class definition. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#59 - def source; end - - # @return [String] The file where the module definition is located. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#14 - def source_file; end - - # @return [Fixnum] The line where the module definition is located. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#18 - def source_line; end - - # @return [Array, nil] A `[String, Fixnum]` pair representing the - # source location (file and line) for the candidate or `nil` - # if no source location found. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#79 - def source_location; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def wrapped(*args, **_arg1, &block); end - - private - - # Locate the first line of the module definition. - # - # @param file [String] The file that contains the module - # definition (somewhere). - # @param line [Fixnum] The module definition should appear - # before this line (if it exists). - # @return [Fixnum] The line where the module is defined. This - # line number is one-indexed. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#99 - def first_line_of_module_definition(file, line); end - - # This method is used by `Candidate#source_location` as a - # starting point for the search for the candidate's definition. - # - # @return [Array] The source location of the base method used to - # calculate the source location of the candidate. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#116 - def first_method_source_location; end - - # @return [Array] The source location of the last method in this - # candidate's module definition. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#122 - def last_method_source_location; end - - # source://pry//lib/pry/forwardable.rb#18 - def lines_for_file(*a, &b); end - - # source://pry//lib/pry/forwardable.rb#18 - def method_candidates(*a, &b); end - - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module/candidate.rb#104 - def module_definition_first_line?(line); end - - # source://pry//lib/pry/forwardable.rb#18 - def name(*a, &b); end - - # Return the number of lines between the start of the class definition and - # the start of the last method. We use this value so we can quickly grab - # these lines from the file (without having to check each intervening line - # for validity, which is expensive) speeding up source extraction. - # - # @return [Integer] number of lines. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#132 - def number_of_lines_in_first_chunk; end - - # source://pry//lib/pry/forwardable.rb#18 - def yard_docs?(*a, &b); end -end diff --git a/sorbet/rbi/gems/psych@5.1.2.rbi b/sorbet/rbi/gems/psych@5.1.2.rbi new file mode 100644 index 000000000..b3dda12f4 --- /dev/null +++ b/sorbet/rbi/gems/psych@5.1.2.rbi @@ -0,0 +1,1731 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `psych` gem. +# Please instead update this file by running `bin/tapioca gem psych`. + +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + # call-seq: to_yaml(options = {}) + # + # Convert an object to YAML. See Psych.dump for more information on the + # available +options+. + # + # source://psych//psych/core_ext.rb#12 + def to_yaml(options = T.unsafe(nil)); end + + class << self + # source://psych//psych/core_ext.rb#3 + def yaml_tag(url); end + end +end + +# = Overview +# +# Psych is a YAML parser and emitter. +# Psych leverages libyaml [Home page: https://pyyaml.org/wiki/LibYAML] +# or [git repo: https://github.com/yaml/libyaml] for its YAML parsing +# and emitting capabilities. In addition to wrapping libyaml, Psych also +# knows how to serialize and de-serialize most Ruby objects to and from +# the YAML format. +# +# = I NEED TO PARSE OR EMIT YAML RIGHT NOW! +# +# # Parse some YAML +# Psych.load("--- foo") # => "foo" +# +# # Emit some YAML +# Psych.dump("foo") # => "--- foo\n...\n" +# { :a => 'b'}.to_yaml # => "---\n:a: b\n" +# +# Got more time on your hands? Keep on reading! +# +# == YAML Parsing +# +# Psych provides a range of interfaces for parsing a YAML document ranging from +# low level to high level, depending on your parsing needs. At the lowest +# level, is an event based parser. Mid level is access to the raw YAML AST, +# and at the highest level is the ability to unmarshal YAML to Ruby objects. +# +# == YAML Emitting +# +# Psych provides a range of interfaces ranging from low to high level for +# producing YAML documents. Very similar to the YAML parsing interfaces, Psych +# provides at the lowest level, an event based system, mid-level is building +# a YAML AST, and the highest level is converting a Ruby object straight to +# a YAML document. +# +# == High-level API +# +# === Parsing +# +# The high level YAML parser provided by Psych simply takes YAML as input and +# returns a Ruby data structure. For information on using the high level parser +# see Psych.load +# +# ==== Reading from a string +# +# Psych.safe_load("--- a") # => 'a' +# Psych.safe_load("---\n - a\n - b") # => ['a', 'b'] +# # From a trusted string: +# Psych.load("--- !ruby/range\nbegin: 0\nend: 42\nexcl: false\n") # => 0..42 +# +# ==== Reading from a file +# +# Psych.safe_load_file("data.yml", permitted_classes: [Date]) +# Psych.load_file("trusted_database.yml") +# +# ==== Exception handling +# +# begin +# # The second argument changes only the exception contents +# Psych.parse("--- `", "file.txt") +# rescue Psych::SyntaxError => ex +# ex.file # => 'file.txt' +# ex.message # => "(file.txt): found character that cannot start any token" +# end +# +# === Emitting +# +# The high level emitter has the easiest interface. Psych simply takes a Ruby +# data structure and converts it to a YAML document. See Psych.dump for more +# information on dumping a Ruby data structure. +# +# ==== Writing to a string +# +# # Dump an array, get back a YAML string +# Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" +# +# # Dump an array to an IO object +# Psych.dump(['a', 'b'], StringIO.new) # => # +# +# # Dump an array with indentation set +# Psych.dump(['a', ['b']], :indentation => 3) # => "---\n- a\n- - b\n" +# +# # Dump an array to an IO with indentation set +# Psych.dump(['a', ['b']], StringIO.new, :indentation => 3) +# +# ==== Writing to a file +# +# Currently there is no direct API for dumping Ruby structure to file: +# +# File.open('database.yml', 'w') do |file| +# file.write(Psych.dump(['a', 'b'])) +# end +# +# == Mid-level API +# +# === Parsing +# +# Psych provides access to an AST produced from parsing a YAML document. This +# tree is built using the Psych::Parser and Psych::TreeBuilder. The AST can +# be examined and manipulated freely. Please see Psych::parse_stream, +# Psych::Nodes, and Psych::Nodes::Node for more information on dealing with +# YAML syntax trees. +# +# ==== Reading from a string +# +# # Returns Psych::Nodes::Stream +# Psych.parse_stream("---\n - a\n - b") +# +# # Returns Psych::Nodes::Document +# Psych.parse("---\n - a\n - b") +# +# ==== Reading from a file +# +# # Returns Psych::Nodes::Stream +# Psych.parse_stream(File.read('database.yml')) +# +# # Returns Psych::Nodes::Document +# Psych.parse_file('database.yml') +# +# ==== Exception handling +# +# begin +# # The second argument changes only the exception contents +# Psych.parse("--- `", "file.txt") +# rescue Psych::SyntaxError => ex +# ex.file # => 'file.txt' +# ex.message # => "(file.txt): found character that cannot start any token" +# end +# +# === Emitting +# +# At the mid level is building an AST. This AST is exactly the same as the AST +# used when parsing a YAML document. Users can build an AST by hand and the +# AST knows how to emit itself as a YAML document. See Psych::Nodes, +# Psych::Nodes::Node, and Psych::TreeBuilder for more information on building +# a YAML AST. +# +# ==== Writing to a string +# +# # We need Psych::Nodes::Stream (not Psych::Nodes::Document) +# stream = Psych.parse_stream("---\n - a\n - b") +# +# stream.to_yaml # => "---\n- a\n- b\n" +# +# ==== Writing to a file +# +# # We need Psych::Nodes::Stream (not Psych::Nodes::Document) +# stream = Psych.parse_stream(File.read('database.yml')) +# +# File.open('database.yml', 'w') do |file| +# file.write(stream.to_yaml) +# end +# +# == Low-level API +# +# === Parsing +# +# The lowest level parser should be used when the YAML input is already known, +# and the developer does not want to pay the price of building an AST or +# automatic detection and conversion to Ruby objects. See Psych::Parser for +# more information on using the event based parser. +# +# ==== Reading to Psych::Nodes::Stream structure +# +# parser = Psych::Parser.new(TreeBuilder.new) # => # +# parser = Psych.parser # it's an alias for the above +# +# parser.parse("---\n - a\n - b") # => # +# parser.handler # => # +# parser.handler.root # => # +# +# ==== Receiving an events stream +# +# recorder = Psych::Handlers::Recorder.new +# parser = Psych::Parser.new(recorder) +# +# parser.parse("---\n - a\n - b") +# recorder.events # => [list of [event, args] lists] +# # event is one of: Psych::Handler::EVENTS +# # args are the arguments passed to the event +# +# === Emitting +# +# The lowest level emitter is an event based system. Events are sent to a +# Psych::Emitter object. That object knows how to convert the events to a YAML +# document. This interface should be used when document format is known in +# advance or speed is a concern. See Psych::Emitter for more information. +# +# ==== Writing to a Ruby structure +# +# Psych.parser.parse("--- a") # => # +# +# parser.handler.first # => # +# parser.handler.first.to_ruby # => ["a"] +# +# parser.handler.root.first # => # +# parser.handler.root.first.to_ruby # => "a" +# +# # You can instantiate an Emitter manually +# Psych::Visitors::ToRuby.new.accept(parser.handler.root.first) +# # => "a" +module Psych + class << self + # source://psych//psych.rb#682 + def add_builtin_type(type_tag, &block); end + + # :stopdoc: + # + # source://psych//psych.rb#676 + def add_domain_type(domain, type_tag, &block); end + + # source://psych//psych.rb#692 + def add_tag(tag, klass); end + + # source://psych//psych.rb#708 + def config; end + + # source://psych//psych.rb#720 + def domain_types; end + + # source://psych//psych.rb#732 + def domain_types=(value); end + + # call-seq: + # Psych.dump(o) -> string of yaml + # Psych.dump(o, options) -> string of yaml + # Psych.dump(o, io) -> io object passed in + # Psych.dump(o, io, options) -> io object passed in + # + # Dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in + # to control the output format. If an IO object is passed in, the YAML will + # be dumped to that IO object. + # + # Currently supported options are: + # + # [:indentation] Number of space characters used to indent. + # Acceptable value should be in 0..9 range, + # otherwise option is ignored. + # + # Default: 2. + # [:line_width] Max character to wrap line at. + # + # Default: 0 (meaning "wrap at 81"). + # [:canonical] Write "canonical" YAML form (very verbose, yet + # strictly formal). + # + # Default: false. + # [:header] Write %YAML [version] at the beginning of document. + # + # Default: false. + # + # Example: + # + # # Dump an array, get back a YAML string + # Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" + # + # # Dump an array to an IO object + # Psych.dump(['a', 'b'], StringIO.new) # => # + # + # # Dump an array with indentation set + # Psych.dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n" + # + # # Dump an array to an IO with indentation set + # Psych.dump(['a', ['b']], StringIO.new, indentation: 3) + # + # source://psych//psych.rb#505 + def dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end + + # Dump a list of objects as separate documents to a document stream. + # + # Example: + # + # Psych.dump_stream("foo\n ", {}) # => "--- ! \"foo\\n \"\n--- {}\n" + # + # source://psych//psych.rb#595 + def dump_stream(*objects); end + + # source://psych//psych.rb#716 + def dump_tags; end + + # source://psych//psych.rb#728 + def dump_tags=(value); end + + # Load +yaml+ in to a Ruby data structure. If multiple documents are + # provided, the object contained in the first document will be returned. + # +filename+ will be used in the exception message if any exception + # is raised while parsing. If +yaml+ is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.load("--- a") # => 'a' + # Psych.load("---\n - a\n - b") # => ['a', 'b'] + # + # begin + # Psych.load("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # When the optional +symbolize_names+ keyword argument is set to a + # true value, returns symbols for keys in Hash objects (default: strings). + # + # Psych.load("---\n foo: bar") # => {"foo"=>"bar"} + # Psych.load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} + # + # Raises a TypeError when `yaml` parameter is NilClass. This method is + # similar to `safe_load` except that `Symbol` objects are allowed by default. + # + # source://psych//psych.rb#368 + def load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # Loads the document contained in +filename+. Returns the yaml contained in + # +filename+ as a Ruby object, or if the file is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # See load for options. + # + # source://psych//psych.rb#669 + def load_file(filename, **kwargs); end + + # Load multiple documents given in +yaml+. Returns the parsed documents + # as a list. If a block is given, each document will be converted to Ruby + # and passed to the block during parsing + # + # Example: + # + # Psych.load_stream("--- foo\n...\n--- bar\n...") # => ['foo', 'bar'] + # + # list = [] + # Psych.load_stream("--- foo\n...\n--- bar\n...") do |ruby| + # list << ruby + # end + # list # => ['foo', 'bar'] + # + # source://psych//psych.rb#626 + def load_stream(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), **kwargs); end + + # source://psych//psych.rb#712 + def load_tags; end + + # source://psych//psych.rb#724 + def load_tags=(value); end + + # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Document. + # +filename+ is used in the exception message if a Psych::SyntaxError is + # raised. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.parse("---\n - a\n - b") # => # + # + # begin + # Psych.parse("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # See Psych::Nodes for more information about YAML AST. + # + # source://psych//psych.rb#398 + def parse(yaml, filename: T.unsafe(nil)); end + + # Parse a file at +filename+. Returns the Psych::Nodes::Document. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # source://psych//psych.rb#410 + def parse_file(filename, fallback: T.unsafe(nil)); end + + # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Stream. + # This method can handle multiple YAML documents contained in +yaml+. + # +filename+ is used in the exception message if a Psych::SyntaxError is + # raised. + # + # If a block is given, a Psych::Nodes::Document node will be yielded to the + # block as it's being parsed. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.parse_stream("---\n - a\n - b") # => # + # + # Psych.parse_stream("--- a\n--- b") do |node| + # node # => # + # end + # + # begin + # Psych.parse_stream("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # Raises a TypeError when NilClass is passed. + # + # See Psych::Nodes for more information about YAML AST. + # + # source://psych//psych.rb#452 + def parse_stream(yaml, filename: T.unsafe(nil), &block); end + + # Returns a default parser + # + # source://psych//psych.rb#419 + def parser; end + + # source://psych//psych.rb#688 + def remove_type(type_tag); end + + # call-seq: + # Psych.safe_dump(o) -> string of yaml + # Psych.safe_dump(o, options) -> string of yaml + # Psych.safe_dump(o, io) -> io object passed in + # Psych.safe_dump(o, io, options) -> io object passed in + # + # Safely dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in + # to control the output format. If an IO object is passed in, the YAML will + # be dumped to that IO object. By default, only the following + # classes are allowed to be serialized: + # + # * TrueClass + # * FalseClass + # * NilClass + # * Integer + # * Float + # * String + # * Array + # * Hash + # + # Arbitrary classes can be allowed by adding those classes to the +permitted_classes+ + # keyword argument. They are additive. For example, to allow Date serialization: + # + # Psych.safe_dump(yaml, permitted_classes: [Date]) + # + # Now the Date class can be dumped in addition to the classes listed above. + # + # A Psych::DisallowedClass exception will be raised if the object contains a + # class that isn't in the +permitted_classes+ list. + # + # Currently supported options are: + # + # [:indentation] Number of space characters used to indent. + # Acceptable value should be in 0..9 range, + # otherwise option is ignored. + # + # Default: 2. + # [:line_width] Max character to wrap line at. + # + # Default: 0 (meaning "wrap at 81"). + # [:canonical] Write "canonical" YAML form (very verbose, yet + # strictly formal). + # + # Default: false. + # [:header] Write %YAML [version] at the beginning of document. + # + # Default: false. + # + # Example: + # + # # Dump an array, get back a YAML string + # Psych.safe_dump(['a', 'b']) # => "---\n- a\n- b\n" + # + # # Dump an array to an IO object + # Psych.safe_dump(['a', 'b'], StringIO.new) # => # + # + # # Dump an array with indentation set + # Psych.safe_dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n" + # + # # Dump an array to an IO with indentation set + # Psych.safe_dump(['a', ['b']], StringIO.new, indentation: 3) + # + # source://psych//psych.rb#578 + def safe_dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end + + # Safely load the yaml string in +yaml+. By default, only the following + # classes are allowed to be deserialized: + # + # * TrueClass + # * FalseClass + # * NilClass + # * Integer + # * Float + # * String + # * Array + # * Hash + # + # Recursive data structures are not allowed by default. Arbitrary classes + # can be allowed by adding those classes to the +permitted_classes+ keyword argument. They are + # additive. For example, to allow Date deserialization: + # + # Psych.safe_load(yaml, permitted_classes: [Date]) + # + # Now the Date class can be loaded in addition to the classes listed above. + # + # Aliases can be explicitly allowed by changing the +aliases+ keyword argument. + # For example: + # + # x = [] + # x << x + # yaml = Psych.dump x + # Psych.safe_load yaml # => raises an exception + # Psych.safe_load yaml, aliases: true # => loads the aliases + # + # A Psych::DisallowedClass exception will be raised if the yaml contains a + # class that isn't in the +permitted_classes+ list. + # + # A Psych::AliasesNotEnabled exception will be raised if the yaml contains aliases + # but the +aliases+ keyword argument is set to false. + # + # +filename+ will be used in the exception message if any exception is raised + # while parsing. + # + # When the optional +symbolize_names+ keyword argument is set to a + # true value, returns symbols for keys in Hash objects (default: strings). + # + # Psych.safe_load("---\n foo: bar") # => {"foo"=>"bar"} + # Psych.safe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} + # + # source://psych//psych.rb#322 + def safe_load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # Safely loads the document contained in +filename+. Returns the yaml contained in + # +filename+ as a Ruby object, or if the file is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # See safe_load for options. + # + # source://psych//psych.rb#658 + def safe_load_file(filename, **kwargs); end + + # Dump Ruby +object+ to a JSON string. + # + # source://psych//psych.rb#605 + def to_json(object); end + + # Load +yaml+ in to a Ruby data structure. If multiple documents are + # provided, the object contained in the first document will be returned. + # +filename+ will be used in the exception message if any exception + # is raised while parsing. If +yaml+ is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.unsafe_load("--- a") # => 'a' + # Psych.unsafe_load("---\n - a\n - b") # => ['a', 'b'] + # + # begin + # Psych.unsafe_load("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # When the optional +symbolize_names+ keyword argument is set to a + # true value, returns symbols for keys in Hash objects (default: strings). + # + # Psych.unsafe_load("---\n foo: bar") # => {"foo"=>"bar"} + # Psych.unsafe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} + # + # Raises a TypeError when `yaml` parameter is NilClass + # + # NOTE: This method *should not* be used to parse untrusted documents, such as + # YAML documents that are supplied via user input. Instead, please use the + # load method or the safe_load method. + # + # source://psych//psych.rb#271 + def unsafe_load(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # Load the document contained in +filename+. Returns the yaml contained in + # +filename+ as a Ruby object, or if the file is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # + # NOTE: This method *should not* be used to parse untrusted documents, such as + # YAML documents that are supplied via user input. Instead, please use the + # safe_load_file method. + # + # source://psych//psych.rb#647 + def unsafe_load_file(filename, **kwargs); end + end +end + +# Subclasses `BadAlias` for backwards compatibility +class Psych::AliasesNotEnabled < ::Psych::BadAlias + # @return [AliasesNotEnabled] a new instance of AliasesNotEnabled + # + # source://psych//psych/exception.rb#11 + def initialize; end +end + +# Subclasses `BadAlias` for backwards compatibility +class Psych::AnchorNotDefined < ::Psych::BadAlias + # @return [AnchorNotDefined] a new instance of AnchorNotDefined + # + # source://psych//psych/exception.rb#18 + def initialize(anchor_name); end +end + +class Psych::ClassLoader + # @return [ClassLoader] a new instance of ClassLoader + # + # source://psych//psych/class_loader.rb#21 + def initialize; end + + # source://psych//psych/class_loader.rb#39 + def big_decimal; end + + # source://psych//psych/class_loader.rb#39 + def complex; end + + # source://psych//psych/class_loader.rb#39 + def date; end + + # source://psych//psych/class_loader.rb#39 + def date_time; end + + # source://psych//psych/class_loader.rb#39 + def exception; end + + # source://psych//psych/class_loader.rb#25 + def load(klassname); end + + # source://psych//psych/class_loader.rb#39 + def object; end + + # source://psych//psych/class_loader.rb#39 + def psych_omap; end + + # source://psych//psych/class_loader.rb#39 + def psych_set; end + + # source://psych//psych/class_loader.rb#39 + def range; end + + # source://psych//psych/class_loader.rb#39 + def rational; end + + # source://psych//psych/class_loader.rb#39 + def regexp; end + + # source://psych//psych/class_loader.rb#39 + def struct; end + + # source://psych//psych/class_loader.rb#39 + def symbol; end + + # source://psych//psych/class_loader.rb#31 + def symbolize(sym); end + + private + + # source://psych//psych/class_loader.rb#47 + def find(klassname); end + + # source://psych//psych/class_loader.rb#51 + def resolve(klassname); end +end + +class Psych::ClassLoader::Restricted < ::Psych::ClassLoader + # @return [Restricted] a new instance of Restricted + # + # source://psych//psych/class_loader.rb#77 + def initialize(classes, symbols); end + + # source://psych//psych/class_loader.rb#83 + def symbolize(sym); end + + private + + # source://psych//psych/class_loader.rb#95 + def find(klassname); end +end + +# If an object defines +encode_with+, then an instance of Psych::Coder will +# be passed to the method when the object is being serialized. The Coder +# automatically assumes a Psych::Nodes::Mapping is being emitted. Other +# objects like Sequence and Scalar may be emitted if +seq=+ or +scalar=+ are +# called, respectively. +class Psych::Coder + # @return [Coder] a new instance of Coder + # + # source://psych//psych/coder.rb#13 + def initialize(tag); end + + # source://psych//psych/coder.rb#84 + def [](k); end + + # source://psych//psych/coder.rb#78 + def []=(k, v); end + + # source://psych//psych/coder.rb#78 + def add(k, v); end + + # Returns the value of attribute implicit. + # + # source://psych//psych/coder.rb#10 + def implicit; end + + # Sets the attribute implicit + # + # @param value the value to set the attribute implicit to. + # + # source://psych//psych/coder.rb#10 + def implicit=(_arg0); end + + # Emit a map. The coder will be yielded to the block. + # + # @yield [_self] + # @yieldparam _self [Psych::Coder] the object that the method was called on + # + # source://psych//psych/coder.rb#34 + def map(tag = T.unsafe(nil), style = T.unsafe(nil)); end + + # Emit a map with +value+ + # + # source://psych//psych/coder.rb#73 + def map=(map); end + + # Returns the value of attribute object. + # + # source://psych//psych/coder.rb#10 + def object; end + + # Sets the attribute object + # + # @param value the value to set the attribute object to. + # + # source://psych//psych/coder.rb#10 + def object=(_arg0); end + + # Emit a sequence with +map+ and +tag+ + # + # source://psych//psych/coder.rb#54 + def represent_map(tag, map); end + + # Emit an arbitrary object +obj+ and +tag+ + # + # source://psych//psych/coder.rb#60 + def represent_object(tag, obj); end + + # Emit a scalar with +value+ and +tag+ + # + # source://psych//psych/coder.rb#42 + def represent_scalar(tag, value); end + + # Emit a sequence with +list+ and +tag+ + # + # source://psych//psych/coder.rb#48 + def represent_seq(tag, list); end + + # source://psych//psych/coder.rb#24 + def scalar(*args); end + + # Emit a scalar with +value+ + # + # source://psych//psych/coder.rb#67 + def scalar=(value); end + + # Returns the value of attribute seq. + # + # source://psych//psych/coder.rb#11 + def seq; end + + # Emit a sequence of +list+ + # + # source://psych//psych/coder.rb#90 + def seq=(list); end + + # Returns the value of attribute style. + # + # source://psych//psych/coder.rb#10 + def style; end + + # Sets the attribute style + # + # @param value the value to set the attribute style to. + # + # source://psych//psych/coder.rb#10 + def style=(_arg0); end + + # Returns the value of attribute tag. + # + # source://psych//psych/coder.rb#10 + def tag; end + + # Sets the attribute tag + # + # @param value the value to set the attribute tag to. + # + # source://psych//psych/coder.rb#10 + def tag=(_arg0); end + + # Returns the value of attribute type. + # + # source://psych//psych/coder.rb#11 + def type; end +end + +class Psych::DisallowedClass < ::Psych::Exception + # @return [DisallowedClass] a new instance of DisallowedClass + # + # source://psych//psych/exception.rb#24 + def initialize(action, klass_name); end +end + +# Psych::Handler is an abstract base class that defines the events used +# when dealing with Psych::Parser. Clients who want to use Psych::Parser +# should implement a class that inherits from Psych::Handler and define +# events that they can handle. +# +# Psych::Handler defines all events that Psych::Parser can possibly send to +# event handlers. +# +# See Psych::Parser for more details +class Psych::Handler + # Called when an alias is found to +anchor+. +anchor+ will be the name + # of the anchor found. + # + # === Example + # + # Here we have an example of an array that references itself in YAML: + # + # --- &ponies + # - first element + # - *ponies + # + # &ponies is the anchor, *ponies is the alias. In this case, alias is + # called with "ponies". + # + # source://psych//psych/handler.rb#110 + def alias(anchor); end + + # Called when an empty event happens. (Which, as far as I can tell, is + # never). + # + # source://psych//psych/handler.rb#236 + def empty; end + + # Called with the document ends. +implicit+ is a boolean value indicating + # whether or not the document has an implicit ending. + # + # === Example + # + # Given the following YAML: + # + # --- + # hello world + # + # +implicit+ will be true. Given this YAML: + # + # --- + # hello world + # ... + # + # +implicit+ will be false. + # + # source://psych//psych/handler.rb#93 + def end_document(implicit); end + + # Called when a map ends + # + # source://psych//psych/handler.rb#230 + def end_mapping; end + + # Called when a sequence ends. + # + # source://psych//psych/handler.rb#191 + def end_sequence; end + + # Called when the YAML stream ends + # + # source://psych//psych/handler.rb#241 + def end_stream; end + + # Called before each event with line/column information. + # + # source://psych//psych/handler.rb#246 + def event_location(start_line, start_column, end_line, end_column); end + + # Called when a scalar +value+ is found. The scalar may have an + # +anchor+, a +tag+, be implicitly +plain+ or implicitly +quoted+ + # + # +value+ is the string value of the scalar + # +anchor+ is an associated anchor or nil + # +tag+ is an associated tag or nil + # +plain+ is a boolean value + # +quoted+ is a boolean value + # +style+ is an integer indicating the string style + # + # See the constants in Psych::Nodes::Scalar for the possible values of + # +style+ + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # - !str "foo" + # - &anchor fun + # - many + # lines + # - | + # many + # newlines + # + # The above YAML document contains a list with four strings. Here are + # the parameters sent to this method in the same order: + # + # # value anchor tag plain quoted style + # ["foo", nil, "!str", false, false, 3 ] + # ["fun", "anchor", nil, true, false, 1 ] + # ["many lines", nil, nil, true, false, 1 ] + # ["many\nnewlines\n", nil, nil, false, true, 4 ] + # + # source://psych//psych/handler.rb#150 + def scalar(value, anchor, tag, plain, quoted, style); end + + # Called when the document starts with the declared +version+, + # +tag_directives+, if the document is +implicit+. + # + # +version+ will be an array of integers indicating the YAML version being + # dealt with, +tag_directives+ is a list of tuples indicating the prefix + # and suffix of each tag, and +implicit+ is a boolean indicating whether + # the document is started implicitly. + # + # === Example + # + # Given the following YAML: + # + # %YAML 1.1 + # %TAG ! tag:tenderlovemaking.com,2009: + # --- !squee + # + # The parameters for start_document must be this: + # + # version # => [1, 1] + # tag_directives # => [["!", "tag:tenderlovemaking.com,2009:"]] + # implicit # => false + # + # source://psych//psych/handler.rb#72 + def start_document(version, tag_directives, implicit); end + + # Called when a map starts. + # + # +anchor+ is the anchor associated with the map or +nil+. + # +tag+ is the tag associated with the map or +nil+. + # +implicit+ is a boolean indicating whether or not the map was implicitly + # started. + # +style+ is an integer indicating the mapping style. + # + # See the constants in Psych::Nodes::Mapping for the possible values of + # +style+. + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # k: !!map { hello: world } + # v: &pewpew + # hello: world + # + # The above YAML document consists of three maps, an outer map that contains + # two inner maps. Below is a matrix of the parameters sent in order to + # represent these three maps: + # + # # anchor tag implicit style + # [nil, nil, true, 1 ] + # [nil, "tag:yaml.org,2002:map", false, 2 ] + # ["pewpew", nil, true, 1 ] + # + # source://psych//psych/handler.rb#225 + def start_mapping(anchor, tag, implicit, style); end + + # Called when a sequence is started. + # + # +anchor+ is the anchor associated with the sequence or nil. + # +tag+ is the tag associated with the sequence or nil. + # +implicit+ a boolean indicating whether or not the sequence was implicitly + # started. + # +style+ is an integer indicating the list style. + # + # See the constants in Psych::Nodes::Sequence for the possible values of + # +style+. + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # - !!seq [ + # a + # ] + # - &pewpew + # - b + # + # The above YAML document consists of three lists, an outer list that + # contains two inner lists. Here is a matrix of the parameters sent + # to represent these lists: + # + # # anchor tag implicit style + # [nil, nil, true, 1 ] + # [nil, "tag:yaml.org,2002:seq", false, 2 ] + # ["pewpew", nil, true, 1 ] + # + # source://psych//psych/handler.rb#186 + def start_sequence(anchor, tag, implicit, style); end + + # Called with +encoding+ when the YAML stream starts. This method is + # called once per stream. A stream may contain multiple documents. + # + # See the constants in Psych::Parser for the possible values of +encoding+. + # + # source://psych//psych/handler.rb#47 + def start_stream(encoding); end + + # Is this handler a streaming handler? + # + # @return [Boolean] + # + # source://psych//psych/handler.rb#251 + def streaming?; end +end + +# Configuration options for dumping YAML. +class Psych::Handler::DumperOptions + # @return [DumperOptions] a new instance of DumperOptions + # + # source://psych//psych/handler.rb#19 + def initialize; end + + # Returns the value of attribute canonical. + # + # source://psych//psych/handler.rb#17 + def canonical; end + + # Sets the attribute canonical + # + # @param value the value to set the attribute canonical to. + # + # source://psych//psych/handler.rb#17 + def canonical=(_arg0); end + + # Returns the value of attribute indentation. + # + # source://psych//psych/handler.rb#17 + def indentation; end + + # Sets the attribute indentation + # + # @param value the value to set the attribute indentation to. + # + # source://psych//psych/handler.rb#17 + def indentation=(_arg0); end + + # Returns the value of attribute line_width. + # + # source://psych//psych/handler.rb#17 + def line_width; end + + # Sets the attribute line_width + # + # @param value the value to set the attribute line_width to. + # + # source://psych//psych/handler.rb#17 + def line_width=(_arg0); end +end + +class Psych::JSON::Stream < ::Psych::Visitors::JSONTree + include ::Psych::Streaming + extend ::Psych::Streaming::ClassMethods +end + +# YAML event parser class. This class parses a YAML document and calls +# events on the handler that is passed to the constructor. The events can +# be used for things such as constructing a YAML AST or deserializing YAML +# documents. It can even be fed back to Psych::Emitter to emit the same +# document that was parsed. +# +# See Psych::Handler for documentation on the events that Psych::Parser emits. +# +# Here is an example that prints out ever scalar found in a YAML document: +# +# # Handler for detecting scalar values +# class ScalarHandler < Psych::Handler +# def scalar value, anchor, tag, plain, quoted, style +# puts value +# end +# end +# +# parser = Psych::Parser.new(ScalarHandler.new) +# parser.parse(yaml_document) +# +# Here is an example that feeds the parser back in to Psych::Emitter. The +# YAML document is read from STDIN and written back out to STDERR: +# +# parser = Psych::Parser.new(Psych::Emitter.new($stderr)) +# parser.parse($stdin) +# +# Psych uses Psych::Parser in combination with Psych::TreeBuilder to +# construct an AST of the parsed YAML document. +class Psych::Parser + # Creates a new Psych::Parser instance with +handler+. YAML events will + # be called on +handler+. See Psych::Parser for more details. + # + # @return [Parser] a new instance of Parser + # + # source://psych//psych/parser.rb#47 + def initialize(handler = T.unsafe(nil)); end + + # Set the encoding for this parser to +encoding+ + # + # source://psych//psych/parser.rb#41 + def external_encoding=(_arg0); end + + # The handler on which events will be called + # + # source://psych//psych/parser.rb#38 + def handler; end + + # The handler on which events will be called + # + # source://psych//psych/parser.rb#38 + def handler=(_arg0); end + + # call-seq: + # parser.parse(yaml) + # + # Parse the YAML document contained in +yaml+. Events will be called on + # the handler set on the parser instance. + # + # See Psych::Parser and Psych::Parser#handler + # + # source://psych//psych/parser.rb#61 + def parse(yaml, path = T.unsafe(nil)); end +end + +# Scan scalars for built in types +class Psych::ScalarScanner + # Create a new scanner + # + # @return [ScalarScanner] a new instance of ScalarScanner + # + # source://psych//psych/scalar_scanner.rb#30 + def initialize(class_loader, strict_integer: T.unsafe(nil)); end + + # Returns the value of attribute class_loader. + # + # source://psych//psych/scalar_scanner.rb#27 + def class_loader; end + + # Parse and return an int from +string+ + # + # source://psych//psych/scalar_scanner.rb#109 + def parse_int(string); end + + # Parse and return a Time from +string+ + # + # source://psych//psych/scalar_scanner.rb#115 + def parse_time(string); end + + # Tokenize +string+ returning the Ruby object + # + # source://psych//psych/scalar_scanner.rb#37 + def tokenize(string); end +end + +# Same as above, but allows commas. +# Not to YML spec, but kept for backwards compatibility +# +# source://psych//psych/scalar_scanner.rb#22 +Psych::ScalarScanner::INTEGER_LEGACY = T.let(T.unsafe(nil), Regexp) + +# Taken from http://yaml.org/type/int.html +# +# source://psych//psych/scalar_scanner.rb#15 +Psych::ScalarScanner::INTEGER_STRICT = T.let(T.unsafe(nil), Regexp) + +# Psych::Stream is a streaming YAML emitter. It will not buffer your YAML, +# but send it straight to an IO. +# +# Here is an example use: +# +# stream = Psych::Stream.new($stdout) +# stream.start +# stream.push({:foo => 'bar'}) +# stream.finish +# +# YAML will be immediately emitted to $stdout with no buffering. +# +# Psych::Stream#start will take a block and ensure that Psych::Stream#finish +# is called, so you can do this form: +# +# stream = Psych::Stream.new($stdout) +# stream.start do |em| +# em.push(:foo => 'bar') +# end +class Psych::Stream < ::Psych::Visitors::YAMLTree + include ::Psych::Streaming + extend ::Psych::Streaming::ClassMethods +end + +class Psych::Stream::Emitter < ::Psych::Emitter + # source://psych//psych/stream.rb#26 + def end_document(implicit_end = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://psych//psych/stream.rb#30 + def streaming?; end +end + +module Psych::Streaming + # Start streaming using +encoding+ + # + # source://psych//psych/streaming.rb#18 + def start(encoding = T.unsafe(nil)); end + + private + + # source://psych//psych/streaming.rb#25 + def register(target, obj); end +end + +module Psych::Streaming::ClassMethods + # Create a new streaming emitter. Emitter will print to +io+. See + # Psych::Stream for an example. + # + # source://psych//psych/streaming.rb#8 + def new(io); end +end + +class Psych::SyntaxError < ::Psych::Exception + # @return [SyntaxError] a new instance of SyntaxError + # + # source://psych//psych/syntax_error.rb#8 + def initialize(file, line, col, offset, problem, context); end + + # Returns the value of attribute column. + # + # source://psych//psych/syntax_error.rb#6 + def column; end + + # Returns the value of attribute context. + # + # source://psych//psych/syntax_error.rb#6 + def context; end + + # Returns the value of attribute file. + # + # source://psych//psych/syntax_error.rb#6 + def file; end + + # Returns the value of attribute line. + # + # source://psych//psych/syntax_error.rb#6 + def line; end + + # Returns the value of attribute offset. + # + # source://psych//psych/syntax_error.rb#6 + def offset; end + + # Returns the value of attribute problem. + # + # source://psych//psych/syntax_error.rb#6 + def problem; end +end + +# This class works in conjunction with Psych::Parser to build an in-memory +# parse tree that represents a YAML document. +# +# == Example +# +# parser = Psych::Parser.new Psych::TreeBuilder.new +# parser.parse('--- foo') +# tree = parser.handler.root +# +# See Psych::Handler for documentation on the event methods used in this +# class. +class Psych::TreeBuilder < ::Psych::Handler + # Create a new TreeBuilder instance + # + # @return [TreeBuilder] a new instance of TreeBuilder + # + # source://psych//psych/tree_builder.rb#22 + def initialize; end + + # source://psych//psych/tree_builder.rb#103 + def alias(anchor); end + + # Handles end_document events with +version+, +tag_directives+, + # and +implicit+ styling. + # + # See Psych::Handler#start_document + # + # source://psych//psych/tree_builder.rb#77 + def end_document(implicit_end = T.unsafe(nil)); end + + # source://psych//psych/tree_builder.rb#52 + def end_mapping; end + + # source://psych//psych/tree_builder.rb#52 + def end_sequence; end + + # source://psych//psych/tree_builder.rb#90 + def end_stream; end + + # source://psych//psych/tree_builder.rb#33 + def event_location(start_line, start_column, end_line, end_column); end + + # Returns the root node for the built tree + # + # source://psych//psych/tree_builder.rb#19 + def root; end + + # source://psych//psych/tree_builder.rb#96 + def scalar(value, anchor, tag, plain, quoted, style); end + + # Handles start_document events with +version+, +tag_directives+, + # and +implicit+ styling. + # + # See Psych::Handler#start_document + # + # source://psych//psych/tree_builder.rb#65 + def start_document(version, tag_directives, implicit); end + + # source://psych//psych/tree_builder.rb#45 + def start_mapping(anchor, tag, implicit, style); end + + # source://psych//psych/tree_builder.rb#45 + def start_sequence(anchor, tag, implicit, style); end + + # source://psych//psych/tree_builder.rb#84 + def start_stream(encoding); end + + private + + # source://psych//psych/tree_builder.rb#116 + def pop; end + + # source://psych//psych/tree_builder.rb#111 + def push(value); end + + # source://psych//psych/tree_builder.rb#132 + def set_end_location(node); end + + # source://psych//psych/tree_builder.rb#122 + def set_location(node); end + + # source://psych//psych/tree_builder.rb#127 + def set_start_location(node); end +end + +# The version of Psych you are using +# +# source://psych//psych/versions.rb#5 +Psych::VERSION = T.let(T.unsafe(nil), String) + +class Psych::Visitors::DepthFirst < ::Psych::Visitors::Visitor + # @return [DepthFirst] a new instance of DepthFirst + # + # source://psych//psych/visitors/depth_first.rb#5 + def initialize(block); end + + private + + # source://psych//psych/visitors/depth_first.rb#11 + def nary(o); end + + # source://psych//psych/visitors/depth_first.rb#20 + def terminal(o); end + + # source://psych//psych/visitors/depth_first.rb#20 + def visit_Psych_Nodes_Alias(o); end + + # source://psych//psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Document(o); end + + # source://psych//psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Mapping(o); end + + # source://psych//psych/visitors/depth_first.rb#20 + def visit_Psych_Nodes_Scalar(o); end + + # source://psych//psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Sequence(o); end + + # source://psych//psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Stream(o); end +end + +class Psych::Visitors::RestrictedYAMLTree < ::Psych::Visitors::YAMLTree + # @return [RestrictedYAMLTree] a new instance of RestrictedYAMLTree + # + # source://psych//psych/visitors/yaml_tree.rb#552 + def initialize(emitter, ss, options); end + + # source://psych//psych/visitors/yaml_tree.rb#565 + def accept(target); end + + # source://psych//psych/visitors/yaml_tree.rb#577 + def visit_Symbol(sym); end +end + +# source://psych//psych/visitors/yaml_tree.rb#541 +Psych::Visitors::RestrictedYAMLTree::DEFAULT_PERMITTED_CLASSES = T.let(T.unsafe(nil), Hash) + +# This class walks a YAML AST, converting each node to Ruby +class Psych::Visitors::ToRuby < ::Psych::Visitors::Visitor + # @return [ToRuby] a new instance of ToRuby + # + # source://psych//psych/visitors/to_ruby.rb#23 + def initialize(ss, class_loader, symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil)); end + + # source://psych//psych/visitors/to_ruby.rb#34 + def accept(target); end + + # Returns the value of attribute class_loader. + # + # source://psych//psych/visitors/to_ruby.rb#21 + def class_loader; end + + # source://psych//psych/visitors/to_ruby.rb#327 + def visit_Psych_Nodes_Alias(o); end + + # source://psych//psych/visitors/to_ruby.rb#319 + def visit_Psych_Nodes_Document(o); end + + # source://psych//psych/visitors/to_ruby.rb#165 + def visit_Psych_Nodes_Mapping(o); end + + # source://psych//psych/visitors/to_ruby.rb#129 + def visit_Psych_Nodes_Scalar(o); end + + # source://psych//psych/visitors/to_ruby.rb#133 + def visit_Psych_Nodes_Sequence(o); end + + # source://psych//psych/visitors/to_ruby.rb#323 + def visit_Psych_Nodes_Stream(o); end + + private + + # source://psych//psych/visitors/to_ruby.rb#395 + def deduplicate(key); end + + # source://psych//psych/visitors/to_ruby.rb#51 + def deserialize(o); end + + # source://psych//psych/visitors/to_ruby.rb#412 + def init_with(o, h, node); end + + # source://psych//psych/visitors/to_ruby.rb#404 + def merge_key(hash, key, val); end + + # source://psych//psych/visitors/to_ruby.rb#333 + def register(node, object); end + + # source://psych//psych/visitors/to_ruby.rb#338 + def register_empty(object); end + + # Convert +klassname+ to a Class + # + # source://psych//psych/visitors/to_ruby.rb#425 + def resolve_class(klassname); end + + # source://psych//psych/visitors/to_ruby.rb#407 + def revive(klass, node); end + + # source://psych//psych/visitors/to_ruby.rb#344 + def revive_hash(hash, o, tagged = T.unsafe(nil)); end + + class << self + # source://psych//psych/visitors/to_ruby.rb#15 + def create(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + end +end + +class Psych::Visitors::Visitor + # source://psych//psych/visitors/visitor.rb#5 + def accept(target); end + + private + + # source://psych//psych/visitors/visitor.rb#19 + def dispatch; end + + # source://psych//psych/visitors/visitor.rb#29 + def visit(target); end + + class << self + # @api private + # + # source://psych//psych/visitors/visitor.rb#12 + def dispatch_cache; end + end +end + +# YAMLTree builds a YAML ast given a Ruby object. For example: +# +# builder = Psych::Visitors::YAMLTree.new +# builder << { :foo => 'bar' } +# builder.tree # => #env['rack.session.options']. Additionally the id of the +# session can be found within the options hash at the key :id. It is +# highly not recommended to change its value. +# +# Is Rack::Utils::Context compatible. +# +# Not included by default; you must require 'rack/session/abstract/id' +# to use. +# +# source://rack-session//lib/rack/session/abstract/id.rb#239 +class Rack::Session::Abstract::Persisted + # @return [Persisted] a new instance of Persisted + # + # source://rack-session//lib/rack/session/abstract/id.rb#256 + def initialize(app, options = T.unsafe(nil)); end + + # source://rack-session//lib/rack/session/abstract/id.rb#265 + def call(env); end + + # Acquires the session from the environment and the session id from + # the session options and passes them to #write_session. If successful + # and the :defer option is not true, a cookie will be added to the + # response with the session's id. + # + # source://rack-session//lib/rack/session/abstract/id.rb#379 + def commit_session(req, res); end + + # source://rack-session//lib/rack/session/abstract/id.rb#269 + def context(env, app = T.unsafe(nil)); end + + # Returns the value of attribute default_options. + # + # source://rack-session//lib/rack/session/abstract/id.rb#254 + def default_options; end + + # Returns the value of attribute key. + # + # source://rack-session//lib/rack/session/abstract/id.rb#254 + def key; end + + # Returns the value of attribute same_site. + # + # source://rack-session//lib/rack/session/abstract/id.rb#254 + def same_site; end + + # Returns the value of attribute sid_secure. + # + # source://rack-session//lib/rack/session/abstract/id.rb#254 + def sid_secure; end + + private + + # Session should be committed if it was loaded, any of specific options like :renew, :drop + # or :expire_after was given and the security permissions match. Skips if skip is given. + # + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#348 + def commit_session?(req, session, options); end + + # source://rack-session//lib/rack/session/abstract/id.rb#414 + def cookie_value(data); end + + # Returns the current session id from the SessionHash. + # + # source://rack-session//lib/rack/session/abstract/id.rb#334 + def current_session_id(req); end + + # All thread safety and session destroy procedures should occur here. + # Should return a new session id or nil if options[:drop] + # + # source://rack-session//lib/rack/session/abstract/id.rb#453 + def delete_session(req, sid, options); end + + # Extract session id from request object. + # + # source://rack-session//lib/rack/session/abstract/id.rb#326 + def extract_session_id(request); end + + # All thread safety and session retrieval procedures should occur here. + # Should return [session_id, session]. + # If nil is provided as the session id, generation of a new valid id + # should occur within. + # + # source://rack-session//lib/rack/session/abstract/id.rb#438 + def find_session(env, sid); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#365 + def force_options?(options); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#361 + def forced_session_update?(session, options); end + + # Generate a new session id using Ruby #rand. The size of the + # session id is controlled by the :sidbits option. + # Monkey patch this to use custom methods for session id generation. + # + # source://rack-session//lib/rack/session/abstract/id.rb#294 + def generate_sid(secure = T.unsafe(nil)); end + + # source://rack-session//lib/rack/session/abstract/id.rb#284 + def initialize_sid; end + + # Extracts the session id from provided cookies and passes it and the + # environment to #find_session. + # + # source://rack-session//lib/rack/session/abstract/id.rb#318 + def load_session(req); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#357 + def loaded_session?(session); end + + # source://rack-session//lib/rack/session/abstract/id.rb#280 + def make_request(env); end + + # Sets the lazy session at 'rack.session' and places options and session + # metadata into 'rack.session.options'. + # + # source://rack-session//lib/rack/session/abstract/id.rb#307 + def prepare_session(req); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#369 + def security_matches?(request, options); end + + # Allow subclasses to prepare_session for different Session classes + # + # source://rack-session//lib/rack/session/abstract/id.rb#429 + def session_class; end + + # Check if the session exists or not. + # + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#340 + def session_exists?(req); end + + # Sets the cookie back to the client with session id. We skip the cookie + # setting if the value didn't change (sid is the same) or expires was given. + # + # source://rack-session//lib/rack/session/abstract/id.rb#421 + def set_cookie(request, response, cookie); end + + # All thread safety and session storage procedures should occur here. + # Must return the session id if the session was saved successfully, or + # false if the session could not be saved. + # + # source://rack-session//lib/rack/session/abstract/id.rb#446 + def write_session(req, sid, session, options); end +end + +# source://rack-session//lib/rack/session/abstract/id.rb#240 +Rack::Session::Abstract::Persisted::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://rack-session//lib/rack/session/abstract/id.rb#458 +class Rack::Session::Abstract::PersistedSecure < ::Rack::Session::Abstract::Persisted + # source://rack-session//lib/rack/session/abstract/id.rb#481 + def extract_session_id(*_arg0); end + + # source://rack-session//lib/rack/session/abstract/id.rb#475 + def generate_sid(*_arg0); end + + private + + # source://rack-session//lib/rack/session/abstract/id.rb#492 + def cookie_value(data); end + + # source://rack-session//lib/rack/session/abstract/id.rb#488 + def session_class; end +end + +# source://rack-session//lib/rack/session/abstract/id.rb#459 +class Rack::Session::Abstract::PersistedSecure::SecureSessionHash < ::Rack::Session::Abstract::SessionHash + # source://rack-session//lib/rack/session/abstract/id.rb#460 + def [](key); end +end + +# SessionHash is responsible to lazily load the session from store. +# +# source://rack-session//lib/rack/session/abstract/id.rb#50 +class Rack::Session::Abstract::SessionHash + include ::Enumerable + + # @return [SessionHash] a new instance of SessionHash + # + # source://rack-session//lib/rack/session/abstract/id.rb#68 + def initialize(store, req); end + + # source://rack-session//lib/rack/session/abstract/id.rb#88 + def [](key); end + + # source://rack-session//lib/rack/session/abstract/id.rb#114 + def []=(key, value); end + + # source://rack-session//lib/rack/session/abstract/id.rb#120 + def clear; end + + # source://rack-session//lib/rack/session/abstract/id.rb#146 + def delete(key); end + + # source://rack-session//lib/rack/session/abstract/id.rb#125 + def destroy; end + + # source://rack-session//lib/rack/session/abstract/id.rb#93 + def dig(key, *keys); end + + # source://rack-session//lib/rack/session/abstract/id.rb#83 + def each(&block); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#169 + def empty?; end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#159 + def exists?; end + + # source://rack-session//lib/rack/session/abstract/id.rb#98 + def fetch(key, default = T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#107 + def has_key?(key); end + + # source://rack-session//lib/rack/session/abstract/id.rb#74 + def id; end + + # Sets the attribute id + # + # @param value the value to set the attribute id to. + # + # source://rack-session//lib/rack/session/abstract/id.rb#52 + def id=(_arg0); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#107 + def include?(key); end + + # source://rack-session//lib/rack/session/abstract/id.rb#151 + def inspect; end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#107 + def key?(key); end + + # source://rack-session//lib/rack/session/abstract/id.rb#174 + def keys; end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#165 + def loaded?; end + + # source://rack-session//lib/rack/session/abstract/id.rb#135 + def merge!(hash); end + + # source://rack-session//lib/rack/session/abstract/id.rb#79 + def options; end + + # source://rack-session//lib/rack/session/abstract/id.rb#141 + def replace(hash); end + + # source://rack-session//lib/rack/session/abstract/id.rb#114 + def store(key, value); end + + # source://rack-session//lib/rack/session/abstract/id.rb#130 + def to_hash; end + + # source://rack-session//lib/rack/session/abstract/id.rb#135 + def update(hash); end + + # source://rack-session//lib/rack/session/abstract/id.rb#179 + def values; end + + private + + # source://rack-session//lib/rack/session/abstract/id.rb#194 + def load!; end + + # source://rack-session//lib/rack/session/abstract/id.rb#186 + def load_for_read!; end + + # source://rack-session//lib/rack/session/abstract/id.rb#190 + def load_for_write!; end + + # source://rack-session//lib/rack/session/abstract/id.rb#200 + def stringify_keys(other); end + + class << self + # source://rack-session//lib/rack/session/abstract/id.rb#56 + def find(req); end + + # source://rack-session//lib/rack/session/abstract/id.rb#60 + def set(req, session); end + + # source://rack-session//lib/rack/session/abstract/id.rb#64 + def set_options(req, options); end + end +end + +# source://rack-session//lib/rack/session/abstract/id.rb#54 +Rack::Session::Abstract::SessionHash::Unspecified = T.let(T.unsafe(nil), Object) + +# Rack::Session::Cookie provides simple cookie based session management. +# By default, the session is a Ruby Hash that is serialized and encoded as +# a cookie set to :key (default: rack.session). +# +# This middleware accepts a :secrets option which enables encryption of +# session cookies. This option should be one or more random "secret keys" +# that are each at least 64 bytes in length. Multiple secret keys can be +# supplied in an Array, which is useful when rotating secrets. +# +# Several options are also accepted that are passed to Rack::Session::Encryptor. +# These options include: +# * :serialize_json +# Use JSON for message serialization instead of Marshal. This can be +# viewed as a security enhancement. +# * :gzip_over +# For message data over this many bytes, compress it with the deflate +# algorithm. +# +# Refer to Rack::Session::Encryptor for more details on these options. +# +# Prior to version TODO, the session hash was stored as base64 encoded +# marshalled data. When a :secret option was supplied, the integrity of the +# encoded data was protected with HMAC-SHA1. This functionality is still +# supported using a set of a legacy options. +# +# Lastly, a :coder option is also accepted. When used, both encryption and +# the legacy HMAC will be skipped. This option could create security issues +# in your application! +# +# Example: +# +# use Rack::Session::Cookie, { +# key: 'rack.session', +# domain: 'foo.com', +# path: '/', +# expire_after: 2592000, +# secrets: 'a randomly generated, raw binary string 64 bytes in size', +# } +# +# Example using legacy HMAC options: +# +# Rack::Session:Cookie.new(application, { +# # The secret used for legacy HMAC cookies, this enables the functionality +# legacy_hmac_secret: 'legacy secret', +# # legacy_hmac_coder will default to Rack::Session::Cookie::Base64::Marshal +# legacy_hmac_coder: Rack::Session::Cookie::Identity.new, +# # legacy_hmac will default to OpenSSL::Digest::SHA1 +# legacy_hmac: OpenSSL::Digest::SHA256 +# }) +# +# +# Rack::Session::Cookie.new(application, { +# :coder => Rack::Session::Cookie::Identity.new +# }) +# +# +# Rack::Session::Cookie.new(application, { +# :coder => Class.new { +# def encode(str); str.reverse; end +# def decode(str); str.reverse; end +# }.new +# }) +# +# source://rack-session//lib/rack/session/cookie.rb#91 +class Rack::Session::Cookie < ::Rack::Session::Abstract::PersistedSecure + # @return [Cookie] a new instance of Cookie + # + # source://rack-session//lib/rack/session/cookie.rb#159 + def initialize(app, options = T.unsafe(nil)); end + + # Returns the value of attribute coder. + # + # source://rack-session//lib/rack/session/cookie.rb#157 + def coder; end + + # Returns the value of attribute encryptors. + # + # source://rack-session//lib/rack/session/cookie.rb#157 + def encryptors; end + + private + + # source://rack-session//lib/rack/session/cookie.rb#277 + def delete_session(req, session_id, options); end + + # source://rack-session//lib/rack/session/cookie.rb#292 + def encode_session_data(session); end + + # source://rack-session//lib/rack/session/cookie.rb#209 + def extract_session_id(request); end + + # source://rack-session//lib/rack/session/cookie.rb#203 + def find_session(req, sid); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/cookie.rb#282 + def legacy_digest_match?(data, digest); end + + # source://rack-session//lib/rack/session/cookie.rb#288 + def legacy_generate_hmac(data); end + + # source://rack-session//lib/rack/session/cookie.rb#250 + def persistent_session_id!(data, sid = T.unsafe(nil)); end + + # Were consider "secure" if: + # * Encrypted cookies are enabled and one or more encryptor is + # initialized + # * The legacy HMAC option is enabled + # * Customer :coder is used, with :let_coder_handle_secure_encoding + # set to true + # + # @return [Boolean] + # + # source://rack-session//lib/rack/session/cookie.rb#306 + def secure?(options); end + + # source://rack-session//lib/rack/session/cookie.rb#213 + def unpacked_cookie_data(request); end + + # source://rack-session//lib/rack/session/cookie.rb#265 + def write_session(req, session_id, session, options); end +end + +# Encode session cookies as Base64 +# +# source://rack-session//lib/rack/session/cookie.rb#93 +class Rack::Session::Cookie::Base64 + # source://rack-session//lib/rack/session/cookie.rb#98 + def decode(str); end + + # source://rack-session//lib/rack/session/cookie.rb#94 + def encode(str); end +end + +# N.B. Unlike other encoding methods, the contained objects must be a +# valid JSON composite type, either a Hash or an Array. +# +# source://rack-session//lib/rack/session/cookie.rb#116 +class Rack::Session::Cookie::Base64::JSON < ::Rack::Session::Cookie::Base64 + # source://rack-session//lib/rack/session/cookie.rb#121 + def decode(str); end + + # source://rack-session//lib/rack/session/cookie.rb#117 + def encode(obj); end +end + +# Encode session cookies as Marshaled Base64 data +# +# source://rack-session//lib/rack/session/cookie.rb#103 +class Rack::Session::Cookie::Base64::Marshal < ::Rack::Session::Cookie::Base64 + # source://rack-session//lib/rack/session/cookie.rb#108 + def decode(str); end + + # source://rack-session//lib/rack/session/cookie.rb#104 + def encode(str); end +end + +# source://rack-session//lib/rack/session/cookie.rb#127 +class Rack::Session::Cookie::Base64::ZipJSON < ::Rack::Session::Cookie::Base64 + # source://rack-session//lib/rack/session/cookie.rb#132 + def decode(str); end + + # source://rack-session//lib/rack/session/cookie.rb#128 + def encode(obj); end +end + +# Use no encoding for session cookies +# +# source://rack-session//lib/rack/session/cookie.rb#142 +class Rack::Session::Cookie::Identity + # source://rack-session//lib/rack/session/cookie.rb#144 + def decode(str); end + + # source://rack-session//lib/rack/session/cookie.rb#143 + def encode(str); end +end + +# source://rack-session//lib/rack/session/cookie.rb#147 +class Rack::Session::Cookie::Marshal + # source://rack-session//lib/rack/session/cookie.rb#152 + def decode(str); end + + # source://rack-session//lib/rack/session/cookie.rb#148 + def encode(str); end +end + +# source://rack-session//lib/rack/session/cookie.rb#256 +class Rack::Session::Cookie::SessionId + # @return [SessionId] a new instance of SessionId + # + # source://rack-session//lib/rack/session/cookie.rb#259 + def initialize(session_id, cookie_value); end + + # Returns the value of attribute cookie_value. + # + # source://rack-session//lib/rack/session/cookie.rb#257 + def cookie_value; end +end + +# source://rack-session//lib/rack/session/encryptor.rb#16 +class Rack::Session::Encryptor + # The secret String must be at least 64 bytes in size. The first 32 bytes + # will be used for the encryption cipher key. The remainder will be used + # for an HMAC key. + # + # Options may include: + # * :serialize_json + # Use JSON for message serialization instead of Marshal. This can be + # viewed as a security enhancement. + # * :pad_size + # Pad encrypted message data, to a multiple of this many bytes + # (default: 32). This can be between 2-4096 bytes, or +nil+ to disable + # padding. + # * :purpose + # Limit messages to a specific purpose. This can be viewed as a + # security enhancement to prevent message reuse from different contexts + # if keys are reused. + # + # Cryptography and Output Format: + # + # urlsafe_encode64(version + random_data + IV + encrypted data + HMAC) + # + # Where: + # * version - 1 byte and is currently always 0x01 + # * random_data - 32 bytes used for generating the per-message secret + # * IV - 16 bytes random initialization vector + # * HMAC - 32 bytes HMAC-SHA-256 of all preceding data, plus the purpose + # value + # + # @raise [ArgumentError] + # @return [Encryptor] a new instance of Encryptor + # + # source://rack-session//lib/rack/session/encryptor.rb#53 + def initialize(secret, opts = T.unsafe(nil)); end + + # source://rack-session//lib/rack/session/encryptor.rb#77 + def decrypt(base64_data); end + + # source://rack-session//lib/rack/session/encryptor.rb#102 + def encrypt(message); end + + private + + # source://rack-session//lib/rack/session/encryptor.rb#139 + def cipher_secret_from_message_secret(message_secret); end + + # source://rack-session//lib/rack/session/encryptor.rb#151 + def compute_signature(data); end + + # Return the deserialized message. The first 2 bytes will be read as the + # amount of padding. + # + # source://rack-session//lib/rack/session/encryptor.rb#182 + def deserialized_message(data); end + + # source://rack-session//lib/rack/session/encryptor.rb#129 + def new_cipher; end + + # source://rack-session//lib/rack/session/encryptor.rb#133 + def new_message_and_cipher_secret; end + + # Returns a serialized payload of the message. If a :pad_size is supplied, + # the message will be padded. The first 2 bytes of the returned string will + # indicating the amount of padding. + # + # source://rack-session//lib/rack/session/encryptor.rb#169 + def serialize_payload(message); end + + # source://rack-session//lib/rack/session/encryptor.rb#147 + def serializer; end + + # source://rack-session//lib/rack/session/encryptor.rb#143 + def set_cipher_key(cipher, key); end + + # @raise [InvalidMessage] + # + # source://rack-session//lib/rack/session/encryptor.rb#158 + def verify_authenticity!(data, signature); end +end + +# source://rack-session//lib/rack/session/encryptor.rb#17 +class Rack::Session::Encryptor::Error < ::StandardError; end + +# source://rack-session//lib/rack/session/encryptor.rb#23 +class Rack::Session::Encryptor::InvalidMessage < ::Rack::Session::Encryptor::Error; end + +# source://rack-session//lib/rack/session/encryptor.rb#20 +class Rack::Session::Encryptor::InvalidSignature < ::Rack::Session::Encryptor::Error; end + +# source://rack-session//lib/rack/session/constants.rb#9 +Rack::Session::RACK_SESSION = T.let(T.unsafe(nil), String) + +# source://rack-session//lib/rack/session/constants.rb#10 +Rack::Session::RACK_SESSION_OPTIONS = T.let(T.unsafe(nil), String) + +# source://rack-session//lib/rack/session/constants.rb#11 +Rack::Session::RACK_SESSION_UNPACKED_COOKIE_DATA = T.let(T.unsafe(nil), String) + +# source://rack-session//lib/rack/session/abstract/id.rb#21 +class Rack::Session::SessionId + # @return [SessionId] a new instance of SessionId + # + # source://rack-session//lib/rack/session/abstract/id.rb#26 + def initialize(public_id); end + + # Returns the value of attribute public_id. + # + # source://rack-session//lib/rack/session/abstract/id.rb#24 + def cookie_value; end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#37 + def empty?; end + + # source://rack-session//lib/rack/session/abstract/id.rb#38 + def inspect; end + + # source://rack-session//lib/rack/session/abstract/id.rb#30 + def private_id; end + + # Returns the value of attribute public_id. + # + # source://rack-session//lib/rack/session/abstract/id.rb#24 + def public_id; end + + # Returns the value of attribute public_id. + # + # source://rack-session//lib/rack/session/abstract/id.rb#24 + def to_s; end + + private + + # source://rack-session//lib/rack/session/abstract/id.rb#42 + def hash_sid(sid); end +end + +# source://rack-session//lib/rack/session/abstract/id.rb#22 +Rack::Session::SessionId::ID_VERSION = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/rack-test@2.1.0.rbi b/sorbet/rbi/gems/rack-test@2.1.0.rbi index a0b6d18a7..e74c1478d 100644 --- a/sorbet/rbi/gems/rack-test@2.1.0.rbi +++ b/sorbet/rbi/gems/rack-test@2.1.0.rbi @@ -7,10 +7,10 @@ # source://rack-test//lib/rack/test/cookie_jar.rb#6 module Rack class << self - # source://rack/2.2.6.4/lib/rack/version.rb#26 + # source://rack/2.2.8/lib/rack/version.rb#26 def release; end - # source://rack/2.2.6.4/lib/rack/version.rb#19 + # source://rack/2.2.8/lib/rack/version.rb#19 def version; end end end diff --git a/sorbet/rbi/gems/rack@2.2.7.rbi b/sorbet/rbi/gems/rack@3.0.9.1.rbi similarity index 58% rename from sorbet/rbi/gems/rack@2.2.7.rbi rename to sorbet/rbi/gems/rack@3.0.9.1.rbi index 08a02cdea..10a63c7ee 100644 --- a/sorbet/rbi/gems/rack@2.2.7.rbi +++ b/sorbet/rbi/gems/rack@3.0.9.1.rbi @@ -10,92 +10,92 @@ # All modules meant for use in your application are autoloaded here, # so it should be enough just to require 'rack' in your code. # -# source://rack//lib/rack/query_parser.rb#3 +# source://rack//lib/rack/query_parser.rb#5 module Rack class << self # Return the Rack release as a dotted string. # - # source://rack//lib/rack/version.rb#26 + # source://rack//lib/rack/version.rb#31 def release; end - # Return the Rack protocol version as a dotted string. + # The Rack protocol version number implemented. # - # source://rack//lib/rack/version.rb#19 + # source://rack//lib/rack/version.rb#23 def version; end end end -# source://rack//lib/rack.rb#124 +# source://rack//lib/rack.rb#65 module Rack::Auth; end # Rack::Auth::AbstractHandler implements common authentication functionality. # # +realm+ should be set for all handlers. # -# source://rack//lib/rack/auth/abstract/handler.rb#9 +# source://rack//lib/rack/auth/abstract/handler.rb#11 class Rack::Auth::AbstractHandler # @return [AbstractHandler] a new instance of AbstractHandler # - # source://rack//lib/rack/auth/abstract/handler.rb#13 + # source://rack//lib/rack/auth/abstract/handler.rb#15 def initialize(app, realm = T.unsafe(nil), &authenticator); end # Returns the value of attribute realm. # - # source://rack//lib/rack/auth/abstract/handler.rb#11 + # source://rack//lib/rack/auth/abstract/handler.rb#13 def realm; end # Sets the attribute realm # # @param value the value to set the attribute realm to. # - # source://rack//lib/rack/auth/abstract/handler.rb#11 + # source://rack//lib/rack/auth/abstract/handler.rb#13 def realm=(_arg0); end private - # source://rack//lib/rack/auth/abstract/handler.rb#29 + # source://rack//lib/rack/auth/abstract/handler.rb#31 def bad_request; end - # source://rack//lib/rack/auth/abstract/handler.rb#20 + # source://rack//lib/rack/auth/abstract/handler.rb#22 def unauthorized(www_authenticate = T.unsafe(nil)); end end -# source://rack//lib/rack/auth/abstract/request.rb#5 +# source://rack//lib/rack/auth/abstract/request.rb#7 class Rack::Auth::AbstractRequest # @return [AbstractRequest] a new instance of AbstractRequest # - # source://rack//lib/rack/auth/abstract/request.rb#7 + # source://rack//lib/rack/auth/abstract/request.rb#9 def initialize(env); end - # source://rack//lib/rack/auth/abstract/request.rb#31 + # source://rack//lib/rack/auth/abstract/request.rb#33 def params; end - # source://rack//lib/rack/auth/abstract/request.rb#23 + # source://rack//lib/rack/auth/abstract/request.rb#25 def parts; end # @return [Boolean] # - # source://rack//lib/rack/auth/abstract/request.rb#15 + # source://rack//lib/rack/auth/abstract/request.rb#17 def provided?; end - # source://rack//lib/rack/auth/abstract/request.rb#11 + # source://rack//lib/rack/auth/abstract/request.rb#13 def request; end - # source://rack//lib/rack/auth/abstract/request.rb#27 + # source://rack//lib/rack/auth/abstract/request.rb#29 def scheme; end # @return [Boolean] # - # source://rack//lib/rack/auth/abstract/request.rb#19 + # source://rack//lib/rack/auth/abstract/request.rb#21 def valid?; end private - # source://rack//lib/rack/auth/abstract/request.rb#40 + # source://rack//lib/rack/auth/abstract/request.rb#42 def authorization_key; end end -# source://rack//lib/rack/auth/abstract/request.rb#38 +# source://rack//lib/rack/auth/abstract/request.rb#40 Rack::Auth::AbstractRequest::AUTHORIZATION_KEYS = T.let(T.unsafe(nil), Array) # Rack::Auth::Basic implements HTTP Basic Authentication, as per RFC 2617. @@ -103,39 +103,37 @@ Rack::Auth::AbstractRequest::AUTHORIZATION_KEYS = T.let(T.unsafe(nil), Array) # Initialize with the Rack application that you want protecting, # and a block that checks if a username and password pair are valid. # -# See also: example/protectedlobster.rb -# -# source://rack//lib/rack/auth/basic.rb#16 +# source://rack//lib/rack/auth/basic.rb#14 class Rack::Auth::Basic < ::Rack::Auth::AbstractHandler - # source://rack//lib/rack/auth/basic.rb#18 + # source://rack//lib/rack/auth/basic.rb#16 def call(env); end private - # source://rack//lib/rack/auth/basic.rb#37 + # source://rack//lib/rack/auth/basic.rb#35 def challenge; end # @return [Boolean] # - # source://rack//lib/rack/auth/basic.rb#41 + # source://rack//lib/rack/auth/basic.rb#39 def valid?(auth); end end -# source://rack//lib/rack/auth/basic.rb#45 +# source://rack//lib/rack/auth/basic.rb#43 class Rack::Auth::Basic::Request < ::Rack::Auth::AbstractRequest # @return [Boolean] # - # source://rack//lib/rack/auth/basic.rb#46 + # source://rack//lib/rack/auth/basic.rb#44 def basic?; end - # source://rack//lib/rack/auth/basic.rb#50 + # source://rack//lib/rack/auth/basic.rb#48 def credentials; end - # source://rack//lib/rack/auth/basic.rb#54 + # source://rack//lib/rack/auth/basic.rb#52 def username; end end -# source://rack//lib/rack.rb#128 +# source://rack//lib/rack/auth/digest.rb#12 module Rack::Auth::Digest; end # Rack::Auth::Digest::MD5 implements the MD5 algorithm version of @@ -146,93 +144,93 @@ module Rack::Auth::Digest; end # # +opaque+ needs to be set to a constant base64/hexadecimal string. # -# source://rack//lib/rack/auth/digest/md5.rb#20 +# source://rack//lib/rack/auth/digest.rb#144 class Rack::Auth::Digest::MD5 < ::Rack::Auth::AbstractHandler # @return [MD5] a new instance of MD5 # - # source://rack//lib/rack/auth/digest/md5.rb#26 + # source://rack//lib/rack/auth/digest.rb#150 def initialize(app, realm = T.unsafe(nil), opaque = T.unsafe(nil), &authenticator); end - # source://rack//lib/rack/auth/digest/md5.rb#39 + # source://rack//lib/rack/auth/digest.rb#163 def call(env); end # Returns the value of attribute opaque. # - # source://rack//lib/rack/auth/digest/md5.rb#22 + # source://rack//lib/rack/auth/digest.rb#146 def opaque; end # Sets the attribute opaque # # @param value the value to set the attribute opaque to. # - # source://rack//lib/rack/auth/digest/md5.rb#22 + # source://rack//lib/rack/auth/digest.rb#146 def opaque=(_arg0); end # Sets the attribute passwords_hashed # # @param value the value to set the attribute passwords_hashed to. # - # source://rack//lib/rack/auth/digest/md5.rb#24 + # source://rack//lib/rack/auth/digest.rb#148 def passwords_hashed=(_arg0); end # @return [Boolean] # - # source://rack//lib/rack/auth/digest/md5.rb#35 + # source://rack//lib/rack/auth/digest.rb#159 def passwords_hashed?; end private - # source://rack//lib/rack/auth/digest/md5.rb#114 + # source://rack//lib/rack/auth/digest.rb#238 def A1(auth, password); end - # source://rack//lib/rack/auth/digest/md5.rb#118 + # source://rack//lib/rack/auth/digest.rb#242 def A2(auth); end - # source://rack//lib/rack/auth/digest/md5.rb#104 + # source://rack//lib/rack/auth/digest.rb#228 def H(data); end - # source://rack//lib/rack/auth/digest/md5.rb#110 + # source://rack//lib/rack/auth/digest.rb#234 def KD(secret, data); end - # source://rack//lib/rack/auth/digest/md5.rb#79 + # source://rack//lib/rack/auth/digest.rb#203 def challenge(hash = T.unsafe(nil)); end - # source://rack//lib/rack/auth/digest/md5.rb#122 + # source://rack//lib/rack/auth/digest.rb#246 def digest(auth, password); end - # source://rack//lib/rack/auth/digest/md5.rb#104 + # source://rack//lib/rack/auth/digest.rb#228 def md5(data); end - # source://rack//lib/rack/auth/digest/md5.rb#68 + # source://rack//lib/rack/auth/digest.rb#192 def params(hash = T.unsafe(nil)); end # @return [Boolean] # - # source://rack//lib/rack/auth/digest/md5.rb#83 + # source://rack//lib/rack/auth/digest.rb#207 def valid?(auth); end # @return [Boolean] # - # source://rack//lib/rack/auth/digest/md5.rb#99 + # source://rack//lib/rack/auth/digest.rb#223 def valid_digest?(auth); end # @return [Boolean] # - # source://rack//lib/rack/auth/digest/md5.rb#95 + # source://rack//lib/rack/auth/digest.rb#219 def valid_nonce?(auth); end # @return [Boolean] # - # source://rack//lib/rack/auth/digest/md5.rb#91 + # source://rack//lib/rack/auth/digest.rb#215 def valid_opaque?(auth); end # @return [Boolean] # - # source://rack//lib/rack/auth/digest/md5.rb#87 + # source://rack//lib/rack/auth/digest.rb#211 def valid_qop?(auth); end end -# source://rack//lib/rack/auth/digest/md5.rb#66 +# source://rack//lib/rack/auth/digest.rb#190 Rack::Auth::Digest::MD5::QOP = T.let(T.unsafe(nil), String) # Rack::Auth::Digest::Nonce is the default nonce generator for the @@ -243,133 +241,133 @@ Rack::Auth::Digest::MD5::QOP = T.let(T.unsafe(nil), String) # +time_limit+ can be optionally set to an integer (number of seconds), # to limit the validity of the generated nonces. # -# source://rack//lib/rack/auth/digest/nonce.rb#17 +# source://rack//lib/rack/auth/digest.rb#21 class Rack::Auth::Digest::Nonce # @return [Nonce] a new instance of Nonce # - # source://rack//lib/rack/auth/digest/nonce.rb#27 + # source://rack//lib/rack/auth/digest.rb#31 def initialize(timestamp = T.unsafe(nil), given_digest = T.unsafe(nil)); end - # source://rack//lib/rack/auth/digest/nonce.rb#35 + # source://rack//lib/rack/auth/digest.rb#39 def digest; end # @return [Boolean] # - # source://rack//lib/rack/auth/digest/nonce.rb#47 + # source://rack//lib/rack/auth/digest.rb#51 def fresh?; end # @return [Boolean] # - # source://rack//lib/rack/auth/digest/nonce.rb#43 + # source://rack//lib/rack/auth/digest.rb#47 def stale?; end - # source://rack//lib/rack/auth/digest/nonce.rb#31 + # source://rack//lib/rack/auth/digest.rb#35 def to_s; end # @return [Boolean] # - # source://rack//lib/rack/auth/digest/nonce.rb#39 + # source://rack//lib/rack/auth/digest.rb#43 def valid?; end class << self - # source://rack//lib/rack/auth/digest/nonce.rb#23 + # source://rack//lib/rack/auth/digest.rb#27 def parse(string); end # Returns the value of attribute private_key. # - # source://rack//lib/rack/auth/digest/nonce.rb#20 + # source://rack//lib/rack/auth/digest.rb#24 def private_key; end # Sets the attribute private_key # # @param value the value to set the attribute private_key to. # - # source://rack//lib/rack/auth/digest/nonce.rb#20 + # source://rack//lib/rack/auth/digest.rb#24 def private_key=(_arg0); end # Returns the value of attribute time_limit. # - # source://rack//lib/rack/auth/digest/nonce.rb#20 + # source://rack//lib/rack/auth/digest.rb#24 def time_limit; end # Sets the attribute time_limit # # @param value the value to set the attribute time_limit to. # - # source://rack//lib/rack/auth/digest/nonce.rb#20 + # source://rack//lib/rack/auth/digest.rb#24 def time_limit=(_arg0); end end end -# source://rack//lib/rack/auth/digest/params.rb#6 +# source://rack//lib/rack/auth/digest.rb#57 class Rack::Auth::Digest::Params < ::Hash # @return [Params] a new instance of Params # @yield [_self] # @yieldparam _self [Rack::Auth::Digest::Params] the object that the method was called on # - # source://rack//lib/rack/auth/digest/params.rb#25 + # source://rack//lib/rack/auth/digest.rb#76 def initialize; end - # source://rack//lib/rack/auth/digest/params.rb#31 + # source://rack//lib/rack/auth/digest.rb#82 def [](k); end - # source://rack//lib/rack/auth/digest/params.rb#35 + # source://rack//lib/rack/auth/digest.rb#86 def []=(k, v); end # From WEBrick::HTTPUtils # - # source://rack//lib/rack/auth/digest/params.rb#47 + # source://rack//lib/rack/auth/digest.rb#98 def quote(str); end - # source://rack//lib/rack/auth/digest/params.rb#41 + # source://rack//lib/rack/auth/digest.rb#92 def to_s; end class << self # From WEBrick::HTTPUtils # - # source://rack//lib/rack/auth/digest/params.rb#15 + # source://rack//lib/rack/auth/digest.rb#66 def dequote(str); end - # source://rack//lib/rack/auth/digest/params.rb#8 + # source://rack//lib/rack/auth/digest.rb#59 def parse(str); end - # source://rack//lib/rack/auth/digest/params.rb#21 + # source://rack//lib/rack/auth/digest.rb#72 def split_header_value(str); end end end -# source://rack//lib/rack/auth/digest/params.rb#39 +# source://rack//lib/rack/auth/digest.rb#90 Rack::Auth::Digest::Params::UNQUOTED = T.let(T.unsafe(nil), Array) -# source://rack//lib/rack/auth/digest/request.rb#10 +# source://rack//lib/rack/auth/digest.rb#104 class Rack::Auth::Digest::Request < ::Rack::Auth::AbstractRequest # @return [Boolean] # - # source://rack//lib/rack/auth/digest/request.rb#19 + # source://rack//lib/rack/auth/digest.rb#113 def correct_uri?; end # @return [Boolean] # - # source://rack//lib/rack/auth/digest/request.rb#15 + # source://rack//lib/rack/auth/digest.rb#109 def digest?; end - # source://rack//lib/rack/auth/digest/request.rb#11 + # source://rack//lib/rack/auth/digest.rb#105 def method; end # @raise [ArgumentError] # - # source://rack//lib/rack/auth/digest/request.rb#35 + # source://rack//lib/rack/auth/digest.rb#129 def method_missing(sym, *args); end - # source://rack//lib/rack/auth/digest/request.rb#23 + # source://rack//lib/rack/auth/digest.rb#117 def nonce; end - # source://rack//lib/rack/auth/digest/request.rb#27 + # source://rack//lib/rack/auth/digest.rb#121 def params; end # @return [Boolean] # - # source://rack//lib/rack/auth/digest/request.rb#31 + # source://rack//lib/rack/auth/digest.rb#125 def respond_to?(sym, *_arg1); end end @@ -416,31 +414,30 @@ class Rack::BodyProxy def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end end -# Rack::Builder implements a small DSL to iteratively construct Rack -# applications. +# Rack::Builder provides a domain-specific language (DSL) to construct Rack +# applications. It is primarily used to parse +config.ru+ files which +# instantiate several middleware and a final application which are hosted +# by a Rack-compatible web server. # # Example: # -# require 'rack/lobster' -# app = Rack::Builder.new do -# use Rack::CommonLogger -# use Rack::ShowExceptions -# map "/lobster" do -# use Rack::Lint -# run Rack::Lobster.new -# end -# end +# app = Rack::Builder.new do +# use Rack::CommonLogger +# map "/ok" do +# run lambda { |env| [200, {'content-type' => 'text/plain'}, ['OK']] } +# end +# end # -# run app +# run app # # Or # -# app = Rack::Builder.app do -# use Rack::CommonLogger -# run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] } -# end +# app = Rack::Builder.app do +# use Rack::CommonLogger +# run lambda { |env| [200, {'content-type' => 'text/plain'}, ['OK']] } +# end # -# run app +# run app # # +use+ adds middleware to the stack, +run+ dispatches to an application. # You can use +map+ to construct a Rack::URLMap in a convenient way. @@ -449,45 +446,59 @@ end class Rack::Builder # Initialize a new Rack::Builder instance. +default_app+ specifies the # default application if +run+ is not called later. If a block - # is given, it is evaluted in the context of the instance. + # is given, it is evaluated in the context of the instance. # # @return [Builder] a new instance of Builder # - # source://rack//lib/rack/builder.rb#123 + # source://rack//lib/rack/builder.rb#111 def initialize(default_app = T.unsafe(nil), &block); end # Call the Rack application generated by this builder instance. Note that # this rebuilds the Rack application and runs the warmup code (if any) # every time it is called, so it should not be used if performance is important. # - # source://rack//lib/rack/builder.rb#243 + # source://rack//lib/rack/builder.rb#263 def call(env); end # Freeze the app (set using run) and all middleware instances when building the application # in to_app. # - # source://rack//lib/rack/builder.rb#226 + # source://rack//lib/rack/builder.rb#246 def freeze_app; end # Creates a route within the application. Routes under the mapped path will be sent to # the Rack application specified by run inside the block. Other requests will be sent to the # default application specified by run outside the block. # - # Rack::Builder.app do + # class App + # def call(env) + # [200, {'content-type' => 'text/plain'}, ["Hello World"]] + # end + # end + # + # class Heartbeat + # def call(env) + # [200, { "content-type" => "text/plain" }, ["OK"]] + # end + # end + # + # app = Rack::Builder.app do # map '/heartbeat' do - # run Heartbeat + # run Heartbeat.new # end - # run App + # run App.new # end # + # run app + # # The +use+ method can also be used inside the block to specify middleware to run under a specific path: # - # Rack::Builder.app do + # app = Rack::Builder.app do # map '/heartbeat' do # use Middleware - # run Heartbeat + # run Heartbeat.new # end - # run App + # run App.new # end # # This example includes a piece of middleware which will run before +/heartbeat+ requests hit +Heartbeat+. @@ -495,30 +506,40 @@ class Rack::Builder # Note that providing a +path+ of +/+ will ignore any default application given in a +run+ statement # outside the block. # - # source://rack//lib/rack/builder.rb#219 + # source://rack//lib/rack/builder.rb#239 def map(path, &block); end - # Takes an argument that is an object that responds to #call and returns a Rack response. - # The simplest form of this is a lambda object: + # Takes a block or argument that is an object that responds to #call and + # returns a Rack response. + # + # You can use a block: + # + # run do |env| + # [200, { "content-type" => "text/plain" }, ["Hello World!"]] + # end + # + # You can also provide a lambda: # - # run lambda { |env| [200, { "Content-Type" => "text/plain" }, ["OK"]] } + # run lambda { |env| [200, { "content-type" => "text/plain" }, ["OK"]] } # - # However this could also be a class: + # You can also provide a class instance: # # class Heartbeat - # def self.call(env) - # [200, { "Content-Type" => "text/plain" }, ["OK"]] + # def call(env) + # [200, { "content-type" => "text/plain" }, ["OK"]] # end # end # - # run Heartbeat + # run Heartbeat.new + # + # @raise [ArgumentError] # - # source://rack//lib/rack/builder.rb#176 - def run(app); end + # source://rack//lib/rack/builder.rb#180 + def run(app = T.unsafe(nil), &block); end # Return the Rack application generated by this instance. # - # source://rack//lib/rack/builder.rb#231 + # source://rack//lib/rack/builder.rb#251 def to_app; end # Specifies middleware to use in a stack. @@ -535,13 +556,13 @@ class Rack::Builder # end # # use Middleware - # run lambda { |env| [200, { "Content-Type" => "text/plain" }, ["OK"]] } + # run lambda { |env| [200, { "content-type" => "text/plain" }, ["OK"]] } # # All requests through to this application will first be processed by the middleware class. # The +call+ method in this example sets an additional environment key which then can be # referenced in the application if required. # - # source://rack//lib/rack/builder.rb#153 + # source://rack//lib/rack/builder.rb#146 def use(middleware, *args, **_arg2, &block); end # Takes a lambda or block that is used to warm-up the application. This block is called @@ -555,7 +576,7 @@ class Rack::Builder # use SomeMiddleware # run MyApp # - # source://rack//lib/rack/builder.rb#190 + # source://rack//lib/rack/builder.rb#196 def warmup(prc = T.unsafe(nil), &block); end private @@ -563,23 +584,19 @@ class Rack::Builder # Generate a URLMap instance by generating new Rack applications for each # map block in this instance. # - # source://rack//lib/rack/builder.rb#251 + # source://rack//lib/rack/builder.rb#271 def generate_map(default_app, mapping); end class << self # Create a new Rack::Builder instance and return the Rack application # generated from it. # - # source://rack//lib/rack/builder.rb#130 + # source://rack//lib/rack/builder.rb#123 def app(default_app = T.unsafe(nil), &block); end # Load the given file as a rackup file, treating the # contents as if specified inside a Rack::Builder block. # - # Treats the first comment at the beginning of a line - # that starts with a backslash as options similar to - # options passed on a rackup command line. - # # Ignores content in the file after +__END__+, so that # use of +__END__+ will not result in a syntax error. # @@ -587,32 +604,28 @@ class Rack::Builder # # $ cat config.ru # - # #\ -p 9393 - # # use Rack::ContentLength # require './app.rb' # run App # - # source://rack//lib/rack/builder.rb#93 - def load_file(path, opts = T.unsafe(nil)); end + # source://rack//lib/rack/builder.rb#84 + def load_file(path); end # Evaluate the given +builder_script+ string in the context of # a Rack::Builder block, returning a Rack application. # - # source://rack//lib/rack/builder.rb#112 + # source://rack//lib/rack/builder.rb#99 def new_from_string(builder_script, file = T.unsafe(nil)); end # Parse the given config file to get a Rack application. # # If the config file ends in +.ru+, it is treated as a # rackup file and the contents will be treated as if - # specified inside a Rack::Builder block, using the given - # options. + # specified inside a Rack::Builder block. # # If the config file does not end in +.ru+, it is # required and Rack will use the basename of the file # to guess which constant will be the Rack application to run. - # The options given will be ignored in this case. # # Examples: # @@ -629,8 +642,8 @@ class Rack::Builder # # process's current directory. After requiring, # # assumes MyApp constant contains Rack application # - # source://rack//lib/rack/builder.rb#64 - def parse_file(config, opts = T.unsafe(nil)); end + # source://rack//lib/rack/builder.rb#62 + def parse_file(path); end end end @@ -639,13 +652,15 @@ end # source://rack//lib/rack/builder.rb#36 Rack::Builder::UTF_8_BOM = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#29 +# Response Header Keys +# +# source://rack//lib/rack/constants.rb#19 Rack::CACHE_CONTROL = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#31 +# source://rack//lib/rack/constants.rb#20 Rack::CONTENT_LENGTH = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#32 +# source://rack//lib/rack/constants.rb#21 Rack::CONTENT_TYPE = T.let(T.unsafe(nil), String) # Rack::Cascade tries a request on several apps, and returns the @@ -653,7 +668,7 @@ Rack::CONTENT_TYPE = T.let(T.unsafe(nil), String) # status codes). If all applications tried return one of the configured # status codes, return the last response. # -# source://rack//lib/rack/cascade.rb#9 +# source://rack//lib/rack/cascade.rb#11 class Rack::Cascade # Set the apps to send requests to, and what statuses result in # cascading. Arguments: @@ -664,101 +679,101 @@ class Rack::Cascade # # @return [Cascade] a new instance of Cascade # - # source://rack//lib/rack/cascade.rb#22 + # source://rack//lib/rack/cascade.rb#24 def initialize(apps, cascade_for = T.unsafe(nil)); end # Append an app to the list of apps to cascade. This app will # be tried last. # - # source://rack//lib/rack/cascade.rb#57 + # source://rack//lib/rack/cascade.rb#59 def <<(app); end # Append an app to the list of apps to cascade. This app will # be tried last. # - # source://rack//lib/rack/cascade.rb#57 + # source://rack//lib/rack/cascade.rb#59 def add(app); end # An array of applications to try in order. # - # source://rack//lib/rack/cascade.rb#14 + # source://rack//lib/rack/cascade.rb#16 def apps; end # Call each app in order. If the responses uses a status that requires # cascading, try the next app. If all responses require cascading, # return the response from the last app. # - # source://rack//lib/rack/cascade.rb#33 + # source://rack//lib/rack/cascade.rb#35 def call(env); end # Whether the given app is one of the apps to cascade to. # # @return [Boolean] # - # source://rack//lib/rack/cascade.rb#62 + # source://rack//lib/rack/cascade.rb#64 def include?(app); end end # deprecated, no longer used # -# source://rack//lib/rack/cascade.rb#11 +# source://rack//lib/rack/cascade.rb#13 Rack::Cascade::NotFound = T.let(T.unsafe(nil), Array) # Middleware that applies chunked transfer encoding to response bodies -# when the response does not include a Content-Length header. +# when the response does not include a content-length header. # -# This supports the Trailer response header to allow the use of trailing +# This supports the trailer response header to allow the use of trailing # headers in the chunked encoding. However, using this requires you manually # specify a response body that supports a +trailers+ method. Example: # -# [200, { 'Trailer' => 'Expires'}, ["Hello", "World"]] +# [200, { 'trailer' => 'expires'}, ["Hello", "World"]] # # error raised # # body = ["Hello", "World"] # def body.trailers -# { 'Expires' => Time.now.to_s } +# { 'expires' => Time.now.to_s } # end -# [200, { 'Trailer' => 'Expires'}, body] +# [200, { 'trailer' => 'expires'}, body] # # No exception raised # -# source://rack//lib/rack/chunked.rb#21 +# source://rack//lib/rack/chunked.rb#25 class Rack::Chunked include ::Rack::Utils # @return [Chunked] a new instance of Chunked # - # source://rack//lib/rack/chunked.rb#78 + # source://rack//lib/rack/chunked.rb#82 def initialize(app); end # If the rack app returns a response that should have a body, - # but does not have Content-Length or Transfer-Encoding headers, - # modify the response to use chunked Transfer-Encoding. + # but does not have content-length or transfer-encoding headers, + # modify the response to use chunked transfer-encoding. # - # source://rack//lib/rack/chunked.rb#97 + # source://rack//lib/rack/chunked.rb#101 def call(env); end # Whether the HTTP version supports chunked encoding (HTTP 1.1 does). # # @return [Boolean] # - # source://rack//lib/rack/chunked.rb#83 + # source://rack//lib/rack/chunked.rb#87 def chunkable_version?(ver); end end # A body wrapper that emits chunked responses. # -# source://rack//lib/rack/chunked.rb#25 +# source://rack//lib/rack/chunked.rb#29 class Rack::Chunked::Body # Store the response body to be chunked. # # @return [Body] a new instance of Body # - # source://rack//lib/rack/chunked.rb#30 + # source://rack//lib/rack/chunked.rb#34 def initialize(body); end # Close the response body if the response body supports it. # - # source://rack//lib/rack/chunked.rb#50 + # source://rack//lib/rack/chunked.rb#54 def close; end # For each element yielded by the response body, yield @@ -766,21 +781,21 @@ class Rack::Chunked::Body # # @yield [TAIL] # - # source://rack//lib/rack/chunked.rb#36 + # source://rack//lib/rack/chunked.rb#40 def each(&block); end private # Do nothing as this class does not support trailer headers. # - # source://rack//lib/rack/chunked.rb#57 + # source://rack//lib/rack/chunked.rb#61 def yield_trailers; end end -# source://rack//lib/rack/chunked.rb#27 +# source://rack//lib/rack/chunked.rb#31 Rack::Chunked::Body::TAIL = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/chunked.rb#26 +# source://rack//lib/rack/chunked.rb#30 Rack::Chunked::Body::TERM = T.let(T.unsafe(nil), String) # A body wrapper that emits chunked responses and also supports @@ -790,13 +805,13 @@ Rack::Chunked::Body::TERM = T.let(T.unsafe(nil), String) # Trailer header listing the headers that the +trailers+ method # will return. # -# source://rack//lib/rack/chunked.rb#67 +# source://rack//lib/rack/chunked.rb#71 class Rack::Chunked::TrailerBody < ::Rack::Chunked::Body private # Yield strings for each trailer header. # - # source://rack//lib/rack/chunked.rb#71 + # source://rack//lib/rack/chunked.rb#75 def yield_trailers; end end @@ -805,7 +820,7 @@ end # {Apache common log format}[http://httpd.apache.org/docs/1.3/logs.html#common] # to the configured logger. # -# source://rack//lib/rack/common_logger.rb#8 +# source://rack//lib/rack/common_logger.rb#13 class Rack::CommonLogger # +logger+ can be any object that supports the +write+ or +<<+ methods, # which includes the standard library Logger. These methods are called @@ -814,7 +829,7 @@ class Rack::CommonLogger # # @return [CommonLogger] a new instance of CommonLogger # - # source://rack//lib/rack/common_logger.rb#24 + # source://rack//lib/rack/common_logger.rb#29 def initialize(app, logger = T.unsafe(nil)); end # Log all requests in common_log format after a response has been @@ -825,7 +840,7 @@ class Rack::CommonLogger # exceptions raised during the sending of the response body will # cause the request not to be logged. # - # source://rack//lib/rack/common_logger.rb#36 + # source://rack//lib/rack/common_logger.rb#41 def call(env); end private @@ -833,13 +848,13 @@ class Rack::CommonLogger # Attempt to determine the content length for the response to # include it in the logged data. # - # source://rack//lib/rack/common_logger.rb#78 + # source://rack//lib/rack/common_logger.rb#83 def extract_content_length(headers); end # Log the request to the configured logger. # - # source://rack//lib/rack/common_logger.rb#47 - def log(env, status, header, began_at); end + # source://rack//lib/rack/common_logger.rb#52 + def log(env, status, response_headers, began_at); end end # Common Log Format: http://httpd.apache.org/docs/1.3/logs.html#common @@ -852,12 +867,12 @@ end # separation of SCRIPT_NAME and PATH_INFO, and because the elapsed # time in seconds is included at the end. # -# source://rack//lib/rack/common_logger.rb#18 +# source://rack//lib/rack/common_logger.rb#23 Rack::CommonLogger::FORMAT = T.let(T.unsafe(nil), String) -# Middleware that enables conditional GET using If-None-Match and -# If-Modified-Since. The application should set either or both of the -# Last-Modified or Etag response headers according to RFC 2616. When +# Middleware that enables conditional GET using if-none-match and +# if-modified-since. The application should set either or both of the +# last-modified or etag response headers according to RFC 2616. When # either of the conditions is met, the response body is set to be zero # length and the response status is set to 304 Not Modified. # @@ -868,27 +883,27 @@ Rack::CommonLogger::FORMAT = T.let(T.unsafe(nil), String) # Adapted from Michael Klishin's Merb implementation: # https://github.com/wycats/merb/blob/master/merb-core/lib/merb-core/rack/middleware/conditional_get.rb # -# source://rack//lib/rack/conditional_get.rb#17 +# source://rack//lib/rack/conditional_get.rb#21 class Rack::ConditionalGet # @return [ConditionalGet] a new instance of ConditionalGet # - # source://rack//lib/rack/conditional_get.rb#18 + # source://rack//lib/rack/conditional_get.rb#22 def initialize(app); end # Return empty 304 response if the response has not been # modified since the last request. # - # source://rack//lib/rack/conditional_get.rb#24 + # source://rack//lib/rack/conditional_get.rb#28 def call(env); end private - # Whether the ETag response header matches the If-None-Match request header. + # Whether the etag response header matches the if-none-match request header. # If so, the request has not been modified. # # @return [Boolean] # - # source://rack//lib/rack/conditional_get.rb#59 + # source://rack//lib/rack/conditional_get.rb#62 def etag_matches?(none_match, headers); end # Return whether the response has not been modified since the @@ -896,21 +911,21 @@ class Rack::ConditionalGet # # @return [Boolean] # - # source://rack//lib/rack/conditional_get.rb#48 + # source://rack//lib/rack/conditional_get.rb#51 def fresh?(env, headers); end - # Whether the Last-Modified response header matches the If-Modified-Since + # Whether the last-modified response header matches the if-modified-since # request header. If so, the request has not been modified. # # @return [Boolean] # - # source://rack//lib/rack/conditional_get.rb#65 + # source://rack//lib/rack/conditional_get.rb#68 def modified_since?(modified_since, headers); end # Return a Time object for the given string (which should be in RFC2822 # format), or nil if the string cannot be parsed. # - # source://rack//lib/rack/conditional_get.rb#72 + # source://rack//lib/rack/conditional_get.rb#75 def to_rfc2822(since); end end @@ -933,25 +948,25 @@ class Rack::Config def call(env); end end -# Sets the Content-Length header on responses that do not specify -# a Content-Length or Transfer-Encoding header. Note that this -# does not fix responses that have an invalid Content-Length +# Sets the content-length header on responses that do not specify +# a content-length or transfer-encoding header. Note that this +# does not fix responses that have an invalid content-length # header specified. # -# source://rack//lib/rack/content_length.rb#9 +# source://rack//lib/rack/content_length.rb#12 class Rack::ContentLength include ::Rack::Utils # @return [ContentLength] a new instance of ContentLength # - # source://rack//lib/rack/content_length.rb#12 + # source://rack//lib/rack/content_length.rb#15 def initialize(app); end - # source://rack//lib/rack/content_length.rb#16 + # source://rack//lib/rack/content_length.rb#19 def call(env); end end -# Sets the Content-Type header on responses which don't have one. +# Sets the content-type header on responses which don't have one. # # Builder Usage: # use Rack::ContentType, "text/plain" @@ -959,20 +974,20 @@ end # When no content type argument is provided, "text/html" is the # default. # -# source://rack//lib/rack/content_type.rb#12 +# source://rack//lib/rack/content_type.rb#15 class Rack::ContentType include ::Rack::Utils # @return [ContentType] a new instance of ContentType # - # source://rack//lib/rack/content_type.rb#15 + # source://rack//lib/rack/content_type.rb#18 def initialize(app, content_type = T.unsafe(nil)); end - # source://rack//lib/rack/content_type.rb#19 + # source://rack//lib/rack/content_type.rb#23 def call(env); end end -# source://rack//lib/rack.rb#43 +# source://rack//lib/rack/constants.rb#32 Rack::DELETE = T.let(T.unsafe(nil), String) # This middleware enables content encoding of http responses, @@ -992,7 +1007,7 @@ Rack::DELETE = T.let(T.unsafe(nil), String) # Note that despite the name, Deflater does not support the +deflate+ # encoding. # -# source://rack//lib/rack/deflater.rb#23 +# source://rack//lib/rack/deflater.rb#28 class Rack::Deflater # Creates Rack::Deflater middleware. Options: # @@ -1007,10 +1022,10 @@ class Rack::Deflater # # @return [Deflater] a new instance of Deflater # - # source://rack//lib/rack/deflater.rb#36 + # source://rack//lib/rack/deflater.rb#39 def initialize(app, options = T.unsafe(nil)); end - # source://rack//lib/rack/deflater.rb#43 + # source://rack//lib/rack/deflater.rb#46 def call(env); end private @@ -1019,13 +1034,13 @@ class Rack::Deflater # # @return [Boolean] # - # source://rack//lib/rack/deflater.rb#122 + # source://rack//lib/rack/deflater.rb#136 def should_deflate?(env, status, headers, body); end end # Body class used for gzip encoded responses. # -# source://rack//lib/rack/deflater.rb#79 +# source://rack//lib/rack/deflater.rb#83 class Rack::Deflater::GzipStream # Initialize the gzip stream. Arguments: # body :: Response body to compress with gzip @@ -1035,25 +1050,28 @@ class Rack::Deflater::GzipStream # # @return [GzipStream] a new instance of GzipStream # - # source://rack//lib/rack/deflater.rb#85 + # source://rack//lib/rack/deflater.rb#92 def initialize(body, mtime, sync); end # Close the original body if possible. # - # source://rack//lib/rack/deflater.rb#114 + # source://rack//lib/rack/deflater.rb#128 def close; end # Yield gzip compressed strings to the given block. # - # source://rack//lib/rack/deflater.rb#92 + # source://rack//lib/rack/deflater.rb#99 def each(&block); end - # Call the block passed to #each with the the gzipped data. + # Call the block passed to #each with the gzipped data. # - # source://rack//lib/rack/deflater.rb#109 + # source://rack//lib/rack/deflater.rb#123 def write(data); end end +# source://rack//lib/rack/deflater.rb#85 +Rack::Deflater::GzipStream::BUFFER_LENGTH = T.let(T.unsafe(nil), Integer) + # Rack::Directory serves entries below the +root+ given, according to the # path info of the Rack request. If a directory is found, the file's contents # will be presented in an html based index. If a file is found, the env will @@ -1061,152 +1079,147 @@ end # # If +app+ is not specified, a Rack::Files of the same +root+ will be used. # -# source://rack//lib/rack/directory.rb#13 +# source://rack//lib/rack/directory.rb#19 class Rack::Directory # Set the root directory and application for serving files. # # @return [Directory] a new instance of Directory # - # source://rack//lib/rack/directory.rb#77 + # source://rack//lib/rack/directory.rb#83 def initialize(root, app = T.unsafe(nil)); end - # source://rack//lib/rack/directory.rb#83 + # source://rack//lib/rack/directory.rb#89 def call(env); end # Rack response to use for requests with invalid paths, or nil if path is valid. # - # source://rack//lib/rack/directory.rb#103 + # source://rack//lib/rack/directory.rb#109 def check_bad_request(path_info); end # Rack response to use for requests with paths outside the root, or nil if path is inside the root. # - # source://rack//lib/rack/directory.rb#113 + # source://rack//lib/rack/directory.rb#119 def check_forbidden(path_info); end # Rack response to use for unreadable and non-file, non-directory entries. # - # source://rack//lib/rack/directory.rb#175 + # source://rack//lib/rack/directory.rb#181 def entity_not_found(path_info); end # Provide human readable file sizes # - # source://rack//lib/rack/directory.rb#191 + # source://rack//lib/rack/directory.rb#197 def filesize_format(int); end # Internals of request handling. Similar to call but does # not remove body for HEAD requests. # - # source://rack//lib/rack/directory.rb#90 + # source://rack//lib/rack/directory.rb#96 def get(env); end # Rack response to use for directories under the root. # - # source://rack//lib/rack/directory.rb#124 + # source://rack//lib/rack/directory.rb#130 def list_directory(path_info, path, script_name); end # Rack response to use for files and directories under the root. # Unreadable and non-file, non-directory entries will get a 404 response. # - # source://rack//lib/rack/directory.rb#165 + # source://rack//lib/rack/directory.rb#171 def list_path(env, path, path_info, script_name); end # The root of the directory hierarchy. Only requests for files and # directories inside of the root directory are supported. # - # source://rack//lib/rack/directory.rb#74 + # source://rack//lib/rack/directory.rb#80 def root; end # File::Stat for the given path, but return nil for missing/bad entries. # - # source://rack//lib/rack/directory.rb#157 + # source://rack//lib/rack/directory.rb#163 def stat(path); end end -# source://rack//lib/rack/directory.rb#14 +# source://rack//lib/rack/directory.rb#20 Rack::Directory::DIR_FILE = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/directory.rb#37 +# source://rack//lib/rack/directory.rb#43 Rack::Directory::DIR_PAGE_FOOTER = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/directory.rb#15 +# source://rack//lib/rack/directory.rb#21 Rack::Directory::DIR_PAGE_HEADER = T.let(T.unsafe(nil), String) # Body class for directory entries, showing an index page with links # to each file. # -# source://rack//lib/rack/directory.rb#45 +# source://rack//lib/rack/directory.rb#51 class Rack::Directory::DirectoryBody < ::Struct # Yield strings for each part of the directory entry # # @yield [DIR_PAGE_HEADER % [ show_path, show_path ]] # - # source://rack//lib/rack/directory.rb#47 + # source://rack//lib/rack/directory.rb#53 def each; end private # Escape each element in the array of html strings. # - # source://rack//lib/rack/directory.rb#67 + # source://rack//lib/rack/directory.rb#73 def DIR_FILE_escape(htmls); end end # Stolen from Ramaze # -# source://rack//lib/rack/directory.rb#183 +# source://rack//lib/rack/directory.rb#189 Rack::Directory::FILESIZE_FORMAT = T.let(T.unsafe(nil), Array) -# source://rack//lib/rack.rb#36 +# source://rack//lib/rack/constants.rb#22 Rack::ETAG = T.let(T.unsafe(nil), String) -# Automatically sets the ETag header on all String bodies. +# Automatically sets the etag header on all String bodies. # -# The ETag header is skipped if ETag or Last-Modified headers are sent or if +# The etag header is skipped if etag or last-modified headers are sent or if # a sendfile body (body.responds_to :to_path) is given (since such cases # should be handled by apache/nginx). # -# On initialization, you can pass two parameters: a Cache-Control directive -# used when Etag is absent and a directive when it is present. The first +# On initialization, you can pass two parameters: a cache-control directive +# used when etag is absent and a directive when it is present. The first # defaults to nil, while the second defaults to "max-age=0, private, must-revalidate" # -# source://rack//lib/rack/etag.rb#16 +# source://rack//lib/rack/etag.rb#18 class Rack::ETag # @return [ETag] a new instance of ETag # - # source://rack//lib/rack/etag.rb#20 + # source://rack//lib/rack/etag.rb#22 def initialize(app, no_cache_control = T.unsafe(nil), cache_control = T.unsafe(nil)); end - # source://rack//lib/rack/etag.rb#26 + # source://rack//lib/rack/etag.rb#28 def call(env); end private - # source://rack//lib/rack/etag.rb#65 + # source://rack//lib/rack/etag.rb#58 def digest_body(body); end # @return [Boolean] # - # source://rack//lib/rack/etag.rb#57 - def etag_body?(body); end - - # @return [Boolean] - # - # source://rack//lib/rack/etag.rb#53 + # source://rack//lib/rack/etag.rb#50 def etag_status?(status); end # @return [Boolean] # - # source://rack//lib/rack/etag.rb#61 + # source://rack//lib/rack/etag.rb#54 def skip_caching?(headers); end end -# source://rack//lib/rack/etag.rb#18 +# source://rack//lib/rack/etag.rb#20 Rack::ETag::DEFAULT_CACHE_CONTROL = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/etag.rb#17 +# source://rack//lib/rack/etag.rb#19 Rack::ETag::ETAG_STRING = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#30 +# source://rack//lib/rack/constants.rb#23 Rack::EXPIRES = T.let(T.unsafe(nil), String) # This middleware provides hooks to certain places in the request / @@ -1262,93 +1275,93 @@ Rack::EXPIRES = T.let(T.unsafe(nil), String) # raises an exception. If something raises an exception in a `on_finish` # method, then nothing is guaranteed. # -# source://rack//lib/rack/events.rb#57 +# source://rack//lib/rack/events.rb#61 class Rack::Events # @return [Events] a new instance of Events # - # source://rack//lib/rack/events.rb#102 + # source://rack//lib/rack/events.rb#106 def initialize(app, handlers); end - # source://rack//lib/rack/events.rb#107 + # source://rack//lib/rack/events.rb#111 def call(env); end private - # source://rack//lib/rack/events.rb#145 + # source://rack//lib/rack/events.rb#149 def make_request(env); end - # source://rack//lib/rack/events.rb#149 + # source://rack//lib/rack/events.rb#153 def make_response(status, headers, body); end - # source://rack//lib/rack/events.rb#133 + # source://rack//lib/rack/events.rb#137 def on_commit(request, response); end - # source://rack//lib/rack/events.rb#129 + # source://rack//lib/rack/events.rb#133 def on_error(request, response, e); end - # source://rack//lib/rack/events.rb#141 + # source://rack//lib/rack/events.rb#145 def on_finish(request, response); end - # source://rack//lib/rack/events.rb#137 + # source://rack//lib/rack/events.rb#141 def on_start(request, response); end end -# source://rack//lib/rack/events.rb#58 +# source://rack//lib/rack/events.rb#62 module Rack::Events::Abstract - # source://rack//lib/rack/events.rb#62 + # source://rack//lib/rack/events.rb#66 def on_commit(req, res); end - # source://rack//lib/rack/events.rb#71 + # source://rack//lib/rack/events.rb#75 def on_error(req, res, e); end - # source://rack//lib/rack/events.rb#68 + # source://rack//lib/rack/events.rb#72 def on_finish(req, res); end - # source://rack//lib/rack/events.rb#65 + # source://rack//lib/rack/events.rb#69 def on_send(req, res); end - # source://rack//lib/rack/events.rb#59 + # source://rack//lib/rack/events.rb#63 def on_start(req, res); end end -# source://rack//lib/rack/events.rb#91 +# source://rack//lib/rack/events.rb#95 class Rack::Events::BufferedResponse < ::Rack::Response::Raw # @return [BufferedResponse] a new instance of BufferedResponse # - # source://rack//lib/rack/events.rb#94 + # source://rack//lib/rack/events.rb#98 def initialize(status, headers, body); end # Returns the value of attribute body. # - # source://rack//lib/rack/events.rb#92 + # source://rack//lib/rack/events.rb#96 def body; end - # source://rack//lib/rack/events.rb#99 + # source://rack//lib/rack/events.rb#103 def to_a; end end -# source://rack//lib/rack/events.rb#75 +# source://rack//lib/rack/events.rb#79 class Rack::Events::EventedBodyProxy < ::Rack::BodyProxy # @return [EventedBodyProxy] a new instance of EventedBodyProxy # - # source://rack//lib/rack/events.rb#78 + # source://rack//lib/rack/events.rb#82 def initialize(body, request, response, handlers, &block); end - # source://rack//lib/rack/events.rb#85 + # source://rack//lib/rack/events.rb#89 def each; end # Returns the value of attribute request. # - # source://rack//lib/rack/events.rb#76 + # source://rack//lib/rack/events.rb#80 def request; end # Returns the value of attribute response. # - # source://rack//lib/rack/events.rb#76 + # source://rack//lib/rack/events.rb#80 def response; end end -# source://rack//lib/rack/file.rb#6 +# source://rack//lib/rack/file.rb#8 Rack::File = Rack::Files # Rack::Files serves files below the +root+ directory given, according to the @@ -1359,106 +1372,99 @@ Rack::File = Rack::Files # Handlers can detect if bodies are a Rack::Files, and use mechanisms # like sendfile on the +path+. # -# source://rack//lib/rack/files.rb#14 +# source://rack//lib/rack/files.rb#20 class Rack::Files # @return [Files] a new instance of Files # - # source://rack//lib/rack/files.rb#29 + # source://rack//lib/rack/files.rb#27 def initialize(root, headers = T.unsafe(nil), default_mime = T.unsafe(nil)); end - # source://rack//lib/rack/files.rb#36 + # source://rack//lib/rack/files.rb#34 def call(env); end - # source://rack//lib/rack/files.rb#41 + # source://rack//lib/rack/files.rb#39 def get(env); end # Returns the value of attribute root. # - # source://rack//lib/rack/files.rb#27 + # source://rack//lib/rack/files.rb#25 def root; end - # source://rack//lib/rack/files.rb#70 + # source://rack//lib/rack/files.rb#68 def serving(request, path); end private - # source://rack//lib/rack/files.rb#192 + # source://rack//lib/rack/files.rb#190 def fail(status, body, headers = T.unsafe(nil)); end - # source://rack//lib/rack/files.rb#211 + # source://rack//lib/rack/files.rb#209 def filesize(path); end # The MIME type for the contents of the file located at @path # - # source://rack//lib/rack/files.rb#207 + # source://rack//lib/rack/files.rb#205 def mime_type(path, default_mime); end - - class << self - # @todo remove in 3.0 - # - # source://rack//lib/rack/files.rb#20 - def method_added(name); end - end end -# source://rack//lib/rack/files.rb#15 +# source://rack//lib/rack/files.rb#21 Rack::Files::ALLOWED_VERBS = T.let(T.unsafe(nil), Array) -# source://rack//lib/rack/files.rb#16 +# source://rack//lib/rack/files.rb#22 Rack::Files::ALLOW_HEADER = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/files.rb#123 +# source://rack//lib/rack/files.rb#121 class Rack::Files::BaseIterator # @return [BaseIterator] a new instance of BaseIterator # - # source://rack//lib/rack/files.rb#126 + # source://rack//lib/rack/files.rb#124 def initialize(path, ranges, options); end - # source://rack//lib/rack/files.rb#146 + # source://rack//lib/rack/files.rb#144 def bytesize; end - # source://rack//lib/rack/files.rb#155 + # source://rack//lib/rack/files.rb#153 def close; end - # source://rack//lib/rack/files.rb#132 + # source://rack//lib/rack/files.rb#130 def each; end # Returns the value of attribute options. # - # source://rack//lib/rack/files.rb#124 + # source://rack//lib/rack/files.rb#122 def options; end # Returns the value of attribute path. # - # source://rack//lib/rack/files.rb#124 + # source://rack//lib/rack/files.rb#122 def path; end # Returns the value of attribute ranges. # - # source://rack//lib/rack/files.rb#124 + # source://rack//lib/rack/files.rb#122 def ranges; end private - # source://rack//lib/rack/files.rb#173 + # source://rack//lib/rack/files.rb#171 def each_range_part(file, range); end # @return [Boolean] # - # source://rack//lib/rack/files.rb#159 + # source://rack//lib/rack/files.rb#157 def multipart?; end - # source://rack//lib/rack/files.rb#163 + # source://rack//lib/rack/files.rb#161 def multipart_heading(range); end end -# source://rack//lib/rack/files.rb#186 +# source://rack//lib/rack/files.rb#184 class Rack::Files::Iterator < ::Rack::Files::BaseIterator - # source://rack//lib/rack/files.rb#124 + # source://rack//lib/rack/files.rb#122 def to_path; end end -# source://rack//lib/rack/files.rb#17 +# source://rack//lib/rack/files.rb#23 Rack::Files::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) # Rack::ForwardRequest gets caught by Rack::Recursive and redirects @@ -1466,219 +1472,289 @@ Rack::Files::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) # # raise ForwardRequest.new("/not-found") # -# source://rack//lib/rack/recursive.rb#12 +# source://rack//lib/rack/recursive.rb#14 class Rack::ForwardRequest < ::Exception # @return [ForwardRequest] a new instance of ForwardRequest # - # source://rack//lib/rack/recursive.rb#15 + # source://rack//lib/rack/recursive.rb#17 def initialize(url, env = T.unsafe(nil)); end # Returns the value of attribute env. # - # source://rack//lib/rack/recursive.rb#13 + # source://rack//lib/rack/recursive.rb#15 def env; end # Returns the value of attribute url. # - # source://rack//lib/rack/recursive.rb#13 + # source://rack//lib/rack/recursive.rb#15 def url; end end # HTTP method verbs # -# source://rack//lib/rack.rb#39 +# source://rack//lib/rack/constants.rb#28 Rack::GET = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#44 +# source://rack//lib/rack/constants.rb#33 Rack::HEAD = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#20 +# source://rack//lib/rack/constants.rb#7 Rack::HTTPS = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#35 +# source://rack//lib/rack/constants.rb#16 Rack::HTTP_COOKIE = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#17 +# Request env keys +# +# source://rack//lib/rack/constants.rb#5 Rack::HTTP_HOST = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#18 +# source://rack//lib/rack/constants.rb#6 Rack::HTTP_PORT = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#19 -Rack::HTTP_VERSION = T.let(T.unsafe(nil), String) - -# *Handlers* connect web servers with Rack. -# -# Rack includes Handlers for Thin, WEBrick, FastCGI, CGI, SCGI -# and LiteSpeed. +# Rack::Head returns an empty body for all HEAD requests. It leaves +# all other requests unchanged. # -# Handlers usually are activated by calling MyHandler.run(myapp). -# A second optional hash can be passed to include server-specific -# configuration. +# source://rack//lib/rack/head.rb#9 +class Rack::Head + # @return [Head] a new instance of Head + # + # source://rack//lib/rack/head.rb#10 + def initialize(app); end + + # source://rack//lib/rack/head.rb#14 + def call(env); end +end + +# Rack::Headers is a Hash subclass that downcases all keys. It's designed +# to be used by rack applications that don't implement the Rack 3 SPEC +# (by using non-lowercase response header keys), automatically handling +# the downcasing of keys. # -# source://rack//lib/rack/handler.rb#12 -module Rack::Handler - class << self - # source://rack//lib/rack/handler.rb#51 - def default; end +# source://rack//lib/rack/headers.rb#6 +class Rack::Headers < ::Hash + # source://rack//lib/rack/headers.rb#26 + def [](key); end - # source://rack//lib/rack/handler.rb#13 - def get(server); end + # source://rack//lib/rack/headers.rb#30 + def []=(key, value); end - # Select first available Rack handler given an `Array` of server names. - # Raises `LoadError` if no handler was found. - # - # > pick ['thin', 'webrick'] - # => Rack::Handler::WEBrick - # - # @raise [LoadError] - # - # source://rack//lib/rack/handler.rb#36 - def pick(server_names); end + # source://rack//lib/rack/headers.rb#35 + def assoc(key); end - # source://rack//lib/rack/handler.rb#85 - def register(server, klass); end + # @raise [TypeError] + # + # source://rack//lib/rack/headers.rb#39 + def compare_by_identity; end - # Transforms server-name constants to their canonical form as filenames, - # then tries to require them but silences the LoadError if not found - # - # Naming convention: - # - # Foo # => 'foo' - # FooBar # => 'foo_bar.rb' - # FooBAR # => 'foobar.rb' - # FOObar # => 'foobar.rb' - # FOOBAR # => 'foobar.rb' - # FooBarBaz # => 'foo_bar_baz.rb' - # - # source://rack//lib/rack/handler.rb#75 - def try_require(prefix, const_name); end - end -end + # source://rack//lib/rack/headers.rb#43 + def delete(key); end -# source://rack//lib/rack/handler/cgi.rb#5 -class Rack::Handler::CGI - class << self - # source://rack//lib/rack/handler/cgi.rb#6 - def run(app, **options); end + # source://rack//lib/rack/headers.rb#47 + def dig(key, *a); end - # source://rack//lib/rack/handler/cgi.rb#51 - def send_body(body); end + # :nocov: + # + # source://rack//lib/rack/headers.rb#143 + def except(*a); end - # source://rack//lib/rack/handler/cgi.rb#40 - def send_headers(status, headers); end + # source://rack//lib/rack/headers.rb#51 + def fetch(key, *default, &block); end - # source://rack//lib/rack/handler/cgi.rb#11 - def serve(app); end - end -end + # source://rack//lib/rack/headers.rb#56 + def fetch_values(*a); end -# source://rack//lib/rack/handler.rb#48 -Rack::Handler::SERVER_NAMES = T.let(T.unsafe(nil), Array) + # @return [Boolean] + # + # source://rack//lib/rack/headers.rb#60 + def has_key?(key); end -# source://rack//lib/rack/handler/webrick.rb#25 -class Rack::Handler::WEBrick < ::WEBrick::HTTPServlet::AbstractServlet - # @return [WEBrick] a new instance of WEBrick + # @return [Boolean] # - # source://rack//lib/rack/handler/webrick.rb#61 - def initialize(server, app); end + # source://rack//lib/rack/headers.rb#60 + def include?(key); end - # source://rack//lib/rack/handler/webrick.rb#66 - def service(req, res); end + # source://rack//lib/rack/headers.rb#67 + def invert; end - class << self - # @yield [@server] - # - # source://rack//lib/rack/handler/webrick.rb#26 - def run(app, **options); end + # @return [Boolean] + # + # source://rack//lib/rack/headers.rb#60 + def key?(key); end + + # @return [Boolean] + # + # source://rack//lib/rack/headers.rb#60 + def member?(key); end - # source://rack//lib/rack/handler/webrick.rb#54 - def shutdown; end + # source://rack//lib/rack/headers.rb#73 + def merge(hash, &block); end - # source://rack//lib/rack/handler/webrick.rb#44 - def valid_options; end - end -end + # source://rack//lib/rack/headers.rb#102 + def merge!(hash, &block); end -# Rack::Head returns an empty body for all HEAD requests. It leaves -# all other requests unchanged. -# -# source://rack//lib/rack/head.rb#6 -class Rack::Head - # @return [Head] a new instance of Head + # source://rack//lib/rack/headers.rb#77 + def reject(&block); end + + # source://rack//lib/rack/headers.rb#83 + def replace(hash); end + + # source://rack//lib/rack/headers.rb#88 + def select(&block); end + + # :nocov: # - # source://rack//lib/rack/head.rb#7 - def initialize(app); end + # source://rack//lib/rack/headers.rb#121 + def slice(*a); end - # source://rack//lib/rack/head.rb#11 - def call(env); end + # source://rack//lib/rack/headers.rb#30 + def store(key, value); end + + # source://rack//lib/rack/headers.rb#94 + def to_proc; end + + # source://rack//lib/rack/headers.rb#127 + def transform_keys(&block); end + + # source://rack//lib/rack/headers.rb#131 + def transform_keys!; end + + # source://rack//lib/rack/headers.rb#98 + def transform_values(&block); end + + # source://rack//lib/rack/headers.rb#102 + def update(hash, &block); end + + # source://rack//lib/rack/headers.rb#114 + def values_at(*keys); end + + private + + # source://rack//lib/rack/headers.rb#150 + def downcase_key(key); end + + class << self + # source://rack//lib/rack/headers.rb#7 + def [](*items); end + end end -# source://rack//lib/rack.rb#46 +# source://rack//lib/rack/constants.rb#35 Rack::LINK = T.let(T.unsafe(nil), String) # Rack::Lint validates your application and the requests and # responses according to the Rack spec. # -# source://rack//lib/rack/lint.rb#9 +# source://rack//lib/rack/lint.rb#12 class Rack::Lint - include ::Rack::Lint::Assertion - # @return [Lint] a new instance of Lint # - # source://rack//lib/rack/lint.rb#10 + # source://rack//lib/rack/lint.rb#13 def initialize(app); end - # source://rack//lib/rack/lint.rb#41 - def _call(env); end - + # AUTHORS: n.b. The trailing whitespace between paragraphs is important and + # should not be removed. The whitespace creates paragraphs in the RDoc + # output. + # + # This specification aims to formalize the Rack protocol. You + # can (and should) use Rack::Lint to enforce it. + # + # When you develop middleware, be sure to add a Lint before and + # after to catch all mistakes. + # + # = Rack applications + # # A Rack application is a Ruby object (not a class) that # responds to +call+. # - # source://rack//lib/rack/lint.rb#37 + # source://rack//lib/rack/lint.rb#34 def call(env = T.unsafe(nil)); end +end + +# :stopdoc: +# +# source://rack//lib/rack/lint.rb#19 +class Rack::Lint::LintError < ::RuntimeError; end + +# source://rack//lib/rack/lint.rb#38 +class Rack::Lint::Wrapper + # @return [Wrapper] a new instance of Wrapper + # + # source://rack//lib/rack/lint.rb#39 + def initialize(app, env); end + + # ==== Streaming Body + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#855 + def call(stream); end - # === The Content-Length + # === The content-length # - # source://rack//lib/rack/lint.rb#719 + # source://rack//lib/rack/lint.rb#693 def check_content_length(status, headers); end - # === The Content-Type + # === The content-type # - # source://rack//lib/rack/lint.rb#705 + # source://rack//lib/rack/lint.rb#677 def check_content_type(status, headers); end # == The Environment # - # source://rack//lib/rack/lint.rb#77 - def check_env(env); end + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#97 + def check_environment(env); end # === The Error Stream # - # source://rack//lib/rack/lint.rb#497 + # source://rack//lib/rack/lint.rb#491 def check_error(error); end + # source://rack//lib/rack/lint.rb#667 + def check_header_value(key, value); end + # === The Headers # - # source://rack//lib/rack/lint.rb#668 - def check_headers(header); end + # source://rack//lib/rack/lint.rb#627 + def check_headers(headers); end # === Hijacking # - # AUTHORS: n.b. The trailing whitespace between paragraphs is important and - # should not be removed. The whitespace creates paragraphs in the RDoc - # output. + # The hijacking interfaces provides a means for an application to take + # control of the HTTP connection. There are two distinct hijack + # interfaces: full hijacking where the application takes over the raw + # connection, and partial hijacking where the application takes over + # just the response body stream. In both cases, the application is + # responsible for closing the hijacked stream. + # + # Full hijacking only works with HTTP/1. Partial hijacking is functionally + # equivalent to streaming bodies, and is still optionally supported for + # backwards compatibility with older Rack versions. # - # ==== Request (before status) + # ==== Full Hijack # - # source://rack//lib/rack/lint.rb#562 + # Full hijack is used to completely take over an HTTP/1 connection. It + # occurs before any headers are written and causes the request to + # ignores any response generated by the application. + # + # It is intended to be used when applications need access to raw HTTP/1 + # connection. + # + # source://rack//lib/rack/lint.rb#551 def check_hijack(env); end - # ==== Response (after headers) - # It is also possible to hijack a response after the status and headers - # have been sent. + # ==== Partial Hijack + # + # Partial hijack is used for bi-directional streaming of the request and + # response body. It occurs after the status and headers are written by + # the server and causes the server to ignore the Body of the response. + # + # It is intended to be used when applications need bi-directional + # streaming. # - # source://rack//lib/rack/lint.rb#609 + # source://rack//lib/rack/lint.rb#579 def check_hijack_response(headers, env); end # === The Input Stream @@ -1686,127 +1762,144 @@ class Rack::Lint # The input stream is an IO-like object which contains the raw HTTP # POST data. # - # source://rack//lib/rack/lint.rb#377 + # source://rack//lib/rack/lint.rb#387 def check_input(input); end + # == The Response + # # === The Status # - # source://rack//lib/rack/lint.rb#661 + # source://rack//lib/rack/lint.rb#616 def check_status(status); end - # source://rack//lib/rack/lint.rb#792 + # === The Body + # + # The Body is typically an +Array+ of +String+ instances, an enumerable + # that yields +String+ instances, a +Proc+ instance, or a File-like + # object. + # + # The Body must respond to +each+ or +call+. It may optionally respond + # to +to_path+ or +to_ary+. A Body that responds to +each+ is considered + # to be an Enumerable Body. A Body that responds to +call+ is considered + # to be a Streaming Body. + # + # A Body that responds to both +each+ and +call+ must be treated as an + # Enumerable Body, not a Streaming Body. If it responds to +each+, you + # must call +each+ and not +call+. If the Body doesn't respond to + # +each+, then you can assume it responds to +call+. + # + # The Body must either be consumed or returned. The Body is consumed by + # optionally calling either +each+ or +call+. + # Then, if the Body responds to +close+, it must be called to release + # any resources associated with the generation of the body. + # In other words, +close+ must always be called at least once; typically + # after the web server has sent the response to the client, but also in + # cases where the Rack application makes internal/virtual requests and + # discards the response. + # + # source://rack//lib/rack/lint.rb#744 def close; end - # === The Body + # ==== Enumerable Body # - # source://rack//lib/rack/lint.rb#745 + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#778 def each; end - # source://rack//lib/rack/lint.rb#732 - def verify_content_length(bytes); end -end + # @return [Boolean] + # + # source://rack//lib/rack/lint.rb#826 + def respond_to?(name, *_arg1); end + + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#54 + def response; end + + # If the Body responds to +to_ary+, it must return an +Array+ whose + # contents are identical to that produced by calling +each+. + # Middleware may call +to_ary+ directly on the Body and return a new + # Body in its place. In other words, middleware can only process the + # Body directly if it responds to +to_ary+. If the Body responds to both + # +to_ary+ and +close+, its implementation of +to_ary+ must call + # +close+. + # + # source://rack//lib/rack/lint.rb#842 + def to_ary; end + + # source://rack//lib/rack/lint.rb#822 + def to_path; end + + # source://rack//lib/rack/lint.rb#706 + def verify_content_length(size); end -# source://rack//lib/rack/lint.rb#18 -module Rack::Lint::Assertion - # source://rack//lib/rack/lint.rb#19 - def assert(message); end + # source://rack//lib/rack/lint.rb#760 + def verify_to_path; end end -# source://rack//lib/rack/lint.rb#506 -class Rack::Lint::ErrorWrapper - include ::Rack::Lint::Assertion +# source://rack//lib/rack/lint.rb#820 +Rack::Lint::Wrapper::BODY_METHODS = T.let(T.unsafe(nil), Hash) +# source://rack//lib/rack/lint.rb#500 +class Rack::Lint::Wrapper::ErrorWrapper # @return [ErrorWrapper] a new instance of ErrorWrapper # - # source://rack//lib/rack/lint.rb#509 + # source://rack//lib/rack/lint.rb#501 def initialize(error); end # * +close+ must never be called on the error stream. # - # source://rack//lib/rack/lint.rb#531 + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#523 def close(*args); end # * +flush+ must be called without arguments and must be called # in order to make the error appear for sure. # - # source://rack//lib/rack/lint.rb#526 + # source://rack//lib/rack/lint.rb#518 def flush; end # * +puts+ must be called with a single argument that responds to +to_s+. # - # source://rack//lib/rack/lint.rb#514 + # source://rack//lib/rack/lint.rb#506 def puts(str); end # * +write+ must be called with a single argument that is a String. # - # source://rack//lib/rack/lint.rb#519 - def write(str); end -end - -# source://rack//lib/rack/lint.rb#536 -class Rack::Lint::HijackWrapper - include ::Rack::Lint::Assertion - extend ::Forwardable - - # @return [HijackWrapper] a new instance of HijackWrapper + # @raise [LintError] # - # source://rack//lib/rack/lint.rb#547 - def initialize(io); 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_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 - - # source://forwardable/1.3.3/forwardable.rb#231 - def flush(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def read(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def read_nonblock(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def write(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def write_nonblock(*args, **_arg1, &block); end + # source://rack//lib/rack/lint.rb#511 + def write(str); end end -# source://rack//lib/rack/lint.rb#540 -Rack::Lint::HijackWrapper::REQUIRED_METHODS = T.let(T.unsafe(nil), Array) - -# source://rack//lib/rack/lint.rb#395 -class Rack::Lint::InputWrapper - include ::Rack::Lint::Assertion - +# source://rack//lib/rack/lint.rb#405 +class Rack::Lint::Wrapper::InputWrapper # @return [InputWrapper] a new instance of InputWrapper # - # source://rack//lib/rack/lint.rb#398 + # source://rack//lib/rack/lint.rb#406 def initialize(input); end - # * +close+ must never be called on the input stream. + # * +close+ can be called on the input stream to indicate that the + # any remaining input is not needed. # - # source://rack//lib/rack/lint.rb#491 + # source://rack//lib/rack/lint.rb#483 def close(*args); end # * +each+ must be called without arguments and only yield Strings. # - # source://rack//lib/rack/lint.rb#463 + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#471 def each(*args); end # * +gets+ must be called without arguments and return a string, # or +nil+ on EOF. # - # source://rack//lib/rack/lint.rb#404 + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#412 def gets(*args); end # * +read+ behaves like IO#read. @@ -1827,23 +1920,52 @@ class Rack::Lint::InputWrapper # If +buffer+ is given, then the read data will be placed # into +buffer+ instead of a newly created String object. # - # source://rack//lib/rack/lint.rb#430 + # source://rack//lib/rack/lint.rb#438 def read(*args); end +end + +# source://rack//lib/rack/lint.rb#875 +class Rack::Lint::Wrapper::StreamWrapper + extend ::Forwardable - # * +rewind+ must be called without arguments. It rewinds the input - # stream back to the beginning. It must not raise Errno::ESPIPE: - # that is, it may not be a pipe or a socket. Therefore, handler - # developers must buffer the input data into some rewindable object - # if the underlying input stream is not rewindable. + # @return [StreamWrapper] a new instance of StreamWrapper # - # source://rack//lib/rack/lint.rb#478 - def rewind(*args); end + # source://rack//lib/rack/lint.rb#890 + def initialize(stream); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def <<(*args, **_arg1, &block); 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_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 + + # source://forwardable/1.3.3/forwardable.rb#231 + def flush(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def read(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def write(*args, **_arg1, &block); end end -# :stopdoc: +# The semantics of these IO methods must be a best effort match to +# those of a normal Ruby IO or Socket object, using standard arguments +# and raising standard exceptions. Servers are encouraged to simply +# pass on real IO objects, although it is recognized that this approach +# is not directly compatible with HTTP/2. # -# source://rack//lib/rack/lint.rb#17 -class Rack::Lint::LintError < ::RuntimeError; end +# source://rack//lib/rack/lint.rb#883 +Rack::Lint::Wrapper::StreamWrapper::REQUIRED_METHODS = T.let(T.unsafe(nil), Array) # Rack::Lock locks every request inside a mutex, so that every request # will effectively be executed synchronously. @@ -1860,20 +1982,20 @@ class Rack::Lock private - # source://rack//lib/rack/lock.rb#27 + # source://rack//lib/rack/lock.rb#25 def unlock; end end # Sets up rack.logger to write to rack.errors stream # -# source://rack//lib/rack/logger.rb#7 +# source://rack//lib/rack/logger.rb#9 class Rack::Logger # @return [Logger] a new instance of Logger # - # source://rack//lib/rack/logger.rb#8 + # source://rack//lib/rack/logger.rb#10 def initialize(app, level = T.unsafe(nil)); end - # source://rack//lib/rack/logger.rb#12 + # source://rack//lib/rack/logger.rb#14 def call(env); end end @@ -1888,7 +2010,7 @@ class Rack::MediaType # this method responds with the following Hash: # { 'charset' => 'utf-8' } # - # source://rack//lib/rack/media_type.rb#26 + # source://rack//lib/rack/media_type.rb#30 def params(content_type); end # The media type (type/subtype) portion of the CONTENT_TYPE header @@ -1903,7 +2025,7 @@ class Rack::MediaType private - # source://rack//lib/rack/media_type.rb#38 + # source://rack//lib/rack/media_type.rb#43 def strip_doublequotes(str); end end end @@ -1911,38 +2033,38 @@ end # source://rack//lib/rack/media_type.rb#7 Rack::MediaType::SPLIT_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/method_override.rb#4 +# source://rack//lib/rack/method_override.rb#8 class Rack::MethodOverride # @return [MethodOverride] a new instance of MethodOverride # - # source://rack//lib/rack/method_override.rb#11 + # source://rack//lib/rack/method_override.rb#15 def initialize(app); end - # source://rack//lib/rack/method_override.rb#15 + # source://rack//lib/rack/method_override.rb#19 def call(env); end - # source://rack//lib/rack/method_override.rb#27 + # source://rack//lib/rack/method_override.rb#31 def method_override(env); end private - # source://rack//lib/rack/method_override.rb#40 + # source://rack//lib/rack/method_override.rb#44 def allowed_methods; end - # source://rack//lib/rack/method_override.rb#44 + # source://rack//lib/rack/method_override.rb#48 def method_override_param(req); end end -# source://rack//lib/rack/method_override.rb#9 +# source://rack//lib/rack/method_override.rb#13 Rack::MethodOverride::ALLOWED_METHODS = T.let(T.unsafe(nil), Array) -# source://rack//lib/rack/method_override.rb#5 +# source://rack//lib/rack/method_override.rb#9 Rack::MethodOverride::HTTP_METHODS = T.let(T.unsafe(nil), Array) -# source://rack//lib/rack/method_override.rb#8 +# source://rack//lib/rack/method_override.rb#12 Rack::MethodOverride::HTTP_METHOD_OVERRIDE_HEADER = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/method_override.rb#7 +# source://rack//lib/rack/method_override.rb#11 Rack::MethodOverride::METHOD_OVERRIDE_PARAM_KEY = T.let(T.unsafe(nil), String) # source://rack//lib/rack/mime.rb#4 @@ -2037,53 +2159,53 @@ Rack::Mime::MIME_TYPES = T.let(T.unsafe(nil), Hash) # :fatal:: Raise a FatalWarning if the app writes to rack.errors. # :lint:: If true, wrap the application in a Rack::Lint. # -# source://rack//lib/rack/mock.rb#22 +# source://rack//lib/rack/mock_request.rb#23 class Rack::MockRequest # @return [MockRequest] a new instance of MockRequest # - # source://rack//lib/rack/mock.rb#52 + # source://rack//lib/rack/mock_request.rb#49 def initialize(app); end # Make a DELETE request and return a MockResponse. See #request. # - # source://rack//lib/rack/mock.rb#65 + # source://rack//lib/rack/mock_request.rb#62 def delete(uri, opts = T.unsafe(nil)); end # Make a GET request and return a MockResponse. See #request. # - # source://rack//lib/rack/mock.rb#57 + # source://rack//lib/rack/mock_request.rb#54 def get(uri, opts = T.unsafe(nil)); end # Make a HEAD request and return a MockResponse. See #request. # - # source://rack//lib/rack/mock.rb#67 + # source://rack//lib/rack/mock_request.rb#64 def head(uri, opts = T.unsafe(nil)); end # Make an OPTIONS request and return a MockResponse. See #request. # - # source://rack//lib/rack/mock.rb#69 + # source://rack//lib/rack/mock_request.rb#66 def options(uri, opts = T.unsafe(nil)); end # Make a PATCH request and return a MockResponse. See #request. # - # source://rack//lib/rack/mock.rb#63 + # source://rack//lib/rack/mock_request.rb#60 def patch(uri, opts = T.unsafe(nil)); end # Make a POST request and return a MockResponse. See #request. # - # source://rack//lib/rack/mock.rb#59 + # source://rack//lib/rack/mock_request.rb#56 def post(uri, opts = T.unsafe(nil)); end # Make a PUT request and return a MockResponse. See #request. # - # source://rack//lib/rack/mock.rb#61 + # source://rack//lib/rack/mock_request.rb#58 def put(uri, opts = T.unsafe(nil)); end # Make a request using the given request method for the given # uri to the rack application and return a MockResponse. # Options given are passed to MockRequest.env_for. # - # source://rack//lib/rack/mock.rb#74 + # source://rack//lib/rack/mock_request.rb#71 def request(method = T.unsafe(nil), uri = T.unsafe(nil), opts = T.unsafe(nil)); end class << self @@ -2092,100 +2214,101 @@ class Rack::MockRequest # Options: # :fatal :: Whether to raise an exception if request outputs to rack.errors # :input :: The rack.input to set + # :http_version :: The SERVER_PROTOCOL to set # :method :: The HTTP request method to use # :params :: The params to use # :script_name :: The SCRIPT_NAME to set # - # source://rack//lib/rack/mock.rb#105 + # source://rack//lib/rack/mock_request.rb#103 def env_for(uri = T.unsafe(nil), opts = T.unsafe(nil)); end # For historical reasons, we're pinning to RFC 2396. # URI::Parser = URI::RFC2396_Parser # - # source://rack//lib/rack/mock.rb#92 + # source://rack//lib/rack/mock_request.rb#89 def parse_uri_rfc2396(uri); end end end -# source://rack//lib/rack/mock.rb#43 +# source://rack//lib/rack/mock_request.rb#44 Rack::MockRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) -# source://rack//lib/rack/mock.rb#26 +# source://rack//lib/rack/mock_request.rb#27 class Rack::MockRequest::FatalWarner - # source://rack//lib/rack/mock.rb#35 + # source://rack//lib/rack/mock_request.rb#36 def flush; end # @raise [FatalWarning] # - # source://rack//lib/rack/mock.rb#27 + # source://rack//lib/rack/mock_request.rb#28 def puts(warning); end - # source://rack//lib/rack/mock.rb#38 + # source://rack//lib/rack/mock_request.rb#39 def string; end # @raise [FatalWarning] # - # source://rack//lib/rack/mock.rb#31 + # source://rack//lib/rack/mock_request.rb#32 def write(warning); end end -# source://rack//lib/rack/mock.rb#23 +# source://rack//lib/rack/mock_request.rb#24 class Rack::MockRequest::FatalWarning < ::RuntimeError; end # Rack::MockResponse provides useful helpers for testing your apps. # Usually, you don't create the MockResponse on your own, but use # MockRequest. # -# source://rack//lib/rack/mock.rb#173 +# source://rack//lib/rack/mock_response.rb#13 class Rack::MockResponse < ::Rack::Response # @return [MockResponse] a new instance of MockResponse # - # source://rack//lib/rack/mock.rb#184 + # source://rack//lib/rack/mock_response.rb#24 def initialize(status, headers, body, errors = T.unsafe(nil)); end - # source://rack//lib/rack/mock.rb#194 + # source://rack//lib/rack/mock_response.rb#39 def =~(other); end - # source://rack//lib/rack/mock.rb#202 + # source://rack//lib/rack/mock_response.rb#47 def body; end - # source://rack//lib/rack/mock.rb#226 + # source://rack//lib/rack/mock_response.rb#73 def cookie(name); end # Headers # - # source://rack//lib/rack/mock.rb#179 + # source://rack//lib/rack/mock_response.rb#19 def cookies; end # @return [Boolean] # - # source://rack//lib/rack/mock.rb#222 + # source://rack//lib/rack/mock_response.rb#69 def empty?; end # Errors # - # source://rack//lib/rack/mock.rb#182 + # source://rack//lib/rack/mock_response.rb#22 def errors; end # Errors # - # source://rack//lib/rack/mock.rb#182 + # source://rack//lib/rack/mock_response.rb#22 def errors=(_arg0); end - # source://rack//lib/rack/mock.rb#198 + # source://rack//lib/rack/mock_response.rb#43 def match(other); end # Headers # - # source://rack//lib/rack/mock.rb#179 + # source://rack//lib/rack/mock_response.rb#19 def original_headers; end private - # source://rack//lib/rack/mock.rb#253 + # source://rack//lib/rack/mock_response.rb#102 def identify_cookie_attributes(cookie_filling); end - # source://rack//lib/rack/mock.rb#232 + # source://rack//lib/rack/mock_response.rb#79 def parse_cookies_from_header; end class << self @@ -2197,252 +2320,273 @@ end # # Usually, Rack::Request#POST takes care of calling this. # -# source://rack//lib/rack/multipart/parser.rb#6 +# source://rack//lib/rack/multipart/parser.rb#8 module Rack::Multipart class << self - # source://rack//lib/rack/multipart.rb#58 + # source://rack//lib/rack/multipart.rb#39 def build_multipart(params, first = T.unsafe(nil)); end - # source://rack//lib/rack/multipart.rb#44 - def extract_multipart(req, params = T.unsafe(nil)); end + # source://rack//lib/rack/multipart.rb#35 + def extract_multipart(request, params = T.unsafe(nil)); end - # source://rack//lib/rack/multipart.rb#40 + # source://rack//lib/rack/multipart.rb#17 def parse_multipart(env, params = T.unsafe(nil)); end end end -# source://rack//lib/rack/multipart.rb#25 +# source://rack//lib/rack/multipart/parser.rb#32 Rack::Multipart::ATTRIBUTE = T.let(T.unsafe(nil), Regexp) # Updated definitions from RFC 2231 # -# source://rack//lib/rack/multipart.rb#24 +# source://rack//lib/rack/multipart/parser.rb#31 Rack::Multipart::ATTRIBUTE_CHAR = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#19 +# source://rack//lib/rack/multipart/parser.rb#26 Rack::Multipart::BROKEN = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#17 +# source://rack//lib/rack/multipart/parser.rb#24 Rack::Multipart::CONDISP = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#36 +# source://rack//lib/rack/multipart/parser.rb#43 Rack::Multipart::DISPPARM = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#13 +# source://rack//lib/rack/multipart/parser.rb#21 Rack::Multipart::EOL = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/multipart.rb#32 +# source://rack//lib/rack/multipart/parser.rb#39 Rack::Multipart::EXTENDED_INITIAL_NAME = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#34 +# source://rack//lib/rack/multipart/parser.rb#41 Rack::Multipart::EXTENDED_INITIAL_PARAMETER = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#33 +# source://rack//lib/rack/multipart/parser.rb#40 Rack::Multipart::EXTENDED_INITIAL_VALUE = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#29 +# source://rack//lib/rack/multipart/parser.rb#36 Rack::Multipart::EXTENDED_OTHER_NAME = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#31 +# source://rack//lib/rack/multipart/parser.rb#38 Rack::Multipart::EXTENDED_OTHER_PARAMETER = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#30 +# source://rack//lib/rack/multipart/parser.rb#37 Rack::Multipart::EXTENDED_OTHER_VALUE = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#35 +# source://rack//lib/rack/multipart/parser.rb#42 Rack::Multipart::EXTENDED_PARAMETER = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart/generator.rb#5 +# Use specific error class when parsing multipart request +# that ends early. +# +# source://rack//lib/rack/multipart/parser.rb#15 +class Rack::Multipart::EmptyContentError < ::EOFError; end + +# Base class for multipart exceptions that do not subclass from +# other exception classes for backwards compatibility. +# +# source://rack//lib/rack/multipart/parser.rb#19 +class Rack::Multipart::Error < ::StandardError; end + +# source://rack//lib/rack/multipart/generator.rb#7 class Rack::Multipart::Generator # @return [Generator] a new instance of Generator # - # source://rack//lib/rack/multipart/generator.rb#6 + # source://rack//lib/rack/multipart/generator.rb#8 def initialize(params, first = T.unsafe(nil)); end - # source://rack//lib/rack/multipart/generator.rb#14 + # source://rack//lib/rack/multipart/generator.rb#16 def dump; end private - # source://rack//lib/rack/multipart/generator.rb#87 + # source://rack//lib/rack/multipart/generator.rb#89 def content_for_other(file, name); end - # source://rack//lib/rack/multipart/generator.rb#75 + # source://rack//lib/rack/multipart/generator.rb#77 def content_for_tempfile(io, file, name); end - # source://rack//lib/rack/multipart/generator.rb#50 + # source://rack//lib/rack/multipart/generator.rb#52 def flattened_params; end # @return [Boolean] # - # source://rack//lib/rack/multipart/generator.rb#35 + # source://rack//lib/rack/multipart/generator.rb#37 def multipart?; end end -# source://rack//lib/rack/multipart.rb#15 +# source://rack//lib/rack/multipart/parser.rb#22 Rack::Multipart::MULTIPART = T.let(T.unsafe(nil), Regexp) # source://rack//lib/rack/multipart.rb#14 Rack::Multipart::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/multipart.rb#21 +# source://rack//lib/rack/multipart/parser.rb#28 Rack::Multipart::MULTIPART_CONTENT_DISPOSITION = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#22 +# source://rack//lib/rack/multipart/parser.rb#29 Rack::Multipart::MULTIPART_CONTENT_ID = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#20 +# source://rack//lib/rack/multipart/parser.rb#27 Rack::Multipart::MULTIPART_CONTENT_TYPE = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart/parser.rb#7 +# source://rack//lib/rack/multipart/parser.rb#9 class Rack::Multipart::MultipartPartLimitError < ::Errno::EMFILE; end -# source://rack//lib/rack/multipart/parser.rb#8 +# source://rack//lib/rack/multipart/parser.rb#11 class Rack::Multipart::MultipartTotalPartLimitError < ::StandardError; end -# source://rack//lib/rack/multipart/parser.rb#10 +# source://rack//lib/rack/multipart/parser.rb#46 class Rack::Multipart::Parser # @return [Parser] a new instance of Parser # - # source://rack//lib/rack/multipart/parser.rb#178 + # source://rack//lib/rack/multipart/parser.rb#205 def initialize(boundary, tempfile, bufsize, query_parser); end - # source://rack//lib/rack/multipart/parser.rb#196 - def on_read(content); end + # source://rack//lib/rack/multipart/parser.rb#220 + def parse(io); end - # source://rack//lib/rack/multipart/parser.rb#202 + # source://rack//lib/rack/multipart/parser.rb#243 def result; end # Returns the value of attribute state. # - # source://rack//lib/rack/multipart/parser.rb#176 + # source://rack//lib/rack/multipart/parser.rb#203 def state; end private - # source://rack//lib/rack/multipart/parser.rb#294 + # Scan until the we find the start or end of the boundary. + # If we find it, return the appropriate symbol for the start or + # end of the boundary. If we don't find the start or end of the + # boundary, clear the buffer and return nil. + # + # source://rack//lib/rack/multipart/parser.rb#346 def consume_boundary; end - # source://rack//lib/rack/multipart/parser.rb#292 - def full_boundary; end + # From WEBrick::HTTPUtils + # + # source://rack//lib/rack/multipart/parser.rb#255 + def dequote(str); end - # source://rack//lib/rack/multipart/parser.rb#304 + # source://rack//lib/rack/multipart/parser.rb#355 def get_filename(head); end - # source://rack//lib/rack/multipart/parser.rb#240 + # source://rack//lib/rack/multipart/parser.rb#290 def handle_consume_token; end - # source://rack//lib/rack/multipart/parser.rb#369 + # source://rack//lib/rack/multipart/parser.rb#427 def handle_empty_content!(content); end - # source://rack//lib/rack/multipart/parser.rb#231 + # This handles the initial parser state. We read until we find the starting + # boundary, then we can transition to the next state. If we find the ending + # boundary, this is an invalid multipart upload, but keep scanning for opening + # boundary in that case. If no boundary found, we need to keep reading data + # and retry. It's highly unlikely the initial read will not consume the + # boundary. The client would have to deliberately craft a response + # with the opening boundary beyond the buffer size for that to happen. + # + # source://rack//lib/rack/multipart/parser.rb#274 def handle_fast_forward; end - # source://rack//lib/rack/multipart/parser.rb#273 + # source://rack//lib/rack/multipart/parser.rb#323 def handle_mime_body; end - # source://rack//lib/rack/multipart/parser.rb#250 + # source://rack//lib/rack/multipart/parser.rb#300 def handle_mime_head; end - # source://rack//lib/rack/multipart/parser.rb#214 - def run_parser; end + # source://rack//lib/rack/multipart/parser.rb#261 + def read_data(io, outbuf); end - # source://rack//lib/rack/multipart/parser.rb#341 + # source://rack//lib/rack/multipart/parser.rb#393 def tag_multipart_encoding(filename, content_type, name, body); end class << self - # source://rack//lib/rack/multipart/parser.rb#64 + # source://rack//lib/rack/multipart/parser.rb#92 def parse(io, content_length, content_type, tmpfile, bufsize, qp); end - # source://rack//lib/rack/multipart/parser.rb#57 + # source://rack//lib/rack/multipart/parser.rb#85 def parse_boundary(content_type); end end end -# source://rack//lib/rack/multipart/parser.rb#19 -Rack::Multipart::Parser::BOUNDARY_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart/parser.rb#13 +# source://rack//lib/rack/multipart/parser.rb#47 Rack::Multipart::Parser::BUFSIZE = T.let(T.unsafe(nil), Integer) -# source://rack//lib/rack/multipart/parser.rb#21 +# source://rack//lib/rack/multipart/parser.rb#53 class Rack::Multipart::Parser::BoundedIO # @return [BoundedIO] a new instance of BoundedIO # - # source://rack//lib/rack/multipart/parser.rb#22 + # source://rack//lib/rack/multipart/parser.rb#54 def initialize(io, content_length); end - # source://rack//lib/rack/multipart/parser.rb#28 + # source://rack//lib/rack/multipart/parser.rb#60 def read(size, outbuf = T.unsafe(nil)); end - - # source://rack//lib/rack/multipart/parser.rb#49 - def rewind; end end -# source://rack//lib/rack/multipart/parser.rb#339 +# source://rack//lib/rack/multipart/parser.rb#390 Rack::Multipart::Parser::CHARSET = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/multipart/parser.rb#85 +# source://rack//lib/rack/multipart/parser.rb#112 class Rack::Multipart::Parser::Collector include ::Enumerable # @return [Collector] a new instance of Collector # - # source://rack//lib/rack/multipart/parser.rb#121 + # source://rack//lib/rack/multipart/parser.rb#148 def initialize(tempfile); end - # source://rack//lib/rack/multipart/parser.rb#127 + # source://rack//lib/rack/multipart/parser.rb#154 def each; end - # source://rack//lib/rack/multipart/parser.rb#147 + # source://rack//lib/rack/multipart/parser.rb#174 def on_mime_body(mime_index, content); end - # source://rack//lib/rack/multipart/parser.rb#151 + # source://rack//lib/rack/multipart/parser.rb#178 def on_mime_finish(mime_index); end - # source://rack//lib/rack/multipart/parser.rb#131 + # source://rack//lib/rack/multipart/parser.rb#158 def on_mime_head(mime_index, head, filename, content_type, name); end private - # source://rack//lib/rack/multipart/parser.rb#156 + # source://rack//lib/rack/multipart/parser.rb#183 def check_part_limits; end end -# source://rack//lib/rack/multipart/parser.rb#109 +# source://rack//lib/rack/multipart/parser.rb#136 class Rack::Multipart::Parser::Collector::BufferPart < ::Rack::Multipart::Parser::Collector::MimePart - # source://rack//lib/rack/multipart/parser.rb#111 + # source://rack//lib/rack/multipart/parser.rb#138 def close; end # @return [Boolean] # - # source://rack//lib/rack/multipart/parser.rb#110 + # source://rack//lib/rack/multipart/parser.rb#137 def file?; end end -# source://rack//lib/rack/multipart/parser.rb#86 +# source://rack//lib/rack/multipart/parser.rb#113 class Rack::Multipart::Parser::Collector::MimePart < ::Struct # @yield [data] # - # source://rack//lib/rack/multipart/parser.rb#87 + # source://rack//lib/rack/multipart/parser.rb#114 def get_data; end end -# source://rack//lib/rack/multipart/parser.rb#114 +# source://rack//lib/rack/multipart/parser.rb#141 class Rack::Multipart::Parser::Collector::TempfilePart < ::Rack::Multipart::Parser::Collector::MimePart - # source://rack//lib/rack/multipart/parser.rb#116 + # source://rack//lib/rack/multipart/parser.rb#143 def close; end # @return [Boolean] # - # source://rack//lib/rack/multipart/parser.rb#115 + # source://rack//lib/rack/multipart/parser.rb#142 def file?; end end -# source://rack//lib/rack/multipart/parser.rb#55 +# source://rack//lib/rack/multipart/parser.rb#83 Rack::Multipart::Parser::EMPTY = T.let(T.unsafe(nil), Rack::Multipart::Parser::MultipartInfo) -# source://rack//lib/rack/multipart/parser.rb#54 +# source://rack//lib/rack/multipart/parser.rb#82 class Rack::Multipart::Parser::MultipartInfo < ::Struct # Returns the value of attribute params # @@ -2475,211 +2619,224 @@ class Rack::Multipart::Parser::MultipartInfo < ::Struct end end -# source://rack//lib/rack/multipart/parser.rb#15 +# source://rack//lib/rack/multipart/parser.rb#49 Rack::Multipart::Parser::TEMPFILE_FACTORY = T.let(T.unsafe(nil), Proc) -# source://rack//lib/rack/multipart/parser.rb#14 +# source://rack//lib/rack/multipart/parser.rb#48 Rack::Multipart::Parser::TEXT_PLAIN = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/multipart.rb#28 +# source://rack//lib/rack/multipart/parser.rb#35 Rack::Multipart::REGULAR_PARAMETER = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#27 +# source://rack//lib/rack/multipart/parser.rb#34 Rack::Multipart::REGULAR_PARAMETER_NAME = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#37 +# source://rack//lib/rack/multipart/parser.rb#44 Rack::Multipart::RFC2183 = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#26 +# source://rack//lib/rack/multipart/parser.rb#33 Rack::Multipart::SECTION = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart.rb#16 +# source://rack//lib/rack/multipart/parser.rb#23 Rack::Multipart::TOKEN = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/multipart/uploaded_file.rb#5 +# source://rack//lib/rack/multipart/uploaded_file.rb#8 class Rack::Multipart::UploadedFile # @return [UploadedFile] a new instance of UploadedFile # - # source://rack//lib/rack/multipart/uploaded_file.rb#12 + # source://rack//lib/rack/multipart/uploaded_file.rb#16 def initialize(filepath = T.unsafe(nil), ct = T.unsafe(nil), bin = T.unsafe(nil), path: T.unsafe(nil), content_type: T.unsafe(nil), binary: T.unsafe(nil), filename: T.unsafe(nil), io: T.unsafe(nil)); end # The content type of the "uploaded" file # - # source://rack//lib/rack/multipart/uploaded_file.rb#10 + # source://rack//lib/rack/multipart/uploaded_file.rb#14 def content_type; end # The content type of the "uploaded" file # - # source://rack//lib/rack/multipart/uploaded_file.rb#10 + # source://rack//lib/rack/multipart/uploaded_file.rb#14 def content_type=(_arg0); end - # source://rack//lib/rack/multipart/uploaded_file.rb#27 + # source://rack//lib/rack/multipart/uploaded_file.rb#31 def local_path; end - # source://rack//lib/rack/multipart/uploaded_file.rb#36 + # source://rack//lib/rack/multipart/uploaded_file.rb#40 def method_missing(method_name, *args, &block); end # The filename, *not* including the path, of the "uploaded" file # - # source://rack//lib/rack/multipart/uploaded_file.rb#7 + # source://rack//lib/rack/multipart/uploaded_file.rb#11 def original_filename; end - # source://rack//lib/rack/multipart/uploaded_file.rb#27 + # source://rack//lib/rack/multipart/uploaded_file.rb#31 def path; end # @return [Boolean] # - # source://rack//lib/rack/multipart/uploaded_file.rb#32 + # source://rack//lib/rack/multipart/uploaded_file.rb#36 def respond_to?(*args); end end -# source://rack//lib/rack/multipart.rb#18 +# source://rack//lib/rack/multipart/parser.rb#25 Rack::Multipart::VALUE = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/null_logger.rb#4 +# source://rack//lib/rack/null_logger.rb#6 class Rack::NullLogger # @return [NullLogger] a new instance of NullLogger # - # source://rack//lib/rack/null_logger.rb#5 + # source://rack//lib/rack/null_logger.rb#7 def initialize(app); end - # source://rack//lib/rack/null_logger.rb#37 + # source://rack//lib/rack/null_logger.rb#45 def <<(msg); end - # source://rack//lib/rack/null_logger.rb#36 + # source://rack//lib/rack/null_logger.rb#43 def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end - # source://rack//lib/rack/null_logger.rb#9 + # source://rack//lib/rack/null_logger.rb#11 def call(env); end - # source://rack//lib/rack/null_logger.rb#35 + # source://rack//lib/rack/null_logger.rb#42 def close; end - # source://rack//lib/rack/null_logger.rb#27 + # source://rack//lib/rack/null_logger.rb#34 def datetime_format; end - # source://rack//lib/rack/null_logger.rb#32 + # source://rack//lib/rack/null_logger.rb#39 def datetime_format=(datetime_format); end - # source://rack//lib/rack/null_logger.rb#15 + # source://rack//lib/rack/null_logger.rb#17 def debug(progname = T.unsafe(nil), &block); end + # source://rack//lib/rack/null_logger.rb#27 + def debug!; end + # @return [Boolean] # - # source://rack//lib/rack/null_logger.rb#21 + # source://rack//lib/rack/null_logger.rb#23 def debug?; end - # source://rack//lib/rack/null_logger.rb#17 + # source://rack//lib/rack/null_logger.rb#19 def error(progname = T.unsafe(nil), &block); end + # source://rack//lib/rack/null_logger.rb#28 + def error!; end + # @return [Boolean] # - # source://rack//lib/rack/null_logger.rb#23 + # source://rack//lib/rack/null_logger.rb#25 def error?; end - # source://rack//lib/rack/null_logger.rb#18 + # source://rack//lib/rack/null_logger.rb#20 def fatal(progname = T.unsafe(nil), &block); end + # source://rack//lib/rack/null_logger.rb#29 + def fatal!; end + # @return [Boolean] # - # source://rack//lib/rack/null_logger.rb#24 + # source://rack//lib/rack/null_logger.rb#26 def fatal?; end - # source://rack//lib/rack/null_logger.rb#28 + # source://rack//lib/rack/null_logger.rb#35 def formatter; end - # source://rack//lib/rack/null_logger.rb#33 + # source://rack//lib/rack/null_logger.rb#40 def formatter=(formatter); end - # source://rack//lib/rack/null_logger.rb#14 + # source://rack//lib/rack/null_logger.rb#16 def info(progname = T.unsafe(nil), &block); end + # source://rack//lib/rack/null_logger.rb#30 + def info!; end + # @return [Boolean] # - # source://rack//lib/rack/null_logger.rb#20 + # source://rack//lib/rack/null_logger.rb#22 def info?; end - # source://rack//lib/rack/null_logger.rb#25 + # source://rack//lib/rack/null_logger.rb#32 def level; end - # source://rack//lib/rack/null_logger.rb#30 + # source://rack//lib/rack/null_logger.rb#37 def level=(level); end - # source://rack//lib/rack/null_logger.rb#26 + # source://rack//lib/rack/null_logger.rb#44 + def log(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#33 def progname; end - # source://rack//lib/rack/null_logger.rb#31 + # source://rack//lib/rack/null_logger.rb#38 def progname=(progname); end - # source://rack//lib/rack/null_logger.rb#29 + # source://rack//lib/rack/null_logger.rb#46 + def reopen(logdev = T.unsafe(nil)); end + + # source://rack//lib/rack/null_logger.rb#36 def sev_threshold; end - # source://rack//lib/rack/null_logger.rb#34 + # source://rack//lib/rack/null_logger.rb#41 def sev_threshold=(sev_threshold); end - # source://rack//lib/rack/null_logger.rb#19 + # source://rack//lib/rack/null_logger.rb#21 def unknown(progname = T.unsafe(nil), &block); end - # source://rack//lib/rack/null_logger.rb#16 + # source://rack//lib/rack/null_logger.rb#18 def warn(progname = T.unsafe(nil), &block); end + # source://rack//lib/rack/null_logger.rb#31 + def warn!; end + # @return [Boolean] # - # source://rack//lib/rack/null_logger.rb#22 + # source://rack//lib/rack/null_logger.rb#24 def warn?; end end -# source://rack//lib/rack.rb#45 +# source://rack//lib/rack/constants.rb#34 Rack::OPTIONS = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#42 +# source://rack//lib/rack/constants.rb#31 Rack::PATCH = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#21 +# source://rack//lib/rack/constants.rb#8 Rack::PATH_INFO = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#40 +# source://rack//lib/rack/constants.rb#29 Rack::POST = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#41 +# source://rack//lib/rack/constants.rb#30 Rack::PUT = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#25 +# source://rack//lib/rack/constants.rb#12 Rack::QUERY_STRING = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/query_parser.rb#4 +# source://rack//lib/rack/query_parser.rb#6 class Rack::QueryParser # @return [QueryParser] a new instance of QueryParser # - # source://rack//lib/rack/query_parser.rb#29 - def initialize(params_class, key_space_limit, param_depth_limit); end + # source://rack//lib/rack/query_parser.rb#33 + def initialize(params_class, _key_space_limit = T.unsafe(nil), param_depth_limit); end - # Returns the value of attribute key_space_limit. - # - # source://rack//lib/rack/query_parser.rb#27 - def key_space_limit; end - - # source://rack//lib/rack/query_parser.rb#128 + # source://rack//lib/rack/query_parser.rb#167 def make_params; end - # source://rack//lib/rack/query_parser.rb#136 + # source://rack//lib/rack/query_parser.rb#171 def new_depth_limit(param_depth_limit); end - # source://rack//lib/rack/query_parser.rb#132 - def new_space_limit(key_space_limit); end - # normalize_params recursively expands parameters into structural types. If # the structural types represented by two different parameter names are in - # conflict, a ParameterTypeError is raised. - # - # @raise [ParamsTooDeepError] + # conflict, a ParameterTypeError is raised. The depth argument is deprecated + # and should no longer be used, it is kept for backwards compatibility with + # earlier versions of rack. # - # source://rack//lib/rack/query_parser.rb#87 - def normalize_params(params, name, v, depth); end + # source://rack//lib/rack/query_parser.rb#95 + def normalize_params(params, name, v, _depth = T.unsafe(nil)); end # Returns the value of attribute param_depth_limit. # - # source://rack//lib/rack/query_parser.rb#27 + # source://rack//lib/rack/query_parser.rb#31 def param_depth_limit; end # parse_nested_query expands a query string into structural types. Supported @@ -2688,36 +2845,40 @@ class Rack::QueryParser # ParameterTypeError is raised. Users are encouraged to return a 400 in this # case. # - # source://rack//lib/rack/query_parser.rb#68 - def parse_nested_query(qs, d = T.unsafe(nil)); end + # source://rack//lib/rack/query_parser.rb#74 + def parse_nested_query(qs, separator = T.unsafe(nil)); end # Stolen from Mongrel, with some small modifications: - # Parses a query string by breaking it up at the '&' - # and ';' characters. You can also use this to parse - # cookies by changing the characters used in the second - # parameter (which defaults to '&;'). + # Parses a query string by breaking it up at the '&'. You can also use this + # to parse cookies by changing the characters used in the second parameter + # (which defaults to '&'). # - # source://rack//lib/rack/query_parser.rb#40 - def parse_query(qs, d = T.unsafe(nil), &unescaper); end + # source://rack//lib/rack/query_parser.rb#46 + def parse_query(qs, separator = T.unsafe(nil), &unescaper); end private + # @raise [ParamsTooDeepError] + # + # source://rack//lib/rack/query_parser.rb#99 + def _normalize_params(params, name, v, depth); end + # @return [Boolean] # - # source://rack//lib/rack/query_parser.rb#146 + # source://rack//lib/rack/query_parser.rb#181 def params_hash_has_key?(hash, key); end # @return [Boolean] # - # source://rack//lib/rack/query_parser.rb#142 + # source://rack//lib/rack/query_parser.rb#177 def params_hash_type?(obj); end - # source://rack//lib/rack/query_parser.rb#158 - def unescape(s); end + # source://rack//lib/rack/query_parser.rb#193 + def unescape(string, encoding = T.unsafe(nil)); end class << self # source://rack//lib/rack/query_parser.rb#23 - def make_default(key_space_limit, param_depth_limit); end + def make_default(_key_space_limit = T.unsafe(nil), param_depth_limit); end end end @@ -2740,24 +2901,22 @@ class Rack::QueryParser::InvalidParameterError < ::ArgumentError; end # source://rack//lib/rack/query_parser.rb#12 class Rack::QueryParser::ParameterTypeError < ::TypeError; end -# source://rack//lib/rack/query_parser.rb#162 +# source://rack//lib/rack/query_parser.rb#197 class Rack::QueryParser::Params # @return [Params] a new instance of Params # - # source://rack//lib/rack/query_parser.rb#163 - def initialize(limit); end + # source://rack//lib/rack/query_parser.rb#198 + def initialize; end - # source://rack//lib/rack/query_parser.rb#169 + # source://rack//lib/rack/query_parser.rb#203 def [](key); end - # @raise [ParamsTooDeepError] - # - # source://rack//lib/rack/query_parser.rb#173 + # source://rack//lib/rack/query_parser.rb#207 def []=(key, value); end # @return [Boolean] # - # source://rack//lib/rack/query_parser.rb#179 + # source://rack//lib/rack/query_parser.rb#211 def key?(key); end # Recursively unwraps nested `Params` objects and constructs an object @@ -2778,7 +2937,7 @@ class Rack::QueryParser::Params # getting the hash representation while another thread is adding a # key to it is non-deterministic. # - # source://rack//lib/rack/query_parser.rb#201 + # source://rack//lib/rack/query_parser.rb#233 def to_h; end # Recursively unwraps nested `Params` objects and constructs an object @@ -2799,7 +2958,7 @@ class Rack::QueryParser::Params # getting the hash representation while another thread is adding a # key to it is non-deterministic. # - # source://rack//lib/rack/query_parser.rb#201 + # source://rack//lib/rack/query_parser.rb#233 def to_params_hash; end end @@ -2809,96 +2968,87 @@ end # source://rack//lib/rack/query_parser.rb#21 class Rack::QueryParser::ParamsTooDeepError < ::RangeError; end -# source://rack//lib/rack.rb#53 +# source://rack//lib/rack/constants.rb#42 Rack::RACK_ERRORS = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#63 +# source://rack//lib/rack/constants.rb#49 Rack::RACK_HIJACK = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#65 -Rack::RACK_HIJACK_IO = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#55 +# source://rack//lib/rack/constants.rb#44 Rack::RACK_INPUT = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#64 +# source://rack//lib/rack/constants.rb#50 Rack::RACK_IS_HIJACK = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#54 +# source://rack//lib/rack/constants.rb#43 Rack::RACK_LOGGER = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#76 +# source://rack//lib/rack/constants.rb#63 Rack::RACK_METHODOVERRIDE_ORIGINAL_METHOD = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#67 +# source://rack//lib/rack/constants.rb#52 Rack::RACK_MULTIPART_BUFFER_SIZE = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#68 +# source://rack//lib/rack/constants.rb#53 Rack::RACK_MULTIPART_TEMPFILE_FACTORY = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#60 -Rack::RACK_MULTIPROCESS = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#59 -Rack::RACK_MULTITHREAD = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#66 +# source://rack//lib/rack/constants.rb#51 Rack::RACK_RECURSIVE_INCLUDE = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#72 +# source://rack//lib/rack/constants.rb#59 Rack::RACK_REQUEST_COOKIE_HASH = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#73 +# source://rack//lib/rack/constants.rb#60 Rack::RACK_REQUEST_COOKIE_STRING = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#70 +# source://rack//lib/rack/constants.rb#58 +Rack::RACK_REQUEST_FORM_ERROR = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#56 Rack::RACK_REQUEST_FORM_HASH = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#69 +# source://rack//lib/rack/constants.rb#55 Rack::RACK_REQUEST_FORM_INPUT = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#71 +# source://rack//lib/rack/constants.rb#57 Rack::RACK_REQUEST_FORM_VARS = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#74 +# source://rack//lib/rack/constants.rb#61 Rack::RACK_REQUEST_QUERY_HASH = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#75 +# source://rack//lib/rack/constants.rb#62 Rack::RACK_REQUEST_QUERY_STRING = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#61 -Rack::RACK_RUNONCE = T.let(T.unsafe(nil), String) +# source://rack//lib/rack/constants.rb#54 +Rack::RACK_RESPONSE_FINISHED = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#56 +# source://rack//lib/rack/constants.rb#45 Rack::RACK_SESSION = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#57 +# source://rack//lib/rack/constants.rb#46 Rack::RACK_SESSION_OPTIONS = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#77 -Rack::RACK_SESSION_UNPACKED_COOKIE_DATA = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#58 +# source://rack//lib/rack/constants.rb#47 Rack::RACK_SHOWSTATUS_DETAIL = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#52 +# source://rack//lib/rack/constants.rb#41 Rack::RACK_TEMPFILES = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#62 +# source://rack//lib/rack/constants.rb#48 Rack::RACK_URL_SCHEME = T.let(T.unsafe(nil), String) # Rack environment variables # -# source://rack//lib/rack.rb#51 +# source://rack//lib/rack/constants.rb#40 Rack::RACK_VERSION = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/version.rb#23 +# source://rack//lib/rack/version.rb#28 Rack::RELEASE = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#22 +# source://rack//lib/rack/constants.rb#9 Rack::REQUEST_METHOD = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#23 +# source://rack//lib/rack/constants.rb#10 Rack::REQUEST_PATH = T.let(T.unsafe(nil), String) # Rack::Recursive allows applications called down the chain to @@ -2906,20 +3056,20 @@ Rack::REQUEST_PATH = T.let(T.unsafe(nil), String) # rack['rack.recursive.include'][...] or raise a # ForwardRequest to redirect internally. # -# source://rack//lib/rack/recursive.rb#34 +# source://rack//lib/rack/recursive.rb#36 class Rack::Recursive # @return [Recursive] a new instance of Recursive # - # source://rack//lib/rack/recursive.rb#35 + # source://rack//lib/rack/recursive.rb#37 def initialize(app); end - # source://rack//lib/rack/recursive.rb#43 + # source://rack//lib/rack/recursive.rb#45 def _call(env); end - # source://rack//lib/rack/recursive.rb#39 + # source://rack//lib/rack/recursive.rb#41 def call(env); end - # source://rack//lib/rack/recursive.rb#50 + # source://rack//lib/rack/recursive.rb#52 def include(env, path); end end @@ -2941,34 +3091,34 @@ end class Rack::Reloader # @return [Reloader] a new instance of Reloader # - # source://rack//lib/rack/reloader.rb#27 + # source://rack//lib/rack/reloader.rb#25 def initialize(app, cooldown = T.unsafe(nil), backend = T.unsafe(nil)); end - # source://rack//lib/rack/reloader.rb#38 + # source://rack//lib/rack/reloader.rb#36 def call(env); end - # source://rack//lib/rack/reloader.rb#52 + # source://rack//lib/rack/reloader.rb#50 def reload!(stderr = T.unsafe(nil)); end # A safe Kernel::load, issuing the hooks depending on the results # - # source://rack//lib/rack/reloader.rb#60 + # source://rack//lib/rack/reloader.rb#58 def safe_load(file, mtime, stderr = T.unsafe(nil)); end end -# source://rack//lib/rack/reloader.rb#70 +# source://rack//lib/rack/reloader.rb#68 module Rack::Reloader::Stat # Takes a relative or absolute +file+ name, a couple possible +paths+ that # the +file+ might reside in. Returns the full path and File::Stat for the # path. # - # source://rack//lib/rack/reloader.rb#90 + # source://rack//lib/rack/reloader.rb#88 def figure_path(file, paths); end - # source://rack//lib/rack/reloader.rb#71 + # source://rack//lib/rack/reloader.rb#69 def rotation; end - # source://rack//lib/rack/reloader.rb#105 + # source://rack//lib/rack/reloader.rb#103 def safe_stat(file); end end @@ -2980,26 +3130,26 @@ end # req.post? # req.params["data"] # -# source://rack//lib/rack/request.rb#12 +# source://rack//lib/rack/request.rb#16 class Rack::Request include ::Rack::Request::Env include ::Rack::Request::Helpers # @return [Request] a new instance of Request # - # source://rack//lib/rack/request.rb#26 + # source://rack//lib/rack/request.rb#62 def initialize(env); end - # source://rack//lib/rack/request.rb#40 + # source://rack//lib/rack/request.rb#76 def delete_param(k); end - # source://rack//lib/rack/request.rb#31 + # source://rack//lib/rack/request.rb#67 def params; end - # source://rack//lib/rack/request.rb#31 + # source://rack//lib/rack/request.rb#67 def query; end - # source://rack//lib/rack/request.rb#35 + # source://rack//lib/rack/request.rb#71 def update_param(k, v); end # source://yard/0.9.28/lib/yard/server/rack_adapter.rb#86 @@ -3012,26 +3162,78 @@ class Rack::Request def xhr?; end class << self + # The priority when checking forwarded headers. The default + # is [:forwarded, :x_forwarded], which means, check the + # +Forwarded+ header first, followed by the appropriate + # X-Forwarded-* header. You can revert the priority by + # reversing the priority, or remove checking of either + # or both headers by removing elements from the array. + # + # This should be set as appropriate in your environment + # based on what reverse proxies are in use. If you are not + # using reverse proxies, you should probably use an empty + # array. + # + # source://rack//lib/rack/request.rb#31 + def forwarded_priority; end + + # The priority when checking forwarded headers. The default + # is [:forwarded, :x_forwarded], which means, check the + # +Forwarded+ header first, followed by the appropriate + # X-Forwarded-* header. You can revert the priority by + # reversing the priority, or remove checking of either + # or both headers by removing elements from the array. + # + # This should be set as appropriate in your environment + # based on what reverse proxies are in use. If you are not + # using reverse proxies, you should probably use an empty + # array. + # + # source://rack//lib/rack/request.rb#31 + def forwarded_priority=(_arg0); end + # Returns the value of attribute ip_filter. # - # source://rack//lib/rack/request.rb#16 + # source://rack//lib/rack/request.rb#18 def ip_filter; end # Sets the attribute ip_filter # # @param value the value to set the attribute ip_filter to. # - # source://rack//lib/rack/request.rb#16 + # source://rack//lib/rack/request.rb#18 def ip_filter=(_arg0); end + + # The priority when checking either the X-Forwarded-Proto + # or X-Forwarded-Scheme header for the forwarded protocol. + # The default is [:proto, :scheme], to try the + # X-Forwarded-Proto header before the + # X-Forwarded-Scheme header. Rack 2 had behavior + # similar to [:scheme, :proto]. You can remove either or + # both of the entries in array to ignore that respective header. + # + # source://rack//lib/rack/request.rb#40 + def x_forwarded_proto_priority; end + + # The priority when checking either the X-Forwarded-Proto + # or X-Forwarded-Scheme header for the forwarded protocol. + # The default is [:proto, :scheme], to try the + # X-Forwarded-Proto header before the + # X-Forwarded-Scheme header. Rack 2 had behavior + # similar to [:scheme, :proto]. You can remove either or + # both of the entries in array to ignore that respective header. + # + # source://rack//lib/rack/request.rb#40 + def x_forwarded_proto_priority=(_arg0); end end end -# source://rack//lib/rack/request.rb#20 +# source://rack//lib/rack/request.rb#60 Rack::Request::ALLOWED_SCHEMES = T.let(T.unsafe(nil), Array) -# source://rack//lib/rack/request.rb#46 +# source://rack//lib/rack/request.rb#82 module Rack::Request::Env - # source://rack//lib/rack/request.rb#50 + # source://rack//lib/rack/request.rb#86 def initialize(env); end # Add a header that may have multiple values. @@ -3044,33 +3246,33 @@ module Rack::Request::Env # # http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 # - # source://rack//lib/rack/request.rb#91 + # source://rack//lib/rack/request.rb#129 def add_header(key, v); end # Delete a request specific value for `name`. # - # source://rack//lib/rack/request.rb#102 + # source://rack//lib/rack/request.rb#140 def delete_header(name); end # Loops through each key / value pair in the request specific data. # - # source://rack//lib/rack/request.rb#73 + # source://rack//lib/rack/request.rb#111 def each_header(&block); end # The environment of the request. # - # source://rack//lib/rack/request.rb#48 + # source://rack//lib/rack/request.rb#84 def env; end # If a block is given, it yields to the block if the value hasn't been set # on the request. # - # source://rack//lib/rack/request.rb#68 + # source://rack//lib/rack/request.rb#106 def fetch_header(name, &block); end # Get a request specific value for `name`. # - # source://rack//lib/rack/request.rb#62 + # source://rack//lib/rack/request.rb#100 def get_header(name); end # Predicate method to test to see if `name` has been set as request @@ -3078,25 +3280,25 @@ module Rack::Request::Env # # @return [Boolean] # - # source://rack//lib/rack/request.rb#57 + # source://rack//lib/rack/request.rb#95 def has_header?(name); end # Set a request specific value for `name` to `v` # - # source://rack//lib/rack/request.rb#78 + # source://rack//lib/rack/request.rb#116 def set_header(name, v); end private - # source://rack//lib/rack/request.rb#106 + # source://rack//lib/rack/request.rb#144 def initialize_copy(other); end end -# source://rack//lib/rack/request.rb#111 +# source://rack//lib/rack/request.rb#149 module Rack::Request::Helpers # Returns the data received in the query string. # - # source://rack//lib/rack/request.rb#426 + # source://rack//lib/rack/request.rb#484 def GET; end # Returns the data received in the request body. @@ -3104,25 +3306,25 @@ module Rack::Request::Helpers # This method support both application/x-www-form-urlencoded and # multipart/form-data. # - # source://rack//lib/rack/request.rb#440 + # source://rack//lib/rack/request.rb#498 def POST; end # shortcut for request.params[key] # - # source://rack//lib/rack/request.rb#532 + # source://rack//lib/rack/request.rb#609 def [](key); end # shortcut for request.params[key] = value # # Note that modifications will not be persisted in the env. Use update_param or delete_param if you want to destructively modify params. # - # source://rack//lib/rack/request.rb#543 + # source://rack//lib/rack/request.rb#618 def []=(key, value); end - # source://rack//lib/rack/request.rb#519 + # source://rack//lib/rack/request.rb#596 def accept_encoding; end - # source://rack//lib/rack/request.rb#523 + # source://rack//lib/rack/request.rb#600 def accept_language; end # The authority of the incoming request as defined by RFC3976. @@ -3131,13 +3333,13 @@ module Rack::Request::Helpers # In HTTP/1, this is the `host` header. # In HTTP/2, this is the `:authority` pseudo-header. # - # source://rack//lib/rack/request.rb#227 + # source://rack//lib/rack/request.rb#266 def authority; end - # source://rack//lib/rack/request.rb#502 + # source://rack//lib/rack/request.rb#579 def base_url; end - # source://rack//lib/rack/request.rb#150 + # source://rack//lib/rack/request.rb#190 def body; end # The character set of the request body if a "charset" media type @@ -3145,23 +3347,23 @@ module Rack::Request::Helpers # that, per RFC2616, text/* media types that specify no explicit # charset are to be considered ISO-8859-1. # - # source://rack//lib/rack/request.rb#400 + # source://rack//lib/rack/request.rb#458 def content_charset; end - # source://rack//lib/rack/request.rb#159 + # source://rack//lib/rack/request.rb#199 def content_length; end - # source://rack//lib/rack/request.rb#271 + # source://rack//lib/rack/request.rb#308 def content_type; end - # source://rack//lib/rack/request.rb#256 + # source://rack//lib/rack/request.rb#293 def cookies; end # Checks the HTTP request method (or verb) to see if it was of type DELETE # # @return [Boolean] # - # source://rack//lib/rack/request.rb#181 + # source://rack//lib/rack/request.rb#220 def delete?; end # Destructively delete a parameter, whether it's in GET or POST. Returns the value of the deleted parameter. @@ -3170,60 +3372,60 @@ module Rack::Request::Helpers # # env['rack.input'] is not touched. # - # source://rack//lib/rack/request.rb#497 + # source://rack//lib/rack/request.rb#574 def delete_param(k); end # Determine whether the request body contains form-data by checking - # the request Content-Type for one of the media-types: + # the request content-type for one of the media-types: # "application/x-www-form-urlencoded" or "multipart/form-data". The # list of form-data media types can be modified through the # +FORM_DATA_MEDIA_TYPES+ array. # # A request body is also assumed to contain form-data when no - # Content-Type header is provided and the request_method is POST. + # content-type header is provided and the request_method is POST. # # @return [Boolean] # - # source://rack//lib/rack/request.rb#412 + # source://rack//lib/rack/request.rb#470 def form_data?; end - # source://rack//lib/rack/request.rb#344 + # source://rack//lib/rack/request.rb#393 def forwarded_authority; end - # source://rack//lib/rack/request.rb#330 + # source://rack//lib/rack/request.rb#353 def forwarded_for; end - # source://rack//lib/rack/request.rb#338 + # source://rack//lib/rack/request.rb#374 def forwarded_port; end - # source://rack//lib/rack/request.rb#515 + # source://rack//lib/rack/request.rb#592 def fullpath; end # Checks the HTTP request method (or verb) to see if it was of type GET # # @return [Boolean] # - # source://rack//lib/rack/request.rb#184 + # source://rack//lib/rack/request.rb#223 def get?; end # Checks the HTTP request method (or verb) to see if it was of type HEAD # # @return [Boolean] # - # source://rack//lib/rack/request.rb#187 + # source://rack//lib/rack/request.rb#226 def head?; end # Returns a formatted host, suitable for being used in a URI. # - # source://rack//lib/rack/request.rb#296 + # source://rack//lib/rack/request.rb#333 def host; end # The `HTTP_HOST` header. # - # source://rack//lib/rack/request.rb#281 + # source://rack//lib/rack/request.rb#318 def host_authority; end - # source://rack//lib/rack/request.rb#285 + # source://rack//lib/rack/request.rb#322 def host_with_port(authority = T.unsafe(nil)); end # Returns an address suitable for being to resolve to an address. @@ -3231,20 +3433,20 @@ module Rack::Request::Helpers # as +host+. In the case of IPv6 or future address formats, the square # brackets are removed. # - # source://rack//lib/rack/request.rb#304 + # source://rack//lib/rack/request.rb#341 def hostname; end - # source://rack//lib/rack/request.rb#354 + # source://rack//lib/rack/request.rb#414 def ip; end # Checks the HTTP request method (or verb) to see if it was of type LINK # # @return [Boolean] # - # source://rack//lib/rack/request.rb#193 + # source://rack//lib/rack/request.rb#232 def link?; end - # source://rack//lib/rack/request.rb#160 + # source://rack//lib/rack/request.rb#200 def logger; end # The media type (type/subtype) portion of the CONTENT_TYPE header @@ -3254,7 +3456,7 @@ module Rack::Request::Helpers # For more information on the use of media types in HTTP, see: # http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 # - # source://rack//lib/rack/request.rb#383 + # source://rack//lib/rack/request.rb#441 def media_type; end # The media type parameters provided in CONTENT_TYPE as a Hash, or @@ -3263,26 +3465,21 @@ module Rack::Request::Helpers # this method responds with the following Hash: # { 'charset' => 'utf-8' } # - # source://rack//lib/rack/request.rb#392 + # source://rack//lib/rack/request.rb#450 def media_type_params; end - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#162 - def multithread?; end - # Checks the HTTP request method (or verb) to see if it was of type OPTIONS # # @return [Boolean] # - # source://rack//lib/rack/request.rb#190 + # source://rack//lib/rack/request.rb#229 def options?; end # The union of GET and POST data. # # Note that modifications will not be persisted in the env. Use update_param or delete_param if you want to destructively modify params. # - # source://rack//lib/rack/request.rb#468 + # source://rack//lib/rack/request.rb#545 def params; end # Determine whether the request body contains data by checking @@ -3290,107 +3487,107 @@ module Rack::Request::Helpers # # @return [Boolean] # - # source://rack//lib/rack/request.rb#421 + # source://rack//lib/rack/request.rb#479 def parseable_data?; end # Checks the HTTP request method (or verb) to see if it was of type PATCH # # @return [Boolean] # - # source://rack//lib/rack/request.rb#196 + # source://rack//lib/rack/request.rb#235 def patch?; end - # source://rack//lib/rack/request.rb#511 + # source://rack//lib/rack/request.rb#588 def path; end - # source://rack//lib/rack/request.rb#154 + # source://rack//lib/rack/request.rb#194 def path_info; end - # source://rack//lib/rack/request.rb#155 + # source://rack//lib/rack/request.rb#195 def path_info=(s); end - # source://rack//lib/rack/request.rb#308 + # source://rack//lib/rack/request.rb#345 def port; end # Checks the HTTP request method (or verb) to see if it was of type POST # # @return [Boolean] # - # source://rack//lib/rack/request.rb#199 + # source://rack//lib/rack/request.rb#238 def post?; end # Checks the HTTP request method (or verb) to see if it was of type PUT # # @return [Boolean] # - # source://rack//lib/rack/request.rb#202 + # source://rack//lib/rack/request.rb#241 def put?; end - # source://rack//lib/rack/request.rb#158 + # source://rack//lib/rack/request.rb#198 def query_string; end # the referer of the client # - # source://rack//lib/rack/request.rb#165 + # source://rack//lib/rack/request.rb#204 def referer; end # the referer of the client # - # source://rack//lib/rack/request.rb#165 + # source://rack//lib/rack/request.rb#204 def referrer; end - # source://rack//lib/rack/request.rb#157 + # source://rack//lib/rack/request.rb#197 def request_method; end - # source://rack//lib/rack/request.rb#210 + # source://rack//lib/rack/request.rb#249 def scheme; end - # source://rack//lib/rack/request.rb#151 + # source://rack//lib/rack/request.rb#191 def script_name; end - # source://rack//lib/rack/request.rb#152 + # source://rack//lib/rack/request.rb#192 def script_name=(s); end # The authority as defined by the `SERVER_NAME` and `SERVER_PORT` # variables. # - # source://rack//lib/rack/request.rb#233 + # source://rack//lib/rack/request.rb#272 def server_authority; end - # source://rack//lib/rack/request.rb#246 + # source://rack//lib/rack/request.rb#285 def server_name; end - # source://rack//lib/rack/request.rb#250 + # source://rack//lib/rack/request.rb#289 def server_port; end - # source://rack//lib/rack/request.rb#168 + # source://rack//lib/rack/request.rb#207 def session; end - # source://rack//lib/rack/request.rb#174 + # source://rack//lib/rack/request.rb#213 def session_options; end # @return [Boolean] # - # source://rack//lib/rack/request.rb#350 + # source://rack//lib/rack/request.rb#410 def ssl?; end # Checks the HTTP request method (or verb) to see if it was of type TRACE # # @return [Boolean] # - # source://rack//lib/rack/request.rb#205 + # source://rack//lib/rack/request.rb#244 def trace?; end # @return [Boolean] # - # source://rack//lib/rack/request.rb#527 + # source://rack//lib/rack/request.rb#604 def trusted_proxy?(ip); end # Checks the HTTP request method (or verb) to see if it was of type UNLINK # # @return [Boolean] # - # source://rack//lib/rack/request.rb#208 + # source://rack//lib/rack/request.rb#247 def unlink?; end # Destructively update a parameter, whether it's in GET and/or POST. Returns nil. @@ -3399,124 +3596,135 @@ module Rack::Request::Helpers # # env['rack.input'] is not touched. # - # source://rack//lib/rack/request.rb#477 + # source://rack//lib/rack/request.rb#554 def update_param(k, v); end # Tries to return a remake of the original request URL as a string. # - # source://rack//lib/rack/request.rb#507 + # source://rack//lib/rack/request.rb#584 def url; end - # source://rack//lib/rack/request.rb#161 + # source://rack//lib/rack/request.rb#201 def user_agent; end # like Hash#values_at # - # source://rack//lib/rack/request.rb#552 + # source://rack//lib/rack/request.rb#625 def values_at(*keys); end # @return [Boolean] # - # source://rack//lib/rack/request.rb#276 + # source://rack//lib/rack/request.rb#313 def xhr?; end private - # source://rack//lib/rack/request.rb#641 + # source://rack//lib/rack/request.rb#757 def allowed_scheme(header); end - # source://rack//lib/rack/request.rb#558 + # source://rack//lib/rack/request.rb#631 def default_session; end - # source://rack//lib/rack/request.rb#645 - def extract_proto_header(header); end + # source://rack//lib/rack/request.rb#761 + def forwarded_priority; end - # source://rack//lib/rack/request.rb#636 + # source://rack//lib/rack/request.rb#733 def forwarded_scheme; end - # source://rack//lib/rack/request.rb#574 + # Get an array of values set in the RFC 7239 `Forwarded` request header. + # + # source://rack//lib/rack/request.rb#659 + def get_http_forwarded(token); end + + # source://rack//lib/rack/request.rb#647 def parse_http_accept_header(header); end - # source://rack//lib/rack/request.rb#593 + # source://rack//lib/rack/request.rb#671 def parse_multipart; end - # source://rack//lib/rack/request.rb#589 + # source://rack//lib/rack/request.rb#667 def parse_query(qs, d = T.unsafe(nil)); end - # source://rack//lib/rack/request.rb#585 + # source://rack//lib/rack/request.rb#663 def query_parser; end - # source://rack//lib/rack/request.rb#632 + # source://rack//lib/rack/request.rb#724 def reject_trusted_ip_addresses(ip_addresses); end - # source://rack//lib/rack/request.rb#619 + # source://rack//lib/rack/request.rb#718 def split_authority(authority); end - # source://rack//lib/rack/request.rb#597 + # source://rack//lib/rack/request.rb#675 def split_header(value); end # Assist with compatibility when processing `X-Forwarded-For`. # - # source://rack//lib/rack/request.rb#561 + # source://rack//lib/rack/request.rb#634 def wrap_ipv6(host); end + + # source://rack//lib/rack/request.rb#765 + def x_forwarded_proto_priority; end end -# source://rack//lib/rack/request.rb#601 +# source://rack//lib/rack/request.rb#703 Rack::Request::Helpers::AUTHORITY = T.let(T.unsafe(nil), Regexp) # Default ports depending on scheme. Used to decide whether or not # to include the port in a generated URI. # -# source://rack//lib/rack/request.rb#130 +# source://rack//lib/rack/request.rb#168 Rack::Request::Helpers::DEFAULT_PORTS = T.let(T.unsafe(nil), Hash) # The set of form-data media-types. Requests that do not indicate # one of the media types present in this list will not be eligible # for form-data / param parsing. # -# source://rack//lib/rack/request.rb#115 +# source://rack//lib/rack/request.rb#153 Rack::Request::Helpers::FORM_DATA_MEDIA_TYPES = T.let(T.unsafe(nil), Array) +# source://rack//lib/rack/request.rb#728 +Rack::Request::Helpers::FORWARDED_SCHEME_HEADERS = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/request.rb#176 +Rack::Request::Helpers::HTTP_FORWARDED = T.let(T.unsafe(nil), String) + # The address of the client which connected to the proxy. # -# source://rack//lib/rack/request.rb#133 +# source://rack//lib/rack/request.rb#171 Rack::Request::Helpers::HTTP_X_FORWARDED_FOR = T.let(T.unsafe(nil), String) # The contents of the host/:authority header sent to the proxy. # -# source://rack//lib/rack/request.rb#136 +# source://rack//lib/rack/request.rb#174 Rack::Request::Helpers::HTTP_X_FORWARDED_HOST = T.let(T.unsafe(nil), String) # The port used to connect to the proxy. # -# source://rack//lib/rack/request.rb#145 +# source://rack//lib/rack/request.rb#185 Rack::Request::Helpers::HTTP_X_FORWARDED_PORT = T.let(T.unsafe(nil), String) # The protocol used to connect to the proxy. # -# source://rack//lib/rack/request.rb#142 +# source://rack//lib/rack/request.rb#182 Rack::Request::Helpers::HTTP_X_FORWARDED_PROTO = T.let(T.unsafe(nil), String) # The value of the scheme sent to the proxy. # -# source://rack//lib/rack/request.rb#139 +# source://rack//lib/rack/request.rb#179 Rack::Request::Helpers::HTTP_X_FORWARDED_SCHEME = T.let(T.unsafe(nil), String) -# Another way for specifing https scheme was used. +# Another way for specifying https scheme was used. # -# source://rack//lib/rack/request.rb#148 +# source://rack//lib/rack/request.rb#188 Rack::Request::Helpers::HTTP_X_FORWARDED_SSL = T.let(T.unsafe(nil), String) # The set of media-types. Requests that do not indicate # one of the media types present in this list will not be eligible # for param parsing like soap attachments or generic multiparts # -# source://rack//lib/rack/request.rb#123 +# source://rack//lib/rack/request.rb#161 Rack::Request::Helpers::PARSEABLE_DATA_MEDIA_TYPES = T.let(T.unsafe(nil), Array) -# source://rack//lib/rack/request.rb#21 -Rack::Request::SCHEME_WHITELIST = T.let(T.unsafe(nil), Array) - # Rack::Response provides a convenient interface to create a Rack # response. # @@ -3530,63 +3738,79 @@ Rack::Request::SCHEME_WHITELIST = T.let(T.unsafe(nil), Array) # # Your application's +call+ should end returning Response#finish. # -# source://rack//lib/rack/response.rb#18 +# source://rack//lib/rack/response.rb#23 class Rack::Response include ::Rack::Response::Helpers - # Initialize the response object with the specified body, status - # and headers. + # Initialize the response object with the specified +body+, +status+ + # and +headers+. + # + # If the +body+ is +nil+, construct an empty response object with internal + # buffering. # - # HTTP protocol RFCs. - # conform to the HTTP protocol RFCs. + # If the +body+ responds to +to_str+, assume it's a string-like object and + # construct a buffered response object containing using that string as the + # initial contents of the buffer. # - # Providing a body which responds to #to_str is legacy behaviour. + # Otherwise it is expected +body+ conforms to the normal requirements of a + # Rack response body, typically implementing one of +each+ (enumerable + # body) or +call+ (streaming body). + # + # The +status+ defaults to +200+ which is the "OK" HTTP status code. You + # can provide any other valid status code. + # + # The +headers+ must be a +Hash+ of key-value header pairs which conform to + # the Rack specification for response headers. The key must be a +String+ + # instance and the value can be either a +String+ or +Array+ instance. # - # @param body [nil, #each, #to_str] the response body. - # @param status [Integer] the integer status as defined by the - # @param headers [#each] a list of key-value header pairs which # @return [Response] a new instance of Response # @yield [_self] # @yieldparam _self [Rack::Response] the object that the method was called on # - # source://rack//lib/rack/response.rb#42 + # source://rack//lib/rack/response.rb#61 def initialize(body = T.unsafe(nil), status = T.unsafe(nil), headers = T.unsafe(nil)); end - # source://rack//lib/rack/response.rb#127 + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#163 def [](key); end - # source://rack//lib/rack/response.rb#128 - def []=(key, v); end + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#167 + def []=(key, value); end # Returns the value of attribute body. # - # source://rack//lib/rack/response.rb#26 + # source://rack//lib/rack/response.rb#31 def body; end # Sets the attribute body # # @param value the value to set the attribute body to. # - # source://rack//lib/rack/response.rb#26 + # source://rack//lib/rack/response.rb#31 def body=(_arg0); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#73 + # source://rack//lib/rack/response.rb#101 def chunked?; end - # source://rack//lib/rack/response.rb#118 + # source://rack//lib/rack/response.rb#151 def close; end - # source://rack//lib/rack/response.rb#129 + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#171 def delete_header(key); end - # source://rack//lib/rack/response.rb#98 + # source://rack//lib/rack/response.rb#131 def each(&callback); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#122 + # source://rack//lib/rack/response.rb#155 def empty?; end # Generate a response array consistent with the requirements of the SPEC. @@ -3594,57 +3818,65 @@ class Rack::Response # # @return [Array] a 3-tuple suitable of `[status, headers, body]` # - # source://rack//lib/rack/response.rb#80 + # source://rack//lib/rack/response.rb#113 def finish(&block); end - # source://rack//lib/rack/response.rb#127 + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#163 def get_header(key); end + # @raise [ArgumentError] # @return [Boolean] # - # source://rack//lib/rack/response.rb#126 + # source://rack//lib/rack/response.rb#159 def has_header?(key); end - # Returns the value of attribute headers. - # - # @deprecated Use {#headers} instead. + # Deprecated, use headers instead. # - # source://rack//lib/rack/response.rb#27 + # source://rack//lib/rack/response.rb#35 def header; end # Returns the value of attribute headers. # - # source://rack//lib/rack/response.rb#27 + # source://rack//lib/rack/response.rb#32 def headers; end # Returns the value of attribute length. # - # source://rack//lib/rack/response.rb#26 + # source://rack//lib/rack/response.rb#31 def length; end # Sets the attribute length # # @param value the value to set the attribute length to. # - # source://rack//lib/rack/response.rb#26 + # source://rack//lib/rack/response.rb#31 def length=(_arg0); end - # source://rack//lib/rack/response.rb#68 + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#105 + def no_entity_body?; end + + # source://rack//lib/rack/response.rb#96 def redirect(target, status = T.unsafe(nil)); end - # source://rack//lib/rack/response.rb#128 - def set_header(key, v); end + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#167 + def set_header(key, value); end # Returns the value of attribute status. # - # source://rack//lib/rack/response.rb#26 + # source://rack//lib/rack/response.rb#31 def status; end # Sets the attribute status # # @param value the value to set the attribute status to. # - # source://rack//lib/rack/response.rb#26 + # source://rack//lib/rack/response.rb#31 def status=(_arg0); end # Generate a response array consistent with the requirements of the SPEC. @@ -3653,48 +3885,50 @@ class Rack::Response # # @return [Array] a 3-tuple suitable of `[status, headers, body]` # - # source://rack//lib/rack/response.rb#80 + # source://rack//lib/rack/response.rb#113 def to_a(&block); end - # Append to body and update Content-Length. + # Append to body and update content-length. # # NOTE: Do not mix #write and direct #body access! # - # source://rack//lib/rack/response.rb#112 + # source://rack//lib/rack/response.rb#145 def write(chunk); end class << self - # source://rack//lib/rack/response.rb#19 + # source://rack//lib/rack/response.rb#24 def [](status, headers, body); end end end -# source://rack//lib/rack/response.rb#23 +# source://rack//lib/rack/response.rb#28 Rack::Response::CHUNKED = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/response.rb#134 +# source://rack//lib/rack/response.rb#179 module Rack::Response::Helpers # @return [Boolean] # - # source://rack//lib/rack/response.rb#145 + # source://rack//lib/rack/response.rb#190 def accepted?; end # Add a header that may have multiple values. # # Example: - # response.add_header 'Vary', 'Accept-Encoding' - # response.add_header 'Vary', 'Cookie' + # response.add_header 'vary', 'accept-encoding' + # response.add_header 'vary', 'cookie' # - # assert_equal 'Accept-Encoding,Cookie', response.get_header('Vary') + # assert_equal 'accept-encoding,cookie', response.get_header('vary') # # http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 # - # source://rack//lib/rack/response.rb#171 - def add_header(key, v); end + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#218 + def add_header(key, value); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#148 + # source://rack//lib/rack/response.rb#193 def bad_request?; end # Specify that the content should be cached. @@ -3703,221 +3937,227 @@ module Rack::Response::Helpers # @param duration [Integer] The number of seconds until the cache expires. # @param directive [Hash] a customizable set of options # - # source://rack//lib/rack/response.rb#246 + # source://rack//lib/rack/response.rb#306 def cache!(duration = T.unsafe(nil), directive: T.unsafe(nil)); end - # source://rack//lib/rack/response.rb#229 + # source://rack//lib/rack/response.rb#289 def cache_control; end - # source://rack//lib/rack/response.rb#233 - def cache_control=(v); end + # source://rack//lib/rack/response.rb#293 + def cache_control=(value); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#140 + # source://rack//lib/rack/response.rb#185 def client_error?; end - # source://rack//lib/rack/response.rb#199 + # source://rack//lib/rack/response.rb#256 def content_length; end # Get the content type of the response. # - # source://rack//lib/rack/response.rb#182 + # source://rack//lib/rack/response.rb#239 def content_type; end # Set the content type of the response. # - # source://rack//lib/rack/response.rb#187 + # source://rack//lib/rack/response.rb#244 def content_type=(content_type); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#144 + # source://rack//lib/rack/response.rb#189 def created?; end - # source://rack//lib/rack/response.rb#217 + # source://rack//lib/rack/response.rb#273 def delete_cookie(key, value = T.unsafe(nil)); end # Specifies that the content shouldn't be cached. Overrides `cache!` if already called. # - # source://rack//lib/rack/response.rb#238 + # source://rack//lib/rack/response.rb#298 def do_not_cache!; end - # source://rack//lib/rack/response.rb#253 + # source://rack//lib/rack/response.rb#313 def etag; end - # source://rack//lib/rack/response.rb#257 - def etag=(v); end + # source://rack//lib/rack/response.rb#317 + def etag=(value); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#150 + # source://rack//lib/rack/response.rb#195 def forbidden?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#158 + # source://rack//lib/rack/response.rb#205 def include?(header); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#137 + # source://rack//lib/rack/response.rb#182 def informational?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#135 + # source://rack//lib/rack/response.rb#180 def invalid?; end - # source://rack//lib/rack/response.rb#204 + # source://rack//lib/rack/response.rb#261 def location; end - # source://rack//lib/rack/response.rb#208 + # source://rack//lib/rack/response.rb#265 def location=(location); end - # source://rack//lib/rack/response.rb#191 + # source://rack//lib/rack/response.rb#248 def media_type; end - # source://rack//lib/rack/response.rb#195 + # source://rack//lib/rack/response.rb#252 def media_type_params; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#152 + # source://rack//lib/rack/response.rb#197 def method_not_allowed?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#147 + # source://rack//lib/rack/response.rb#192 def moved_permanently?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#146 + # source://rack//lib/rack/response.rb#191 def no_content?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#151 + # source://rack//lib/rack/response.rb#198 + def not_acceptable?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#196 def not_found?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#143 + # source://rack//lib/rack/response.rb#188 def ok?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#153 + # source://rack//lib/rack/response.rb#200 def precondition_failed?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#156 + # source://rack//lib/rack/response.rb#203 def redirect?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#139 + # source://rack//lib/rack/response.rb#184 def redirection?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#141 + # source://rack//lib/rack/response.rb#199 + def request_timeout?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#186 def server_error?; end - # source://rack//lib/rack/response.rb#212 + # source://rack//lib/rack/response.rb#269 def set_cookie(key, value); end - # source://rack//lib/rack/response.rb#221 + # source://rack//lib/rack/response.rb#281 def set_cookie_header; end - # source://rack//lib/rack/response.rb#225 - def set_cookie_header=(v); end + # source://rack//lib/rack/response.rb#285 + def set_cookie_header=(value); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#138 + # source://rack//lib/rack/response.rb#183 def successful?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#149 + # source://rack//lib/rack/response.rb#194 def unauthorized?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#154 + # source://rack//lib/rack/response.rb#201 def unprocessable?; end protected - # source://rack//lib/rack/response.rb#287 + # source://rack//lib/rack/response.rb#353 def append(chunk); end - # source://rack//lib/rack/response.rb#263 + # source://rack//lib/rack/response.rb#323 def buffered_body!; end end -# source://rack//lib/rack/response.rb#301 +# source://rack//lib/rack/response.rb#367 class Rack::Response::Raw include ::Rack::Response::Helpers # @return [Raw] a new instance of Raw # - # source://rack//lib/rack/response.rb#307 + # source://rack//lib/rack/response.rb#373 def initialize(status, headers); end - # source://rack//lib/rack/response.rb#315 + # source://rack//lib/rack/response.rb#390 def delete_header(key); end - # source://rack//lib/rack/response.rb#313 + # source://rack//lib/rack/response.rb#382 def get_header(key); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#312 + # source://rack//lib/rack/response.rb#378 def has_header?(key); end # Returns the value of attribute headers. # - # source://rack//lib/rack/response.rb#304 + # source://rack//lib/rack/response.rb#370 def headers; end - # source://rack//lib/rack/response.rb#314 - def set_header(key, v); end + # source://rack//lib/rack/response.rb#386 + def set_header(key, value); end # Returns the value of attribute status. # - # source://rack//lib/rack/response.rb#305 + # source://rack//lib/rack/response.rb#371 def status; end # Sets the attribute status # # @param value the value to set the attribute status to. # - # source://rack//lib/rack/response.rb#305 + # source://rack//lib/rack/response.rb#371 def status=(_arg0); end end -# source://rack//lib/rack/response.rb#24 +# source://rack//lib/rack/response.rb#29 Rack::Response::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) # Class which can make any IO object rewindable, including non-rewindable ones. It does # this by buffering the data into a tempfile, which is rewindable. # -# rack.input is required to be rewindable, so if your input stream IO is non-rewindable -# by nature (e.g. a pipe or a socket) then you can wrap it in an object of this class -# to easily make it rewindable. -# # Don't forget to call #close when you're done. This frees up temporary resources that # RewindableInput uses, though it does *not* close the original IO object. # -# source://rack//lib/rack/rewindable_input.rb#16 +# source://rack//lib/rack/rewindable_input.rb#14 class Rack::RewindableInput # @return [RewindableInput] a new instance of RewindableInput # - # source://rack//lib/rack/rewindable_input.rb#17 + # source://rack//lib/rack/rewindable_input.rb#29 def initialize(io); end # Closes this RewindableInput object without closing the originally @@ -3926,96 +4166,114 @@ class Rack::RewindableInput # # This method may be called multiple times. It does nothing on subsequent calls. # - # source://rack//lib/rack/rewindable_input.rb#48 + # source://rack//lib/rack/rewindable_input.rb#65 def close; end - # source://rack//lib/rack/rewindable_input.rb#33 + # source://rack//lib/rack/rewindable_input.rb#45 def each(&block); end - # source://rack//lib/rack/rewindable_input.rb#23 + # source://rack//lib/rack/rewindable_input.rb#35 def gets; end - # source://rack//lib/rack/rewindable_input.rb#28 + # source://rack//lib/rack/rewindable_input.rb#40 def read(*args); end - # source://rack//lib/rack/rewindable_input.rb#38 + # source://rack//lib/rack/rewindable_input.rb#50 def rewind; end + # source://rack//lib/rack/rewindable_input.rb#55 + def size; end + private # @return [Boolean] # - # source://rack//lib/rack/rewindable_input.rb#90 + # source://rack//lib/rack/rewindable_input.rb#109 def filesystem_has_posix_semantics?; end - # source://rack//lib/rack/rewindable_input.rb#61 + # source://rack//lib/rack/rewindable_input.rb#78 def make_rewindable; end end -# Sets an "X-Runtime" response header, indicating the response +# Makes rack.input rewindable, for compatibility with applications and middleware +# designed for earlier versions of Rack (where rack.input was required to be +# rewindable). +# +# source://rack//lib/rack/rewindable_input.rb#18 +class Rack::RewindableInput::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://rack//lib/rack/rewindable_input.rb#19 + def initialize(app); end + + # source://rack//lib/rack/rewindable_input.rb#23 + def call(env); end +end + +# Sets an "x-runtime" response header, indicating the response # time of the request, in seconds # # You can put it right before the application to see the processing # time, or before all the other middlewares to include time for them, # too. # -# source://rack//lib/rack/runtime.rb#10 +# source://rack//lib/rack/runtime.rb#12 class Rack::Runtime # @return [Runtime] a new instance of Runtime # - # source://rack//lib/rack/runtime.rb#14 + # source://rack//lib/rack/runtime.rb#16 def initialize(app, name = T.unsafe(nil)); end - # source://rack//lib/rack/runtime.rb#20 + # source://rack//lib/rack/runtime.rb#22 def call(env); end end -# source://rack//lib/rack/runtime.rb#11 +# source://rack//lib/rack/runtime.rb#13 Rack::Runtime::FORMAT_STRING = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/runtime.rb#12 +# source://rack//lib/rack/runtime.rb#14 Rack::Runtime::HEADER_NAME = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#24 +# source://rack//lib/rack/constants.rb#11 Rack::SCRIPT_NAME = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#27 +# source://rack//lib/rack/constants.rb#14 Rack::SERVER_NAME = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#28 +# source://rack//lib/rack/constants.rb#15 Rack::SERVER_PORT = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#26 +# source://rack//lib/rack/constants.rb#13 Rack::SERVER_PROTOCOL = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#33 +# source://rack//lib/rack/constants.rb#24 Rack::SET_COOKIE = T.let(T.unsafe(nil), String) # = Sendfile # # The Sendfile middleware intercepts responses whose body is being -# served from a file and replaces it with a server specific X-Sendfile +# served from a file and replaces it with a server specific x-sendfile # header. The web server is then responsible for writing the file contents # to the client. This can dramatically reduce the amount of work required # by the Ruby backend and takes advantage of the web server's optimized file # delivery code. # # In order to take advantage of this middleware, the response body must -# respond to +to_path+ and the request must include an X-Sendfile-Type +# respond to +to_path+ and the request must include an x-sendfile-type # header. Rack::Files and other components implement +to_path+ so there's -# rarely anything you need to do in your application. The X-Sendfile-Type +# rarely anything you need to do in your application. The x-sendfile-type # header is typically set in your web servers configuration. The following # sections attempt to document # # === Nginx # -# Nginx supports the X-Accel-Redirect header. This is similar to X-Sendfile +# Nginx supports the x-accel-redirect header. This is similar to x-sendfile # but requires parts of the filesystem to be mapped into a private URL # hierarchy. # # The following example shows the Nginx configuration required to create -# a private "/files/" area, enable X-Accel-Redirect, and pass the special -# X-Sendfile-Type and X-Accel-Mapping headers to the backend: +# a private "/files/" area, enable x-accel-redirect, and pass the special +# x-sendfile-type and x-accel-mapping headers to the backend: # # location ~ /files/(.*) { # internal; @@ -4029,14 +4287,14 @@ Rack::SET_COOKIE = T.let(T.unsafe(nil), String) # proxy_set_header X-Real-IP $remote_addr; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # -# proxy_set_header X-Sendfile-Type X-Accel-Redirect; -# proxy_set_header X-Accel-Mapping /var/www/=/files/; +# proxy_set_header x-sendfile-type x-accel-redirect; +# proxy_set_header x-accel-mapping /var/www/=/files/; # # proxy_pass http://127.0.0.1:8080/; # } # -# Note that the X-Sendfile-Type header must be set exactly as shown above. -# The X-Accel-Mapping header should specify the location on the file system, +# Note that the x-sendfile-type header must be set exactly as shown above. +# The x-accel-mapping header should specify the location on the file system, # followed by an equals sign (=), followed name of the private URL pattern # that it maps to. The middleware performs a simple substitution on the # resulting path. @@ -4045,8 +4303,8 @@ Rack::SET_COOKIE = T.let(T.unsafe(nil), String) # # === lighttpd # -# Lighttpd has supported some variation of the X-Sendfile header for some -# time, although only recent version support X-Sendfile in a reverse proxy +# Lighttpd has supported some variation of the x-sendfile header for some +# time, although only recent version support x-sendfile in a reverse proxy # configuration. # # $HTTP["host"] == "example.com" { @@ -4060,7 +4318,7 @@ Rack::SET_COOKIE = T.let(T.unsafe(nil), String) # # proxy-core.allow-x-sendfile = "enable" # proxy-core.rewrite-request = ( -# "X-Sendfile-Type" => (".*" => "X-Sendfile") +# "x-sendfile-type" => (".*" => "x-sendfile") # ) # } # @@ -4068,882 +4326,115 @@ Rack::SET_COOKIE = T.let(T.unsafe(nil), String) # # === Apache # -# X-Sendfile is supported under Apache 2.x using a separate module: +# x-sendfile is supported under Apache 2.x using a separate module: # # https://tn123.org/mod_xsendfile/ # # Once the module is compiled and installed, you can enable it using # XSendFile config directive: # -# RequestHeader Set X-Sendfile-Type X-Sendfile +# RequestHeader Set x-sendfile-type x-sendfile # ProxyPassReverse / http://localhost:8001/ # XSendFile on # # === Mapping parameter # # The third parameter allows for an overriding extension of the -# X-Accel-Mapping header. Mappings should be provided in tuples of internal to +# x-accel-mapping header. Mappings should be provided in tuples of internal to # external. The internal values may contain regular expression syntax, they # will be matched with case indifference. # -# source://rack//lib/rack/sendfile.rb#100 +# source://rack//lib/rack/sendfile.rb#104 class Rack::Sendfile # @return [Sendfile] a new instance of Sendfile # - # source://rack//lib/rack/sendfile.rb#101 + # source://rack//lib/rack/sendfile.rb#105 def initialize(app, variation = T.unsafe(nil), mappings = T.unsafe(nil)); end - # source://rack//lib/rack/sendfile.rb#109 + # source://rack//lib/rack/sendfile.rb#113 def call(env); end private - # source://rack//lib/rack/sendfile.rb#149 + # source://rack//lib/rack/sendfile.rb#154 def map_accel_path(env, path); end - # source://rack//lib/rack/sendfile.rb#143 + # source://rack//lib/rack/sendfile.rb#148 def variation(env); end end -# source://rack//lib/rack/server.rb#8 -class Rack::Server - # Options may include: - # * :app - # a rack application to run (overrides :config and :builder) - # * :builder - # a string to evaluate a Rack::Builder from - # * :config - # a rackup configuration file path to load (.ru) - # * :environment - # this selects the middleware that will be wrapped around - # your application. Default options available are: - # - development: CommonLogger, ShowExceptions, and Lint - # - deployment: CommonLogger - # - none: no extra middleware - # note: when the server is a cgi server, CommonLogger is not included. - # * :server - # choose a specific Rack::Handler, e.g. cgi, fcgi, webrick - # * :daemonize - # if true, the server will daemonize itself (fork, detach, etc) - # * :pid - # path to write a pid file after daemonize - # * :Host - # the host address to bind to (used by supporting Rack::Handler) - # * :Port - # the port to bind to (used by supporting Rack::Handler) - # * :AccessLog - # webrick access log options (or supporting Rack::Handler) - # * :debug - # turn on debug output ($DEBUG = true) - # * :warn - # turn on warnings ($-w = true) - # * :include - # add given paths to $LOAD_PATH - # * :require - # require the given libraries - # - # Additional options for profiling app initialization include: - # * :heapfile - # location for ObjectSpace.dump_all to write the output to - # * :profile_file - # location for CPU/Memory (StackProf) profile output (defaults to a tempfile) - # * :profile_mode - # StackProf profile mode (cpu|wall|object) - # - # @return [Server] a new instance of Server - # - # source://rack//lib/rack/server.rb#215 - def initialize(options = T.unsafe(nil)); end - - # source://rack//lib/rack/server.rb#248 - def app; end +# Rack::ShowExceptions catches all exceptions raised from the app it +# wraps. It shows a useful backtrace with the sourcefile and +# clickable context, the whole Rack environment and the request +# data. +# +# Be careful when you use this on public-facing sites as it could +# reveal information helpful to attackers. +# +# source://rack//lib/rack/show_exceptions.rb#19 +class Rack::ShowExceptions + # @return [ShowExceptions] a new instance of ShowExceptions + # + # source://rack//lib/rack/show_exceptions.rb#22 + def initialize(app); end - # source://rack//lib/rack/server.rb#234 - def default_options; end + # source://rack//lib/rack/show_exceptions.rb#26 + def call(env); end - # source://rack//lib/rack/server.rb#282 - def middleware; end + # source://rack//lib/rack/show_exceptions.rb#61 + def dump_exception(exception); end - # source://rack//lib/rack/server.rb#229 - def options; end + # source://rack//lib/rack/show_exceptions.rb#112 + def h(obj); end - # Sets the attribute options - # - # @param value the value to set the attribute options to. + # @return [Boolean] # - # source://rack//lib/rack/server.rb#171 - def options=(_arg0); end + # source://rack//lib/rack/show_exceptions.rb#52 + def prefers_plaintext?(env); end - # source://rack//lib/rack/server.rb#330 - def server; end + # source://rack//lib/rack/show_exceptions.rb#72 + def pretty(env, exception); end - # source://rack//lib/rack/server.rb#286 - def start(&block); end + # source://rack//lib/rack/show_exceptions.rb#108 + def template; end private - # source://rack//lib/rack/server.rb#411 - def build_app(app); end - - # source://rack//lib/rack/server.rb#344 - def build_app_and_options_from_config; end - - # source://rack//lib/rack/server.rb#392 - def build_app_from_string; end - - # source://rack//lib/rack/server.rb#440 - def check_pid!; end - - # source://rack//lib/rack/server.rb#425 - def daemonize_app; end - - # source://rack//lib/rack/server.rb#354 - def handle_profiling(heapfile, profile_mode, filename); end - - # source://rack//lib/rack/server.rb#382 - def make_profile_name(filename); end - - # source://rack//lib/rack/server.rb#407 - def opt_parser; end - - # source://rack//lib/rack/server.rb#396 - def parse_options(args); end - - # source://rack//lib/rack/server.rb#450 - def pidfile_process_status; end - - # source://rack//lib/rack/server.rb#421 - def wrapped_app; end - - # source://rack//lib/rack/server.rb#432 - def write_pid; end - - class << self - # source://rack//lib/rack/server.rb#259 - def default_middleware_by_environment; end + # @return [Boolean] + # + # source://rack//lib/rack/show_exceptions.rb#56 + def accepts_html?(env); end +end - # source://rack//lib/rack/server.rb#253 - def logging_middleware; end +# source://rack//lib/rack/show_exceptions.rb#20 +Rack::ShowExceptions::CONTEXT = T.let(T.unsafe(nil), Integer) - # source://rack//lib/rack/server.rb#277 - def middleware; end +# source://rack//lib/rack/show_exceptions.rb#127 +Rack::ShowExceptions::TEMPLATE = T.let(T.unsafe(nil), ERB) - # Start a new rack server (like running rackup). This will parse ARGV and - # provide standard ARGV rackup options, defaulting to load 'config.ru'. - # - # Providing an options hash will prevent ARGV parsing and will not include - # any default options. - # - # This method can be used to very easily launch a CGI application, for - # example: - # - # Rack::Server.start( - # :app => lambda do |e| - # [200, {'Content-Type' => 'text/html'}, ['hello world']] - # end, - # :server => 'cgi' - # ) - # - # Further options available here are documented on Rack::Server#initialize - # - # source://rack//lib/rack/server.rb#167 - def start(options = T.unsafe(nil)); end - end -end +# Rack::ShowStatus catches all empty responses and replaces them +# with a site explaining the error. +# +# Additional details can be put into rack.showstatus.detail +# and will be shown as HTML. If such details exist, the error page +# is always rendered, even if the reply was not empty. +# +# source://rack//lib/rack/show_status.rb#18 +class Rack::ShowStatus + # @return [ShowStatus] a new instance of ShowStatus + # + # source://rack//lib/rack/show_status.rb#19 + def initialize(app); end -# source://rack//lib/rack/server.rb#11 -class Rack::Server::Options - # source://rack//lib/rack/server.rb#127 - def handler_opts(options); end + # source://rack//lib/rack/show_status.rb#24 + def call(env); end - # source://rack//lib/rack/server.rb#12 - def parse!(args); end + # source://rack//lib/rack/show_status.rb#54 + def h(obj); end end -# source://rack//lib/rack.rb#136 -module Rack::Session; end - -# source://rack//lib/rack/session/abstract/id.rb#41 -module Rack::Session::Abstract; end - -# source://rack//lib/rack/session/abstract/id.rb#487 -class Rack::Session::Abstract::ID < ::Rack::Session::Abstract::Persisted - # All thread safety and session destroy procedures should occur here. - # Should return a new session id or nil if options[:drop] - # - # source://rack//lib/rack/session/abstract/id.rb#517 - def delete_session(req, sid, options); end - - # All thread safety and session retrieval procedures should occur here. - # Should return [session_id, session]. - # If nil is provided as the session id, generation of a new valid id - # should occur within. - # - # source://rack//lib/rack/session/abstract/id.rb#502 - def find_session(req, sid); end - - # All thread safety and session storage procedures should occur here. - # Must return the session id if the session was saved successfully, or - # false if the session could not be saved. - # - # source://rack//lib/rack/session/abstract/id.rb#510 - def write_session(req, sid, session, options); end - - class << self - # @private - # - # source://rack//lib/rack/session/abstract/id.rb#488 - def inherited(klass); end - end -end - -# ID sets up a basic framework for implementing an id based sessioning -# service. Cookies sent to the client for maintaining sessions will only -# contain an id reference. Only #find_session, #write_session and -# #delete_session are required to be overwritten. -# -# All parameters are optional. -# * :key determines the name of the cookie, by default it is -# 'rack.session' -# * :path, :domain, :expire_after, :secure, and :httponly set the related -# cookie options as by Rack::Response#set_cookie -# * :skip will not a set a cookie in the response nor update the session state -# * :defer will not set a cookie in the response but still update the session -# state if it is used with a backend -# * :renew (implementation dependent) will prompt the generation of a new -# session id, and migration of data to be referenced at the new id. If -# :defer is set, it will be overridden and the cookie will be set. -# * :sidbits sets the number of bits in length that a generated session -# id will be. -# -# These options can be set on a per request basis, at the location of -# env['rack.session.options']. Additionally the id of the -# session can be found within the options hash at the key :id. It is -# highly not recommended to change its value. -# -# Is Rack::Utils::Context compatible. -# -# Not included by default; you must require 'rack/session/abstract/id' -# to use. -# -# source://rack//lib/rack/session/abstract/id.rb#233 -class Rack::Session::Abstract::Persisted - # @return [Persisted] a new instance of Persisted - # - # source://rack//lib/rack/session/abstract/id.rb#250 - def initialize(app, options = T.unsafe(nil)); end - - # source://rack//lib/rack/session/abstract/id.rb#259 - def call(env); end - - # Acquires the session from the environment and the session id from - # the session options and passes them to #write_session. If successful - # and the :defer option is not true, a cookie will be added to the - # response with the session's id. - # - # source://rack//lib/rack/session/abstract/id.rb#373 - def commit_session(req, res); end - - # source://rack//lib/rack/session/abstract/id.rb#263 - def context(env, app = T.unsafe(nil)); end - - # Returns the value of attribute default_options. - # - # source://rack//lib/rack/session/abstract/id.rb#248 - def default_options; end - - # Returns the value of attribute key. - # - # source://rack//lib/rack/session/abstract/id.rb#248 - def key; end - - # Returns the value of attribute sid_secure. - # - # source://rack//lib/rack/session/abstract/id.rb#248 - def sid_secure; end - - private - - # Session should be committed if it was loaded, any of specific options like :renew, :drop - # or :expire_after was given and the security permissions match. Skips if skip is given. - # - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#342 - def commit_session?(req, session, options); end - - # source://rack//lib/rack/session/abstract/id.rb#408 - def cookie_value(data); end - - # Returns the current session id from the SessionHash. - # - # source://rack//lib/rack/session/abstract/id.rb#328 - def current_session_id(req); end - - # All thread safety and session destroy procedures should occur here. - # Should return a new session id or nil if options[:drop] - # - # source://rack//lib/rack/session/abstract/id.rb#448 - def delete_session(req, sid, options); end - - # Extract session id from request object. - # - # source://rack//lib/rack/session/abstract/id.rb#320 - def extract_session_id(request); end - - # All thread safety and session retrieval procedures should occur here. - # Should return [session_id, session]. - # If nil is provided as the session id, generation of a new valid id - # should occur within. - # - # source://rack//lib/rack/session/abstract/id.rb#433 - def find_session(env, sid); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#359 - def force_options?(options); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#355 - def forced_session_update?(session, options); end - - # Generate a new session id using Ruby #rand. The size of the - # session id is controlled by the :sidbits option. - # Monkey patch this to use custom methods for session id generation. - # - # source://rack//lib/rack/session/abstract/id.rb#288 - def generate_sid(secure = T.unsafe(nil)); end - - # source://rack//lib/rack/session/abstract/id.rb#278 - def initialize_sid; end - - # Extracts the session id from provided cookies and passes it and the - # environment to #find_session. - # - # source://rack//lib/rack/session/abstract/id.rb#312 - def load_session(req); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#351 - def loaded_session?(session); end - - # source://rack//lib/rack/session/abstract/id.rb#274 - def make_request(env); end - - # Sets the lazy session at 'rack.session' and places options and session - # metadata into 'rack.session.options'. - # - # source://rack//lib/rack/session/abstract/id.rb#301 - def prepare_session(req); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#363 - def security_matches?(request, options); end - - # Allow subclasses to prepare_session for different Session classes - # - # source://rack//lib/rack/session/abstract/id.rb#424 - def session_class; end - - # Check if the session exists or not. - # - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#334 - def session_exists?(req); end - - # Sets the cookie back to the client with session id. We skip the cookie - # setting if the value didn't change (sid is the same) or expires was given. - # - # source://rack//lib/rack/session/abstract/id.rb#415 - def set_cookie(request, res, cookie); end - - # All thread safety and session storage procedures should occur here. - # Must return the session id if the session was saved successfully, or - # false if the session could not be saved. - # - # source://rack//lib/rack/session/abstract/id.rb#441 - def write_session(req, sid, session, options); end -end - -# source://rack//lib/rack/session/abstract/id.rb#234 -Rack::Session::Abstract::Persisted::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://rack//lib/rack/session/abstract/id.rb#453 -class Rack::Session::Abstract::PersistedSecure < ::Rack::Session::Abstract::Persisted - # source://rack//lib/rack/session/abstract/id.rb#471 - def extract_session_id(*_arg0); end - - # source://rack//lib/rack/session/abstract/id.rb#465 - def generate_sid(*_arg0); end - - private - - # source://rack//lib/rack/session/abstract/id.rb#482 - def cookie_value(data); end - - # source://rack//lib/rack/session/abstract/id.rb#478 - def session_class; end -end - -# source://rack//lib/rack/session/abstract/id.rb#454 -class Rack::Session::Abstract::PersistedSecure::SecureSessionHash < ::Rack::Session::Abstract::SessionHash - # source://rack//lib/rack/session/abstract/id.rb#455 - def [](key); end -end - -# SessionHash is responsible to lazily load the session from store. -# -# source://rack//lib/rack/session/abstract/id.rb#44 -class Rack::Session::Abstract::SessionHash - include ::Enumerable - - # @return [SessionHash] a new instance of SessionHash - # - # source://rack//lib/rack/session/abstract/id.rb#62 - def initialize(store, req); end - - # source://rack//lib/rack/session/abstract/id.rb#82 - def [](key); end - - # source://rack//lib/rack/session/abstract/id.rb#108 - def []=(key, value); end - - # source://rack//lib/rack/session/abstract/id.rb#114 - def clear; end - - # source://rack//lib/rack/session/abstract/id.rb#140 - def delete(key); end - - # source://rack//lib/rack/session/abstract/id.rb#119 - def destroy; end - - # source://rack//lib/rack/session/abstract/id.rb#87 - def dig(key, *keys); end - - # source://rack//lib/rack/session/abstract/id.rb#77 - def each(&block); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#163 - def empty?; end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#153 - def exists?; end - - # source://rack//lib/rack/session/abstract/id.rb#92 - def fetch(key, default = T.unsafe(nil), &block); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#101 - def has_key?(key); end - - # source://rack//lib/rack/session/abstract/id.rb#68 - def id; end - - # Sets the attribute id - # - # @param value the value to set the attribute id to. - # - # source://rack//lib/rack/session/abstract/id.rb#46 - def id=(_arg0); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#101 - def include?(key); end - - # source://rack//lib/rack/session/abstract/id.rb#145 - def inspect; end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#101 - def key?(key); end - - # source://rack//lib/rack/session/abstract/id.rb#168 - def keys; end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#159 - def loaded?; end - - # source://rack//lib/rack/session/abstract/id.rb#129 - def merge!(hash); end - - # source://rack//lib/rack/session/abstract/id.rb#73 - def options; end - - # source://rack//lib/rack/session/abstract/id.rb#135 - def replace(hash); end - - # source://rack//lib/rack/session/abstract/id.rb#108 - def store(key, value); end - - # source://rack//lib/rack/session/abstract/id.rb#124 - def to_hash; end - - # source://rack//lib/rack/session/abstract/id.rb#129 - def update(hash); end - - # source://rack//lib/rack/session/abstract/id.rb#173 - def values; end - - private - - # source://rack//lib/rack/session/abstract/id.rb#188 - def load!; end - - # source://rack//lib/rack/session/abstract/id.rb#180 - def load_for_read!; end - - # source://rack//lib/rack/session/abstract/id.rb#184 - def load_for_write!; end - - # source://rack//lib/rack/session/abstract/id.rb#194 - def stringify_keys(other); end - - class << self - # source://rack//lib/rack/session/abstract/id.rb#50 - def find(req); end - - # source://rack//lib/rack/session/abstract/id.rb#54 - def set(req, session); end - - # source://rack//lib/rack/session/abstract/id.rb#58 - def set_options(req, options); end - end -end - -# source://rack//lib/rack/session/abstract/id.rb#48 -Rack::Session::Abstract::SessionHash::Unspecified = T.let(T.unsafe(nil), Object) - -# Rack::Session::Cookie provides simple cookie based session management. -# By default, the session is a Ruby Hash stored as base64 encoded marshalled -# data set to :key (default: rack.session). The object that encodes the -# session data is configurable and must respond to +encode+ and +decode+. -# Both methods must take a string and return a string. -# -# When the secret key is set, cookie data is checked for data integrity. -# The old secret key is also accepted and allows graceful secret rotation. -# -# Example: -# -# use Rack::Session::Cookie, :key => 'rack.session', -# :domain => 'foo.com', -# :path => '/', -# :expire_after => 2592000, -# :secret => 'change_me', -# :old_secret => 'also_change_me' -# -# All parameters are optional. -# -# -# Rack::Session::Cookie.new(application, { -# :coder => Rack::Session::Cookie::Identity.new -# }) -# -# -# Rack::Session::Cookie.new(application, { -# :coder => Class.new { -# def encode(str); str.reverse; end -# def decode(str); str.reverse; end -# }.new -# }) -# -# source://rack//lib/rack/session/cookie.rb#49 -class Rack::Session::Cookie < ::Rack::Session::Abstract::PersistedSecure - # @return [Cookie] a new instance of Cookie - # - # source://rack//lib/rack/session/cookie.rb#107 - def initialize(app, options = T.unsafe(nil)); end - - # Returns the value of attribute coder. - # - # source://rack//lib/rack/session/cookie.rb#105 - def coder; end - - private - - # source://rack//lib/rack/session/cookie.rb#180 - def delete_session(req, session_id, options); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/cookie.rb#185 - def digest_match?(data, digest); end - - # source://rack//lib/rack/session/cookie.rb#132 - def extract_session_id(request); end - - # source://rack//lib/rack/session/cookie.rb#126 - def find_session(req, sid); end - - # source://rack//lib/rack/session/cookie.rb#192 - def generate_hmac(data, secret); end - - # source://rack//lib/rack/session/cookie.rb#149 - def persistent_session_id!(data, sid = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/cookie.rb#196 - def secure?(options); end - - # source://rack//lib/rack/session/cookie.rb#136 - def unpacked_cookie_data(request); end - - # source://rack//lib/rack/session/cookie.rb#164 - def write_session(req, session_id, session, options); end -end - -# Encode session cookies as Base64 -# -# source://rack//lib/rack/session/cookie.rb#51 -class Rack::Session::Cookie::Base64 - # source://rack//lib/rack/session/cookie.rb#56 - def decode(str); end - - # source://rack//lib/rack/session/cookie.rb#52 - def encode(str); end -end - -# N.B. Unlike other encoding methods, the contained objects must be a -# valid JSON composite type, either a Hash or an Array. -# -# source://rack//lib/rack/session/cookie.rb#74 -class Rack::Session::Cookie::Base64::JSON < ::Rack::Session::Cookie::Base64 - # source://rack//lib/rack/session/cookie.rb#79 - def decode(str); end - - # source://rack//lib/rack/session/cookie.rb#75 - def encode(obj); end -end - -# Encode session cookies as Marshaled Base64 data -# -# source://rack//lib/rack/session/cookie.rb#61 -class Rack::Session::Cookie::Base64::Marshal < ::Rack::Session::Cookie::Base64 - # source://rack//lib/rack/session/cookie.rb#66 - def decode(str); end - - # source://rack//lib/rack/session/cookie.rb#62 - def encode(str); end -end - -# source://rack//lib/rack/session/cookie.rb#85 -class Rack::Session::Cookie::Base64::ZipJSON < ::Rack::Session::Cookie::Base64 - # source://rack//lib/rack/session/cookie.rb#90 - def decode(str); end - - # source://rack//lib/rack/session/cookie.rb#86 - def encode(obj); end -end - -# Use no encoding for session cookies -# -# source://rack//lib/rack/session/cookie.rb#100 -class Rack::Session::Cookie::Identity - # source://rack//lib/rack/session/cookie.rb#102 - def decode(str); end - - # source://rack//lib/rack/session/cookie.rb#101 - def encode(str); end -end - -# source://rack//lib/rack/session/cookie.rb#155 -class Rack::Session::Cookie::SessionId - # @return [SessionId] a new instance of SessionId - # - # source://rack//lib/rack/session/cookie.rb#158 - def initialize(session_id, cookie_value); end - - # Returns the value of attribute cookie_value. - # - # source://rack//lib/rack/session/cookie.rb#156 - def cookie_value; end -end - -# Rack::Session::Pool provides simple cookie based session management. -# Session data is stored in a hash held by @pool. -# In the context of a multithreaded environment, sessions being -# committed to the pool is done in a merging manner. -# -# The :drop option is available in rack.session.options if you wish to -# explicitly remove the session from the session cache. -# -# Example: -# myapp = MyRackApp.new -# sessioned = Rack::Session::Pool.new(myapp, -# :domain => 'foo.com', -# :expire_after => 2592000 -# ) -# Rack::Handler::WEBrick.run sessioned -# -# source://rack//lib/rack/session/pool.rb#29 -class Rack::Session::Pool < ::Rack::Session::Abstract::PersistedSecure - # @return [Pool] a new instance of Pool - # - # source://rack//lib/rack/session/pool.rb#33 - def initialize(app, options = T.unsafe(nil)); end - - # source://rack//lib/rack/session/pool.rb#63 - def delete_session(req, session_id, options); end - - # source://rack//lib/rack/session/pool.rb#46 - def find_session(req, sid); end - - # source://rack//lib/rack/session/pool.rb#39 - def generate_sid; end - - # Returns the value of attribute mutex. - # - # source://rack//lib/rack/session/pool.rb#30 - def mutex; end - - # Returns the value of attribute pool. - # - # source://rack//lib/rack/session/pool.rb#30 - def pool; end - - # source://rack//lib/rack/session/pool.rb#71 - def with_lock(req); end - - # source://rack//lib/rack/session/pool.rb#56 - def write_session(req, session_id, new_session, options); end - - private - - # source://rack//lib/rack/session/pool.rb#80 - def get_session_with_fallback(sid); end -end - -# source://rack//lib/rack/session/pool.rb#31 -Rack::Session::Pool::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://rack//lib/rack/session/abstract/id.rb#15 -class Rack::Session::SessionId - # @return [SessionId] a new instance of SessionId - # - # source://rack//lib/rack/session/abstract/id.rb#20 - def initialize(public_id); end - - # Returns the value of attribute public_id. - # - # source://rack//lib/rack/session/abstract/id.rb#18 - def cookie_value; end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#31 - def empty?; end - - # source://rack//lib/rack/session/abstract/id.rb#32 - def inspect; end - - # source://rack//lib/rack/session/abstract/id.rb#24 - def private_id; end - - # Returns the value of attribute public_id. - # - # source://rack//lib/rack/session/abstract/id.rb#18 - def public_id; end - - # Returns the value of attribute public_id. - # - # source://rack//lib/rack/session/abstract/id.rb#18 - def to_s; end - - private - - # source://rack//lib/rack/session/abstract/id.rb#36 - def hash_sid(sid); end -end - -# source://rack//lib/rack/session/abstract/id.rb#16 -Rack::Session::SessionId::ID_VERSION = T.let(T.unsafe(nil), Integer) - -# Rack::ShowExceptions catches all exceptions raised from the app it -# wraps. It shows a useful backtrace with the sourcefile and -# clickable context, the whole Rack environment and the request -# data. -# -# Be careful when you use this on public-facing sites as it could -# reveal information helpful to attackers. -# -# source://rack//lib/rack/show_exceptions.rb#15 -class Rack::ShowExceptions - # @return [ShowExceptions] a new instance of ShowExceptions - # - # source://rack//lib/rack/show_exceptions.rb#18 - def initialize(app); end - - # source://rack//lib/rack/show_exceptions.rb#22 - def call(env); end - - # source://rack//lib/rack/show_exceptions.rb#57 - def dump_exception(exception); end - - # source://rack//lib/rack/show_exceptions.rb#103 - def h(obj); end - - # @return [Boolean] - # - # source://rack//lib/rack/show_exceptions.rb#48 - def prefers_plaintext?(env); end - - # source://rack//lib/rack/show_exceptions.rb#63 - def pretty(env, exception); end - - # source://rack//lib/rack/show_exceptions.rb#99 - def template; end - - private - - # @return [Boolean] - # - # source://rack//lib/rack/show_exceptions.rb#52 - def accepts_html?(env); end -end - -# source://rack//lib/rack/show_exceptions.rb#16 -Rack::ShowExceptions::CONTEXT = T.let(T.unsafe(nil), Integer) - -# source://rack//lib/rack/show_exceptions.rb#118 -Rack::ShowExceptions::TEMPLATE = T.let(T.unsafe(nil), ERB) - -# Rack::ShowStatus catches all empty responses and replaces them -# with a site explaining the error. -# -# Additional details can be put into rack.showstatus.detail -# and will be shown as HTML. If such details exist, the error page -# is always rendered, even if the reply was not empty. -# -# source://rack//lib/rack/show_status.rb#13 -class Rack::ShowStatus - # @return [ShowStatus] a new instance of ShowStatus - # - # source://rack//lib/rack/show_status.rb#14 - def initialize(app); end - - # source://rack//lib/rack/show_status.rb#19 - def call(env); end - - # source://rack//lib/rack/show_status.rb#44 - def h(obj); end -end - -# source://rack//lib/rack/show_status.rb#59 -Rack::ShowStatus::TEMPLATE = T.let(T.unsafe(nil), String) +# source://rack//lib/rack/show_status.rb#69 +Rack::ShowStatus::TEMPLATE = T.let(T.unsafe(nil), String) # The Rack::Static middleware intercepts requests for static files # (javascript files, images, stylesheets, etc) based on the url prefixes or @@ -5021,23 +4512,23 @@ Rack::ShowStatus::TEMPLATE = T.let(T.unsafe(nil), String) # :header_rules => [ # # Cache all static files in public caches (e.g. Rack::Cache) # # as well as in the browser -# [:all, {'Cache-Control' => 'public, max-age=31536000'}], +# [:all, {'cache-control' => 'public, max-age=31536000'}], # # # Provide web fonts with cross-origin access-control-headers # # Firefox requires this when serving assets using a Content Delivery Network -# [:fonts, {'Access-Control-Allow-Origin' => '*'}] +# [:fonts, {'access-control-allow-origin' => '*'}] # ] # -# source://rack//lib/rack/static.rb#88 +# source://rack//lib/rack/static.rb#92 class Rack::Static # @return [Static] a new instance of Static # - # source://rack//lib/rack/static.rb#91 + # source://rack//lib/rack/static.rb#93 def initialize(app, options = T.unsafe(nil)); end # @return [Boolean] # - # source://rack//lib/rack/static.rb#107 + # source://rack//lib/rack/static.rb#109 def add_index_root?(path); end # Convert HTTP header rules to HTTP headers @@ -5045,41 +4536,41 @@ class Rack::Static # source://rack//lib/rack/static.rb#166 def applicable_rules(path); end - # source://rack//lib/rack/static.rb#123 + # source://rack//lib/rack/static.rb#125 def call(env); end - # source://rack//lib/rack/static.rb#119 + # source://rack//lib/rack/static.rb#121 def can_serve(path); end - # source://rack//lib/rack/static.rb#111 + # source://rack//lib/rack/static.rb#113 def overwrite_file_path(path); end - # source://rack//lib/rack/static.rb#115 + # source://rack//lib/rack/static.rb#117 def route_file(path); end end -# source://rack//lib/rack.rb#48 +# source://rack//lib/rack/constants.rb#37 Rack::TRACE = T.let(T.unsafe(nil), String) -# source://rack//lib/rack.rb#34 +# source://rack//lib/rack/constants.rb#25 Rack::TRANSFER_ENCODING = T.let(T.unsafe(nil), String) # Middleware tracks and cleans Tempfiles created throughout a request (i.e. Rack::Multipart) # Ideas/strategy based on posts by Eric Wong and Charles Oliver Nutter # https://groups.google.com/forum/#!searchin/rack-devel/temp/rack-devel/brK8eh-MByw/sw61oJJCGRMJ # -# source://rack//lib/rack/tempfile_reaper.rb#8 +# source://rack//lib/rack/tempfile_reaper.rb#11 class Rack::TempfileReaper # @return [TempfileReaper] a new instance of TempfileReaper # - # source://rack//lib/rack/tempfile_reaper.rb#9 + # source://rack//lib/rack/tempfile_reaper.rb#12 def initialize(app); end - # source://rack//lib/rack/tempfile_reaper.rb#13 + # source://rack//lib/rack/tempfile_reaper.rb#16 def call(env); end end -# source://rack//lib/rack.rb#47 +# source://rack//lib/rack/constants.rb#36 Rack::UNLINK = T.let(T.unsafe(nil), String) # Rack::URLMap takes a hash mapping urls or paths to apps, and @@ -5094,41 +4585,38 @@ Rack::UNLINK = T.let(T.unsafe(nil), String) # URLMap dispatches in such a way that the longest paths are tried # first, since they are most specific. # -# source://rack//lib/rack/urlmap.rb#18 +# source://rack//lib/rack/urlmap.rb#20 class Rack::URLMap # @return [URLMap] a new instance of URLMap # - # source://rack//lib/rack/urlmap.rb#19 + # source://rack//lib/rack/urlmap.rb#21 def initialize(map = T.unsafe(nil)); end - # source://rack//lib/rack/urlmap.rb#46 + # source://rack//lib/rack/urlmap.rb#48 def call(env); end - # source://rack//lib/rack/urlmap.rb#23 + # source://rack//lib/rack/urlmap.rb#25 def remap(map); end private # @return [Boolean] # - # source://rack//lib/rack/urlmap.rb#85 + # source://rack//lib/rack/urlmap.rb#87 def casecmp?(v1, v2); end end # Rack::Utils contains a grab-bag of useful methods for writing web # applications adopted from all kinds of Ruby libraries. # -# source://rack//lib/rack/utils.rb#16 +# source://rack//lib/rack/utils.rb#19 module Rack::Utils private - # source://rack//lib/rack/utils.rb#237 + # source://rack//lib/rack/utils.rb#255 def add_cookie_to_header(header, key, value); end - # Adds a cookie that will *remove* a cookie from the client. Hence the - # strange method name. - # - # source://rack//lib/rack/utils.rb#320 + # source://rack//lib/rack/utils.rb#390 def add_remove_cookie_to_header(header, key, value = T.unsafe(nil)); end # Return best accept value to use, based on the algorithm @@ -5136,32 +4624,70 @@ module Rack::Utils # matches (same specificity and quality), the value returned # is arbitrary. # - # source://rack//lib/rack/utils.rb#159 + # source://rack//lib/rack/utils.rb#174 def best_q_match(q_value_header, available_mimes); end - # source://rack//lib/rack/utils.rb#126 + # source://rack//lib/rack/utils.rb#127 def build_nested_query(value, prefix = T.unsafe(nil)); end - # source://rack//lib/rack/utils.rb#116 + # source://rack//lib/rack/utils.rb#117 def build_query(params); end # Parses the "Range:" header, if present, into an array of Range objects. # Returns nil if the header is missing or syntactically invalid. # Returns an empty array if none of the ranges are satisfiable. # - # source://rack//lib/rack/utils.rb#352 + # source://rack//lib/rack/utils.rb#432 def byte_ranges(env, size); end - # source://rack//lib/rack/utils.rb#606 + # source://rack//lib/rack/utils.rb#636 def clean_path_info(path_info); end # :nocov: # - # source://rack//lib/rack/utils.rb#97 + # source://rack//lib/rack/utils.rb#98 def clock_time; end - # source://rack//lib/rack/utils.rb#313 - def delete_cookie_header!(header, key, value = T.unsafe(nil)); end + # source://rack//lib/rack/utils.rb#384 + def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header(key, value = {}) -> encoded string + # + # Generate an encoded string based on the given +key+ and +value+ using + # set_cookie_header for the purpose of causing the specified cookie to be + # deleted. The +value+ may be an instance of +Hash+ and can include + # attributes as outlined by set_cookie_header. The encoded cookie will have + # a +max_age+ of 0 seconds, an +expires+ date in the past and an empty + # +value+. When used with the +set-cookie+ header, it will cause the client + # to *remove* any matching cookie. + # + # delete_set_cookie_header("myname") + # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # source://rack//lib/rack/utils.rb#374 + def delete_set_cookie_header(key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header!(header, key, value = {}) -> header value + # + # Set an expired cookie in the specified headers with the given cookie + # +key+ and +value+ using delete_set_cookie_header. This causes + # the client to immediately delete the specified cookie. + # + # delete_set_cookie_header!(nil, "mycookie") + # # => "mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # If the header is non-nil, it will be modified in place. + # + # header = [] + # delete_set_cookie_header!(header, "mycookie") + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # header + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # + # source://rack//lib/rack/utils.rb#414 + def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end # URI escapes. (CGI style space to +) # @@ -5170,7 +4696,7 @@ module Rack::Utils # Escape ampersands, brackets and quotes to their HTML/XML entities. # - # source://rack//lib/rack/utils.rb#184 + # source://rack//lib/rack/utils.rb#199 def escape_html(string); end # Like URI escaping, but with %20 instead of +. Strictly speaking this is @@ -5179,59 +4705,99 @@ module Rack::Utils # source://rack//lib/rack/utils.rb#44 def escape_path(s); end - # source://rack//lib/rack/utils.rb#357 + # source://rack//lib/rack/utils.rb#156 + def forwarded_values(forwarded_header); end + + # source://rack//lib/rack/utils.rb#436 def get_byte_ranges(http_range, size); end - # source://rack//lib/rack/utils.rb#283 + # source://rack//lib/rack/utils.rb#378 def make_delete_cookie_header(header, key, value); end - # source://rack//lib/rack/utils.rb#220 + # :call-seq: + # parse_cookies(env) -> hash + # + # Parse cookies from the provided request environment using + # parse_cookies_header. Returns a map of cookie +key+ to cookie +value+. + # + # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) + # # => {'myname' => 'myvalue'} + # + # source://rack//lib/rack/utils.rb#279 def parse_cookies(env); end - # source://rack//lib/rack/utils.rb#224 - def parse_cookies_header(header); end + # :call-seq: + # parse_cookies_header(value) -> hash + # + # Parse cookies from the provided header +value+ according to RFC6265. The + # syntax for cookie headers only supports semicolons. Returns a map of + # cookie +key+ to cookie +value+. + # + # parse_cookies_header('myname=myvalue; max-age=0') + # # => {"myname"=>"myvalue", "max-age"=>"0"} + # + # source://rack//lib/rack/utils.rb#245 + def parse_cookies_header(value); end - # source://rack//lib/rack/utils.rb#112 + # source://rack//lib/rack/utils.rb#113 def parse_nested_query(qs, d = T.unsafe(nil)); end - # source://rack//lib/rack/utils.rb#108 + # source://rack//lib/rack/utils.rb#109 def parse_query(qs, d = T.unsafe(nil), &unescaper); end - # source://rack//lib/rack/utils.rb#144 + # source://rack//lib/rack/utils.rb#145 def q_values(q_value_header); end - # Modified version of stdlib time.rb Time#rfc2822 to use '%d-%b-%Y' instead - # of '% %b %Y'. - # It assumes that the time is in GMT to comply to the RFC 2109. - # - # NOTE: I'm not sure the RFC says it requires GMT, but is ambiguous enough - # that I'm certain someone implemented only that option. - # Do not use %a and %b from Time.strptime, it would use localized names for - # weekday and month. - # - # source://rack//lib/rack/utils.rb#343 - def rfc2109(time); end - - # source://rack//lib/rack/utils.rb#330 + # source://rack//lib/rack/utils.rb#425 def rfc2822(time); end - # Constant time string comparison. - # - # NOTE: the values compared should be of fixed length, such as strings - # that have already been processed by HMAC. This should not be used - # on variable length plaintext strings because it could leak length info - # via timing attacks. + # :nocov: # - # source://rack//lib/rack/utils.rb#392 + # source://rack//lib/rack/utils.rb#476 def secure_compare(a, b); end - # source://rack//lib/rack/utils.rb#188 + # source://rack//lib/rack/utils.rb#203 def select_best_encoding(available_encodings, accept_encoding); end - # source://rack//lib/rack/utils.rb#278 - def set_cookie_header!(header, key, value); end + # :call-seq: + # set_cookie_header(key, value) -> encoded string + # + # Generate an encoded string using the provided +key+ and +value+ suitable + # for the +set-cookie+ header according to RFC6265. The +value+ may be an + # instance of either +String+ or +Hash+. + # + # If the cookie +value+ is an instance of +Hash+, it considers the following + # cookie attribute keys: +domain+, +max_age+, +expires+ (must be instance + # of +Time+), +secure+, +http_only+, +same_site+ and +value+. For more + # details about the interpretation of these fields, consult + # [RFC6265 Section 5.2](https://datatracker.ietf.org/doc/html/rfc6265#section-5.2). + # + # An extra cookie attribute +escape_key+ can be provided to control whether + # or not the cookie key is URL encoded. If explicitly set to +false+, the + # cookie key name will not be url encoded (escaped). The default is +true+. + # + # set_cookie_header("myname", "myvalue") + # # => "myname=myvalue" + # + # set_cookie_header("myname", {value: "myvalue", max_age: 10}) + # # => "myname=myvalue; max-age=10" + # + # source://rack//lib/rack/utils.rb#306 + def set_cookie_header(key, value); end - # source://rack//lib/rack/utils.rb#596 + # :call-seq: + # set_cookie_header!(headers, key, value) -> header value + # + # Append a cookie in the specified headers with the given cookie +key+ and + # +value+ using set_cookie_header. + # + # If the headers already contains a +set-cookie+ key, it will be converted + # to an +Array+ if not already, and appended to. + # + # source://rack//lib/rack/utils.rb#348 + def set_cookie_header!(headers, key, value); end + + # source://rack//lib/rack/utils.rb#626 def status_code(status); end # Unescapes a URI escaped string with +encoding+. +encoding+ will be the @@ -5246,17 +4812,14 @@ module Rack::Utils # source://rack//lib/rack/utils.rb#50 def unescape_path(s); end - # source://rack//lib/rack/utils.rb#623 + # source://rack//lib/rack/utils.rb#653 def valid_path?(path); end class << self - # source://rack//lib/rack/utils.rb#237 + # source://rack//lib/rack/utils.rb#255 def add_cookie_to_header(header, key, value); end - # Adds a cookie that will *remove* a cookie from the client. Hence the - # strange method name. - # - # source://rack//lib/rack/utils.rb#320 + # source://rack//lib/rack/utils.rb#390 def add_remove_cookie_to_header(header, key, value = T.unsafe(nil)); end # Return best accept value to use, based on the algorithm @@ -5264,42 +4827,80 @@ module Rack::Utils # matches (same specificity and quality), the value returned # is arbitrary. # - # source://rack//lib/rack/utils.rb#159 + # source://rack//lib/rack/utils.rb#174 def best_q_match(q_value_header, available_mimes); end - # source://rack//lib/rack/utils.rb#126 + # source://rack//lib/rack/utils.rb#127 def build_nested_query(value, prefix = T.unsafe(nil)); end - # source://rack//lib/rack/utils.rb#116 + # source://rack//lib/rack/utils.rb#117 def build_query(params); end # Parses the "Range:" header, if present, into an array of Range objects. # Returns nil if the header is missing or syntactically invalid. # Returns an empty array if none of the ranges are satisfiable. # - # source://rack//lib/rack/utils.rb#352 + # source://rack//lib/rack/utils.rb#432 def byte_ranges(env, size); end - # source://rack//lib/rack/utils.rb#606 + # source://rack//lib/rack/utils.rb#636 def clean_path_info(path_info); end - # source://rack//lib/rack/utils.rb#97 + # source://rack//lib/rack/utils.rb#98 def clock_time; end # Returns the value of attribute default_query_parser. # - # source://rack//lib/rack/utils.rb#29 + # source://rack//lib/rack/utils.rb#28 def default_query_parser; end # Sets the attribute default_query_parser # # @param value the value to set the attribute default_query_parser to. # - # source://rack//lib/rack/utils.rb#29 + # source://rack//lib/rack/utils.rb#28 def default_query_parser=(_arg0); end - # source://rack//lib/rack/utils.rb#313 - def delete_cookie_header!(header, key, value = T.unsafe(nil)); end + # source://rack//lib/rack/utils.rb#384 + def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header(key, value = {}) -> encoded string + # + # Generate an encoded string based on the given +key+ and +value+ using + # set_cookie_header for the purpose of causing the specified cookie to be + # deleted. The +value+ may be an instance of +Hash+ and can include + # attributes as outlined by set_cookie_header. The encoded cookie will have + # a +max_age+ of 0 seconds, an +expires+ date in the past and an empty + # +value+. When used with the +set-cookie+ header, it will cause the client + # to *remove* any matching cookie. + # + # delete_set_cookie_header("myname") + # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # source://rack//lib/rack/utils.rb#374 + def delete_set_cookie_header(key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header!(header, key, value = {}) -> header value + # + # Set an expired cookie in the specified headers with the given cookie + # +key+ and +value+ using delete_set_cookie_header. This causes + # the client to immediately delete the specified cookie. + # + # delete_set_cookie_header!(nil, "mycookie") + # # => "mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # If the header is non-nil, it will be modified in place. + # + # header = [] + # delete_set_cookie_header!(header, "mycookie") + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # header + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # + # source://rack//lib/rack/utils.rb#414 + def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end # URI escapes. (CGI style space to +) # @@ -5308,7 +4909,7 @@ module Rack::Utils # Escape ampersands, brackets and quotes to their HTML/XML entities. # - # source://rack//lib/rack/utils.rb#184 + # source://rack//lib/rack/utils.rb#199 def escape_html(string); end # Like URI escaping, but with %20 instead of +. Strictly speaking this is @@ -5317,16 +4918,19 @@ module Rack::Utils # source://rack//lib/rack/utils.rb#44 def escape_path(s); end - # source://rack//lib/rack/utils.rb#357 + # source://rack//lib/rack/utils.rb#156 + def forwarded_values(forwarded_header); end + + # source://rack//lib/rack/utils.rb#436 def get_byte_ranges(http_range, size); end # source://rack//lib/rack/utils.rb#88 def key_space_limit; end - # source://rack//lib/rack/utils.rb#92 + # source://rack//lib/rack/utils.rb#93 def key_space_limit=(v); end - # source://rack//lib/rack/utils.rb#283 + # source://rack//lib/rack/utils.rb#378 def make_delete_cookie_header(header, key, value); end # Returns the value of attribute multipart_file_limit. @@ -5373,53 +4977,88 @@ module Rack::Utils # source://rack//lib/rack/utils.rb#84 def param_depth_limit=(v); end - # source://rack//lib/rack/utils.rb#220 + # :call-seq: + # parse_cookies(env) -> hash + # + # Parse cookies from the provided request environment using + # parse_cookies_header. Returns a map of cookie +key+ to cookie +value+. + # + # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) + # # => {'myname' => 'myvalue'} + # + # source://rack//lib/rack/utils.rb#279 def parse_cookies(env); end - # source://rack//lib/rack/utils.rb#224 - def parse_cookies_header(header); end + # :call-seq: + # parse_cookies_header(value) -> hash + # + # Parse cookies from the provided header +value+ according to RFC6265. The + # syntax for cookie headers only supports semicolons. Returns a map of + # cookie +key+ to cookie +value+. + # + # parse_cookies_header('myname=myvalue; max-age=0') + # # => {"myname"=>"myvalue", "max-age"=>"0"} + # + # source://rack//lib/rack/utils.rb#245 + def parse_cookies_header(value); end - # source://rack//lib/rack/utils.rb#112 + # source://rack//lib/rack/utils.rb#113 def parse_nested_query(qs, d = T.unsafe(nil)); end - # source://rack//lib/rack/utils.rb#108 + # source://rack//lib/rack/utils.rb#109 def parse_query(qs, d = T.unsafe(nil), &unescaper); end - # source://rack//lib/rack/utils.rb#144 + # source://rack//lib/rack/utils.rb#145 def q_values(q_value_header); end - # Modified version of stdlib time.rb Time#rfc2822 to use '%d-%b-%Y' instead - # of '% %b %Y'. - # It assumes that the time is in GMT to comply to the RFC 2109. - # - # NOTE: I'm not sure the RFC says it requires GMT, but is ambiguous enough - # that I'm certain someone implemented only that option. - # Do not use %a and %b from Time.strptime, it would use localized names for - # weekday and month. - # - # source://rack//lib/rack/utils.rb#343 - def rfc2109(time); end - - # source://rack//lib/rack/utils.rb#330 + # source://rack//lib/rack/utils.rb#425 def rfc2822(time); end - # Constant time string comparison. - # - # NOTE: the values compared should be of fixed length, such as strings - # that have already been processed by HMAC. This should not be used - # on variable length plaintext strings because it could leak length info - # via timing attacks. - # - # source://rack//lib/rack/utils.rb#392 + # source://rack//lib/rack/utils.rb#476 def secure_compare(a, b); end - # source://rack//lib/rack/utils.rb#188 + # source://rack//lib/rack/utils.rb#203 def select_best_encoding(available_encodings, accept_encoding); end - # source://rack//lib/rack/utils.rb#278 - def set_cookie_header!(header, key, value); end + # :call-seq: + # set_cookie_header(key, value) -> encoded string + # + # Generate an encoded string using the provided +key+ and +value+ suitable + # for the +set-cookie+ header according to RFC6265. The +value+ may be an + # instance of either +String+ or +Hash+. + # + # If the cookie +value+ is an instance of +Hash+, it considers the following + # cookie attribute keys: +domain+, +max_age+, +expires+ (must be instance + # of +Time+), +secure+, +http_only+, +same_site+ and +value+. For more + # details about the interpretation of these fields, consult + # [RFC6265 Section 5.2](https://datatracker.ietf.org/doc/html/rfc6265#section-5.2). + # + # An extra cookie attribute +escape_key+ can be provided to control whether + # or not the cookie key is URL encoded. If explicitly set to +false+, the + # cookie key name will not be url encoded (escaped). The default is +true+. + # + # set_cookie_header("myname", "myvalue") + # # => "myname=myvalue" + # + # set_cookie_header("myname", {value: "myvalue", max_age: 10}) + # # => "myname=myvalue; max-age=10" + # + # source://rack//lib/rack/utils.rb#306 + def set_cookie_header(key, value); end + + # :call-seq: + # set_cookie_header!(headers, key, value) -> header value + # + # Append a cookie in the specified headers with the given cookie +key+ and + # +value+ using set_cookie_header. + # + # If the headers already contains a +set-cookie+ key, it will be converted + # to an +Array+ if not already, and appended to. + # + # source://rack//lib/rack/utils.rb#348 + def set_cookie_header!(headers, key, value); end - # source://rack//lib/rack/utils.rb#596 + # source://rack//lib/rack/utils.rb#626 def status_code(status); end # Unescapes a URI escaped string with +encoding+. +encoding+ will be the @@ -5436,12 +5075,12 @@ module Rack::Utils # @return [Boolean] # - # source://rack//lib/rack/utils.rb#623 + # source://rack//lib/rack/utils.rb#653 def valid_path?(path); end end end -# source://rack//lib/rack/utils.rb#22 +# source://rack//lib/rack/utils.rb#24 Rack::Utils::COMMON_SEP = T.let(T.unsafe(nil), Hash) # Context allows the use of a compatible middleware at different points @@ -5450,40 +5089,40 @@ Rack::Utils::COMMON_SEP = T.let(T.unsafe(nil), Hash) # would be the request environment. The second of which would be the rack # application that the request would be forwarded to. # -# source://rack//lib/rack/utils.rb#407 +# source://rack//lib/rack/utils.rb#499 class Rack::Utils::Context # @return [Context] a new instance of Context # - # source://rack//lib/rack/utils.rb#410 + # source://rack//lib/rack/utils.rb#502 def initialize(app_f, app_r); end # Returns the value of attribute app. # - # source://rack//lib/rack/utils.rb#408 + # source://rack//lib/rack/utils.rb#500 def app; end - # source://rack//lib/rack/utils.rb#415 + # source://rack//lib/rack/utils.rb#507 def call(env); end - # source://rack//lib/rack/utils.rb#423 + # source://rack//lib/rack/utils.rb#515 def context(env, app = T.unsafe(nil)); end # Returns the value of attribute for. # - # source://rack//lib/rack/utils.rb#408 + # source://rack//lib/rack/utils.rb#500 def for; end - # source://rack//lib/rack/utils.rb#419 + # source://rack//lib/rack/utils.rb#511 def recontext(app); end end -# source://rack//lib/rack/utils.rb#21 +# source://rack//lib/rack/utils.rb#23 Rack::Utils::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/utils.rb#172 +# source://rack//lib/rack/utils.rb#187 Rack::Utils::ESCAPE_HTML = T.let(T.unsafe(nil), Hash) -# source://rack//lib/rack/utils.rb#181 +# source://rack//lib/rack/utils.rb#196 Rack::Utils::ESCAPE_HTML_PATTERN = T.let(T.unsafe(nil), Regexp) # Every standard HTTP code mapped to the appropriate message. @@ -5492,144 +5131,59 @@ Rack::Utils::ESCAPE_HTML_PATTERN = T.let(T.unsafe(nil), Regexp) # ruby -ne 'm = /^(\d{3}),(?!Unassigned|\(Unused\))([^,]+)/.match($_) and \ # puts "#{m[1]} => \x27#{m[2].strip}\x27,"' # -# source://rack//lib/rack/utils.rb#523 +# source://rack//lib/rack/utils.rb#553 Rack::Utils::HTTP_STATUS_CODES = T.let(T.unsafe(nil), Hash) -# A case-insensitive Hash that preserves the original case of a +# A wrapper around Headers # header when set. # # @api private # -# source://rack//lib/rack/utils.rb#432 +# source://rack//lib/rack/utils.rb#524 class Rack::Utils::HeaderHash < ::Hash - # @api private - # @return [HeaderHash] a new instance of HeaderHash - # - # source://rack//lib/rack/utils.rb#441 - def initialize(hash = T.unsafe(nil)); end - - # @api private - # - # source://rack//lib/rack/utils.rb#471 - def [](k); end - - # @api private - # - # source://rack//lib/rack/utils.rb#475 - def []=(k, v); end - - # on clear, we need to clear @names hash - # - # @api private - # - # source://rack//lib/rack/utils.rb#454 - def clear; end - - # @api private - # - # source://rack//lib/rack/utils.rb#482 - def delete(k); end - - # @api private - # - # source://rack//lib/rack/utils.rb#459 - def each; end - - # @api private - # @return [Boolean] - # - # source://rack//lib/rack/utils.rb#488 - def has_key?(k); end - - # @api private - # @return [Boolean] - # - # source://rack//lib/rack/utils.rb#488 - def include?(k); end - - # @api private - # @return [Boolean] - # - # source://rack//lib/rack/utils.rb#488 - def key?(k); end - - # @api private - # @return [Boolean] - # - # source://rack//lib/rack/utils.rb#488 - def member?(k); end - - # @api private - # - # source://rack//lib/rack/utils.rb#501 - def merge(other); end - - # @api private - # - # source://rack//lib/rack/utils.rb#496 - def merge!(other); end - - # @api private - # - # source://rack//lib/rack/utils.rb#506 - def replace(other); end - - # @api private - # - # source://rack//lib/rack/utils.rb#465 - def to_hash; end - - protected - - # @api private - # - # source://rack//lib/rack/utils.rb#513 - def names; end - - private - - # on dup/clone, we need to duplicate @names hash - # - # @api private - # - # source://rack//lib/rack/utils.rb#448 - def initialize_copy(other); end - class << self # @api private # - # source://rack//lib/rack/utils.rb#433 + # source://rack//lib/rack/utils.rb#525 def [](headers); end + + # @api private + # @raise [TypeError] + # + # source://rack//lib/rack/utils.rb#543 + def allocate; end + + # @api private + # + # source://rack//lib/rack/utils.rb#536 + def new(hash = T.unsafe(nil)); end end end -# source://rack//lib/rack/utils.rb#20 +# source://rack//lib/rack/utils.rb#21 Rack::Utils::InvalidParameterError = Rack::QueryParser::InvalidParameterError -# source://rack//lib/rack/utils.rb#23 +# source://rack//lib/rack/utils.rb#25 Rack::Utils::KeySpaceConstrainedParams = Rack::QueryParser::Params -# source://rack//lib/rack/utils.rb#621 +# source://rack//lib/rack/utils.rb#651 Rack::Utils::NULL_BYTE = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/utils.rb#604 +# source://rack//lib/rack/utils.rb#634 Rack::Utils::PATH_SEPS = T.let(T.unsafe(nil), Regexp) -# source://rack//lib/rack/utils.rb#19 +# source://rack//lib/rack/utils.rb#20 Rack::Utils::ParameterTypeError = Rack::QueryParser::ParameterTypeError -# source://rack//lib/rack/utils.rb#25 -Rack::Utils::RFC2822_DAY_NAME = T.let(T.unsafe(nil), Array) - -# source://rack//lib/rack/utils.rb#26 -Rack::Utils::RFC2822_MONTH_NAME = T.let(T.unsafe(nil), Array) +# source://rack//lib/rack/utils.rb#22 +Rack::Utils::ParamsTooDeepError = Rack::QueryParser::ParamsTooDeepError # Responses with HTTP status codes that should not have an entity body # -# source://rack//lib/rack/utils.rb#590 +# source://rack//lib/rack/utils.rb#620 Rack::Utils::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) -# source://rack//lib/rack/utils.rb#592 +# source://rack//lib/rack/utils.rb#622 Rack::Utils::SYMBOL_TO_STATUS_CODE = T.let(T.unsafe(nil), Hash) # The Rack protocol version number implemented. @@ -5637,23 +5191,5 @@ Rack::Utils::SYMBOL_TO_STATUS_CODE = T.let(T.unsafe(nil), Hash) # source://rack//lib/rack/version.rb#16 Rack::VERSION = T.let(T.unsafe(nil), Array) -# This monkey patch allows for applications to perform their own chunking -# through WEBrick::HTTPResponse if rack is set to true. -# -# source://rack//lib/rack/handler/webrick.rb#8 -class WEBrick::HTTPResponse - # Returns the value of attribute rack. - # - # source://rack//lib/rack/handler/webrick.rb#9 - def rack; end - - # Sets the attribute rack - # - # @param value the value to set the attribute rack to. - # - # source://rack//lib/rack/handler/webrick.rb#9 - def rack=(_arg0); end - - # source://rack//lib/rack/handler/webrick.rb#12 - def setup_header; end -end +# source://rack//lib/rack/version.rb#19 +Rack::VERSION_STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rackup@2.0.0.rbi b/sorbet/rbi/gems/rackup@2.0.0.rbi new file mode 100644 index 000000000..75b9ca07d --- /dev/null +++ b/sorbet/rbi/gems/rackup@2.0.0.rbi @@ -0,0 +1,246 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rackup` gem. +# Please instead update this file by running `bin/tapioca gem rackup`. + +# source://rackup//lib/rack/handler.rb#8 +module Rack + class << self + # source://rack/3.0.8/lib/rack/version.rb#31 + def release; end + + # source://rack/3.0.8/lib/rack/version.rb#23 + def version; end + end +end + +# source://rackup//lib/rack/handler.rb#9 +Rack::Handler = Rackup::Handler + +# source://rackup//lib/rack/server.rb#9 +Rack::Server = Rackup::Server + +# source://rackup//lib/rackup/handler.rb#6 +module Rackup; end + +# *Handlers* connect web servers with Rack. +# +# Rackup includes Handlers for WEBrick and CGI. +# +# Handlers usually are activated by calling MyHandler.run(myapp). +# A second optional hash can be passed to include server-specific +# configuration. +# +# source://rackup//lib/rackup/handler.rb#14 +module Rackup::Handler + class << self + # source://rackup//lib/rackup/handler.rb#30 + def [](name); end + + # source://rackup//lib/rackup/handler.rb#84 + def default; end + + # source://rackup//lib/rackup/handler.rb#40 + def get(name); end + + # Select first available Rack handler given an `Array` of server names. + # Raises `LoadError` if no handler was found. + # + # > pick ['puma', 'webrick'] + # => Rackup::Handler::WEBrick + # + # @raise [LoadError] + # + # source://rackup//lib/rackup/handler.rb#69 + def pick(server_names); end + + # Register a named handler class. + # + # source://rackup//lib/rackup/handler.rb#18 + def register(name, klass); end + + # Transforms server-name constants to their canonical form as filenames, + # then tries to require them but silences the LoadError if not found + # + # Naming convention: + # + # Foo # => 'foo' + # FooBar # => 'foo_bar.rb' + # FooBAR # => 'foobar.rb' + # FOObar # => 'foobar.rb' + # FOOBAR # => 'foobar.rb' + # FooBarBaz # => 'foo_bar_baz.rb' + # + # source://rackup//lib/rackup/handler.rb#106 + def require_handler(prefix, const_name); end + end +end + +# source://rackup//lib/rackup/handler.rb#59 +Rackup::Handler::RACKUP_HANDLER = T.let(T.unsafe(nil), String) + +# source://rackup//lib/rackup/handler.rb#58 +Rackup::Handler::RACK_HANDLER = T.let(T.unsafe(nil), String) + +# source://rackup//lib/rackup/handler.rb#61 +Rackup::Handler::SERVER_NAMES = T.let(T.unsafe(nil), Array) + +# source://rackup//lib/rackup/server.rb#22 +class Rackup::Server + # Options may include: + # * :app + # a rack application to run (overrides :config and :builder) + # * :builder + # a string to evaluate a Rack::Builder from + # * :config + # a rackup configuration file path to load (.ru) + # * :environment + # this selects the middleware that will be wrapped around + # your application. Default options available are: + # - development: CommonLogger, ShowExceptions, and Lint + # - deployment: CommonLogger + # - none: no extra middleware + # note: when the server is a cgi server, CommonLogger is not included. + # * :server + # choose a specific Rackup::Handler, e.g. cgi, fcgi, webrick + # * :daemonize + # if truthy, the server will daemonize itself (fork, detach, etc) + # if :noclose, the server will not close STDOUT/STDERR + # * :pid + # path to write a pid file after daemonize + # * :Host + # the host address to bind to (used by supporting Rackup::Handler) + # * :Port + # the port to bind to (used by supporting Rackup::Handler) + # * :AccessLog + # webrick access log options (or supporting Rackup::Handler) + # * :debug + # turn on debug output ($DEBUG = true) + # * :warn + # turn on warnings ($-w = true) + # * :include + # add given paths to $LOAD_PATH + # * :require + # require the given libraries + # + # Additional options for profiling app initialization include: + # * :heapfile + # location for ObjectSpace.dump_all to write the output to + # * :profile_file + # location for CPU/Memory (StackProf) profile output (defaults to a tempfile) + # * :profile_mode + # StackProf profile mode (cpu|wall|object) + # + # @return [Server] a new instance of Server + # + # source://rackup//lib/rackup/server.rb#230 + def initialize(options = T.unsafe(nil)); end + + # source://rackup//lib/rackup/server.rb#262 + def app; end + + # source://rackup//lib/rackup/server.rb#248 + def default_options; end + + # source://rackup//lib/rackup/server.rb#296 + def middleware; end + + # source://rackup//lib/rackup/server.rb#243 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://rackup//lib/rackup/server.rb#185 + def options=(_arg0); end + + # source://rackup//lib/rackup/server.rb#344 + def server; end + + # source://rackup//lib/rackup/server.rb#300 + def start(&block); end + + private + + # source://rackup//lib/rackup/server.rb#413 + def build_app(app); end + + # source://rackup//lib/rackup/server.rb#349 + def build_app_and_options_from_config; end + + # source://rackup//lib/rackup/server.rb#395 + def build_app_from_string; end + + # source://rackup//lib/rackup/server.rb#442 + def check_pid!; end + + # source://rackup//lib/rackup/server.rb#427 + def daemonize_app; end + + # source://rackup//lib/rackup/server.rb#456 + def exit_with_pid(pid); end + + # source://rackup//lib/rackup/server.rb#357 + def handle_profiling(heapfile, profile_mode, filename); end + + # source://rackup//lib/rackup/server.rb#385 + def make_profile_name(filename); end + + # source://rackup//lib/rackup/server.rb#409 + def opt_parser; end + + # source://rackup//lib/rackup/server.rb#399 + def parse_options(args); end + + # source://rackup//lib/rackup/server.rb#423 + def wrapped_app; end + + # source://rackup//lib/rackup/server.rb#434 + def write_pid; end + + class << self + # source://rackup//lib/rackup/server.rb#273 + def default_middleware_by_environment; end + + # source://rackup//lib/rackup/server.rb#267 + def logging_middleware; end + + # source://rackup//lib/rackup/server.rb#291 + def middleware; end + + # Start a new rack server (like running rackup). This will parse ARGV and + # provide standard ARGV rackup options, defaulting to load 'config.ru'. + # + # Providing an options hash will prevent ARGV parsing and will not include + # any default options. + # + # This method can be used to very easily launch a CGI application, for + # example: + # + # Rack::Server.start( + # :app => lambda do |e| + # [200, {'content-type' => 'text/html'}, ['hello world']] + # end, + # :server => 'cgi' + # ) + # + # Further options available here are documented on Rack::Server#initialize + # + # source://rackup//lib/rackup/server.rb#181 + def start(options = T.unsafe(nil)); end + end +end + +# source://rackup//lib/rackup/server.rb#23 +class Rackup::Server::Options + # source://rackup//lib/rackup/server.rb#143 + def handler_opts(options); end + + # source://rackup//lib/rackup/server.rb#24 + def parse!(args); end +end + +# source://rackup//lib/rackup/version.rb#7 +Rackup::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rails-dom-testing@2.1.1.rbi b/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi similarity index 68% rename from sorbet/rbi/gems/rails-dom-testing@2.1.1.rbi rename to sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi index 0d8805c94..cdf45a805 100644 --- a/sorbet/rbi/gems/rails-dom-testing@2.1.1.rbi +++ b/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi @@ -4,195 +4,210 @@ # This is an autogenerated file for types exported from the `rails-dom-testing` gem. # Please instead update this file by running `bin/tapioca gem rails-dom-testing`. -# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#6 -class HTMLSelector - include ::Minitest::Assertions - - # @return [HTMLSelector] a new instance of HTMLSelector - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#11 - def initialize(values, previous_selection = T.unsafe(nil), &root_fallback); end - - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#41 - def context; end - - # Returns the value of attribute css_selector. - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#7 - def css_selector; end - - # Returns the value of attribute message. - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#7 - def message; end - - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#33 - def select; end - - # @return [Boolean] - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#27 - def selecting_no_body?; end - - # Returns the value of attribute tests. - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#7 - def tests; end - - private - - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#95 - def extract_equality_tests; end - - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#67 - def extract_root(previous_selection, root_fallback); end - - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#84 - def extract_selectors; end - - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#43 - def filter(matches); end - - class << self - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#41 - def context; end - end -end - -# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#39 -HTMLSelector::NO_STRIP = T.let(T.unsafe(nil), Array) - -# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#1 +# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#3 module Rails class << self - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.0.8/lib/rails.rb#38 def app_class; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.0.8/lib/rails.rb#38 def app_class=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#39 + # source://railties/7.0.8/lib/rails.rb#39 def application; end - # source://railties/7.0.6/lib/rails.rb#37 + # source://railties/7.0.8/lib/rails.rb#37 def application=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#123 + # source://railties/7.0.8/lib/rails.rb#123 def autoloaders; end - # source://railties/7.0.6/lib/rails.rb#50 + # source://railties/7.0.8/lib/rails.rb#50 def backtrace_cleaner; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.0.8/lib/rails.rb#38 def cache; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.0.8/lib/rails.rb#38 def cache=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#46 + # source://railties/7.0.8/lib/rails.rb#46 def configuration; end - # source://railties/7.0.6/lib/rails.rb#72 + # source://railties/7.0.8/lib/rails.rb#72 def env; end - # source://railties/7.0.6/lib/rails.rb#79 + # source://railties/7.0.8/lib/rails.rb#79 def env=(environment); end - # source://railties/7.0.6/lib/rails.rb#90 + # source://railties/7.0.8/lib/rails.rb#90 def error; end - # source://railties/7.0.6/lib/rails/gem_version.rb#5 + # source://railties/7.0.8/lib/rails/gem_version.rb#5 def gem_version; end - # source://railties/7.0.6/lib/rails.rb#103 + # source://railties/7.0.8/lib/rails.rb#103 def groups(*groups); end - # source://railties/7.0.6/lib/rails.rb#43 + # source://railties/7.0.8/lib/rails.rb#43 def initialize!(*_arg0, **_arg1, &_arg2); end - # source://railties/7.0.6/lib/rails.rb#43 + # source://railties/7.0.8/lib/rails.rb#43 def initialized?(*_arg0, **_arg1, &_arg2); end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.0.8/lib/rails.rb#38 def logger; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.0.8/lib/rails.rb#38 def logger=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#119 + # source://railties/7.0.8/lib/rails.rb#119 def public_path; end - # source://railties/7.0.6/lib/rails.rb#63 + # source://railties/7.0.8/lib/rails.rb#63 def root; end - # source://railties/7.0.6/lib/rails/version.rb#7 + # source://railties/7.0.8/lib/rails/version.rb#7 def version; end end end -# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#2 +# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#4 module Rails::Dom; end -# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#3 -module Rails::Dom::Testing; end +# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#5 +module Rails::Dom::Testing + # source://rails-dom-testing//lib/rails/dom/testing.rb#12 + def default_html_version; end -# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#4 + # source://rails-dom-testing//lib/rails/dom/testing.rb#12 + def default_html_version=(val); end + + class << self + # source://rails-dom-testing//lib/rails/dom/testing.rb#12 + def default_html_version; end + + # source://rails-dom-testing//lib/rails/dom/testing.rb#12 + def default_html_version=(val); end + + # @return [Boolean] + # + # source://rails-dom-testing//lib/rails/dom/testing.rb#15 + def html5_support?; end + + # source://rails-dom-testing//lib/rails/dom/testing.rb#19 + def html_document(html_version: T.unsafe(nil)); end + + # source://rails-dom-testing//lib/rails/dom/testing.rb#26 + def html_document_fragment(html_version: T.unsafe(nil)); end + + private + + # source://rails-dom-testing//lib/rails/dom/testing.rb#34 + def choose_html_parser(parser_classes, html_version: T.unsafe(nil)); end + end +end + +# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#6 module Rails::Dom::Testing::Assertions include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable include ::Rails::Dom::Testing::Assertions::SelectorAssertions end -# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#5 +# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#7 module Rails::Dom::Testing::Assertions::DomAssertions # \Test two HTML strings for equivalency (e.g., equal even when attributes are in another order) # # # assert that the referenced method generates the appropriate HTML string - # assert_dom_equal 'Apples', link_to("Apples", "http://www.example.com") + # assert_dom_equal( + # 'Apples', + # link_to("Apples", "http://www.example.com"), + # ) + # + # By default, the matcher will not pay attention to whitespace in text nodes (e.g., spaces + # and newlines). If you want stricter matching with exact matching for whitespace, pass + # strict: true: # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#10 - def assert_dom_equal(expected, actual, message = T.unsafe(nil), strict: T.unsafe(nil)); end + # # these assertions will both pass + # assert_dom_equal "
\nfoo\n\
", "
foo
", strict: false + # assert_dom_not_equal "
\nfoo\n\
", "
foo
", strict: true + # + # The DOMs are created using an HTML parser specified by + # Rails::Dom::Testing.default_html_version (either :html4 or :html5). + # + # When testing in a Rails application, the parser default can also be set by setting + # +Rails.application.config.dom_testing_default_html_version+. + # + # If you want to specify the HTML parser just for a particular assertion, pass + # html_version: :html4 or html_version: :html5 keyword arguments: + # + # assert_dom_equal expected, actual, html_version: :html5 + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#35 + def assert_dom_equal(expected, actual, message = T.unsafe(nil), strict: T.unsafe(nil), html_version: T.unsafe(nil)); end # The negated form of +assert_dom_equal+. # # # assert that the referenced method does not generate the specified HTML string - # assert_dom_not_equal 'Apples', link_to("Oranges", "http://www.example.com") + # assert_dom_not_equal( + # 'Apples', + # link_to("Oranges", "http://www.example.com"), + # ) + # + # By default, the matcher will not pay attention to whitespace in text nodes (e.g., spaces + # and newlines). If you want stricter matching with exact matching for whitespace, pass + # strict: true: + # + # # these assertions will both pass + # assert_dom_equal "
\nfoo\n\
", "
foo
", strict: false + # assert_dom_not_equal "
\nfoo\n\
", "
foo
", strict: true + # + # The DOMs are created using an HTML parser specified by + # Rails::Dom::Testing.default_html_version (either :html4 or :html5). + # + # When testing in a Rails application, the parser default can also be set by setting + # +Rails.application.config.dom_testing_default_html_version+. + # + # If you want to specify the HTML parser just for a particular assertion, pass + # html_version: :html4 or html_version: :html5 keyword arguments: # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#20 - def assert_dom_not_equal(expected, actual, message = T.unsafe(nil), strict: T.unsafe(nil)); end + # assert_dom_not_equal expected, actual, html_version: :html5 + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#68 + def assert_dom_not_equal(expected, actual, message = T.unsafe(nil), strict: T.unsafe(nil), html_version: T.unsafe(nil)); end protected - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#28 + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#75 def compare_doms(expected, actual, strict); end # @return [Boolean] # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#81 + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#128 def equal_attribute?(attr, other_attr); end # @return [Boolean] # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#68 + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#115 def equal_attribute_nodes?(nodes, other_nodes); end # @return [Boolean] # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#60 + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#107 def equal_child?(child, other_child, strict); end # @return [Boolean] # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#48 + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#95 def equal_children?(child, other_child, strict); end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#40 + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#87 def extract_children(node, strict); end private - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#87 - def fragment(text); end + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#133 + def fragment(text, html_version: T.unsafe(nil)); end end # Adds the +assert_dom+ method for use in Rails functional @@ -208,10 +223,8 @@ end # * +assert_dom_encoded+ - Assertions on HTML encoded inside XML, for example for dealing with feed item descriptions. # * +assert_dom_email+ - Assertions on the HTML body of an e-mail. # -# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/count_describable.rb#5 +# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#7 module Rails::Dom::Testing::Assertions::SelectorAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable - # An assertion that selects elements and makes one or more equality tests. # # If the first argument is an element, selects all matching elements @@ -318,19 +331,34 @@ module Rails::Dom::Testing::Assertions::SelectorAssertions # You must enable deliveries for this assertion to work, use: # ActionMailer::Base.perform_deliveries = true # - # assert_dom_email do - # assert_dom "h1", "Email alert" - # end + # Example usage: + # + # assert_dom_email do + # assert_dom "h1", "Email alert" + # end + # + # assert_dom_email do + # items = assert_dom "ol>li" + # items.each do + # # Work with items here... + # end + # end + # + # The DOM is created using an HTML parser specified by + # Rails::Dom::Testing.default_html_version (either :html4 or :html5). + # + # When testing in a Rails application, the parser default can also be set by setting + # +Rails.application.config.dom_testing_default_html_version+. # - # assert_dom_email do - # items = assert_dom "ol>li" - # items.each do - # # Work with items here... - # end - # end + # If you want to specify the HTML parser just for a particular assertion, pass + # html_version: :html4 or html_version: :html5 keyword arguments: # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#251 - def assert_dom_email(&block); end + # assert_dom_email(html_version: :html5) do + # assert_dom "h1", "Email alert" + # end + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#285 + def assert_dom_email(html_version: T.unsafe(nil), &block); end # Extracts the content of an element, treats it as encoded HTML and runs # nested assertion on it. @@ -365,8 +393,25 @@ module Rails::Dom::Testing::Assertions::SelectorAssertions # end # end # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#214 - def assert_dom_encoded(element = T.unsafe(nil), &block); end + # The DOM is created using an HTML parser specified by + # Rails::Dom::Testing.default_html_version (either :html4 or :html5). + # + # When testing in a Rails application, the parser default can also be set by setting + # +Rails.application.config.dom_testing_default_html_version+. + # + # If you want to specify the HTML parser just for a particular assertion, pass + # html_version: :html4 or html_version: :html5 keyword arguments: + # + # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do + # assert_dom "entry>title" do + # assert_dom_encoded(html_version: :html5) do + # assert_dom "b" + # end + # end + # end + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#232 + def assert_dom_encoded(element = T.unsafe(nil), html_version: T.unsafe(nil), &block); end # An assertion that selects elements and makes one or more equality tests. # @@ -474,19 +519,34 @@ module Rails::Dom::Testing::Assertions::SelectorAssertions # You must enable deliveries for this assertion to work, use: # ActionMailer::Base.perform_deliveries = true # - # assert_dom_email do - # assert_dom "h1", "Email alert" - # end + # Example usage: + # + # assert_dom_email do + # assert_dom "h1", "Email alert" + # end + # + # assert_dom_email do + # items = assert_dom "ol>li" + # items.each do + # # Work with items here... + # end + # end + # + # The DOM is created using an HTML parser specified by + # Rails::Dom::Testing.default_html_version (either :html4 or :html5). # - # assert_dom_email do - # items = assert_dom "ol>li" - # items.each do - # # Work with items here... - # end - # end + # When testing in a Rails application, the parser default can also be set by setting + # +Rails.application.config.dom_testing_default_html_version+. # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#251 - def assert_select_email(&block); end + # If you want to specify the HTML parser just for a particular assertion, pass + # html_version: :html4 or html_version: :html5 keyword arguments: + # + # assert_dom_email(html_version: :html5) do + # assert_dom "h1", "Email alert" + # end + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#285 + def assert_select_email(html_version: T.unsafe(nil), &block); end # Extracts the content of an element, treats it as encoded HTML and runs # nested assertion on it. @@ -521,8 +581,25 @@ module Rails::Dom::Testing::Assertions::SelectorAssertions # end # end # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#214 - def assert_select_encoded(element = T.unsafe(nil), &block); end + # The DOM is created using an HTML parser specified by + # Rails::Dom::Testing.default_html_version (either :html4 or :html5). + # + # When testing in a Rails application, the parser default can also be set by setting + # +Rails.application.config.dom_testing_default_html_version+. + # + # If you want to specify the HTML parser just for a particular assertion, pass + # html_version: :html4 or html_version: :html5 keyword arguments: + # + # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do + # assert_dom "entry>title" do + # assert_dom_encoded(html_version: :html5) do + # assert_dom "b" + # end + # end + # end + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#232 + def assert_select_encoded(element = T.unsafe(nil), html_version: T.unsafe(nil), &block); end # Select and return all matching elements. # @@ -570,52 +647,108 @@ module Rails::Dom::Testing::Assertions::SelectorAssertions # +equals+ must contain :minimum, :maximum and :count keys # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#275 + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#307 def assert_size_match!(size, equals, css_selector, message = T.unsafe(nil)); end + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#319 + def count_description(min, max, count); end + # @raise [NotImplementedError] # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#269 + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#301 def document_root_element; end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#287 + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#335 def nest_selection(selection); end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#296 + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#344 def nodeset(node); end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#331 + def pluralize_element(quantity); end end -# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/count_describable.rb#6 -module Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable +# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#12 +class Rails::Dom::Testing::Assertions::SelectorAssertions::HTMLSelector + include ::Minitest::Assertions + + # @return [HTMLSelector] a new instance of HTMLSelector + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#17 + def initialize(values, previous_selection = T.unsafe(nil), &root_fallback); end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#46 + def context; end + + # Returns the value of attribute css_selector. + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#13 + def css_selector; end + + # Returns the value of attribute message. + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#13 + def message; end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#39 + def select; end + + # @return [Boolean] + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#33 + def selecting_no_body?; end + + # Returns the value of attribute tests. + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#13 + def tests; end + private - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/count_describable.rb#8 - def count_description(min, max, count); end + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#100 + def extract_equality_tests; end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/count_describable.rb#20 - def pluralize_element(quantity); end + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#72 + def extract_root(previous_selection, root_fallback); end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#89 + def extract_selectors; end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#48 + def filter(matches); end + + class << self + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#46 + def context; end + end end -# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#1 -class SubstitutionContext +# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#44 +Rails::Dom::Testing::Assertions::SelectorAssertions::HTMLSelector::NO_STRIP = T.let(T.unsafe(nil), Array) + +# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#8 +class Rails::Dom::Testing::Assertions::SelectorAssertions::SubstitutionContext # @return [SubstitutionContext] a new instance of SubstitutionContext # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#2 + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#9 def initialize; end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#13 + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#20 def match(matches, attribute, matcher); end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#6 + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#13 def substitute!(selector, values, format_for_presentation = T.unsafe(nil)); end private - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#18 + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#25 def matcher_for(value, format_for_presentation); end # @return [Boolean] # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#27 + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#36 def substitutable?(value); end end + +# source://rails-dom-testing//lib/rails/dom/testing/railtie.rb#6 +class Rails::Dom::Testing::Railtie < ::Rails::Railtie; end diff --git a/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi b/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi index 2c20d33bf..04f6592ca 100644 --- a/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +++ b/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi @@ -7,13 +7,13 @@ # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#14 module ActionView class << self - # source://actionview/7.0.5/lib/action_view.rb#90 + # source://actionview/7.0.8/lib/action_view.rb#90 def eager_load!; end - # source://actionview/7.0.5/lib/action_view/gem_version.rb#5 + # source://actionview/7.0.8/lib/action_view/gem_version.rb#5 def gem_version; end - # source://actionview/7.0.5/lib/action_view/version.rb#7 + # source://actionview/7.0.8/lib/action_view/version.rb#7 def version; end end end @@ -33,7 +33,7 @@ module ActionView::Helpers mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods class << self - # source://actionview/7.0.5/lib/action_view/helpers.rb#34 + # source://actionview/7.0.8/lib/action_view/helpers.rb#34 def eager_load!; end end end @@ -42,40 +42,40 @@ end module ActionView::Helpers::SanitizeHelper mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods - # source://actionview/7.0.5/lib/action_view/helpers/sanitize_helper.rb#81 + # source://actionview/7.0.8/lib/action_view/helpers/sanitize_helper.rb#81 def sanitize(html, options = T.unsafe(nil)); end - # source://actionview/7.0.5/lib/action_view/helpers/sanitize_helper.rb#86 + # source://actionview/7.0.8/lib/action_view/helpers/sanitize_helper.rb#86 def sanitize_css(style); end - # source://actionview/7.0.5/lib/action_view/helpers/sanitize_helper.rb#120 + # source://actionview/7.0.8/lib/action_view/helpers/sanitize_helper.rb#120 def strip_links(html); end - # source://actionview/7.0.5/lib/action_view/helpers/sanitize_helper.rb#103 + # source://actionview/7.0.8/lib/action_view/helpers/sanitize_helper.rb#103 def strip_tags(html); end end # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#17 module ActionView::Helpers::SanitizeHelper::ClassMethods - # source://actionview/7.0.5/lib/action_view/helpers/sanitize_helper.rb#145 + # source://actionview/7.0.8/lib/action_view/helpers/sanitize_helper.rb#145 def full_sanitizer; end - # source://actionview/7.0.5/lib/action_view/helpers/sanitize_helper.rb#125 + # source://actionview/7.0.8/lib/action_view/helpers/sanitize_helper.rb#125 def full_sanitizer=(_arg0); end - # source://actionview/7.0.5/lib/action_view/helpers/sanitize_helper.rb#155 + # source://actionview/7.0.8/lib/action_view/helpers/sanitize_helper.rb#155 def link_sanitizer; end - # source://actionview/7.0.5/lib/action_view/helpers/sanitize_helper.rb#125 + # source://actionview/7.0.8/lib/action_view/helpers/sanitize_helper.rb#125 def link_sanitizer=(_arg0); end - # source://actionview/7.0.5/lib/action_view/helpers/sanitize_helper.rb#165 + # source://actionview/7.0.8/lib/action_view/helpers/sanitize_helper.rb#165 def safe_list_sanitizer; end - # source://actionview/7.0.5/lib/action_view/helpers/sanitize_helper.rb#125 + # source://actionview/7.0.8/lib/action_view/helpers/sanitize_helper.rb#125 def safe_list_sanitizer=(_arg0); end - # source://actionview/7.0.5/lib/action_view/helpers/sanitize_helper.rb#135 + # source://actionview/7.0.8/lib/action_view/helpers/sanitize_helper.rb#135 def sanitized_allowed_attributes; end # Replaces the allowed HTML attributes for the +sanitize+ helper. @@ -105,7 +105,7 @@ module ActionView::Helpers::SanitizeHelper::ClassMethods # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 def sanitized_allowed_protocols=(_); end - # source://actionview/7.0.5/lib/action_view/helpers/sanitize_helper.rb#131 + # source://actionview/7.0.8/lib/action_view/helpers/sanitize_helper.rb#131 def sanitized_allowed_tags; end # Replaces the allowed tags for the +sanitize+ helper. @@ -141,7 +141,7 @@ module ActionView::Helpers::SanitizeHelper::ClassMethods # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 def sanitized_uri_attributes=(_); end - # source://actionview/7.0.5/lib/action_view/helpers/sanitize_helper.rb#127 + # source://actionview/7.0.8/lib/action_view/helpers/sanitize_helper.rb#127 def sanitizer_vendor; end private @@ -153,67 +153,67 @@ end # source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#3 module Rails class << self - # source://railties/7.0.5/lib/rails.rb#38 + # source://railties/7.0.8/lib/rails.rb#38 def app_class; end - # source://railties/7.0.5/lib/rails.rb#38 + # source://railties/7.0.8/lib/rails.rb#38 def app_class=(_arg0); end - # source://railties/7.0.5/lib/rails.rb#39 + # source://railties/7.0.8/lib/rails.rb#39 def application; end - # source://railties/7.0.5/lib/rails.rb#37 + # source://railties/7.0.8/lib/rails.rb#37 def application=(_arg0); end - # source://railties/7.0.5/lib/rails.rb#123 + # source://railties/7.0.8/lib/rails.rb#123 def autoloaders; end - # source://railties/7.0.5/lib/rails.rb#50 + # source://railties/7.0.8/lib/rails.rb#50 def backtrace_cleaner; end - # source://railties/7.0.5/lib/rails.rb#38 + # source://railties/7.0.8/lib/rails.rb#38 def cache; end - # source://railties/7.0.5/lib/rails.rb#38 + # source://railties/7.0.8/lib/rails.rb#38 def cache=(_arg0); end - # source://railties/7.0.5/lib/rails.rb#46 + # source://railties/7.0.8/lib/rails.rb#46 def configuration; end - # source://railties/7.0.5/lib/rails.rb#72 + # source://railties/7.0.8/lib/rails.rb#72 def env; end - # source://railties/7.0.5/lib/rails.rb#79 + # source://railties/7.0.8/lib/rails.rb#79 def env=(environment); end - # source://railties/7.0.5/lib/rails.rb#90 + # source://railties/7.0.8/lib/rails.rb#90 def error; end - # source://railties/7.0.5/lib/rails/gem_version.rb#5 + # source://railties/7.0.8/lib/rails/gem_version.rb#5 def gem_version; end - # source://railties/7.0.5/lib/rails.rb#103 + # source://railties/7.0.8/lib/rails.rb#103 def groups(*groups); end - # source://railties/7.0.5/lib/rails.rb#43 + # source://railties/7.0.8/lib/rails.rb#43 def initialize!(*_arg0, **_arg1, &_arg2); end - # source://railties/7.0.5/lib/rails.rb#43 + # source://railties/7.0.8/lib/rails.rb#43 def initialized?(*_arg0, **_arg1, &_arg2); end - # source://railties/7.0.5/lib/rails.rb#38 + # source://railties/7.0.8/lib/rails.rb#38 def logger; end - # source://railties/7.0.5/lib/rails.rb#38 + # source://railties/7.0.8/lib/rails.rb#38 def logger=(_arg0); end - # source://railties/7.0.5/lib/rails.rb#119 + # source://railties/7.0.8/lib/rails.rb#119 def public_path; end - # source://railties/7.0.5/lib/rails.rb#63 + # source://railties/7.0.8/lib/rails.rb#63 def root; end - # source://railties/7.0.5/lib/rails/version.rb#7 + # source://railties/7.0.8/lib/rails/version.rb#7 def version; end end end diff --git a/sorbet/rbi/gems/rails@7.0.6.rbi b/sorbet/rbi/gems/rails@7.1.3.2.rbi similarity index 100% rename from sorbet/rbi/gems/rails@7.0.6.rbi rename to sorbet/rbi/gems/rails@7.1.3.2.rbi diff --git a/sorbet/rbi/gems/railties@7.0.6.rbi b/sorbet/rbi/gems/railties@7.1.3.2.rbi similarity index 70% rename from sorbet/rbi/gems/railties@7.0.6.rbi rename to sorbet/rbi/gems/railties@7.1.3.2.rbi index b09bc0a4a..3aff7efac 100644 --- a/sorbet/rbi/gems/railties@7.0.6.rbi +++ b/sorbet/rbi/gems/railties@7.1.3.2.rbi @@ -4,7 +4,9 @@ # This is an autogenerated file for types exported from the `railties` gem. # Please instead update this file by running `bin/tapioca gem railties`. -# source://railties//lib/rails/initializable.rb#5 +# :include: railties/README.rdoc +# +# source://railties//lib/rails/gem_version.rb#3 module Rails extend ::ActiveSupport::Autoload extend ::ActiveSupport::Benchmarkable @@ -12,50 +14,53 @@ module Rails class << self # Returns the value of attribute app_class. # - # source://railties//lib/rails.rb#38 + # source://railties//lib/rails.rb#42 def app_class; end # Sets the attribute app_class # # @param value the value to set the attribute app_class to. # - # source://railties//lib/rails.rb#38 + # source://railties//lib/rails.rb#42 def app_class=(_arg0); end - # source://railties//lib/rails.rb#39 + # source://railties//lib/rails.rb#43 def application; end # Sets the attribute application # # @param value the value to set the attribute application to. # - # source://railties//lib/rails.rb#37 + # source://railties//lib/rails.rb#41 def application=(_arg0); end # source://railties//lib/rails.rb#123 def autoloaders; end - # source://railties//lib/rails.rb#50 + # source://railties//lib/rails.rb#54 def backtrace_cleaner; end # Returns the value of attribute cache. # - # source://railties//lib/rails.rb#38 + # source://railties//lib/rails.rb#42 def cache; end # Sets the attribute cache # # @param value the value to set the attribute cache to. # - # source://railties//lib/rails.rb#38 + # source://railties//lib/rails.rb#42 def cache=(_arg0); end - # The Configuration instance used to configure the Rails environment + # The Configuration instance used to configure the \Rails environment # - # source://railties//lib/rails.rb#46 + # source://railties//lib/rails.rb#50 def configuration; end - # Returns the current Rails environment. + # source://railties//lib/rails/deprecator.rb#4 + def deprecator; end + + # Returns the current \Rails environment. # # Rails.env # => "development" # Rails.env.development? # => true @@ -64,14 +69,14 @@ module Rails # source://railties//lib/rails.rb#72 def env; end - # Sets the Rails environment. + # Sets the \Rails environment. # # Rails.env = "staging" # => "staging" # # source://railties//lib/rails.rb#79 def env=(environment); end - # Returns the ActiveSupport::ErrorReporter of the current Rails project, + # Returns the ActiveSupport::ErrorReporter of the current \Rails project, # otherwise it returns +nil+ if there is no project. # # Rails.error.handle(IOError) do @@ -82,14 +87,14 @@ module Rails # source://railties//lib/rails.rb#90 def error; end - # Returns the currently loaded version of Rails as a Gem::Version. + # Returns the currently loaded version of \Rails as a +Gem::Version+. # # source://railties//lib/rails/gem_version.rb#5 def gem_version; end - # Returns all Rails groups for loading based on: + # Returns all \Rails groups for loading based on: # - # * The Rails environment; + # * The \Rails environment; # * The environment variable RAILS_GROUPS; # * The optional envs given as argument and the hash with group dependencies; # @@ -100,26 +105,26 @@ module Rails # source://railties//lib/rails.rb#103 def groups(*groups); end - # source://railties//lib/rails.rb#43 + # source://railties//lib/rails.rb#47 def initialize!(*_arg0, **_arg1, &_arg2); end - # source://railties//lib/rails.rb#43 + # source://railties//lib/rails.rb#47 def initialized?(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute logger. # - # source://railties//lib/rails.rb#38 + # source://railties//lib/rails.rb#42 def logger; end # Sets the attribute logger # # @param value the value to set the attribute logger to. # - # source://railties//lib/rails.rb#38 + # source://railties//lib/rails.rb#42 def logger=(_arg0); end # Returns a Pathname object of the public folder of the current - # Rails project, otherwise it returns +nil+ if there is no project: + # \Rails project, otherwise it returns +nil+ if there is no project: # # Rails.public_path # # => # @@ -127,7 +132,7 @@ module Rails # source://railties//lib/rails.rb#119 def public_path; end - # Returns a Pathname object of the current Rails project, + # Returns a Pathname object of the current \Rails project, # otherwise it returns +nil+ if there is no project: # # Rails.root @@ -136,7 +141,7 @@ module Rails # source://railties//lib/rails.rb#63 def root; end - # Returns the currently loaded version of Rails as a string. + # Returns the currently loaded version of \Rails as a string. # # source://railties//lib/rails/version.rb#7 def version; end @@ -156,7 +161,7 @@ end # # Besides providing the same configuration as Rails::Engine and Rails::Railtie, # the application object has several specific configurations, for example -# +cache_classes+, +consider_all_requests_local+, +filter_parameters+, +# +enable_reloading+, +consider_all_requests_local+, +filter_parameters+, # +logger+, and so forth. # # Check Rails::Application::Configuration to see them all. @@ -189,46 +194,45 @@ end # 10. Run +config.before_eager_load+ and +eager_load!+ if +eager_load+ is +true+. # 11. Run +config.after_initialize+ callbacks. # -# source://railties//lib/rails/application.rb#61 +# source://railties//lib/rails/application.rb#62 class Rails::Application < ::Rails::Engine # @return [Application] a new instance of Application # - # source://railties//lib/rails/application.rb#106 + # source://railties//lib/rails/application.rb#109 def initialize(initial_variable_values = T.unsafe(nil), &block); end # Returns the value of attribute assets. # - # source://railties//lib/rails/application.rb#97 + # source://railties//lib/rails/application.rb#100 def assets; end # Sets the attribute assets # # @param value the value to set the attribute assets to. # - # source://railties//lib/rails/application.rb#97 + # source://railties//lib/rails/application.rb#100 def assets=(_arg0); end # Returns the value of attribute autoloaders. # - # source://railties//lib/rails/application.rb#99 + # source://railties//lib/rails/application.rb#102 def autoloaders; end - # source://railties//lib/rails/engine.rb#511 + # source://railties//lib/rails/engine.rb#517 def build_middleware_stack; end - # source://railties//lib/rails/application.rb#383 + # source://railties//lib/rails/application.rb#437 def config; end # Sets the attribute config # # @param value the value to set the attribute config to. # - # source://railties//lib/rails/application.rb#387 + # source://railties//lib/rails/application.rb#441 def config=(_arg0); end - # Convenience for loading config/foo.yml for the current Rails env. - # - # Examples: + # Convenience for loading config/foo.yml for the current \Rails env. + # Example: # # # config/exception_notification.yml: # production: @@ -239,13 +243,15 @@ class Rails::Application < ::Rails::Engine # url: http://localhost:3001 # namespace: my_app_development # + # + # # # config/environments/production.rb # Rails.application.configure do # config.middleware.use ExceptionNotifier, config_for(:exception_notification) # end # - # # You can also store configurations in a shared section which will be - # # merged with the environment configuration + # You can also store configurations in a shared section which will be merged + # with the environment configuration # # # config/example.yml # shared: @@ -258,17 +264,19 @@ class Rails::Application < ::Rails::Engine # bar: # qux: 2 # + # + # # # development environment # Rails.application.config_for(:example)[:foo][:bar] # # => { baz: 1, qux: 2 } # - # source://railties//lib/rails/application.rb#221 + # source://railties//lib/rails/application.rb#274 def config_for(name, env: T.unsafe(nil)); end # Sends any console called in the instance of a new application up # to the +console+ method defined in Rails::Railtie. # - # source://railties//lib/rails/application.rb#303 + # source://railties//lib/rails/application.rb#357 def console(&blk); end # Returns an ActiveSupport::EncryptedConfiguration instance for the @@ -286,25 +294,33 @@ class Rails::Application < ::Rails::Engine # config/credentials/#{environment}.key for the current # environment, or +config/master.key+ if that file does not exist. # - # source://railties//lib/rails/application.rb#439 + # source://railties//lib/rails/application.rb#516 def credentials; end # Sets the attribute credentials # # @param value the value to set the attribute credentials to. # - # source://railties//lib/rails/application.rb#403 + # source://railties//lib/rails/application.rb#460 def credentials=(_arg0); end - # source://railties//lib/rails/application.rb#101 + # source://railties//lib/rails/application.rb#104 def default_url_options(*_arg0, **_arg1, &_arg2); end - # source://railties//lib/rails/application.rb#101 + # source://railties//lib/rails/application.rb#104 def default_url_options=(arg); end + # A managed collection of deprecators (ActiveSupport::Deprecation::Deprecators). + # The collection's configuration methods affect all deprecators in the + # collection. Additionally, the collection's +silence+ method silences all + # deprecators in the collection for the duration of a given block. + # + # source://railties//lib/rails/application.rb#230 + def deprecators; end + # Eager loads the application code. # - # source://railties//lib/rails/application.rb#492 + # source://railties//lib/rails/application.rb#574 def eager_load!; end # Returns an ActiveSupport::EncryptedConfiguration instance for an encrypted @@ -323,61 +339,67 @@ class Rails::Application < ::Rails::Engine # command. (See the output of bin/rails encrypted:edit --help for # more information.) # - # source://railties//lib/rails/application.rb#458 + # source://railties//lib/rails/application.rb#535 def encrypted(path, key_path: T.unsafe(nil), env_key: T.unsafe(nil)); end - # Stores some of the Rails initial environment parameters which + # Stores some of the \Rails initial environment parameters which # will be used by middlewares and engines to configure themselves. # - # source://railties//lib/rails/application.rb#250 + # source://railties//lib/rails/application.rb#303 def env_config; end # Returns the value of attribute executor. # - # source://railties//lib/rails/application.rb#99 + # source://railties//lib/rails/application.rb#102 def executor; end # Sends any generators called in the instance of a new application up # to the +generators+ method defined in Rails::Railtie. # - # source://railties//lib/rails/application.rb#309 + # source://railties//lib/rails/application.rb#363 def generators(&blk); end - # source://railties//lib/rails/application.rb#471 + # source://railties//lib/rails/application.rb#548 def helpers_paths; end # Initialize the application passing the given group. By default, the # group is :default # - # source://railties//lib/rails/application.rb#370 + # source://railties//lib/rails/application.rb#424 def initialize!(group = T.unsafe(nil)); end # Returns true if the application is initialized. # # @return [Boolean] # - # source://railties//lib/rails/application.rb#129 + # source://railties//lib/rails/application.rb#134 def initialized?; end # Sends the initializers to the +initializer+ method defined in the # Rails::Initializable module. Each Rails::Application class has its own # set of initializers, as defined by the Initializable module. # - # source://railties//lib/rails/application.rb#291 + # source://railties//lib/rails/application.rb#345 def initializer(name, opts = T.unsafe(nil), &block); end - # source://railties//lib/rails/application.rb#377 + # source://railties//lib/rails/application.rb#431 def initializers; end # Sends the +isolate_namespace+ method up to the class method. # - # source://railties//lib/rails/application.rb#320 + # source://railties//lib/rails/application.rb#374 def isolate_namespace(mod); end - # Returns the application's KeyGenerator + # Returns a key generator (ActiveSupport::CachingKeyGenerator) for a + # specified +secret_key_base+. The return value is memoized, so additional + # calls with the same +secret_key_base+ will return the same key generator + # instance. # - # source://railties//lib/rails/application.rb#153 - def key_generator; end + # source://railties//lib/rails/application.rb#161 + def key_generator(secret_key_base = T.unsafe(nil)); end + + # source://railties//lib/rails/application.rb#568 + def load_generators(app = T.unsafe(nil)); end # Returns a message verifier object. # @@ -398,9 +420,40 @@ class Rails::Application < ::Rails::Engine # # See the ActiveSupport::MessageVerifier documentation for more information. # - # source://railties//lib/rails/application.rb#179 + # source://railties//lib/rails/application.rb#222 def message_verifier(verifier_name); end + # Returns a message verifier factory (ActiveSupport::MessageVerifiers). This + # factory can be used as a central point to configure and create message + # verifiers (ActiveSupport::MessageVerifier) for your application. + # + # By default, message verifiers created by this factory will generate + # messages using the default ActiveSupport::MessageVerifier options. You can + # override these options with a combination of + # ActiveSupport::MessageVerifiers#clear_rotations and + # ActiveSupport::MessageVerifiers#rotate. However, this must be done prior + # to building any message verifier instances. For example, in a + # +before_initialize+ block: + # + # # Use `url_safe: true` when generating messages + # config.before_initialize do |app| + # app.message_verifiers.clear_rotations + # app.message_verifiers.rotate(url_safe: true) + # end + # + # Message verifiers created by this factory will always use a secret derived + # from #secret_key_base when generating messages. +clear_rotations+ will not + # affect this behavior. However, older +secret_key_base+ values can be + # rotated for verifying messages: + # + # # Fall back to old `secret_key_base` when verifying messages + # config.before_initialize do |app| + # app.message_verifiers.rotate(secret_key_base: "old secret_key_base") + # end + # + # source://railties//lib/rails/application.rb#197 + def message_verifiers; end + # Return an array of railties respecting the order they're loaded # and the order specified by the +railties_order+ config. # @@ -408,60 +461,60 @@ class Rails::Application < ::Rails::Engine # copying migrations from railties ; we need them in the order given by # +railties_order+. # - # source://railties//lib/rails/application.rb#487 + # source://railties//lib/rails/application.rb#564 def migration_railties; end # If you try to define a set of Rake tasks on the instance, these will get # passed up to the Rake tasks defined on the application's class. # - # source://railties//lib/rails/application.rb#284 + # source://railties//lib/rails/application.rb#338 def rake_tasks(&block); end # Reload application routes regardless if they changed or not. # - # source://railties//lib/rails/application.rb#148 + # source://railties//lib/rails/application.rb#153 def reload_routes!; end # Returns the value of attribute reloader. # - # source://railties//lib/rails/application.rb#99 + # source://railties//lib/rails/application.rb#102 def reloader; end # Returns the value of attribute reloaders. # - # source://railties//lib/rails/application.rb#99 + # source://railties//lib/rails/application.rb#102 def reloaders; end - # source://railties//lib/rails/application.rb#346 + # source://railties//lib/rails/application.rb#400 def require_environment!; end - # source://railties//lib/rails/application.rb#351 + # source://railties//lib/rails/application.rb#405 def routes_reloader; end - # source://railties//lib/rails/application.rb#133 + # source://railties//lib/rails/application.rb#138 def run_load_hooks!; end # Sends any runner called in the instance of a new application up # to the +runner+ method defined in Rails::Railtie. # - # source://railties//lib/rails/application.rb#297 + # source://railties//lib/rails/application.rb#351 def runner(&blk); end # Returns the value of attribute sandbox. # - # source://railties//lib/rails/application.rb#97 + # source://railties//lib/rails/application.rb#100 def sandbox; end # Sets the attribute sandbox # # @param value the value to set the attribute sandbox to. # - # source://railties//lib/rails/application.rb#97 + # source://railties//lib/rails/application.rb#100 def sandbox=(_arg0); end # Returns the value of attribute sandbox. # - # source://railties//lib/rails/application.rb#97 + # source://railties//lib/rails/application.rb#100 def sandbox?; end # The secret_key_base is used as the input secret to the application's key generator, which in turn @@ -469,85 +522,100 @@ class Rails::Application < ::Rails::Engine # including the ones that sign and encrypt cookies. # # In development and test, this is randomly generated and stored in a - # temporary file in tmp/development_secret.txt. + # temporary file in tmp/local_secret.txt. + # + # You can also set ENV["SECRET_KEY_BASE_DUMMY"] to trigger the use of a randomly generated + # secret_key_base that's stored in a temporary file. This is useful when precompiling assets for + # production as part of a build step that otherwise does not need access to the production secrets. + # + # Dockerfile example: RUN SECRET_KEY_BASE_DUMMY=1 bundle exec rails assets:precompile. # # In all other environments, we look for it first in ENV["SECRET_KEY_BASE"], # then +credentials.secret_key_base+, and finally +secrets.secret_key_base+. For most applications, # the correct place to store it is in the encrypted credentials file. # - # source://railties//lib/rails/application.rb#415 + # source://railties//lib/rails/application.rb#478 def secret_key_base; end - # source://railties//lib/rails/application.rb#389 + # source://railties//lib/rails/application.rb#443 def secrets; end # Sets the attribute secrets # # @param value the value to set the attribute secrets to. # - # source://railties//lib/rails/application.rb#403 + # source://railties//lib/rails/application.rb#460 def secrets=(_arg0); end # Sends any server called in the instance of a new application up # to the +server+ method defined in Rails::Railtie. # - # source://railties//lib/rails/application.rb#315 + # source://railties//lib/rails/application.rb#369 def server(&blk); end - # source://railties//lib/rails/application.rb#467 + # source://railties//lib/rails/application.rb#544 def to_app; end # Returns an array of file paths appended with a hash of # directories-extensions suitable for ActiveSupport::FileUpdateChecker # API. # - # source://railties//lib/rails/application.rb#358 + # source://railties//lib/rails/application.rb#412 def watchable_args; end protected - # source://railties//lib/rails/application.rb#565 + # source://railties//lib/rails/application.rb#647 def default_middleware_stack; end + # source://railties//lib/rails/application.rb#662 + def ensure_generator_templates_added; end + # Returns the ordered railties for this application considering railties_order. # - # source://railties//lib/rails/application.rb#531 + # source://railties//lib/rails/application.rb#613 def ordered_railties; end - # source://railties//lib/rails/application.rb#553 + # source://railties//lib/rails/application.rb#635 def railties_initializers(current); end - # source://railties//lib/rails/application.rb#520 + # source://railties//lib/rails/application.rb#602 def run_console_blocks(app); end - # source://railties//lib/rails/application.rb#510 + # source://railties//lib/rails/application.rb#592 def run_generators_blocks(app); end - # source://railties//lib/rails/application.rb#515 + # source://railties//lib/rails/application.rb#597 def run_runner_blocks(app); end - # source://railties//lib/rails/application.rb#525 + # source://railties//lib/rails/application.rb#607 def run_server_blocks(app); end - # source://railties//lib/rails/application.rb#499 + # source://railties//lib/rails/application.rb#581 def run_tasks_blocks(app); end - # source://railties//lib/rails/application.rb#570 + # source://railties//lib/rails/application.rb#652 def validate_secret_key_base(secret_key_base); end private - # source://railties//lib/rails/application.rb#604 + # source://railties//lib/rails/application.rb#700 def build_middleware; end - # source://railties//lib/rails/application.rb#597 + # source://railties//lib/rails/application.rb#693 def build_request(env); end - # source://railties//lib/rails/application.rb#608 + # source://railties//lib/rails/application.rb#704 def coerce_same_site_protection(protection); end - # source://railties//lib/rails/application.rb#581 - def generate_development_secret; end + # source://railties//lib/rails/application.rb#708 + def filter_parameters; end + + # source://railties//lib/rails/application.rb#668 + def generate_local_secret; end + + # source://railties//lib/rails/application.rb#687 + def secrets_secret_key_base; end class << self # This method is called just after an application inherits from Rails::Application, @@ -564,580 +632,652 @@ class Rails::Application < ::Rails::Engine # Rails application, you will need to add lib to $LOAD_PATH on your own in case # you need to load files in lib/ during the application configuration as well. # - # source://railties//lib/rails/application.rb#339 + # source://railties//lib/rails/application.rb#393 def add_lib_to_load_path!(root); end - # source://railties//lib/rails/application.rb#81 + # source://railties//lib/rails/application.rb#84 def create(initial_variable_values = T.unsafe(nil), &block); end - # source://railties//lib/rails/application.rb#85 + # source://railties//lib/rails/application.rb#88 def find_root(from); end # @private # - # source://railties//lib/rails/application.rb#70 + # source://railties//lib/rails/application.rb#71 def inherited(base); end - # source://railties//lib/rails/application.rb#77 + # source://railties//lib/rails/application.rb#80 def instance; end def new(*_arg0); end end end -# source://railties//lib/rails/application/bootstrap.rb#11 +# source://railties//lib/rails/application/bootstrap.rb#12 module Rails::Application::Bootstrap include ::Rails::Initializable extend ::Rails::Initializable::ClassMethods end -# source://railties//lib/rails/application/configuration.rb#12 +# source://railties//lib/rails/application/configuration.rb#13 class Rails::Application::Configuration < ::Rails::Engine::Configuration # @return [Configuration] a new instance of Configuration # - # source://railties//lib/rails/application/configuration.rb#28 + # source://railties//lib/rails/application/configuration.rb#30 def initialize(*_arg0); end # Returns the value of attribute add_autoload_paths_to_load_path. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def add_autoload_paths_to_load_path; end # Sets the attribute add_autoload_paths_to_load_path # # @param value the value to set the attribute add_autoload_paths_to_load_path to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def add_autoload_paths_to_load_path=(_arg0); end # Returns the value of attribute allow_concurrency. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def allow_concurrency; end # Sets the attribute allow_concurrency # # @param value the value to set the attribute allow_concurrency to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def allow_concurrency=(_arg0); end - # source://railties//lib/rails/application/configuration.rb#415 + # source://railties//lib/rails/application/configuration.rb#541 def annotations; end # Returns the value of attribute api_only. # - # source://railties//lib/rails/application/configuration.rb#26 + # source://railties//lib/rails/application/configuration.rb#28 def api_only; end - # source://railties//lib/rails/application/configuration.rb#276 + # source://railties//lib/rails/application/configuration.rb#375 def api_only=(value); end # Returns the value of attribute asset_host. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def asset_host; end # Sets the attribute asset_host # # @param value the value to set the attribute asset_host to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def asset_host=(_arg0); end + # Returns the value of attribute assume_ssl. + # + # source://railties//lib/rails/application/configuration.rb#14 + def assume_ssl; end + + # Sets the attribute assume_ssl + # + # @param value the value to set the attribute assume_ssl to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def assume_ssl=(_arg0); end + # Returns the value of attribute autoflush_log. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def autoflush_log; end # Sets the attribute autoflush_log # # @param value the value to set the attribute autoflush_log to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def autoflush_log=(_arg0); end + # source://railties//lib/rails/application/configuration.rb#473 + def autoload_lib(ignore:); end + + # source://railties//lib/rails/application/configuration.rb#485 + def autoload_lib_once(ignore:); end + # Returns the value of attribute beginning_of_week. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def beginning_of_week; end # Sets the attribute beginning_of_week # # @param value the value to set the attribute beginning_of_week to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def beginning_of_week=(_arg0); end + # source://railties//lib/rails/application/configuration.rb#387 + def broadcast_log_level; end + # Returns the value of attribute cache_classes. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def cache_classes; end # Sets the attribute cache_classes # # @param value the value to set the attribute cache_classes to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def cache_classes=(_arg0); end # Returns the value of attribute cache_store. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def cache_store; end # Sets the attribute cache_store # # @param value the value to set the attribute cache_store to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def cache_store=(_arg0); end - # source://railties//lib/rails/application/configuration.rb#361 + # source://railties//lib/rails/application/configuration.rb#497 def colorize_logging; end - # source://railties//lib/rails/application/configuration.rb#365 + # source://railties//lib/rails/application/configuration.rb#501 def colorize_logging=(val); end # Returns the value of attribute consider_all_requests_local. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def consider_all_requests_local; end # Sets the attribute consider_all_requests_local # # @param value the value to set the attribute consider_all_requests_local to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def consider_all_requests_local=(_arg0); end # Returns the value of attribute console. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def console; end # Sets the attribute console # # @param value the value to set the attribute console to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def console=(_arg0); end # Configures the ActionDispatch::ContentSecurityPolicy. # - # source://railties//lib/rails/application/configuration.rb#420 + # source://railties//lib/rails/application/configuration.rb#546 def content_security_policy(&block); end # Returns the value of attribute content_security_policy_nonce_directives. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def content_security_policy_nonce_directives; end # Sets the attribute content_security_policy_nonce_directives # # @param value the value to set the attribute content_security_policy_nonce_directives to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def content_security_policy_nonce_directives=(_arg0); end # Returns the value of attribute content_security_policy_nonce_generator. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def content_security_policy_nonce_generator; end # Sets the attribute content_security_policy_nonce_generator # # @param value the value to set the attribute content_security_policy_nonce_generator to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def content_security_policy_nonce_generator=(_arg0); end # Returns the value of attribute content_security_policy_report_only. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def content_security_policy_report_only; end # Sets the attribute content_security_policy_report_only # # @param value the value to set the attribute content_security_policy_report_only to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def content_security_policy_report_only=(_arg0); end # Returns the value of attribute credentials. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def credentials; end # Sets the attribute credentials # # @param value the value to set the attribute credentials to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def credentials=(_arg0); end # Loads and returns the entire raw configuration of database from # values stored in config/database.yml. # - # source://railties//lib/rails/application/configuration.rb#330 + # source://railties//lib/rails/application/configuration.rb#436 def database_configuration; end - # source://railties//lib/rails/application/configuration.rb#283 + # source://railties//lib/rails/application/configuration.rb#391 def debug_exception_response_format; end # Sets the attribute debug_exception_response_format # # @param value the value to set the attribute debug_exception_response_format to. # - # source://railties//lib/rails/application/configuration.rb#287 + # source://railties//lib/rails/application/configuration.rb#395 def debug_exception_response_format=(_arg0); end - # source://railties//lib/rails/application/configuration.rb#437 + # source://railties//lib/rails/application/configuration.rb#563 def default_log_file; end # Returns the value of attribute disable_sandbox. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def disable_sandbox; end # Sets the attribute disable_sandbox # # @param value the value to set the attribute disable_sandbox to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def disable_sandbox=(_arg0); end + # Returns the value of attribute dom_testing_default_html_version. + # + # source://railties//lib/rails/application/configuration.rb#14 + def dom_testing_default_html_version; end + + # Sets the attribute dom_testing_default_html_version + # + # @param value the value to set the attribute dom_testing_default_html_version to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def dom_testing_default_html_version=(_arg0); end + # Returns the value of attribute eager_load. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def eager_load; end # Sets the attribute eager_load # # @param value the value to set the attribute eager_load to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def eager_load=(_arg0); end - # Returns the value of attribute enable_dependency_loading. - # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#357 def enable_dependency_loading; end - # Sets the attribute enable_dependency_loading - # - # @param value the value to set the attribute enable_dependency_loading to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def enable_dependency_loading=(_arg0); end + # source://railties//lib/rails/application/configuration.rb#362 + def enable_dependency_loading=(value); end + + # source://railties//lib/rails/application/configuration.rb#343 + def enable_reloading; end + + # source://railties//lib/rails/application/configuration.rb#347 + def enable_reloading=(value); end # Returns the value of attribute encoding. # - # source://railties//lib/rails/application/configuration.rb#26 + # source://railties//lib/rails/application/configuration.rb#28 def encoding; end - # source://railties//lib/rails/application/configuration.rb#268 + # source://railties//lib/rails/application/configuration.rb#367 def encoding=(value); end # Returns the value of attribute exceptions_app. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def exceptions_app; end # Sets the attribute exceptions_app # # @param value the value to set the attribute exceptions_app to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def exceptions_app=(_arg0); end # Returns the value of attribute file_watcher. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def file_watcher; end # Sets the attribute file_watcher # # @param value the value to set the attribute file_watcher to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def file_watcher=(_arg0); end # Returns the value of attribute filter_parameters. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def filter_parameters; end # Sets the attribute filter_parameters # # @param value the value to set the attribute filter_parameters to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def filter_parameters=(_arg0); end # Returns the value of attribute filter_redirect. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def filter_redirect; end # Sets the attribute filter_redirect # # @param value the value to set the attribute filter_redirect to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def filter_redirect=(_arg0); end # Returns the value of attribute force_ssl. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def force_ssl; end # Sets the attribute force_ssl # # @param value the value to set the attribute force_ssl to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def force_ssl=(_arg0); end # Returns the value of attribute helpers_paths. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def helpers_paths; end # Sets the attribute helpers_paths # # @param value the value to set the attribute helpers_paths to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def helpers_paths=(_arg0); end # Returns the value of attribute host_authorization. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def host_authorization; end # Sets the attribute host_authorization # # @param value the value to set the attribute host_authorization to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def host_authorization=(_arg0); end # Returns the value of attribute hosts. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def hosts; end # Sets the attribute hosts # # @param value the value to set the attribute hosts to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def hosts=(_arg0); end - # Load the database YAML without evaluating ERB. This allows us to - # create the rake tasks for multiple databases without filling in the - # configuration values or loading the environment. Do not use this - # method. + # source://railties//lib/rails/application/configuration.rb#575 + def inspect; end + + # Load the config/database.yml to create the Rake tasks for + # multiple databases without loading the environment and filling in the + # environment specific configuration values. # - # This uses a DummyERB custom compiler so YAML can ignore the ERB - # tags and load the database.yml for the rake tasks. + # Do not use this method, use #database_configuration instead. # - # source://railties//lib/rails/application/configuration.rb#312 + # source://railties//lib/rails/application/configuration.rb#418 def load_database_yaml; end # Loads default configuration values for a target version. This includes # defaults for versions prior to the target version. See the - # {configuration guide}[https://guides.rubyonrails.org/configuring.html] + # {configuration guide}[https://guides.rubyonrails.org/configuring.html#versioned-default-values] # for the default values associated with a particular version. # - # source://railties//lib/rails/application/configuration.rb#88 + # source://railties//lib/rails/application/configuration.rb#92 def load_defaults(target_version); end # Returns the value of attribute loaded_config_version. # - # source://railties//lib/rails/application/configuration.rb#26 + # source://railties//lib/rails/application/configuration.rb#28 def loaded_config_version; end + # Returns the value of attribute log_file_size. + # + # source://railties//lib/rails/application/configuration.rb#14 + def log_file_size; end + + # Sets the attribute log_file_size + # + # @param value the value to set the attribute log_file_size to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def log_file_size=(_arg0); end + # Returns the value of attribute log_formatter. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def log_formatter; end # Sets the attribute log_formatter # # @param value the value to set the attribute log_formatter to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def log_formatter=(_arg0); end # Returns the value of attribute log_level. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#28 def log_level; end - # Sets the attribute log_level - # - # @param value the value to set the attribute log_level to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def log_level=(_arg0); end + # source://railties//lib/rails/application/configuration.rb#382 + def log_level=(level); end # Returns the value of attribute log_tags. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def log_tags; end # Sets the attribute log_tags # # @param value the value to set the attribute log_tags to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def log_tags=(_arg0); end # Returns the value of attribute logger. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def logger; end # Sets the attribute logger # # @param value the value to set the attribute logger to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def logger=(_arg0); end - # source://railties//lib/rails/application/configuration.rb#289 + # source://railties//lib/rails/application/configuration.rb#397 def paths; end # Configures the ActionDispatch::PermissionsPolicy. # - # source://railties//lib/rails/application/configuration.rb#429 + # source://railties//lib/rails/application/configuration.rb#555 def permissions_policy(&block); end + # Returns the value of attribute precompile_filter_parameters. + # + # source://railties//lib/rails/application/configuration.rb#14 + def precompile_filter_parameters; end + + # Sets the attribute precompile_filter_parameters + # + # @param value the value to set the attribute precompile_filter_parameters to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def precompile_filter_parameters=(_arg0); end + # Returns the value of attribute public_file_server. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def public_file_server; end # Sets the attribute public_file_server # # @param value the value to set the attribute public_file_server to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def public_file_server=(_arg0); end # Returns the value of attribute railties_order. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def railties_order; end # Sets the attribute railties_order # # @param value the value to set the attribute railties_order to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def railties_order=(_arg0); end # Returns the value of attribute rake_eager_load. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def rake_eager_load; end # Sets the attribute rake_eager_load # # @param value the value to set the attribute rake_eager_load to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def rake_eager_load=(_arg0); end # Returns the value of attribute read_encrypted_secrets. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def read_encrypted_secrets; end # Sets the attribute read_encrypted_secrets # # @param value the value to set the attribute read_encrypted_secrets to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def read_encrypted_secrets=(_arg0); end # Returns the value of attribute relative_url_root. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def relative_url_root; end # Sets the attribute relative_url_root # # @param value the value to set the attribute relative_url_root to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def relative_url_root=(_arg0); end # Returns the value of attribute reload_classes_only_on_change. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def reload_classes_only_on_change; end # Sets the attribute reload_classes_only_on_change # # @param value the value to set the attribute reload_classes_only_on_change to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def reload_classes_only_on_change=(_arg0); end + # @return [Boolean] + # + # source://railties//lib/rails/application/configuration.rb#339 + def reloading_enabled?; end + # Returns the value of attribute require_master_key. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def require_master_key; end # Sets the attribute require_master_key # # @param value the value to set the attribute require_master_key to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def require_master_key=(_arg0); end + # Returns the value of attribute sandbox_by_default. + # + # source://railties//lib/rails/application/configuration.rb#14 + def sandbox_by_default; end + + # Sets the attribute sandbox_by_default + # + # @param value the value to set the attribute sandbox_by_default to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def sandbox_by_default=(_arg0); end + # Returns the value of attribute secret_key_base. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def secret_key_base; end # Sets the attribute secret_key_base # # @param value the value to set the attribute secret_key_base to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def secret_key_base=(_arg0); end # Returns the value of attribute server_timing. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def server_timing; end # Sets the attribute server_timing # # @param value the value to set the attribute server_timing to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def server_timing=(_arg0); end # Returns the value of attribute session_options. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def session_options; end # Sets the attribute session_options # # @param value the value to set the attribute session_options to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def session_options=(_arg0); end # Specifies what class to use to store the session. Possible values - # are +:cookie_store+, +:mem_cache_store+, a custom store, or - # +:disabled+. +:disabled+ tells Rails not to deal with sessions. + # are +:cache_store+, +:cookie_store+, +:mem_cache_store+, a custom + # store, or +:disabled+. +:disabled+ tells \Rails not to deal with + # sessions. # # Additional options will be set as +session_options+: # @@ -1150,82 +1290,77 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # # use ActionDispatch::Session::MyCustomStore as the session store # config.session_store :my_custom_store # - # source://railties//lib/rails/application/configuration.rb#384 + # source://railties//lib/rails/application/configuration.rb#521 def session_store(new_session_store = T.unsafe(nil), **options); end # @return [Boolean] # - # source://railties//lib/rails/application/configuration.rb#411 + # source://railties//lib/rails/application/configuration.rb#537 def session_store?; end # Returns the value of attribute ssl_options. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def ssl_options; end # Sets the attribute ssl_options # # @param value the value to set the attribute ssl_options to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def ssl_options=(_arg0); end # Returns the value of attribute time_zone. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def time_zone; end # Sets the attribute time_zone # # @param value the value to set the attribute time_zone to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def time_zone=(_arg0); end # Returns the value of attribute x. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def x; end # Sets the attribute x # # @param value the value to set the attribute x to. # - # source://railties//lib/rails/application/configuration.rb#13 + # source://railties//lib/rails/application/configuration.rb#14 def x=(_arg0); end private - # @return [Boolean] - # - # source://railties//lib/rails/application/configuration.rb#486 - def credentials_available_for_current_env?; end - - # source://railties//lib/rails/application/configuration.rb#470 - def default_credentials_content_path; end - - # source://railties//lib/rails/application/configuration.rb#478 - def default_credentials_key_path; end + # source://railties//lib/rails/application/configuration.rb#600 + def credentials_defaults; end end -# source://railties//lib/rails/application/configuration.rb#449 +# source://railties//lib/rails/application/configuration.rb#579 class Rails::Application::Configuration::Custom # @return [Custom] a new instance of Custom # - # source://railties//lib/rails/application/configuration.rb#450 + # source://railties//lib/rails/application/configuration.rb#580 def initialize; end - # source://railties//lib/rails/application/configuration.rb#454 + # source://railties//lib/rails/application/configuration.rb#584 def method_missing(method, *args); end private # @return [Boolean] # - # source://railties//lib/rails/application/configuration.rb#464 + # source://railties//lib/rails/application/configuration.rb#594 def respond_to_missing?(symbol, *_arg1); end end +# source://railties//lib/rails/application/configuration.rb#351 +Rails::Application::Configuration::ENABLE_DEPENDENCY_LOADING_WARNING = T.let(T.unsafe(nil), String) + # source://railties//lib/rails/application/default_middleware_stack.rb#5 class Rails::Application::DefaultMiddlewareStack # @return [DefaultMiddlewareStack] a new instance of DefaultMiddlewareStack @@ -1253,45 +1388,45 @@ class Rails::Application::DefaultMiddlewareStack private - # source://railties//lib/rails/application/default_middleware_stack.rb#103 + # source://railties//lib/rails/application/default_middleware_stack.rb#109 def load_rack_cache; end - # source://railties//lib/rails/application/default_middleware_stack.rb#125 + # source://railties//lib/rails/application/default_middleware_stack.rb#131 def show_exceptions_app; end end -# source://railties//lib/rails/application/finisher.rb#10 +# source://railties//lib/rails/application/finisher.rb#11 module Rails::Application::Finisher include ::Rails::Initializable extend ::Rails::Initializable::ClassMethods end -# source://railties//lib/rails/application/finisher.rb#104 +# source://railties//lib/rails/application/finisher.rb#110 module Rails::Application::Finisher::InterlockHook class << self - # source://railties//lib/rails/application/finisher.rb#109 + # source://railties//lib/rails/application/finisher.rb#115 def complete(_state); end - # source://railties//lib/rails/application/finisher.rb#105 + # source://railties//lib/rails/application/finisher.rb#111 def run; end end end -# source://railties//lib/rails/application/finisher.rb#90 +# source://railties//lib/rails/application/finisher.rb#96 class Rails::Application::Finisher::MonitorHook # @return [MonitorHook] a new instance of MonitorHook # - # source://railties//lib/rails/application/finisher.rb#91 + # source://railties//lib/rails/application/finisher.rb#97 def initialize(monitor = T.unsafe(nil)); end - # source://railties//lib/rails/application/finisher.rb#99 + # source://railties//lib/rails/application/finisher.rb#105 def complete(_state); end - # source://railties//lib/rails/application/finisher.rb#95 + # source://railties//lib/rails/application/finisher.rb#101 def run; end end -# source://railties//lib/rails/application.rb#103 +# source://railties//lib/rails/application.rb#106 Rails::Application::INITIAL_VARIABLES = T.let(T.unsafe(nil), Array) # source://railties//lib/rails/application/routes_reloader.rb#7 @@ -1305,10 +1440,10 @@ class Rails::Application::RoutesReloader # source://railties//lib/rails/application/routes_reloader.rb#15 def initialize; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end # Returns the value of attribute eager_load. @@ -1374,13 +1509,13 @@ class Rails::Application::RoutesReloader def updater; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end end end @@ -1389,7 +1524,7 @@ end class Rails::ApplicationController < ::ActionController::Base private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end # source://railties//lib/rails/application_controller.rb#25 @@ -1404,16 +1539,16 @@ class Rails::ApplicationController < ::ActionController::Base def require_local!; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#212 def _layout_conditions; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -1465,14 +1600,31 @@ module Rails::Autoloaders::Inflector end end -# source://railties//lib/rails/command.rb#10 +# source://railties//lib/rails/backtrace_cleaner.rb#7 +class Rails::BacktraceCleaner < ::ActiveSupport::BacktraceCleaner + # @return [BacktraceCleaner] a new instance of BacktraceCleaner + # + # source://railties//lib/rails/backtrace_cleaner.rb#11 + def initialize; end +end + +# source://railties//lib/rails/backtrace_cleaner.rb#8 +Rails::BacktraceCleaner::APP_DIRS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://railties//lib/rails/backtrace_cleaner.rb#9 +Rails::BacktraceCleaner::RENDER_TEMPLATE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://railties//lib/rails/command.rb#11 module Rails::Command include ::Rails::Command::Behavior extend ::ActiveSupport::Autoload extend ::Rails::Command::Behavior::ClassMethods class << self - # source://railties//lib/rails/command.rb#25 + # source://railties//lib/rails/command.rb#116 + def application_root; end + + # source://railties//lib/rails/command.rb#57 def environment; end # Rails finds namespaces similar to Thor, it only adds one rule: @@ -1486,62 +1638,68 @@ module Rails::Command # # "webrat", "webrat:integration", "rails:webrat", "rails:webrat:integration" # - # source://railties//lib/rails/command.rb#68 + # source://railties//lib/rails/command.rb#96 def find_by_namespace(namespace, command_name = T.unsafe(nil)); end - # source://railties//lib/rails/command.rb#21 + # source://railties//lib/rails/command.rb#53 def hidden_commands; end # Receives a namespace, arguments, and the behavior to invoke the command. # - # source://railties//lib/rails/command.rb#30 + # source://railties//lib/rails/command.rb#62 def invoke(full_namespace, args = T.unsafe(nil), **config); end - # source://railties//lib/rails/command.rb#88 - def print_commands; end + # source://railties//lib/rails/command.rb#120 + def printing_commands; end - # Returns the root of the Rails engine or app running the command. + # Returns the root of the \Rails engine or app running the command. # - # source://railties//lib/rails/command.rb#80 + # source://railties//lib/rails/command.rb#108 def root; end private - # source://railties//lib/rails/command.rb#108 + # source://railties//lib/rails/command.rb#159 def command_type; end - # source://railties//lib/rails/command.rb#100 - def commands; end - - # source://railties//lib/rails/command.rb#116 + # source://railties//lib/rails/command.rb#167 def file_lookup_paths; end - # source://railties//lib/rails/command.rb#112 + # source://railties//lib/rails/command.rb#154 + def invoke_rake(task, args, config); end + + # source://railties//lib/rails/command.rb#163 def lookup_paths; end # @return [Boolean] # - # source://railties//lib/rails/command.rb#96 + # source://railties//lib/rails/command.rb#127 def rails_new_with_no_path?(args); end + + # source://railties//lib/rails/command.rb#131 + def split_namespace(namespace); end + + # source://railties//lib/rails/command.rb#146 + def with_argv(argv); end end end # source://railties//lib/rails/command/actions.rb#5 module Rails::Command::Actions - # source://railties//lib/rails/command/actions.rb#48 + # source://railties//lib/rails/command/actions.rb#18 + def boot_application!; end + + # source://railties//lib/rails/command/actions.rb#23 + def load_environment_config!; end + + # source://railties//lib/rails/command/actions.rb#46 def load_generators; end - # source://railties//lib/rails/command/actions.rb#44 + # source://railties//lib/rails/command/actions.rb#42 def load_tasks; end - # source://railties//lib/rails/command/actions.rb#18 - def require_application!; end - # source://railties//lib/rails/command/actions.rb#13 - def require_application_and_environment!; end - - # source://railties//lib/rails/command/actions.rb#26 - def require_environment!; end + def require_application!; end # Change to the application's path if there is no config.ru file in current directory. # This allows us to run rails server from other directories, but still get @@ -1551,18 +1709,22 @@ module Rails::Command::Actions def set_application_directory!; end end -# source://railties//lib/rails/command/base.rb#13 +# source://railties//lib/rails/command/base.rb#14 class Rails::Command::Base < ::Thor include ::Rails::Command::Actions - # source://railties//lib/rails/command/base.rb#174 - def help; end + # source://thor/1.3.1/lib/thor/base.rb#155 + def current_subcommand; end + + # source://railties//lib/rails/command/base.rb#172 + def executable(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/command/base.rb#175 + def invoke_command(command, *_arg1); end class << self - # Use Rails' default banner. - # - # source://railties//lib/rails/command/base.rb#99 - def banner(*_arg0); end + # source://railties//lib/rails/command/base.rb#86 + def banner(command = T.unsafe(nil), *_arg1); end # Sets the base_name taking into account the current class namespace. # @@ -1571,6 +1733,18 @@ class Rails::Command::Base < ::Thor # source://railties//lib/rails/command/base.rb#106 def base_name; end + # source://railties//lib/rails/command/base.rb#20 + def bin; end + + # source://railties//lib/rails/command/base.rb#20 + def bin=(value); end + + # source://railties//lib/rails/command/base.rb#20 + def bin?; end + + # source://railties//lib/rails/command/base.rb#122 + def class_usage; end + # Return command name without namespaces. # # Rails::Command::TestCommand.command_name # => 'test' @@ -1584,99 +1758,78 @@ class Rails::Command::Base < ::Thor # For a Rails::Command::TestCommand placed in rails/command/test_command.rb # would return rails/test. # - # source://railties//lib/rails/command/base.rb#135 + # source://railties//lib/rails/command/base.rb#139 def default_command_root; end # Tries to get the description from a USAGE file one folder above the command # root. # - # source://railties//lib/rails/command/base.rb#49 + # source://railties//lib/rails/command/base.rb#34 def desc(usage = T.unsafe(nil), description = T.unsafe(nil), options = T.unsafe(nil)); end - # Returns true when the app is a Rails engine. + # Returns true when the app is a \Rails engine. # # @return [Boolean] # - # source://railties//lib/rails/command/base.rb#43 + # source://railties//lib/rails/command/base.rb#28 def engine?; end - # source://railties//lib/rails/command/base.rb#94 - def executable; end + # source://railties//lib/rails/command/base.rb#82 + def executable(command_name = T.unsafe(nil)); end # @return [Boolean] # - # source://railties//lib/rails/command/base.rb#38 + # source://railties//lib/rails/command/base.rb#23 def exit_on_failure?; end + # Override Thor's class-level help to also show the USAGE. + # + # source://railties//lib/rails/command/base.rb#98 + def help(shell, *_arg1); end + # Convenience method to hide this command from the available ones when # running rails command. # - # source://railties//lib/rails/command/base.rb#70 + # source://railties//lib/rails/command/base.rb#55 def hide_command!; end - # source://railties//lib/rails/command/base.rb#74 + # source://railties//lib/rails/command/base.rb#59 def inherited(base); end # Convenience method to get the namespace from the class name. It's the # same as Thor default except that the Command at the end of the class # is removed. # - # source://railties//lib/rails/command/base.rb#60 + # source://railties//lib/rails/command/base.rb#45 def namespace(name = T.unsafe(nil)); end - # source://railties//lib/rails/command/base.rb#82 + # source://railties//lib/rails/command/base.rb#67 def perform(command, args, config); end - # source://railties//lib/rails/command/base.rb#90 + # source://railties//lib/rails/command/base.rb#76 def printing_commands; end # Path to lookup a USAGE description in a file. # - # source://railties//lib/rails/command/base.rb#123 + # source://railties//lib/rails/command/base.rb#129 def usage_path; end private - # source://railties//lib/rails/command/base.rb#155 - def command_root_namespace; end - # Allow the command method to be called perform. # - # source://railties//lib/rails/command/base.rb#142 + # source://railties//lib/rails/command/base.rb#146 def create_command(meth); end - # source://railties//lib/rails/command/base.rb#163 - def namespaced_commands; end - # source://railties//lib/rails/command/base.rb#159 - def relative_command_path; end - end -end - -# source://railties//lib/rails/command/base.rb#17 -class Rails::Command::Base::CorrectableError < ::Rails::Command::Base::Error - include ::DidYouMean::Correctable - - # @return [CorrectableError] a new instance of CorrectableError - # - # source://railties//lib/rails/command/base.rb#20 - def initialize(message, key, options); end - - # source://railties//lib/rails/command/base.rb#29 - def corrections; end - - # Returns the value of attribute key. - # - # source://railties//lib/rails/command/base.rb#18 - def key; end + def namespaced_name(name); end - # Returns the value of attribute options. - # - # source://railties//lib/rails/command/base.rb#18 - def options; end + # source://railties//lib/rails/command/base.rb#164 + def resolve_path(path); end + end end -# source://railties//lib/rails/command/base.rb#14 +# source://railties//lib/rails/command/base.rb#15 class Rails::Command::Base::Error < ::Thor::Error; end # source://railties//lib/rails/command/behavior.rb#7 @@ -1709,8 +1862,37 @@ module Rails::Command::Behavior::ClassMethods def print_list(base, namespaces); end end -# source://railties//lib/rails/command.rb#18 -Rails::Command::HELP_MAPPINGS = T.let(T.unsafe(nil), Array) +# source://railties//lib/rails/command.rb#17 +class Rails::Command::CorrectableNameError < ::StandardError + include ::DidYouMean::Correctable + + # @return [CorrectableNameError] a new instance of CorrectableNameError + # + # source://railties//lib/rails/command.rb#20 + def initialize(message, name, alternatives); end + + # source://railties//lib/rails/command.rb#35 + def corrections; end + + # Returns the value of attribute name. + # + # source://railties//lib/rails/command.rb#18 + def name; end +end + +# source://railties//lib/rails/command.rb#49 +Rails::Command::HELP_MAPPINGS = T.let(T.unsafe(nil), Set) + +# source://railties//lib/rails/command.rb#41 +class Rails::Command::UnrecognizedCommandError < ::Rails::Command::CorrectableNameError + # @return [UnrecognizedCommandError] a new instance of UnrecognizedCommandError + # + # source://railties//lib/rails/command.rb#42 + def initialize(name); end +end + +# source://railties//lib/rails/command.rb#50 +Rails::Command::VERSION_MAPPINGS = T.let(T.unsafe(nil), Set) # source://railties//lib/rails/configuration.rb#9 module Rails::Configuration; end @@ -1819,17 +2001,17 @@ class Rails::Configuration::Generators def initialize_copy(source); end end -# MiddlewareStackProxy is a proxy for the Rails middleware stack that allows +# MiddlewareStackProxy is a proxy for the \Rails middleware stack that allows # you to configure middlewares in your application. It works basically as a # command recorder, saving each command to be applied after initialization # over the default middleware stack, so you can add, swap, or remove any -# middleware in Rails. +# middleware in \Rails. # # You can add your own middlewares by using the +config.middleware.use+ method: # # config.middleware.use Magical::Unicorns # -# This will put the Magical::Unicorns middleware on the end of the stack. +# This will put the +Magical::Unicorns+ middleware on the end of the stack. # You can use +insert_before+ if you wish to add a middleware before another: # # config.middleware.insert_before Rack::Head, Magical::Unicorns @@ -1846,8 +2028,8 @@ end # # config.middleware.move_before ActionDispatch::Flash, Magical::Unicorns # -# This will move the Magical::Unicorns middleware before the -# ActionDispatch::Flash. You can also move it after: +# This will move the +Magical::Unicorns+ middleware before the +# +ActionDispatch::Flash+. You can also move it after: # # config.middleware.move_after ActionDispatch::Flash, Magical::Unicorns # @@ -1911,13 +2093,14 @@ class Rails::Configuration::MiddlewareStackProxy def operations; end end -# Rails::Engine allows you to wrap a specific Rails application or subset of +# +Rails::Engine+ allows you to wrap a specific \Rails application or subset of # functionality and share it with other applications or within a larger packaged application. # Every Rails::Application is just an engine, which allows for simple # feature and application sharing. # -# Any Rails::Engine is also a Rails::Railtie, so the same -# methods (like rake_tasks and +generators+) and configuration +# Any +Rails::Engine+ is also a Rails::Railtie, so the same +# methods (like {rake_tasks}[rdoc-ref:Rails::Railtie::rake_tasks] and +# {generators}[rdoc-ref:Rails::Railtie::generators]) and configuration # options that are available in railties can also be used in engines. # # == Creating an Engine @@ -2018,7 +2201,7 @@ end # An engine can also be a Rack application. It can be useful if you have a Rack application that # you would like to provide with some of the +Engine+'s features. # -# To do that, use the +endpoint+ method: +# To do that, use the ::endpoint method: # # module MyEngine # class Engine < Rails::Engine @@ -2083,7 +2266,7 @@ end # it's used as default :as option # * rake task for installing migrations my_engine:install:migrations # -# Engine name is set by default based on class name. For MyEngine::Engine it will be +# Engine name is set by default based on class name. For +MyEngine::Engine+ it will be # my_engine_engine. You can change it manually using the engine_name method: # # module MyEngine @@ -2099,7 +2282,7 @@ end # named routes from the application will be available to your engine's controllers as well. # # However, sometimes you want to isolate your engine from the application, especially if your engine -# has its own router. To do that, you simply need to call +isolate_namespace+. This method requires +# has its own router. To do that, you simply need to call ::isolate_namespace. This method requires # you to pass a module where all your controllers, helpers, and models should be nested to: # # module MyEngine @@ -2133,14 +2316,14 @@ end # end # # If +MyEngine+ is isolated, the routes above will point to -# MyEngine::ArticlesController. You also don't need to use longer +# +MyEngine::ArticlesController+. You also don't need to use longer # URL helpers like +my_engine_articles_path+. Instead, you should simply use # +articles_path+, like you would do with your main application. # # To make this behavior consistent with other parts of the framework, # isolated engines also have an effect on ActiveModel::Naming. In a -# normal Rails app, when you use a namespaced model such as -# Namespace::Article, ActiveModel::Naming will generate +# normal \Rails app, when you use a namespaced model such as +# +Namespace::Article+, ActiveModel::Naming will generate # names with the prefix "namespace". In an isolated engine, the prefix will # be omitted in URL helpers and form fields, for convenience. # @@ -2154,7 +2337,7 @@ end # Additionally, an isolated engine will set its own name according to its # namespace, so MyEngine::Engine.engine_name will return # "my_engine". It will also set +MyEngine.table_name_prefix+ to "my_engine_", -# meaning for example that MyEngine::Article will use the +# meaning for example that +MyEngine::Article+ will use the # +my_engine_articles+ database table by default. # # == Using Engine's routes outside Engine @@ -2202,7 +2385,7 @@ end # # == Isolated engine's helpers # -# Sometimes you may want to isolate engine, but use helpers that are defined for it. +# Sometimes you may want to isolate an engine, but use helpers that are defined for it. # If you want to share just a few specific helpers you can add them to application's # helpers in ApplicationController: # @@ -2229,7 +2412,7 @@ end # To use engine's migrations in application you can use the rake task below, which copies them to # application's dir: # -# rake ENGINE_NAME:install:migrations +# $ rake ENGINE_NAME:install:migrations # # Note that some of the migrations may be skipped if a migration with the same name already exists # in application. In such a situation you must decide whether to leave that migration or rename the @@ -2256,82 +2439,82 @@ class Rails::Engine < ::Rails::Railtie # @return [Engine] a new instance of Engine # - # source://railties//lib/rails/engine.rb#432 + # source://railties//lib/rails/engine.rb#439 def initialize; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#963 def _load_seed_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#951 def _run_load_seed_callbacks(&block); end # Returns the underlying Rack application for this engine. # - # source://railties//lib/rails/engine.rb#511 + # source://railties//lib/rails/engine.rb#517 def app; end # Define the Rack API for this engine. # - # source://railties//lib/rails/engine.rb#528 + # source://railties//lib/rails/engine.rb#534 def call(env); end # Define the configuration object for the engine. # - # source://railties//lib/rails/engine.rb#547 + # source://railties//lib/rails/engine.rb#553 def config; end - # source://railties//lib/rails/engine.rb#484 + # source://railties//lib/rails/engine.rb#491 def eager_load!; end # Returns the endpoint for this engine. If none is registered, # defaults to an ActionDispatch::Routing::RouteSet. # - # source://railties//lib/rails/engine.rb#523 + # source://railties//lib/rails/engine.rb#529 def endpoint; end - # source://railties//lib/rails/engine.rb#430 + # source://railties//lib/rails/engine.rb#437 def engine_name(*_arg0, **_arg1, &_arg2); end # Defines additional Rack env configuration that is added on each call. # - # source://railties//lib/rails/engine.rb#534 + # source://railties//lib/rails/engine.rb#540 def env_config; end # Returns a module with all the helpers defined for the engine. # - # source://railties//lib/rails/engine.rb#494 + # source://railties//lib/rails/engine.rb#501 def helpers; end # Returns all registered helpers paths. # - # source://railties//lib/rails/engine.rb#506 + # source://railties//lib/rails/engine.rb#512 def helpers_paths; end - # source://railties//lib/rails/engine.rb#430 - def isolated?(*_arg0, **_arg1, &_arg2); end + # source://railties//lib/rails/engine.rb#437 + def isolated?(&block); end # Load console and invoke the registered hooks. # Check Rails::Railtie.console for more info. # - # source://railties//lib/rails/engine.rb#446 + # source://railties//lib/rails/engine.rb#453 def load_console(app = T.unsafe(nil)); end - # Load Rails generators and invoke the registered hooks. + # Load \Rails generators and invoke the registered hooks. # Check Rails::Railtie.generators for more info. # - # source://railties//lib/rails/engine.rb#470 + # source://railties//lib/rails/engine.rb#477 def load_generators(app = T.unsafe(nil)); end - # Load Rails runner and invoke the registered hooks. + # Load \Rails runner and invoke the registered hooks. # Check Rails::Railtie.runner for more info. # - # source://railties//lib/rails/engine.rb#455 + # source://railties//lib/rails/engine.rb#462 def load_runner(app = T.unsafe(nil)); end # Load data from db/seeds.rb file. It can be used in to load engines' @@ -2339,109 +2522,114 @@ class Rails::Engine < ::Rails::Railtie # # Blog::Engine.load_seed # - # source://railties//lib/rails/engine.rb#555 + # source://railties//lib/rails/engine.rb#561 def load_seed; end # Invoke the server registered hooks. # Check Rails::Railtie.server for more info. # - # source://railties//lib/rails/engine.rb#479 + # source://railties//lib/rails/engine.rb#486 def load_server(app = T.unsafe(nil)); end # Load Rake and railties tasks, and invoke the registered hooks. # Check Rails::Railtie.rake_tasks for more info. # - # source://railties//lib/rails/engine.rb#462 + # source://railties//lib/rails/engine.rb#469 def load_tasks(app = T.unsafe(nil)); end - # source://railties//lib/rails/engine.rb#429 + # source://railties//lib/rails/engine.rb#436 def middleware(*_arg0, **_arg1, &_arg2); end - # source://railties//lib/rails/engine.rb#429 + # source://railties//lib/rails/engine.rb#436 def paths(*_arg0, **_arg1, &_arg2); end - # source://railties//lib/rails/engine.rb#489 + # source://railties//lib/rails/engine.rb#496 def railties; end - # source://railties//lib/rails/engine.rb#429 + # source://railties//lib/rails/engine.rb#436 def root(*_arg0, **_arg1, &_arg2); end # Defines the routes for this engine. If a block is given to # routes, it is appended to the engine. # - # source://railties//lib/rails/engine.rb#540 + # source://railties//lib/rails/engine.rb#546 def routes(&block); end # @return [Boolean] # - # source://railties//lib/rails/engine.rb#654 + # source://railties//lib/rails/engine.rb#677 def routes?; end protected - # source://railties//lib/rails/engine.rb#659 + # source://railties//lib/rails/engine.rb#682 def run_tasks_blocks(*_arg0); end private - # source://railties//lib/rails/engine.rb#691 + # source://railties//lib/rails/engine.rb#714 def _all_autoload_once_paths; end - # source://railties//lib/rails/engine.rb#695 + # source://railties//lib/rails/engine.rb#718 def _all_autoload_paths; end - # source://railties//lib/rails/engine.rb#704 + # source://railties//lib/rails/engine.rb#727 def _all_load_paths(add_autoload_paths_to_load_path); end - # source://railties//lib/rails/engine.rb#723 + # source://railties//lib/rails/engine.rb#751 def build_middleware; end - # source://railties//lib/rails/engine.rb#715 + # source://railties//lib/rails/engine.rb#743 def build_request(env); end - # source://railties//lib/rails/engine.rb#687 + # source://railties//lib/rails/engine.rb#710 def default_middleware_stack; end # @return [Boolean] # - # source://railties//lib/rails/engine.rb#671 + # source://railties//lib/rails/engine.rb#738 + def fixtures_in_root_and_not_in_vendor?(fixtures); end + + # @return [Boolean] + # + # source://railties//lib/rails/engine.rb#694 def has_migrations?; end - # source://railties//lib/rails/engine.rb#665 + # source://railties//lib/rails/engine.rb#688 def load_config_initializer(initializer); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#955 def _load_seed_callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#959 def _load_seed_callbacks=(value); end # Returns the value of attribute called_from. # - # source://railties//lib/rails/engine.rb#353 + # source://railties//lib/rails/engine.rb#354 def called_from; end # Sets the attribute called_from # # @param value the value to set the attribute called_from to. # - # source://railties//lib/rails/engine.rb#353 + # source://railties//lib/rails/engine.rb#354 def called_from=(_arg0); end - # source://railties//lib/rails/engine.rb#358 + # source://railties//lib/rails/engine.rb#359 def eager_load!(*_arg0, **_arg1, &_arg2); end - # source://railties//lib/rails/engine.rb#378 + # source://railties//lib/rails/engine.rb#379 def endpoint(endpoint = T.unsafe(nil)); end # source://railties//lib/rails/railtie.rb#176 @@ -2449,38 +2637,38 @@ class Rails::Engine < ::Rails::Railtie # Finds engine with given path. # - # source://railties//lib/rails/engine.rb#416 + # source://railties//lib/rails/engine.rb#423 def find(path); end - # source://railties//lib/rails/engine.rb#374 + # source://railties//lib/rails/engine.rb#375 def find_root(from); end - # source://railties//lib/rails/engine.rb#675 + # source://railties//lib/rails/engine.rb#698 def find_root_with_flag(flag, root_path, default = T.unsafe(nil)); end # @private # - # source://railties//lib/rails/engine.rb#360 + # source://railties//lib/rails/engine.rb#361 def inherited(base); end - # source://railties//lib/rails/engine.rb#384 + # source://railties//lib/rails/engine.rb#385 def isolate_namespace(mod); end # Returns the value of attribute isolated. # - # source://railties//lib/rails/engine.rb#353 + # source://railties//lib/rails/engine.rb#354 def isolated; end # Sets the attribute isolated # # @param value the value to set the attribute isolated to. # - # source://railties//lib/rails/engine.rb#353 + # source://railties//lib/rails/engine.rb#354 def isolated=(_arg0); end # Returns the value of attribute isolated. # - # source://railties//lib/rails/engine.rb#353 + # source://railties//lib/rails/engine.rb#354 def isolated?; end end end @@ -2489,10 +2677,36 @@ end class Rails::Engine::Configuration < ::Rails::Railtie::Configuration # @return [Configuration] a new instance of Configuration # - # source://railties//lib/rails/engine/configuration.rb#12 + # source://railties//lib/rails/engine/configuration.rb#41 def initialize(root = T.unsafe(nil)); end - # source://railties//lib/rails/engine/configuration.rb#83 + # Private method that adds custom autoload once paths to the ones defined + # by +paths+. + # + # source://railties//lib/rails/engine/configuration.rb#125 + def all_autoload_once_paths; end + + # Private method that adds custom autoload paths to the ones defined by + # +paths+. + # + # source://railties//lib/rails/engine/configuration.rb#119 + def all_autoload_paths; end + + # Private method that adds custom eager load paths to the ones defined by + # +paths+. + # + # source://railties//lib/rails/engine/configuration.rb#131 + def all_eager_load_paths; end + + # An array of custom autoload once paths. These won't be eager loaded + # unless you push them to +eager_load_paths+ too, which is recommended. + # + # This collection is empty by default, it accepts strings and +Pathname+ + # objects. + # + # If you'd like to add +lib+ to it, please see +autoload_lib_once+. + # + # source://railties//lib/rails/engine/configuration.rb#29 def autoload_once_paths; end # Sets the attribute autoload_once_paths @@ -2502,7 +2716,16 @@ class Rails::Engine::Configuration < ::Rails::Railtie::Configuration # source://railties//lib/rails/engine/configuration.rb#10 def autoload_once_paths=(_arg0); end - # source://railties//lib/rails/engine/configuration.rb#87 + # An array of custom autoload paths to be added to the ones defined + # automatically by Rails. These won't be eager loaded, unless you push + # them to +eager_load_paths+ too, which is recommended. + # + # This collection is empty by default, it accepts strings and +Pathname+ + # objects. + # + # If you'd like to add +lib+ to it, please see +autoload_lib+. + # + # source://railties//lib/rails/engine/configuration.rb#20 def autoload_paths; end # Sets the attribute autoload_paths @@ -2512,7 +2735,16 @@ class Rails::Engine::Configuration < ::Rails::Railtie::Configuration # source://railties//lib/rails/engine/configuration.rb#10 def autoload_paths=(_arg0); end - # source://railties//lib/rails/engine/configuration.rb#79 + # An array of custom eager load paths to be added to the ones defined + # automatically by Rails. Anything in this collection is considered to be + # an autoload path regardless of whether it was added to +autoload_paths+. + # + # This collection is empty by default, it accepts strings and +Pathname+ + # objects. + # + # If you'd like to add +lib+ to it, please see +autoload_lib+. + # + # source://railties//lib/rails/engine/configuration.rb#39 def eager_load_paths; end # Sets the attribute eager_load_paths @@ -2536,7 +2768,7 @@ class Rails::Engine::Configuration < ::Rails::Railtie::Configuration # # @yield [@generators] # - # source://railties//lib/rails/engine/configuration.rb#32 + # source://railties//lib/rails/engine/configuration.rb#65 def generators; end # Returns the value of attribute javascript_path. @@ -2563,7 +2795,7 @@ class Rails::Engine::Configuration < ::Rails::Railtie::Configuration # source://railties//lib/rails/engine/configuration.rb#9 def middleware=(_arg0); end - # source://railties//lib/rails/engine/configuration.rb#38 + # source://railties//lib/rails/engine/configuration.rb#71 def paths; end # Returns the value of attribute root. @@ -2571,7 +2803,7 @@ class Rails::Engine::Configuration < ::Rails::Railtie::Configuration # source://railties//lib/rails/engine/configuration.rb#8 def root; end - # source://railties//lib/rails/engine/configuration.rb#75 + # source://railties//lib/rails/engine/configuration.rb#113 def root=(value); end end @@ -2596,25 +2828,25 @@ class Rails::Engine::Railties def each(*args, &block); end end -# source://railties//lib/rails/generators.rb#17 +# source://railties//lib/rails/generators.rb#14 module Rails::Generators include ::Rails::Command::Behavior extend ::Rails::Command::Behavior::ClassMethods - # source://railties//lib/rails/generators.rb#30 + # source://railties//lib/rails/generators.rb#27 def namespace; end - # source://railties//lib/rails/generators.rb#30 + # source://railties//lib/rails/generators.rb#27 def namespace=(val); end class << self - # source://railties//lib/rails/generators.rb#282 + # source://railties//lib/rails/generators.rb#274 def add_generated_file(file); end - # source://railties//lib/rails/generators.rb#91 + # source://railties//lib/rails/generators.rb#88 def after_generate_callbacks; end - # source://railties//lib/rails/generators.rb#83 + # source://railties//lib/rails/generators.rb#80 def aliases; end # Configure generators for API only applications. It basically hides @@ -2622,14 +2854,14 @@ module Rails::Generators # migration generators, and completely disable helpers and assets # so generators such as scaffold won't create them. # - # source://railties//lib/rails/generators.rb#115 + # source://railties//lib/rails/generators.rb#112 def api_only!; end - # source://railties//lib/rails/generators.rb#67 + # source://railties//lib/rails/generators.rb#64 def configure!(config); end # Hold configured generators fallbacks. If a plugin developer wants a - # generator group to fallback to another group in case of missing generators, + # generator group to fall back to another group in case of missing generators, # they can add a fallback. # # For example, shoulda is considered a test_framework and is an extension @@ -2641,7 +2873,7 @@ module Rails::Generators # # Rails::Generators.fallbacks[:shoulda] = :test_unit # - # source://railties//lib/rails/generators.rb#107 + # source://railties//lib/rails/generators.rb#104 def fallbacks; end # Rails finds namespaces similar to Thor, it only adds one rule: @@ -2658,12 +2890,12 @@ module Rails::Generators # Notice that "rails:generators:webrat" could be loaded as well, what # Rails looks for is the first and last parts of the namespace. # - # source://railties//lib/rails/generators.rb#232 + # source://railties//lib/rails/generators.rb#230 def find_by_namespace(name, base = T.unsafe(nil), context = T.unsafe(nil)); end # Show help message with available generators. # - # source://railties//lib/rails/generators.rb#168 + # source://railties//lib/rails/generators.rb#165 def help(command = T.unsafe(nil)); end # Returns an array of generator namespaces that are hidden. @@ -2671,63 +2903,63 @@ module Rails::Generators # Some are aliased such as "rails:migration" and can be # invoked with the shorter "migration". # - # source://railties//lib/rails/generators.rb#133 + # source://railties//lib/rails/generators.rb#130 def hidden_namespaces; end - # source://railties//lib/rails/generators.rb#162 + # source://railties//lib/rails/generators.rb#159 def hide_namespace(*namespaces); end - # source://railties//lib/rails/generators.rb#162 + # source://railties//lib/rails/generators.rb#159 def hide_namespaces(*namespaces); end # Receives a namespace, arguments, and the behavior to invoke the generator. # It's used as the default entry point for generate, destroy, and update # commands. # - # source://railties//lib/rails/generators.rb#259 + # source://railties//lib/rails/generators.rb#257 def invoke(namespace, args = T.unsafe(nil), config = T.unsafe(nil)); end - # source://railties//lib/rails/generators.rb#30 + # source://railties//lib/rails/generators.rb#27 def namespace; end - # source://railties//lib/rails/generators.rb#30 + # source://railties//lib/rails/generators.rb#27 def namespace=(val); end - # source://railties//lib/rails/generators.rb#87 + # source://railties//lib/rails/generators.rb#84 def options; end - # source://railties//lib/rails/generators.rb#189 + # source://railties//lib/rails/generators.rb#187 def print_generators; end - # source://railties//lib/rails/generators.rb#184 + # source://railties//lib/rails/generators.rb#182 def public_namespaces; end - # source://railties//lib/rails/generators.rb#193 + # source://railties//lib/rails/generators.rb#191 def sorted_groups; end - # source://railties//lib/rails/generators.rb#79 + # source://railties//lib/rails/generators.rb#76 def templates_path; end private - # source://railties//lib/rails/generators.rb#309 + # source://railties//lib/rails/generators.rb#301 def command_type; end - # source://railties//lib/rails/generators.rb#317 + # source://railties//lib/rails/generators.rb#309 def file_lookup_paths; end # Try fallbacks for the given base. # - # source://railties//lib/rails/generators.rb#294 + # source://railties//lib/rails/generators.rb#286 def invoke_fallbacks_for(name, base); end - # source://railties//lib/rails/generators.rb#313 + # source://railties//lib/rails/generators.rb#305 def lookup_paths; end - # source://railties//lib/rails/generators.rb#288 + # source://railties//lib/rails/generators.rb#280 def print_list(base, namespaces); end - # source://railties//lib/rails/generators.rb#321 + # source://railties//lib/rails/generators.rb#313 def run_after_generate_callback; end end end @@ -2750,7 +2982,7 @@ module Rails::Generators::Actions # source://railties//lib/rails/generators/actions.rb#151 def add_source(source, options = T.unsafe(nil), &block); end - # Adds configuration code to a Rails runtime environment. + # Adds configuration code to a \Rails runtime environment. # # By default, adds code inside the +Application+ class in # +config/application.rb+ so that it applies to all environments. @@ -2794,7 +3026,7 @@ module Rails::Generators::Actions # source://railties//lib/rails/generators/actions.rb#206 def application(data = T.unsafe(nil), options = T.unsafe(nil)); end - # Adds configuration code to a Rails runtime environment. + # Adds configuration code to a \Rails runtime environment. # # By default, adds code inside the +Application+ class in # +config/application.rb+ so that it applies to all environments. @@ -2961,7 +3193,7 @@ module Rails::Generators::Actions # source://railties//lib/rails/generators/actions.rb#275 def lib(filename, data = T.unsafe(nil)); end - # Runs the specified Rails command. + # Runs the specified \Rails command. # # rails_command "db:migrate" # rails_command "db:migrate", env: "production" @@ -2972,7 +3204,7 @@ module Rails::Generators::Actions # ==== Options # # [+:env+] - # The Rails environment in which to run the command. Defaults to + # The \Rails environment in which to run the command. Defaults to # ENV["RAILS_ENV"] || "development". # # [+:abort_on_failure+] @@ -2999,7 +3231,7 @@ module Rails::Generators::Actions # ==== Options # # [+:env+] - # The Rails environment in which to run the task. Defaults to + # The \Rails environment in which to run the task. Defaults to # ENV["RAILS_ENV"] || "development". # # [+:abort_on_failure+] @@ -3046,7 +3278,7 @@ module Rails::Generators::Actions # source://railties//lib/rails/generators/actions.rb#442 def readme(path); end - # Make an entry in Rails routing file config/routes.rb + # Make an entry in \Rails routing file config/routes.rb # # route "root 'welcome#index'" # route "root 'admin#index'", namespace: :admin @@ -3072,7 +3304,7 @@ module Rails::Generators::Actions # Append string to a file with a newline if necessary # - # source://railties//lib/rails/generators/actions.rb#516 + # source://railties//lib/rails/generators/actions.rb#507 def append_file_with_newline(path, str, options = T.unsafe(nil)); end # Runs the supplied command using either "rake ..." or "rails ..." @@ -3081,14 +3313,9 @@ module Rails::Generators::Actions # source://railties//lib/rails/generators/actions.rb#461 def execute_command(executor, command, options = T.unsafe(nil)); end - # Add an extension to the given name based on the platform. - # - # source://railties//lib/rails/generators/actions.rb#475 - def extify(name); end - # Indent the +Gemfile+ to the depth of @indentation # - # source://railties//lib/rails/generators/actions.rb#503 + # source://railties//lib/rails/generators/actions.rb#494 def indentation; end # Define log for backwards compatibility. If just one argument is sent, @@ -3098,30 +3325,30 @@ module Rails::Generators::Actions # source://railties//lib/rails/generators/actions.rb#450 def log(*args); end - # source://railties//lib/rails/generators/actions.rb#522 + # source://railties//lib/rails/generators/actions.rb#513 def match_file(path, pattern); end # Returns optimized string with indentation # - # source://railties//lib/rails/generators/actions.rb#496 + # source://railties//lib/rails/generators/actions.rb#487 def optimize_indentation(value, amount = T.unsafe(nil)); end # Always returns value in double quotes. # - # source://railties//lib/rails/generators/actions.rb#484 + # source://railties//lib/rails/generators/actions.rb#475 def quote(value); end # Returns optimized string with indentation # - # source://railties//lib/rails/generators/actions.rb#496 + # source://railties//lib/rails/generators/actions.rb#487 def rebase_indentation(value, amount = T.unsafe(nil)); end - # source://railties//lib/rails/generators/actions.rb#526 + # source://railties//lib/rails/generators/actions.rb#517 def route_namespace_pattern(namespace); end # Manage +Gemfile+ indentation for a DSL action block # - # source://railties//lib/rails/generators/actions.rb#508 + # source://railties//lib/rails/generators/actions.rb#499 def with_indentation(&block); end end @@ -3162,7 +3389,7 @@ class Rails::Generators::Actions::CreateMigration < ::Thor::Actions::CreateFile def say_status(status, color, message = T.unsafe(nil)); end end -# ActiveModel is a class to be implemented by each ORM to allow Rails to +# ActiveModel is a class to be implemented by each ORM to allow \Rails to # generate customized controller code. # # The API has the same methods as ActiveRecord, but each method returns a @@ -3192,15 +3419,19 @@ class Rails::Generators::ActiveModel # source://railties//lib/rails/generators/active_model.rb#31 def initialize(name); end - # DELETE destroy + # Used for: + # + # * DELETE +destroy+ # - # source://railties//lib/rails/generators/active_model.rb#75 + # source://railties//lib/rails/generators/active_model.rb#89 def destroy; end - # POST create - # PATCH/PUT update + # Used for: # - # source://railties//lib/rails/generators/active_model.rb#70 + # * POST +create+ + # * PATCH / PUT +update+ + # + # source://railties//lib/rails/generators/active_model.rb#82 def errors; end # Returns the value of attribute name. @@ -3208,301 +3439,398 @@ class Rails::Generators::ActiveModel # source://railties//lib/rails/generators/active_model.rb#29 def name; end - # POST create + # Used for: + # + # * POST +create+ # - # source://railties//lib/rails/generators/active_model.rb#59 + # source://railties//lib/rails/generators/active_model.rb#67 def save; end - # PATCH/PUT update + # Used for: + # + # * PATCH / PUT +update+ # - # source://railties//lib/rails/generators/active_model.rb#64 + # source://railties//lib/rails/generators/active_model.rb#74 def update(params = T.unsafe(nil)); end class << self - # GET index + # Used for: # - # source://railties//lib/rails/generators/active_model.rb#36 + # * GET +index+ + # + # source://railties//lib/rails/generators/active_model.rb#38 def all(klass); end - # GET new - # POST create + # Used for: + # + # * GET +new+ + # * POST +create+ # - # source://railties//lib/rails/generators/active_model.rb#50 + # source://railties//lib/rails/generators/active_model.rb#56 def build(klass, params = T.unsafe(nil)); end - # GET show - # GET edit - # PATCH/PUT update - # DELETE destroy + # Used for: + # + # * GET +show+ + # * GET +edit+ + # * PATCH / PUT +update+ + # * DELETE +destroy+ # - # source://railties//lib/rails/generators/active_model.rb#44 + # source://railties//lib/rails/generators/active_model.rb#48 def find(klass, params = T.unsafe(nil)); end end end -# source://railties//lib/rails/generators/app_base.rb#13 +# source://railties//lib/rails/generators/app_base.rb#14 class Rails::Generators::AppBase < ::Rails::Generators::Base include ::Rails::Generators::Database include ::Rails::Generators::AppName # @return [AppBase] a new instance of AppBase # - # source://railties//lib/rails/generators/app_base.rb#103 + # source://railties//lib/rails/generators/app_base.rb#120 def initialize(positional_argv, option_argv, *_arg2); end - # source://thor/1.2.2/lib/thor/base.rb#147 + # source://thor/1.3.1/lib/thor/base.rb#163 def app_path; end - # source://thor/1.2.2/lib/thor/base.rb#147 + # source://thor/1.3.1/lib/thor/base.rb#163 def app_path=(_arg0); end # Returns the value of attribute rails_template. # - # source://thor/1.2.2/lib/thor/base.rb#147 + # source://thor/1.3.1/lib/thor/base.rb#163 def rails_template; end # Sets the attribute rails_template # # @param value the value to set the attribute rails_template to. # - # source://thor/1.2.2/lib/thor/base.rb#147 + # source://thor/1.3.1/lib/thor/base.rb#163 def rails_template=(_arg0); end - # source://railties//lib/rails/generators/base.rb#393 + # source://railties//lib/rails/generators/base.rb#401 def shebang; end private - # CSS processors other than Tailwind require a node-based JavaScript environment. So overwrite the normal JS default - # if one such processor has been specified. - # - # source://railties//lib/rails/generators/app_base.rb#351 - def adjusted_javascript_option; end + # source://railties//lib/rails/generators/app_base.rb#707 + def add_bundler_platforms; end - # source://railties//lib/rails/generators/app_base.rb#144 + # source://railties//lib/rails/generators/app_base.rb#243 def apply_rails_template; end - # source://railties//lib/rails/generators/app_base.rb#175 + # source://railties//lib/rails/generators/app_base.rb#272 def asset_pipeline_gemfile_entry; end - # source://railties//lib/rails/generators/app_base.rb#133 + # source://railties//lib/rails/generators/app_base.rb#149 def build(meth, *args); end - # source://railties//lib/rails/generators/app_base.rb#125 + # source://railties//lib/rails/generators/app_base.rb#141 def builder; end - # source://railties//lib/rails/generators/app_base.rb#384 + # source://railties//lib/rails/generators/app_base.rb#611 def bundle_command(command, env = T.unsafe(nil)); end # @return [Boolean] # - # source://railties//lib/rails/generators/app_base.rb#410 + # source://railties//lib/rails/generators/app_base.rb#637 def bundle_install?; end - # source://railties//lib/rails/generators/app_base.rb#377 + # source://railties//lib/rails/generators/app_base.rb#641 + def bundler_windows_platforms; end + + # source://railties//lib/rails/generators/app_base.rb#604 def cable_gemfile_entry; end - # source://railties//lib/rails/generators/app_base.rb#201 + # source://railties//lib/rails/generators/app_base.rb#319 def comment_if(value); end - # source://railties//lib/rails/generators/app_base.rb#137 + # source://railties//lib/rails/generators/app_base.rb#236 def create_root; end - # source://railties//lib/rails/generators/app_base.rb#359 + # source://railties//lib/rails/generators/app_base.rb#592 def css_gemfile_entry; end - # source://railties//lib/rails/generators/app_base.rb#163 + # source://railties//lib/rails/generators/app_base.rb#260 def database_gemfile_entry; end + # source://railties//lib/rails/generators/app_base.rb#153 + def deduce_implied_options(options, option_reasons, meta_options); end + # @return [Boolean] # - # source://railties//lib/rails/generators/app_base.rb#418 + # source://railties//lib/rails/generators/app_base.rb#649 def depend_on_bootsnap?; end # @return [Boolean] # - # source://railties//lib/rails/generators/app_base.rb#414 + # source://railties//lib/rails/generators/app_base.rb#645 def depends_on_system_test?; end - # source://railties//lib/rails/generators/app_base.rb#479 + # source://railties//lib/rails/generators/app_base.rb#509 + def dockerfile_binfile_fixups; end + + # source://railties//lib/rails/generators/app_base.rb#538 + def dockerfile_build_packages; end + + # source://railties//lib/rails/generators/app_base.rb#503 + def dockerfile_bun_version; end + + # source://railties//lib/rails/generators/app_base.rb#752 + def dockerfile_chown_directories; end + + # source://railties//lib/rails/generators/app_base.rb#579 + def dockerfile_deploy_packages; end + + # source://railties//lib/rails/generators/app_base.rb#497 + def dockerfile_yarn_version; end + + # source://railties//lib/rails/generators/app_base.rb#748 + def edge_branch; end + + # source://railties//lib/rails/generators/app_base.rb#723 def empty_directory_with_keep_file(destination, config = T.unsafe(nil)); end - # source://railties//lib/rails/generators/app_base.rb#401 + # source://railties//lib/rails/generators/app_base.rb#628 def exec_bundle_command(bundle_command, command, env); end - # source://railties//lib/rails/generators/app_base.rb#110 + # source://railties//lib/rails/generators/app_base.rb#413 + def gem_ruby_version; end + + # source://railties//lib/rails/generators/app_base.rb#127 def gemfile_entries; end - # source://railties//lib/rails/generators/app_base.rb#473 + # source://railties//lib/rails/generators/app_base.rb#717 def generate_bundler_binstub; end - # source://railties//lib/rails/generators/app_base.rb#333 + # source://railties//lib/rails/generators/app_base.rb#736 + def git_init_command; end + + # source://railties//lib/rails/generators/app_base.rb#462 def hotwire_gemfile_entry; end + # ==== Options + # + # [+:meta_options+] + # A list of generator options which only serve to trigger other options. + # These options should have no other effects, and will be treated + # transparently when revoking other options. + # + # For example: --minimal implies both --skip-active-job and + # --skip-active-storage. Also, --skip-active-job by itself implies + # --skip-active-storage. If --skip-active-job is explicitly + # specified, --no-skip-active-storage should raise an error. But, if + # only --minimal is specified, --no-skip-active-storage should "undo" + # the implied --skip-active-job. This can be accomplished by passing + # meta_options: [:minimal]. + # + # In contrast, --api is not a meta option because it does other things + # besides implying options such as --skip-asset-pipeline. (And so --api + # with --no-skip-asset-pipeline should raise an error.) + # + # source://railties//lib/rails/generators/app_base.rb#206 + def imply_options(option_implications = T.unsafe(nil), meta_options: T.unsafe(nil)); end + # @return [Boolean] # - # source://railties//lib/rails/generators/app_base.rb#186 + # source://railties//lib/rails/generators/app_base.rb#299 def include_all_railties?; end - # source://railties//lib/rails/generators/app_base.rb#323 + # source://railties//lib/rails/generators/app_base.rb#452 def javascript_gemfile_entry; end - # source://railties//lib/rails/generators/app_base.rb#318 + # source://railties//lib/rails/generators/app_base.rb#447 def jbuilder_gemfile_entry; end - # source://railties//lib/rails/generators/app_base.rb#484 + # source://railties//lib/rails/generators/app_base.rb#728 def keep_file(destination); end # @return [Boolean] # - # source://railties//lib/rails/generators/app_base.rb#214 + # source://railties//lib/rails/generators/app_base.rb#332 def keeps?; end - # source://railties//lib/rails/generators/app_base.rb#369 - def psych_gemfile_entry; end + # source://railties//lib/rails/generators/app_base.rb#487 + def node_version; end - # source://railties//lib/rails/generators/app_base.rb#291 + # source://railties//lib/rails/generators/app_base.rb#421 def rails_gemfile_entry; end # @return [Boolean] # - # source://railties//lib/rails/generators/app_base.rb#287 + # source://railties//lib/rails/generators/app_base.rb#417 def rails_prerelease?; end - # source://railties//lib/rails/generators/app_base.rb#305 + # source://railties//lib/rails/generators/app_base.rb#303 + def rails_require_statement; end + + # source://railties//lib/rails/generators/app_base.rb#434 def rails_version_specifier(gem_version = T.unsafe(nil)); end - # source://railties//lib/rails/generators/app_base.rb#444 + # source://railties//lib/rails/generators/app_base.rb#219 + def report_implied_options; end + + # source://railties//lib/rails/generators/app_base.rb#283 + def required_railties; end + + # source://railties//lib/rails/generators/app_base.rb#676 def run_bundle; end - # source://railties//lib/rails/generators/app_base.rb#463 + # source://railties//lib/rails/generators/app_base.rb#695 def run_css; end - # source://railties//lib/rails/generators/app_base.rb#457 + # source://railties//lib/rails/generators/app_base.rb#689 def run_hotwire; end - # source://railties//lib/rails/generators/app_base.rb#448 + # source://railties//lib/rails/generators/app_base.rb#680 def run_javascript; end - # source://railties//lib/rails/generators/app_base.rb#150 + # source://railties//lib/rails/generators/app_base.rb#249 def set_default_accessors!; end # @return [Boolean] # - # source://railties//lib/rails/generators/app_base.rb#230 + # source://railties//lib/rails/generators/app_base.rb#348 + def skip_action_cable?; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/app_base.rb#356 def skip_action_mailbox?; end # @return [Boolean] # - # source://railties//lib/rails/generators/app_base.rb#226 + # source://railties//lib/rails/generators/app_base.rb#352 def skip_action_mailer?; end # @return [Boolean] # - # source://railties//lib/rails/generators/app_base.rb#234 + # source://railties//lib/rails/generators/app_base.rb#360 def skip_action_text?; end # @return [Boolean] # - # source://railties//lib/rails/generators/app_base.rb#222 + # source://railties//lib/rails/generators/app_base.rb#340 + def skip_active_record?; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/app_base.rb#344 def skip_active_storage?; end # @return [Boolean] # - # source://railties//lib/rails/generators/app_base.rb#238 - def skip_dev_gems?; end + # source://railties//lib/rails/generators/app_base.rb#364 + def skip_asset_pipeline?; end # @return [Boolean] # - # source://railties//lib/rails/generators/app_base.rb#246 + # source://railties//lib/rails/generators/app_base.rb#372 def skip_propshaft?; end # @return [Boolean] # - # source://railties//lib/rails/generators/app_base.rb#242 + # source://railties//lib/rails/generators/app_base.rb#368 def skip_sprockets?; end # @return [Boolean] # - # source://railties//lib/rails/generators/app_base.rb#218 + # source://railties//lib/rails/generators/app_base.rb#336 def sqlite3?; end - # source://railties//lib/rails/generators/app_base.rb#422 + # source://railties//lib/rails/generators/app_base.rb#653 def target_rails_prerelease(self_command = T.unsafe(nil)); end + # source://railties//lib/rails/generators/app_base.rb#732 + def user_default_branch; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/app_base.rb#483 + def using_bun?; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/app_base.rb#474 + def using_js_runtime?; end + # @return [Boolean] # - # source://railties//lib/rails/generators/app_base.rb#345 + # source://railties//lib/rails/generators/app_base.rb#479 def using_node?; end - # source://railties//lib/rails/generators/app_base.rb#171 + # source://railties//lib/rails/generators/app_base.rb#268 def web_server_gemfile_entry; end class << self - # source://railties//lib/rails/generators/app_base.rb#26 + # source://railties//lib/rails/generators/app_base.rb#30 def add_shared_options_for(name); end - # source://railties//lib/rails/generators/app_base.rb#22 + # source://railties//lib/rails/generators/app_base.rb#116 + def edge_branch; end + + # source://railties//lib/rails/generators/app_base.rb#26 def strict_args_position; end end end -# source://railties//lib/rails/generators/app_base.rb#251 +# source://railties//lib/rails/generators/app_base.rb#19 +Rails::Generators::AppBase::BUN_VERSION = T.let(T.unsafe(nil), String) + +# source://railties//lib/rails/generators/app_base.rb#377 class Rails::Generators::AppBase::GemfileEntry < ::Struct # @return [GemfileEntry] a new instance of GemfileEntry # - # source://railties//lib/rails/generators/app_base.rb#252 + # source://railties//lib/rails/generators/app_base.rb#378 def initialize(name, version, comment, options = T.unsafe(nil), commented_out = T.unsafe(nil)); end - # source://railties//lib/rails/generators/app_base.rb#276 + # source://railties//lib/rails/generators/app_base.rb#402 def to_s; end class << self - # source://railties//lib/rails/generators/app_base.rb#268 + # source://railties//lib/rails/generators/app_base.rb#394 def floats(name, comment = T.unsafe(nil)); end - # source://railties//lib/rails/generators/app_base.rb#256 + # source://railties//lib/rails/generators/app_base.rb#382 def github(name, github, branch = T.unsafe(nil), comment = T.unsafe(nil)); end - # source://railties//lib/rails/generators/app_base.rb#272 + # source://railties//lib/rails/generators/app_base.rb#398 def path(name, path, comment = T.unsafe(nil)); end - # source://railties//lib/rails/generators/app_base.rb#264 + # source://railties//lib/rails/generators/app_base.rb#390 def version(name, version, comment = T.unsafe(nil)); end end end +# source://railties//lib/rails/generators/app_base.rb#18 +Rails::Generators::AppBase::NODE_LTS_VERSION = T.let(T.unsafe(nil), String) + +# source://railties//lib/rails/generators/app_base.rb#181 +Rails::Generators::AppBase::OPTION_IMPLICATIONS = T.let(T.unsafe(nil), Hash) + # source://railties//lib/rails/generators/app_name.rb#5 module Rails::Generators::AppName private - # source://railties//lib/rails/generators/app_name.rb#33 + # source://railties//lib/rails/generators/app_name.rb#22 def app_const; end - # source://railties//lib/rails/generators/app_name.rb#28 + # source://railties//lib/rails/generators/app_name.rb#17 def app_const_base; end # source://railties//lib/rails/generators/app_name.rb#9 def app_name; end - # source://railties//lib/rails/generators/app_name.rb#28 - def camelized; end - - # source://railties//lib/rails/generators/app_name.rb#21 - def defined_app_const_base; end - - # source://railties//lib/rails/generators/app_name.rb#21 - def defined_app_const_base?; end - # source://railties//lib/rails/generators/app_name.rb#17 - def defined_app_name; end + def camelized; end # source://railties//lib/rails/generators/app_name.rb#13 def original_app_name; end # @return [Boolean] # - # source://railties//lib/rails/generators/app_name.rb#37 + # source://railties//lib/rails/generators/app_name.rb#26 def valid_const?; end end @@ -3520,93 +3848,93 @@ class Rails::Generators::Base < ::Thor::Group # Check whether the given class names are already taken by user # application or Ruby on Rails. # - # source://railties//lib/rails/generators/base.rb#256 + # source://railties//lib/rails/generators/base.rb#264 def class_collisions(*class_names); end # Takes in an array of nested modules and extracts the last module # - # source://railties//lib/rails/generators/base.rb#279 + # source://railties//lib/rails/generators/base.rb#287 def extract_last_module(nesting); end - # source://railties//lib/rails/generators/base.rb#294 + # source://railties//lib/rails/generators/base.rb#302 def indent(content, multiplier = T.unsafe(nil)); end # Wrap block with namespace of current application # if namespace exists and is not skipped # - # source://railties//lib/rails/generators/base.rb#288 + # source://railties//lib/rails/generators/base.rb#296 def module_namespacing(&block); end - # source://railties//lib/rails/generators/base.rb#304 + # source://railties//lib/rails/generators/base.rb#312 def namespace; end - # source://railties//lib/rails/generators/base.rb#312 + # source://railties//lib/rails/generators/base.rb#320 def namespace_dirs; end # @return [Boolean] # - # source://railties//lib/rails/generators/base.rb#308 + # source://railties//lib/rails/generators/base.rb#316 def namespaced?; end - # source://railties//lib/rails/generators/base.rb#316 + # source://railties//lib/rails/generators/base.rb#324 def namespaced_path; end - # source://railties//lib/rails/generators/base.rb#299 + # source://railties//lib/rails/generators/base.rb#307 def wrap_with_namespace(content); end class << self # Small macro to add ruby as an option to the generator with proper # default value plus an instance helper method called shebang. # - # source://railties//lib/rails/generators/base.rb#388 + # source://railties//lib/rails/generators/base.rb#396 def add_shebang_option!; end - # Use Rails default banner. + # Use \Rails default banner. # - # source://railties//lib/rails/generators/base.rb#321 + # source://railties//lib/rails/generators/base.rb#329 def banner; end # Sets the base_name taking into account the current class namespace. # - # source://railties//lib/rails/generators/base.rb#326 + # source://railties//lib/rails/generators/base.rb#334 def base_name; end # Returns the base root for a common set of generators. This is used to dynamically # guess the default source root. # - # source://railties//lib/rails/generators/base.rb#228 + # source://railties//lib/rails/generators/base.rb#236 def base_root; end # Make class option aware of Rails::Generators.options and Rails::Generators.aliases. # - # source://railties//lib/rails/generators/base.rb#209 + # source://railties//lib/rails/generators/base.rb#217 def class_option(name, options = T.unsafe(nil)); end # Returns default aliases for the option name given doing a lookup in # Rails::Generators.aliases. # - # source://railties//lib/rails/generators/base.rb#349 + # source://railties//lib/rails/generators/base.rb#357 def default_aliases_for_option(name, options); end # Returns default for the option name given doing a lookup in config. # - # source://railties//lib/rails/generators/base.rb#354 + # source://railties//lib/rails/generators/base.rb#362 def default_for_option(config, name, options, default); end - # source://railties//lib/rails/generators/base.rb#414 + # source://railties//lib/rails/generators/base.rb#422 def default_generator_root; end # Returns the default source root for a given generator. This is used internally - # by rails to set its generators source root. If you want to customize your source + # by \Rails to set its generators source root. If you want to customize your source # root, you should use source_root. # - # source://railties//lib/rails/generators/base.rb#219 + # source://railties//lib/rails/generators/base.rb#227 def default_source_root; end # Returns the default value for the option name given doing a lookup in # Rails::Generators.options. # - # source://railties//lib/rails/generators/base.rb#343 + # source://railties//lib/rails/generators/base.rb#351 def default_value_for_option(name, options); end # Tries to get the description from a USAGE file one folder above the source @@ -3623,7 +3951,7 @@ class Rails::Generators::Base < ::Thor::Group # Removes the namespaces and get the generator name. For example, # Rails::Generators::ModelGenerator will return "model" as generator name. # - # source://railties//lib/rails/generators/base.rb#334 + # source://railties//lib/rails/generators/base.rb#342 def generator_name; end # Convenience method to hide this generator from the available ones when @@ -3649,15 +3977,15 @@ class Rails::Generators::Base < ::Thor::Group # # For example, if the user invoke the controller generator as: # - # bin/rails generate controller Account --test-framework=test_unit + # $ bin/rails generate controller Account --test-framework=test_unit # # The controller generator will then try to invoke the following generators: # # "rails:test_unit", "test_unit:controller", "test_unit" # # Notice that "rails:generators:test_unit" could be loaded as well, what - # Rails looks for is the first and last parts of the namespace. This is what - # allows any test framework to hook into Rails as long as it provides any + # \Rails looks for is the first and last parts of the namespace. This is what + # allows any test framework to hook into \Rails as long as it provides any # of the hooks above. # # ==== Options @@ -3704,11 +4032,11 @@ class Rails::Generators::Base < ::Thor::Group # All hooks come with switches for user interface. If you do not want # to use any test framework, you can do: # - # bin/rails generate controller Account --skip-test-framework + # $ bin/rails generate controller Account --skip-test-framework # # Or similarly: # - # bin/rails generate controller Account --no-test-framework + # $ bin/rails generate controller Account --no-test-framework # # ==== Boolean hooks # @@ -3720,7 +4048,7 @@ class Rails::Generators::Base < ::Thor::Group # # Then, if you want webrat to be invoked, just supply: # - # bin/rails generate controller Account --webrat + # $ bin/rails generate controller Account --webrat # # The hooks lookup is similar as above: # @@ -3746,13 +4074,13 @@ class Rails::Generators::Base < ::Thor::Group # Keep hooks configuration that are used on prepare_for_invocation. # - # source://railties//lib/rails/generators/base.rb#367 + # source://railties//lib/rails/generators/base.rb#375 def hooks; end # Cache source root and add lib/generators/base/generator/templates to # source paths. # - # source://railties//lib/rails/generators/base.rb#234 + # source://railties//lib/rails/generators/base.rb#242 def inherited(base); end # Convenience method to get the namespace from the class name. It's the @@ -3765,14 +4093,14 @@ class Rails::Generators::Base < ::Thor::Group # Prepare class invocation to search on Rails namespace if a previous # added hook is being used. # - # source://railties//lib/rails/generators/base.rb#373 + # source://railties//lib/rails/generators/base.rb#381 def prepare_for_invocation(name, value); end # Remove a previously added hook. # # remove_hook_for :orm # - # source://railties//lib/rails/generators/base.rb#200 + # source://railties//lib/rails/generators/base.rb#207 def remove_hook_for(*names); end # Returns the source root for this generator using default_source_root as default. @@ -3780,15 +4108,15 @@ class Rails::Generators::Base < ::Thor::Group # source://railties//lib/rails/generators/base.rb#34 def source_root(path = T.unsafe(nil)); end - # source://railties//lib/rails/generators/base.rb#406 + # source://railties//lib/rails/generators/base.rb#414 def usage_path; end end end -# source://railties//lib/rails/generators.rb#32 +# source://railties//lib/rails/generators.rb#29 Rails::Generators::DEFAULT_ALIASES = T.let(T.unsafe(nil), Hash) -# source://railties//lib/rails/generators.rb#49 +# source://railties//lib/rails/generators.rb#46 Rails::Generators::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) # source://railties//lib/rails/generators/database.rb#5 @@ -3796,15 +4124,27 @@ module Rails::Generators::Database # source://railties//lib/rails/generators/database.rb#9 def initialize(*_arg0); end - # source://railties//lib/rails/generators/database.rb#29 + # source://railties//lib/rails/generators/database.rb#62 + def build_package_for_database(database = T.unsafe(nil)); end + + # source://railties//lib/rails/generators/database.rb#50 def convert_database_option_for_jruby; end + # source://railties//lib/rails/generators/database.rb#70 + def deploy_package_for_database(database = T.unsafe(nil)); end + + # source://railties//lib/rails/generators/database.rb#30 + def docker_for_database_build(database = T.unsafe(nil)); end + + # source://railties//lib/rails/generators/database.rb#40 + def docker_for_database_deploy(database = T.unsafe(nil)); end + # source://railties//lib/rails/generators/database.rb#14 def gem_for_database(database = T.unsafe(nil)); end private - # source://railties//lib/rails/generators/database.rb#42 + # source://railties//lib/rails/generators/database.rb#80 def mysql_socket; end end @@ -3821,17 +4161,17 @@ class Rails::Generators::Error < ::Thor::Error; end class Rails::Generators::GeneratedAttribute # @return [GeneratedAttribute] a new instance of GeneratedAttribute # - # source://railties//lib/rails/generators/generated_attribute.rb#97 + # source://railties//lib/rails/generators/generated_attribute.rb#109 def initialize(name, type = T.unsafe(nil), index_type = T.unsafe(nil), attr_options = T.unsafe(nil)); end # @return [Boolean] # - # source://railties//lib/rails/generators/generated_attribute.rb#199 + # source://railties//lib/rails/generators/generated_attribute.rb#211 def attachment?; end # @return [Boolean] # - # source://railties//lib/rails/generators/generated_attribute.rb#203 + # source://railties//lib/rails/generators/generated_attribute.rb#215 def attachments?; end # Returns the value of attribute attr_options. @@ -3839,34 +4179,34 @@ class Rails::Generators::GeneratedAttribute # source://railties//lib/rails/generators/generated_attribute.rb#31 def attr_options; end - # source://railties//lib/rails/generators/generated_attribute.rb#159 + # source://railties//lib/rails/generators/generated_attribute.rb#171 def column_name; end - # source://railties//lib/rails/generators/generated_attribute.rb#121 + # source://railties//lib/rails/generators/generated_attribute.rb#133 def default; end - # source://railties//lib/rails/generators/generated_attribute.rb#105 + # source://railties//lib/rails/generators/generated_attribute.rb#117 def field_type; end # @return [Boolean] # - # source://railties//lib/rails/generators/generated_attribute.rb#163 + # source://railties//lib/rails/generators/generated_attribute.rb#175 def foreign_key?; end # @return [Boolean] # - # source://railties//lib/rails/generators/generated_attribute.rb#179 + # source://railties//lib/rails/generators/generated_attribute.rb#191 def has_index?; end # @return [Boolean] # - # source://railties//lib/rails/generators/generated_attribute.rb#183 + # source://railties//lib/rails/generators/generated_attribute.rb#195 def has_uniq_index?; end - # source://railties//lib/rails/generators/generated_attribute.rb#147 + # source://railties//lib/rails/generators/generated_attribute.rb#159 def human_name; end - # source://railties//lib/rails/generators/generated_attribute.rb#151 + # source://railties//lib/rails/generators/generated_attribute.rb#163 def index_name; end # Sets the attribute index_name @@ -3876,10 +4216,10 @@ class Rails::Generators::GeneratedAttribute # source://railties//lib/rails/generators/generated_attribute.rb#32 def index_name=(_arg0); end - # source://railties//lib/rails/generators/generated_attribute.rb#215 + # source://railties//lib/rails/generators/generated_attribute.rb#227 def inject_index_options; end - # source://railties//lib/rails/generators/generated_attribute.rb#211 + # source://railties//lib/rails/generators/generated_attribute.rb#223 def inject_options; end # Returns the value of attribute name. @@ -3894,43 +4234,43 @@ class Rails::Generators::GeneratedAttribute # source://railties//lib/rails/generators/generated_attribute.rb#30 def name=(_arg0); end - # source://railties//lib/rails/generators/generated_attribute.rb#219 + # source://railties//lib/rails/generators/generated_attribute.rb#231 def options_for_migration; end # @return [Boolean] # - # source://railties//lib/rails/generators/generated_attribute.rb#187 + # source://railties//lib/rails/generators/generated_attribute.rb#199 def password_digest?; end - # source://railties//lib/rails/generators/generated_attribute.rb#139 + # source://railties//lib/rails/generators/generated_attribute.rb#151 def plural_name; end # @return [Boolean] # - # source://railties//lib/rails/generators/generated_attribute.rb#171 + # source://railties//lib/rails/generators/generated_attribute.rb#183 def polymorphic?; end # @return [Boolean] # - # source://railties//lib/rails/generators/generated_attribute.rb#167 + # source://railties//lib/rails/generators/generated_attribute.rb#179 def reference?; end # @return [Boolean] # - # source://railties//lib/rails/generators/generated_attribute.rb#175 + # source://railties//lib/rails/generators/generated_attribute.rb#187 def required?; end # @return [Boolean] # - # source://railties//lib/rails/generators/generated_attribute.rb#195 + # source://railties//lib/rails/generators/generated_attribute.rb#207 def rich_text?; end - # source://railties//lib/rails/generators/generated_attribute.rb#143 + # source://railties//lib/rails/generators/generated_attribute.rb#155 def singular_name; end # @return [Boolean] # - # source://railties//lib/rails/generators/generated_attribute.rb#191 + # source://railties//lib/rails/generators/generated_attribute.rb#203 def token?; end # Returns the value of attribute type. @@ -3947,26 +4287,31 @@ class Rails::Generators::GeneratedAttribute # @return [Boolean] # - # source://railties//lib/rails/generators/generated_attribute.rb#207 + # source://railties//lib/rails/generators/generated_attribute.rb#219 def virtual?; end class << self + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#67 + def dangerous_name?(name); end + # source://railties//lib/rails/generators/generated_attribute.rb#35 def parse(column_definition); end # @return [Boolean] # - # source://railties//lib/rails/generators/generated_attribute.rb#72 + # source://railties//lib/rails/generators/generated_attribute.rb#82 def reference?(type); end # @return [Boolean] # - # source://railties//lib/rails/generators/generated_attribute.rb#68 + # source://railties//lib/rails/generators/generated_attribute.rb#78 def valid_index_type?(index_type); end # @return [Boolean] # - # source://railties//lib/rails/generators/generated_attribute.rb#63 + # source://railties//lib/rails/generators/generated_attribute.rb#72 def valid_type?(type); end private @@ -3974,7 +4319,7 @@ class Rails::Generators::GeneratedAttribute # parse possible attribute options like :limit for string/text/binary/integer, :precision/:scale for decimals or :polymorphic for references/belongs_to # when declaring options curly brackets should be used # - # source://railties//lib/rails/generators/generated_attribute.rb#79 + # source://railties//lib/rails/generators/generated_attribute.rb#89 def parse_type_and_options(type); end end end @@ -4053,7 +4398,7 @@ end # source://railties//lib/rails/generators/model_helpers.rb#7 module Rails::Generators::ModelHelpers - # source://railties//lib/rails/generators/model_helpers.rb#25 + # source://railties//lib/rails/generators/model_helpers.rb#26 def initialize(args, *_options); end # source://railties//lib/rails/generators/model_helpers.rb#19 @@ -4066,17 +4411,17 @@ module Rails::Generators::ModelHelpers # @return [Boolean] # - # source://railties//lib/rails/generators/model_helpers.rb#55 + # source://railties//lib/rails/generators/model_helpers.rb#56 def inflection_impossible?(name); end # @return [Boolean] # - # source://railties//lib/rails/generators/model_helpers.rb#51 + # source://railties//lib/rails/generators/model_helpers.rb#52 def irregular_model_name?(name); end # @return [Boolean] # - # source://railties//lib/rails/generators/model_helpers.rb#47 + # source://railties//lib/rails/generators/model_helpers.rb#48 def plural_model_name?(name); end class << self @@ -4109,16 +4454,16 @@ class Rails::Generators::NamedBase < ::Rails::Generators::Base # Returns the value of attribute file_name. # - # source://thor/1.2.2/lib/thor/base.rb#139 + # source://thor/1.3.1/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.2.2/lib/thor/base.rb#147 + # source://thor/1.3.1/lib/thor/base.rb#163 def name; end - # source://thor/1.2.2/lib/thor/base.rb#147 + # source://thor/1.3.1/lib/thor/base.rb#163 def name=(_arg0); end # source://railties//lib/rails/generators/named_base.rb#23 @@ -4333,90 +4678,92 @@ end # source://railties//lib/rails/generators/test_case.rb#30 class Rails::Generators::TestCase < ::ActiveSupport::TestCase include ::ActiveSupport::Testing::Stream - include ::Rails::Generators::Testing::Behaviour + include ::Rails::Generators::Testing::Behavior include ::Rails::Generators::Testing::SetupAndTeardown include ::Rails::Generators::Testing::Assertions include ::FileUtils::StreamUtils_ include ::FileUtils - extend ::Rails::Generators::Testing::Behaviour::ClassMethods + extend ::Rails::Generators::Testing::Behavior::ClassMethods - # source://railties//lib/rails/generators/testing/behaviour.rb#21 + # source://railties//lib/rails/generators/testing/behavior.rb#21 def current_path; end - # source://railties//lib/rails/generators/testing/behaviour.rb#21 + # source://railties//lib/rails/generators/testing/behavior.rb#21 def current_path=(_arg0); end - # source://railties//lib/rails/generators/testing/behaviour.rb#21 + # source://railties//lib/rails/generators/testing/behavior.rb#21 def current_path?; end - # source://railties//lib/rails/generators/testing/behaviour.rb#22 + # source://railties//lib/rails/generators/testing/behavior.rb#22 def default_arguments; end - # source://railties//lib/rails/generators/testing/behaviour.rb#22 + # source://railties//lib/rails/generators/testing/behavior.rb#22 def default_arguments=(_arg0); end - # source://railties//lib/rails/generators/testing/behaviour.rb#22 + # source://railties//lib/rails/generators/testing/behavior.rb#22 def default_arguments?; end - # source://railties//lib/rails/generators/testing/behaviour.rb#23 + # source://railties//lib/rails/generators/testing/behavior.rb#23 def destination_root; end - # source://railties//lib/rails/generators/testing/behaviour.rb#23 + # source://railties//lib/rails/generators/testing/behavior.rb#23 def destination_root=(_arg0); end - # source://railties//lib/rails/generators/testing/behaviour.rb#23 + # source://railties//lib/rails/generators/testing/behavior.rb#23 def destination_root?; end - # source://railties//lib/rails/generators/testing/behaviour.rb#24 + # source://railties//lib/rails/generators/testing/behavior.rb#24 def generator_class; end - # source://railties//lib/rails/generators/testing/behaviour.rb#24 + # source://railties//lib/rails/generators/testing/behavior.rb#24 def generator_class=(_arg0); end - # source://railties//lib/rails/generators/testing/behaviour.rb#24 + # source://railties//lib/rails/generators/testing/behavior.rb#24 def generator_class?; end class << self - # source://railties//lib/rails/generators/testing/behaviour.rb#21 + # source://railties//lib/rails/generators/testing/behavior.rb#21 def current_path; end - # source://railties//lib/rails/generators/testing/behaviour.rb#21 + # source://railties//lib/rails/generators/testing/behavior.rb#21 def current_path=(value); end - # source://railties//lib/rails/generators/testing/behaviour.rb#21 + # source://railties//lib/rails/generators/testing/behavior.rb#21 def current_path?; end - # source://railties//lib/rails/generators/testing/behaviour.rb#22 + # source://railties//lib/rails/generators/testing/behavior.rb#22 def default_arguments; end - # source://railties//lib/rails/generators/testing/behaviour.rb#22 + # source://railties//lib/rails/generators/testing/behavior.rb#22 def default_arguments=(value); end - # source://railties//lib/rails/generators/testing/behaviour.rb#22 + # source://railties//lib/rails/generators/testing/behavior.rb#22 def default_arguments?; end - # source://railties//lib/rails/generators/testing/behaviour.rb#23 + # source://railties//lib/rails/generators/testing/behavior.rb#23 def destination_root; end - # source://railties//lib/rails/generators/testing/behaviour.rb#23 + # source://railties//lib/rails/generators/testing/behavior.rb#23 def destination_root=(value); end - # source://railties//lib/rails/generators/testing/behaviour.rb#23 + # source://railties//lib/rails/generators/testing/behavior.rb#23 def destination_root?; end - # source://railties//lib/rails/generators/testing/behaviour.rb#24 + # source://railties//lib/rails/generators/testing/behavior.rb#24 def generator_class; end - # source://railties//lib/rails/generators/testing/behaviour.rb#24 + # source://railties//lib/rails/generators/testing/behavior.rb#24 def generator_class=(value); end - # source://railties//lib/rails/generators/testing/behaviour.rb#24 + # source://railties//lib/rails/generators/testing/behavior.rb#24 def generator_class?; end end end -# source://railties//lib/rails/generators/testing/behaviour.rb#13 -module Rails::Generators::Testing; end +# source://railties//lib/rails/generators/testing/behavior.rb#13 +module Rails::Generators::Testing + include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor +end # source://railties//lib/rails/generators/testing/assertions.rb#6 module Rails::Generators::Testing::Assertions @@ -4556,26 +4903,26 @@ module Rails::Generators::Testing::Assertions def assert_no_migration(relative); end end -# source://railties//lib/rails/generators/testing/behaviour.rb#14 -module Rails::Generators::Testing::Behaviour +# source://railties//lib/rails/generators/testing/behavior.rb#14 +module Rails::Generators::Testing::Behavior include ::ActiveSupport::Testing::Stream extend ::ActiveSupport::Concern include GeneratedInstanceMethods mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::Rails::Generators::Testing::Behaviour::ClassMethods + mixes_in_class_methods ::Rails::Generators::Testing::Behavior::ClassMethods # Create a Rails::Generators::GeneratedAttribute by supplying the # attribute type and, optionally, the attribute name: # # create_generated_attribute(:string, "name") # - # source://railties//lib/rails/generators/testing/behaviour.rb#85 + # source://railties//lib/rails/generators/testing/behavior.rb#85 def create_generated_attribute(attribute_type, name = T.unsafe(nil), index = T.unsafe(nil)); end # Instantiate the generator. # - # source://railties//lib/rails/generators/testing/behaviour.rb#77 + # source://railties//lib/rails/generators/testing/behavior.rb#77 def generator(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end # Runs the generator configured for this class. The first argument is an array like @@ -4595,25 +4942,25 @@ module Rails::Generators::Testing::Behaviour # You can provide a configuration hash as second argument. This method returns the output # printed by the generator. # - # source://railties//lib/rails/generators/testing/behaviour.rb#67 + # source://railties//lib/rails/generators/testing/behavior.rb#67 def run_generator(args = T.unsafe(nil), config = T.unsafe(nil)); end private # @return [Boolean] # - # source://railties//lib/rails/generators/testing/behaviour.rb#90 + # source://railties//lib/rails/generators/testing/behavior.rb#90 def destination_root_is_set?; end - # source://railties//lib/rails/generators/testing/behaviour.rb#94 + # source://railties//lib/rails/generators/testing/behavior.rb#94 def ensure_current_path; end - # source://railties//lib/rails/generators/testing/behaviour.rb#104 + # source://railties//lib/rails/generators/testing/behavior.rb#104 def migration_file_name(relative); end # Clears all files and directories in destination. # - # source://railties//lib/rails/generators/testing/behaviour.rb#99 + # source://railties//lib/rails/generators/testing/behavior.rb#99 def prepare_destination; end module GeneratedClassMethods @@ -4647,28 +4994,28 @@ module Rails::Generators::Testing::Behaviour end end -# source://railties//lib/rails/generators/testing/behaviour.rb#27 -module Rails::Generators::Testing::Behaviour::ClassMethods +# source://railties//lib/rails/generators/testing/behavior.rb#27 +module Rails::Generators::Testing::Behavior::ClassMethods # Sets default arguments on generator invocation. This can be overwritten when # invoking it. # # arguments %w(app_name --skip-active-record) # - # source://railties//lib/rails/generators/testing/behaviour.rb#39 + # source://railties//lib/rails/generators/testing/behavior.rb#39 def arguments(array); end # Sets the destination of generator files: # # destination File.expand_path("../tmp", __dir__) # - # source://railties//lib/rails/generators/testing/behaviour.rb#46 + # source://railties//lib/rails/generators/testing/behavior.rb#46 def destination(path); end # Sets which generator should be tested: # # tests AppGenerator # - # source://railties//lib/rails/generators/testing/behaviour.rb#31 + # source://railties//lib/rails/generators/testing/behavior.rb#31 def tests(klass); end end @@ -4681,8 +5028,68 @@ module Rails::Generators::Testing::SetupAndTeardown def teardown; end end +# Built-in Health Check Endpoint +# +# \Rails also comes with a built-in health check endpoint that is reachable at +# the +/up+ path. This endpoint will return a 200 status code if the app has +# booted with no exceptions, and a 500 status code otherwise. +# +# In production, many applications are required to report their status upstream, +# whether it's to an uptime monitor that will page an engineer when things go +# wrong, or a load balancer or Kubernetes controller used to determine a pod's +# health. This health check is designed to be a one-size fits all that will work +# in many situations. +# +# While any newly generated \Rails applications will have the health check at +# +/up+, you can configure the path to be anything you'd like in your +# "config/routes.rb": +# +# Rails.application.routes.draw do +# get "healthz" => "rails/health#show", as: :rails_health_check +# end +# +# The health check will now be accessible via the +/healthz+ path. +# +# NOTE: This endpoint does not reflect the status of all of your application's +# dependencies, such as the database or redis cluster. Replace +# "rails/health#show" with your own controller action if you have +# application specific needs. +# +# Think carefully about what you want to check as it can lead to situations +# where your application is being restarted due to a third-party service going +# bad. Ideally, you should design your application to handle those outages +# gracefully. +# +# source://railties//lib/rails/health_controller.rb#35 +class Rails::HealthController < ::ActionController::Base + # source://railties//lib/rails/health_controller.rb#38 + def show; end + + private + + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 + def _layout(lookup_context, formats); end + + # source://railties//lib/rails/health_controller.rb#51 + def html_status(color:); end + + # source://railties//lib/rails/health_controller.rb#47 + def render_down; end + + # source://railties//lib/rails/health_controller.rb#43 + def render_up; end + + class << self + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 + def middleware_stack; end + + # source://activesupport/7.1.3.2/lib/active_support/rescuable.rb#15 + def rescue_handlers; end + end +end + # This module helps build the runtime properties that are displayed in -# Rails::InfoController responses. These include the active Rails version, +# Rails::InfoController responses. These include the active \Rails version, # Ruby version, Rack version, and so on. # # source://railties//lib/rails/info.rb#9 @@ -4727,29 +5134,26 @@ class Rails::InfoController < ::Rails::ApplicationController private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end # source://railties//lib/rails/info_controller.rb#8 def _layout_from_proc; end # source://railties//lib/rails/info_controller.rb#36 - def match_route; end - - # source://railties//lib/rails/info_controller.rb#40 - def with_leading_slash(path); end + def matching_routes(query:, exact_match:); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#212 def _layout_conditions; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -4846,48 +5250,51 @@ end # source://railties//lib/rails/mailers_controller.rb#5 class Rails::MailersController < ::Rails::ApplicationController + # source://railties//lib/rails/mailers_controller.rb#21 + def download; end + # source://railties//lib/rails/mailers_controller.rb#16 def index; end - # source://railties//lib/rails/mailers_controller.rb#21 + # source://railties//lib/rails/mailers_controller.rb#31 def preview; end private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end - # source://railties//lib/rails/mailers_controller.rb#80 + # source://railties//lib/rails/mailers_controller.rb#90 def find_part(format); end - # source://railties//lib/rails/mailers_controller.rb#68 + # source://railties//lib/rails/mailers_controller.rb#78 def find_preferred_part(*formats); end - # source://railties//lib/rails/mailers_controller.rb#56 + # source://railties//lib/rails/mailers_controller.rb#66 def find_preview; end - # source://railties//lib/rails/mailers_controller.rb#92 + # source://railties//lib/rails/mailers_controller.rb#102 def locale_query(locale); end - # source://railties//lib/rails/mailers_controller.rb#88 + # source://railties//lib/rails/mailers_controller.rb#98 def part_query(mime_type); end - # source://railties//lib/rails/mailers_controller.rb#96 + # source://railties//lib/rails/mailers_controller.rb#106 def set_locale(&block); end # @return [Boolean] # - # source://railties//lib/rails/mailers_controller.rb#52 + # source://railties//lib/rails/mailers_controller.rb#62 def show_previews?; end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.3.2/lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -4908,126 +5315,126 @@ end # source://railties//lib/rails/paths.rb#6 module Rails::Paths; end -# source://railties//lib/rails/paths.rb#111 +# source://railties//lib/rails/paths.rb#114 class Rails::Paths::Path include ::Enumerable # @return [Path] a new instance of Path # - # source://railties//lib/rails/paths.rb#116 + # source://railties//lib/rails/paths.rb#119 def initialize(root, current, paths, options = T.unsafe(nil)); end - # source://railties//lib/rails/paths.rb#168 + # source://railties//lib/rails/paths.rb#171 def <<(path); end - # source://railties//lib/rails/paths.rb#129 + # source://railties//lib/rails/paths.rb#132 def absolute_current; end - # source://railties//lib/rails/paths.rb#150 + # source://railties//lib/rails/paths.rb#153 def autoload!; end - # source://railties//lib/rails/paths.rb#158 + # source://railties//lib/rails/paths.rb#161 def autoload?; end - # source://railties//lib/rails/paths.rb#150 + # source://railties//lib/rails/paths.rb#153 def autoload_once!; end - # source://railties//lib/rails/paths.rb#158 + # source://railties//lib/rails/paths.rb#161 def autoload_once?; end - # source://railties//lib/rails/paths.rb#133 + # source://railties//lib/rails/paths.rb#136 def children; end - # source://railties//lib/rails/paths.rb#173 + # source://railties//lib/rails/paths.rb#176 def concat(paths); end - # source://railties//lib/rails/paths.rb#164 + # source://railties//lib/rails/paths.rb#167 def each(&block); end - # source://railties//lib/rails/paths.rb#150 + # source://railties//lib/rails/paths.rb#153 def eager_load!; end - # source://railties//lib/rails/paths.rb#158 + # source://railties//lib/rails/paths.rb#161 def eager_load?; end # Returns all expanded paths but only if they exist in the filesystem. # - # source://railties//lib/rails/paths.rb#217 + # source://railties//lib/rails/paths.rb#220 def existent; end - # source://railties//lib/rails/paths.rb#228 + # source://railties//lib/rails/paths.rb#231 def existent_directories; end # Expands all paths against the root and return all unique values. # - # source://railties//lib/rails/paths.rb#198 + # source://railties//lib/rails/paths.rb#201 def expanded; end - # source://railties//lib/rails/paths.rb#193 + # source://railties//lib/rails/paths.rb#196 def extensions; end - # source://railties//lib/rails/paths.rb#140 + # source://railties//lib/rails/paths.rb#143 def first; end # Returns the value of attribute glob. # - # source://railties//lib/rails/paths.rb#114 + # source://railties//lib/rails/paths.rb#117 def glob; end # Sets the attribute glob # # @param value the value to set the attribute glob to. # - # source://railties//lib/rails/paths.rb#114 + # source://railties//lib/rails/paths.rb#117 def glob=(_arg0); end - # source://railties//lib/rails/paths.rb#144 + # source://railties//lib/rails/paths.rb#147 def last; end - # source://railties//lib/rails/paths.rb#150 + # source://railties//lib/rails/paths.rb#153 def load_path!; end - # source://railties//lib/rails/paths.rb#158 + # source://railties//lib/rails/paths.rb#161 def load_path?; end - # source://railties//lib/rails/paths.rb#185 + # source://railties//lib/rails/paths.rb#188 def paths; end - # source://railties//lib/rails/paths.rb#168 + # source://railties//lib/rails/paths.rb#171 def push(path); end - # source://railties//lib/rails/paths.rb#154 + # source://railties//lib/rails/paths.rb#157 def skip_autoload!; end - # source://railties//lib/rails/paths.rb#154 + # source://railties//lib/rails/paths.rb#157 def skip_autoload_once!; end - # source://railties//lib/rails/paths.rb#154 + # source://railties//lib/rails/paths.rb#157 def skip_eager_load!; end - # source://railties//lib/rails/paths.rb#154 + # source://railties//lib/rails/paths.rb#157 def skip_load_path!; end # Expands all paths against the root and return all unique values. # - # source://railties//lib/rails/paths.rb#198 + # source://railties//lib/rails/paths.rb#201 def to_a; end - # source://railties//lib/rails/paths.rb#181 + # source://railties//lib/rails/paths.rb#184 def to_ary; end - # source://railties//lib/rails/paths.rb#177 + # source://railties//lib/rails/paths.rb#180 def unshift(*paths); end private - # source://railties//lib/rails/paths.rb#235 + # source://railties//lib/rails/paths.rb#238 def files_in(path); end end -# This object is an extended hash that behaves as root of the Rails::Paths system. +# This object is an extended hash that behaves as root of the Rails::Paths system. # It allows you to collect information about how you want to structure your application -# paths through a Hash-like API. It requires you to give a physical path on initialization. +# paths through a Hash-like \API. It requires you to give a physical path on initialization. # # root = Root.new "/rails" # root.add "app/controllers", eager_load: true @@ -5039,7 +5446,8 @@ end # path.eager_load? # => true # path.is_a?(Rails::Paths::Path) # => true # -# The +Path+ object is simply an enumerable and allows you to easily add extra paths: +# The Path[rdoc-ref:Rails::Paths::Path] object is simply an enumerable and +# allows you to easily add extra paths: # # path.is_a?(Enumerable) # => true # path.to_ary.inspect # => ["app/controllers"] @@ -5047,17 +5455,19 @@ end # path << "lib/controllers" # path.to_ary.inspect # => ["app/controllers", "lib/controllers"] # -# Notice that when you add a path using +add+, the path object created already -# contains the path with the same path value given to +add+. In some situations, -# you may not want this behavior, so you can give :with as option. +# Notice that when you add a path using #add, the +# Path[rdoc-ref:Rails::Paths::Path] object created already contains the path +# with the same path value given to #add. In some situations, you may not +# want this behavior, so you can give :with as option. # # root.add "config/routes", with: "config/routes.rb" # root["config/routes"].inspect # => ["config/routes.rb"] # -# The +add+ method accepts the following options as arguments: -# eager_load, autoload, autoload_once, and glob. +# The #add method accepts the following options as arguments: +# +eager_load+, +autoload+, +autoload_once+, and +glob+. # -# Finally, the +Path+ object also provides a few helpers: +# Finally, the Path[rdoc-ref:Rails::Paths::Path] object also provides a few +# helpers: # # root = Root.new "/rails" # root.add "app/controllers" @@ -5065,63 +5475,63 @@ end # root["app/controllers"].expanded # => ["/rails/app/controllers"] # root["app/controllers"].existent # => ["/rails/app/controllers"] # -# Check the Rails::Paths::Path documentation for more information. +# Check the Rails::Paths::Path documentation for more information. # -# source://railties//lib/rails/paths.rb#48 +# source://railties//lib/rails/paths.rb#51 class Rails::Paths::Root # @return [Root] a new instance of Root # - # source://railties//lib/rails/paths.rb#51 + # source://railties//lib/rails/paths.rb#54 def initialize(path); end - # source://railties//lib/rails/paths.rb#66 + # source://railties//lib/rails/paths.rb#69 def [](path); end - # source://railties//lib/rails/paths.rb#56 + # source://railties//lib/rails/paths.rb#59 def []=(path, value); end - # source://railties//lib/rails/paths.rb#61 + # source://railties//lib/rails/paths.rb#64 def add(path, options = T.unsafe(nil)); end - # source://railties//lib/rails/paths.rb#82 + # source://railties//lib/rails/paths.rb#85 def all_paths; end - # source://railties//lib/rails/paths.rb#86 + # source://railties//lib/rails/paths.rb#89 def autoload_once; end - # source://railties//lib/rails/paths.rb#94 + # source://railties//lib/rails/paths.rb#97 def autoload_paths; end - # source://railties//lib/rails/paths.rb#90 + # source://railties//lib/rails/paths.rb#93 def eager_load; end - # source://railties//lib/rails/paths.rb#74 + # source://railties//lib/rails/paths.rb#77 def keys; end - # source://railties//lib/rails/paths.rb#98 + # source://railties//lib/rails/paths.rb#101 def load_paths; end # Returns the value of attribute path. # - # source://railties//lib/rails/paths.rb#49 + # source://railties//lib/rails/paths.rb#52 def path; end # Sets the attribute path # # @param value the value to set the attribute path to. # - # source://railties//lib/rails/paths.rb#49 + # source://railties//lib/rails/paths.rb#52 def path=(_arg0); end - # source://railties//lib/rails/paths.rb#70 + # source://railties//lib/rails/paths.rb#73 def values; end - # source://railties//lib/rails/paths.rb#78 + # source://railties//lib/rails/paths.rb#81 def values_at(*list); end private - # source://railties//lib/rails/paths.rb#103 + # source://railties//lib/rails/paths.rb#106 def filter_by(&block); end end @@ -5134,61 +5544,61 @@ module Rails::Rack; end # object responds to, objects that respond to +to_s+ or Proc objects that accept # an instance of the +request+ object. # -# source://railties//lib/rails/rack/logger.rb#15 +# source://railties//lib/rails/rack/logger.rb#14 class Rails::Rack::Logger < ::ActiveSupport::LogSubscriber # @return [Logger] a new instance of Logger # - # source://railties//lib/rails/rack/logger.rb#16 + # source://railties//lib/rails/rack/logger.rb#15 def initialize(app, taggers = T.unsafe(nil)); end - # source://railties//lib/rails/rack/logger.rb#21 + # source://railties//lib/rails/rack/logger.rb#20 def call(env); end private - # source://railties//lib/rails/rack/logger.rb#32 + # source://railties//lib/rails/rack/logger.rb#31 def call_app(request, env); end - # source://railties//lib/rails/rack/logger.rb#59 + # source://railties//lib/rails/rack/logger.rb#62 def compute_tags(request); end - # source://railties//lib/rails/rack/logger.rb#72 + # source://railties//lib/rails/rack/logger.rb#75 def logger; end # Started GET "/session/new" for 127.0.0.1 at 2012-09-26 14:51:42 -0700 # - # source://railties//lib/rails/rack/logger.rb#51 + # source://railties//lib/rails/rack/logger.rb#54 def started_request_message(request); end end -# Rails::Railtie is the core of the Rails framework and provides -# several hooks to extend Rails and/or modify the initialization process. +# +Rails::Railtie+ is the core of the \Rails framework and provides +# several hooks to extend \Rails and/or modify the initialization process. # -# Every major component of Rails (Action Mailer, Action Controller, Active +# Every major component of \Rails (Action Mailer, Action Controller, Active # Record, etc.) implements a railtie. Each of them is responsible for their -# own initialization. This makes Rails itself absent of any component hooks, -# allowing other components to be used in place of any of the Rails defaults. +# own initialization. This makes \Rails itself absent of any component hooks, +# allowing other components to be used in place of any of the \Rails defaults. # -# Developing a Rails extension does _not_ require implementing a railtie, but -# if you need to interact with the Rails framework during or after boot, then +# Developing a \Rails extension does _not_ require implementing a railtie, but +# if you need to interact with the \Rails framework during or after boot, then # a railtie is needed. # # For example, an extension doing any of the following would need a railtie: # # * creating initializers -# * configuring a Rails framework for the application, like setting a generator +# * configuring a \Rails framework for the application, like setting a generator # * adding config.* keys to the environment # * setting up a subscriber with ActiveSupport::Notifications # * adding Rake tasks # # == Creating a Railtie # -# To extend Rails using a railtie, create a subclass of Rails::Railtie. -# This class must be loaded during the Rails boot process, and is conventionally -# called MyNamespace::Railtie. +# To extend \Rails using a railtie, create a subclass of +Rails::Railtie+. +# This class must be loaded during the \Rails boot process, and is conventionally +# called +MyNamespace::Railtie+. # # The following example demonstrates an extension which can be used with or -# without Rails. +# without \Rails. # # # lib/my_gem/railtie.rb # module MyGem @@ -5201,7 +5611,7 @@ end # # == Initializers # -# To add an initialization step to the Rails boot process from your railtie, just +# To add an initialization step to the \Rails boot process from your railtie, just # define the initialization code with the +initializer+ macro: # # class MyRailtie < Rails::Railtie @@ -5241,7 +5651,7 @@ end # # == Loading Rake Tasks and Generators # -# If your railtie has Rake tasks, you can tell Rails to load them through the method +# If your railtie has Rake tasks, you can tell \Rails to load them through the method # +rake_tasks+: # # class MyRailtie < Rails::Railtie @@ -5250,7 +5660,7 @@ end # end # end # -# By default, Rails loads generators from your load path. However, if you want to place +# By default, \Rails loads generators from your load path. However, if you want to place # your generators at a different location, you can specify in your railtie a block which # will load them during normal generators lookup: # @@ -5263,13 +5673,13 @@ end # Since filenames on the load path are shared across gems, be sure that files you load # through a railtie have unique names. # -# == Run another program when the Rails server starts +# == Run another program when the \Rails server starts # -# In development, it's very usual to have to run another process next to the Rails Server. In example +# In development, it's very usual to have to run another process next to the \Rails Server. In example # you might want to start the Webpack or React server. Or maybe you need to run your job scheduler process # like Sidekiq. This is usually done by opening a new shell and running the program from here. # -# Rails allow you to specify a +server+ block which will get called when a Rails server starts. +# \Rails allow you to specify a +server+ block which will get called when a \Rails server starts. # This way, your users don't need to remember to have to open a new shell and run another program, making # this less confusing for everyone. # It can be used like this: @@ -5445,6 +5855,11 @@ class Rails::Railtie::Configuration # source://railties//lib/rails/railtie/configuration.rb#70 def after_initialize(&block); end + # Called after application routes have been loaded. + # + # source://railties//lib/rails/railtie/configuration.rb#75 + def after_routes_loaded(&block); end + # This allows you to modify application's generators from Railties. # # Values set on app_generators will become defaults for application, unless @@ -5487,18 +5902,18 @@ class Rails::Railtie::Configuration # @return [Boolean] # - # source://railties//lib/rails/railtie/configuration.rb#85 + # source://railties//lib/rails/railtie/configuration.rb#90 def respond_to?(name, include_private = T.unsafe(nil)); end # Defines generic callbacks to run before #after_initialize. Useful for # Rails::Railtie subclasses. # - # source://railties//lib/rails/railtie/configuration.rb#81 + # source://railties//lib/rails/railtie/configuration.rb#86 def to_prepare(&blk); end # Array of callbacks defined by #to_prepare. # - # source://railties//lib/rails/railtie/configuration.rb#75 + # source://railties//lib/rails/railtie/configuration.rb#80 def to_prepare_blocks; end # Add directories that should be watched for change. @@ -5515,7 +5930,12 @@ class Rails::Railtie::Configuration private - # source://railties//lib/rails/railtie/configuration.rb#90 + # @return [Boolean] + # + # source://railties//lib/rails/railtie/configuration.rb#95 + def actual_method?(key); end + + # source://railties//lib/rails/railtie/configuration.rb#99 def method_missing(name, *args, &blk); end class << self @@ -5528,73 +5948,73 @@ end # Greatly inspired by Ara T. Howard's magnificent sekrets gem. 😘 # -# source://railties//lib/rails/secrets.rb#8 +# source://railties//lib/rails/secrets.rb#9 class Rails::Secrets class << self - # source://railties//lib/rails/secrets.rb#45 + # source://railties//lib/rails/secrets.rb#46 def decrypt(data); end - # source://railties//lib/rails/secrets.rb#41 + # source://railties//lib/rails/secrets.rb#42 def encrypt(data); end - # source://railties//lib/rails/secrets.rb#37 + # source://railties//lib/rails/secrets.rb#38 def key; end - # source://railties//lib/rails/secrets.rb#24 + # source://railties//lib/rails/secrets.rb#25 def parse(paths, env:); end - # source://railties//lib/rails/secrets.rb#49 + # source://railties//lib/rails/secrets.rb#50 def read; end - # source://railties//lib/rails/secrets.rb#58 + # source://railties//lib/rails/secrets.rb#59 def read_for_editing(&block); end # Sets the attribute root # # @param value the value to set the attribute root to. # - # source://railties//lib/rails/secrets.rb#22 + # source://railties//lib/rails/secrets.rb#23 def root=(_arg0); end - # source://railties//lib/rails/secrets.rb#53 + # source://railties//lib/rails/secrets.rb#54 def write(contents); end private - # source://railties//lib/rails/secrets.rb#103 + # source://railties//lib/rails/secrets.rb#105 def encryptor; end # @raise [MissingKeyError] # - # source://railties//lib/rails/secrets.rb#63 + # source://railties//lib/rails/secrets.rb#64 def handle_missing_key; end - # source://railties//lib/rails/secrets.rb#73 + # source://railties//lib/rails/secrets.rb#74 def key_path; end - # source://railties//lib/rails/secrets.rb#77 + # source://railties//lib/rails/secrets.rb#78 def path; end - # source://railties//lib/rails/secrets.rb#81 + # source://railties//lib/rails/secrets.rb#82 def preprocess(path); end - # source://railties//lib/rails/secrets.rb#67 + # source://railties//lib/rails/secrets.rb#68 def read_key_file; end - # source://railties//lib/rails/secrets.rb#89 + # source://railties//lib/rails/secrets.rb#90 def writing(contents); end end end -# source://railties//lib/rails/secrets.rb#9 +# source://railties//lib/rails/secrets.rb#10 class Rails::Secrets::MissingKeyError < ::RuntimeError # @return [MissingKeyError] a new instance of MissingKeyError # - # source://railties//lib/rails/secrets.rb#10 + # source://railties//lib/rails/secrets.rb#11 def initialize; end end -# Implements the logic behind Rails::Command::NotesCommand. See rails notes --help for usage information. +# Implements the logic behind +Rails::Command::NotesCommand+. See rails notes --help for usage information. # # Annotation objects are triplets :line, :tag, :text that # represent the line where the annotation lives, its tag, and its text. Note @@ -5604,30 +6024,23 @@ end # start with the tag optionally followed by a colon. Everything up to the end # of the line (or closing ERB comment tag) is considered to be their text. # -# source://railties//lib/rails/source_annotation_extractor.rb#13 +# source://railties//lib/rails/source_annotation_extractor.rb#15 class Rails::SourceAnnotationExtractor # @return [SourceAnnotationExtractor] a new instance of SourceAnnotationExtractor # - # source://railties//lib/rails/source_annotation_extractor.rb#85 + # source://railties//lib/rails/source_annotation_extractor.rb#137 def initialize(tag); end # Prints the mapping from filenames to annotations in +results+ ordered by filename. # The +options+ hash is passed to each annotation's +to_s+. # - # source://railties//lib/rails/source_annotation_extractor.rb#137 + # source://railties//lib/rails/source_annotation_extractor.rb#186 def display(results, options = T.unsafe(nil)); end - # If +file+ is the filename of a file that contains annotations this method returns - # a hash with a single entry that maps +file+ to an array of its annotations. - # Otherwise it returns an empty hash. - # - # source://railties//lib/rails/source_annotation_extractor.rb#125 - def extract_annotations_from(file, pattern); end - # Returns a hash that maps filenames under +dirs+ (recursively) to arrays # with their annotations. # - # source://railties//lib/rails/source_annotation_extractor.rb#91 + # source://railties//lib/rails/source_annotation_extractor.rb#143 def find(dirs); end # Returns a hash that maps filenames under +dir+ (recursively) to arrays @@ -5635,12 +6048,12 @@ class Rails::SourceAnnotationExtractor # Rails::SourceAnnotationExtractor::Annotation.extensions are # taken into account. Only files with annotations are included. # - # source://railties//lib/rails/source_annotation_extractor.rb#99 + # source://railties//lib/rails/source_annotation_extractor.rb#151 def find_in(dir); end # Returns the value of attribute tag. # - # source://railties//lib/rails/source_annotation_extractor.rb#83 + # source://railties//lib/rails/source_annotation_extractor.rb#135 def tag; end class << self @@ -5659,12 +6072,12 @@ class Rails::SourceAnnotationExtractor # # This class method is the single entry point for the rails notes command. # - # source://railties//lib/rails/source_annotation_extractor.rb#76 + # source://railties//lib/rails/source_annotation_extractor.rb#128 def enumerate(tag = T.unsafe(nil), options = T.unsafe(nil)); end end end -# source://railties//lib/rails/source_annotation_extractor.rb#14 +# source://railties//lib/rails/source_annotation_extractor.rb#54 class Rails::SourceAnnotationExtractor::Annotation < ::Struct # Returns a representation of the annotation that looks like this: # @@ -5673,137 +6086,271 @@ class Rails::SourceAnnotationExtractor::Annotation < ::Struct # If +options+ has a flag :tag the tag is shown as in the example above. # Otherwise the string contains just line and text. # - # source://railties//lib/rails/source_annotation_extractor.rb#55 + # source://railties//lib/rails/source_annotation_extractor.rb#107 def to_s(options = T.unsafe(nil)); end class << self - # source://railties//lib/rails/source_annotation_extractor.rb#15 + # source://railties//lib/rails/source_annotation_extractor.rb#55 def directories; end - # source://railties//lib/rails/source_annotation_extractor.rb#35 + # source://railties//lib/rails/source_annotation_extractor.rb#75 def extensions; end # Registers additional directories to be included # Rails::SourceAnnotationExtractor::Annotation.register_directories("spec", "another") # - # source://railties//lib/rails/source_annotation_extractor.rb#21 + # source://railties//lib/rails/source_annotation_extractor.rb#61 def register_directories(*dirs); end # Registers new Annotations File Extensions # Rails::SourceAnnotationExtractor::Annotation.register_extensions("css", "scss", "sass", "less", "js") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ } # - # source://railties//lib/rails/source_annotation_extractor.rb#41 + # source://railties//lib/rails/source_annotation_extractor.rb#81 def register_extensions(*exts, &block); end # Registers additional tags # Rails::SourceAnnotationExtractor::Annotation.register_tags("TESTME", "DEPRECATEME") # - # source://railties//lib/rails/source_annotation_extractor.rb#31 + # source://railties//lib/rails/source_annotation_extractor.rb#71 def register_tags(*additional_tags); end - # source://railties//lib/rails/source_annotation_extractor.rb#25 + # source://railties//lib/rails/source_annotation_extractor.rb#65 def tags; end end end -# source://railties//lib/rails/test_unit/runner.rb#10 +# Wraps a regular expression that will be tested against each of the source +# file's comments. +# +# source://railties//lib/rails/source_annotation_extractor.rb#18 +class Rails::SourceAnnotationExtractor::ParserExtractor < ::Struct + # source://railties//lib/rails/source_annotation_extractor.rb#33 + def annotations(file); end +end + +# source://railties//lib/rails/source_annotation_extractor.rb#19 +class Rails::SourceAnnotationExtractor::ParserExtractor::Parser < ::Ripper + # @return [Parser] a new instance of Parser + # + # source://railties//lib/rails/source_annotation_extractor.rb#22 + def initialize(source, pattern:); end + + # Returns the value of attribute comments. + # + # source://railties//lib/rails/source_annotation_extractor.rb#20 + def comments; end + + # source://railties//lib/rails/source_annotation_extractor.rb#28 + def on_comment(value); end + + # Returns the value of attribute pattern. + # + # source://railties//lib/rails/source_annotation_extractor.rb#20 + def pattern; end +end + +# Wraps a regular expression that will iterate through a file's lines and +# test each one for the given pattern. +# +# source://railties//lib/rails/source_annotation_extractor.rb#42 +class Rails::SourceAnnotationExtractor::PatternExtractor < ::Struct + # source://railties//lib/rails/source_annotation_extractor.rb#43 + def annotations(file); end +end + +# source://railties//lib/rails/test_unit/test_parser.rb#6 module Rails::TestUnit; end -# source://railties//lib/rails/test_unit/runner.rb#105 +# source://railties//lib/rails/test_unit/runner.rb#122 class Rails::TestUnit::CompositeFilter # @return [CompositeFilter] a new instance of CompositeFilter # - # source://railties//lib/rails/test_unit/runner.rb#108 + # source://railties//lib/rails/test_unit/runner.rb#125 def initialize(runnable, filter, patterns); end # minitest uses === to find matching filters. # - # source://railties//lib/rails/test_unit/runner.rb#115 + # source://railties//lib/rails/test_unit/runner.rb#132 def ===(method); end # Returns the value of attribute named_filter. # - # source://railties//lib/rails/test_unit/runner.rb#106 + # source://railties//lib/rails/test_unit/runner.rb#123 def named_filter; end private - # source://railties//lib/rails/test_unit/runner.rb#130 + # source://railties//lib/rails/test_unit/runner.rb#147 def derive_line_filters(patterns); end - # source://railties//lib/rails/test_unit/runner.rb#120 + # source://railties//lib/rails/test_unit/runner.rb#137 def derive_named_filter(filter); end end -# source://railties//lib/rails/test_unit/runner.rb#141 +# source://railties//lib/rails/test_unit/runner.rb#158 class Rails::TestUnit::Filter # @return [Filter] a new instance of Filter # - # source://railties//lib/rails/test_unit/runner.rb#142 - def initialize(runnable, file, line); end + # source://railties//lib/rails/test_unit/runner.rb#159 + def initialize(runnable, file, line_or_range); end - # source://railties//lib/rails/test_unit/runner.rb#147 + # source://railties//lib/rails/test_unit/runner.rb#168 def ===(method); end private - # source://railties//lib/rails/test_unit/runner.rb#159 + # source://railties//lib/rails/test_unit/runner.rb#180 def definition_for(method); end end -# source://railties//lib/rails/test_unit/runner.rb#11 +# source://railties//lib/rails/test_unit/runner.rb#12 class Rails::TestUnit::Runner - # source://railties//lib/rails/test_unit/runner.rb#12 + # source://railties//lib/rails/test_unit/runner.rb#15 def filters; end class << self - # source://railties//lib/rails/test_unit/runner.rb#15 + # source://railties//lib/rails/test_unit/runner.rb#18 def attach_before_load_options(opts); end - # source://railties//lib/rails/test_unit/runner.rb#50 + # source://railties//lib/rails/test_unit/runner.rb#54 def compose_filter(runnable, filter); end - # source://railties//lib/rails/test_unit/runner.rb#12 + # source://railties//lib/rails/test_unit/runner.rb#15 def filters; end - # source://railties//lib/rails/test_unit/runner.rb#45 + # source://railties//lib/rails/test_unit/runner.rb#48 def load_tests(argv); end - # source://railties//lib/rails/test_unit/runner.rb#20 + # source://railties//lib/rails/test_unit/runner.rb#23 def parse_options(argv); end - # source://railties//lib/rails/test_unit/runner.rb#33 - def rake_run(argv = T.unsafe(nil)); end - - # source://railties//lib/rails/test_unit/runner.rb#39 + # source://railties//lib/rails/test_unit/runner.rb#42 def run(argv = T.unsafe(nil)); end + # source://railties//lib/rails/test_unit/runner.rb#36 + def run_from_rake(test_command, argv = T.unsafe(nil)); end + private - # source://railties//lib/rails/test_unit/runner.rb#83 + # source://railties//lib/rails/test_unit/runner.rb#89 def default_test_exclude_glob; end - # source://railties//lib/rails/test_unit/runner.rb#79 + # source://railties//lib/rails/test_unit/runner.rb#85 def default_test_glob; end - # source://railties//lib/rails/test_unit/runner.rb#59 + # source://railties//lib/rails/test_unit/runner.rb#65 def extract_filters(argv); end - # source://railties//lib/rails/test_unit/runner.rb#95 - def list_tests(argv); end + # source://railties//lib/rails/test_unit/runner.rb#101 + def list_tests(patterns); end + + # source://railties//lib/rails/test_unit/runner.rb#107 + def normalize_declarative_test_filter(filter); end # @return [Boolean] # - # source://railties//lib/rails/test_unit/runner.rb#91 + # source://railties//lib/rails/test_unit/runner.rb#97 def path_argument?(arg); end # @return [Boolean] # - # source://railties//lib/rails/test_unit/runner.rb#87 + # source://railties//lib/rails/test_unit/runner.rb#93 def regexp_filter?(arg); end end end +# source://railties//lib/rails/test_unit/runner.rb#14 +Rails::TestUnit::Runner::PATH_ARGUMENT_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://railties//lib/rails/test_unit/runner.rb#13 +Rails::TestUnit::Runner::TEST_FOLDERS = T.let(T.unsafe(nil), Array) + +# Parse a test file to extract the line ranges of all tests in both +# method-style (def test_foo) and declarative-style (test "foo" do) +# +# source://railties//lib/rails/test_unit/test_parser.rb#11 +class Rails::TestUnit::TestParser < ::Ripper + # @return [TestParser] a new instance of TestParser + # + # source://railties//lib/rails/test_unit/test_parser.rb#19 + def initialize(*_arg0); end + + # source://railties//lib/rails/test_unit/test_parser.rb#56 + def first_arg(arg, *_arg1); end + + # source://railties//lib/rails/test_unit/test_parser.rb#60 + def just_lineno(*_arg0); end + + # source://railties//lib/rails/test_unit/test_parser.rb#56 + def on_arg_paren(arg, *_arg1); end + + # source://railties//lib/rails/test_unit/test_parser.rb#79 + def on_args_add(parts, part); end + + # source://railties//lib/rails/test_unit/test_parser.rb#83 + def on_args_add_block(args, *rest); end + + # source://railties//lib/rails/test_unit/test_parser.rb#75 + def on_args_new; end + + # source://railties//lib/rails/test_unit/test_parser.rb#56 + def on_bodystmt(arg, *_arg1); end + + # source://railties//lib/rails/test_unit/test_parser.rb#60 + def on_brace_block(*_arg0); end + + # source://railties//lib/rails/test_unit/test_parser.rb#56 + def on_command(arg, *_arg1); end + + # source://railties//lib/rails/test_unit/test_parser.rb#52 + def on_command_call(*_arg0, begin_lineno, _args); end + + # method test e.g. `def test_some_description` + # This event's first argument gets the `ident` node containing the method + # name, which we have overridden to return the line number of the ident + # instead. + # + # source://railties//lib/rails/test_unit/test_parser.rb#34 + def on_def(begin_line, *_arg1); end + + # source://railties//lib/rails/test_unit/test_parser.rb#60 + def on_do_block(*_arg0); end + + # source://railties//lib/rails/test_unit/test_parser.rb#60 + def on_ident(*_arg0); end + + # source://railties//lib/rails/test_unit/test_parser.rb#56 + def on_method_add_arg(arg, *_arg1); end + + # Everything past this point is to support declarative tests, which + # require more work to get right because of the many different ways + # methods can be invoked in ruby, all of which are parsed differently. + # + # The approach is just to store the current line number when the + # "test" method is called and pass it up the tree so it's available at + # the point when we also know the line where the associated block ends. + # + # source://railties//lib/rails/test_unit/test_parser.rb#46 + def on_method_add_block(begin_line, end_line); end + + # source://railties//lib/rails/test_unit/test_parser.rb#56 + def on_stmts_add(arg, *_arg1); end + + # source://railties//lib/rails/test_unit/test_parser.rb#60 + def on_stmts_new(*_arg0); end + + # source://railties//lib/rails/test_unit/test_parser.rb#25 + def parse; end + + class << self + # Helper to translate a method object into the path and line range where + # the method was defined. + # + # source://railties//lib/rails/test_unit/test_parser.rb#12 + def definition_for(method_obj); end + end +end + # source://railties//lib/rails/test_unit/railtie.rb#6 class Rails::TestUnitRailtie < ::Rails::Railtie; end @@ -5817,7 +6364,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) @@ -5832,20 +6379,20 @@ class Rails::WelcomeController < ::Rails::ApplicationController private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3.2/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 + # source://actionview/7.1.3.2/lib/action_view/layouts.rb#212 def _layout_conditions; end - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 + # source://actionpack/7.1.3.2/lib/action_controller/metal.rb#262 def middleware_stack; end end end diff --git a/sorbet/rbi/gems/rake@13.0.6.rbi b/sorbet/rbi/gems/rake@13.1.0.rbi similarity index 96% rename from sorbet/rbi/gems/rake@13.0.6.rbi rename to sorbet/rbi/gems/rake@13.1.0.rbi index 662bcb4be..c461e0045 100644 --- a/sorbet/rbi/gems/rake@13.0.6.rbi +++ b/sorbet/rbi/gems/rake@13.1.0.rbi @@ -22,13 +22,13 @@ module FileUtils # Example: # ruby %{-pe '$_.upcase!' ['a', 'b', 'c'] # - # source://rake//lib/rake/file_utils.rb#128 + # source://rake//lib/rake/file_utils.rb#126 def split_all(path); end private @@ -75,14 +75,14 @@ module FileUtils # source://rake//lib/rake/file_utils.rb#61 def create_shell_runner(cmd); end - # source://rake//lib/rake/file_utils.rb#86 + # source://rake//lib/rake/file_utils.rb#84 def set_verbose_option(options); end - # source://rake//lib/rake/file_utils.rb#73 + # source://rake//lib/rake/file_utils.rb#71 def sh_show_command(cmd); end end -# source://rake//lib/rake/file_utils.rb#108 +# source://rake//lib/rake/file_utils.rb#106 FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array) # Path to the currently running Ruby program @@ -195,13 +195,13 @@ class Rake::Application # Add a file to the list of files to be imported. # - # source://rake//lib/rake/application.rb#777 + # source://rake//lib/rake/application.rb#801 def add_import(fn); end # Add a loader to handle imported files ending in the extension # +ext+. # - # source://rake//lib/rake/application.rb#139 + # source://rake//lib/rake/application.rb#161 def add_loader(ext, loader); end # Collect the list of tasks on the command line. If no tasks are @@ -213,13 +213,13 @@ class Rake::Application # recognised command-line options, which OptionParser.parse will # have taken care of already. # - # source://rake//lib/rake/application.rb#758 + # source://rake//lib/rake/application.rb#782 def collect_command_line_tasks(args); end # Default task name ("default"). # (May be overridden by subclasses) # - # source://rake//lib/rake/application.rb#772 + # source://rake//lib/rake/application.rb#796 def default_task_name; end # Warn about deprecated usage. @@ -227,75 +227,75 @@ class Rake::Application # Example: # Rake.application.deprecate("import", "Rake.import", caller.first) # - # source://rake//lib/rake/application.rb#258 + # source://rake//lib/rake/application.rb#282 def deprecate(old_usage, new_usage, call_site); end - # source://rake//lib/rake/application.rb#222 + # source://rake//lib/rake/application.rb#244 def display_cause_details(ex); end # Display the error message that caused the exception. # - # source://rake//lib/rake/application.rb#206 + # source://rake//lib/rake/application.rb#228 def display_error_message(ex); end - # source://rake//lib/rake/application.rb#245 + # source://rake//lib/rake/application.rb#269 def display_exception_backtrace(ex); end - # source://rake//lib/rake/application.rb#214 + # source://rake//lib/rake/application.rb#236 def display_exception_details(ex); end - # source://rake//lib/rake/application.rb#229 + # source://rake//lib/rake/application.rb#251 def display_exception_details_seen; end - # source://rake//lib/rake/application.rb#237 + # source://rake//lib/rake/application.rb#259 def display_exception_message_details(ex); end # Display the tasks and prerequisites # - # source://rake//lib/rake/application.rb#381 + # source://rake//lib/rake/application.rb#405 def display_prerequisites; end # Display the tasks and comments. # - # source://rake//lib/rake/application.rb#298 + # source://rake//lib/rake/application.rb#322 def display_tasks_and_comments; end # Calculate the dynamic width of the # - # source://rake//lib/rake/application.rb#349 + # source://rake//lib/rake/application.rb#373 def dynamic_width; end - # source://rake//lib/rake/application.rb#353 + # source://rake//lib/rake/application.rb#377 def dynamic_width_stty; end - # source://rake//lib/rake/application.rb#357 + # source://rake//lib/rake/application.rb#381 def dynamic_width_tput; end # Exit the program because of an unhandled exception. # (may be overridden by subclasses) # - # source://rake//lib/rake/application.rb#201 + # source://rake//lib/rake/application.rb#223 def exit_because_of_exception(ex); end - # source://rake//lib/rake/application.rb#678 + # source://rake//lib/rake/application.rb#702 def find_rakefile_location; end # Read and handle the command line options. Returns the command line # arguments that we didn't understand, which should (in theory) be just # task names and env vars. # - # source://rake//lib/rake/application.rb#644 + # source://rake//lib/rake/application.rb#668 def handle_options(argv); end # @return [Boolean] # - # source://rake//lib/rake/application.rb#233 + # source://rake//lib/rake/application.rb#255 def has_cause?(ex); end # True if one of the files in RAKEFILES is in the current directory. # If a match is found, it is copied into @rakefile. # - # source://rake//lib/rake/application.rb#274 + # source://rake//lib/rake/application.rb#298 def have_rakefile; end # Initialize the command line parameters and app name. @@ -305,17 +305,17 @@ class Rake::Application # Invokes a task with arguments that are extracted from +task_string+ # - # source://rake//lib/rake/application.rb#157 + # source://rake//lib/rake/application.rb#179 def invoke_task(task_string); end # Load the pending list of imported files. # - # source://rake//lib/rake/application.rb#782 + # source://rake//lib/rake/application.rb#806 def load_imports; end # Find the rakefile and then load it and any pending imports. # - # source://rake//lib/rake/application.rb#102 + # source://rake//lib/rake/application.rb#124 def load_rakefile; end # The name of the application (typically 'rake') @@ -325,7 +325,7 @@ class Rake::Application # Application options from the command line # - # source://rake//lib/rake/application.rb#145 + # source://rake//lib/rake/application.rb#167 def options; end # The original directory where rake was invoked. @@ -333,16 +333,16 @@ class Rake::Application # source://rake//lib/rake/application.rb#27 def original_dir; end - # source://rake//lib/rake/application.rb#163 + # source://rake//lib/rake/application.rb#185 def parse_task_string(string); end - # source://rake//lib/rake/application.rb#690 + # source://rake//lib/rake/application.rb#714 def print_rakefile_directory(location); end # Similar to the regular Ruby +require+ command, but will check # for *.rake files in addition to *.rb files. # - # source://rake//lib/rake/application.rb#664 + # source://rake//lib/rake/application.rb#688 def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end # Name of the actual rakefile used. @@ -350,10 +350,10 @@ class Rake::Application # source://rake//lib/rake/application.rb#30 def rakefile; end - # source://rake//lib/rake/application.rb#798 + # source://rake//lib/rake/application.rb#822 def rakefile_location(backtrace = T.unsafe(nil)); end - # source://rake//lib/rake/application.rb#695 + # source://rake//lib/rake/application.rb#719 def raw_load_rakefile; end # Run the Rake application. The run method performs the following @@ -372,26 +372,26 @@ class Rake::Application # Run the given block with the thread startup and shutdown. # - # source://rake//lib/rake/application.rb#122 + # source://rake//lib/rake/application.rb#144 def run_with_threads; end - # source://rake//lib/rake/application.rb#807 + # source://rake//lib/rake/application.rb#831 def set_default_options; end # Provide standard exception handling for the given block. # - # source://rake//lib/rake/application.rb#185 + # source://rake//lib/rake/application.rb#207 def standard_exception_handling; end # A list of all the standard options used in rake, suitable for # passing to OptionParser. # - # source://rake//lib/rake/application.rb#402 + # source://rake//lib/rake/application.rb#426 def standard_rake_options; end # The directory path containing the system wide rakefiles. # - # source://rake//lib/rake/application.rb#727 + # source://rake//lib/rake/application.rb#751 def system_dir; end # Number of columns on the terminal @@ -404,17 +404,17 @@ class Rake::Application # source://rake//lib/rake/application.rb#33 def terminal_columns=(_arg0); end - # source://rake//lib/rake/application.rb#337 + # source://rake//lib/rake/application.rb#361 def terminal_width; end # Return the thread pool used for multithreaded processing. # - # source://rake//lib/rake/application.rb#150 + # source://rake//lib/rake/application.rb#172 def thread_pool; end # Run the top level tasks of a Rake application. # - # source://rake//lib/rake/application.rb#109 + # source://rake//lib/rake/application.rb#131 def top_level; end # List of the top level task names (task names from the command line). @@ -422,10 +422,10 @@ class Rake::Application # source://rake//lib/rake/application.rb#36 def top_level_tasks; end - # source://rake//lib/rake/application.rb#388 + # source://rake//lib/rake/application.rb#412 def trace(*strings); end - # source://rake//lib/rake/application.rb#370 + # source://rake//lib/rake/application.rb#394 def truncate(string, width); end # We will truncate output if we are outputting to a TTY or if we've been @@ -433,7 +433,7 @@ class Rake::Application # # @return [Boolean] # - # source://rake//lib/rake/application.rb#293 + # source://rake//lib/rake/application.rb#317 def truncate_output?; end # Override the detected TTY output state (mostly for testing) @@ -445,41 +445,44 @@ class Rake::Application # # @return [Boolean] # - # source://rake//lib/rake/application.rb#287 + # source://rake//lib/rake/application.rb#311 def tty_output?; end # @return [Boolean] # - # source://rake//lib/rake/application.rb#361 + # source://rake//lib/rake/application.rb#385 def unix?; end # @return [Boolean] # - # source://rake//lib/rake/application.rb#366 + # source://rake//lib/rake/application.rb#390 def windows?; end private - # source://rake//lib/rake/application.rb#721 + # source://rake//lib/rake/application.rb#745 def glob(path, &block); end # Does the exception have a task invocation chain? # # @return [Boolean] # - # source://rake//lib/rake/application.rb#267 + # source://rake//lib/rake/application.rb#291 def has_chain?(exception); end - # source://rake//lib/rake/application.rb#620 + # source://rake//lib/rake/application.rb#102 + def load_debug_at_stop_feature; end + + # source://rake//lib/rake/application.rb#644 def select_tasks_to_show(options, show_tasks, value); end - # source://rake//lib/rake/application.rb#627 + # source://rake//lib/rake/application.rb#651 def select_trace_output(options, trace_option, value); end - # source://rake//lib/rake/application.rb#393 + # source://rake//lib/rake/application.rb#417 def sort_options(options); end - # source://rake//lib/rake/application.rb#744 + # source://rake//lib/rake/application.rb#768 def standard_system_dir; end end @@ -591,7 +594,7 @@ module Rake::DSL # # Example: # desc "Run the Unit Tests" - # task test: [:build] + # task test: [:build] do # # ... run tests # end # @@ -745,7 +748,7 @@ module Rake::DSL # source://rake//lib/rake/file_utils_ext.rb#34 def rmtree(*args, **options, &block); end - # source://rake//lib/rake/file_utils.rb#100 + # source://rake//lib/rake/file_utils.rb#98 def ruby(*args, **options, &block); end # Declare a rule for auto-tasks. @@ -758,7 +761,7 @@ module Rake::DSL # source://rake//lib/rake/dsl_definition.rb#151 def rule(*args, &block); end - # source://rake//lib/rake/file_utils.rb#112 + # source://rake//lib/rake/file_utils.rb#110 def safe_ln(*args, **options); end # source://rake//lib/rake/file_utils_ext.rb#34 @@ -767,7 +770,7 @@ module Rake::DSL # source://rake//lib/rake/file_utils.rb#43 def sh(*cmd, &block); end - # source://rake//lib/rake/file_utils.rb#128 + # source://rake//lib/rake/file_utils.rb#126 def split_all(path); end # source://rake//lib/rake/file_utils_ext.rb#34 @@ -1580,7 +1583,7 @@ class Rake::FileTask < ::Rake::Task # Time stamp for file task. # - # source://rake//lib/rake/file_task.rb#21 + # source://rake//lib/rake/file_task.rb#25 def timestamp; end private @@ -1589,14 +1592,14 @@ class Rake::FileTask < ::Rake::Task # # @return [Boolean] # - # source://rake//lib/rake/file_task.rb#32 + # source://rake//lib/rake/file_task.rb#36 def out_of_date?(stamp); end class << self # Apply the scope to the task name according to the rules for this kind # of task. File based tasks ignore the scope when creating the name. # - # source://rake//lib/rake/file_task.rb#49 + # source://rake//lib/rake/file_task.rb#53 def scope_name(scope, task_name); end end end @@ -3046,14 +3049,14 @@ class Rake::ThreadHistoryDisplay def threads; end end -# source://rake//lib/rake/thread_pool.rb#7 +# source://rake//lib/rake/thread_pool.rb#8 class Rake::ThreadPool # Creates a ThreadPool object. The +thread_count+ parameter is the size # of the pool. # # @return [ThreadPool] a new instance of ThreadPool # - # source://rake//lib/rake/thread_pool.rb#11 + # source://rake//lib/rake/thread_pool.rb#12 def initialize(thread_count); end # Creates a future executed by the +ThreadPool+. diff --git a/sorbet/rbi/gems/rbi@0.0.17.rbi b/sorbet/rbi/gems/rbi@0.1.9.rbi similarity index 90% rename from sorbet/rbi/gems/rbi@0.0.17.rbi rename to sorbet/rbi/gems/rbi@0.1.9.rbi index c15d299ba..2dc769936 100644 --- a/sorbet/rbi/gems/rbi@0.0.17.rbi +++ b/sorbet/rbi/gems/rbi@0.1.9.rbi @@ -7,33 +7,6 @@ # source://rbi//lib/rbi/loc.rb#4 module RBI; end -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/parser.rb#133 -class RBI::ASTVisitor - abstract! - - # @abstract - # - # source://rbi//lib/rbi/parser.rb#145 - sig { abstract.params(node: T.nilable(::AST::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/parser.rb#140 - sig { params(nodes: T::Array[::AST::Node]).void } - def visit_all(nodes); end - - private - - # source://rbi//lib/rbi/parser.rb#155 - sig { params(node: ::AST::Node).returns(::String) } - def parse_expr(node); end - - # source://rbi//lib/rbi/parser.rb#150 - sig { params(node: ::AST::Node).returns(::String) } - def parse_name(node); end -end - # source://rbi//lib/rbi/model.rb#968 class RBI::Arg < ::RBI::Node # source://rbi//lib/rbi/model.rb#980 @@ -106,11 +79,6 @@ class RBI::Attr < ::RBI::NodeWithComments sig { returns(T::Array[::Symbol]) } def names; end - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#356 - def names=(_arg0); end - # source://rbi//lib/rbi/printer.rb#375 sig { override.returns(T::Boolean) } def oneline?; end @@ -411,32 +379,6 @@ class RBI::Const < ::RBI::NodeWithComments def value; end end -# source://rbi//lib/rbi/parser.rb#627 -class RBI::ConstBuilder < ::RBI::ASTVisitor - # source://rbi//lib/rbi/parser.rb#634 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/parser.rb#631 - sig { returns(T::Array[::String]) } - def names; end - - # @return [Array] - # - # source://rbi//lib/rbi/parser.rb#631 - def names=(_arg0); end - - # source://rbi//lib/rbi/parser.rb#653 - sig { override.params(node: T.nilable(::AST::Node)).void } - def visit(node); end - - class << self - # source://rbi//lib/rbi/parser.rb#643 - sig { params(node: T.nilable(::AST::Node)).returns(T.nilable(::String)) } - def visit(node); end - end -end - # source://rbi//lib/rbi/model.rb#816 class RBI::Extend < ::RBI::Mixin include ::RBI::Indexable @@ -866,7 +808,7 @@ end # source://rbi//lib/rbi/loc.rb#5 class RBI::Loc - # source://rbi//lib/rbi/loc.rb#23 + # source://rbi//lib/rbi/loc.rb#38 sig do params( file: T.nilable(::String), @@ -880,39 +822,39 @@ class RBI::Loc # @return [Integer, nil] # - # source://rbi//lib/rbi/loc.rb#12 + # source://rbi//lib/rbi/loc.rb#27 def begin_column; end - # source://rbi//lib/rbi/loc.rb#12 + # 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#12 + # source://rbi//lib/rbi/loc.rb#27 def end_column; end # @return [Integer, nil] # - # source://rbi//lib/rbi/loc.rb#12 + # source://rbi//lib/rbi/loc.rb#27 def end_line; end - # source://rbi//lib/rbi/loc.rb#9 + # source://rbi//lib/rbi/loc.rb#24 sig { returns(T.nilable(::String)) } def file; end - # source://rbi//lib/rbi/loc.rb#37 + # source://rbi//lib/rbi/loc.rb#56 sig { returns(T.nilable(::String)) } def source; end - # source://rbi//lib/rbi/loc.rb#32 + # source://rbi//lib/rbi/loc.rb#47 sig { returns(::String) } def to_s; end class << self - # source://rbi//lib/rbi/parser.rb#748 - sig { params(file: ::String, ast_loc: T.any(::Parser::Source::Map, ::Parser::Source::Range)).returns(::RBI::Loc) } - def from_ast_loc(file, ast_loc); end + # 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 @@ -1093,11 +1035,6 @@ class RBI::Mixin < ::RBI::NodeWithComments # source://rbi//lib/rbi/model.rb#777 sig { returns(T::Array[::String]) } def names; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#777 - def names=(_arg0); end end # source://rbi//lib/rbi/model.rb#190 @@ -1220,6 +1157,10 @@ class RBI::Node 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 @@ -1255,6 +1196,10 @@ class RBI::NodeWithComments < ::RBI::Node # 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#601 @@ -1332,43 +1277,204 @@ end # source://rbi//lib/rbi/parser.rb#53 class RBI::Parser - # source://rbi//lib/rbi/parser.rb#64 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/parser.rb#101 + # 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#96 + # 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#108 - sig { params(content: ::String, file: ::String).returns(::RBI::Tree) } - def parse(content, file:); end + # 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#78 + # 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#83 + # 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#73 + # 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#89 + # 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 @@ -1638,6 +1744,78 @@ class RBI::Rewriters::Deannotate < ::RBI::Visitor 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 @@ -1722,7 +1900,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.10900/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 def inherited(s); end end end @@ -1939,7 +2117,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.10900/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 def inherited(s); end end end @@ -2223,31 +2401,6 @@ class RBI::Sig < ::RBI::Node def sig_modifiers; end end -# source://rbi//lib/rbi/parser.rb#668 -class RBI::SigBuilder < ::RBI::ASTVisitor - # source://rbi//lib/rbi/parser.rb#675 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/parser.rb#672 - sig { returns(::RBI::Sig) } - def current; end - - # source://rbi//lib/rbi/parser.rb#692 - sig { override.params(node: T.nilable(::AST::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/parser.rb#702 - sig { params(node: ::AST::Node).void } - def visit_send(node); end - - class << self - # source://rbi//lib/rbi/parser.rb#684 - sig { params(node: ::AST::Node).returns(::RBI::Sig) } - def build(node); end - end -end - # source://rbi//lib/rbi/model.rb#1098 class RBI::SigParam < ::RBI::NodeWithComments # source://rbi//lib/rbi/model.rb#1113 @@ -2597,7 +2750,7 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - # source://tapioca/0.11.7/lib/tapioca/rbi_ext/model.rb#38 + # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#38 sig do params( name: ::String, @@ -2607,19 +2760,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_class(name, superclass_name: T.unsafe(nil), &block); end - # source://tapioca/0.11.7/lib/tapioca/rbi_ext/model.rb#45 + # 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.11.7/lib/tapioca/rbi_ext/model.rb#55 + # 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.11.7/lib/tapioca/rbi_ext/model.rb#50 + # 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.11.7/lib/tapioca/rbi_ext/model.rb#89 + # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#89 sig do params( name: ::String, @@ -2632,19 +2785,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://tapioca/0.11.7/lib/tapioca/rbi_ext/model.rb#60 + # 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.11.7/lib/tapioca/rbi_ext/model.rb#25 + # 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.11.7/lib/tapioca/rbi_ext/model.rb#9 + # 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.11.7/lib/tapioca/rbi_ext/model.rb#74 + # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#74 sig do params( name: ::String, @@ -2665,6 +2818,10 @@ class RBI::Tree < ::RBI::NodeWithComments 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 @@ -2706,138 +2863,15 @@ class RBI::Tree < ::RBI::NodeWithComments private - # source://tapioca/0.11.7/lib/tapioca/rbi_ext/model.rb#116 + # 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.11.7/lib/tapioca/rbi_ext/model.rb#111 + # 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/parser.rb#160 -class RBI::TreeBuilder < ::RBI::ASTVisitor - # source://rbi//lib/rbi/parser.rb#176 - sig do - params( - file: ::String, - comments: T::Array[::Parser::Source::Comment], - nodes_comments_assoc: T::Hash[::Parser::Source::Map, T::Array[::Parser::Source::Comment]] - ).void - end - def initialize(file:, comments: T.unsafe(nil), nodes_comments_assoc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/parser.rb#167 - sig { returns(T.nilable(::AST::Node)) } - def last_node; end - - # source://rbi//lib/rbi/parser.rb#191 - sig { void } - def post_process; end - - # source://rbi//lib/rbi/parser.rb#164 - sig { returns(::RBI::Tree) } - def tree; end - - # source://rbi//lib/rbi/parser.rb#197 - sig { override.params(node: T.nilable(::Object)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/parser.rb#573 - sig { void } - def assoc_dangling_comments; end - - # source://rbi//lib/rbi/parser.rb#554 - sig { returns(::RBI::Tree) } - def current_scope; end - - # source://rbi//lib/rbi/parser.rb#559 - sig { returns(T::Array[::RBI::Sig]) } - def current_sigs; end - - # source://rbi//lib/rbi/parser.rb#566 - sig { returns(T::Array[::RBI::Comment]) } - def current_sigs_comments; end - - # source://rbi//lib/rbi/parser.rb#542 - sig { params(node: ::AST::Node).returns(T::Array[::RBI::Comment]) } - def node_comments(node); end - - # source://rbi//lib/rbi/parser.rb#537 - sig { params(node: ::AST::Node).returns(::RBI::Loc) } - def node_loc(node); end - - # source://rbi//lib/rbi/parser.rb#410 - sig { params(node: ::AST::Node).returns(T.nilable(::RBI::Node)) } - def parse_block(node); end - - # source://rbi//lib/rbi/parser.rb#254 - sig { params(node: ::AST::Node).returns(::RBI::Node) } - def parse_const_assign(node); end - - # source://rbi//lib/rbi/parser.rb#270 - sig { params(node: ::AST::Node).returns(::RBI::Method) } - def parse_def(node); end - - # source://rbi//lib/rbi/parser.rb#512 - sig { params(node: ::AST::Node).returns(::RBI::TEnumBlock) } - def parse_enum(node); end - - # source://rbi//lib/rbi/parser.rb#297 - sig { params(node: ::AST::Node).returns(::RBI::Param) } - def parse_param(node); end - - # source://rbi//lib/rbi/parser.rb#529 - sig { params(node: ::AST::Node).returns(::RBI::RequiresAncestor) } - def parse_requires_ancestor(node); end - - # source://rbi//lib/rbi/parser.rb#234 - sig { params(node: ::AST::Node).returns(::RBI::Scope) } - def parse_scope(node); end - - # source://rbi//lib/rbi/parser.rb#325 - sig { params(node: ::AST::Node).returns(T.nilable(::RBI::Node)) } - def parse_send(node); end - - # source://rbi//lib/rbi/parser.rb#393 - sig { params(node: ::AST::Node).returns(T::Array[::RBI::Arg]) } - def parse_send_args(node); end - - # source://rbi//lib/rbi/parser.rb#505 - sig { params(node: ::AST::Node).returns(::RBI::Sig) } - def parse_sig(node); end - - # source://rbi//lib/rbi/parser.rb#432 - sig { params(node: ::AST::Node).returns(::RBI::Struct) } - def parse_struct(node); end - - # source://rbi//lib/rbi/parser.rb#489 - sig { params(node: ::AST::Node).returns([::String, ::String, T.nilable(::String)]) } - def parse_tstruct_prop(node); end - - # source://rbi//lib/rbi/parser.rb#478 - sig { params(node: ::AST::Node).returns(::RBI::TypeMember) } - def parse_type_variable(node); end - - # source://rbi//lib/rbi/parser.rb#591 - sig { void } - def separate_header_comments; end - - # source://rbi//lib/rbi/parser.rb#613 - sig { void } - def set_root_tree_loc; end - - # source://rbi//lib/rbi/parser.rb#426 - sig { params(node: ::AST::Node).returns(T::Boolean) } - def struct_definition?(node); end - - # source://rbi//lib/rbi/parser.rb#471 - sig { params(node: ::AST::Node).returns(T::Boolean) } - def type_variable_definition?(node); end -end - # source://rbi//lib/rbi/model.rb#1320 class RBI::TypeMember < ::RBI::NodeWithComments include ::RBI::Indexable diff --git a/sorbet/rbi/gems/rdoc@6.6.2.rbi b/sorbet/rbi/gems/rdoc@6.6.2.rbi new file mode 100644 index 000000000..3ca3de9e7 --- /dev/null +++ b/sorbet/rbi/gems/rdoc@6.6.2.rbi @@ -0,0 +1,12508 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rdoc` gem. +# Please instead update this file by running `bin/tapioca gem rdoc`. + +module ERB::Escape + private + + def html_escape(_arg0); end + + class << self + def html_escape(_arg0); end + end +end + +# RDoc produces documentation for Ruby source files by parsing the source and +# extracting the definition for classes, modules, methods, includes and +# requires. It associates these with optional documentation contained in an +# immediately preceding comment block then renders the result using an output +# formatter. +# +# For a simple introduction to writing or generating documentation using RDoc +# see the README. +# +# == Roadmap +# +# If you think you found a bug in RDoc see CONTRIBUTING@Bugs +# +# If you want to use RDoc to create documentation for your Ruby source files, +# see RDoc::Markup and refer to rdoc --help for command line usage. +# +# If you want to set the default markup format see +# RDoc::Markup@Supported+Formats +# +# If you want to store rdoc configuration in your gem (such as the default +# markup format) see RDoc::Options@Saved+Options +# +# If you want to write documentation for Ruby files see RDoc::Parser::Ruby +# +# If you want to write documentation for extensions written in C see +# RDoc::Parser::C +# +# If you want to generate documentation using rake see RDoc::Task. +# +# If you want to drive RDoc programmatically, see RDoc::RDoc. +# +# If you want to use the library to format text blocks into HTML or other +# formats, look at RDoc::Markup. +# +# If you want to make an RDoc plugin such as a generator or directive handler +# see RDoc::RDoc. +# +# If you want to write your own output generator see RDoc::Generator. +# +# If you want an overview of how RDoc works see CONTRIBUTING +# +# == Credits +# +# RDoc is currently being maintained by Eric Hodel . +# +# Dave Thomas is the original author of RDoc. +# +# * The Ruby parser in rdoc/parse.rb is based heavily on the outstanding +# work of Keiju ISHITSUKA of Nippon Rational Inc, who produced the Ruby +# parser for irb and the rtags package. +module RDoc + class << self + # Seaches and returns the directory for settings. + # + # 1. $HOME/.rdoc directory, if it exists. + # 2. The +rdoc+ directory under the path specified by the + # +XDG_DATA_HOME+ environment variable, if it is set. + # 3. $HOME/.local/share/rdoc directory. + # + # Other than the home directory, the containing directory will be + # created automatically. + # + # source://rdoc//rdoc.rb#134 + def home; end + + # Loads the best available YAML library. + # + # source://rdoc//rdoc.rb#107 + def load_yaml; end + end +end + +# Represent an alias, which is an old_name/new_name pair associated with a +# particular context +# -- +# TODO implement Alias as a proxy to a method/attribute, inheriting from +# MethodAttr +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 + 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 + def <=>(other); end + + # HTML fragment reference for this alias + # + # source://rdoc//rdoc/alias.rb#57 + def aref; end + + # Full old name including namespace + # + # source://rdoc//rdoc/alias.rb#65 + def full_old_name; end + + # HTML id-friendly version of +#new_name+. + # + # source://rdoc//rdoc/alias.rb#72 + def html_name; end + + # source://rdoc//rdoc/alias.rb#76 + def inspect; end + + # Aliased method's name + # + # source://rdoc//rdoc/alias.rb#14 + def name; end + + # '::' for the alias of a singleton method/attribute, '#' for instance-level. + # + # source://rdoc//rdoc/alias.rb#87 + def name_prefix; end + + # Aliased method's name + # + # source://rdoc//rdoc/alias.rb#14 + def new_name; end + + # Aliasee method's name + # + # source://rdoc//rdoc/alias.rb#21 + def old_name; end + + # New name with prefix '::' or '#'. + # + # source://rdoc//rdoc/alias.rb#101 + def pretty_name; end + + # New name with prefix '::' or '#'. + # + # source://rdoc//rdoc/alias.rb#101 + def pretty_new_name; end + + # Old name with prefix '::' or '#'. + # + # source://rdoc//rdoc/alias.rb#94 + def pretty_old_name; end + + # Is this an alias declared in a singleton context? + # + # source://rdoc//rdoc/alias.rb#26 + def singleton; end + + # Is this an alias declared in a singleton context? + # + # source://rdoc//rdoc/alias.rb#26 + def singleton=(_arg0); end + + # Source file token stream + # + # source://rdoc//rdoc/alias.rb#31 + def text; end + + # source://rdoc//rdoc/alias.rb#107 + def to_s; end +end + +# AnyMethod is the base class for objects representing methods +class RDoc::AnyMethod < ::RDoc::MethodAttr + include ::RDoc::TokenStream + + # Creates a new AnyMethod with a token stream +text+ and +name+ + # + # @return [AnyMethod] a new instance of AnyMethod + # + # source://rdoc//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 + def add_alias(an_alias, context = T.unsafe(nil)); end + + # Prefix for +aref+ is 'method'. + # + # source://rdoc//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 + 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 + 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 + def c_function=(_arg0); end + + # Different ways to call this method + # + # source://rdoc//rdoc/any_method.rb#96 + def call_seq; end + + # Sets the different ways you can call this method. If an empty +call_seq+ + # is given nil is assumed. + # + # See also #param_seq + # + # source://rdoc//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 + def calls_super; end + + # If true this method uses +super+ to call a superclass version + # + # source://rdoc//rdoc/any_method.rb#39 + def calls_super=(_arg0); end + + # Don't rename \#initialize to \::new + # + # source://rdoc//rdoc/any_method.rb#22 + def dont_rename_initialize; end + + # Don't rename \#initialize to \::new + # + # source://rdoc//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 + 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 + def is_alias_for; end + + # Dumps this AnyMethod for use by ri. See also #marshal_load + # + # source://rdoc//rdoc/any_method.rb#147 + def marshal_dump; end + + # Loads this AnyMethod from +array+. For a loaded AnyMethod the following + # methods will return cached values: + # + # * #full_name + # * #parent_name + # + # source://rdoc//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 + 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 + 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 + def param_seq; end + + # Parameters for this method + # + # source://rdoc//rdoc/any_method.rb#34 + def params; end + + # Parameters for this method + # + # source://rdoc//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 + 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 + def section_title=(_arg0); end + + # Whether to skip the method description, true for methods that have + # aliases with a call-seq that doesn't include the method name. + # + # @return [Boolean] + # + # source://rdoc//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 + def store=(store); end + + # For methods that +super+, find the superclass method that would be called. + # + # source://rdoc//rdoc/any_method.rb#326 + def superclass_method; end + + protected + + # call_seq without deduplication and alias lookup. + # + # source://rdoc//rdoc/any_method.rb#345 + def _call_seq; end + + private + + # call_seq with alias examples information removed, if this + # method is an alias method. + # + # source://rdoc//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 +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 + 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 + def ==(other); end + + # Add +an_alias+ as an attribute in +context+. + # + # source://rdoc//rdoc/attr.rb#46 + def add_alias(an_alias, context); end + + # The #aref prefix for attributes + # + # source://rdoc//rdoc/attr.rb#61 + def aref_prefix; end + + # Attributes never call super. See RDoc::AnyMethod#calls_super + # + # An RDoc::Attr can show up in the method list in some situations (see + # Gem::ConfigFile) + # + # source://rdoc//rdoc/attr.rb#71 + def calls_super; end + + # Returns attr_reader, attr_writer or attr_accessor as appropriate. + # + # source://rdoc//rdoc/attr.rb#78 + def definition; end + + # source://rdoc//rdoc/attr.rb#86 + def inspect; end + + # Dumps this Attr for use by ri. See also #marshal_load + # + # source://rdoc//rdoc/attr.rb#102 + def marshal_dump; end + + # Loads this Attr from +array+. For a loaded Attr the following + # methods will return cached values: + # + # * #full_name + # * #parent_name + # + # source://rdoc//rdoc/attr.rb#124 + def marshal_load(array); end + + # source://rdoc//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 + def rw; end + + # Is the attribute readable ('R'), writable ('W') or both ('RW')? + # + # source://rdoc//rdoc/attr.rb#19 + def rw=(_arg0); end + + # source://rdoc//rdoc/attr.rb#162 + def to_s; end + + # Attributes do not have token streams. + # + # An RDoc::Attr can show up in the method list in some situations (see + # Gem::ConfigFile) + # + # source://rdoc//rdoc/attr.rb#172 + def token_stream; end +end + +# ClassModule is the base class for objects representing either a class or a +# module. +class RDoc::ClassModule < ::RDoc::Context + # Creates a new ClassModule with +name+ with optional +superclass+ + # + # This is a constructor for subclasses, and must never be called directly. + # + # @return [ClassModule] a new instance of ClassModule + # + # source://rdoc//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 + def add_comment(comment, location); end + + # source://rdoc//rdoc/class_module.rb#148 + def add_things(my_things, other_things); end + + # Ancestors list for this ClassModule: the list of included modules + # (classes will add their superclass if any). + # + # Returns the included classes or modules, not the includes + # themselves. The returned values are either String or + # RDoc::NormalModule instances (see RDoc::Include#module). + # + # The values are returned in reverse order of their inclusion, + # which is the order suitable for searching methods/attributes + # in the ancestors. The superclass, if any, comes last. + # + # source://rdoc//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 + def aref; end + + # @raise [NotImplementedError] + # + # source://rdoc//rdoc/class_module.rb#175 + def aref_prefix; end + + # Clears the comment. Used by the Ruby parser. + # + # source://rdoc//rdoc/class_module.rb#195 + def clear_comment; end + + # This method is deprecated, use #add_comment instead. + # + # Appends +comment+ to the current comment, but separated by a rule. Works + # more like +=. + # + # source://rdoc//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 + def comment_location; end + + # Comment and the location it came from. Use #add_comment to add comments + # + # source://rdoc//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 + def complete(min_visibility); end + + # Constants that are aliases for this class or module + # + # source://rdoc//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 + def constant_aliases=(_arg0); end + + # Handy wrapper for marking up this class or module's comment + # + # source://rdoc//rdoc/generator/markup.rb#131 + def description; end + + # source://rdoc//rdoc/class_module.rb#37 + def diagram; end + + # source://rdoc//rdoc/class_module.rb#37 + def diagram=(_arg0); end + + # Ancestors list for this ClassModule: the list of included modules + # (classes will add their superclass if any). + # + # Returns the included classes or modules, not the includes + # themselves. The returned values are either String or + # RDoc::NormalModule instances (see RDoc::Include#module). + # + # The values are returned in reverse order of their inclusion, + # which is the order suitable for searching methods/attributes + # in the ancestors. The superclass, if any, comes last. + # + # Ancestors of this class or module only + # + # source://rdoc//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 + def document_self_or_methods; end + + # Does this class or module have a comment with content or is + # #received_nodoc true? + # + # @return [Boolean] + # + # source://rdoc//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 + def each_ancestor; end + + # Looks for a symbol in the #ancestors. See Context#find_local_symbol. + # + # source://rdoc//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 + def find_class_named(name); end + + # Return the fully qualified name of this class or module + # + # source://rdoc//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 + def is_alias_for; end + + # Class or module this constant is an alias for + # + # source://rdoc//rdoc/class_module.rb#42 + def is_alias_for=(_arg0); end + + # TODO: filter included items by #display? + # + # source://rdoc//rdoc/class_module.rb#300 + def marshal_dump; end + + # source://rdoc//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 + def merge(class_module); end + + # Merges collection +mine+ with +other+ preferring other. +other_files+ is + # used to help determine which items should be deleted. + # + # Yields whether the item should be added or removed (true or false) and the + # item to be added or removed. + # + # merge_collections things, other.things, other.in_files do |add, thing| + # if add then + # # add the thing + # else + # # remove the thing + # end + # end + # + # source://rdoc//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 + def merge_sections(cm); end + + # Does this object represent a module? + # + # @return [Boolean] + # + # source://rdoc//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 + 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 + 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 + 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 + def parse(comment_location); end + + # Path to this class or module for use with HTML generator output. + # + # source://rdoc//rdoc/class_module.rb#613 + def path; end + + # Updates the child modules or classes of class/module +parent+ by + # deleting the ones that have been removed from the documentation. + # + # +parent_hash+ is either parent.modules_hash or + # parent.classes_hash and +all_hash+ is ::all_modules_hash or + # ::all_classes_hash. + # + # source://rdoc//rdoc/class_module.rb#643 + def remove_nodoc_children; end + + # source://rdoc//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 + def search_record; end + + # Sets the store for this class or module and its contained code objects. + # + # source://rdoc//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 + def superclass; end + + # Set the superclass of this class to +superclass+ + # + # @raise [NoMethodError] + # + # source://rdoc//rdoc/class_module.rb#708 + def superclass=(superclass); end + + # source://rdoc//rdoc/class_module.rb#713 + def to_s; end + + # 'module' or 'class' + # + # source://rdoc//rdoc/class_module.rb#724 + def type; end + + # Updates the child modules & classes by replacing the ones that are + # aliases through a constant. + # + # The aliased module/class is replaced in the children and in + # RDoc::Store#modules_hash or RDoc::Store#classes_hash + # by a copy that has RDoc::ClassModule#is_alias_for set to + # the aliased module/class, and this copy is added to #aliases + # of the aliased module/class. + # + # Formatters can use the #non_aliases method to retrieve children that + # are not aliases, for instance to list the namespace content, since + # the aliased modules are included in the constants of the class/module, + # that are listed separately. + # + # source://rdoc//rdoc/class_module.rb#743 + def update_aliases; end + + # Deletes from #extends those whose module has been removed from the + # documentation. + # -- + # FIXME: like update_includes, extends are not reliably removed + # + # source://rdoc//rdoc/class_module.rb#791 + def update_extends; end + + # Deletes from #includes those whose module has been removed from the + # documentation. + # -- + # FIXME: includes are not reliably removed, see _possible_bug test case + # + # source://rdoc//rdoc/class_module.rb#776 + def update_includes; end + + class << self + # Return a RDoc::ClassModule of class +class_type+ that is a copy + # of module +module+. Used to promote modules to classes. + # -- + # TODO move to RDoc::NormalClass (I think) + # + # source://rdoc//rdoc/class_module.rb#50 + def from_module(class_type, mod); end + end +end + +# Base class for the RDoc code tree. +# +# We contain the common stuff for contexts (which are containers) and other +# elements (methods, attributes and so on) +# +# Here's the tree of the CodeObject subclasses: +# +# * RDoc::Context +# * RDoc::TopLevel +# * RDoc::ClassModule +# * RDoc::AnonClass (never used so far) +# * RDoc::NormalClass +# * RDoc::NormalModule +# * RDoc::SingleClass +# * RDoc::MethodAttr +# * RDoc::Attr +# * RDoc::AnyMethod +# * RDoc::GhostMethod +# * RDoc::MetaMethod +# * RDoc::Alias +# * RDoc::Constant +# * RDoc::Mixin +# * RDoc::Require +# * RDoc::Include +class RDoc::CodeObject + include ::RDoc::Text + include ::RDoc::Generator::Markup + + # Creates a new CodeObject that will document itself and its children + # + # @return [CodeObject] a new instance of CodeObject + # + # source://rdoc//rdoc/code_object.rb#102 + def initialize; end + + # Our comment + # + # source://rdoc//rdoc/code_object.rb#35 + def comment; end + + # Replaces our comment with +comment+, unless it is empty. + # + # source://rdoc//rdoc/code_object.rb#135 + def comment=(comment); end + + # Should this CodeObject be displayed in output? + # + # A code object should be displayed if: + # + # * The item didn't have a nodoc or wasn't in a container that had nodoc + # * The item wasn't ignored + # * The item has documentation and was not suppressed + # + # @return [Boolean] + # + # source://rdoc//rdoc/code_object.rb#163 + def display?; end + + # Do we document our children? + # + # source://rdoc//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 + def document_children=(document_children); end + + # Do we document ourselves? + # + # source://rdoc//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 + 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 + def documented?; end + + # Are we done documenting (ie, did we come across a :enddoc:)? + # + # source://rdoc//rdoc/code_object.rb#50 + def done_documenting; end + + # Turns documentation on/off, and turns on/off #document_self + # and #document_children. + # + # Once documentation has been turned off (by +:enddoc:+), + # the object will refuse to turn #document_self or + # will have no effect in the current file. + # + # source://rdoc//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 + def each_parent; end + + # Which file this code object was defined in + # + # source://rdoc//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 + def file_name; end + + # Force documentation of this CodeObject + # + # source://rdoc//rdoc/code_object.rb#60 + def force_documentation; end + + # Force the documentation of this object unless documentation + # has been turned off by :enddoc: + # -- + # HACK untested, was assigning to an ivar + # + # source://rdoc//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 + def full_name=(full_name); end + + # Use this to ignore a CodeObject and all its children until found again + # (#record_location is called). An ignored item will not be displayed in + # documentation. + # + # See github issue #55 + # + # The ignored status is temporary in order to allow implementation details + # to be hidden. At the end of processing a file RDoc allows all classes + # and modules to add new documentation to previously created classes. + # + # If a class was ignored (via stopdoc) then reopened later with additional + # documentation it should be displayed. If a class was ignored and never + # reopened it should not be displayed. The ignore flag allows this to + # occur. + # + # source://rdoc//rdoc/code_object.rb#274 + def ignore; end + + # Has this class been ignored? + # + # See also #ignore + # + # @return [Boolean] + # + # source://rdoc//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 + def initialize_visibility; end + + # Line in #file where this CodeObject was defined + # + # source://rdoc//rdoc/code_object.rb#65 + def line; end + + # Line in #file where this CodeObject was defined + # + # source://rdoc//rdoc/code_object.rb#65 + def line=(_arg0); end + + # Hash of arbitrary metadata for this CodeObject + # + # source://rdoc//rdoc/code_object.rb#70 + def metadata; end + + # The options instance from the store this CodeObject is attached to, or a + # default options instance if the CodeObject is not attached. + # + # This is used by Text#snippet + # + # source://rdoc//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 + def parent; end + + # Sets the parent CodeObject + # + # source://rdoc//rdoc/code_object.rb#75 + def parent=(_arg0); end + + # File name of our parent + # + # source://rdoc//rdoc/code_object.rb#331 + def parent_file_name; end + + # Name of our parent + # + # source://rdoc//rdoc/code_object.rb#338 + def parent_name; end + + # source://rdoc//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 + 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 + def section; end + + # Set the section this CodeObject is in + # + # source://rdoc//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 + def start_doc; end + + # Disable capture of documentation + # + # source://rdoc//rdoc/code_object.rb#377 + def stop_doc; end + + # The RDoc::Store for this object. + # + # source://rdoc//rdoc/code_object.rb#90 + def store; end + + # Sets the +store+ that contains this CodeObject + # + # source://rdoc//rdoc/code_object.rb#387 + def store=(store); end + + # Use this to suppress a CodeObject and all its children until the next file + # it is seen in or documentation is discovered. A suppressed item with + # documentation will be displayed while an ignored item with documentation + # may not be displayed. + # + # source://rdoc//rdoc/code_object.rb#404 + def suppress; end + + # Has this class been suppressed? + # + # See also #suppress + # + # @return [Boolean] + # + # source://rdoc//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 + 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 + def viewer=(_arg0); end +end + +class RDoc::Comment + include ::RDoc::Text + + # Creates a new comment with +text+ that is found in the RDoc::TopLevel + # +location+. + # + # @return [Comment] a new instance of Comment + # + # source://rdoc//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 + 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 + def document=(_arg0); end + + # A comment is empty if its text String is empty. + # + # @return [Boolean] + # + # source://rdoc//rdoc/comment.rb#128 + def empty?; end + + # HACK dubious + # + # source://rdoc//rdoc/comment.rb#135 + def encode!(encoding); end + + # Look for a 'call-seq' in the comment to override the normal parameter + # handling. The :call-seq: is indented from the baseline. All lines of the + # same indentation level and prefix are consumed. + # + # For example, all of the following will be used as the :call-seq: + # + # # :call-seq: + # # ARGF.readlines(sep=$/) -> array + # # ARGF.readlines(limit) -> array + # # ARGF.readlines(sep, limit) -> array + # # + # # ARGF.to_a(sep=$/) -> array + # # ARGF.to_a(limit) -> array + # # ARGF.to_a(sep, limit) -> array + # + # source://rdoc//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 + def file; end + + # The format of this comment. Defaults to RDoc::Markup + # + # source://rdoc//rdoc/comment.rb#19 + def format; end + + # Sets the format of this comment and resets any parsed document + # + # source://rdoc//rdoc/comment.rb#143 + def format=(format); end + + # source://rdoc//rdoc/comment.rb#148 + def inspect; end + + # Line where this Comment was written + # + # source://rdoc//rdoc/comment.rb#29 + def line; end + + # Line where this Comment was written + # + # source://rdoc//rdoc/comment.rb#29 + def line=(_arg0); end + + # The RDoc::TopLevel this comment was found in + # + # source://rdoc//rdoc/comment.rb#24 + def location; end + + # The RDoc::TopLevel this comment was found in + # + # source://rdoc//rdoc/comment.rb#24 + def location=(_arg0); end + + # Normalizes the text. See RDoc::Text#normalize_comment for details + # + # source://rdoc//rdoc/comment.rb#157 + def normalize; end + + # Was this text normalized? + # + # @return [Boolean] + # + # source://rdoc//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 + def parse; end + + # Removes private sections from this comment. Private sections are flush to + # the comment marker and start with -- and end with ++. + # For C-style comments, a private marker may not start at the opening of the + # comment. + # + # /* + # *-- + # * private + # *++ + # * public + # */ + # + # source://rdoc//rdoc/comment.rb#200 + def remove_private; end + + # The text for this comment + # + # source://rdoc//rdoc/comment.rb#39 + def text; end + + # Replaces this comment's text with +text+ and resets the parsed document. + # + # An error is raised if the comment contains a document but no text. + # + # @raise [RDoc::Error] + # + # source://rdoc//rdoc/comment.rb#214 + def text=(text); end + + # The text for this comment + # + # Alias for text + # + # source://rdoc//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 + def tomdoc?; end + + private + + # -- + # TODO deep copy @document + # + # source://rdoc//rdoc/comment.rb#70 + def initialize_copy(copy); end +end + +# A constant +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 + def initialize(name, value, comment); end + + # Constants are ordered by name + # + # source://rdoc//rdoc/constant.rb#47 + def <=>(other); end + + # Constants are equal when their #parent and #name is the same + # + # source://rdoc//rdoc/constant.rb#56 + def ==(other); end + + # A constant is documented if it has a comment, or is an alias + # for a documented class or module. + # + # @return [Boolean] + # + # source://rdoc//rdoc/constant.rb#66 + def documented?; end + + # Full constant name including namespace + # + # source://rdoc//rdoc/constant.rb#81 + def full_name; end + + # source://rdoc//rdoc/constant.rb#99 + def inspect; end + + # The module or class this constant is an alias for + # + # source://rdoc//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 + def is_alias_for=(_arg0); end + + # Dumps this Constant for use by ri. See also #marshal_load + # + # source://rdoc//rdoc/constant.rb#109 + def marshal_dump; end + + # Loads this Constant from +array+. For a loaded Constant the following + # methods will return cached values: + # + # * #full_name + # * #parent_name + # + # source://rdoc//rdoc/constant.rb#135 + def marshal_load(array); end + + # The constant's name + # + # source://rdoc//rdoc/constant.rb#17 + def name; end + + # The constant's name + # + # source://rdoc//rdoc/constant.rb#17 + def name=(_arg0); end + + # Path to this constant for use with HTML generator output. + # + # source://rdoc//rdoc/constant.rb#153 + def path; end + + # source://rdoc//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 + def store=(store); end + + # source://rdoc//rdoc/constant.rb#177 + def to_s; end + + # The constant's value + # + # source://rdoc//rdoc/constant.rb#22 + def value; end + + # The constant's value + # + # source://rdoc//rdoc/constant.rb#22 + def value=(_arg0); end + + # The constant's visibility + # + # source://rdoc//rdoc/constant.rb#27 + def visibility; end + + # The constant's visibility + # + # source://rdoc//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. +class RDoc::Context < ::RDoc::CodeObject + include ::Comparable + + # Creates an unnamed empty context with public current visibility + # + # @return [Context] a new instance of Context + # + # source://rdoc//rdoc/context.rb#123 + def initialize; end + + # Contexts are sorted by full_name + # + # source://rdoc//rdoc/context.rb#171 + def <=>(other); end + + # Adds an item of type +klass+ with the given +name+ and +comment+ to the + # context. + # + # Currently only RDoc::Extend and RDoc::Include are supported. + # + # source://rdoc//rdoc/context.rb#183 + def add(klass, name, comment); end + + # Adds +an_alias+ that is automatically resolved + # + # source://rdoc//rdoc/context.rb#198 + def add_alias(an_alias); end + + # Adds +attribute+ if not already there. If it is (as method(s) or attribute), + # updates the comment if it was empty. + # + # The attribute is registered only if it defines a new method. + # For instance, attr_reader :foo will not be registered + # if method +foo+ exists, but attr_accessor :foo will be registered + # if method +foo+ exists, but foo= does not. + # + # source://rdoc//rdoc/context.rb#225 + def add_attribute(attribute); end + + # Adds a class named +given_name+ with +superclass+. + # + # Both +given_name+ and +superclass+ may contain '::', and are + # interpreted relative to the +self+ context. This allows handling correctly + # examples like these: + # class RDoc::Gauntlet < Gauntlet + # module Mod + # class Object # implies < ::Object + # class SubObject < Object # this is _not_ ::Object + # + # Given class Container::Item RDoc assumes +Container+ is a module + # unless it later sees class Container. +add_class+ automatically + # upgrades +given_name+ to a class in this case. + # + # source://rdoc//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 + # classes Hash +self_hash+, and to +all_hash+ (either + # TopLevel::modules_hash or TopLevel::classes_hash), + # unless #done_documenting is +true+. Sets the #parent of +mod+ + # to +self+, and its #section to #current_section. Returns +mod+. + # + # source://rdoc//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 + def add_constant(constant); end + + # Adds extension module +ext+ which should be an RDoc::Extend + # + # source://rdoc//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 + 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 + 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 + 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 + 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 + def add_module_by_normal_module(mod); end + + # Adds +require+ to this context's top level + # + # source://rdoc//rdoc/context.rb#568 + def add_require(require); end + + # Returns a section with +title+, creating it if it doesn't already exist. + # +comment+ will be appended to the section's comment. + # + # A section with a +title+ of +nil+ will return the default section. + # + # See also RDoc::Context::Section + # + # source://rdoc//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 + def add_to(array, thing); end + + # Class/module aliases + # + # source://rdoc//rdoc/context.rb#25 + def aliases; end + + # Is there any content? + # + # This means any of: comment, aliases, methods, attributes, external + # aliases, require, constant. + # + # Includes and extends are also checked unless includes == false. + # + # source://rdoc//rdoc/context.rb#616 + def any_content(includes = T.unsafe(nil)); end + + # All attr* methods + # + # source://rdoc//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 + def block_params; end + + # Block params to be used in the next MethodAttr parsed under this context + # + # source://rdoc//rdoc/context.rb#35 + def block_params=(_arg0); end + + # Creates the full name for a child with +name+ + # + # source://rdoc//rdoc/context.rb#632 + def child_name(name); end + + # Class attributes + # + # source://rdoc//rdoc/context.rb#645 + def class_attributes; end + + # Class methods + # + # source://rdoc//rdoc/context.rb#652 + def class_method_list; end + + # Array of classes in this context + # + # source://rdoc//rdoc/context.rb#659 + def classes; end + + # All classes and modules in this namespace + # + # source://rdoc//rdoc/context.rb#666 + def classes_and_modules; end + + # Hash of classes keyed by class name + # + # source://rdoc//rdoc/context.rb#673 + def classes_hash; end + + # Constants defined + # + # source://rdoc//rdoc/context.rb#40 + def constants; end + + # Hash of registered constants. + # + # source://rdoc//rdoc/context.rb#118 + def constants_hash; end + + # Current visibility of this line + # + # source://rdoc//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 + def current_section; end + + # Sets the current documentation section of documentation + # + # source://rdoc//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 + def defined_in?(file); end + + # source://rdoc//rdoc/context.rb#698 + def display(method_attr); end + + # Iterator for ancestors for duck-typing. Does nothing. See + # RDoc::ClassModule#each_ancestor. + # + # This method exists to make it easy to work with Context subclasses that + # aren't part of RDoc. + # + # source://rdoc//rdoc/context.rb#713 + def each_ancestor; end + + # Iterator for attributes + # + # source://rdoc//rdoc/context.rb#719 + def each_attribute; end + + # Iterator for classes and modules + # + # source://rdoc//rdoc/context.rb#726 + def each_classmodule(&block); end + + # Iterator for constants + # + # source://rdoc//rdoc/context.rb#733 + def each_constant; end + + # Iterator for extension modules + # + # source://rdoc//rdoc/context.rb#747 + def each_extend; end + + # Iterator for included modules + # + # source://rdoc//rdoc/context.rb#740 + def each_include; end + + # Iterator for methods + # + # source://rdoc//rdoc/context.rb#754 + def each_method; end + + # Iterator for each section's contents sorted by title. The +section+, the + # section's +constants+ and the sections +attributes+ are yielded. The + # +constants+ and +attributes+ collections are sorted. + # + # To retrieve methods in a section use #methods_by_type with the optional + # +section+ parameter. + # + # NOTE: Do not edit collections yielded by this method + # + # source://rdoc//rdoc/context.rb#770 + def each_section; end + + # Modules this context is extended with + # + # source://rdoc//rdoc/context.rb#60 + def extends; end + + # Aliases that could not be resolved. + # + # source://rdoc//rdoc/context.rb#92 + def external_aliases; end + + # Finds an attribute +name+ with singleton value +singleton+. + # + # source://rdoc//rdoc/context.rb#787 + def find_attribute(name, singleton); end + + # Finds an attribute with +name+ in this context + # + # source://rdoc//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 + def find_class_method_named(name); end + + # Finds a constant with +name+ in this context + # + # source://rdoc//rdoc/context.rb#816 + def find_constant_named(name); end + + # Find a module at a higher scope + # + # source://rdoc//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 + def find_external_alias(name, singleton); end + + # Finds an external alias with +name+ in this context + # + # source://rdoc//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 + def find_file_named(name); end + + # Finds an instance method with +name+ in this context + # + # source://rdoc//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 + def find_local_symbol(symbol); end + + # Finds a method named +name+ with singleton value +singleton+. + # + # source://rdoc//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 + def find_method_named(name); end + + # Find a module with +name+ using ruby's scoping rules + # + # source://rdoc//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 + def find_symbol(symbol); end + + # Look up a module named +symbol+. + # + # source://rdoc//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 + def full_name; end + + # Does this context and its methods and constants all have documentation? + # + # (Yes, fully documented doesn't mean everything.) + # + # @return [Boolean] + # + # source://rdoc//rdoc/context.rb#966 + def fully_documented?; end + + # URL for this with a +prefix+ + # + # source://rdoc//rdoc/context.rb#976 + def http_url(prefix); end + + # Files this context is found in + # + # source://rdoc//rdoc/context.rb#50 + def in_files; end + + # Modules this context includes + # + # source://rdoc//rdoc/context.rb#55 + def includes; end + + # Sets the defaults for methods and so-forth + # + # source://rdoc//rdoc/context.rb#145 + def initialize_methods_etc; end + + # Instance attributes + # + # source://rdoc//rdoc/context.rb#987 + def instance_attributes; end + + # Instance methods + # -- + # TODO remove this later + # + # source://rdoc//rdoc/context.rb#1003 + def instance_method_list; end + + # Instance methods + # + # source://rdoc//rdoc/context.rb#994 + def instance_methods; end + + # Methods defined in this context + # + # source://rdoc//rdoc/context.rb#65 + def method_list; end + + # Breaks method_list into a nested hash by type ('class' or + # 'instance') and visibility (+:public+, +:protected+, +:private+). + # + # If +section+ is provided only methods in that RDoc::Context::Section will + # be returned. + # + # source://rdoc//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 + def methods_hash; end + + # Yields AnyMethod and Attr entries matching the list of names in +methods+. + # + # source://rdoc//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 + def modules; end + + # Hash of modules keyed by module name + # + # source://rdoc//rdoc/context.rb#1058 + def modules_hash; end + + # Name of this class excluding namespace. See also full_name + # + # source://rdoc//rdoc/context.rb#70 + def name; end + + # Name to use to generate the url. + # #full_name by default. + # + # source://rdoc//rdoc/context.rb#1066 + def name_for_path; end + + # Changes the visibility for new methods to +visibility+ + # + # source://rdoc//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 + def params; end + + # Params to be used in the next MethodAttr parsed under this context + # + # source://rdoc//rdoc/context.rb#113 + def params=(_arg0); end + + # Record +top_level+ as a file +self+ is in. + # + # source://rdoc//rdoc/context.rb#1080 + def record_location(top_level); end + + # Should we remove this context from the documentation? + # + # The answer is yes if: + # * #received_nodoc is +true+ + # * #any_content is +false+ (not counting includes) + # * All #includes are modules (not a string), and their module has + # #remove_from_documentation? == true + # * All classes and modules have #remove_from_documentation? == true + # + # @return [Boolean] + # + # source://rdoc//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 + def remove_invisible(min_visibility); end + + # Only called when min_visibility == :public or :private + # + # source://rdoc//rdoc/context.rb#1117 + def remove_invisible_in(array, min_visibility); end + + # Files this context requires + # + # source://rdoc//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 + 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 + def section_contents; end + + # Sections in this context + # + # source://rdoc//rdoc/context.rb#1173 + def sections; end + + # source://rdoc//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 + 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 + 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 + 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 + def sort_sections; end + + # Use this section for the next method, attribute or constant added. + # + # source://rdoc//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 + def temporary_section=(_arg0); end + + # source://rdoc//rdoc/context.rb#1229 + def to_s; end + + # Return the TopLevel that owns us + # -- + # FIXME we can be 'owned' by several TopLevel (see #record_location & + # #in_files) + # + # source://rdoc//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 + 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 + def unmatched_alias_lists=(_arg0); end + + # Upgrades NormalModule +mod+ in +enclosing+ to a +class_type+ + # + # source://rdoc//rdoc/context.rb#1249 + def upgrade_to_class(mod, class_type, enclosing); end + + # Current visibility of this context + # + # source://rdoc//rdoc/context.rb#97 + def visibility; end + + # Current visibility of this context + # + # source://rdoc//rdoc/context.rb#97 + def visibility=(_arg0); end +end + +# A section of documentation like: +# +# # :section: The title +# # The body +# +# Sections can be referenced multiple times and will be collapsed into a +# single section. +class RDoc::Context::Section + include ::RDoc::Text + include ::RDoc::Generator::Markup + + # Creates a new section with +title+ and +comment+ + # + # @return [Section] a new instance of Section + # + # source://rdoc//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 + def ==(other); end + + # Adds +comment+ to this section + # + # source://rdoc//rdoc/context/section.rb#63 + def add_comment(comment); end + + # Anchor reference for linking to this section + # + # source://rdoc//rdoc/context/section.rb#83 + def aref; end + + # Section comment + # + # source://rdoc//rdoc/context/section.rb#22 + def comment; end + + # Section comments + # + # source://rdoc//rdoc/context/section.rb#27 + def comments; end + + # Sections are equal when they have the same #title + # + # source://rdoc//rdoc/context/section.rb#54 + def eql?(other); end + + # Extracts the comment for this section from the original comment block. + # If the first line contains :section:, strip it and use the rest. + # Otherwise remove lines up to the line containing :section:, and look + # for those lines again at the end and remove them. This lets us write + # + # # :section: The title + # # The body + # + # source://rdoc//rdoc/context/section.rb#98 + def extract_comment(comment); end + + # source://rdoc//rdoc/context/section.rb#130 + def hash; end + + # The files comments in this section come from + # + # source://rdoc//rdoc/context/section.rb#137 + def in_files; end + + # source://rdoc//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 + def marshal_dump; end + + # De-serializes this Section. The section parent must be restored manually. + # + # source://rdoc//rdoc/context/section.rb#169 + def marshal_load(array); end + + # Context this Section lives in + # + # source://rdoc//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 + 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 + 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 + def remove_comment(comment); end + + # Section title + # + # source://rdoc//rdoc/context/section.rb#37 + def title; end +end + +# RDoc::CrossReference is a reusable way to create cross references for names. +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 + def initialize(context); end + + # Returns a reference to +name+. + # + # If the reference is found and +name+ is not documented +text+ will be + # returned. If +name+ is escaped +name+ is returned. If +name+ is not + # found +text+ is returned. + # + # source://rdoc//rdoc/cross_reference.rb#190 + def resolve(name, text); end + + # Returns a method reference to +name+. + # + # source://rdoc//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 + def seen; end + + # Hash of references that have been looked-up to their replacements + # + # source://rdoc//rdoc/cross_reference.rb#121 + def seen=(_arg0); end +end + +# Regular expression to match method arguments. +# +# source://rdoc//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 +RDoc::CrossReference::METHOD_ARG_REGEXP_STR = T.let(T.unsafe(nil), String) + +# A subclass of ERB that writes directly to an IO. Credit to Aaron Patterson +# and Masatoshi SEKI. +# +# To use: +# +# erbio = RDoc::ERBIO.new '<%= "hello world" %>', nil, nil +# +# File.open 'hello.txt', 'w' do |io| +# erbio.result binding +# end +# +# Note that binding must enclose the io you wish to output on. +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 + 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 + 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. +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 + 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. +module RDoc::Encoding + class << self + # Changes encoding based on +encoding+ without converting and returns new + # string + # + # source://rdoc//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 + def detect_encoding(string); end + + # Reads the contents of +filename+ and handles any encoding directives in + # the file. + # + # The content will be converted to the +encoding+. If the file cannot be + # converted a warning will be printed and nil will be returned. + # + # If +force_transcode+ is true the document will be transcoded and any + # unknown character in the target encoding will be replaced with '?' + # + # source://rdoc//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 + def remove_magic_comment(string); end + end +end + +# source://rdoc//rdoc/encoding.rb#10 +RDoc::Encoding::HEADER_REGEXP = T.let(T.unsafe(nil), Regexp) + +class RDoc::Generator::Darkfish + include ::ERB::Escape + include ::ERB::Util + include ::ActiveSupport::CoreExt::ERBUtil + include ::ActiveSupport::CoreExt::ERBUtilPrivate + + # Initialize a few instance variables before we start + # + # @return [Darkfish] a new instance of Darkfish + # + # source://rdoc//rdoc/generator/darkfish.rb#159 + def initialize(store, options); end + + # Creates a template from its components and the +body_file+. + # + # For backwards compatibility, if +body_file+ contains "--op from the + # options for a full path. + # + # source://rdoc//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 + 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 + def classes; end + + # Copies static files from the static_path into the output directory + # + # source://rdoc//rdoc/generator/darkfish.rb#265 + def copy_static; end + + # Output progress information if debugging is enabled + # + # source://rdoc//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 + def dry_run; end + + # No files will be written when dry_run is true. + # + # source://rdoc//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 + 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 + 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 + def file_output=(_arg0); end + + # Files to be displayed by this generator + # + # source://rdoc//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 + 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 + def generate; end + + # Generates a class file for +klass+ + # + # source://rdoc//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 + def generate_class_files; end + + # Generate a documentation file for each file + # + # source://rdoc//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 + def generate_index; end + + # Generate a page file for +file+ + # + # source://rdoc//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 + def generate_servlet_not_found(message); end + + # Generates the servlet root page for the RDoc servlet + # + # source://rdoc//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 + 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 + 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 + def get_svninfo(klass); end + + # source://rdoc//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 + def json_index; end + + # Methods to be displayed by this generator + # + # source://rdoc//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 + def modsort; end + + # The output directory + # + # source://rdoc//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 + def render(file_name); end + + # Load and render the erb template in the given +template_file+ and write + # it out to +out_file+. + # + # Both +template_file+ and +out_file+ should be Pathname-like objects. + # + # An io will be yielded which must be captured by binding in the caller. + # + # source://rdoc//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 + def setup; end + + # The RDoc::Store that is the source of the generated content + # + # source://rdoc//rdoc/generator/darkfish.rb#144 + def store; end + + # The directory where the template files live + # + # source://rdoc//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 + 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 + 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 + 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 + def write_style_sheet; end +end + +class RDoc::Generator::JsonIndex + include ::RDoc::Text + + # Creates a new generator. +parent_generator+ is used to determine the + # class_dir and file_dir of links in the output index. + # + # +options+ are the same options passed to the parent generator. + # + # @return [JsonIndex] a new instance of JsonIndex + # + # source://rdoc//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 + def build_index; end + + # The directory classes are written to + # + # source://rdoc//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 + def debug_msg(*msg); end + + # The directory files are written to + # + # source://rdoc//rdoc/generator/json_index.rb#278 + def file_dir; end + + # Writes the JSON index to disk + # + # source://rdoc//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 + def generate_gzipped; end + + # source://rdoc//rdoc/generator/json_index.rb#86 + def index; end + + # Adds classes and modules to the index + # + # source://rdoc//rdoc/generator/json_index.rb#211 + def index_classes; end + + # Adds methods to the index + # + # source://rdoc//rdoc/generator/json_index.rb#230 + def index_methods; end + + # Adds pages to the index + # + # source://rdoc//rdoc/generator/json_index.rb#251 + def index_pages; end + + # source://rdoc//rdoc/generator/json_index.rb#282 + def reset(files, classes); end + + # Removes whitespace and downcases +string+ + # + # source://rdoc//rdoc/generator/json_index.rb#296 + def search_string(string); end +end + +# Generates a POT file. +# +# Here is a translator work flow with the generator. +# +# == Create .pot +# +# You create .pot file by pot formatter: +# +# % rdoc --format pot +# +# It generates doc/rdoc.pot. +# +# == Create .po +# +# You create .po file from doc/rdoc.pot. This operation is needed only +# the first time. This work flow assumes that you are a translator +# for Japanese. +# +# You create locale/ja/rdoc.po from doc/rdoc.pot. You can use msginit +# provided by GNU gettext or rmsginit provided by gettext gem. This +# work flow uses gettext gem because it is more portable than GNU +# gettext for Rubyists. Gettext gem is implemented by pure Ruby. +# +# % gem install gettext +# % mkdir -p locale/ja +# % rmsginit --input doc/rdoc.pot --output locale/ja/rdoc.po --locale ja +# +# Translate messages in .po +# +# You translate messages in .po by a PO file editor. po-mode.el exists +# for Emacs users. There are some GUI tools such as GTranslator. +# There are some Web services such as POEditor and Tansifex. You can +# edit by your favorite text editor because .po is a text file. +# Generate localized documentation +# +# You can generate localized documentation with locale/ja/rdoc.po: +# +# % rdoc --locale ja +# +# You can find documentation in Japanese in doc/. Yay! +# +# == Update translation +# +# You need to update translation when your application is added or +# modified messages. +# +# You can update .po by the following command lines: +# +# % rdoc --format pot +# % rmsgmerge --update locale/ja/rdoc.po doc/rdoc.pot +# +# You edit locale/ja/rdoc.po to translate new messages. +class RDoc::Generator::POT + # Set up a new .pot generator + # + # @return [POT] a new instance of POT + # + # source://rdoc//rdoc/generator/pot.rb#68 + def initialize(store, options); end + + # source://rdoc//rdoc/generator/pot.rb#85 + def class_dir; end + + # Writes .pot to disk. + # + # source://rdoc//rdoc/generator/pot.rb#76 + def generate; end + + private + + # source://rdoc//rdoc/generator/pot.rb#90 + def extract_messages; end +end + +# Extracts message from RDoc::Store +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 + 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 + def extract; end + + private + + # source://rdoc//rdoc/generator/pot/message_extractor.rb#64 + def entry(msgid, options); end + + # source://rdoc//rdoc/generator/pot/message_extractor.rb#28 + def extract_from_klass(klass); end + + # source://rdoc//rdoc/generator/pot/message_extractor.rb#51 + def extract_text(text, comment, location = T.unsafe(nil)); end +end + +# Generates a PO format text +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 + def initialize; end + + # Adds a PO entry to the PO. + # + # source://rdoc//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 + def to_s; end + + private + + # source://rdoc//rdoc/generator/pot/po.rb#40 + def add_header; end + + # source://rdoc//rdoc/generator/pot/po.rb#44 + def header_entry; end + + # source://rdoc//rdoc/generator/pot/po.rb#73 + def sort_entries; end +end + +# A PO entry in PO +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 + def initialize(msgid, options = T.unsafe(nil)); end + + # The comment content extracted from source file + # + # source://rdoc//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 + def flags; end + + # Merges the PO entry with +other_entry+. + # + # source://rdoc//rdoc/generator/pot/po_entry.rb#56 + def merge(other_entry); end + + # The msgid content + # + # source://rdoc//rdoc/generator/pot/po_entry.rb#8 + def msgid; end + + # The msgstr content + # + # source://rdoc//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 + def references; end + + # Returns the PO entry in PO format. + # + # source://rdoc//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 + def translator_comment; end + + private + + # source://rdoc//rdoc/generator/pot/po_entry.rb#120 + def escape(string); end + + # source://rdoc//rdoc/generator/pot/po_entry.rb#72 + def format_comment(mark, comment); end + + # source://rdoc//rdoc/generator/pot/po_entry.rb#88 + def format_extracted_comment; end + + # source://rdoc//rdoc/generator/pot/po_entry.rb#102 + def format_flags; end + + # source://rdoc//rdoc/generator/pot/po_entry.rb#109 + def format_message(message); end + + # source://rdoc//rdoc/generator/pot/po_entry.rb#92 + def format_references; end + + # source://rdoc//rdoc/generator/pot/po_entry.rb#84 + def format_translator_comment; end + + # source://rdoc//rdoc/generator/pot/po_entry.rb#137 + def merge_array(array1, array2); end + + # source://rdoc//rdoc/generator/pot/po_entry.rb#133 + def merge_string(string1, string2); end +end + +# Generates ri data files +class RDoc::Generator::RI + # Set up a new ri generator + # + # @return [RI] a new instance of RI + # + # source://rdoc//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 + def generate; end +end + +# A message container for a locale. +# +# This object provides the following two features: +# +# * Loads translated messages from .po file. +# * Translates a message into the locale. +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 + def initialize(name); end + + # Loads translation messages from +locale_directory+/+@name+/rdoc.po + # or +locale_directory+/+@name+.po. The former has high priority. + # + # This method requires gettext gem for parsing .po file. If you + # don't have gettext gem, this method doesn't load .po file. This + # method warns and returns +false+. + # + # Returns +true+ if succeeded, +false+ otherwise. + # + # source://rdoc//rdoc/i18n/locale.rb#63 + def load(locale_directory); end + + # The name of the locale. It uses IETF language tag format + # +[language[_territory][.codeset][@modifier]]+. + # + # See also {BCP 47 - Tags for Identifying + # Languages}[http://tools.ietf.org/rfc/bcp/bcp47.txt]. + # + # source://rdoc//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 + def translate(message); end + + class << self + # Returns the locale object for +locale_name+. + # + # source://rdoc//rdoc/i18n/locale.rb#19 + def [](locale_name); end + + # Sets the locale object for +locale_name+. + # + # Normally, this method is not used. This method is useful for + # testing. + # + # source://rdoc//rdoc/i18n/locale.rb#29 + def []=(locale_name, locale); end + end +end + +# An i18n supported text. +# +# This object provides the following two features: +# +# * Extracts translation messages from wrapped raw text. +# * Translates wrapped raw text in specified locale. +# +# Wrapped raw text is one of String, RDoc::Comment or Array of them. +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 + def initialize(raw); end + + # Extracts translation target messages and yields each message. + # + # Each yielded message is a Hash. It consists of the followings: + # + # :type :: :paragraph + # :paragraph :: String (The translation target message itself.) + # :line_no :: Integer (The line number of the :paragraph is started.) + # + # The above content may be added in the future. + # + # source://rdoc//rdoc/i18n/text.rb#32 + def extract_messages; end + + # Translates raw text into +locale+. + # + # source://rdoc//rdoc/i18n/text.rb#44 + def translate(locale); end + + private + + # source://rdoc//rdoc/i18n/text.rb#88 + def each_line(raw, &block); end + + # @yield [part] + # + # source://rdoc//rdoc/i18n/text.rb#101 + def emit_empty_line_event(line, line_no); end + + # source://rdoc//rdoc/i18n/text.rb#110 + def emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block); end + + # source://rdoc//rdoc/i18n/text.rb#60 + def parse(&block); end +end + +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 + def initialize(extensions = T.unsafe(nil), debug = T.unsafe(nil)); end + + # Alphanumeric = %literals.Alphanumeric + # + # source://rdoc//rdoc/markdown.rb#14705 + def _Alphanumeric; end + + # AlphanumericAscii = %literals.AlphanumericAscii + # + # source://rdoc//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 + def _AtxHeading; end + + # AtxInline = !@Newline !(@Sp /#*/ @Sp @Newline) Inline + # + # source://rdoc//rdoc/markdown.rb#1080 + def _AtxInline; end + + # AtxStart = < /\#{1,6}/ > { text.length } + # + # source://rdoc//rdoc/markdown.rb#1136 + def _AtxStart; end + + # AutoLink = (AutoLinkUrl | AutoLinkEmail) + # + # source://rdoc//rdoc/markdown.rb#11574 + def _AutoLink; end + + # AutoLinkEmail = "<" "mailto:"? < /[\w+.\/!%~$-]+/i "@" (!@Newline !">" .)+ > ">" { "mailto:#{text}" } + # + # source://rdoc//rdoc/markdown.rb#11707 + def _AutoLinkEmail; end + + # AutoLinkUrl = "<" < /[A-Za-z]+/ "://" (!@Newline !">" .)+ > ">" { text } + # + # source://rdoc//rdoc/markdown.rb#11592 + def _AutoLinkUrl; end + + # BOM = %literals.BOM + # + # source://rdoc//rdoc/markdown.rb#14719 + def _BOM; end + + # BlankLine = @Sp @Newline { "\n" } + # + # source://rdoc//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 + def _Block; end + + # BlockQuote = BlockQuoteRaw:a { RDoc::Markup::BlockQuote.new(*a) } + # + # source://rdoc//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 + def _BlockQuoteRaw; end + + # Bullet = !HorizontalRule @NonindentSpace /[+*-]/ @Spacechar+ + # + # source://rdoc//rdoc/markdown.rb#2154 + def _Bullet; end + + # BulletList = &Bullet (ListTight | ListLoose):a { RDoc::Markup::List.new(:BULLET, *a) } + # + # source://rdoc//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 + 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 + 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 + def _CodeFence; end + + # DecEntity = "&#" < /[0-9]+/ > ";" { [text.to_i].pack 'U' } + # + # source://rdoc//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 + def _DefinitionList; end + + # DefinitionListDefinition = @NonindentSpace ":" @Space Inlines:a @BlankLine+ { paragraph a } + # + # source://rdoc//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 + def _DefinitionListItem; end + + # DefinitionListLabel = StrChunk:label @Sp @Newline { label } + # + # source://rdoc//rdoc/markdown.rb#16449 + def _DefinitionListLabel; end + + # Digit = [0-9] + # + # source://rdoc//rdoc/markdown.rb#14691 + def _Digit; end + + # Doc = BOM? Block*:a { RDoc::Markup::Document.new(*a.compact) } + # + # source://rdoc//rdoc/markdown.rb#899 + def _Doc; end + + # Emph = (EmphStar | EmphUl) + # + # source://rdoc//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 + def _EmphStar; end + + # EmphUl = "_" !@Whitespace @StartList:a (!"_" Inline:b { a << b } | StrongUl:b { a << b })+ "_" { emphasis a.join } + # + # source://rdoc//rdoc/markdown.rb#10477 + def _EmphUl; end + + # EmptyTitle = "" + # + # source://rdoc//rdoc/markdown.rb#12086 + def _EmptyTitle; end + + # Endline = (@LineBreak | @TerminalEndline | @NormalEndline) + # + # source://rdoc//rdoc/markdown.rb#9917 + def _Endline; end + + # Entity = (HexEntity | DecEntity | CharEntity):a { a } + # + # source://rdoc//rdoc/markdown.rb#9880 + def _Entity; end + + # Enumerator = @NonindentSpace [0-9]+ "." @Spacechar+ + # + # source://rdoc//rdoc/markdown.rb#2687 + def _Enumerator; end + + # Eof = !. + # + # source://rdoc//rdoc/markdown.rb#14542 + def _Eof; end + + # EscapedChar = "\\" !@Newline < /[:\\`|*_{}\[\]()#+.!><-]/ > { text } + # + # source://rdoc//rdoc/markdown.rb#9841 + def _EscapedChar; end + + # ExplicitLink = Label:l "(" @Sp Source:s Spnl Title @Sp ")" { "{#{l}}[#{s}]" } + # + # source://rdoc//rdoc/markdown.rb#11147 + def _ExplicitLink; end + + # ExtendedSpecialChar = &{ notes? } "^" + # + # source://rdoc//rdoc/markdown.rb#15184 + def _ExtendedSpecialChar; end + + # Heading = (SetextHeading | AtxHeading) + # + # source://rdoc//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 + 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 + def _HorizontalRule; end + + # HtmlAnchor = HtmlOpenAnchor (HtmlAnchor | !HtmlCloseAnchor .)* HtmlCloseAnchor + # + # source://rdoc//rdoc/markdown.rb#2971 + def _HtmlAnchor; end + + # HtmlAttribute = (AlphanumericAscii | "-")+ Spnl ("=" Spnl (Quoted | (!">" Nonspacechar)+))? Spnl + # + # source://rdoc//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 + def _HtmlBlock; end + + # HtmlBlockAddress = HtmlBlockOpenAddress (HtmlBlockAddress | !HtmlBlockCloseAddress .)* HtmlBlockCloseAddress + # + # source://rdoc//rdoc/markdown.rb#3137 + def _HtmlBlockAddress; end + + # HtmlBlockBlockquote = HtmlBlockOpenBlockquote (HtmlBlockBlockquote | !HtmlBlockCloseBlockquote .)* HtmlBlockCloseBlockquote + # + # source://rdoc//rdoc/markdown.rb#3303 + def _HtmlBlockBlockquote; end + + # HtmlBlockCenter = HtmlBlockOpenCenter (HtmlBlockCenter | !HtmlBlockCloseCenter .)* HtmlBlockCloseCenter + # + # source://rdoc//rdoc/markdown.rb#3469 + def _HtmlBlockCenter; end + + # HtmlBlockCloseAddress = "<" Spnl "/" ("address" | "ADDRESS") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#3085 + def _HtmlBlockCloseAddress; end + + # HtmlBlockCloseBlockquote = "<" Spnl "/" ("blockquote" | "BLOCKQUOTE") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#3251 + def _HtmlBlockCloseBlockquote; end + + # HtmlBlockCloseCenter = "<" Spnl "/" ("center" | "CENTER") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#3417 + def _HtmlBlockCloseCenter; end + + # HtmlBlockCloseDd = "<" Spnl "/" ("dd" | "DD") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#6737 + def _HtmlBlockCloseDd; end + + # HtmlBlockCloseDir = "<" Spnl "/" ("dir" | "DIR") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#3583 + def _HtmlBlockCloseDir; end + + # HtmlBlockCloseDiv = "<" Spnl "/" ("div" | "DIV") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#3749 + def _HtmlBlockCloseDiv; end + + # HtmlBlockCloseDl = "<" Spnl "/" ("dl" | "DL") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#3915 + def _HtmlBlockCloseDl; end + + # HtmlBlockCloseDt = "<" Spnl "/" ("dt" | "DT") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#6903 + def _HtmlBlockCloseDt; end + + # HtmlBlockCloseFieldset = "<" Spnl "/" ("fieldset" | "FIELDSET") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#4081 + def _HtmlBlockCloseFieldset; end + + # HtmlBlockCloseForm = "<" Spnl "/" ("form" | "FORM") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#4247 + def _HtmlBlockCloseForm; end + + # HtmlBlockCloseFrameset = "<" Spnl "/" ("frameset" | "FRAMESET") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#7069 + def _HtmlBlockCloseFrameset; end + + # HtmlBlockCloseH1 = "<" Spnl "/" ("h1" | "H1") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#4413 + def _HtmlBlockCloseH1; end + + # HtmlBlockCloseH2 = "<" Spnl "/" ("h2" | "H2") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#4579 + def _HtmlBlockCloseH2; end + + # HtmlBlockCloseH3 = "<" Spnl "/" ("h3" | "H3") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#4745 + def _HtmlBlockCloseH3; end + + # HtmlBlockCloseH4 = "<" Spnl "/" ("h4" | "H4") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#4911 + def _HtmlBlockCloseH4; end + + # HtmlBlockCloseH5 = "<" Spnl "/" ("h5" | "H5") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#5077 + def _HtmlBlockCloseH5; end + + # HtmlBlockCloseH6 = "<" Spnl "/" ("h6" | "H6") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#5243 + def _HtmlBlockCloseH6; end + + # HtmlBlockCloseHead = "<" Spnl "/" ("head" | "HEAD") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#8552 + def _HtmlBlockCloseHead; end + + # HtmlBlockCloseLi = "<" Spnl "/" ("li" | "LI") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#7235 + def _HtmlBlockCloseLi; end + + # HtmlBlockCloseMenu = "<" Spnl "/" ("menu" | "MENU") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#5409 + def _HtmlBlockCloseMenu; end + + # HtmlBlockCloseNoframes = "<" Spnl "/" ("noframes" | "NOFRAMES") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#5575 + def _HtmlBlockCloseNoframes; end + + # HtmlBlockCloseNoscript = "<" Spnl "/" ("noscript" | "NOSCRIPT") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#5741 + def _HtmlBlockCloseNoscript; end + + # HtmlBlockCloseOl = "<" Spnl "/" ("ol" | "OL") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#5907 + def _HtmlBlockCloseOl; end + + # HtmlBlockCloseP = "<" Spnl "/" ("p" | "P") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#6073 + def _HtmlBlockCloseP; end + + # HtmlBlockClosePre = "<" Spnl "/" ("pre" | "PRE") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#6239 + def _HtmlBlockClosePre; end + + # HtmlBlockCloseScript = "<" Spnl "/" ("script" | "SCRIPT") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#8397 + def _HtmlBlockCloseScript; end + + # HtmlBlockCloseTable = "<" Spnl "/" ("table" | "TABLE") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#6405 + def _HtmlBlockCloseTable; end + + # HtmlBlockCloseTbody = "<" Spnl "/" ("tbody" | "TBODY") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#7401 + def _HtmlBlockCloseTbody; end + + # HtmlBlockCloseTd = "<" Spnl "/" ("td" | "TD") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#7567 + def _HtmlBlockCloseTd; end + + # HtmlBlockCloseTfoot = "<" Spnl "/" ("tfoot" | "TFOOT") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#7733 + def _HtmlBlockCloseTfoot; end + + # HtmlBlockCloseTh = "<" Spnl "/" ("th" | "TH") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#7899 + def _HtmlBlockCloseTh; end + + # HtmlBlockCloseThead = "<" Spnl "/" ("thead" | "THEAD") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#8065 + def _HtmlBlockCloseThead; end + + # HtmlBlockCloseTr = "<" Spnl "/" ("tr" | "TR") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#8231 + def _HtmlBlockCloseTr; end + + # HtmlBlockCloseUl = "<" Spnl "/" ("ul" | "UL") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#6571 + def _HtmlBlockCloseUl; end + + # HtmlBlockDd = HtmlBlockOpenDd (HtmlBlockDd | !HtmlBlockCloseDd .)* HtmlBlockCloseDd + # + # source://rdoc//rdoc/markdown.rb#6789 + def _HtmlBlockDd; end + + # HtmlBlockDir = HtmlBlockOpenDir (HtmlBlockDir | !HtmlBlockCloseDir .)* HtmlBlockCloseDir + # + # source://rdoc//rdoc/markdown.rb#3635 + def _HtmlBlockDir; end + + # HtmlBlockDiv = HtmlBlockOpenDiv (HtmlBlockDiv | !HtmlBlockCloseDiv .)* HtmlBlockCloseDiv + # + # source://rdoc//rdoc/markdown.rb#3801 + def _HtmlBlockDiv; end + + # HtmlBlockDl = HtmlBlockOpenDl (HtmlBlockDl | !HtmlBlockCloseDl .)* HtmlBlockCloseDl + # + # source://rdoc//rdoc/markdown.rb#3967 + def _HtmlBlockDl; end + + # HtmlBlockDt = HtmlBlockOpenDt (HtmlBlockDt | !HtmlBlockCloseDt .)* HtmlBlockCloseDt + # + # source://rdoc//rdoc/markdown.rb#6955 + def _HtmlBlockDt; end + + # HtmlBlockFieldset = HtmlBlockOpenFieldset (HtmlBlockFieldset | !HtmlBlockCloseFieldset .)* HtmlBlockCloseFieldset + # + # source://rdoc//rdoc/markdown.rb#4133 + def _HtmlBlockFieldset; end + + # HtmlBlockForm = HtmlBlockOpenForm (HtmlBlockForm | !HtmlBlockCloseForm .)* HtmlBlockCloseForm + # + # source://rdoc//rdoc/markdown.rb#4299 + def _HtmlBlockForm; end + + # HtmlBlockFrameset = HtmlBlockOpenFrameset (HtmlBlockFrameset | !HtmlBlockCloseFrameset .)* HtmlBlockCloseFrameset + # + # source://rdoc//rdoc/markdown.rb#7121 + def _HtmlBlockFrameset; end + + # HtmlBlockH1 = HtmlBlockOpenH1 (HtmlBlockH1 | !HtmlBlockCloseH1 .)* HtmlBlockCloseH1 + # + # source://rdoc//rdoc/markdown.rb#4465 + def _HtmlBlockH1; end + + # HtmlBlockH2 = HtmlBlockOpenH2 (HtmlBlockH2 | !HtmlBlockCloseH2 .)* HtmlBlockCloseH2 + # + # source://rdoc//rdoc/markdown.rb#4631 + def _HtmlBlockH2; end + + # HtmlBlockH3 = HtmlBlockOpenH3 (HtmlBlockH3 | !HtmlBlockCloseH3 .)* HtmlBlockCloseH3 + # + # source://rdoc//rdoc/markdown.rb#4797 + def _HtmlBlockH3; end + + # HtmlBlockH4 = HtmlBlockOpenH4 (HtmlBlockH4 | !HtmlBlockCloseH4 .)* HtmlBlockCloseH4 + # + # source://rdoc//rdoc/markdown.rb#4963 + def _HtmlBlockH4; end + + # HtmlBlockH5 = HtmlBlockOpenH5 (HtmlBlockH5 | !HtmlBlockCloseH5 .)* HtmlBlockCloseH5 + # + # source://rdoc//rdoc/markdown.rb#5129 + def _HtmlBlockH5; end + + # HtmlBlockH6 = HtmlBlockOpenH6 (HtmlBlockH6 | !HtmlBlockCloseH6 .)* HtmlBlockCloseH6 + # + # source://rdoc//rdoc/markdown.rb#5295 + def _HtmlBlockH6; end + + # HtmlBlockHead = HtmlBlockOpenHead (!HtmlBlockCloseHead .)* HtmlBlockCloseHead + # + # source://rdoc//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 + def _HtmlBlockInTags; end + + # HtmlBlockLi = HtmlBlockOpenLi (HtmlBlockLi | !HtmlBlockCloseLi .)* HtmlBlockCloseLi + # + # source://rdoc//rdoc/markdown.rb#7287 + def _HtmlBlockLi; end + + # HtmlBlockMenu = HtmlBlockOpenMenu (HtmlBlockMenu | !HtmlBlockCloseMenu .)* HtmlBlockCloseMenu + # + # source://rdoc//rdoc/markdown.rb#5461 + def _HtmlBlockMenu; end + + # HtmlBlockNoframes = HtmlBlockOpenNoframes (HtmlBlockNoframes | !HtmlBlockCloseNoframes .)* HtmlBlockCloseNoframes + # + # source://rdoc//rdoc/markdown.rb#5627 + def _HtmlBlockNoframes; end + + # HtmlBlockNoscript = HtmlBlockOpenNoscript (HtmlBlockNoscript | !HtmlBlockCloseNoscript .)* HtmlBlockCloseNoscript + # + # source://rdoc//rdoc/markdown.rb#5793 + def _HtmlBlockNoscript; end + + # HtmlBlockOl = HtmlBlockOpenOl (HtmlBlockOl | !HtmlBlockCloseOl .)* HtmlBlockCloseOl + # + # source://rdoc//rdoc/markdown.rb#5959 + def _HtmlBlockOl; end + + # HtmlBlockOpenAddress = "<" Spnl ("address" | "ADDRESS") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#3029 + def _HtmlBlockOpenAddress; end + + # HtmlBlockOpenBlockquote = "<" Spnl ("blockquote" | "BLOCKQUOTE") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#3195 + def _HtmlBlockOpenBlockquote; end + + # HtmlBlockOpenCenter = "<" Spnl ("center" | "CENTER") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#3361 + def _HtmlBlockOpenCenter; end + + # HtmlBlockOpenDd = "<" Spnl ("dd" | "DD") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#6681 + def _HtmlBlockOpenDd; end + + # HtmlBlockOpenDir = "<" Spnl ("dir" | "DIR") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#3527 + def _HtmlBlockOpenDir; end + + # HtmlBlockOpenDiv = "<" Spnl ("div" | "DIV") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#3693 + def _HtmlBlockOpenDiv; end + + # HtmlBlockOpenDl = "<" Spnl ("dl" | "DL") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#3859 + def _HtmlBlockOpenDl; end + + # HtmlBlockOpenDt = "<" Spnl ("dt" | "DT") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#6847 + def _HtmlBlockOpenDt; end + + # HtmlBlockOpenFieldset = "<" Spnl ("fieldset" | "FIELDSET") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#4025 + def _HtmlBlockOpenFieldset; end + + # HtmlBlockOpenForm = "<" Spnl ("form" | "FORM") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#4191 + def _HtmlBlockOpenForm; end + + # HtmlBlockOpenFrameset = "<" Spnl ("frameset" | "FRAMESET") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#7013 + def _HtmlBlockOpenFrameset; end + + # HtmlBlockOpenH1 = "<" Spnl ("h1" | "H1") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#4357 + def _HtmlBlockOpenH1; end + + # HtmlBlockOpenH2 = "<" Spnl ("h2" | "H2") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#4523 + def _HtmlBlockOpenH2; end + + # HtmlBlockOpenH3 = "<" Spnl ("h3" | "H3") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#4689 + def _HtmlBlockOpenH3; end + + # HtmlBlockOpenH4 = "<" Spnl ("h4" | "H4") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#4855 + def _HtmlBlockOpenH4; end + + # HtmlBlockOpenH5 = "<" Spnl ("h5" | "H5") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#5021 + def _HtmlBlockOpenH5; end + + # HtmlBlockOpenH6 = "<" Spnl ("h6" | "H6") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#5187 + def _HtmlBlockOpenH6; end + + # HtmlBlockOpenHead = "<" Spnl ("head" | "HEAD") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#8496 + def _HtmlBlockOpenHead; end + + # HtmlBlockOpenLi = "<" Spnl ("li" | "LI") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#7179 + def _HtmlBlockOpenLi; end + + # HtmlBlockOpenMenu = "<" Spnl ("menu" | "MENU") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#5353 + def _HtmlBlockOpenMenu; end + + # HtmlBlockOpenNoframes = "<" Spnl ("noframes" | "NOFRAMES") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#5519 + def _HtmlBlockOpenNoframes; end + + # HtmlBlockOpenNoscript = "<" Spnl ("noscript" | "NOSCRIPT") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#5685 + def _HtmlBlockOpenNoscript; end + + # HtmlBlockOpenOl = "<" Spnl ("ol" | "OL") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#5851 + def _HtmlBlockOpenOl; end + + # HtmlBlockOpenP = "<" Spnl ("p" | "P") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#6017 + def _HtmlBlockOpenP; end + + # HtmlBlockOpenPre = "<" Spnl ("pre" | "PRE") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#6183 + def _HtmlBlockOpenPre; end + + # HtmlBlockOpenScript = "<" Spnl ("script" | "SCRIPT") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#8341 + def _HtmlBlockOpenScript; end + + # HtmlBlockOpenTable = "<" Spnl ("table" | "TABLE") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#6349 + def _HtmlBlockOpenTable; end + + # HtmlBlockOpenTbody = "<" Spnl ("tbody" | "TBODY") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#7345 + def _HtmlBlockOpenTbody; end + + # HtmlBlockOpenTd = "<" Spnl ("td" | "TD") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#7511 + def _HtmlBlockOpenTd; end + + # HtmlBlockOpenTfoot = "<" Spnl ("tfoot" | "TFOOT") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#7677 + def _HtmlBlockOpenTfoot; end + + # HtmlBlockOpenTh = "<" Spnl ("th" | "TH") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#7843 + def _HtmlBlockOpenTh; end + + # HtmlBlockOpenThead = "<" Spnl ("thead" | "THEAD") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#8009 + def _HtmlBlockOpenThead; end + + # HtmlBlockOpenTr = "<" Spnl ("tr" | "TR") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#8175 + def _HtmlBlockOpenTr; end + + # HtmlBlockOpenUl = "<" Spnl ("ul" | "UL") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#6515 + def _HtmlBlockOpenUl; end + + # HtmlBlockP = HtmlBlockOpenP (HtmlBlockP | !HtmlBlockCloseP .)* HtmlBlockCloseP + # + # source://rdoc//rdoc/markdown.rb#6125 + def _HtmlBlockP; end + + # HtmlBlockPre = HtmlBlockOpenPre (HtmlBlockPre | !HtmlBlockClosePre .)* HtmlBlockClosePre + # + # source://rdoc//rdoc/markdown.rb#6291 + def _HtmlBlockPre; end + + # HtmlBlockScript = HtmlBlockOpenScript (!HtmlBlockCloseScript .)* HtmlBlockCloseScript + # + # source://rdoc//rdoc/markdown.rb#8449 + def _HtmlBlockScript; end + + # HtmlBlockSelfClosing = "<" Spnl HtmlBlockType Spnl HtmlAttribute* "/" Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#8896 + def _HtmlBlockSelfClosing; end + + # HtmlBlockTable = HtmlBlockOpenTable (HtmlBlockTable | !HtmlBlockCloseTable .)* HtmlBlockCloseTable + # + # source://rdoc//rdoc/markdown.rb#6457 + def _HtmlBlockTable; end + + # HtmlBlockTbody = HtmlBlockOpenTbody (HtmlBlockTbody | !HtmlBlockCloseTbody .)* HtmlBlockCloseTbody + # + # source://rdoc//rdoc/markdown.rb#7453 + def _HtmlBlockTbody; end + + # HtmlBlockTd = HtmlBlockOpenTd (HtmlBlockTd | !HtmlBlockCloseTd .)* HtmlBlockCloseTd + # + # source://rdoc//rdoc/markdown.rb#7619 + def _HtmlBlockTd; end + + # HtmlBlockTfoot = HtmlBlockOpenTfoot (HtmlBlockTfoot | !HtmlBlockCloseTfoot .)* HtmlBlockCloseTfoot + # + # source://rdoc//rdoc/markdown.rb#7785 + def _HtmlBlockTfoot; end + + # HtmlBlockTh = HtmlBlockOpenTh (HtmlBlockTh | !HtmlBlockCloseTh .)* HtmlBlockCloseTh + # + # source://rdoc//rdoc/markdown.rb#7951 + def _HtmlBlockTh; end + + # HtmlBlockThead = HtmlBlockOpenThead (HtmlBlockThead | !HtmlBlockCloseThead .)* HtmlBlockCloseThead + # + # source://rdoc//rdoc/markdown.rb#8117 + def _HtmlBlockThead; end + + # HtmlBlockTr = HtmlBlockOpenTr (HtmlBlockTr | !HtmlBlockCloseTr .)* HtmlBlockCloseTr + # + # source://rdoc//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 + def _HtmlBlockType; end + + # HtmlBlockUl = HtmlBlockOpenUl (HtmlBlockUl | !HtmlBlockCloseUl .)* HtmlBlockCloseUl + # + # source://rdoc//rdoc/markdown.rb#6623 + def _HtmlBlockUl; end + + # HtmlCloseAnchor = "<" Spnl "/" ("a" | "A") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#2919 + def _HtmlCloseAnchor; end + + # HtmlComment = "" .)* "-->" + # + # source://rdoc//rdoc/markdown.rb#14415 + def _HtmlComment; end + + # HtmlOpenAnchor = "<" Spnl ("a" | "A") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#2863 + def _HtmlOpenAnchor; end + + # HtmlTag = "<" Spnl "/"? AlphanumericAscii+ Spnl HtmlAttribute* "/"? Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#14462 + def _HtmlTag; end + + # HtmlUnclosed = "<" Spnl HtmlUnclosedType Spnl HtmlAttribute* Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#8828 + def _HtmlUnclosed; end + + # HtmlUnclosedType = ("HR" | "hr") + # + # source://rdoc//rdoc/markdown.rb#8878 + def _HtmlUnclosedType; end + + # Image = "!" (ExplicitLink | ReferenceLink):a { "rdoc-image:#{a[/\[(.*)\]/, 1]}" } + # + # source://rdoc//rdoc/markdown.rb#10972 + def _Image; end + + # InStyleTags = StyleOpen (!StyleClose .)* StyleClose + # + # source://rdoc//rdoc/markdown.rb#9281 + def _InStyleTags; end + + # Indent = /\t| / + # + # source://rdoc//rdoc/markdown.rb#14860 + def _Indent; end + + # IndentedLine = Indent Line + # + # source://rdoc//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 + 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 + def _InlineNote; end + + # Inlines = (!@Endline Inline:i { i } | @Endline:c !(&{ github? } Ticks3 /[^`\n]*$/) &Inline { c })+:chunks @Endline? { chunks } + # + # source://rdoc//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 + def _Label; end + + # Line = @RawLine:a { a } + # + # source://rdoc//rdoc/markdown.rb#14938 + def _Line; end + + # LineBreak = " " @NormalEndline { RDoc::Markup::HardBreak.new } + # + # source://rdoc//rdoc/markdown.rb#10042 + def _LineBreak; end + + # Link = (ExplicitLink | ReferenceLink | AutoLink) + # + # source://rdoc//rdoc/markdown.rb#11011 + def _Link; end + + # ListBlock = !@BlankLine Line:a ListBlockLine*:c { [a, *c] } + # + # source://rdoc//rdoc/markdown.rb#2548 + def _ListBlock; end + + # ListBlockLine = !@BlankLine !(Indent? (Bullet | Enumerator)) !HorizontalRule OptionallyIndentedLine + # + # source://rdoc//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 + 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 + 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 + def _ListItemTight; end + + # ListLoose = @StartList:a (ListItem:b @BlankLine* { a << b })+ { a } + # + # source://rdoc//rdoc/markdown.rb#2304 + def _ListLoose; end + + # ListTight = ListItemTight+:a @BlankLine* !(Bullet | Enumerator) { a } + # + # source://rdoc//rdoc/markdown.rb#2239 + def _ListTight; end + + # Newline = %literals.Newline + # + # source://rdoc//rdoc/markdown.rb#14726 + def _Newline; end + + # NonblankIndentedLine = !@BlankLine IndentedLine + # + # source://rdoc//rdoc/markdown.rb#1821 + def _NonblankIndentedLine; end + + # NonindentSpace = / {0,3}/ + # + # source://rdoc//rdoc/markdown.rb#14853 + def _NonindentSpace; end + + # Nonspacechar = !@Spacechar !@Newline . + # + # source://rdoc//rdoc/markdown.rb#14552 + def _Nonspacechar; end + + # NormalChar = !(@SpecialChar | @Spacechar | @Newline) . + # + # source://rdoc//rdoc/markdown.rb#14653 + def _NormalChar; end + + # NormalEndline = @Sp @Newline !@BlankLine !">" !AtxStart !(Line /={1,}|-{1,}/ @Newline) { "\n" } + # + # source://rdoc//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 + def _Note; end + + # NoteReference = &{ notes? } RawNoteReference:ref { note_for ref } + # + # source://rdoc//rdoc/markdown.rb#15207 + def _NoteReference; end + + # Notes = (Note | SkipBlock)* + # + # source://rdoc//rdoc/markdown.rb#15538 + def _Notes; end + + # OptionallyIndentedLine = Indent? Line + # + # source://rdoc//rdoc/markdown.rb#14888 + def _OptionallyIndentedLine; end + + # OrderedList = &Enumerator (ListTight | ListLoose):a { RDoc::Markup::List.new(:NUMBER, *a) } + # + # source://rdoc//rdoc/markdown.rb#2752 + def _OrderedList; end + + # Para = @NonindentSpace Inlines:a @BlankLine+ { paragraph a } + # + # source://rdoc//rdoc/markdown.rb#1014 + def _Para; end + + # Plain = Inlines:a { paragraph a } + # + # source://rdoc//rdoc/markdown.rb#1057 + def _Plain; end + + # Quoted = ("\"" (!"\"" .)* "\"" | "'" (!"'" .)* "'") + # + # source://rdoc//rdoc/markdown.rb#14175 + def _Quoted; end + + # RawHtml = < (HtmlComment | HtmlBlockScript | HtmlTag) > { if html? then text else '' end } + # + # source://rdoc//rdoc/markdown.rb#14108 + def _RawHtml; end + + # RawLine = (< /[^\r\n]*/ @Newline > | < .+ > @Eof) { text } + # + # source://rdoc//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 + def _RawNoteBlock; end + + # RawNoteReference = "[^" < (!@Newline !"]" .)+ > "]" { text } + # + # source://rdoc//rdoc/markdown.rb#15237 + def _RawNoteReference; end + + # RefSrc = < Nonspacechar+ > { text } + # + # source://rdoc//rdoc/markdown.rb#12026 + def _RefSrc; end + + # RefTitle = (RefTitleSingle | RefTitleDouble | RefTitleParens | EmptyTitle) + # + # source://rdoc//rdoc/markdown.rb#12062 + def _RefTitle; end + + # RefTitleDouble = Spnl "\"" < (!("\"" @Sp @Newline | @Newline) .)* > "\"" { text } + # + # source://rdoc//rdoc/markdown.rb#12185 + def _RefTitleDouble; end + + # RefTitleParens = Spnl "(" < (!(")" @Sp @Newline | @Newline) .)* > ")" { text } + # + # source://rdoc//rdoc/markdown.rb#12277 + def _RefTitleParens; end + + # RefTitleSingle = Spnl "'" < (!("'" @Sp @Newline | @Newline) .)* > "'" { text } + # + # source://rdoc//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 + def _Reference; end + + # ReferenceLink = (ReferenceLinkDouble | ReferenceLinkSingle) + # + # source://rdoc//rdoc/markdown.rb#11032 + def _ReferenceLink; end + + # ReferenceLinkDouble = Label:content < Spnl > !"[]" Label:label { link_to content, label, text } + # + # source://rdoc//rdoc/markdown.rb#11050 + def _ReferenceLinkDouble; end + + # ReferenceLinkSingle = Label:content < (Spnl "[]")? > { link_to content, content, text } + # + # source://rdoc//rdoc/markdown.rb#11096 + def _ReferenceLinkSingle; end + + # References = (Reference | SkipBlock)* + # + # source://rdoc//rdoc/markdown.rb#12369 + def _References; end + + # SetextBottom1 = /={1,}/ @Newline + # + # source://rdoc//rdoc/markdown.rb#1262 + def _SetextBottom1; end + + # SetextBottom2 = /-{1,}/ @Newline + # + # source://rdoc//rdoc/markdown.rb#1283 + def _SetextBottom2; end + + # SetextHeading = (SetextHeading1 | SetextHeading2) + # + # source://rdoc//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 + 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 + def _SetextHeading2; end + + # SkipBlock = (HtmlBlock | (!"#" !SetextBottom1 !SetextBottom2 !@BlankLine @RawLine)+ @BlankLine* | @BlankLine+ | @RawLine) + # + # source://rdoc//rdoc/markdown.rb#15040 + def _SkipBlock; end + + # Source = ("<" < SourceContents > ">" | < SourceContents >) { text } + # + # source://rdoc//rdoc/markdown.rb#11206 + def _Source; end + + # SourceContents = ((!"(" !")" !">" Nonspacechar)+ | "(" SourceContents ")")* + # + # source://rdoc//rdoc/markdown.rb#11266 + def _SourceContents; end + + # Sp = @Spacechar* + # + # source://rdoc//rdoc/markdown.rb#14584 + def _Sp; end + + # Space = @Spacechar+ { " " } + # + # source://rdoc//rdoc/markdown.rb#9646 + def _Space; end + + # Spacechar = %literals.Spacechar + # + # source://rdoc//rdoc/markdown.rb#14733 + def _Spacechar; end + + # SpecialChar = (/[~*_`&\[\]() { text } | < @Spacechar /\*+/ &@Spacechar > { text }) + # + # source://rdoc//rdoc/markdown.rb#10129 + def _StarLine; end + + # StartList = &. { [] } + # + # source://rdoc//rdoc/markdown.rb#14914 + def _StartList; end + + # Str = @StartList:a < @NormalChar+ > { a = text } (StrChunk:c { a << c })* { a } + # + # source://rdoc//rdoc/markdown.rb#9678 + def _Str; end + + # StrChunk = < (@NormalChar | /_+/ &Alphanumeric)+ > { text } + # + # source://rdoc//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 + def _Strike; end + + # Strong = (StrongStar | StrongUl) + # + # source://rdoc//rdoc/markdown.rb#10635 + def _Strong; end + + # StrongStar = "**" !@Whitespace @StartList:a (!"**" Inline:b { a << b })+ "**" { strong a.join } + # + # source://rdoc//rdoc/markdown.rb#10653 + def _StrongStar; end + + # StrongUl = "__" !@Whitespace @StartList:a (!"__" Inline:b { a << b })+ "__" { strong a.join } + # + # source://rdoc//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 + def _StyleBlock; end + + # StyleClose = "<" Spnl "/" ("style" | "STYLE") Spnl ">" + # + # source://rdoc//rdoc/markdown.rb#9229 + def _StyleClose; end + + # StyleOpen = "<" Spnl ("style" | "STYLE") Spnl HtmlAttribute* ">" + # + # source://rdoc//rdoc/markdown.rb#9173 + def _StyleOpen; end + + # Symbol = < @SpecialChar > { text } + # + # source://rdoc//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 + def _Table; end + + # TableAlign = < /:?-+:?/ > @Sp { text.start_with?(":") ? (text.end_with?(":") ? :center : :left) : (text.end_with?(":") ? :right : nil) } + # + # source://rdoc//rdoc/markdown.rb#16304 + def _TableAlign; end + + # TableAlign2 = "|" @Sp TableAlign + # + # source://rdoc//rdoc/markdown.rb#16278 + def _TableAlign2; end + + # TableHead = TableItem2+:items "|"? @Newline { items } + # + # source://rdoc//rdoc/markdown.rb#15993 + def _TableHead; end + + # TableItem = < /(?:\\.|[^|\n])+/ > { text.strip.gsub(/\\(.)/, '\1') } + # + # source://rdoc//rdoc/markdown.rb#16159 + def _TableItem; end + + # TableItem2 = "|" TableItem + # + # source://rdoc//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 + def _TableLine; end + + # TableRow = ((TableItem:item1 TableItem2*:items { [item1, *items] }):row | TableItem2+:row) "|"? @Newline { row } + # + # source://rdoc//rdoc/markdown.rb#16045 + def _TableRow; end + + # TerminalEndline = @Sp @Newline @Eof + # + # source://rdoc//rdoc/markdown.rb#10016 + def _TerminalEndline; end + + # Ticks1 = "`" !"`" + # + # source://rdoc//rdoc/markdown.rb#12391 + def _Ticks1; end + + # Ticks2 = "``" !"`" + # + # source://rdoc//rdoc/markdown.rb#12415 + def _Ticks2; end + + # Ticks3 = "```" !"`" + # + # source://rdoc//rdoc/markdown.rb#12439 + def _Ticks3; end + + # Ticks4 = "````" !"`" + # + # source://rdoc//rdoc/markdown.rb#12463 + def _Ticks4; end + + # Ticks5 = "`````" !"`" + # + # source://rdoc//rdoc/markdown.rb#12487 + def _Ticks5; end + + # Title = (TitleSingle | TitleDouble | ""):a { a } + # + # source://rdoc//rdoc/markdown.rb#11383 + def _Title; end + + # TitleDouble = "\"" (!("\"" @Sp (")" | @Newline)) .)* "\"" + # + # source://rdoc//rdoc/markdown.rb#11497 + def _TitleDouble; end + + # TitleSingle = "'" (!("'" @Sp (")" | @Newline)) .)* "'" + # + # source://rdoc//rdoc/markdown.rb#11420 + def _TitleSingle; end + + # UlLine = (< /_{4,}/ > { text } | < @Spacechar /_+/ &@Spacechar > { text }) + # + # source://rdoc//rdoc/markdown.rb#10206 + def _UlLine; end + + # UlOrStarLine = (UlLine | StarLine):a { a } + # + # source://rdoc//rdoc/markdown.rb#10095 + def _UlOrStarLine; end + + # Verbatim = VerbatimChunk+:a { RDoc::Markup::Verbatim.new(*a.flatten) } + # + # source://rdoc//rdoc/markdown.rb#1895 + def _Verbatim; end + + # VerbatimChunk = @BlankLine*:a NonblankIndentedLine+:b { a.concat b } + # + # source://rdoc//rdoc/markdown.rb#1845 + def _VerbatimChunk; end + + # Whitespace = (@Spacechar | @Newline) + # + # source://rdoc//rdoc/markdown.rb#10301 + def _Whitespace; end + + # root = Doc + # + # source://rdoc//rdoc/markdown.rb#892 + def _root; end + + # source://rdoc//rdoc/markdown.rb#502 + def apply(rule); end + + # source://rdoc//rdoc/markdown.rb#468 + def apply_with_args(rule, *args); end + + # source://rdoc//rdoc/markdown.rb#610 + def break_on_newline=(enable); end + + # source://rdoc//rdoc/markdown.rb#606 + def break_on_newline?; end + + # source://rdoc//rdoc/markdown.rb#610 + def css=(enable); end + + # source://rdoc//rdoc/markdown.rb#606 + def css?; end + + # source://rdoc//rdoc/markdown.rb#250 + def current_character(target = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown.rb#211 + def current_column(target = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown.rb#234 + def current_line(target = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown.rb#259 + def current_pos_info(target = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown.rb#610 + def definition_lists=(enable); end + + # source://rdoc//rdoc/markdown.rb#606 + def definition_lists?; end + + # Wraps `text` in emphasis for rdoc inline formatting + # + # source://rdoc//rdoc/markdown.rb#683 + def emphasis(text); end + + # :category: Extensions + # + # Enables or disables the extension with `name` + # + # source://rdoc//rdoc/markdown.rb#705 + def extension(name, enable); end + + # :category: Extensions + # + # Is the extension `name` enabled? + # + # @return [Boolean] + # + # source://rdoc//rdoc/markdown.rb#696 + def extension?(name); end + + # source://rdoc//rdoc/markdown.rb#449 + def external_invoke(other, rule, *args); end + + # Returns the value of attribute failed_rule. + # + # source://rdoc//rdoc/markdown.rb#371 + def failed_rule; end + + # Returns the value of attribute failing_rule_offset. + # + # source://rdoc//rdoc/markdown.rb#208 + def failing_rule_offset; end + + # source://rdoc//rdoc/markdown.rb#318 + def failure_caret; end + + # source://rdoc//rdoc/markdown.rb#323 + def failure_character; end + + # source://rdoc//rdoc/markdown.rb#306 + def failure_info; end + + # source://rdoc//rdoc/markdown.rb#327 + def failure_oneline; end + + # source://rdoc//rdoc/markdown.rb#393 + def get_byte; end + + # source://rdoc//rdoc/markdown.rb#271 + def get_line(no); end + + # source://rdoc//rdoc/markdown.rb#285 + def get_text(start); end + + # source://rdoc//rdoc/markdown.rb#610 + def github=(enable); end + + # source://rdoc//rdoc/markdown.rb#606 + def github?; end + + # source://rdoc//rdoc/markdown.rb#535 + def grow_lr(rule, args, start_pos, m); end + + # source://rdoc//rdoc/markdown.rb#610 + def html=(enable); end + + # source://rdoc//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 + def inner_parse(text); end + + # source://rdoc//rdoc/markdown.rb#267 + def lines; end + + # Finds a link reference for `label` and creates a new link to it with + # `content` as the link text. If `label` was not encountered in the + # reference-gathering parser pass the label and content are reconstructed + # with the linking `text` (usually whitespace). + # + # @raise [ParseError] + # + # source://rdoc//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 + def list_item_from(unparsed); end + + # source://rdoc//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 + 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 + def note_for(ref); end + + # source://rdoc//rdoc/markdown.rb#610 + def notes=(enable); end + + # source://rdoc//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 + def paragraph(parts); end + + # Parses `markdown` into an RDoc::Document + # + # source://rdoc//rdoc/markdown.rb#808 + def parse(markdown); end + + # The internal kpeg parse method + # + # source://rdoc//rdoc/markdown.rb#414 + def peg_parse(rule = T.unsafe(nil)); end + + # Returns the value of attribute pos. + # + # source://rdoc//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 + def pos=(_arg0); end + + # source://rdoc//rdoc/markdown.rb#221 + def position_line_offsets; end + + # @raise [ParseError] + # + # source://rdoc//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 + def reference(label, link); end + + # Returns the value of attribute result. + # + # source://rdoc//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 + def result=(_arg0); end + + # source://rdoc//rdoc/markdown.rb#383 + def scan(reg); end + + # source://rdoc//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 + def set_string(string, pos); end + + # :stopdoc: + # + # source://rdoc//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 + def setup_parser(str, debug = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown.rb#345 + def show_error(io = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown.rb#297 + def show_pos; end + + # Wraps `text` in strike markup for rdoc inline formatting + # + # source://rdoc//rdoc/markdown.rb#877 + def strike(text); end + + # source://rdoc//rdoc/markdown.rb#610 + def strike=(enable); end + + # source://rdoc//rdoc/markdown.rb#606 + def strike?; end + + # Returns the value of attribute string. + # + # source://rdoc//rdoc/markdown.rb#207 + def string; end + + # Wraps `text` in strong markup for rdoc inline formatting + # + # source://rdoc//rdoc/markdown.rb#866 + def strong(text); end + + private + + # This is distinct from setup_parser so that a standalone parser + # can redefine #initialize and still have access to the proper + # parser setup code. + # TODO remove when kpeg 0.10 is released + # + # @return [Markdown] a new instance of Markdown + # + # source://rdoc//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 + def extension(name); end + + # Parses the `markdown` document into an RDoc::Document using the default + # extensions. + # + # source://rdoc//rdoc/markdown.rb#656 + def parse(markdown); end + + # source://rdoc//rdoc/markdown.rb#566 + def rule_info(name, rendered); end + end +end + +class RDoc::Markdown::KpegPosInfo < ::Struct + # Returns the value of attribute char + # + # @return [Object] the current value of char + def char; end + + # Sets the attribute char + # + # @param value [Object] the value to set the attribute char to. + # @return [Object] the newly set value + def char=(_); end + + # Returns the value of attribute col + # + # @return [Object] the current value of col + def col; end + + # Sets the attribute col + # + # @param value [Object] the value to set the attribute col to. + # @return [Object] the newly set value + def col=(_); end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + def line; end + + # Sets the attribute line + # + # @param value [Object] the value to set the attribute line to. + # @return [Object] the newly set value + def line=(_); end + + # Returns the value of attribute lno + # + # @return [Object] the current value of lno + def lno; end + + # Sets the attribute lno + # + # @param value [Object] the value to set the attribute lno to. + # @return [Object] the newly set value + def lno=(_); end + + # Returns the value of attribute pos + # + # @return [Object] the current value of pos + def pos; end + + # Sets the attribute pos + # + # @param value [Object] the value to set the attribute pos to. + # @return [Object] the newly set value + def pos=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# This set of literals is for Ruby 1.9 regular expressions and gives full +# unicode support. +# +# Unlike peg-markdown, this set of literals recognizes Unicode alphanumeric +# characters, newlines and spaces. +class RDoc::Markdown::Literals + # This is distinct from setup_parser so that a standalone parser + # can redefine #initialize and still have access to the proper + # parser setup code. + # + # @return [Literals] a new instance of Literals + # + # source://rdoc//rdoc/markdown/literals.rb#17 + def initialize(str, debug = T.unsafe(nil)); end + + # Alphanumeric = /\p{Word}/ + # + # source://rdoc//rdoc/markdown/literals.rb#405 + def _Alphanumeric; end + + # AlphanumericAscii = /[A-Za-z0-9]/ + # + # source://rdoc//rdoc/markdown/literals.rb#412 + def _AlphanumericAscii; end + + # BOM = "uFEFF" + # + # source://rdoc//rdoc/markdown/literals.rb#419 + def _BOM; end + + # Newline = /\n|\r\n?|\p{Zl}|\p{Zp}/ + # + # source://rdoc//rdoc/markdown/literals.rb#426 + def _Newline; end + + # NonAlphanumeric = /\p{^Word}/ + # + # source://rdoc//rdoc/markdown/literals.rb#433 + def _NonAlphanumeric; end + + # Spacechar = /\t|\p{Zs}/ + # + # source://rdoc//rdoc/markdown/literals.rb#440 + def _Spacechar; end + + # source://rdoc//rdoc/markdown/literals.rb#331 + def apply(rule); end + + # source://rdoc//rdoc/markdown/literals.rb#297 + def apply_with_args(rule, *args); end + + # source://rdoc//rdoc/markdown/literals.rb#79 + def current_character(target = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown/literals.rb#40 + def current_column(target = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown/literals.rb#63 + def current_line(target = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown/literals.rb#88 + def current_pos_info(target = T.unsafe(nil)); end + + # source://rdoc//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 + def failed_rule; end + + # Returns the value of attribute failing_rule_offset. + # + # source://rdoc//rdoc/markdown/literals.rb#37 + def failing_rule_offset; end + + # source://rdoc//rdoc/markdown/literals.rb#147 + def failure_caret; end + + # source://rdoc//rdoc/markdown/literals.rb#152 + def failure_character; end + + # source://rdoc//rdoc/markdown/literals.rb#135 + def failure_info; end + + # source://rdoc//rdoc/markdown/literals.rb#156 + def failure_oneline; end + + # source://rdoc//rdoc/markdown/literals.rb#222 + def get_byte; end + + # source://rdoc//rdoc/markdown/literals.rb#100 + def get_line(no); end + + # source://rdoc//rdoc/markdown/literals.rb#114 + def get_text(start); end + + # source://rdoc//rdoc/markdown/literals.rb#364 + def grow_lr(rule, args, start_pos, m); end + + # source://rdoc//rdoc/markdown/literals.rb#96 + def lines; end + + # source://rdoc//rdoc/markdown/literals.rb#202 + def match_string(str); end + + # source://rdoc//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 + def pos; end + + # Sets the attribute pos + # + # @param value the value to set the attribute pos to. + # + # source://rdoc//rdoc/markdown/literals.rb#38 + def pos=(_arg0); end + + # source://rdoc//rdoc/markdown/literals.rb#50 + def position_line_offsets; end + + # @raise [ParseError] + # + # source://rdoc//rdoc/markdown/literals.rb#170 + def raise_error; end + + # Returns the value of attribute result. + # + # source://rdoc//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 + def result=(_arg0); end + + # source://rdoc//rdoc/markdown/literals.rb#212 + def scan(reg); end + + # source://rdoc//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 + def set_string(string, pos); end + + # :startdoc: + # :stopdoc: + # + # source://rdoc//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 + def setup_parser(str, debug = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown/literals.rb#174 + def show_error(io = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown/literals.rb#126 + def show_pos; end + + # Returns the value of attribute string. + # + # source://rdoc//rdoc/markdown/literals.rb#36 + def string; end + + class << self + # source://rdoc//rdoc/markdown/literals.rb#395 + def rule_info(name, rendered); end + end +end + +class RDoc::Markdown::Literals::KpegPosInfo < ::Struct + # Returns the value of attribute char + # + # @return [Object] the current value of char + def char; end + + # Sets the attribute char + # + # @param value [Object] the value to set the attribute char to. + # @return [Object] the newly set value + def char=(_); end + + # Returns the value of attribute col + # + # @return [Object] the current value of col + def col; end + + # Sets the attribute col + # + # @param value [Object] the value to set the attribute col to. + # @return [Object] the newly set value + def col=(_); end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + def line; end + + # Sets the attribute line + # + # @param value [Object] the value to set the attribute line to. + # @return [Object] the newly set value + def line=(_); end + + # Returns the value of attribute lno + # + # @return [Object] the current value of lno + def lno; end + + # Sets the attribute lno + # + # @param value [Object] the value to set the attribute lno to. + # @return [Object] the newly set value + def lno=(_); end + + # Returns the value of attribute pos + # + # @return [Object] the current value of pos + def pos; end + + # Sets the attribute pos + # + # @param value [Object] the value to set the attribute pos to. + # @return [Object] the newly set value + def pos=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +class RDoc::Markdown::Literals::MemoEntry + # @return [MemoEntry] a new instance of MemoEntry + # + # source://rdoc//rdoc/markdown/literals.rb#258 + def initialize(ans, pos); end + + # Returns the value of attribute ans. + # + # source://rdoc//rdoc/markdown/literals.rb#266 + def ans; end + + # Returns the value of attribute left_rec. + # + # source://rdoc//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 + def left_rec=(_arg0); end + + # source://rdoc//rdoc/markdown/literals.rb#269 + def move!(ans, pos, result); end + + # Returns the value of attribute pos. + # + # source://rdoc//rdoc/markdown/literals.rb#266 + def pos; end + + # Returns the value of attribute result. + # + # source://rdoc//rdoc/markdown/literals.rb#266 + def result; end + + # Returns the value of attribute set. + # + # source://rdoc//rdoc/markdown/literals.rb#266 + def set; end +end + +class RDoc::Markdown::Literals::RuleInfo + # @return [RuleInfo] a new instance of RuleInfo + # + # source://rdoc//rdoc/markdown/literals.rb#387 + def initialize(name, rendered); end + + # Returns the value of attribute name. + # + # source://rdoc//rdoc/markdown/literals.rb#392 + def name; end + + # Returns the value of attribute rendered. + # + # source://rdoc//rdoc/markdown/literals.rb#392 + def rendered; end +end + +class RDoc::Markdown::MemoEntry + # @return [MemoEntry] a new instance of MemoEntry + # + # source://rdoc//rdoc/markdown.rb#429 + def initialize(ans, pos); end + + # Returns the value of attribute ans. + # + # source://rdoc//rdoc/markdown.rb#437 + def ans; end + + # Returns the value of attribute left_rec. + # + # source://rdoc//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 + def left_rec=(_arg0); end + + # source://rdoc//rdoc/markdown.rb#440 + def move!(ans, pos, result); end + + # Returns the value of attribute pos. + # + # source://rdoc//rdoc/markdown.rb#437 + def pos; end + + # Returns the value of attribute result. + # + # source://rdoc//rdoc/markdown.rb#437 + def result; end + + # Returns the value of attribute set. + # + # source://rdoc//rdoc/markdown.rb#437 + def set; end +end + +class RDoc::Markdown::RuleInfo + # @return [RuleInfo] a new instance of RuleInfo + # + # source://rdoc//rdoc/markdown.rb#558 + def initialize(name, rendered); end + + # Returns the value of attribute name. + # + # source://rdoc//rdoc/markdown.rb#563 + def name; end + + # Returns the value of attribute rendered. + # + # source://rdoc//rdoc/markdown.rb#563 + def rendered; end +end + +class RDoc::Markup + # Take a block of text and use various heuristics to determine its + # structure (paragraphs, lists, and so on). Invoke an event handler as we + # identify significant chunks. + # + # @return [Markup] a new instance of Markup + # + # source://rdoc//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 + def add_html(tag, name); end + + # Add to other inline sequences. For example, we could add WikiWords using + # something like: + # + # parser.add_regexp_handling(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD) + # + # Each wiki word will be presented to the output formatter. + # + # source://rdoc//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 + def add_word_pair(start, stop, name); end + + # An AttributeManager which handles inline markup. + # + # source://rdoc//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 + def convert(input, formatter); end + + class << self + # Parses +str+ into an RDoc::Markup::Document. + # + # source://rdoc//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. +class RDoc::Markup::AttrChanger < ::Struct + # source://rdoc//rdoc/markup/attr_changer.rb#18 + def inspect; end + + # source://rdoc//rdoc/markup/attr_changer.rb#14 + def to_s; end +end + +# An array of attributes which parallels the characters in a string. +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 + def initialize(length, exclusive); end + + # Accesses flags for character +n+ + # + # source://rdoc//rdoc/markup/attr_span.rb#31 + def [](n); end + + # Toggles +bits+ from +start+ to +length+ + # + # source://rdoc//rdoc/markup/attr_span.rb#17 + def set_attrs(start, length, bits); end +end + +# Manages changes of attributes in a block of text +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 + def initialize; end + + # Adds a markup class with +name+ for words surrounded by HTML tag +tag+. + # To process emphasis tags: + # + # am.add_html 'em', :EM + # + # source://rdoc//rdoc/markup/attribute_manager.rb#286 + def add_html(tag, name, exclusive = T.unsafe(nil)); end + + # Adds a regexp handling for +pattern+ with +name+. A simple URL handler + # would be: + # + # @am.add_regexp_handling(/((https?:)\S+\w)/, :HYPERLINK) + # + # source://rdoc//rdoc/markup/attribute_manager.rb#298 + def add_regexp_handling(pattern, name, exclusive = T.unsafe(nil)); end + + # Adds a markup class with +name+ for words wrapped in the +start+ and + # +stop+ character. To make words wrapped with "*" bold: + # + # am.add_word_pair '*', '*', :BOLD + # + # @raise [ArgumentError] + # + # source://rdoc//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 + def attribute(turn_on, turn_off); end + + # The attributes enabled for this markup object. + # + # source://rdoc//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 + 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 + 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 + def convert_attrs(str, attrs, exclusive = T.unsafe(nil)); end + + # source://rdoc//rdoc/markup/attribute_manager.rb#160 + def convert_attrs_matching_word_pairs(str, attrs, exclusive); end + + # source://rdoc//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 + 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 + 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 + 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 + def display_attributes; end + + # @return [Boolean] + # + # source://rdoc//rdoc/markup/attribute_manager.rb#142 + def exclusive?(attr); end + + # A bits of exclusive maps + # + # source://rdoc//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 + def flow(str); end + + # This maps HTML tags to the corresponding attribute char + # + # source://rdoc//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 + 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 + 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 + 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 + def regexp_handlings; end + + # Splits the string into chunks by attribute change + # + # source://rdoc//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 + 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 + def word_pair_map; end +end + +# source://rdoc//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 +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. +class RDoc::Markup::Attributes + # Creates a new attributes set. + # + # @return [Attributes] a new instance of Attributes + # + # source://rdoc//rdoc/markup/attributes.rb#16 + def initialize; end + + # Returns a string representation of +bitmap+ + # + # source://rdoc//rdoc/markup/attributes.rb#46 + def as_string(bitmap); end + + # Returns a unique bit for +name+ + # + # source://rdoc//rdoc/markup/attributes.rb#29 + def bitmap_for(name); end + + # yields each attribute name in +bitmap+ + # + # source://rdoc//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 + def regexp_handling; end +end + +# An empty line. This class is a singleton. +class RDoc::Markup::BlankLine + # Calls #accept_blank_line on +visitor+ + # + # source://rdoc//rdoc/markup/blank_line.rb#19 + def accept(visitor); end + + # source://rdoc//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 + def new; end + end +end + +# A quoted section which contains markup items. +class RDoc::Markup::BlockQuote < ::RDoc::Markup::Raw + # Calls #accept_block_quote on +visitor+ + # + # source://rdoc//rdoc/markup/block_quote.rb#10 + def accept(visitor); end +end + +# A Document containing lists, headings, paragraphs, etc. +class RDoc::Markup::Document + include ::Enumerable + + # Creates a new Document with +parts+ + # + # @return [Document] a new instance of Document + # + # source://rdoc//rdoc/markup/document.rb#29 + def initialize(*parts); end + + # Appends +part+ to the document + # + # source://rdoc//rdoc/markup/document.rb#40 + def <<(part); end + + # source://rdoc//rdoc/markup/document.rb#56 + def ==(other); end + + # Runs this document and all its #items through +visitor+ + # + # source://rdoc//rdoc/markup/document.rb#65 + def accept(visitor); end + + # Concatenates the given +parts+ onto the document + # + # source://rdoc//rdoc/markup/document.rb#76 + def concat(parts); end + + # Enumerator for the parts of this document + # + # source://rdoc//rdoc/markup/document.rb#83 + def each(&block); end + + # Does this document have no parts? + # + # @return [Boolean] + # + # source://rdoc//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 + def file; end + + # The file this Document was created from. + # + # source://rdoc//rdoc/markup/document.rb#97 + def file=(location); end + + # When this is a collection of documents (#file is not set and this document + # contains only other documents as its direct children) #merge replaces + # documents in this class with documents from +other+ when the file matches + # and adds documents from +other+ when the files do not. + # + # The information in +other+ is preferred over the receiver + # + # source://rdoc//rdoc/markup/document.rb#114 + def merge(other); end + + # Does this Document contain other Documents? + # + # @return [Boolean] + # + # source://rdoc//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 + 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 + def omit_headings_below=(_arg0); end + + # The parts of the Document + # + # source://rdoc//rdoc/markup/document.rb#24 + def parts; end + + # source://rdoc//rdoc/markup/document.rb#138 + def pretty_print(q); end + + # Appends +parts+ to the document + # + # source://rdoc//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 + def table_of_contents; end +end + +# Base class for RDoc markup formatters +# +# Formatters are a visitor that converts an RDoc::Markup tree (from a comment) +# into some kind of output. RDoc ships with formatters for converting back to +# rdoc, ANSI text, HTML, a Table of Contents and other formats. +# +# If you'd like to write your own Formatter use +# RDoc::Markup::FormatterTestCase. If you're writing a text-output formatter +# use RDoc::Markup::TextFormatterTestCase which provides extra test cases. +class RDoc::Markup::Formatter + # Creates a new Formatter + # + # @return [Formatter] a new instance of Formatter + # + # source://rdoc//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 + def accept_document(document); end + + # Adds a regexp handling for links of the form rdoc-...: + # + # source://rdoc//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 + 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 + def add_tag(name, start, stop); end + + # Allows +tag+ to be decorated with additional information. + # + # source://rdoc//rdoc/markup/formatter.rb#113 + def annotate(tag); end + + # Marks up +content+ + # + # source://rdoc//rdoc/markup/formatter.rb#120 + def convert(content); end + + # Converts flow items +flow+ + # + # source://rdoc//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 + def convert_regexp_handling(target); end + + # Converts a string to be fancier if desired + # + # source://rdoc//rdoc/markup/formatter.rb#176 + def convert_string(string); end + + # Use ignore in your subclass to ignore the content of a node. + # + # ## + # # We don't support raw nodes in ToNoRaw + # + # alias accept_raw ignore + # + # source://rdoc//rdoc/markup/formatter.rb#188 + def ignore(*node); end + + # Are we currently inside tt tags? + # + # @return [Boolean] + # + # source://rdoc//rdoc/markup/formatter.rb#194 + def in_tt?; end + + # Turns off tags for +item+ on +res+ + # + # source://rdoc//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 + 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 + def parse_url(url); end + + # Is +tag+ a tt tag? + # + # @return [Boolean] + # + # source://rdoc//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 + def gen_relative_url(path, target); end + end +end + +# A hard-break in the middle of a paragraph. +class RDoc::Markup::HardBreak + # source://rdoc//rdoc/markup/hard_break.rb#23 + def ==(other); end + + # Calls #accept_hard_break on +visitor+ + # + # source://rdoc//rdoc/markup/hard_break.rb#19 + def accept(visitor); end + + # source://rdoc//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 + def new; end + end +end + +class RDoc::Markup::Heading < ::Struct + # source://rdoc//rdoc/markup/heading.rb#40 + def accept(visitor); end + + # source://rdoc//rdoc/markup/heading.rb#47 + def aref; end + + # source://rdoc//rdoc/markup/heading.rb#55 + def label(context = T.unsafe(nil)); end + + # source://rdoc//rdoc/markup/heading.rb#68 + def plain_html; end + + # source://rdoc//rdoc/markup/heading.rb#72 + def pretty_print(q); end + + class << self + # source://rdoc//rdoc/markup/heading.rb#22 + def to_html; end + + # source://rdoc//rdoc/markup/heading.rb#14 + def to_label; end + end +end + +# A file included at generation time. Objects of this class are created by +# RDoc::RD for an extension-less include. +# +# This implementation in incomplete. +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 + def initialize(file, include_path); end + + # source://rdoc//rdoc/markup/include.rb#28 + def ==(other); end + + # The filename to be included, without extension + # + # source://rdoc//rdoc/markup/include.rb#13 + def file; end + + # Directories to search for #file + # + # source://rdoc//rdoc/markup/include.rb#18 + def include_path; end + + # source://rdoc//rdoc/markup/include.rb#33 + def pretty_print(q); end +end + +# An Indented Paragraph of text +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 + def initialize(indent, *parts); end + + # source://rdoc//rdoc/markup/indented_paragraph.rb#22 + def ==(other); end + + # Calls #accept_indented_paragraph on +visitor+ + # + # source://rdoc//rdoc/markup/indented_paragraph.rb#29 + def accept(visitor); end + + # The indent in number of spaces + # + # source://rdoc//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 + def text(hard_break = T.unsafe(nil)); end +end + +# A List is a homogeneous set of ListItems. +# +# The supported list types include: +# +# :BULLET:: +# An unordered list +# :LABEL:: +# An unordered definition list, but using an alternate RDoc::Markup syntax +# :LALPHA:: +# An ordered list using increasing lowercase English letters +# :NOTE:: +# An unordered definition list +# :NUMBER:: +# An ordered list using increasing Arabic numerals +# :UALPHA:: +# An ordered list using increasing uppercase English letters +# +# Definition lists behave like HTML definition lists. Each list item can +# describe multiple terms. See RDoc::Markup::ListItem for how labels and +# definition are stored as list items. +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 + def initialize(type = T.unsafe(nil), *items); end + + # Appends +item+ to the list + # + # source://rdoc//rdoc/markup/list.rb#49 + def <<(item); end + + # source://rdoc//rdoc/markup/list.rb#53 + def ==(other); end + + # Runs this list and all its #items through +visitor+ + # + # source://rdoc//rdoc/markup/list.rb#62 + def accept(visitor); end + + # Is the list empty? + # + # @return [Boolean] + # + # source://rdoc//rdoc/markup/list.rb#75 + def empty?; end + + # Items in the list + # + # source://rdoc//rdoc/markup/list.rb#34 + def items; end + + # Returns the last item in the list + # + # source://rdoc//rdoc/markup/list.rb#82 + def last; end + + # source://rdoc//rdoc/markup/list.rb#86 + def pretty_print(q); end + + # Appends +items+ to the list + # + # source://rdoc//rdoc/markup/list.rb#97 + def push(*items); end + + # The list's type + # + # source://rdoc//rdoc/markup/list.rb#29 + def type; end + + # The list's type + # + # source://rdoc//rdoc/markup/list.rb#29 + def type=(_arg0); end +end + +# An item within a List that contains paragraphs, headings, etc. +# +# For BULLET, NUMBER, LALPHA and UALPHA lists, the label will always be nil. +# For NOTE and LABEL lists, the list label may contain: +# +# * a single String for a single label +# * an Array of Strings for a list item with multiple terms +# * nil for an extra description attached to a previously labeled list item +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 + def initialize(label = T.unsafe(nil), *parts); end + + # Appends +part+ to the ListItem + # + # source://rdoc//rdoc/markup/list_item.rb#36 + def <<(part); end + + # source://rdoc//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 + def accept(visitor); end + + # Is the ListItem empty? + # + # @return [Boolean] + # + # source://rdoc//rdoc/markup/list_item.rb#62 + def empty?; end + + # The label for the ListItem + # + # source://rdoc//rdoc/markup/list_item.rb#17 + def label; end + + # The label for the ListItem + # + # source://rdoc//rdoc/markup/list_item.rb#17 + def label=(_arg0); end + + # Length of parts in the ListItem + # + # source://rdoc//rdoc/markup/list_item.rb#69 + def length; end + + # Parts of the ListItem + # + # source://rdoc//rdoc/markup/list_item.rb#22 + def parts; end + + # source://rdoc//rdoc/markup/list_item.rb#73 + def pretty_print(q); end + + # Adds +parts+ to the ListItem + # + # source://rdoc//rdoc/markup/list_item.rb#95 + def push(*parts); end +end + +# A Paragraph of text +class RDoc::Markup::Paragraph < ::RDoc::Markup::Raw + # Calls #accept_paragraph on +visitor+ + # + # source://rdoc//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 + def text(hard_break = T.unsafe(nil)); end +end + +# A recursive-descent parser for RDoc markup. +# +# The parser tokenizes an input string then parses the tokens into a Document. +# Documents can be converted into output formats by writing a visitor like +# RDoc::Markup::ToHTML. +# +# The parser only handles the block-level constructs Paragraph, List, +# ListItem, Heading, Verbatim, BlankLine, Rule and BlockQuote. +# Inline markup such as \+blah\+ is handled separately by +# RDoc::Markup::AttributeManager. +# +# To see what markup the Parser implements read RDoc. To see how to use +# RDoc markup to format text in your program read RDoc::Markup. +class RDoc::Markup::Parser + include ::RDoc::Text + + # Creates a new Parser. See also ::parse + # + # @return [Parser] a new instance of Parser + # + # source://rdoc//rdoc/markup/parser.rb#79 + def initialize; end + + # Builds a Heading of +level+ + # + # source://rdoc//rdoc/markup/parser.rb#90 + def build_heading(level); end + + # Builds a List flush to +margin+ + # + # source://rdoc//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 + def build_paragraph(margin); end + + # Builds a Verbatim that is indented from +margin+. + # + # The verbatim block is shifted left (the least indented lines start in + # column 0). Each part of the verbatim is one line of text, always + # terminated by a newline. Blank lines always consist of a single newline + # character, and there is never a single newline at the end of the verbatim. + # + # source://rdoc//rdoc/markup/parser.rb#243 + def build_verbatim(margin); end + + # Enables display of debugging information + # + # source://rdoc//rdoc/markup/parser.rb#48 + def debug; end + + # Enables display of debugging information + # + # source://rdoc//rdoc/markup/parser.rb#48 + def debug=(_arg0); end + + # Pulls the next token from the stream. + # + # source://rdoc//rdoc/markup/parser.rb#327 + def get; end + + # Parses the tokens into an array of RDoc::Markup::XXX objects, + # and appends them to the passed +parent+ RDoc::Markup::YYY object. + # + # Exits at the end of the token stream, or when it encounters a token + # in a column less than +indent+ (unless it is a NEWLINE). + # + # Returns +parent+. + # + # source://rdoc//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 + def parse_text(parent, indent); end + + # Returns the next token on the stream without modifying the stream + # + # source://rdoc//rdoc/markup/parser.rb#413 + def peek_token; end + + # Creates the StringScanner + # + # source://rdoc//rdoc/markup/parser.rb#468 + def setup_scanner(input); end + + # Skips the next token if its type is +token_type+. + # + # Optionally raises an error if the next token is not of the expected type. + # + # @raise [ParseError] + # + # source://rdoc//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 + def tokenize(input); end + + # Token accessor + # + # source://rdoc//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 + def unget; end + + class << self + # Parses +str+ into a Document. + # + # Use RDoc::Markup#parse instead of this method. + # + # source://rdoc//rdoc/markup/parser.rb#60 + def parse(str); end + + # Returns a token stream for +str+, for testing + # + # source://rdoc//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 +class RDoc::Markup::Parser::MyStringScanner + # :stopdoc: + # + # @return [MyStringScanner] a new instance of MyStringScanner + # + # source://rdoc//rdoc/markup/parser.rb#425 + def initialize(input); end + + # source://rdoc//rdoc/markup/parser.rb#458 + def [](i); end + + # @return [Boolean] + # + # source://rdoc//rdoc/markup/parser.rb#450 + def eos?; end + + # source://rdoc//rdoc/markup/parser.rb#454 + def matched; end + + # source://rdoc//rdoc/markup/parser.rb#445 + def newline!; end + + # source://rdoc//rdoc/markup/parser.rb#441 + def pos; end + + # source://rdoc//rdoc/markup/parser.rb#430 + def scan(re); end + + # source://rdoc//rdoc/markup/parser.rb#436 + def unscan(s); end +end + +# Handle common directives that can occur in a block of text: +# +# \:include: filename +# +# Directives can be escaped by preceding them with a backslash. +# +# RDoc plugin authors can register additional directives to be handled by +# using RDoc::Markup::PreProcess::register. +# +# Any directive that is not built-in to RDoc (including those registered via +# plugins) will be stored in the metadata hash on the CodeObject the comment +# is attached to. See RDoc::Markup@Directives for the list of built-in +# directives. +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 + 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 + def find_include_file(name); end + + # Look for directives in the given +text+. + # + # Options that we don't handle are yielded. If the block returns false the + # directive is restored to the text. If the block returns nil or no block + # was given the directive is handled according to the registered directives. + # If a String was returned the directive is replaced with the string. + # + # If no matching directive was registered the directive is restored to the + # text. + # + # If +code_object+ is given and the directive is unknown then the + # directive's parameter is set as metadata on the +code_object+. See + # RDoc::CodeObject#metadata for details. + # + # source://rdoc//rdoc/markup/pre_process.rb#99 + def handle(text, code_object = T.unsafe(nil), &block); end + + # Performs the actions described by +directive+ and its parameter +param+. + # + # +code_object+ is used for directives that operate on a class or module. + # +prefix+ is used to ensure the replacement for handled directives is + # correct. +encoding+ is used for the include directive. + # + # For a list of directives in RDoc see RDoc::Markup. + # -- + # When 1.8.7 support is ditched prefix can be defaulted to '' + # + # source://rdoc//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. + # + # If the first line of the included file starts with '#', and contains + # an encoding information in the form 'coding:' or 'coding=', it is + # removed. + # + # If all lines in the included file start with a '#', this leading '#' + # is removed before inclusion. The included content is indented like + # the :include: directive. + # -- + # so all content will be verbatim because of the likely space after '#'? + # TODO shift left the whole file content in that case + # TODO comment stop/start #-- and #++ in included file must be processed here + # + # source://rdoc//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 + def options; end + + # An RDoc::Options instance that will be filled in with overrides from + # directives + # + # source://rdoc//rdoc/markup/pre_process.rb#23 + def options=(_arg0); end + + class << self + # Adds a post-process handler for directives. The handler will be called + # with the result RDoc::Comment (or text String) and the code object for the + # comment (if any). + # + # source://rdoc//rdoc/markup/pre_process.rb#30 + def post_process(&block); end + + # Registered post-processors + # + # source://rdoc//rdoc/markup/pre_process.rb#37 + def post_processors; end + + # Registers +directive+ as one handled by RDoc. If a block is given the + # directive will be replaced by the result of the block, otherwise the + # directive will be removed from the processed text. + # + # The block will be called with the directive name and the directive + # parameter: + # + # RDoc::Markup::PreProcess.register 'my-directive' do |directive, param| + # # replace text, etc. + # end + # + # source://rdoc//rdoc/markup/pre_process.rb#53 + def register(directive, &block); end + + # Registered directives + # + # source://rdoc//rdoc/markup/pre_process.rb#60 + def registered; end + + # Clears all registered directives and post-processors + # + # source://rdoc//rdoc/markup/pre_process.rb#67 + def reset; end + end +end + +# A section of text that is added to the output document as-is +class RDoc::Markup::Raw + # Creates a new Raw containing +parts+ + # + # @return [Raw] a new instance of Raw + # + # source://rdoc//rdoc/markup/raw.rb#15 + def initialize(*parts); end + + # Appends +text+ + # + # source://rdoc//rdoc/markup/raw.rb#23 + def <<(text); end + + # source://rdoc//rdoc/markup/raw.rb#27 + def ==(other); end + + # Calls #accept_raw+ on +visitor+ + # + # source://rdoc//rdoc/markup/raw.rb#34 + def accept(visitor); end + + # Appends +other+'s parts + # + # source://rdoc//rdoc/markup/raw.rb#41 + def merge(other); end + + # The component parts of the list + # + # source://rdoc//rdoc/markup/raw.rb#10 + def parts; end + + # source://rdoc//rdoc/markup/raw.rb#45 + def pretty_print(q); end + + # Appends +texts+ onto this Paragraph + # + # source://rdoc//rdoc/markup/raw.rb#58 + def push(*texts); end + + # The raw text + # + # source://rdoc//rdoc/markup/raw.rb#65 + def text; end +end + +# Hold details of a regexp handling sequence +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 + 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 + def ==(o); end + + # source://rdoc//rdoc/markup/regexp_handling.rb#31 + def inspect; end + + # Regexp handling text + # + # source://rdoc//rdoc/markup/regexp_handling.rb#15 + def text; end + + # Regexp handling text + # + # source://rdoc//rdoc/markup/regexp_handling.rb#15 + def text=(_arg0); end + + # source://rdoc//rdoc/markup/regexp_handling.rb#36 + def to_s; end + + # Regexp handling type + # + # source://rdoc//rdoc/markup/regexp_handling.rb#10 + def type; end +end + +# A horizontal rule with a weight +class RDoc::Markup::Rule < ::Struct + # Calls #accept_rule on +visitor+ + # + # source://rdoc//rdoc/markup/rule.rb#10 + def accept(visitor); end + + # source://rdoc//rdoc/markup/rule.rb#14 + def pretty_print(q); end +end + +# A section of table +class RDoc::Markup::Table + # Creates new instance + # + # @return [Table] a new instance of Table + # + # source://rdoc//rdoc/markup/table.rb#16 + def initialize(header, align, body); end + + # :stopdoc: + # + # source://rdoc//rdoc/markup/table.rb#21 + def ==(other); end + + # source://rdoc//rdoc/markup/table.rb#28 + def accept(visitor); end + + # alignments of each column + # + # source://rdoc//rdoc/markup/table.rb#10 + def align; end + + # alignments of each column + # + # source://rdoc//rdoc/markup/table.rb#10 + def align=(_arg0); end + + # body texts of each column + # + # source://rdoc//rdoc/markup/table.rb#13 + def body; end + + # body texts of each column + # + # source://rdoc//rdoc/markup/table.rb#13 + def body=(_arg0); end + + # headers of each column + # + # source://rdoc//rdoc/markup/table.rb#7 + def header; end + + # headers of each column + # + # source://rdoc//rdoc/markup/table.rb#7 + def header=(_arg0); end + + # source://rdoc//rdoc/markup/table.rb#32 + def pretty_print(q); end +end + +# Outputs RDoc markup with vibrant ANSI color! +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 + def initialize(markup = T.unsafe(nil)); end + + # Overrides indent width to ensure output lines up correctly. + # + # source://rdoc//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 + def accept_list_item_start(list_item); end + + # Maps attributes to ANSI sequences + # + # source://rdoc//rdoc/markup/to_ansi.rb#22 + def init_tags; end + + # Starts accepting with a reset screen + # + # source://rdoc//rdoc/markup/to_ansi.rb#87 + def start_accepting; end +end + +# Outputs RDoc markup with hot backspace action! You will probably need a +# pager to use this output format. +# +# This formatter won't work on 1.8.6 because it lacks String#chars. +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 + def initialize(markup = T.unsafe(nil)); end + + # Makes heading text bold. + # + # source://rdoc//rdoc/markup/to_bs.rb#33 + def accept_heading(heading); end + + # Turns on or off regexp handling for +convert_string+ + # + # source://rdoc//rdoc/markup/to_bs.rb#46 + def annotate(tag); end + + # Calls convert_string on the result of convert_regexp_handling + # + # source://rdoc//rdoc/markup/to_bs.rb#59 + def convert_regexp_handling(target); end + + # Adds bold or underline mixed with backspaces + # + # source://rdoc//rdoc/markup/to_bs.rb#66 + 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 + def init_tags; end +end + +# Outputs RDoc markup as HTML. +class RDoc::Markup::ToHtml < ::RDoc::Markup::Formatter + include ::RDoc::Text + + # Creates a new formatter that will output HTML + # + # @return [ToHtml] a new instance of ToHtml + # + # source://rdoc//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 + def accept_blank_line(blank_line); end + + # Adds +block_quote+ to the output + # + # source://rdoc//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 + def accept_heading(heading); end + + # Finishes consumption of +list+ + # + # source://rdoc//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 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//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 + def accept_list_start(list); end + + # Adds +paragraph+ to the output + # + # source://rdoc//rdoc/markup/to_html.rb#203 + def accept_paragraph(paragraph); end + + # Adds +raw+ to the output + # + # source://rdoc//rdoc/markup/to_html.rb#320 + def accept_raw(raw); end + + # Adds +rule+ to the output + # + # source://rdoc//rdoc/markup/to_html.rb#246 + def accept_rule(rule); end + + # Adds +table+ to the output + # + # source://rdoc//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 + 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 + 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 + def code_object=(_arg0); end + + # CGI-escapes +text+ + # + # source://rdoc//rdoc/markup/to_html.rb#352 + def convert_string(text); end + + # Returns the generated output + # + # source://rdoc//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 + def from_path; end + + # Path to this document for relative links + # + # source://rdoc//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 + def gen_url(url, text); end + + # source://rdoc//rdoc/markup/to_html.rb#85 + def handle_RDOCLINK(url); end + + # +target+ is a
+ # + # source://rdoc//rdoc/markup/to_html.rb#110 + def handle_regexp_HARD_BREAK(target); end + + # +target+ is a potential link. The following schemes are handled: + # + # mailto::: + # Inserted as-is. + # http::: + # Links are checked to see if they reference an image. If so, that image + # gets inserted using an tag. Otherwise a conventional + # is used. + # link::: + # Reference to a local file relative to the output directory. + # + # source://rdoc//rdoc/markup/to_html.rb#126 + def handle_regexp_HYPERLINK(target); end + + # +target+ is an rdoc-schemed link that will be converted into a hyperlink. + # + # For the +rdoc-ref+ scheme the named reference will be returned without + # creating a link. + # + # For the +rdoc-label+ scheme the footnote and label prefixes are stripped + # when creating a link. All other contents will be linked verbatim. + # + # source://rdoc//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 + 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 + def html_list_name(list_type, open_tag); end + + # source://rdoc//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 + def init_link_notation_regexp_handlings; end + + # Adds regexp handlings. + # + # source://rdoc//rdoc/markup/to_html.rb#70 + def init_regexp_handlings; end + + # Maps attributes to HTML tags + # + # source://rdoc//rdoc/markup/to_html.rb#394 + def init_tags; end + + # source://rdoc//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 + 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 + 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 + def parseable?(text); end + + # source://rdoc//rdoc/markup/to_html.rb#25 + def res; end + + # Prepares the visitor for HTML generation + # + # source://rdoc//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 + def to_html(item); end +end + +# source://rdoc//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. +class RDoc::Markup::ToHtmlCrossref < ::RDoc::Markup::ToHtml + # Creates a new crossref resolver that generates links relative to +context+ + # which lives at +from_path+ in the generated files. '#' characters on + # references are removed unless +show_hash+ is true. Only method names + # preceded by '#' or '::' are linked, unless +hyperlink_all+ is true. + # + # @raise [ArgumentError] + # @return [ToHtmlCrossref] a new instance of ToHtmlCrossref + # + # source://rdoc//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 + def context; end + + # RDoc::CodeObject for generating references + # + # source://rdoc//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 + 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 + def gen_url(url, text); end + + # We're invoked when any text matches the CROSSREF pattern. If we find the + # corresponding reference, generate a link. If the name we're looking for + # contains no punctuation, we look for it up the module/class chain. For + # example, ToHtml is found, even without the RDoc::Markup:: prefix, + # because we look for it in module Markup first. + # + # source://rdoc//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 + def handle_regexp_HYPERLINK(target); end + + # +target+ is an rdoc-schemed link that will be converted into a hyperlink. + # For the rdoc-ref scheme the cross-reference will be looked up and the + # given name will be used. + # + # All other contents are handled by + # {the superclass}[rdoc-ref:RDoc::Markup::ToHtml#handle_regexp_RDOCLINK] + # + # source://rdoc//rdoc/markup/to_html_crossref.rb#116 + def handle_regexp_RDOCLINK(target); end + + # source://rdoc//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 + 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 + def show_hash; end + + # Should we show '#' characters on method references? + # + # source://rdoc//rdoc/markup/to_html_crossref.rb#24 + def show_hash=(_arg0); end +end + +# Outputs RDoc markup as paragraphs with inline markup only. +class RDoc::Markup::ToHtmlSnippet < ::RDoc::Markup::ToHtml + # Creates a new ToHtmlSnippet formatter that will cut off the input on the + # next word boundary after the given number of +characters+ or +paragraphs+ + # of text have been encountered. + # + # @return [ToHtmlSnippet] a new instance of ToHtmlSnippet + # + # source://rdoc//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 + def accept_heading(heading); end + + # Finishes consumption of +list_item+ + # + # source://rdoc//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 + def accept_list_item_start(list_item); end + + # Prepares the visitor for consuming +list+ + # + # source://rdoc//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 + def accept_paragraph(paragraph); end + + # Raw sections are untrusted and ignored + # + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # Rules are ignored + # + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # Adds +verbatim+ to the output + # + # source://rdoc//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 + def add_paragraph; end + + # After this many characters the input will be cut off. + # + # source://rdoc//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 + def characters; end + + # Marks up +content+ + # + # source://rdoc//rdoc/markup/to_html_snippet.rb#207 + def convert(content); end + + # Converts flow items +flow+ + # + # source://rdoc//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 + def gen_url(url, text); end + + # Removes escaping from the cross-references in +target+ + # + # source://rdoc//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 + def handle_regexp_HARD_BREAK(target); end + + # In snippets, there are no lists + # + # source://rdoc//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 + def list_item_start(list_item, list_type); end + + # The attribute bitmask + # + # source://rdoc//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 + 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 + 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 + def paragraph_limit; end + + # Count of paragraphs found + # + # source://rdoc//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 + 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 + def truncate(text); end +end + +# Joins the parts of an RDoc::Markup::Paragraph into a single String. +# +# This allows for easier maintenance and testing of Markdown support. +# +# This formatter only works on Paragraph instances. Attempting to process +# other markup syntax items will not work. +class RDoc::Markup::ToJoinedParagraph < ::RDoc::Markup::Formatter + # @return [ToJoinedParagraph] a new instance of ToJoinedParagraph + # + # source://rdoc//rdoc/markup/to_joined_paragraph.rb#12 + def initialize; end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_block_quote(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_heading(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_list_end(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_list_item_end(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_list_item_start(*node); end + + # source://rdoc//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 + def accept_paragraph(paragraph); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_table(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_verbatim(*node); end + + # source://rdoc//rdoc/markup/to_joined_paragraph.rb#19 + def end_accepting; end + + # source://rdoc//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). +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 + def initialize(markup = T.unsafe(nil)); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_blank_line(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_block_quote(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_heading(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_list_end(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_list_item_end(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_list_item_start(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_list_start(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_paragraph(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # source://rdoc//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 + def convert(text); end + + # source://rdoc//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 + def handle_regexp_CROSSREF(target); end + + # source://rdoc//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 + def handle_regexp_TIDYLINK(target); end + + # source://rdoc//rdoc/markup/to_label.rb#11 + def res; end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def start_accepting(*node); end +end + +# Outputs parsed markup as Markdown +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 + def initialize(markup = T.unsafe(nil)); end + + # Finishes consumption of `list` + # + # source://rdoc//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 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming `list_item` + # + # source://rdoc//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 + def accept_list_start(list); end + + # Adds `rule` to the output + # + # source://rdoc//rdoc/markup/to_markdown.rb#117 + def accept_rule(rule); end + + # Outputs `verbatim` indented 4 columns + # + # source://rdoc//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 + def gen_url(url, text); end + + # Handles rdoc- type links for footnotes. + # + # source://rdoc//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 + def handle_regexp_HARD_BREAK(target); end + + # Converts the rdoc-...: links into a Markdown.style links. + # + # source://rdoc//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 + def handle_regexp_TIDYLINK(target); end + + # Maps attributes to HTML sequences + # + # source://rdoc//rdoc/markup/to_markdown.rb#31 + def init_tags; end +end + +# Outputs RDoc markup as RDoc markup! (mostly) +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 + def initialize(markup = T.unsafe(nil)); end + + # Adds +blank_line+ to the output + # + # source://rdoc//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 + def accept_block_quote(block_quote); end + + # Adds +heading+ to the output + # + # source://rdoc//rdoc/markup/to_rdoc.rb#99 + def accept_heading(heading); end + + # Adds +paragraph+ to the output + # + # source://rdoc//rdoc/markup/to_rdoc.rb#203 + def accept_indented_paragraph(paragraph); end + + # Finishes consumption of +list+ + # + # source://rdoc//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 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//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 + def accept_list_start(list); end + + # Adds +paragraph+ to the output + # + # source://rdoc//rdoc/markup/to_rdoc.rb#195 + def accept_paragraph(paragraph); end + + # Adds +raw+ to the output + # + # source://rdoc//rdoc/markup/to_rdoc.rb#213 + def accept_raw(raw); end + + # Adds +rule+ to the output + # + # source://rdoc//rdoc/markup/to_rdoc.rb#220 + def accept_rule(rule); end + + # Adds +table+ to the output + # + # source://rdoc//rdoc/markup/to_rdoc.rb#243 + def accept_table(header, body, aligns); end + + # Outputs +verbatim+ indented 2 columns + # + # source://rdoc//rdoc/markup/to_rdoc.rb#229 + def accept_verbatim(verbatim); end + + # Applies attribute-specific markup to +text+ using RDoc::AttributeManager + # + # source://rdoc//rdoc/markup/to_rdoc.rb#271 + def attributes(text); end + + # Returns the generated output + # + # source://rdoc//rdoc/markup/to_rdoc.rb#279 + def end_accepting; end + + # Adds a newline to the output + # + # source://rdoc//rdoc/markup/to_rdoc.rb#295 + def handle_regexp_HARD_BREAK(target); end + + # Removes preceding \\ from the suppressed crossref +target+ + # + # source://rdoc//rdoc/markup/to_rdoc.rb#286 + def handle_regexp_SUPPRESSED_CROSSREF(target); end + + # Current indent amount for output in characters + # + # source://rdoc//rdoc/markup/to_rdoc.rb#10 + def indent; end + + # Current indent amount for output in characters + # + # source://rdoc//rdoc/markup/to_rdoc.rb#10 + def indent=(_arg0); end + + # Maps attributes to HTML sequences + # + # source://rdoc//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 + def list_index; end + + # Stack of list types + # + # source://rdoc//rdoc/markup/to_rdoc.rb#25 + def list_type; end + + # Stack of list widths for indentation + # + # source://rdoc//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 + def prefix; end + + # Output accumulator + # + # source://rdoc//rdoc/markup/to_rdoc.rb#40 + def res; end + + # Prepares the visitor for text generation + # + # source://rdoc//rdoc/markup/to_rdoc.rb#302 + 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 + def use_prefix; end + + # Output width in characters + # + # source://rdoc//rdoc/markup/to_rdoc.rb#15 + def width; end + + # Output width in characters + # + # source://rdoc//rdoc/markup/to_rdoc.rb#15 + def width=(_arg0); end + + # Wraps +text+ to #width + # + # source://rdoc//rdoc/markup/to_rdoc.rb#326 + def wrap(text); end +end + +# Extracts just the RDoc::Markup::Heading elements from a +# RDoc::Markup::Document to help build a table of contents +class RDoc::Markup::ToTableOfContents < ::RDoc::Markup::Formatter + # @return [ToTableOfContents] a new instance of ToTableOfContents + # + # source://rdoc//rdoc/markup/to_table_of_contents.rb#27 + def initialize; end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_blank_line(*node); end + + # :stopdoc: + # + # source://rdoc//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 + def accept_document(document); end + + # Adds +heading+ to the table of contents + # + # source://rdoc//rdoc/markup/to_table_of_contents.rb#45 + def accept_heading(heading); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_list_end(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_list_end_bullet(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_list_item_end(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_list_item_start(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_list_start(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_paragraph(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # source://rdoc//rdoc/markup/formatter.rb#188 + def accept_table(*node); end + + # source://rdoc//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 + def end_accepting; end + + # Omits headings with a level less than the given level. + # + # source://rdoc//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 + def omit_headings_below=(_arg0); end + + # Output accumulator + # + # source://rdoc//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 + 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 + def suppressed?(heading); end + + class << self + # Singleton for table-of-contents generation + # + # source://rdoc//rdoc/markup/to_table_of_contents.rb#13 + def to_toc; end + end +end + +# This Markup outputter is used for testing purposes. +class RDoc::Markup::ToTest < ::RDoc::Markup::Formatter + # source://rdoc//rdoc/markup/to_test.rb#55 + def accept_blank_line(blank_line); end + + # source://rdoc//rdoc/markup/to_test.rb#59 + def accept_heading(heading); end + + # source://rdoc//rdoc/markup/to_test.rb#44 + def accept_list_end(list); end + + # source://rdoc//rdoc/markup/to_test.rb#52 + def accept_list_item_end(list_item); end + + # source://rdoc//rdoc/markup/to_test.rb#48 + def accept_list_item_start(list_item); end + + # source://rdoc//rdoc/markup/to_test.rb#33 + def accept_list_start(list); end + + # source://rdoc//rdoc/markup/to_test.rb#21 + def accept_paragraph(paragraph); end + + # source://rdoc//rdoc/markup/to_test.rb#25 + def accept_raw(raw); end + + # source://rdoc//rdoc/markup/to_test.rb#63 + def accept_rule(rule); end + + # source://rdoc//rdoc/markup/to_test.rb#29 + def accept_verbatim(verbatim); end + + # source://rdoc//rdoc/markup/to_test.rb#17 + def end_accepting; end + + # :section: Visitor + # + # source://rdoc//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. +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 + 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 + def accept_blank_line(markup_item); end + + # Adds tts from +block_quote+ to the output + # + # source://rdoc//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 + def accept_heading(markup_item); end + + # Pops the list type for +list+ from #list_type + # + # source://rdoc//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 + def accept_list_item_end(markup_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//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 + def accept_list_start(list); end + + # Adds +paragraph+ to the output + # + # source://rdoc//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 + 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 + 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 + 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 + 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 + def end_accepting; end + + # Stack of list types + # + # source://rdoc//rdoc/markup/to_tt_only.rb#11 + def list_type; end + + # Output accumulator + # + # source://rdoc//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 + def start_accepting; end + + # Extracts tt sections from +text+ + # + # source://rdoc//rdoc/markup/to_tt_only.rb#84 + def tt_sections(text); end +end + +# A section of verbatim text +class RDoc::Markup::Verbatim < ::RDoc::Markup::Raw + # @return [Verbatim] a new instance of Verbatim + # + # source://rdoc//rdoc/markup/verbatim.rb#12 + def initialize(*parts); end + + # source://rdoc//rdoc/markup/verbatim.rb#18 + def ==(other); end + + # Calls #accept_verbatim on +visitor+ + # + # source://rdoc//rdoc/markup/verbatim.rb#25 + def accept(visitor); end + + # Format of this verbatim section + # + # source://rdoc//rdoc/markup/verbatim.rb#10 + def format; end + + # Format of this verbatim section + # + # source://rdoc//rdoc/markup/verbatim.rb#10 + def format=(_arg0); end + + # Collapses 3+ newlines into two newlines + # + # source://rdoc//rdoc/markup/verbatim.rb#32 + def normalize; end + + # source://rdoc//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 + def ruby?; end + + # The text of the section + # + # source://rdoc//rdoc/markup/verbatim.rb#79 + def text; end +end + +# Abstract class representing either a method or an attribute. +class RDoc::MethodAttr < ::RDoc::CodeObject + include ::Comparable + + # Creates a new MethodAttr from token stream +text+ and method or attribute + # name +name+. + # + # Usually this is called by super from a subclass. + # + # @return [MethodAttr] a new instance of MethodAttr + # + # source://rdoc//rdoc/method_attr.rb#78 + def initialize(text, name); end + + # Order by #singleton then #name + # + # source://rdoc//rdoc/method_attr.rb#113 + def <=>(other); end + + # source://rdoc//rdoc/method_attr.rb#121 + def ==(other); end + + # Abstract method. Contexts in their building phase call this + # to register a new alias for this known method/attribute. + # + # - creates a new AnyMethod/Attribute named an_alias.new_name; + # - adds +self+ as an alias for the new method or attribute + # - adds the method or attribute to #aliases + # - adds the method or attribute to +context+. + # + # @raise [NotImplementedError] + # + # source://rdoc//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 + # code listing having: + # + # # File xxxxx, line dddd + # + # If it has this comment then line numbers are added to +src+ and the , + # line dddd portion of the comment is removed. + # + # source://rdoc//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 + def aliases; end + + # HTML fragment reference for this method + # + # source://rdoc//rdoc/method_attr.rb#216 + def aref; end + + # Prefix for +aref+, defined by subclasses. + # + # @raise [NotImplementedError] + # + # source://rdoc//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 + def arglists; end + + # Parameters yielded by the called block + # + # source://rdoc//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 + def block_params=(value); end + + # Different ways to call this method + # + # source://rdoc//rdoc/method_attr.rb#59 + def call_seq; end + + # Different ways to call this method + # + # source://rdoc//rdoc/method_attr.rb#59 + def call_seq=(_arg0); end + + # A method/attribute is documented if any of the following is true: + # - it has a comment; + # - it is an alias for a documented method; + # - it has a +#see+ method that is documented. + # + # @return [Boolean] + # + # source://rdoc//rdoc/method_attr.rb#132 + def documented?; end + + # source://rdoc//rdoc/method_attr.rb#178 + def find_method_or_attribute(name); end + + # source://rdoc//rdoc/method_attr.rb#166 + def find_see; end + + # Full method/attribute name including namespace + # + # source://rdoc//rdoc/method_attr.rb#300 + def full_name; end + + # HTML id-friendly method/attribute name + # + # source://rdoc//rdoc/method_attr.rb#291 + def html_name; end + + # source://rdoc//rdoc/method_attr.rb#105 + def initialize_visibility; end + + # source://rdoc//rdoc/method_attr.rb#304 + def inspect; end + + # The method/attribute we're aliasing + # + # source://rdoc//rdoc/method_attr.rb#37 + def is_alias_for; end + + # The method/attribute we're aliasing + # + # source://rdoc//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 + def markup_code; end + + # Name of this method/attribute. + # + # source://rdoc//rdoc/method_attr.rb#12 + def name; end + + # Name of this method/attribute. + # + # source://rdoc//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 + def name_prefix; end + + # Name for output to HTML. For class methods the full name with a "." is + # used like +SomeClass.method_name+. For instance methods the class name is + # used if +context+ does not match the parent. + # + # This is to help prevent people from using :: to call class methods. + # + # source://rdoc//rdoc/method_attr.rb#330 + def output_name(context); end + + # Pretty parameter list for this method + # + # source://rdoc//rdoc/method_attr.rb#69 + def param_seq; end + + # Parameters for this method + # + # source://rdoc//rdoc/method_attr.rb#54 + def params; end + + # Parameters for this method + # + # source://rdoc//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 + def parent_name; end + + # Path to this method for use with HTML generator output. + # + # source://rdoc//rdoc/method_attr.rb#353 + def path; end + + # Method/attribute name with class/instance indicator + # + # source://rdoc//rdoc/method_attr.rb#339 + def pretty_name; end + + # source://rdoc//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 + def search_record; end + + # A method/attribute to look at, + # in particular if this method/attribute has no documentation. + # + # It can be a method/attribute of the superclass or of an included module, + # including the Kernel module, which is always appended to the included + # modules. + # + # Returns +nil+ if there is no such method/attribute. + # The +#is_alias_for+ method/attribute, if any, is not included. + # + # Templates may generate a "see also ..." if this method/attribute + # has documentation, and "see ..." if it does not. + # + # source://rdoc//rdoc/method_attr.rb#152 + def see; end + + # Is this a singleton method/attribute? + # + # source://rdoc//rdoc/method_attr.rb#22 + def singleton; end + + # Is this a singleton method/attribute? + # + # source://rdoc//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 + def store=(store); end + + # Source file token stream + # + # source://rdoc//rdoc/method_attr.rb#27 + def text; end + + # source://rdoc//rdoc/method_attr.rb#410 + def to_s; end + + # Type of method/attribute (class or instance) + # + # source://rdoc//rdoc/method_attr.rb#346 + def type; end + + # public, protected, private + # + # source://rdoc//rdoc/method_attr.rb#17 + def visibility; end + + # public, protected, private + # + # source://rdoc//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 + def initialize_copy(other); end +end + +# A Mixin adds features from a module into another context. RDoc::Include and +# RDoc::Extend are both mixins. +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 + def initialize(name, comment); end + + # Mixins are sorted by name + # + # source://rdoc//rdoc/mixin.rb#26 + def <=>(other); end + + # source://rdoc//rdoc/mixin.rb#32 + def ==(other); end + + # source://rdoc//rdoc/mixin.rb#32 + def eql?(other); end + + # Full name based on #module + # + # source://rdoc//rdoc/mixin.rb#41 + def full_name; end + + # source://rdoc//rdoc/mixin.rb#46 + def hash; end + + # source://rdoc//rdoc/mixin.rb#50 + def inspect; end + + # Attempts to locate the included module object. Returns the name if not + # known. + # + # The scoping rules of Ruby to resolve the name of an included module are: + # - first look into the children of the current context; + # - if not found, look into the children of included modules, + # in reverse inclusion order; + # - if still not found, go up the hierarchy of names. + # + # This method has O(n!) behavior when the module calling + # include is referencing nonexistent modules. Avoid calling #module until + # after all the files are parsed. This behavior is due to ruby's constant + # lookup behavior. + # + # As of the beginning of October, 2011, no gem includes nonexistent modules. + # + # source://rdoc//rdoc/mixin.rb#75 + def module; end + + # Name of included module + # + # source://rdoc//rdoc/mixin.rb#11 + def name; end + + # Name of included module + # + # source://rdoc//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 + def store=(store); end + + # source://rdoc//rdoc/mixin.rb#116 + def to_s; end +end + +# A normal class, neither singleton nor anonymous +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 + def ancestors; end + + # source://rdoc//rdoc/normal_class.rb#24 + def aref_prefix; end + + # The definition of this class, class MyClassName + # + # source://rdoc//rdoc/normal_class.rb#31 + def definition; end + + # source://rdoc//rdoc/normal_class.rb#35 + def direct_ancestors; end + + # source://rdoc//rdoc/normal_class.rb#39 + def inspect; end + + # source://rdoc//rdoc/normal_class.rb#56 + def pretty_print(q); end + + # source://rdoc//rdoc/normal_class.rb#47 + def to_s; end +end + +# A normal module, like NormalClass +class RDoc::NormalModule < ::RDoc::ClassModule + # source://rdoc//rdoc/normal_module.rb#7 + def aref_prefix; end + + # The definition of this module, module MyModuleName + # + # source://rdoc//rdoc/normal_module.rb#21 + def definition; end + + # source://rdoc//rdoc/normal_module.rb#11 + def inspect; end + + # This is a module, returns true + # + # @return [Boolean] + # + # source://rdoc//rdoc/normal_module.rb#28 + def module?; end + + # source://rdoc//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 + def superclass; end +end + +# RDoc::Options handles the parsing and storage of options +# +# == Saved Options +# +# You can save some options like the markup format in the +# .rdoc_options file in your gem. The easiest way to do this is: +# +# rdoc --markup tomdoc --write-options +# +# Which will automatically create the file and fill it with the options you +# specified. +# +# The following options will not be saved since they interfere with the user's +# preferences or with the normal operation of RDoc: +# +# * +--coverage-report+ +# * +--dry-run+ +# * +--encoding+ +# * +--force-update+ +# * +--format+ +# * +--pipe+ +# * +--quiet+ +# * +--template+ +# * +--verbose+ +# +# == Custom Options +# +# Generators can hook into RDoc::Options to add generator-specific command +# line options. +# +# When --format is encountered in ARGV, RDoc calls ::setup_options on +# the generator class to add extra options to the option parser. Options for +# custom generators must occur after --format. rdoc --help +# will list options for all installed generators. +# +# Example: +# +# class RDoc::Generator::Spellcheck +# RDoc::RDoc.add_generator self +# +# def self.setup_options rdoc_options +# op = rdoc_options.option_parser +# +# op.on('--spell-dictionary DICTIONARY', +# RDoc::Options::Path) do |dictionary| +# rdoc_options.spell_dictionary = dictionary +# end +# end +# end +# +# Of course, RDoc::Options does not respond to +spell_dictionary+ by default +# so you will need to add it: +# +# class RDoc::Options +# +# ## +# # The spell dictionary used by the spell-checking plugin. +# +# attr_accessor :spell_dictionary +# +# end +# +# == Option Validators +# +# OptionParser validators will validate and cast user input values. In +# addition to the validators that ship with OptionParser (String, Integer, +# Float, TrueClass, FalseClass, Array, Regexp, Date, Time, URI, etc.), +# RDoc::Options adds Path, PathArray and Template. +class RDoc::Options + # @return [Options] a new instance of Options + # + # source://rdoc//rdoc/options.rb#346 + def initialize(loaded_options = T.unsafe(nil)); end + + # source://rdoc//rdoc/options.rb#459 + def ==(other); end + + # Character-set for HTML output. #encoding is preferred over #charset + # + # source://rdoc//rdoc/options.rb#151 + def charset; end + + # Character-set for HTML output. #encoding is preferred over #charset + # + # source://rdoc//rdoc/options.rb#151 + def charset=(_arg0); end + + # Check that the files on the command line exist + # + # source://rdoc//rdoc/options.rb#483 + def check_files; end + + # Ensure only one generator is loaded + # + # source://rdoc//rdoc/options.rb#504 + def check_generator; end + + # If true, only report on undocumented files + # + # source://rdoc//rdoc/options.rb#243 + def coverage_report; end + + # If true, only report on undocumented files + # + # source://rdoc//rdoc/options.rb#243 + 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 + def default_title=(string); end + + # If true, RDoc will not write any files. + # + # source://rdoc//rdoc/options.rb#156 + def dry_run; end + + # If true, RDoc will not write any files. + # + # source://rdoc//rdoc/options.rb#156 + 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 + 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 + def encoding=(_arg0); end + + # Create a regexp for #exclude + # + # source://rdoc//rdoc/options.rb#544 + def exclude; end + + # Files matching this pattern will be excluded + # + # source://rdoc//rdoc/options.rb#168 + def exclude=(_arg0); end + + # The list of files to be processed + # + # source://rdoc//rdoc/options.rb#173 + def files; end + + # The list of files to be processed + # + # source://rdoc//rdoc/options.rb#173 + 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 + 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 + 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 + 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 + def force_output=(_arg0); end + + # Scan newer sources than the flag file if true. + # + # source://rdoc//rdoc/options.rb#184 + def force_update; end + + # Scan newer sources than the flag file if true. + # + # source://rdoc//rdoc/options.rb#184 + def force_update=(_arg0); end + + # Formatter to mark up text with + # + # source://rdoc//rdoc/options.rb#189 + def formatter; end + + # Formatter to mark up text with + # + # source://rdoc//rdoc/options.rb#189 + def formatter=(_arg0); end + + # Description of the output generator (set with the --format option) + # + # source://rdoc//rdoc/options.rb#194 + def generator; end + + # Description of the output generator (set with the --format option) + # + # source://rdoc//rdoc/options.rb#194 + def generator=(_arg0); end + + # Returns a properly-space list of generators and their descriptions. + # + # source://rdoc//rdoc/options.rb#620 + def generator_descriptions; end + + # For #== + # + # source://rdoc//rdoc/options.rb#199 + def generator_name; end + + # Loaded generator options. Used to prevent --help from loading the same + # options multiple times. + # + # source://rdoc//rdoc/options.rb#205 + def generator_options; end + + # Loaded generator options. Used to prevent --help from loading the same + # options multiple times. + # + # source://rdoc//rdoc/options.rb#205 + 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 + 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 + def hyperlink_all=(_arg0); end + + # source://rdoc//rdoc/options.rb#351 + def init_ivars; end + + # source://rdoc//rdoc/options.rb#396 + def init_with(map); end + + # Include line numbers in the source code + # + # source://rdoc//rdoc/options.rb#216 + def line_numbers; end + + # Include line numbers in the source code + # + # source://rdoc//rdoc/options.rb#216 + def line_numbers=(_arg0); end + + # The output locale. + # + # source://rdoc//rdoc/options.rb#221 + def locale; end + + # The output locale. + # + # source://rdoc//rdoc/options.rb#221 + def locale=(_arg0); end + + # The directory where locale data live. + # + # source://rdoc//rdoc/options.rb#226 + def locale_dir; end + + # The directory where locale data live. + # + # source://rdoc//rdoc/options.rb#226 + 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 + 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 + 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 + 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 + def markup=(_arg0); end + + # The name of the output directory + # + # source://rdoc//rdoc/options.rb#248 + def op_dir; end + + # The name of the output directory + # + # source://rdoc//rdoc/options.rb#248 + def op_dir=(_arg0); end + + # The OptionParser for this instance + # + # source://rdoc//rdoc/options.rb#253 + def option_parser; end + + # The OptionParser for this instance + # + # source://rdoc//rdoc/options.rb#253 + def option_parser=(_arg0); end + + # Output heading decorations? + # + # source://rdoc//rdoc/options.rb#257 + def output_decoration; end + + # Output heading decorations? + # + # source://rdoc//rdoc/options.rb#257 + def output_decoration=(_arg0); end + + # source://rdoc//rdoc/options.rb#427 + 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 + 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 + def page_dir=(_arg0); end + + # Parses command line options. + # + # source://rdoc//rdoc/options.rb#646 + def parse(argv); end + + # Is RDoc in pipe mode? + # + # source://rdoc//rdoc/options.rb#268 + def pipe; end + + # Is RDoc in pipe mode? + # + # source://rdoc//rdoc/options.rb#268 + def pipe=(_arg0); end + + # Don't display progress as we process the files + # + # source://rdoc//rdoc/options.rb#1191 + def quiet; end + + # Set quietness to +bool+ + # + # source://rdoc//rdoc/options.rb#1198 + def quiet=(bool); end + + # Array of directories to search for files to satisfy an :include: + # + # source://rdoc//rdoc/options.rb#273 + def rdoc_include; end + + # Array of directories to search for files to satisfy an :include: + # + # source://rdoc//rdoc/options.rb#273 + 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 + 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 + def root=(_arg0); end + + # Removes directories from +path+ that are outside the current directory + # + # source://rdoc//rdoc/options.rb#1205 + def sanitize_path(path); end + + # Set up an output generator for the named +generator_name+. + # + # If the found generator responds to :setup_options it will be called with + # the options instance. This allows generators to add custom options or set + # default options. + # + # source://rdoc//rdoc/options.rb#1232 + 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 + def show_hash; end + + # Include the '#' at the front of hyperlinked instance method names + # + # source://rdoc//rdoc/options.rb#285 + def show_hash=(_arg0); end + + # Indicates if files of test suites should be skipped + # + # source://rdoc//rdoc/options.rb#344 + def skip_tests; end + + # Indicates if files of test suites should be skipped + # + # source://rdoc//rdoc/options.rb#344 + def skip_tests=(_arg0); end + + # Directory to copy static files from + # + # source://rdoc//rdoc/options.rb#290 + def static_path; end + + # Directory to copy static files from + # + # source://rdoc//rdoc/options.rb#290 + def static_path=(_arg0); end + + # The number of columns in a tab + # + # source://rdoc//rdoc/options.rb#295 + def tab_width; end + + # The number of columns in a tab + # + # source://rdoc//rdoc/options.rb#295 + def tab_width=(_arg0); end + + # Template to be used when generating output + # + # source://rdoc//rdoc/options.rb#300 + def template; end + + # Template to be used when generating output + # + # source://rdoc//rdoc/options.rb#300 + def template=(_arg0); end + + # Directory the template lives in + # + # source://rdoc//rdoc/options.rb#305 + def template_dir; end + + # Directory the template lives in + # + # source://rdoc//rdoc/options.rb#305 + def template_dir=(_arg0); end + + # Finds the template dir for +template+ + # + # source://rdoc//rdoc/options.rb#1254 + def template_dir_for(template); end + + # Additional template stylesheets + # + # source://rdoc//rdoc/options.rb#310 + def template_stylesheets; end + + # Additional template stylesheets + # + # source://rdoc//rdoc/options.rb#310 + def template_stylesheets=(_arg0); end + + # Documentation title + # + # source://rdoc//rdoc/options.rb#315 + def title; end + + # Documentation title + # + # source://rdoc//rdoc/options.rb#315 + def title=(_arg0); end + + # For dumping YAML + # + # source://rdoc//rdoc/options.rb#523 + def to_yaml(*options); end + + # Should RDoc update the timestamps in the output dir? + # + # source://rdoc//rdoc/options.rb#320 + def update_output_dir; end + + # Should RDoc update the timestamps in the output dir? + # + # source://rdoc//rdoc/options.rb#320 + def update_output_dir=(_arg0); end + + # Verbosity, zero means quiet + # + # source://rdoc//rdoc/options.rb#325 + def verbosity; end + + # Verbosity, zero means quiet + # + # source://rdoc//rdoc/options.rb#325 + def verbosity=(_arg0); end + + # Minimum visibility of a documented method. One of +:public+, +:protected+, + # +:private+ or +:nodoc+. + # + # The +:nodoc+ visibility ignores all directives related to visibility. The + # directive. + # + # source://rdoc//rdoc/options.rb#340 + def visibility; end + + # Sets the minimum visibility of a documented method. + # + # Accepts +:public+, +:protected+, +:private+, +:nodoc+, or +:all+. + # + # When +:all+ is passed, visibility is set to +:private+, similarly to + # RDOCOPT="--all", see #visibility for more information. + # + # source://rdoc//rdoc/options.rb#1271 + def visibility=(visibility); end + + # Displays a warning using Kernel#warn if we're being verbose + # + # source://rdoc//rdoc/options.rb#1283 + def warn(message); end + + # URL of web cvs frontend + # + # source://rdoc//rdoc/options.rb#330 + def webcvs; end + + # URL of web cvs frontend + # + # source://rdoc//rdoc/options.rb#330 + def webcvs=(_arg0); end + + # Writes the YAML file .rdoc_options to the current directory containing the + # parsed options. + # + # source://rdoc//rdoc/options.rb#1291 + def write_options; end + + # source://rdoc//rdoc/options.rb#423 + def yaml_initialize(tag, map); end + + class << self + # Loads options from .rdoc_options if the file exists, otherwise creates a + # new RDoc::Options instance. + # + # @raise [RDoc::Error] + # + # source://rdoc//rdoc/options.rb#1305 + def load_options; end + end +end + +# A parser is simple a class that subclasses RDoc::Parser and implements #scan +# to fill in an RDoc::TopLevel with parsed data. +# +# The initialize method takes an RDoc::TopLevel to fill with parsed content, +# the name of the file to be parsed, the content of the file, an RDoc::Options +# object and an RDoc::Stats object to inform the user of parsed items. The +# scan method is then called to parse the file and must return the +# RDoc::TopLevel object. By calling super these items will be set for you. +# +# In order to be used by RDoc the parser needs to register the file extensions +# it can parse. Use ::parse_files_matching to register extensions. +# +# require 'rdoc' +# +# class RDoc::Parser::Xyz < RDoc::Parser +# parse_files_matching /\.xyz$/ +# +# def initialize top_level, file_name, content, options, stats +# super +# +# # extra initialization if needed +# end +# +# def scan +# # parse file and fill in @top_level +# end +# end +class RDoc::Parser + # Creates a new Parser storing +top_level+, +file_name+, +content+, + # +options+ and +stats+ in instance variables. In +@preprocess+ an + # RDoc::Markup::PreProcess object is created which allows processing of + # directives. + # + # @return [Parser] a new instance of Parser + # + # source://rdoc//rdoc/parser.rb#252 + def initialize(top_level, file_name, content, options, stats); end + + # The name of the file being parsed + # + # source://rdoc//rdoc/parser.rb#52 + def file_name; end + + # Normalizes tabs in +body+ + # + # source://rdoc//rdoc/parser.rb#272 + 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 + def alias_extension(old_ext, new_ext); end + + # Determines if the file is a "binary" file which basically means it has + # content that an RDoc parser shouldn't try to consume. + # + # @return [Boolean] + # + # source://rdoc//rdoc/parser.rb#74 + def binary?(file); end + + # Return a parser that can handle a particular extension + # + # source://rdoc//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 + def can_parse_by_name(file_name); end + + # Returns the file type from the modeline in +file_name+ + # + # source://rdoc//rdoc/parser.rb#141 + 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 + 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 + def parse_files_matching(regexp); end + + # An Array of arrays that maps file extension (or name) regular + # expressions to parser classes that will parse matching filenames. + # + # Use parse_files_matching to register a parser's file extensions. + # + # source://rdoc//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 + def remove_modeline(content); end + + # If there is a markup: parser_name comment at the front of the + # file, use it to determine the parser. For example: + # + # # markup: rdoc + # # Class comment can go here + # + # class C + # end + # + # The comment should appear as the first line of the +content+. + # + # If the content contains a shebang or editor modeline the comment may + # appear on the second or third line. + # + # Any comment style may be used to hide the markup comment. + # + # source://rdoc//rdoc/parser.rb#229 + def use_markup(content); end + + # Checks if +file+ is a zip file in disguise. Signatures from + # http://www.garykessler.net/library/file_sigs.html + # + # @return [Boolean] + # + # source://rdoc//rdoc/parser.rb#94 + def zip?(file); end + end +end + +# RDoc::Parser::C attempts to parse C extension files. It looks for +# the standard patterns that you find in extensions: +rb_define_class+, +# +rb_define_method+ and so on. It tries to find the corresponding +# C source for the methods and extract comments, but if we fail +# we don't worry too much. +# +# The comments associated with a Ruby method are extracted from the C +# comment block associated with the routine that _implements_ that +# method, that is to say the method whose name is given in the +# +rb_define_method+ call. For example, you might write: +# +# /* +# * Returns a new array that is a one-dimensional flattening of this +# * array (recursively). That is, for every element that is an array, +# * extract its elements into the new array. +# * +# * s = [ 1, 2, 3 ] #=> [1, 2, 3] +# * t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]] +# * a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10] +# * a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +# */ +# static VALUE +# rb_ary_flatten(VALUE ary) +# { +# ary = rb_obj_dup(ary); +# rb_ary_flatten_bang(ary); +# return ary; +# } +# +# ... +# +# void +# Init_Array(void) +# { +# ... +# rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0); +# +# Here RDoc will determine from the +rb_define_method+ line that there's a +# method called "flatten" in class Array, and will look for the implementation +# in the method +rb_ary_flatten+. It will then use the comment from that +# method in the HTML output. This method must be in the same source file +# as the +rb_define_method+. +# +# The comment blocks may include special directives: +# +# [Document-class: +name+] +# Documentation for the named class. +# +# [Document-module: +name+] +# Documentation for the named module. +# +# [Document-const: +name+] +# Documentation for the named +rb_define_const+. +# +# Constant values can be supplied on the first line of the comment like so: +# +# /* 300: The highest possible score in bowling */ +# rb_define_const(cFoo, "PERFECT", INT2FIX(300)); +# +# The value can contain internal colons so long as they are escaped with a \ +# +# [Document-global: +name+] +# Documentation for the named +rb_define_global_const+ +# +# [Document-variable: +name+] +# Documentation for the named +rb_define_variable+ +# +# [Document-method\: +method_name+] +# Documentation for the named method. Use this when the method name is +# unambiguous. +# +# [Document-method\: ClassName::method_name] +# Documentation for a singleton method in the given class. Use this when +# the method name alone is ambiguous. +# +# [Document-method\: ClassName#method_name] +# Documentation for a instance method in the given class. Use this when the +# method name alone is ambiguous. +# +# [Document-attr: +name+] +# Documentation for the named attribute. +# +# [call-seq: text up to an empty line] +# Because C source doesn't give descriptive names to Ruby-level parameters, +# you need to document the calling sequence explicitly +# +# In addition, RDoc assumes by default that the C method implementing a +# Ruby function is in the same source file as the rb_define_method call. +# If this isn't the case, add the comment: +# +# rb_define_method(....); // in filename +# +# As an example, we might have an extension that defines multiple classes +# in its Init_xxx method. We could document them using +# +# /* +# * Document-class: MyClass +# * +# * Encapsulate the writing and reading of the configuration +# * file. ... +# */ +# +# /* +# * Document-method: read_value +# * +# * call-seq: +# * cfg.read_value(key) -> value +# * cfg.read_value(key} { |key| } -> value +# * +# * Return the value corresponding to +key+ from the configuration. +# * In the second form, if the key isn't found, invoke the +# * block and return its value. +# */ +class RDoc::Parser::C < ::RDoc::Parser + include ::RDoc::Text + + # Prepares for parsing a C file. See RDoc::Parser#initialize for details on + # the arguments. + # + # @return [C] a new instance of C + # + # source://rdoc//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 + 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 + def classes; end + + # C file the parser is parsing + # + # source://rdoc//rdoc/parser/c.rb#138 + def content; end + + # C file the parser is parsing + # + # source://rdoc//rdoc/parser/c.rb#138 + def content=(_arg0); end + + # Scans #content for rb_define_alias + # + # source://rdoc//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 + def do_attrs; end + + # Scans #content for boot_defclass + # + # source://rdoc//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 + 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 + def do_constants; end + + # Scans #content for rb_include_module + # + # source://rdoc//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 + 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 + 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 + 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 + def find_alias_comment(class_name, new_name, old_name); end + + # Finds a comment for rb_define_attr, rb_attr or Document-attr. + # + # +var_name+ is the C class variable the attribute is defined on. + # +attr_name+ is the attribute's name. + # + # +read+ and +write+ are the read/write flags ('1' or '0'). Either both or + # neither must be provided. + # + # source://rdoc//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 + 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 + def find_class(raw_name, name, base_name = T.unsafe(nil)); end + + # Look for class or module documentation above Init_+class_name+(void), + # in a Document-class +class_name+ (or module) comment or above an + # rb_define_class (or module). If a comment is supplied above a matching + # Init_ and a rb_define_class the Init_ comment is used. + # + # /* + # * This is a comment for Foo + # */ + # Init_Foo(void) { + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # } + # + # /* + # * Document-class: Foo + # * This is a comment for Foo + # */ + # Init_foo(void) { + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # } + # + # /* + # * This is a comment for Foo + # */ + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # + # source://rdoc//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 + 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 + 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 + def find_override_comment(class_name, meth_obj); end + + # Generate a Ruby-method table + # + # source://rdoc//rdoc/parser/c.rb#574 + def gen_body_table(file_content); end + + # Generate a const table + # + # source://rdoc//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 + 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 + def handle_class_module(var_name, type, class_name, parent, in_module); end + + # Adds constants. By providing some_value: at the start of the comment you + # can override the C value of the comment to give a friendly definition. + # + # /* 300: The perfect score in bowling */ + # rb_define_const(cFoo, "PERFECT", INT2FIX(300)); + # + # Will override INT2FIX(300) with the value +300+ in the output + # RDoc. Values may include quotes and escaped colons (\:). + # + # source://rdoc//rdoc/parser/c.rb#922 + def handle_constants(type, var_name, const_name, definition); end + + # Removes #ifdefs that would otherwise confuse us + # + # source://rdoc//rdoc/parser/c.rb#972 + 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 + 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 + 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 + 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 + def load_variable_map(map_name); end + + # Look for directives in a normal comment block: + # + # /* + # * :title: My Awesome Project + # */ + # + # This method modifies the +comment+ + # + # source://rdoc//rdoc/parser/c.rb#1091 + 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 + def missing_dependencies; end + + # Creates a RDoc::Comment instance. + # + # source://rdoc//rdoc/parser/c.rb#1221 + 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 + 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 + 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 + def scan; end + + # Maps C variable names to names of Ruby singleton classes + # + # source://rdoc//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 + def top_level; end +end + +# :stopdoc: +# +# source://rdoc//rdoc/parser/c.rb#126 +RDoc::Parser::C::BOOL_ARG_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rdoc//rdoc/parser/c.rb#127 +RDoc::Parser::C::TRUE_VALUES = T.let(T.unsafe(nil), Array) + +# A ChangeLog file parser. +# +# This parser converts a ChangeLog into an RDoc::Markup::Document. When +# viewed as HTML a ChangeLog page will have an entry for each day's entries in +# the sidebar table of contents. +# +# This parser is meant to parse the MRI ChangeLog, but can be used to parse any +# {GNU style Change +# Log}[http://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html]. +class RDoc::Parser::ChangeLog < ::RDoc::Parser + include ::RDoc::Parser::Text + + # Attaches the +continuation+ of the previous line to the +entry_body+. + # + # Continued function listings are joined together as a single entry. + # Continued descriptions are joined to make a single paragraph. + # + # source://rdoc//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 + 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 + def create_entries(entries); end + + # Returns an RDoc::Markup::List containing the given +items+ in the + # ChangeLog + # + # source://rdoc//rdoc/parser/changelog.rb#83 + def create_items(items); end + + # Groups +entries+ by date. + # + # source://rdoc//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 + def parse_date(date); end + + # Parses the entries in the ChangeLog. + # + # Returns an Array of each ChangeLog entry in order of parsing. + # + # A ChangeLog entry is an Array containing the ChangeLog title (date and + # committer) and an Array of ChangeLog items (file and function changed with + # description). + # + # An example result would be: + # + # [ 'Tue Dec 4 08:33:46 2012 Eric Hodel ', + # [ 'README.EXT: Converted to RDoc format', + # 'README.EXT.ja: ditto']] + # + # source://rdoc//rdoc/parser/changelog.rb#149 + def parse_entries; end + + # Converts the ChangeLog into an RDoc::Markup::Document + # + # source://rdoc//rdoc/parser/changelog.rb#206 + def scan; end +end + +# The extension for Git commit log +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 + def create_entries(entries); end + + # Parses the entries in the Git commit logs + # + # source://rdoc//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 + def parse_info(info); end +end + +# source://rdoc//rdoc/parser/changelog.rb#271 +RDoc::Parser::ChangeLog::Git::HEADING_LEVEL = T.let(T.unsafe(nil), Integer) + +class RDoc::Parser::ChangeLog::Git::LogEntry < ::Struct + # @return [LogEntry] a new instance of LogEntry + # + # source://rdoc//rdoc/parser/changelog.rb#273 + def initialize(base, commit, author, email, date, contents); end + + # source://rdoc//rdoc/parser/changelog.rb#313 + def accept(visitor); end + + # source://rdoc//rdoc/parser/changelog.rb#294 + def aref; end + + # Returns the value of attribute author + # + # @return [Object] the current value of author + def author; end + + # Sets the attribute author + # + # @param value [Object] the value to set the attribute author to. + # @return [Object] the newly set value + def author=(_); end + + # Returns the value of attribute base + # + # @return [Object] the current value of base + def base; end + + # Sets the attribute base + # + # @param value [Object] the value to set the attribute base to. + # @return [Object] the newly set value + def base=(_); end + + # Returns the value of attribute commit + # + # @return [Object] the current value of commit + def commit; end + + # Sets the attribute commit + # + # @param value [Object] the value to set the attribute commit to. + # @return [Object] the newly set value + def commit=(_); end + + # Returns the value of attribute contents + # + # @return [Object] the current value of contents + def contents; end + + # Sets the attribute contents + # + # @param value [Object] the value to set the attribute contents to. + # @return [Object] the newly set value + def contents=(_); end + + # Returns the value of attribute date + # + # @return [Object] the current value of date + def date; end + + # Sets the attribute date + # + # @param value [Object] the value to set the attribute date to. + # @return [Object] the newly set value + def date=(_); end + + # Returns the value of attribute email + # + # @return [Object] the current value of email + def email; end + + # Sets the attribute email + # + # @param value [Object] the value to set the attribute email to. + # @return [Object] the newly set value + def email=(_); end + + # source://rdoc//rdoc/parser/changelog.rb#298 + def label(context = T.unsafe(nil)); end + + # source://rdoc//rdoc/parser/changelog.rb#290 + def level; end + + # source://rdoc//rdoc/parser/changelog.rb#330 + def pretty_print(q); end + + # source://rdoc//rdoc/parser/changelog.rb#302 + def text; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Parse a Markdown format file. The parsed RDoc::Markup::Document is attached +# as a file comment. +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 + def scan; end +end + +# Parse a RD format file. The parsed RDoc::Markup::Document is attached as a +# file comment. +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 + def scan; end +end + +# Wrapper for Ripper lex states +class RDoc::Parser::RipperStateLex + # New lexer for +code+. + # + # @return [RipperStateLex] a new instance of RipperStateLex + # + # source://rdoc//rdoc/parser/ripper_state_lex.rb#576 + def initialize(code); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#322 + def get_squashed_tk; end + + private + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#465 + def get_embdoc_tk(tk); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#474 + def get_heredoc_tk(heredoc_name, indent); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#549 + def get_op_tk(tk); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#447 + def get_regexp_tk(tk); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#420 + def get_string_tk(tk); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#373 + def get_symbol_tk(tk); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#511 + def get_words_tk(tk); end + + # @return [Boolean] + # + # source://rdoc//rdoc/parser/ripper_state_lex.rb#499 + def heredoc_end?(name, indent, tk); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#493 + def retrieve_heredoc_info(tk); end + + class << self + # Returns +true+ if lex state will be +END+ after +token+. + # + # @return [Boolean] + # + # source://rdoc//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 + def parse(code); end + end +end + +# source://rdoc//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 +RDoc::Parser::RipperStateLex::EXPR_ARG_ANY = T.let(T.unsafe(nil), Integer) + +# source://rdoc//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 +RDoc::Parser::RipperStateLex::EXPR_BEG_ANY = T.let(T.unsafe(nil), Integer) + +# source://rdoc//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 +RDoc::Parser::RipperStateLex::EXPR_CMDARG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//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 +RDoc::Parser::RipperStateLex::EXPR_END = T.let(T.unsafe(nil), Integer) + +# source://rdoc//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 +RDoc::Parser::RipperStateLex::EXPR_ENDFN = T.let(T.unsafe(nil), Integer) + +# source://rdoc//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 +RDoc::Parser::RipperStateLex::EXPR_FITEM = T.let(T.unsafe(nil), Integer) + +# source://rdoc//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 +RDoc::Parser::RipperStateLex::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# source://rdoc//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 +RDoc::Parser::RipperStateLex::EXPR_MID = T.let(T.unsafe(nil), Integer) + +# source://rdoc//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 +RDoc::Parser::RipperStateLex::EXPR_VALUE = T.let(T.unsafe(nil), Integer) + +class RDoc::Parser::RipperStateLex::InnerStateLex < ::Ripper::Filter + # @return [InnerStateLex] a new instance of InnerStateLex + # + # source://rdoc//rdoc/parser/ripper_state_lex.rb#313 + def initialize(code); end + + # source://rdoc//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 +RDoc::Parser::RipperStateLex::RIPPER_HAS_LEX_STATE = T.let(T.unsafe(nil), TrueClass) + +class RDoc::Parser::RipperStateLex::Token < ::Struct + # Returns the value of attribute char_no + # + # @return [Object] the current value of char_no + def char_no; end + + # Sets the attribute char_no + # + # @param value [Object] the value to set the attribute char_no to. + # @return [Object] the newly set value + def char_no=(_); end + + # Returns the value of attribute kind + # + # @return [Object] the current value of kind + def kind; end + + # Sets the attribute kind + # + # @param value [Object] the value to set the attribute kind to. + # @return [Object] the newly set value + def kind=(_); end + + # Returns the value of attribute line_no + # + # @return [Object] the current value of line_no + def line_no; end + + # Sets the attribute line_no + # + # @param value [Object] the value to set the attribute line_no to. + # @return [Object] the newly set value + def line_no=(_); end + + # Returns the value of attribute state + # + # @return [Object] the current value of state + def state; end + + # Sets the attribute state + # + # @param value [Object] the value to set the attribute state to. + # @return [Object] the newly set value + def state=(_); end + + # Returns the value of attribute text + # + # @return [Object] the current value of text + def text; end + + # Sets the attribute text + # + # @param value [Object] the value to set the attribute text to. + # @return [Object] the newly set value + def text=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Extracts code elements from a source file returning a TopLevel object +# containing the constituent file elements. +# +# This file is based on rtags +# +# RubyParser understands how to document: +# * classes +# * modules +# * methods +# * constants +# * aliases +# * private, public, protected +# * private_class_function, public_class_function +# * private_constant, public_constant +# * module_function +# * attr, attr_reader, attr_writer, attr_accessor +# * extra accessors given on the command line +# * metaprogrammed methods +# * require +# * include +# +# == Method Arguments +# +# -- +# NOTE: I don't think this works, needs tests, remove the paragraph following +# this block when known to work +# +# The parser extracts the arguments from the method definition. You can +# override this with a custom argument definition using the :args: directive: +# +# ## +# # This method tries over and over until it is tired +# +# def go_go_go(thing_to_try, tries = 10) # :args: thing_to_try +# puts thing_to_try +# go_go_go thing_to_try, tries - 1 +# end +# +# If you have a more-complex set of overrides you can use the :call-seq: +# directive: +# ++ +# +# The parser extracts the arguments from the method definition. You can +# override this with a custom argument definition using the :call-seq: +# directive: +# +# ## +# # This method can be called with a range or an offset and length +# # +# # :call-seq: +# # my_method(Range) +# # my_method(offset, length) +# +# def my_method(*args) +# end +# +# The parser extracts +yield+ expressions from method bodies to gather the +# yielded argument names. If your method manually calls a block instead of +# yielding or you want to override the discovered argument names use +# the :yields: directive: +# +# ## +# # My method is awesome +# +# def my_method(&block) # :yields: happy, times +# block.call 1, 2 +# end +# +# == Metaprogrammed Methods +# +# To pick up a metaprogrammed method, the parser looks for a comment starting +# with '##' before an identifier: +# +# ## +# # This is a meta-programmed method! +# +# add_my_method :meta_method, :arg1, :arg2 +# +# The parser looks at the token after the identifier to determine the name, in +# this example, :meta_method. If a name cannot be found, a warning is printed +# and 'unknown is used. +# +# You can force the name of a method using the :method: directive: +# +# ## +# # :method: some_method! +# +# By default, meta-methods are instance methods. To indicate that a method is +# a singleton method instead use the :singleton-method: directive: +# +# ## +# # :singleton-method: +# +# You can also use the :singleton-method: directive with a name: +# +# ## +# # :singleton-method: some_method! +# +# You can define arguments for metaprogrammed methods via either the +# :call-seq:, :arg: or :args: directives. +# +# Additionally you can mark a method as an attribute by +# using :attr:, :attr_reader:, :attr_writer: or :attr_accessor:. Just like +# for :method:, the name is optional. +# +# ## +# # :attr_reader: my_attr_name +# +# == Hidden methods and attributes +# +# You can provide documentation for methods that don't appear using +# the :method:, :singleton-method: and :attr: directives: +# +# ## +# # :attr_writer: ghost_writer +# # There is an attribute here, but you can't see it! +# +# ## +# # :method: ghost_method +# # There is a method here, but you can't see it! +# +# ## +# # this is a comment for a regular method +# +# def regular_method() end +# +# Note that by default, the :method: directive will be ignored if there is a +# standard rdocable item following it. +class RDoc::Parser::Ruby < ::RDoc::Parser + include ::RDoc::TokenStream + include ::RDoc::Parser::RubyTools + + # Creates a new Ruby parser. + # + # @return [Ruby] a new instance of Ruby + # + # source://rdoc//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 + def collect_first_comment; end + + # Consumes trailing whitespace from the token stream + # + # source://rdoc//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 + 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 + def create_module_alias(container, constant, rhs_name); end + + # Aborts with +msg+ + # + # source://rdoc//rdoc/parser/ruby.rb#313 + def error(msg); end + + # Looks for a true or false token. + # + # source://rdoc//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 + 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 + 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 + def get_constant; end + + # Little hack going on here. In the statement: + # + # f = 2*(1+yield) + # + # We see the RPAREN as the next token, so we need to exit early. This still + # won't catch all cases (such as "a = yield + 1" + # + # source://rdoc//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 + def get_included_module_with_optional_parens; end + + # Retrieves the method container for a singleton method. + # + # source://rdoc//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 + 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 + def get_tkread_clean(pattern, replacement); end + + # Extracts the visibility information for the visibility token +tk+ + # and +single+ class type identifier. + # + # Returns the visibility type (a string), the visibility (a symbol) and + # +singleton+ if the methods following should be converted to singleton + # methods. + # + # source://rdoc//rdoc/parser/ruby.rb#208 + def get_visibility_information(tk, single); end + + # Look for directives in a normal comment block: + # + # # :stopdoc: + # # Don't display comment from this point forward + # + # This routine modifies its +comment+ parameter. + # + # source://rdoc//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 + def make_message(message); end + + # Creates a comment with the correct format + # + # source://rdoc//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 + 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 + 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 + def parse_attr_accessor(context, single, tk, comment); end + + # Extracts call parameters from the token stream. + # + # source://rdoc//rdoc/parser/ruby.rb#801 + def parse_call_parameters(tk); end + + # Parses a class in +context+ with +comment+ + # + # source://rdoc//rdoc/parser/ruby.rb#844 + def parse_class(container, single, tk, comment); end + + # Parses and creates a regular class + # + # source://rdoc//rdoc/parser/ruby.rb#878 + 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 + 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 + 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 + def parse_comment_attr(container, type, name, comment); end + + # source://rdoc//rdoc/parser/ruby.rb#1123 + 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 + 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 + def parse_constant(container, tk, comment, ignore_constants = T.unsafe(nil)); end + + # source://rdoc//rdoc/parser/ruby.rb#1024 + 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 + 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 + 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 + 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 + def parse_included_with_activesupport_concern(container, comment); end + + # Parses a meta-programmed attribute and creates an RDoc::Attr. + # + # To create foo and bar attributes on class C with comment "My attributes": + # + # class C + # + # ## + # # :attr: + # # + # # My attributes + # + # my_attr :foo, :bar + # + # end + # + # To create a foo attribute on class C with comment "My attribute": + # + # class C + # + # ## + # # :attr: foo + # # + # # My attribute + # + # my_attr :foo, :bar + # + # end + # + # source://rdoc//rdoc/parser/ruby.rb#1299 + def parse_meta_attr(context, single, tk, comment); end + + # Parses a meta-programmed method + # + # source://rdoc//rdoc/parser/ruby.rb#1333 + 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 + 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 + 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 + def parse_method(container, single, tk, comment); end + + # Parses a method that needs to be ignored. + # + # source://rdoc//rdoc/parser/ruby.rb#1514 + def parse_method_dummy(container); end + + # Parses the name of a method in +container+. + # + # Returns the method name, the container it is in (for def Foo.name) and if + # it is a singleton or regular method. + # + # source://rdoc//rdoc/parser/ruby.rb#1527 + 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 + 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 + def parse_method_name_singleton(container, name_t); end + + # Extracts +yield+ parameters from +method+ + # + # source://rdoc//rdoc/parser/ruby.rb#1616 + def parse_method_or_yield_parameters(method = T.unsafe(nil), modifiers = T.unsafe(nil)); end + + # Capture the method's parameters. Along the way, look for a comment + # containing: + # + # # yields: .... + # + # and add this as the block_params for the method + # + # source://rdoc//rdoc/parser/ruby.rb#1683 + def parse_method_parameters(method); end + + # Parses the parameters and body of +meth+ + # + # source://rdoc//rdoc/parser/ruby.rb#1484 + 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 + def parse_module(container, single, tk, comment); end + + # Parses an RDoc::Require in +context+ containing +comment+ + # + # source://rdoc//rdoc/parser/ruby.rb#1720 + def parse_require(context, comment); end + + # Parses a rescue + # + # source://rdoc//rdoc/parser/ruby.rb#1741 + def parse_rescue; end + + # The core of the Ruby parser. + # + # source://rdoc//rdoc/parser/ruby.rb#1772 + 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 + 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 + 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 + def parse_symbol_arg_space(no, tk); end + + # Returns symbol text from the next token + # + # source://rdoc//rdoc/parser/ruby.rb#2036 + def parse_symbol_in_arg; end + + # Parses statements in the top-level +container+ + # + # source://rdoc//rdoc/parser/ruby.rb#2053 + def parse_top_level_statements(container); end + + # Determines the visibility in +container+ from +tk+ + # + # source://rdoc//rdoc/parser/ruby.rb#2071 + def parse_visibility(container, single, tk); end + + # Determines the block parameter for +context+ + # + # source://rdoc//rdoc/parser/ruby.rb#2110 + def parse_yield(context, single, tk, method); end + + # Directives are modifier comments that can appear after class, module, or + # method names. For example: + # + # def fred # :yields: a, b + # + # or: + # + # + # We return the directive name and any parameters as a two element array if + # the name is in +allowed+. A directive can be found anywhere up to the end + # of the current line. + # + # source://rdoc//rdoc/parser/ruby.rb#2131 + def read_directive(allowed); end + + # Handles directives following the definition for +context+ (any + # RDoc::CodeObject) if the directives are +allowed+ at this point. + # + # See also RDoc::Markup::PreProcess#handle_directive + # + # source://rdoc//rdoc/parser/ruby.rb#2163 + 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 + def record_location(container); end + + # Retrieve comment body without =begin/=end + # + # source://rdoc//rdoc/parser/ruby.rb#1761 + def retrieve_comment_body(tk); end + + # Scans this Ruby file for Ruby constructs + # + # source://rdoc//rdoc/parser/ruby.rb#2194 + def scan; end + + # skip the var [in] part of a 'for' statement + # + # source://rdoc//rdoc/parser/ruby.rb#2282 + def skip_for_variable; end + + # Skips the next method in +container+ + # + # source://rdoc//rdoc/parser/ruby.rb#2293 + def skip_method(container); end + + # while, until, and for have an optional do + # + # source://rdoc//rdoc/parser/ruby.rb#2241 + 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 + def skip_parentheses(&block); end + + # Skip spaces until a comment is found + # + # source://rdoc//rdoc/parser/ruby.rb#2302 + 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 + def suppress_parents(container, ancestor); end + + # Return +true+ if +tk+ is a newline. + # + # @return [Boolean] + # + # source://rdoc//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 + 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 + def warn(message); end +end + +# Collection of methods for writing parsers +module RDoc::Parser::RubyTools + # Adds a token listener +obj+, but you should probably use token_listener + # + # source://rdoc//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 + 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 + def get_tk_until(*tokens); end + + # Retrieves a String representation of the read tokens + # + # source://rdoc//rdoc/parser/ruby_tools.rb#73 + def get_tkread; end + + # Peek equivalent for get_tkread + # + # source://rdoc//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 + def peek_tk; end + + # Removes the token listener +obj+ + # + # source://rdoc//rdoc/parser/ruby_tools.rb#97 + def remove_token_listener(obj); end + + # Resets the tools + # + # source://rdoc//rdoc/parser/ruby_tools.rb#104 + def reset; end + + # Skips whitespace tokens including newlines + # + # source://rdoc//rdoc/parser/ruby_tools.rb#115 + def skip_tkspace; end + + # Skips whitespace tokens excluding newlines + # + # source://rdoc//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 + def token_listener(obj); end + + # Returns +tk+ to the scanner + # + # source://rdoc//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. +class RDoc::Parser::Simple < ::RDoc::Parser + include ::RDoc::Parser::Text + + # Prepare to parse a plain file + # + # @return [Simple] a new instance of Simple + # + # source://rdoc//rdoc/parser/simple.rb#17 + def initialize(top_level, file_name, content, options, stats); end + + # source://rdoc//rdoc/parser/simple.rb#12 + def content; end + + # Removes the encoding magic comment from +text+ + # + # source://rdoc//rdoc/parser/simple.rb#41 + def remove_coding_comment(text); end + + # Removes private comments. + # + # Unlike RDoc::Comment#remove_private this implementation only looks for two + # dashes at the beginning of the line. Three or more dashes are considered + # to be a rule and ignored. + # + # source://rdoc//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 + def scan; end +end + +# racc/parser.rb end +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 + def parse(rd); end + end +end + +# RD format parser for headings, paragraphs, lists, verbatim sections that +# exist as blocks. +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 + def initialize; end + + # reduce 0 omitted + # + # source://rdoc//rdoc/rd/block_parser.rb#1334 + def _reduce_1(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1376 + def _reduce_10(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1381 + def _reduce_11(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1386 + def _reduce_12(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1394 + def _reduce_13(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1400 + def _reduce_14(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1407 + def _reduce_15(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1412 + def _reduce_16(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1417 + def _reduce_17(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1428 + def _reduce_18(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1439 + def _reduce_19(val, _values, result); end + + # @raise [ParseError] + # + # source://rdoc//rdoc/rd/block_parser.rb#1339 + def _reduce_2(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1445 + def _reduce_20(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1451 + def _reduce_21(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1457 + def _reduce_22(val, _values, result); end + + # reduce 26 omitted + # + # source://rdoc//rdoc/rd/block_parser.rb#1473 + def _reduce_27(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1479 + def _reduce_28(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1485 + def _reduce_29(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1344 + def _reduce_3(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1491 + def _reduce_30(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1496 + def _reduce_31(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1501 + def _reduce_32(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1507 + def _reduce_33(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1512 + def _reduce_34(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1517 + def _reduce_35(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1523 + def _reduce_36(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1529 + def _reduce_37(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1534 + def _reduce_38(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1539 + def _reduce_39(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1349 + def _reduce_4(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1545 + def _reduce_40(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1551 + def _reduce_41(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1556 + def _reduce_42(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1561 + def _reduce_43(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1569 + def _reduce_44(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1575 + def _reduce_45(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1580 + def _reduce_46(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1585 + def _reduce_47(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1591 + def _reduce_48(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1597 + def _reduce_49(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1354 + def _reduce_5(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1603 + def _reduce_50(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1609 + def _reduce_51(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1615 + def _reduce_52(val, _values, result); end + + # reduce 53 omitted + # + # source://rdoc//rdoc/rd/block_parser.rb#1622 + def _reduce_54(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1627 + def _reduce_55(val, _values, result); end + + # reduce 56 omitted + # + # source://rdoc//rdoc/rd/block_parser.rb#1634 + def _reduce_57(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1359 + def _reduce_6(val, _values, result); end + + # reduce 61 omitted + # + # source://rdoc//rdoc/rd/block_parser.rb#1647 + def _reduce_62(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1653 + def _reduce_63(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1659 + def _reduce_64(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1665 + def _reduce_65(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1671 + def _reduce_66(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1677 + def _reduce_67(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1682 + def _reduce_68(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1687 + def _reduce_69(val, _values, result); end + + # reduce 70 omitted + # + # source://rdoc//rdoc/rd/block_parser.rb#1694 + def _reduce_71(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1699 + def _reduce_72(val, _values, result); end + + # reduce 7 omitted + # + # source://rdoc//rdoc/rd/block_parser.rb#1366 + def _reduce_8(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1371 + def _reduce_9(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1704 + def _reduce_none(val, _values, result); end + + # Adds footnote +content+ to the document + # + # source://rdoc//rdoc/rd/block_parser.rb#1049 + def add_footnote(content); end + + # Adds label +label+ to the document + # + # source://rdoc//rdoc/rd/block_parser.rb#1063 + def add_label(label); end + + # Retrieves the content of +values+ as a single String + # + # source://rdoc//rdoc/rd/block_parser.rb#1032 + def content(values); end + + # Footnotes for this document + # + # source://rdoc//rdoc/rd/block_parser.rb#683 + def footnotes; end + + # Path to find included files in + # + # source://rdoc//rdoc/rd/block_parser.rb#693 + def include_path; end + + # Path to find included files in + # + # source://rdoc//rdoc/rd/block_parser.rb#693 + def include_path=(_arg0); end + + # Labels for items in this document + # + # source://rdoc//rdoc/rd/block_parser.rb#688 + def labels; end + + # Current line number + # + # source://rdoc//rdoc/rd/block_parser.rb#987 + def line_index; end + + # Returns the next token from the document + # + # source://rdoc//rdoc/rd/block_parser.rb#755 + def next_token; end + + # Raises a ParseError when invalid formatting is found + # + # @raise [ParseError] + # + # source://rdoc//rdoc/rd/block_parser.rb#971 + def on_error(et, ev, _values); end + + # Creates a paragraph for +value+ + # + # source://rdoc//rdoc/rd/block_parser.rb#1039 + def paragraph(value); end + + # Parses +src+ and returns an RDoc::Markup::Document. + # + # source://rdoc//rdoc/rd/block_parser.rb#711 + def parse(src); end + + private + + # Cuts off excess whitespace in +src+ + # + # source://rdoc//rdoc/rd/block_parser.rb#935 + def cut_off(src); end + + # Formats line numbers +line_numbers+ prettily + # + # source://rdoc//rdoc/rd/block_parser.rb#1023 + def format_line_num(*line_numbers); end + + # Retrieves the content for +file+ from the include_path + # + # source://rdoc//rdoc/rd/block_parser.rb#1004 + 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 + def if_current_indent_equal(indent); end + + # Parses subtree +src+ + # + # source://rdoc//rdoc/rd/block_parser.rb#994 + def parse_subtree(src); end + + # source://rdoc//rdoc/rd/block_parser.rb#962 + def set_term_to_element(parent, term); end +end + +# source://rdoc//rdoc/rd/block_parser.rb#1328 +RDoc::RD::BlockParser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# Inline keeps track of markup and labels to create proper links. +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 + def initialize(rdoc, reference); end + + # source://rdoc//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 + def append(more); end + + # source://rdoc//rdoc/rd/inline.rb#65 + def inspect; end + + # The markup of this reference in RDoc format + # + # source://rdoc//rdoc/rd/inline.rb#15 + def rdoc; end + + # The text of the reference + # + # source://rdoc//rdoc/rd/inline.rb#10 + def reference; end + + # The markup of this reference in RDoc format + # + # source://rdoc//rdoc/rd/inline.rb#15 + def to_s; end + + class << self + # Creates a new Inline for +rdoc+ and +reference+. + # + # +rdoc+ may be another Inline or a String. If +reference+ is not given it + # will use the text from +rdoc+. + # + # source://rdoc//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. +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 + def initialize(block_parser); end + + # reduce 100 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1750 + def _reduce_101(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1757 + def _reduce_102(val, _values, result); end + + # reduce 108 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1775 + def _reduce_109(val, _values, result); end + + # reduce 110 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1782 + def _reduce_111(val, _values, result); end + + # reduce 112 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1790 + def _reduce_113(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1795 + def _reduce_114(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1800 + def _reduce_115(val, _values, result); end + + # reduce 12 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1413 + def _reduce_13(val, _values, result); end + + # reduce 135 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1845 + def _reduce_136(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1420 + def _reduce_14(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1427 + def _reduce_15(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1434 + def _reduce_16(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1441 + def _reduce_17(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1449 + def _reduce_18(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1455 + def _reduce_19(val, _values, result); end + + # reduce 1 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1385 + def _reduce_2(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1463 + def _reduce_20(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1469 + def _reduce_21(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1478 + def _reduce_22(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1484 + def _reduce_23(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1490 + def _reduce_24(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1496 + def _reduce_25(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1505 + def _reduce_26(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1511 + def _reduce_27(val, _values, result); end + + # reduce 28 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1520 + def _reduce_29(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1390 + def _reduce_3(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1525 + def _reduce_30(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1530 + def _reduce_31(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1536 + def _reduce_32(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1542 + def _reduce_33(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1548 + def _reduce_34(val, _values, result); end + + # reduce 35 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1556 + def _reduce_36(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1561 + def _reduce_37(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1566 + def _reduce_38(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1572 + def _reduce_39(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1578 + def _reduce_40(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1584 + def _reduce_41(val, _values, result); end + + # reduce 42 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1592 + def _reduce_43(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1598 + def _reduce_44(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1604 + def _reduce_45(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1610 + def _reduce_46(val, _values, result); end + + # reduce 56 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1636 + def _reduce_57(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1642 + def _reduce_58(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1648 + def _reduce_59(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1654 + def _reduce_60(val, _values, result); end + + # reduce 61 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1661 + def _reduce_62(val, _values, result); end + + # reduce 63 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1669 + def _reduce_64(val, _values, result); end + + # reduce 77 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1701 + def _reduce_78(val, _values, result); end + + # reduce 137 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1852 + 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 + def inline(rdoc, reference = T.unsafe(nil)); end + + # Returns the next token from the inline text + # + # source://rdoc//rdoc/rd/inline_parser.rb#756 + def next_token; end + + # Returns words following an error + # + # source://rdoc//rdoc/rd/inline_parser.rb#876 + def next_words_on_error; end + + # Raises a ParseError when invalid formatting is found + # + # @raise [ParseError] + # + # source://rdoc//rdoc/rd/inline_parser.rb#836 + 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 + def parse(inline); end + + # Returns words before the error + # + # source://rdoc//rdoc/rd/inline_parser.rb#853 + def prev_words_on_error(ev); end + + private + + # Returns the last line of +src+ + # + # source://rdoc//rdoc/rd/inline_parser.rb#864 + def last_line(src); end +end + +# source://rdoc//rdoc/rd/inline_parser.rb#1377 +RDoc::RD::InlineParser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# This is the driver for generating RDoc output. It handles file parsing and +# generation of output. +# +# To use this class to generate RDoc output via the API, the recommended way +# is: +# +# rdoc = RDoc::RDoc.new +# options = RDoc::Options.load_options # returns an RDoc::Options instance +# # set extra options +# rdoc.document options +# +# You can also generate output like the +rdoc+ executable: +# +# rdoc = RDoc::RDoc.new +# rdoc.document argv +# +# Where +argv+ is an array of strings, each corresponding to an argument you'd +# give rdoc on the command line. See rdoc --help for details. +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 + def initialize; end + + # Generates documentation or a coverage report depending upon the settings + # in +options+. + # + # +options+ can be either an RDoc::Options instance or an array of strings + # equivalent to the strings that would be passed on the command line like + # %w[-q -o doc -t My\ Doc\ Title]. #document will automatically + # call RDoc::Options#finish if an options instance was given. + # + # For a list of options, see either RDoc::Options or rdoc --help. + # + # By default, output will be stored in a directory called "doc" below the + # current directory, so make sure you're somewhere writable before invoking. + # + # source://rdoc//rdoc/rdoc.rb#450 + def document(options); end + + # Report an error message and exit + # + # @raise [RDoc::Error] + # + # source://rdoc//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 + 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 + def generate; end + + # Generator instance used for creating output + # + # source://rdoc//rdoc/rdoc.rb#52 + def generator; end + + # Generator instance used for creating output + # + # source://rdoc//rdoc/rdoc.rb#52 + def generator=(_arg0); end + + # Turns RDoc from stdin into HTML + # + # source://rdoc//rdoc/rdoc.rb#142 + def handle_pipe; end + + # Installs a siginfo handler that prints the current filename. + # + # source://rdoc//rdoc/rdoc.rb#157 + def install_siginfo_handler; end + + # Hash of files and their last modified times. + # + # source://rdoc//rdoc/rdoc.rb#57 + def last_modified; end + + # Return a list of the files to be processed in a directory. We know that + # this directory doesn't have a .document file, so we're looking for real + # files. However we may well contain subdirectories which must be tested + # for .document files. + # + # source://rdoc//rdoc/rdoc.rb#323 + def list_files_in_directory(dir); end + + # Given a list of files and directories, create a list of all the Ruby + # files they contain. + # + # If +force_doc+ is true we always add the given files, if false, only + # add files that we guarantee we can parse. It is true when looking at + # files given on the command line, false when recursing through + # subdirectories. + # + # The effect of this is that if you want a file with a non-standard + # extension parsed, you must name it explicitly. + # + # source://rdoc//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 + def options; end + + # RDoc options + # + # source://rdoc//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 + 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 + def parse_dot_doc_file(in_dir, filename); end + + # Parses +filename+ and returns an RDoc::TopLevel + # + # source://rdoc//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 + def parse_files(files); end + + # Removes a siginfo handler and replaces the previous + # + # source://rdoc//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 + 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 + def setup_output_dir(dir, force); end + + # Accessor for statistics. Available after each call to parse_files + # + # source://rdoc//rdoc/rdoc.rb#67 + def stats; end + + # The current documentation store + # + # source://rdoc//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 + def store=(store); end + + # Update the flag file in an output directory. + # + # source://rdoc//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 + def add_generator(klass); end + + # Active RDoc::RDoc instance + # + # source://rdoc//rdoc/rdoc.rb#85 + def current; end + + # Sets the active RDoc::RDoc instance + # + # source://rdoc//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 +RDoc::RDoc::TEST_SUITE_DIRECTORY_NAMES = T.let(T.unsafe(nil), Array) + +# List of directory names always skipped +# +# source://rdoc//rdoc/rdoc.rb#41 +RDoc::RDoc::UNCONDITIONALLY_SKIPPED_DIRECTORIES = T.let(T.unsafe(nil), Array) + +# The RI driver implements the command-line ri tool. +# +# The driver supports: +# * loading RI data from: +# * Ruby's standard library +# * RubyGems +# * ~/.rdoc +# * A user-supplied directory +# * Paging output (uses RI_PAGER environment variable, PAGER environment +# variable or the less, more and pager programs) +# * Interactive mode with tab-completion +# * Abbreviated names (ri Zl shows Zlib documentation) +# * Colorized output +# * Merging output from multiple RI data sources +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 + def initialize(initial_options = T.unsafe(nil)); end + + # Adds paths for undocumented classes +also_in+ to +out+ + # + # source://rdoc//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 + def add_class(out, name, classes); end + + # Adds +extends+ to +out+ + # + # source://rdoc//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 + def add_extension_modules(out, type, extensions); end + + # Renders multiple included +modules+ from +store+ to +out+. + # + # source://rdoc//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 + def add_extension_modules_single(out, store, include); end + + # Adds "(from ...)" to +out+ for +store+ + # + # source://rdoc//rdoc/ri/driver.rb#466 + def add_from(out, store); end + + # Adds +includes+ to +out+ + # + # source://rdoc//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 + def add_method(out, name); end + + # Adds documentation for all methods in +klass+ to +out+ + # + # source://rdoc//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 + def add_method_list(out, methods, name); end + + # Returns ancestor classes of +klass+ + # + # source://rdoc//rdoc/ri/driver.rb#591 + def ancestors_of(klass); end + + # source://rdoc//rdoc/ri/driver.rb#926 + def check_did_you_mean; end + + # For RubyGems backwards compatibility + # + # source://rdoc//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 + def class_document(name, found, klasses, includes, extends); end + + # Adds the class +comment+ to +out+. + # + # source://rdoc//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 + 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 + 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 + def classes_and_includes_and_extends_for(name); end + + # Completes +name+ based on the caches. For Readline + # + # source://rdoc//rdoc/ri/driver.rb#739 + def complete(name); end + + # source://rdoc//rdoc/ri/driver.rb#750 + def complete_klass(name, klass, selector, method, completions); end + + # source://rdoc//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 + def display(document); end + + # Outputs formatted RI data for class +name+. Groups undocumented classes + # + # source://rdoc//rdoc/ri/driver.rb#802 + def display_class(name); end + + # Outputs formatted RI data for method +name+ + # + # source://rdoc//rdoc/ri/driver.rb#818 + def display_method(name); end + + # Outputs formatted RI data for the class or method +name+. + # + # Returns true if +name+ was found, false if it was not an alternative could + # be guessed, raises an error if +name+ couldn't be guessed. + # + # source://rdoc//rdoc/ri/driver.rb#832 + def display_name(name); end + + # Displays each name in +name+ + # + # source://rdoc//rdoc/ri/driver.rb#861 + def display_names(names); end + + # Outputs formatted RI data for page +name+. + # + # source://rdoc//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 + 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 + 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 + def expand_name(name); end + + # Filters the methods in +found+ trying to find a match for +name+. + # + # source://rdoc//rdoc/ri/driver.rb#981 + def filter_methods(found, name); end + + # Yields items matching +name+ including the store they were found in, the + # class being searched for, the class they were found in (an ancestor) the + # types of methods to look up (from #method_type), and the method name being + # searched for + # + # source://rdoc//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", + # "home" or "site". + # + # See also RDoc::Store#source + # + # @raise [RDoc::RI::Driver::NotFoundError] + # + # source://rdoc//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 + def formatter(io); end + + # Runs ri interactively using Readline if it is available. + # + # source://rdoc//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 + def list_known_classes(names = T.unsafe(nil)); end + + # Returns an Array of methods matching +name+ + # + # source://rdoc//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 + 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 + def load_methods_matching(name); end + + # Returns a filtered list of methods matching +name+ + # + # source://rdoc//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 + def method_document(name, filtered); end + + # Returns the type of method (:both, :instance, :class) for +selector+ + # + # source://rdoc//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 + def name_regexp(name); end + + # Paginates output through a pager program. + # + # source://rdoc//rdoc/ri/driver.rb#1298 + def page; end + + # Are we using a pager? + # + # @return [Boolean] + # + # source://rdoc//rdoc/ri/driver.rb#1316 + def paging?; end + + # Extracts the class, selector and method name parts from +name+ like + # Foo::Bar#baz. + # + # NOTE: Given Foo::Bar, Bar is considered a class even though it may be a + # method + # + # source://rdoc//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 + def render_class(out, store, klass, also_in); end + + # source://rdoc//rdoc/ri/driver.rb#1389 + def render_method(out, store, method, name); end + + # source://rdoc//rdoc/ri/driver.rb#1409 + def render_method_arguments(out, arglists); end + + # source://rdoc//rdoc/ri/driver.rb#1418 + def render_method_comment(out, method, alias_for = T.unsafe(nil)); end + + # source://rdoc//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 + 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 + def setup_pager; end + + # Show all method documentation following a class or module + # + # source://rdoc//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 + def show_all=(_arg0); end + + # Starts a WEBrick server for ri. + # + # source://rdoc//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 + def stores; end + + # An RDoc::RI::Store for each entry in the RI path + # + # source://rdoc//rdoc/ri/driver.rb#67 + def stores=(_arg0); end + + # Controls the user of the pager vs $stdout + # + # source://rdoc//rdoc/ri/driver.rb#72 + def use_stdout; end + + # Controls the user of the pager vs $stdout + # + # source://rdoc//rdoc/ri/driver.rb#72 + def use_stdout=(_arg0); end + + class << self + # Default options for ri + # + # source://rdoc//rdoc/ri/driver.rb#77 + def default_options; end + + # Dump +data_path+ using pp + # + # source://rdoc//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 + def process_args(argv); end + + # Runs the ri command line executable using +argv+ + # + # source://rdoc//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 +class RDoc::RI::Driver::NotFoundError < ::RDoc::RI::Driver::Error + # @return [NotFoundError] a new instance of NotFoundError + # + # source://rdoc//rdoc/ri/driver.rb#37 + def initialize(klass, suggestion_proc = T.unsafe(nil)); end + + # source://rdoc//rdoc/ri/driver.rb#49 + def message; end + + # Name that wasn't found + # + # source://rdoc//rdoc/ri/driver.rb#45 + def name; end +end + +# For RubyGems backwards compatibility +module RDoc::RI::Formatter; end + +# source://rdoc//rdoc/ri/store.rb#4 +RDoc::RI::Store = RDoc::Store + +# A file loaded by \#require +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 + def initialize(name, comment); end + + # source://rdoc//rdoc/require.rb#22 + def inspect; end + + # Name of the required file + # + # source://rdoc//rdoc/require.rb#10 + def name; end + + # Name of the required file + # + # source://rdoc//rdoc/require.rb#10 + def name=(_arg0); end + + # source://rdoc//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 + def top_level; end +end + +# This is a WEBrick servlet that allows you to browse ri documentation. +# +# You can show documentation through either `ri --server` or, with RubyGems +# 2.0 or newer, `gem server`. For ri, the server runs on port 8214 by +# default. For RubyGems the server runs on port 8808 by default. +# +# You can use this servlet in your own project by mounting it on a WEBrick +# server: +# +# require 'webrick' +# +# server = WEBrick::HTTPServer.new Port: 8000 +# +# server.mount '/', RDoc::Servlet +# +# If you want to mount the servlet some other place than the root, provide the +# base path when mounting: +# +# server.mount '/rdoc', RDoc::Servlet, '/rdoc' +class RDoc::Servlet < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a new WEBrick servlet. + # + # Use +mount_path+ when mounting the servlet somewhere other than /. + # + # Use +extra_doc_dirs+ for additional documentation directories. + # + # +server+ is provided automatically by WEBrick when mounting. +stores+ and + # +cache+ are provided automatically by the servlet. + # + # @return [Servlet] a new instance of Servlet + # + # source://rdoc//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 + def asset(generator_name, req, res); end + + # Maps an asset type to its path on the filesystem + # + # source://rdoc//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 + def do_GET(req, res); end + + # Fills in +res+ with the class, module or page for +req+ from +store+. + # + # +path+ is relative to the mount_path and is used to determine the class, + # module or page name (/RDoc/Servlet.html becomes RDoc::Servlet). + # +generator+ is used to create the page. + # + # source://rdoc//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 + 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 + def documentation_source(path); end + + # Generates an error page for the +exception+ while handling +req+ on +res+. + # + # source://rdoc//rdoc/servlet.rb#203 + def error(exception, req, res); end + + # Instantiates a Darkfish generator for +store+ + # + # source://rdoc//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 + def if_modified_since(req, res, path = T.unsafe(nil)); end + + # Returns an Array of installed documentation. + # + # Each entry contains the documentation name (gem name, 'Ruby + # Documentation', etc.), the path relative to the mount point, whether the + # 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 + def installed_docs; end + + # Returns a 404 page built by +generator+ for +req+ on +res+. + # + # source://rdoc//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 + def options; end + + # Enumerates the ri paths. See RDoc::RI::Paths#each + # + # source://rdoc//rdoc/servlet.rb#327 + def ri_paths(&block); end + + # Generates the root page on +res+. +req+ is ignored. + # + # source://rdoc//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 + 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 + 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 + 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 + def get_instance(server, *options); end + end +end + +# A singleton class +class RDoc::SingleClass < ::RDoc::ClassModule + # Adds the superclass to the included modules. + # + # source://rdoc//rdoc/single_class.rb#10 + def ancestors; end + + # source://rdoc//rdoc/single_class.rb#14 + def aref_prefix; end + + # The definition of this singleton class, class << MyClassName + # + # source://rdoc//rdoc/single_class.rb#21 + def definition; end + + # source://rdoc//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. +class RDoc::Stats + include ::RDoc::Text + + # Creates a new Stats that will have +num_files+. +verbosity+ defaults to 1 + # which will create an RDoc::Stats::Normal outputter. + # + # @return [Stats] a new instance of Stats + # + # source://rdoc//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 + def add_alias(as); end + + # Records the parsing of an attribute +attribute+ + # + # source://rdoc//rdoc/stats.rb#59 + def add_attribute(attribute); end + + # Records the parsing of a class +klass+ + # + # source://rdoc//rdoc/stats.rb#66 + def add_class(klass); end + + # Records the parsing of +constant+ + # + # source://rdoc//rdoc/stats.rb#73 + def add_constant(constant); end + + # Records the parsing of +file+ + # + # source://rdoc//rdoc/stats.rb#80 + def add_file(file); end + + # Records the parsing of +method+ + # + # source://rdoc//rdoc/stats.rb#88 + def add_method(method); end + + # Records the parsing of a module +mod+ + # + # source://rdoc//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 + def begin_adding; end + + # Calculates documentation totals and percentages for classes, modules, + # constants, attributes and methods. + # + # source://rdoc//rdoc/stats.rb#110 + def calculate; end + + # Output level for the coverage report + # + # source://rdoc//rdoc/stats.rb#13 + def coverage_level; end + + # Sets coverage report level. Accepted values are: + # + # false or nil:: No report + # 0:: Classes, modules, constants, attributes, methods + # 1:: Level 0 + method parameters + # + # source://rdoc//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 + def doc_stats(collection); end + + # Call this to mark the end of parsing for display purposes + # + # source://rdoc//rdoc/stats.rb#175 + def done_adding; end + + # Count of files parsed during parsing + # + # source://rdoc//rdoc/stats.rb#18 + def files_so_far; end + + # The documentation status of this project. +true+ when 100%, +false+ when + # less than 100% and +nil+ when unknown. + # + # Set by calling #calculate + # + # @return [Boolean] + # + # source://rdoc//rdoc/stats.rb#185 + def fully_documented?; end + + # A report that says you did a great job! + # + # source://rdoc//rdoc/stats.rb#192 + def great_job; end + + # Total number of files found + # + # source://rdoc//rdoc/stats.rb#23 + def num_files; end + + # Calculates the percentage of items documented. + # + # source://rdoc//rdoc/stats.rb#204 + def percent_doc; end + + # Returns a report on which items are not documented + # + # source://rdoc//rdoc/stats.rb#218 + def report; end + + # Returns a report on undocumented attributes in ClassModule +cm+ + # + # source://rdoc//rdoc/stats.rb#259 + def report_attributes(cm); end + + # Returns a report on undocumented items in ClassModule +cm+ + # + # source://rdoc//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 + def report_constants(cm); end + + # Returns a report on undocumented methods in ClassModule +cm+ + # + # source://rdoc//rdoc/stats.rb#351 + def report_methods(cm); end + + # Returns a summary of the collected statistics. + # + # source://rdoc//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 + def undoc_params(method); end +end + +# Stats printer that prints just the files being documented with a progress +# bar +class RDoc::Stats::Normal < ::RDoc::Stats::Quiet + # source://rdoc//rdoc/stats/normal.rb#15 + def begin_adding; end + + # source://rdoc//rdoc/stats/normal.rb#54 + def done_adding; end + + # Prints a file with a progress bar + # + # source://rdoc//rdoc/stats/normal.rb#23 + def print_file(files_so_far, filename); end +end + +# Stats printer that prints nothing +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 + def initialize(num_files); end + + # Prints a message at the beginning of parsing + # + # source://rdoc//rdoc/stats/quiet.rb#17 + def begin_adding(*_arg0); end + + # Prints when RDoc is done + # + # source://rdoc//rdoc/stats/quiet.rb#57 + def done_adding(*_arg0); end + + # Prints when an alias is added + # + # source://rdoc//rdoc/stats/quiet.rb#22 + def print_alias(*_arg0); end + + # Prints when an attribute is added + # + # source://rdoc//rdoc/stats/quiet.rb#27 + def print_attribute(*_arg0); end + + # Prints when a class is added + # + # source://rdoc//rdoc/stats/quiet.rb#32 + def print_class(*_arg0); end + + # Prints when a constant is added + # + # source://rdoc//rdoc/stats/quiet.rb#37 + def print_constant(*_arg0); end + + # Prints when a file is added + # + # source://rdoc//rdoc/stats/quiet.rb#42 + def print_file(*_arg0); end + + # Prints when a method is added + # + # source://rdoc//rdoc/stats/quiet.rb#47 + def print_method(*_arg0); end + + # Prints when a module is added + # + # source://rdoc//rdoc/stats/quiet.rb#52 + def print_module(*_arg0); end +end + +# Stats printer that prints everything documented, including the documented +# status +class RDoc::Stats::Verbose < ::RDoc::Stats::Normal + # Returns a marker for RDoc::CodeObject +co+ being undocumented + # + # source://rdoc//rdoc/stats/verbose.rb#11 + def nodoc(co); end + + # source://rdoc//rdoc/stats/verbose.rb#15 + def print_alias(as); end + + # source://rdoc//rdoc/stats/verbose.rb#19 + def print_attribute(attribute); end + + # source://rdoc//rdoc/stats/verbose.rb#23 + def print_class(klass); end + + # source://rdoc//rdoc/stats/verbose.rb#27 + def print_constant(constant); end + + # source://rdoc//rdoc/stats/verbose.rb#31 + def print_file(files_so_far, file); end + + # source://rdoc//rdoc/stats/verbose.rb#36 + def print_method(method); end + + # source://rdoc//rdoc/stats/verbose.rb#40 + def print_module(mod); end +end + +# A set of rdoc data for a single project (gem, path, etc.). +# +# The store manages reading and writing ri data for a project and maintains a +# cache of methods, classes and ancestors in the store. +# +# The store maintains a #cache of its contents for faster lookup. After +# adding items to the store it must be flushed using #save_cache. The cache +# contains the following structures: +# +# @cache = { +# :ancestors => {}, # class name => ancestor names +# :attributes => {}, # class name => attributes +# :class_methods => {}, # class name => class methods +# :instance_methods => {}, # class name => instance methods +# :modules => [], # classes and modules in this store +# :pages => [], # page names +# } +# -- +# TODO need to prune classes +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 + 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 + def add_c_enclosure(variable, namespace); end + + # Adds C variables from an RDoc::Parser::C + # + # source://rdoc//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 + 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 + def all_classes; end + + # Returns all classes and modules discovered by RDoc + # + # source://rdoc//rdoc/store.rb#219 + def all_classes_and_modules; end + + # All TopLevels known to RDoc + # + # source://rdoc//rdoc/store.rb#226 + def all_files; end + + # Returns all modules discovered by RDoc + # + # source://rdoc//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 + def ancestors; end + + # Attributes cache accessor. Maps a class to an Array of its attributes. + # + # source://rdoc//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 + 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 + def c_enclosure_classes; end + + # source://rdoc//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 + def c_singleton_class_variables; end + + # The contents of the Store + # + # source://rdoc//rdoc/store.rb#112 + def cache; end + + # Path to the cache file + # + # source://rdoc//rdoc/store.rb#256 + def cache_path; end + + # Path to the ri data for +klass_name+ + # + # source://rdoc//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 + def class_methods; end + + # Path where data for +klass_name+ will be stored (methods or class data) + # + # source://rdoc//rdoc/store.rb#279 + def class_path(klass_name); end + + # Hash of all classes known to RDoc + # + # source://rdoc//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 + def clean_cache_collection(collection); end + + # Prepares the RDoc code object tree for use by a generator. + # + # It finds unique classes/modules defined, and replaces classes/modules that + # are aliases for another one by a copy with RDoc::ClassModule#is_alias_for + # set. + # + # It updates the RDoc::ClassModule#constant_aliases attribute of "real" + # classes or modules. + # + # It also completely removes the classes and modules that should be removed + # from the documentation and the methods that have a visibility below + # +min_visibility+, which is the --visibility option. + # + # See also RDoc::Context#remove_from_documentation? + # + # source://rdoc//rdoc/store.rb#322 + def complete(min_visibility); end + + # If true this Store will not write any files + # + # source://rdoc//rdoc/store.rb#90 + def dry_run; end + + # If true this Store will not write any files + # + # source://rdoc//rdoc/store.rb#90 + def dry_run=(_arg0); end + + # The encoding of the contents in the Store + # + # source://rdoc//rdoc/store.rb#117 + def encoding; end + + # The encoding of the contents in the Store + # + # source://rdoc//rdoc/store.rb#117 + def encoding=(_arg0); end + + # Hash of all files known to RDoc + # + # source://rdoc//rdoc/store.rb#362 + def files_hash; end + + # Finds the enclosure (namespace) for the given C +variable+. + # + # source://rdoc//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 + def find_class_named(name); end + + # Finds the class with +name+ starting in namespace +from+ + # + # source://rdoc//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 + def find_class_or_module(name); end + + # Finds the file with +name+ in all discovered files + # + # source://rdoc//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 + 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 + def find_text_page(file_name); end + + # Finds unique classes/modules defined in +all_hash+, + # and returns them as an array. Performs the alias + # updates in +all_hash+: see ::complete. + # -- + # TODO aliases should be registered by Context#add_module_alias + # + # source://rdoc//rdoc/store.rb#455 + def find_unique(all_hash); end + + # Fixes the erroneous BasicObject < Object in 1.9. + # + # Because we assumed all classes without a stated superclass + # inherit from Object, we have the above wrong inheritance. + # + # We fix BasicObject right away if we are running in a Ruby + # version >= 1.9. + # + # source://rdoc//rdoc/store.rb#474 + def fix_basic_object_inheritance; end + + # Friendly rendition of #path + # + # source://rdoc//rdoc/store.rb#483 + def friendly_path; end + + # source://rdoc//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 + 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 + def load_all; end + + # Loads cache file for this store + # + # source://rdoc//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 + def load_class(klass_name); end + + # Loads ri data for +klass_name+ + # + # source://rdoc//rdoc/store.rb#618 + def load_class_data(klass_name); end + + # Loads ri data for +method_name+ in +klass_name+ + # + # source://rdoc//rdoc/store.rb#633 + def load_method(klass_name, method_name); end + + # Loads ri data for +page_name+ + # + # source://rdoc//rdoc/store.rb#653 + 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 + def main; end + + # Sets the main page for this RDoc store. + # + # source://rdoc//rdoc/store.rb#678 + 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 + def make_variable_map(variables); end + + # Path to the ri data for +method_name+ in +klass_name+ + # + # source://rdoc//rdoc/store.rb#699 + 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 + def module_names; end + + # Hash of all modules known to RDoc + # + # source://rdoc//rdoc/store.rb#720 + def modules_hash; end + + # Returns the RDoc::TopLevel that is a text file and has the given +name+ + # + # source://rdoc//rdoc/store.rb#727 + def page(name); end + + # Path to the ri data for +page_name+ + # + # source://rdoc//rdoc/store.rb#736 + def page_file(page_name); end + + # Path this store reads or writes + # + # source://rdoc//rdoc/store.rb#95 + def path; end + + # Path this store reads or writes + # + # source://rdoc//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 + 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 + 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 + def remove_nodoc(all_hash); end + + # Saves all entries in the store + # + # source://rdoc//rdoc/store.rb#757 + def save; end + + # Writes the cache file for this store + # + # source://rdoc//rdoc/store.rb#782 + def save_cache; end + + # Writes the ri data for +klass+ (or module) + # + # source://rdoc//rdoc/store.rb#809 + def save_class(klass); end + + # Writes the ri data for +method+ on +klass+ + # + # source://rdoc//rdoc/store.rb#883 + def save_method(klass, method); end + + # Writes the ri data for +page+ + # + # source://rdoc//rdoc/store.rb#906 + def save_page(page); end + + # Source of the contents of this store. + # + # For a store from a gem the source is the gem name. For a store from the + # home directory the source is "home". For system ri store (the standard + # library documentation) the source is"ruby". For a store from the site + # ri directory the store is "site". For other stores the source is the + # #path. + # + # source://rdoc//rdoc/store.rb#932 + 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 + def title; end + + # Sets the title page for this RDoc store. + # + # source://rdoc//rdoc/store.rb#953 + 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 + def type; end + + # Type of ri datastore this was loaded from. See RDoc::RI::Driver, + # RDoc::RI::Paths. + # + # source://rdoc//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 + 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 + 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 + def unique_modules; end + + # The lazy constants alias will be discovered in passing + # + # source://rdoc//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 + def update_parser_of_file(absolute_name, parser); end +end + +# Raised when a stored file for a class, module, page or method is missing. +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 + def initialize(store, file, name); end + + # The file the #name should be saved as + # + # source://rdoc//rdoc/store.rb#46 + def file; end + + # source://rdoc//rdoc/store.rb#63 + def message; end + + # The name of the object the #file would be loaded from + # + # source://rdoc//rdoc/store.rb#51 + def name; end + + # The store the file should exist in + # + # source://rdoc//rdoc/store.rb#41 + def store; end +end + +# RDoc::Task creates the following rake tasks to generate and clean up RDoc +# output: +# +# [rdoc] +# Main task for this RDoc task. +# +# [clobber_rdoc] +# Delete all the rdoc files. This target is automatically added to the main +# clobber target. +# +# [rerdoc] +# Rebuild the rdoc files from scratch, even if they are not out of date. +# +# [rdoc:coverage] +# Print RDoc coverage report for all rdoc files. +# +# Simple Example: +# +# require 'rdoc/task' +# +# RDoc::Task.new do |rdoc| +# rdoc.main = "README.rdoc" +# rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") +# end +# +# The +rdoc+ object passed to the block is an RDoc::Task object. See the +# attributes list for the RDoc::Task class for available customization options. +# +# == Specifying different task names +# +# You may wish to give the task a different name, such as if you are +# generating two sets of documentation. For instance, if you want to have a +# development set of documentation including private methods: +# +# require 'rdoc/task' +# +# RDoc::Task.new :rdoc_dev do |rdoc| +# rdoc.main = "README.rdoc" +# rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") +# rdoc.options << "--all" +# end +# +# The tasks would then be named :rdoc_dev, +# :clobber_rdoc_dev, and :rerdoc_dev. +# +# If you wish to have completely different task names, then pass a Hash as +# first argument. With the :rdoc, :clobber_rdoc and +# :rerdoc options, you can customize the task names to your liking. +# +# For example: +# +# require 'rdoc/task' +# +# RDoc::Task.new(:rdoc => "rdoc", :clobber_rdoc => "rdoc:clean", +# :rerdoc => "rdoc:force") +# +# This will create the tasks :rdoc, :rdoc:clean, +# :rdoc:force, and :rdoc:coverage. +class RDoc::Task < ::Rake::TaskLib + # Create an RDoc task with the given name. See the RDoc::Task class overview + # for documentation. + # + # @return [Task] a new instance of Task + # @yield [_self] + # @yieldparam _self [RDoc::Task] the object that the method was called on + # + # source://rdoc//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 + 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 + def check_names(names); end + + # Task description for the clobber rdoc task or its renamed equivalent + # + # source://rdoc//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 + def coverage_task_description; end + + # Sets default task values + # + # source://rdoc//rdoc/task.rb#195 + def defaults; end + + # Create the tasks defined by this task lib. + # + # source://rdoc//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 + def external; end + + # Whether to run the rdoc process as an external shell (default is false) + # + # source://rdoc//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 + def generator; end + + # Name of format generator (--format) used by rdoc. (defaults to + # rdoc's default) + # + # source://rdoc//rdoc/task.rb#137 + def generator=(_arg0); end + + # All source is inline now. This method is deprecated + # + # source://rdoc//rdoc/task.rb#209 + def inline_source; end + + # All source is inline now. This method is deprecated + # + # source://rdoc//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 + 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 + def main=(_arg0); end + + # Comment markup format. rdoc, rd and tomdoc are supported. (default is + # 'rdoc') + # + # source://rdoc//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 + def markup=(_arg0); end + + # Name of the main, top level task. (default is :rdoc) + # + # source://rdoc//rdoc/task.rb#104 + def name; end + + # Name of the main, top level task. (default is :rdoc) + # + # source://rdoc//rdoc/task.rb#104 + def name=(_arg0); end + + # List of options that will be supplied to RDoc + # + # source://rdoc//rdoc/task.rb#272 + def option_list; end + + # Additional list of options to be passed rdoc. (default is []) + # + # source://rdoc//rdoc/task.rb#147 + def options; end + + # Additional list of options to be passed rdoc. (default is []) + # + # source://rdoc//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 + def rdoc_dir; end + + # Name of directory to receive the html output files. (default is "html") + # + # source://rdoc//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 + def rdoc_files; end + + # List of files to be included in the rdoc generation. (default is []) + # + # source://rdoc//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 + def rdoc_task_description; end + + # Task description for the rerdoc task or its renamed description + # + # source://rdoc//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 + def template; end + + # Name of template to be used by rdoc. (defaults to rdoc's default) + # + # source://rdoc//rdoc/task.rb#131 + def template=(_arg0); end + + # Title of RDoc documentation. (defaults to rdoc's default) + # + # source://rdoc//rdoc/task.rb#120 + def title; end + + # Title of RDoc documentation. (defaults to rdoc's default) + # + # source://rdoc//rdoc/task.rb#120 + def title=(_arg0); end + + private + + # source://rdoc//rdoc/task.rb#326 + def clobber_task_name; end + + # source://rdoc//rdoc/task.rb#340 + def coverage_task_name; end + + # source://rdoc//rdoc/task.rb#315 + def rdoc_target; end + + # source://rdoc//rdoc/task.rb#319 + def rdoc_task_name; end + + # source://rdoc//rdoc/task.rb#333 + def rerdoc_task_name; end +end + +# Methods for manipulating comment text +module RDoc::Text + # Expands tab characters in +text+ to eight spaces + # + # source://rdoc//rdoc/text.rb#63 + def expand_tabs(text); end + + # Flush +text+ left based on the shortest line + # + # source://rdoc//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 + def language; end + + # The language for this text. This affects stripping comments + # markers. + # + # source://rdoc//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 + def markup(text); end + + # Strips hashes, expands tabs then flushes +text+ to the left + # + # source://rdoc//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 + def parse(text, format = T.unsafe(nil)); end + + # The first +limit+ characters of +text+ as HTML + # + # source://rdoc//rdoc/text.rb#149 + def snippet(text, limit = T.unsafe(nil)); end + + # Strips leading # characters from +text+ + # + # source://rdoc//rdoc/text.rb#158 + def strip_hashes(text); end + + # Strips leading and trailing \n characters from +text+ + # + # source://rdoc//rdoc/text.rb#170 + def strip_newlines(text); end + + # Strips /* */ style comments + # + # source://rdoc//rdoc/text.rb#177 + def strip_stars(text); end + + # source://rdoc//rdoc/text.rb#200 + def to_html(text); end + + # Wraps +txt+ to +line_len+ + # + # source://rdoc//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 + def encode_fallback(character, encoding, fallback); end + end +end + +# Character class to be separated by a space when concatenating +# lines. +# +# source://rdoc//rdoc/text.rb#320 +RDoc::Text::SPACE_SEPARATED_LETTER_CLASS = T.let(T.unsafe(nil), Regexp) + +# A TokenStream is a list of tokens, gathered during the parse of some entity +# (say a method). Entities populate these streams by being registered with the +# lexer. Any class can collect tokens by including TokenStream. From the +# outside, you use such an object by calling the start_collecting_tokens +# method, followed by calls to add_token and pop_token. +module RDoc::TokenStream + # Adds one +token+ to the collected tokens + # + # source://rdoc//rdoc/token_stream.rb#84 + def add_token(token); end + + # Adds +tokens+ to the collected tokens + # + # source://rdoc//rdoc/token_stream.rb#77 + def add_tokens(tokens); end + + # Starts collecting tokens + # + # source://rdoc//rdoc/token_stream.rb#91 + def collect_tokens; end + + # Remove the last token from the collected tokens + # + # source://rdoc//rdoc/token_stream.rb#100 + def pop_token; end + + # Starts collecting tokens + # + # source://rdoc//rdoc/token_stream.rb#91 + def start_collecting_tokens; end + + # Current token stream + # + # source://rdoc//rdoc/token_stream.rb#107 + def token_stream; end + + # Returns a string representation of the token stream + # + # source://rdoc//rdoc/token_stream.rb#114 + def tokens_to_s; end + + class << self + # Converts +token_stream+ to HTML wrapping various tokens with + # elements. Some tokens types are wrapped in spans + # with the given class names. Other token types are not wrapped in spans. + # + # source://rdoc//rdoc/token_stream.rb#16 + def to_html(token_stream); end + end +end + +# A parser for TomDoc based on TomDoc 1.0.0-rc1 (02adef9b5a) +# +# The TomDoc specification can be found at: +# +# http://tomdoc.org +# +# The latest version of the TomDoc specification can be found at: +# +# https://github.com/mojombo/tomdoc/blob/master/tomdoc.md +# +# To choose TomDoc as your only default format see RDoc::Options@Saved+Options +# for instructions on setting up a .rdoc_options file to store +# your project default. +# +# There are a few differences between this parser and the specification. A +# best-effort was made to follow the specification as closely as possible but +# some choices to deviate were made. +# +# A future version of RDoc will warn when a MUST or MUST NOT is violated and +# may warn when a SHOULD or SHOULD NOT is violated. RDoc will always try +# to emit documentation even if given invalid TomDoc. +# +# Here are some implementation choices this parser currently makes: +# +# This parser allows rdoc-style inline markup but you should not depended on +# it. +# +# This parser allows a space between the comment and the method body. +# +# This parser does not require the default value to be described for an +# optional argument. +# +# This parser does not examine the order of sections. An Examples section may +# precede the Arguments section. +# +# This class is documented in TomDoc format. Since this is a subclass of the +# RDoc markup parser there isn't much to see here, unfortunately. +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 + def initialize; end + + # Internal: Builds a heading from the token stream + # + # level - The level of heading to create + # + # Returns an RDoc::Markup::Heading + # + # source://rdoc//rdoc/tom_doc.rb#143 + def build_heading(level); end + + # Internal: Builds a paragraph from the token stream + # + # margin - Unused + # + # Returns an RDoc::Markup::Paragraph. + # + # source://rdoc//rdoc/tom_doc.rb#173 + def build_paragraph(margin); end + + # Internal: Builds a verbatim from the token stream. A verbatim in the + # Examples section will be marked as in Ruby format. + # + # margin - The indentation from the margin for lines that belong to this + # verbatim section. + # + # Returns an RDoc::Markup::Verbatim + # + # source://rdoc//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 + def parse_text(parent, indent); end + + # Internal: Turns text into an Array of tokens + # + # text - A String containing TomDoc-format text. + # + # Returns self. + # + # source://rdoc//rdoc/tom_doc.rb#231 + def tokenize(text); end + + # Internal: Token accessor + # + # source://rdoc//rdoc/tom_doc.rb#46 + def tokens; end + + class << self + # Internal: Adds a post-processor which sets the RDoc section based on the + # comment's status. + # + # Returns nothing. + # + # source://rdoc//rdoc/tom_doc.rb#53 + def add_post_processor; end + + # Public: Parses TomDoc from text + # + # text - A String containing TomDoc-format text. + # + # Examples + # + # RDoc::TomDoc.parse <<-TOMDOC + # This method does some things + # + # Returns nothing. + # TOMDOC + # # => # + # + # Returns an RDoc::Markup::Document representing the TomDoc format. + # + # source://rdoc//rdoc/tom_doc.rb#84 + def parse(text); end + + # Internal: Extracts the Signature section's method signature + # + # comment - An RDoc::Comment that will be parsed and have the signature + # extracted + # + # Returns a String containing the signature and nil if not + # + # source://rdoc//rdoc/tom_doc.rb#100 + def signature(comment); end + end +end + +# A TopLevel context is a representation of the contents of a single file +class RDoc::TopLevel < ::RDoc::Context + # Creates a new TopLevel for the file at +absolute_name+. If documentation + # is being generated outside the source dir +relative_name+ is relative to + # the source directory. + # + # @return [TopLevel] a new instance of TopLevel + # + # source://rdoc//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 + def ==(other); end + + # Absolute name of this file + # + # source://rdoc//rdoc/top_level.rb#22 + def absolute_name; end + + # Absolute name of this file + # + # source://rdoc//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 + def add_alias(an_alias); end + + # Adds +constant+ to +Object+ instead of +self+. + # + # source://rdoc//rdoc/top_level.rb#85 + def add_constant(constant); end + + # Adds +include+ to +Object+ instead of +self+. + # + # source://rdoc//rdoc/top_level.rb#94 + def add_include(include); end + + # Adds +method+ to +Object+ instead of +self+. + # + # source://rdoc//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 + def add_to_classes_or_modules(mod); end + + # Base name of this file + # + # source://rdoc//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 + 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 + def cvs_url; end + + # source://rdoc//rdoc/top_level.rb#31 + def diagram; end + + # source://rdoc//rdoc/top_level.rb#31 + def diagram=(_arg0); end + + # Only a TopLevel that contains text file) will be displayed. See also + # RDoc::CodeObject#display? + # + # @return [Boolean] + # + # source://rdoc//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 + def eql?(other); end + + # This TopLevel's File::Stat struct + # + # source://rdoc//rdoc/top_level.rb#12 + def file_stat; end + + # This TopLevel's File::Stat struct + # + # source://rdoc//rdoc/top_level.rb#12 + def file_stat=(_arg0); end + + # See RDoc::TopLevel::find_class_or_module + # -- + # TODO Why do we search through all classes/modules found, not just the + # ones of this instance? + # + # source://rdoc//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 + def find_local_symbol(symbol); end + + # Finds a module or class with +name+ + # + # source://rdoc//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 + 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 + def hash; end + + # URL for this with a +prefix+ + # + # source://rdoc//rdoc/top_level.rb#176 + def http_url(prefix); end + + # source://rdoc//rdoc/top_level.rb#182 + def inspect; end + + # Time this file was last modified, if known + # + # source://rdoc//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 + def marshal_dump; end + + # Loads this TopLevel from +array+. + # + # source://rdoc//rdoc/top_level.rb#213 + def marshal_load(array); end + + # Base name of this file + # + # source://rdoc//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 + def object_class; end + + # Base name of this file without the extension + # + # source://rdoc//rdoc/top_level.rb#238 + def page_name; end + + # The parser class that processed this file + # + # source://rdoc//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 + def parser=(val); end + + # Path to this file for use with HTML generator output. + # + # source://rdoc//rdoc/top_level.rb#248 + def path; end + + # source://rdoc//rdoc/top_level.rb#252 + def pretty_print(q); end + + # Relative name of this file + # + # source://rdoc//rdoc/top_level.rb#17 + def relative_name; end + + # Relative name of this file + # + # source://rdoc//rdoc/top_level.rb#17 + def relative_name=(_arg0); end + + # Search record used by RDoc::Generator::JsonIndex + # + # source://rdoc//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 + def text?; end + + # source://rdoc//rdoc/top_level.rb#287 + def to_s; end +end + +# :stopdoc: +module Rake + extend ::FileUtils::StreamUtils_ + extend ::FileUtils +end + +# For backwards compatibility +# +# source://rdoc//rdoc/task.rb#352 +Rake::RDocTask = RDoc::Task diff --git a/sorbet/rbi/gems/redis-client@0.14.1.rbi b/sorbet/rbi/gems/redis-client@0.20.0.rbi similarity index 81% rename from sorbet/rbi/gems/redis-client@0.14.1.rbi rename to sorbet/rbi/gems/redis-client@0.20.0.rbi index 2acf0afd0..01e3cb5ec 100644 --- a/sorbet/rbi/gems/redis-client@0.14.1.rbi +++ b/sorbet/rbi/gems/redis-client@0.20.0.rbi @@ -16,135 +16,168 @@ class RedisClient # @return [RedisClient] a new instance of RedisClient # - # source://redis-client//lib/redis_client.rb#165 + # source://redis-client//lib/redis_client.rb#166 def initialize(config, **_arg1); end - # source://redis-client//lib/redis_client.rb#267 + # source://redis-client//lib/redis_client.rb#313 def blocking_call(timeout, *command, **kwargs); end - # source://redis-client//lib/redis_client.rb#287 + # source://redis-client//lib/redis_client.rb#333 def blocking_call_v(timeout, command); end - # source://redis-client//lib/redis_client.rb#207 + # source://redis-client//lib/redis_client.rb#253 def call(*command, **kwargs); end - # source://redis-client//lib/redis_client.rb#237 + # source://redis-client//lib/redis_client.rb#283 def call_once(*command, **kwargs); end - # source://redis-client//lib/redis_client.rb#252 + # source://redis-client//lib/redis_client.rb#298 def call_once_v(command); end - # source://redis-client//lib/redis_client.rb#222 + # source://redis-client//lib/redis_client.rb#268 def call_v(command); end - # source://redis-client//lib/redis_client.rb#347 + # source://redis-client//lib/redis_client.rb#393 def close; end # @return [Boolean] # - # source://redis-client//lib/redis_client.rb#343 + # source://redis-client//lib/redis_client.rb#389 def connected?; end - # source://redis-client//lib/redis_client.rb#325 + # source://redis-client//lib/redis_client.rb#190 + def db; end + + # source://redis-client//lib/redis_client.rb#398 + def disable_reconnection(&block); end + + # source://redis-client//lib/redis_client.rb#194 + def host; end + + # source://redis-client//lib/redis_client.rb#371 def hscan(key, *args, **kwargs, &block); end - # source://redis-client//lib/redis_client.rb#172 + # source://redis-client//lib/redis_client.rb#182 + def id; end + + # source://redis-client//lib/redis_client.rb#173 def inspect; end - # source://redis-client//lib/redis_client.rb#370 + # source://redis-client//lib/redis_client.rb#245 + def measure_round_trip_delay; end + + # source://redis-client//lib/redis_client.rb#420 def multi(watch: T.unsafe(nil), &block); end + # source://redis-client//lib/redis_client.rb#210 + def password; end + + # source://redis-client//lib/redis_client.rb#202 + def path; end + # @yield [pipeline] # - # source://redis-client//lib/redis_client.rb#352 + # source://redis-client//lib/redis_client.rb#402 def pipelined; end - # source://redis-client//lib/redis_client.rb#201 + # source://redis-client//lib/redis_client.rb#198 + def port; end + + # source://redis-client//lib/redis_client.rb#239 def pubsub; end - # source://redis-client//lib/redis_client.rb#191 + # source://redis-client//lib/redis_client.rb#229 def read_timeout=(timeout); end - # source://redis-client//lib/redis_client.rb#307 + # source://redis-client//lib/redis_client.rb#353 def scan(*args, **kwargs, &block); end - # source://redis-client//lib/redis_client.rb#177 + # source://redis-client//lib/redis_client.rb#178 + def server_url; end + + # source://redis-client//lib/redis_client.rb#214 def size; end - # source://redis-client//lib/redis_client.rb#316 + # source://redis-client//lib/redis_client.rb#362 def sscan(key, *args, **kwargs, &block); end # @yield [_self] # @yieldparam _self [RedisClient] the object that the method was called on # - # source://redis-client//lib/redis_client.rb#181 + # source://redis-client//lib/redis_client.rb#218 def then(_options = T.unsafe(nil)); end # source://redis-client//lib/redis_client.rb#186 + def timeout; end + + # source://redis-client//lib/redis_client.rb#223 def timeout=(timeout); end + # source://redis-client//lib/redis_client.rb#206 + def username; end + # @yield [_self] # @yieldparam _self [RedisClient] the object that the method was called on # - # source://redis-client//lib/redis_client.rb#181 + # source://redis-client//lib/redis_client.rb#218 def with(_options = T.unsafe(nil)); end - # source://redis-client//lib/redis_client.rb#196 + # source://redis-client//lib/redis_client.rb#234 def write_timeout=(timeout); end - # source://redis-client//lib/redis_client.rb#334 + # source://redis-client//lib/redis_client.rb#380 def zscan(key, *args, **kwargs, &block); end private # @yield [transaction] # - # source://redis-client//lib/redis_client.rb#577 + # source://redis-client//lib/redis_client.rb#627 def build_transaction; end - # source://redis-client//lib/redis_client.rb#662 + # source://redis-client//lib/redis_client.rb#715 def connect; end - # source://redis-client//lib/redis_client.rb#611 + # source://redis-client//lib/redis_client.rb#661 def ensure_connected(retryable: T.unsafe(nil)); end - # source://redis-client//lib/redis_client.rb#655 + # source://redis-client//lib/redis_client.rb#708 def raw_connection; end - # source://redis-client//lib/redis_client.rb#585 + # source://redis-client//lib/redis_client.rb#635 def scan_list(cursor_index, command, &block); end - # source://redis-client//lib/redis_client.rb#595 + # source://redis-client//lib/redis_client.rb#645 def scan_pairs(cursor_index, command); end class << self - # source://redis-client//lib/redis_client.rb#142 + # source://redis-client//lib/redis_client.rb#143 def config(**kwargs); end - # source://redis-client//lib/redis_client.rb#32 + # source://redis-client//lib/redis_client.rb#33 def default_driver; end - # source://redis-client//lib/redis_client.rb#44 + # source://redis-client//lib/redis_client.rb#45 def default_driver=(name); end - # source://redis-client//lib/redis_client.rb#21 + # source://redis-client//lib/redis_client.rb#22 def driver(name); end - # source://redis-client//lib/redis_client.rb#150 + # source://redis-client//lib/redis_client.rb#151 def new(arg = T.unsafe(nil), **kwargs); end - # source://redis-client//lib/redis_client.rb#158 + # source://redis-client//lib/redis_client.rb#159 def register(middleware); end - # source://redis-client//lib/redis_client.rb#17 + # source://redis-client//lib/redis_client.rb#18 def register_driver(name, &block); end - # source://redis-client//lib/redis_client.rb#146 + # source://redis-client//lib/redis_client.rb#147 def sentinel(**kwargs); end end end -# source://redis-client//lib/redis_client.rb#121 +# source://redis-client//lib/redis_client.rb#122 class RedisClient::AuthenticationError < ::RedisClient::CommandError; end # source://redis-client//lib/redis_client/middlewares.rb#4 @@ -173,10 +206,10 @@ class RedisClient::BasicMiddleware def connect(_config); end end -# source://redis-client//lib/redis_client.rb#85 +# source://redis-client//lib/redis_client.rb#86 class RedisClient::CannotConnectError < ::RedisClient::ConnectionError; end -# source://redis-client//lib/redis_client.rb#92 +# source://redis-client//lib/redis_client.rb#93 class RedisClient::CheckoutTimeoutError < ::RedisClient::TimeoutError; end # source://redis-client//lib/redis_client/circuit_breaker.rb#4 @@ -244,71 +277,71 @@ module RedisClient::CommandBuilder def generate(args, kwargs = T.unsafe(nil)); end end -# source://redis-client//lib/redis_client.rb#102 +# source://redis-client//lib/redis_client.rb#103 class RedisClient::CommandError < ::RedisClient::Error include ::RedisClient::HasCommand class << self - # source://redis-client//lib/redis_client.rb#106 + # source://redis-client//lib/redis_client.rb#107 def parse(error_message); end end end -# source://redis-client//lib/redis_client.rb#132 +# source://redis-client//lib/redis_client.rb#133 RedisClient::CommandError::ERRORS = T.let(T.unsafe(nil), Hash) -# source://redis-client//lib/redis_client.rb#54 +# source://redis-client//lib/redis_client.rb#55 module RedisClient::Common - # source://redis-client//lib/redis_client.rb#58 + # source://redis-client//lib/redis_client.rb#59 def initialize(config, id: T.unsafe(nil), connect_timeout: T.unsafe(nil), read_timeout: T.unsafe(nil), write_timeout: T.unsafe(nil)); end # Returns the value of attribute config. # - # source://redis-client//lib/redis_client.rb#55 + # source://redis-client//lib/redis_client.rb#56 def config; end # Returns the value of attribute connect_timeout. # - # source://redis-client//lib/redis_client.rb#56 + # source://redis-client//lib/redis_client.rb#57 def connect_timeout; end # Sets the attribute connect_timeout # # @param value the value to set the attribute connect_timeout to. # - # source://redis-client//lib/redis_client.rb#56 + # source://redis-client//lib/redis_client.rb#57 def connect_timeout=(_arg0); end # Returns the value of attribute id. # - # source://redis-client//lib/redis_client.rb#55 + # source://redis-client//lib/redis_client.rb#56 def id; end # Returns the value of attribute read_timeout. # - # source://redis-client//lib/redis_client.rb#56 + # source://redis-client//lib/redis_client.rb#57 def read_timeout; end # Sets the attribute read_timeout # # @param value the value to set the attribute read_timeout to. # - # source://redis-client//lib/redis_client.rb#56 + # source://redis-client//lib/redis_client.rb#57 def read_timeout=(_arg0); end - # source://redis-client//lib/redis_client.rb#74 + # source://redis-client//lib/redis_client.rb#75 def timeout=(timeout); end # Returns the value of attribute write_timeout. # - # source://redis-client//lib/redis_client.rb#56 + # source://redis-client//lib/redis_client.rb#57 def write_timeout; end # Sets the attribute write_timeout # # @param value the value to set the attribute write_timeout to. # - # source://redis-client//lib/redis_client.rb#56 + # source://redis-client//lib/redis_client.rb#57 def write_timeout=(_arg0); end end @@ -318,22 +351,22 @@ class RedisClient::Config # @return [Config] a new instance of Config # - # source://redis-client//lib/redis_client/config.rb#157 - def initialize(url: T.unsafe(nil), host: T.unsafe(nil), port: T.unsafe(nil), path: T.unsafe(nil), **kwargs); end + # source://redis-client//lib/redis_client/config.rb#168 + def initialize(url: T.unsafe(nil), host: T.unsafe(nil), port: T.unsafe(nil), path: T.unsafe(nil), username: T.unsafe(nil), password: T.unsafe(nil), **kwargs); end # Returns the value of attribute host. # - # source://redis-client//lib/redis_client/config.rb#155 + # source://redis-client//lib/redis_client/config.rb#166 def host; end # Returns the value of attribute path. # - # source://redis-client//lib/redis_client/config.rb#155 + # source://redis-client//lib/redis_client/config.rb#166 def path; end # Returns the value of attribute port. # - # source://redis-client//lib/redis_client/config.rb#155 + # source://redis-client//lib/redis_client/config.rb#166 def port; end end @@ -392,10 +425,10 @@ module RedisClient::Config::Common # source://redis-client//lib/redis_client/config.rb#15 def middlewares_stack; end - # source://redis-client//lib/redis_client/config.rb#98 + # source://redis-client//lib/redis_client/config.rb#103 def new_client(**kwargs); end - # source://redis-client//lib/redis_client/config.rb#93 + # source://redis-client//lib/redis_client/config.rb#98 def new_pool(**kwargs); end # Returns the value of attribute password. @@ -415,15 +448,15 @@ module RedisClient::Config::Common # @return [Boolean] # - # source://redis-client//lib/redis_client/config.rb#102 + # source://redis-client//lib/redis_client/config.rb#107 def retry_connecting?(attempt, _error); end # @return [Boolean] # - # source://redis-client//lib/redis_client/config.rb#89 + # source://redis-client//lib/redis_client/config.rb#94 def sentinel?; end - # source://redis-client//lib/redis_client/config.rb#120 + # source://redis-client//lib/redis_client/config.rb#125 def server_url; end # Returns the value of attribute ssl. @@ -434,7 +467,7 @@ module RedisClient::Config::Common # Returns the value of attribute ssl. def ssl?; end - # source://redis-client//lib/redis_client/config.rb#114 + # source://redis-client//lib/redis_client/config.rb#119 def ssl_context; end # Returns the value of attribute ssl_params. @@ -442,7 +475,7 @@ module RedisClient::Config::Common # source://redis-client//lib/redis_client/config.rb#15 def ssl_params; end - # source://redis-client//lib/redis_client/config.rb#85 + # source://redis-client//lib/redis_client/config.rb#90 def username; end # Returns the value of attribute write_timeout. @@ -452,7 +485,7 @@ module RedisClient::Config::Common private - # source://redis-client//lib/redis_client/config.rb#130 + # source://redis-client//lib/redis_client/config.rb#135 def build_connection_prelude; end end @@ -471,7 +504,7 @@ RedisClient::Config::DEFAULT_TIMEOUT = T.let(T.unsafe(nil), Float) # source://redis-client//lib/redis_client/config.rb#11 RedisClient::Config::DEFAULT_USERNAME = T.let(T.unsafe(nil), String) -# source://redis-client//lib/redis_client.rb#84 +# source://redis-client//lib/redis_client.rb#85 class RedisClient::ConnectionError < ::RedisClient::Error; end # source://redis-client//lib/redis_client/connection_mixin.rb#4 @@ -599,24 +632,24 @@ class RedisClient::Decorator::Pipeline include ::RedisClient::Decorator::CommandsMixin end -# source://redis-client//lib/redis_client.rb#79 +# source://redis-client//lib/redis_client.rb#80 class RedisClient::Error < ::StandardError; end -# source://redis-client//lib/redis_client.rb#87 +# source://redis-client//lib/redis_client.rb#88 class RedisClient::FailoverError < ::RedisClient::ConnectionError; end -# source://redis-client//lib/redis_client.rb#94 +# source://redis-client//lib/redis_client.rb#95 module RedisClient::HasCommand - # source://redis-client//lib/redis_client.rb#97 + # source://redis-client//lib/redis_client.rb#98 def _set_command(command); end # Returns the value of attribute command. # - # source://redis-client//lib/redis_client.rb#95 + # source://redis-client//lib/redis_client.rb#96 def command; end end -# source://redis-client//lib/redis_client.rb#129 +# source://redis-client//lib/redis_client.rb#130 class RedisClient::MasterDownError < ::RedisClient::ConnectionError include ::RedisClient::HasCommand end @@ -624,52 +657,52 @@ end # source://redis-client//lib/redis_client/middlewares.rb#21 class RedisClient::Middlewares < ::RedisClient::BasicMiddleware; end -# source://redis-client//lib/redis_client.rb#451 +# source://redis-client//lib/redis_client.rb#501 class RedisClient::Multi # @return [Multi] a new instance of Multi # - # source://redis-client//lib/redis_client.rb#452 + # source://redis-client//lib/redis_client.rb#502 def initialize(command_builder); end - # source://redis-client//lib/redis_client.rb#494 + # source://redis-client//lib/redis_client.rb#544 def _blocks; end - # source://redis-client//lib/redis_client.rb#514 + # source://redis-client//lib/redis_client.rb#564 def _coerce!(results); end - # source://redis-client//lib/redis_client.rb#490 + # source://redis-client//lib/redis_client.rb#540 def _commands; end # @return [Boolean] # - # source://redis-client//lib/redis_client.rb#502 + # source://redis-client//lib/redis_client.rb#552 def _empty?; end # @return [Boolean] # - # source://redis-client//lib/redis_client.rb#510 + # source://redis-client//lib/redis_client.rb#560 def _retryable?; end - # source://redis-client//lib/redis_client.rb#498 + # source://redis-client//lib/redis_client.rb#548 def _size; end - # source://redis-client//lib/redis_client.rb#506 + # source://redis-client//lib/redis_client.rb#556 def _timeouts; end - # source://redis-client//lib/redis_client.rb#460 + # source://redis-client//lib/redis_client.rb#510 def call(*command, **kwargs, &block); end - # source://redis-client//lib/redis_client.rb#474 + # source://redis-client//lib/redis_client.rb#524 def call_once(*command, **kwargs, &block); end - # source://redis-client//lib/redis_client.rb#482 + # source://redis-client//lib/redis_client.rb#532 def call_once_v(command, &block); end - # source://redis-client//lib/redis_client.rb#467 + # source://redis-client//lib/redis_client.rb#517 def call_v(command, &block); end end -# source://redis-client//lib/redis_client.rb#124 +# source://redis-client//lib/redis_client.rb#125 class RedisClient::OutOfMemoryError < ::RedisClient::CommandError; end # source://redis-client//lib/redis_client/pid_cache.rb#4 @@ -691,31 +724,31 @@ module RedisClient::PIDCache::CoreExt def _fork; end end -# source://redis-client//lib/redis_client.rb#122 +# source://redis-client//lib/redis_client.rb#123 class RedisClient::PermissionError < ::RedisClient::CommandError; end -# source://redis-client//lib/redis_client.rb#530 +# source://redis-client//lib/redis_client.rb#580 class RedisClient::Pipeline < ::RedisClient::Multi # @return [Pipeline] a new instance of Pipeline # - # source://redis-client//lib/redis_client.rb#531 + # source://redis-client//lib/redis_client.rb#581 def initialize(_command_builder); end - # source://redis-client//lib/redis_client.rb#562 + # source://redis-client//lib/redis_client.rb#612 def _coerce!(results); end # @return [Boolean] # - # source://redis-client//lib/redis_client.rb#558 + # source://redis-client//lib/redis_client.rb#608 def _empty?; end - # source://redis-client//lib/redis_client.rb#554 + # source://redis-client//lib/redis_client.rb#604 def _timeouts; end - # source://redis-client//lib/redis_client.rb#536 + # source://redis-client//lib/redis_client.rb#586 def blocking_call(timeout, *command, **kwargs, &block); end - # source://redis-client//lib/redis_client.rb#545 + # source://redis-client//lib/redis_client.rb#595 def blocking_call_v(timeout, command, &block); end end @@ -791,33 +824,33 @@ end # source://redis-client//lib/redis_client/pooled.rb#7 RedisClient::Pooled::EMPTY_HASH = T.let(T.unsafe(nil), Hash) -# source://redis-client//lib/redis_client.rb#81 +# source://redis-client//lib/redis_client.rb#82 class RedisClient::ProtocolError < ::RedisClient::Error; end -# source://redis-client//lib/redis_client.rb#414 +# source://redis-client//lib/redis_client.rb#464 class RedisClient::PubSub # @return [PubSub] a new instance of PubSub # - # source://redis-client//lib/redis_client.rb#415 + # source://redis-client//lib/redis_client.rb#465 def initialize(raw_connection, command_builder); end - # source://redis-client//lib/redis_client.rb#420 + # source://redis-client//lib/redis_client.rb#470 def call(*command, **kwargs); end - # source://redis-client//lib/redis_client.rb#425 + # source://redis-client//lib/redis_client.rb#475 def call_v(command); end - # source://redis-client//lib/redis_client.rb#430 + # source://redis-client//lib/redis_client.rb#480 def close; end - # source://redis-client//lib/redis_client.rb#436 + # source://redis-client//lib/redis_client.rb#486 def next_event(timeout = T.unsafe(nil)); end private # Returns the value of attribute raw_connection. # - # source://redis-client//lib/redis_client.rb#448 + # source://redis-client//lib/redis_client.rb#498 def raw_connection; end end @@ -861,7 +894,7 @@ module RedisClient::RESP3 # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#142 def parse_array(io); end - # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#192 + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#194 def parse_blob(io); end # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#131 @@ -879,7 +912,7 @@ module RedisClient::RESP3 # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#150 def parse_map(io); end - # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#187 + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#189 def parse_null(io); end # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#158 @@ -894,7 +927,7 @@ module RedisClient::RESP3 # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#120 def parse_string(io); end - # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#202 + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#204 def parse_verbatim_string(io); end class << self @@ -934,7 +967,7 @@ module RedisClient::RESP3 # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#142 def parse_array(io); end - # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#192 + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#194 def parse_blob(io); end # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#131 @@ -952,7 +985,7 @@ module RedisClient::RESP3 # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#150 def parse_map(io); end - # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#187 + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#189 def parse_null(io); end # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#158 @@ -967,7 +1000,7 @@ module RedisClient::RESP3 # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#120 def parse_string(io); end - # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#202 + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#204 def parse_verbatim_string(io); end end end @@ -996,12 +1029,12 @@ class RedisClient::RESP3::SyntaxError < ::RedisClient::RESP3::Error; end # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#8 class RedisClient::RESP3::UnknownType < ::RedisClient::RESP3::Error; end -# source://redis-client//lib/redis_client.rb#126 +# source://redis-client//lib/redis_client.rb#127 class RedisClient::ReadOnlyError < ::RedisClient::ConnectionError include ::RedisClient::HasCommand end -# source://redis-client//lib/redis_client.rb#90 +# source://redis-client//lib/redis_client.rb#91 class RedisClient::ReadTimeoutError < ::RedisClient::TimeoutError; end # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#6 @@ -1021,6 +1054,9 @@ class RedisClient::RubyConnection # source://redis-client//lib/redis_client/ruby_connection.rb#52 def connected?; end + # source://redis-client//lib/redis_client/ruby_connection.rb#104 + def measure_round_trip_delay; end + # source://redis-client//lib/redis_client/ruby_connection.rb#92 def read(timeout = T.unsafe(nil)); end @@ -1038,12 +1074,12 @@ class RedisClient::RubyConnection private - # source://redis-client//lib/redis_client/ruby_connection.rb#106 + # source://redis-client//lib/redis_client/ruby_connection.rb#112 def connect; end # unknown # - # source://redis-client//lib/redis_client/ruby_connection.rb#163 + # source://redis-client//lib/redis_client/ruby_connection.rb#170 def enable_socket_keep_alive(socket); end class << self @@ -1131,15 +1167,15 @@ RedisClient::RubyConnection::BufferedIO::EOL_SIZE = T.let(T.unsafe(nil), Integer # Same as hiredis defaults # -# source://redis-client//lib/redis_client/ruby_connection.rb#148 +# source://redis-client//lib/redis_client/ruby_connection.rb#155 RedisClient::RubyConnection::KEEP_ALIVE_INTERVAL = T.let(T.unsafe(nil), Integer) -# source://redis-client//lib/redis_client/ruby_connection.rb#150 +# source://redis-client//lib/redis_client/ruby_connection.rb#157 RedisClient::RubyConnection::KEEP_ALIVE_PROBES = T.let(T.unsafe(nil), Integer) # Longer than hiredis defaults # -# source://redis-client//lib/redis_client/ruby_connection.rb#149 +# source://redis-client//lib/redis_client/ruby_connection.rb#156 RedisClient::RubyConnection::KEEP_ALIVE_TTL = T.let(T.unsafe(nil), Integer) # source://redis-client//lib/redis_client/ruby_connection.rb#41 @@ -1151,58 +1187,63 @@ class RedisClient::SentinelConfig # @return [SentinelConfig] a new instance of SentinelConfig # - # source://redis-client//lib/redis_client/sentinel_config.rb#10 - def initialize(name:, sentinels:, role: T.unsafe(nil), **client_config); end + # source://redis-client//lib/redis_client/sentinel_config.rb#12 + def initialize(sentinels:, sentinel_password: T.unsafe(nil), sentinel_username: T.unsafe(nil), role: T.unsafe(nil), name: T.unsafe(nil), url: T.unsafe(nil), **client_config); end - # source://redis-client//lib/redis_client/sentinel_config.rb#73 + # source://redis-client//lib/redis_client/sentinel_config.rb#101 def check_role!(role); end - # source://redis-client//lib/redis_client/sentinel_config.rb#52 + # source://redis-client//lib/redis_client/sentinel_config.rb#80 def host; end - # source://redis-client//lib/redis_client/sentinel_config.rb#60 + # Returns the value of attribute name. + # + # source://redis-client//lib/redis_client/sentinel_config.rb#10 + def name; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#88 def path; end - # source://redis-client//lib/redis_client/sentinel_config.rb#56 + # source://redis-client//lib/redis_client/sentinel_config.rb#84 def port; end - # source://redis-client//lib/redis_client/sentinel_config.rb#46 + # source://redis-client//lib/redis_client/sentinel_config.rb#74 def reset; end # @return [Boolean] # - # source://redis-client//lib/redis_client/sentinel_config.rb#64 + # source://redis-client//lib/redis_client/sentinel_config.rb#92 def retry_connecting?(attempt, error); end # @return [Boolean] # - # source://redis-client//lib/redis_client/sentinel_config.rb#69 + # source://redis-client//lib/redis_client/sentinel_config.rb#97 def sentinel?; end - # source://redis-client//lib/redis_client/sentinel_config.rb#40 + # source://redis-client//lib/redis_client/sentinel_config.rb#68 def sentinels; end private - # source://redis-client//lib/redis_client/sentinel_config.rb#100 + # source://redis-client//lib/redis_client/sentinel_config.rb#128 def config; end - # source://redis-client//lib/redis_client/sentinel_config.rb#147 + # source://redis-client//lib/redis_client/sentinel_config.rb#175 def each_sentinel; end - # source://redis-client//lib/redis_client/sentinel_config.rb#169 + # source://redis-client//lib/redis_client/sentinel_config.rb#197 def refresh_sentinels(sentinel_client); end - # source://redis-client//lib/redis_client/sentinel_config.rb#110 + # source://redis-client//lib/redis_client/sentinel_config.rb#138 def resolve_master; end - # source://redis-client//lib/redis_client/sentinel_config.rb#129 + # source://redis-client//lib/redis_client/sentinel_config.rb#157 def resolve_replica; end - # source://redis-client//lib/redis_client/sentinel_config.rb#125 + # source://redis-client//lib/redis_client/sentinel_config.rb#153 def sentinel_client(sentinel_config); end - # source://redis-client//lib/redis_client/sentinel_config.rb#89 + # source://redis-client//lib/redis_client/sentinel_config.rb#117 def sentinels_to_configs(sentinels); end end @@ -1212,17 +1253,58 @@ RedisClient::SentinelConfig::DEFAULT_RECONNECT_ATTEMPTS = T.let(T.unsafe(nil), I # source://redis-client//lib/redis_client/sentinel_config.rb#7 RedisClient::SentinelConfig::SENTINEL_DELAY = T.let(T.unsafe(nil), Float) -# source://redis-client//lib/redis_client.rb#89 +# source://redis-client//lib/redis_client.rb#90 class RedisClient::TimeoutError < ::RedisClient::ConnectionError; end -# source://redis-client//lib/redis_client.rb#82 +# source://redis-client//lib/redis_client/url_config.rb#6 +class RedisClient::URLConfig + # @return [URLConfig] a new instance of URLConfig + # + # source://redis-client//lib/redis_client/url_config.rb#9 + def initialize(url); end + + # source://redis-client//lib/redis_client/url_config.rb#30 + def db; end + + # source://redis-client//lib/redis_client/url_config.rb#56 + def host; end + + # source://redis-client//lib/redis_client/url_config.rb#48 + def password; end + + # source://redis-client//lib/redis_client/url_config.rb#62 + def path; end + + # source://redis-client//lib/redis_client/url_config.rb#68 + def port; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/url_config.rb#26 + def ssl?; end + + # Returns the value of attribute uri. + # + # source://redis-client//lib/redis_client/url_config.rb#7 + def uri; end + + # Returns the value of attribute url. + # + # source://redis-client//lib/redis_client/url_config.rb#7 + def url; end + + # source://redis-client//lib/redis_client/url_config.rb#44 + def username; end +end + +# source://redis-client//lib/redis_client.rb#83 class RedisClient::UnsupportedServer < ::RedisClient::Error; end # source://redis-client//lib/redis_client/version.rb#4 RedisClient::VERSION = T.let(T.unsafe(nil), String) -# source://redis-client//lib/redis_client.rb#91 +# source://redis-client//lib/redis_client.rb#92 class RedisClient::WriteTimeoutError < ::RedisClient::TimeoutError; end -# source://redis-client//lib/redis_client.rb#123 +# source://redis-client//lib/redis_client.rb#124 class RedisClient::WrongTypeError < ::RedisClient::CommandError; end diff --git a/sorbet/rbi/gems/redis@5.0.6.rbi b/sorbet/rbi/gems/redis@5.0.8.rbi similarity index 92% rename from sorbet/rbi/gems/redis@5.0.6.rbi rename to sorbet/rbi/gems/redis@5.0.8.rbi index 09a1acc14..67e4f30b8 100644 --- a/sorbet/rbi/gems/redis@5.0.6.rbi +++ b/sorbet/rbi/gems/redis@5.0.8.rbi @@ -95,19 +95,19 @@ class Redis private - # source://redis//lib/redis.rb#177 + # source://redis//lib/redis.rb#164 def _subscription(method, timeout, channels, block); end # source://redis//lib/redis.rb#134 def initialize_client(options); end - # source://redis//lib/redis.rb#171 + # source://redis//lib/redis.rb#158 def send_blocking_command(command, timeout, &block); end - # source://redis//lib/redis.rb#165 + # source://redis//lib/redis.rb#150 def send_command(command, &block); end - # source://redis//lib/redis.rb#161 + # source://redis//lib/redis.rb#146 def synchronize; end class << self @@ -160,67 +160,64 @@ class Redis::CannotConnectError < ::Redis::BaseConnectionError; end # source://redis//lib/redis/client.rb#6 class Redis::Client < ::RedisClient - # source://redis//lib/redis/client.rb#78 + # source://redis//lib/redis/client.rb#95 def blocking_call_v(timeout, command, &block); end - # source://redis//lib/redis/client.rb#72 + # source://redis//lib/redis/client.rb#89 def call_v(command, &block); end - # source://redis//lib/redis/client.rb#43 + # source://redis//lib/redis/client.rb#60 def db; end - # source://redis//lib/redis/client.rb#103 - def disable_reconnection(&block); end - - # source://redis//lib/redis/client.rb#47 + # source://redis//lib/redis/client.rb#64 def host; end - # source://redis//lib/redis/client.rb#31 + # source://redis//lib/redis/client.rb#48 def id; end - # source://redis//lib/redis/client.rb#107 + # source://redis//lib/redis/client.rb#120 def inherit_socket!; end - # source://redis//lib/redis/client.rb#97 + # source://redis//lib/redis/client.rb#114 def multi; end - # source://redis//lib/redis/client.rb#63 + # source://redis//lib/redis/client.rb#80 def password; end - # source://redis//lib/redis/client.rb#55 + # source://redis//lib/redis/client.rb#72 def path; end - # source://redis//lib/redis/client.rb#91 + # source://redis//lib/redis/client.rb#108 def pipelined; end - # source://redis//lib/redis/client.rb#51 + # source://redis//lib/redis/client.rb#68 def port; end - # source://redis//lib/redis/client.rb#35 + # source://redis//lib/redis/client.rb#52 def server_url; end - # source://redis//lib/redis/client.rb#39 + # source://redis//lib/redis/client.rb#56 def timeout; end - # source://redis//lib/redis/client.rb#59 + # source://redis//lib/redis/client.rb#76 def username; end - private - - # @raise [redis_error] - # - # source://redis//lib/redis/client.rb#113 - def translate_error!(error); end - - # source://redis//lib/redis/client.rb#118 - def translate_error_class(error_class); end - class << self # source://redis//lib/redis/client.rb#22 def config(**kwargs); end # source://redis//lib/redis/client.rb#26 def sentinel(**kwargs); end + + # @raise [redis_error] + # + # source://redis//lib/redis/client.rb#30 + def translate_error!(error); end + + private + + # source://redis//lib/redis/client.rb#37 + def translate_error_class(error_class); end end end @@ -1109,6 +1106,21 @@ module Redis::Commands::Lists # source://redis//lib/redis/commands/lists.rb#55 def blmove(source, destination, where_source, where_destination, timeout: T.unsafe(nil)); end + # Pops one or more elements from the first non-empty list key from the list + # of provided key names. If lists are empty, blocks until timeout has passed. + # + # @example Popping a element + # redis.blmpop(1.0, 'list') + # #=> ['list', ['a']] + # @example With count option + # redis.blmpop(1.0, 'list', count: 2) + # #=> ['list', ['a', 'b']] + # @raise [ArgumentError] + # @return [Array>] list of popped elements or nil + # + # source://redis//lib/redis/commands/lists.rb#205 + def blmpop(timeout, *keys, modifier: T.unsafe(nil), count: T.unsafe(nil)); end + # Remove and get the first element in a list, or block until one is available. # # @example With timeout @@ -1160,7 +1172,7 @@ module Redis::Commands::Lists # @param index [Integer] # @return [String] # - # source://redis//lib/redis/commands/lists.rb#191 + # source://redis//lib/redis/commands/lists.rb#245 def lindex(key, index); end # Insert an element before or after another element in a list. @@ -1172,7 +1184,7 @@ module Redis::Commands::Lists # @return [Integer] length of the list after the insert operation, or `-1` # when the element `pivot` was not found # - # source://redis//lib/redis/commands/lists.rb#203 + # source://redis//lib/redis/commands/lists.rb#257 def linsert(key, where, pivot, value); end # Get the length of a list. @@ -1198,6 +1210,21 @@ module Redis::Commands::Lists # source://redis//lib/redis/commands/lists.rb#27 def lmove(source, destination, where_source, where_destination); end + # Pops one or more elements from the first non-empty list key from the list + # of provided key names. + # + # @example Popping a element + # redis.lmpop('list') + # #=> ['list', ['a']] + # @example With count option + # redis.lmpop('list', count: 2) + # #=> ['list', ['a', 'b']] + # @raise [ArgumentError] + # @return [Array>] list of popped elements or nil + # + # source://redis//lib/redis/commands/lists.rb#231 + def lmpop(*keys, modifier: T.unsafe(nil), count: T.unsafe(nil)); end + # Remove and get the first elements in a list. # # @param key [String] @@ -1232,7 +1259,7 @@ module Redis::Commands::Lists # @param stop [Integer] stop index # @return [Array] # - # source://redis//lib/redis/commands/lists.rb#213 + # source://redis//lib/redis/commands/lists.rb#267 def lrange(key, start, stop); end # Remove elements from a list. @@ -1245,7 +1272,7 @@ module Redis::Commands::Lists # @param value [String] # @return [Integer] the number of removed elements # - # source://redis//lib/redis/commands/lists.rb#226 + # source://redis//lib/redis/commands/lists.rb#280 def lrem(key, count, value); end # Set the value of an element in a list by its index. @@ -1255,7 +1282,7 @@ module Redis::Commands::Lists # @param value [String] # @return [String] `OK` # - # source://redis//lib/redis/commands/lists.rb#236 + # source://redis//lib/redis/commands/lists.rb#290 def lset(key, index, value); end # Trim a list to the specified range. @@ -1265,7 +1292,7 @@ module Redis::Commands::Lists # @param stop [Integer] stop index # @return [String] `OK` # - # source://redis//lib/redis/commands/lists.rb#246 + # source://redis//lib/redis/commands/lists.rb#300 def ltrim(key, start, stop); end # Remove and get the last elements in a list. @@ -1306,10 +1333,10 @@ module Redis::Commands::Lists private - # source://redis//lib/redis/commands/lists.rb#252 + # source://redis//lib/redis/commands/lists.rb#306 def _bpop(cmd, args, &blk); end - # source://redis//lib/redis/commands/lists.rb#269 + # source://redis//lib/redis/commands/lists.rb#323 def _normalize_move_wheres(where_source, where_destination); end end @@ -1348,6 +1375,22 @@ module Redis::Commands::Pubsub # source://redis//lib/redis/commands/pubsub.rb#43 def punsubscribe(*channels); end + # Post a message to a channel in a shard. + # + # source://redis//lib/redis/commands/pubsub.rb#54 + def spublish(channel, message); end + + # Listen for messages published to the given channels in a shard. + # + # source://redis//lib/redis/commands/pubsub.rb#59 + def ssubscribe(*channels, &block); end + + # Listen for messages published to the given channels in a shard. + # Throw a timeout error if there is no messages for a timeout period. + # + # source://redis//lib/redis/commands/pubsub.rb#65 + def ssubscribe_with_timeout(timeout, *channels, &block); end + # Listen for messages published to the given channels. # # source://redis//lib/redis/commands/pubsub.rb#16 @@ -1364,6 +1407,11 @@ module Redis::Commands::Pubsub # source://redis//lib/redis/commands/pubsub.rb#11 def subscribed?; end + # Stop listening for messages posted to the given channels in a shard. + # + # source://redis//lib/redis/commands/pubsub.rb#70 + def sunsubscribe(*channels); end + # Stop listening for messages posted to the given channels. # # source://redis//lib/redis/commands/pubsub.rb#27 @@ -1752,6 +1800,20 @@ end # source://redis//lib/redis/commands/sorted_sets.rb#5 module Redis::Commands::SortedSets + # Removes and returns up to count members with scores in the sorted set stored at key. + # + # @example Popping a member + # redis.bzmpop('zset') + # #=> ['zset', ['a', 1.0]] + # @example With count option + # redis.bzmpop('zset', count: 2) + # #=> ['zset', [['a', 1.0], ['b', 2.0]] + # @raise [ArgumentError] + # @return [Array>] list of popped elements and scores + # + # source://redis//lib/redis/commands/sorted_sets.rb#188 + def bzmpop(timeout, *keys, modifier: T.unsafe(nil), count: T.unsafe(nil)); end + # Removes and returns up to count members with the highest scores in the sorted set stored at keys, # or block until one is available. # @@ -1764,7 +1826,7 @@ module Redis::Commands::SortedSets # @return [Array] a touple of key, member and score # @return [nil] when no element could be popped and the timeout expired # - # source://redis//lib/redis/commands/sorted_sets.rb#185 + # source://redis//lib/redis/commands/sorted_sets.rb#251 def bzpopmax(*args); end # Removes and returns up to count members with the lowest scores in the sorted set stored at keys, @@ -1779,7 +1841,7 @@ module Redis::Commands::SortedSets # @return [Array] a touple of key, member and score # @return [nil] when no element could be popped and the timeout expired # - # source://redis//lib/redis/commands/sorted_sets.rb#206 + # source://redis//lib/redis/commands/sorted_sets.rb#272 def bzpopmin(*args); end # Add one or more members to a sorted set, or update the score for members @@ -1842,7 +1904,7 @@ module Redis::Commands::SortedSets # - exclusive maximum score is specified by prefixing `(` # @return [Integer] number of members in within the specified range # - # source://redis//lib/redis/commands/sorted_sets.rb#612 + # source://redis//lib/redis/commands/sorted_sets.rb#678 def zcount(key, min, max); end # Return the difference between the first and all successive input sorted sets @@ -1862,7 +1924,7 @@ module Redis::Commands::SortedSets # @return [Array, Array<[String, Float]>] - when `:with_scores` is not specified, an array of members # - when `:with_scores` is specified, an array with `[member, score]` pairs # - # source://redis//lib/redis/commands/sorted_sets.rb#721 + # source://redis//lib/redis/commands/sorted_sets.rb#787 def zdiff(*keys, with_scores: T.unsafe(nil)); end # Compute the difference between the first and all successive input sorted sets @@ -1877,7 +1939,7 @@ module Redis::Commands::SortedSets # @param keys [Array] source keys # @return [Integer] number of elements in the resulting sorted set # - # source://redis//lib/redis/commands/sorted_sets.rb#737 + # source://redis//lib/redis/commands/sorted_sets.rb#803 def zdiffstore(*args, **_arg1); end # Increment the score of a member in a sorted set. @@ -1909,7 +1971,7 @@ module Redis::Commands::SortedSets # @return [Array, Array<[String, Float]>] - when `:with_scores` is not specified, an array of members # - when `:with_scores` is specified, an array with `[member, score]` pairs # - # source://redis//lib/redis/commands/sorted_sets.rb#635 + # source://redis//lib/redis/commands/sorted_sets.rb#701 def zinter(*args, **_arg1); end # Intersect multiple sorted sets and store the resulting sorted set in a new @@ -1925,7 +1987,7 @@ module Redis::Commands::SortedSets # - `:aggregate => String`: aggregate function to use (sum, min, max) # @return [Integer] number of elements in the resulting sorted set # - # source://redis//lib/redis/commands/sorted_sets.rb#654 + # source://redis//lib/redis/commands/sorted_sets.rb#720 def zinterstore(*args, **_arg1); end # Count the members, with the same score in a sorted set, within the given lexicographical range. @@ -1943,9 +2005,23 @@ module Redis::Commands::SortedSets # - exclusive maximum is specified by prefixing `[` # @return [Integer] number of members within the specified lexicographical range # - # source://redis//lib/redis/commands/sorted_sets.rb#443 + # source://redis//lib/redis/commands/sorted_sets.rb#509 def zlexcount(key, min, max); end + # Removes and returns up to count members with scores in the sorted set stored at key. + # + # @example Popping a member + # redis.zmpop('zset') + # #=> ['zset', ['a', 1.0]] + # @example With count option + # redis.zmpop('zset', count: 2) + # #=> ['zset', [['a', 1.0], ['b', 2.0]] + # @raise [ArgumentError] + # @return [Array>] list of popped elements and scores + # + # source://redis//lib/redis/commands/sorted_sets.rb#220 + def zmpop(*keys, modifier: T.unsafe(nil), count: T.unsafe(nil)); end + # Get the scores associated with the given members in a sorted set. # # @example Get the scores for members "a" and "b" @@ -1955,7 +2031,7 @@ module Redis::Commands::SortedSets # @param members [String, Array] # @return [Array] scores of the members # - # source://redis//lib/redis/commands/sorted_sets.rb#234 + # source://redis//lib/redis/commands/sorted_sets.rb#300 def zmscore(key, *members); end # Removes and returns up to count members with the highest scores in the sorted set stored at key. @@ -2005,7 +2081,7 @@ module Redis::Commands::SortedSets # - when `count` is specified and `:with_scores` is not specified, an array of members # - when `:with_scores` is specified, an array with `[member, score]` pairs # - # source://redis//lib/redis/commands/sorted_sets.rb#262 + # source://redis//lib/redis/commands/sorted_sets.rb#328 def zrandmember(key, count = T.unsafe(nil), withscores: T.unsafe(nil), with_scores: T.unsafe(nil)); end # Return a range of members in a sorted set, by index, score or lexicographical ordering. @@ -2028,7 +2104,7 @@ module Redis::Commands::SortedSets # @return [Array, Array<[String, Float]>] - when `:with_scores` is not specified, an array of members # - when `:with_scores` is specified, an array with `[member, score]` pairs # - # source://redis//lib/redis/commands/sorted_sets.rb#301 + # source://redis//lib/redis/commands/sorted_sets.rb#367 def zrange(key, start, stop, byscore: T.unsafe(nil), by_score: T.unsafe(nil), bylex: T.unsafe(nil), by_lex: T.unsafe(nil), rev: T.unsafe(nil), limit: T.unsafe(nil), withscores: T.unsafe(nil), with_scores: T.unsafe(nil)); end # Return a range of members with the same score in a sorted set, by lexicographical ordering @@ -2048,7 +2124,7 @@ module Redis::Commands::SortedSets # `count` members # @return [Array, Array<[String, Float]>] # - # source://redis//lib/redis/commands/sorted_sets.rb#468 + # source://redis//lib/redis/commands/sorted_sets.rb#534 def zrangebylex(key, min, max, limit: T.unsafe(nil)); end # Return a range of members in a sorted set, by score. @@ -2073,7 +2149,7 @@ module Redis::Commands::SortedSets # @return [Array, Array<[String, Float]>] - when `:with_scores` is not specified, an array of members # - when `:with_scores` is specified, an array with `[member, score]` pairs # - # source://redis//lib/redis/commands/sorted_sets.rb#528 + # source://redis//lib/redis/commands/sorted_sets.rb#594 def zrangebyscore(key, min, max, withscores: T.unsafe(nil), with_scores: T.unsafe(nil), limit: T.unsafe(nil)); end # Select a range of members in a sorted set, by index, score or lexicographical ordering @@ -2088,7 +2164,7 @@ module Redis::Commands::SortedSets # @return [Integer] the number of elements in the resulting sorted set # @see #zrange # - # source://redis//lib/redis/commands/sorted_sets.rb#343 + # source://redis//lib/redis/commands/sorted_sets.rb#409 def zrangestore(dest_key, src_key, start, stop, byscore: T.unsafe(nil), by_score: T.unsafe(nil), bylex: T.unsafe(nil), by_lex: T.unsafe(nil), rev: T.unsafe(nil), limit: T.unsafe(nil)); end # Determine the index of a member in a sorted set. @@ -2097,7 +2173,7 @@ module Redis::Commands::SortedSets # @param member [String] # @return [Integer] # - # source://redis//lib/redis/commands/sorted_sets.rb#394 + # source://redis//lib/redis/commands/sorted_sets.rb#460 def zrank(key, member); end # Remove one or more members from a sorted set. @@ -2130,7 +2206,7 @@ module Redis::Commands::SortedSets # @param stop [Integer] stop index # @return [Integer] number of members that were removed # - # source://redis//lib/redis/commands/sorted_sets.rb#421 + # source://redis//lib/redis/commands/sorted_sets.rb#487 def zremrangebyrank(key, start, stop); end # Remove all members in a sorted set within the given scores. @@ -2148,7 +2224,7 @@ module Redis::Commands::SortedSets # - exclusive maximum score is specified by prefixing `(` # @return [Integer] number of members that were removed # - # source://redis//lib/redis/commands/sorted_sets.rb#591 + # source://redis//lib/redis/commands/sorted_sets.rb#657 def zremrangebyscore(key, min, max); end # Return a range of members in a sorted set, by index, with scores ordered @@ -2162,7 +2238,7 @@ module Redis::Commands::SortedSets # # => [["b", 64.0], ["a", 32.0]] # @see #zrange # - # source://redis//lib/redis/commands/sorted_sets.rb#378 + # source://redis//lib/redis/commands/sorted_sets.rb#444 def zrevrange(key, start, stop, withscores: T.unsafe(nil), with_scores: T.unsafe(nil)); end # Return a range of members with the same score in a sorted set, by reversed lexicographical ordering. @@ -2176,7 +2252,7 @@ module Redis::Commands::SortedSets # # => ["abbygail", "abby"] # @see #zrangebylex # - # source://redis//lib/redis/commands/sorted_sets.rb#490 + # source://redis//lib/redis/commands/sorted_sets.rb#556 def zrevrangebylex(key, max, min, limit: T.unsafe(nil)); end # Return a range of members in a sorted set, by score, with scores ordered @@ -2193,7 +2269,7 @@ module Redis::Commands::SortedSets # # => [["b", 64.0], ["a", 32.0]] # @see #zrangebyscore # - # source://redis//lib/redis/commands/sorted_sets.rb#558 + # source://redis//lib/redis/commands/sorted_sets.rb#624 def zrevrangebyscore(key, max, min, withscores: T.unsafe(nil), with_scores: T.unsafe(nil), limit: T.unsafe(nil)); end # Determine the index of a member in a sorted set, with scores ordered from @@ -2203,7 +2279,7 @@ module Redis::Commands::SortedSets # @param member [String] # @return [Integer] # - # source://redis//lib/redis/commands/sorted_sets.rb#404 + # source://redis//lib/redis/commands/sorted_sets.rb#470 def zrevrank(key, member); end # Scan a sorted set @@ -2216,7 +2292,7 @@ module Redis::Commands::SortedSets # @return [String, Array<[String, Float]>] the next cursor and all found # members and scores # - # source://redis//lib/redis/commands/sorted_sets.rb#754 + # source://redis//lib/redis/commands/sorted_sets.rb#820 def zscan(key, cursor, **options); end # Scan a sorted set @@ -2228,7 +2304,7 @@ module Redis::Commands::SortedSets # - `:count => Integer`: return count keys at most per iteration # @return [Enumerator] an enumerator for all found scores and members # - # source://redis//lib/redis/commands/sorted_sets.rb#771 + # source://redis//lib/redis/commands/sorted_sets.rb#837 def zscan_each(key, **options, &block); end # Get the score associated with the given member in a sorted set. @@ -2240,7 +2316,7 @@ module Redis::Commands::SortedSets # @param member [String] # @return [Float] score of the member # - # source://redis//lib/redis/commands/sorted_sets.rb#221 + # source://redis//lib/redis/commands/sorted_sets.rb#287 def zscore(key, member); end # Return the union of multiple sorted sets @@ -2259,7 +2335,7 @@ module Redis::Commands::SortedSets # @return [Array, Array<[String, Float]>] - when `:with_scores` is not specified, an array of members # - when `:with_scores` is specified, an array with `[member, score]` pairs # - # source://redis//lib/redis/commands/sorted_sets.rb#678 + # source://redis//lib/redis/commands/sorted_sets.rb#744 def zunion(*args, **_arg1); end # Add multiple sorted sets and store the resulting sorted set in a new key. @@ -2274,15 +2350,15 @@ module Redis::Commands::SortedSets # - `:aggregate => String`: aggregate function to use (sum, min, max, ...) # @return [Integer] number of elements in the resulting sorted set # - # source://redis//lib/redis/commands/sorted_sets.rb#696 + # source://redis//lib/redis/commands/sorted_sets.rb#762 def zunionstore(*args, **_arg1); end private - # source://redis//lib/redis/commands/sorted_sets.rb#784 + # source://redis//lib/redis/commands/sorted_sets.rb#850 def _zsets_operation(cmd, *keys, weights: T.unsafe(nil), aggregate: T.unsafe(nil), with_scores: T.unsafe(nil)); end - # source://redis//lib/redis/commands/sorted_sets.rb#803 + # source://redis//lib/redis/commands/sorted_sets.rb#869 def _zsets_operation_store(cmd, destination, keys, weights: T.unsafe(nil), aggregate: T.unsafe(nil)); end end @@ -2948,7 +3024,7 @@ class Redis::Distributed # source://redis//lib/redis/distributed.rb#466 def _bpop(cmd, args); end - # source://redis//lib/redis/distributed.rb#1000 + # source://redis//lib/redis/distributed.rb#1028 def _eval(cmd, args); end # source://redis//lib/redis/distributed.rb#41 @@ -2985,6 +3061,11 @@ class Redis::Distributed # source://redis//lib/redis/distributed.rb#422 def blmove(source, destination, where_source, where_destination, timeout: T.unsafe(nil)); end + # Iterate over keys, blocking and removing elements from the first non empty liist found. + # + # source://redis//lib/redis/distributed.rb#546 + def blmpop(timeout, *keys, modifier: T.unsafe(nil), count: T.unsafe(nil)); end + # Remove and get the first element in a list, or block until one is # available. # @@ -3003,6 +3084,11 @@ class Redis::Distributed # source://redis//lib/redis/distributed.rb#509 def brpoplpush(source, destination, **options); end + # Iterate over keys, blocking and removing members from the first non empty sorted set found. + # + # source://redis//lib/redis/distributed.rb#712 + def bzmpop(timeout, *keys, modifier: T.unsafe(nil), count: T.unsafe(nil)); end + # source://redis//lib/redis/distributed.rb#489 def bzpopmax(*args); end @@ -3041,7 +3127,7 @@ class Redis::Distributed # # @raise [CannotDistribute] # - # source://redis//lib/redis/distributed.rb#967 + # source://redis//lib/redis/distributed.rb#995 def discard; end # Return a serialized version of the value stored at a key. @@ -3049,7 +3135,7 @@ class Redis::Distributed # source://redis//lib/redis/distributed.rb#154 def dump(key); end - # source://redis//lib/redis/distributed.rb#1027 + # source://redis//lib/redis/distributed.rb#1055 def dup; end # Echo the given string. @@ -3059,19 +3145,19 @@ class Redis::Distributed # Evaluate Lua script. # - # source://redis//lib/redis/distributed.rb#1014 + # source://redis//lib/redis/distributed.rb#1042 def eval(*args); end # Evaluate Lua script by its SHA. # - # source://redis//lib/redis/distributed.rb#1019 + # source://redis//lib/redis/distributed.rb#1047 def evalsha(*args); end # Execute all commands issued after MULTI. # # @raise [CannotDistribute] # - # source://redis//lib/redis/distributed.rb#958 + # source://redis//lib/redis/distributed.rb#986 def exec; end # Determine if a key exists. @@ -3138,70 +3224,70 @@ class Redis::Distributed # Delete one or more hash fields. # - # source://redis//lib/redis/distributed.rb#848 + # source://redis//lib/redis/distributed.rb#876 def hdel(key, *fields); end # Determine if a hash field exists. # - # source://redis//lib/redis/distributed.rb#854 + # source://redis//lib/redis/distributed.rb#882 def hexists(key, field); end # Get the value of a hash field. # - # source://redis//lib/redis/distributed.rb#828 + # source://redis//lib/redis/distributed.rb#856 def hget(key, field); end # Get all the fields and values in a hash. # - # source://redis//lib/redis/distributed.rb#879 + # source://redis//lib/redis/distributed.rb#907 def hgetall(key); end # Increment the integer value of a hash field by the given integer number. # - # source://redis//lib/redis/distributed.rb#859 + # source://redis//lib/redis/distributed.rb#887 def hincrby(key, field, increment); end # Increment the numeric value of a hash field by the given float number. # - # source://redis//lib/redis/distributed.rb#864 + # source://redis//lib/redis/distributed.rb#892 def hincrbyfloat(key, field, increment); end # Get all the fields in a hash. # - # source://redis//lib/redis/distributed.rb#869 + # source://redis//lib/redis/distributed.rb#897 def hkeys(key); end # Get the number of fields in a hash. # - # source://redis//lib/redis/distributed.rb#804 + # source://redis//lib/redis/distributed.rb#832 def hlen(key); end # Get the values of all the given hash fields. # - # source://redis//lib/redis/distributed.rb#833 + # source://redis//lib/redis/distributed.rb#861 def hmget(key, *fields); end # Set multiple hash fields to multiple values. # - # source://redis//lib/redis/distributed.rb#819 + # source://redis//lib/redis/distributed.rb#847 def hmset(key, *attrs); end - # source://redis//lib/redis/distributed.rb#843 + # source://redis//lib/redis/distributed.rb#871 def hrandfield(key, count = T.unsafe(nil), **options); end # Set multiple hash fields to multiple values. # - # source://redis//lib/redis/distributed.rb#809 + # source://redis//lib/redis/distributed.rb#837 def hset(key, *attrs); end # Set the value of a hash field, only if the field does not exist. # - # source://redis//lib/redis/distributed.rb#814 + # source://redis//lib/redis/distributed.rb#842 def hsetnx(key, field, value); end # Get all the values in a hash. # - # source://redis//lib/redis/distributed.rb#874 + # source://redis//lib/redis/distributed.rb#902 def hvals(key); end # Increment the integer value of a key by one. @@ -3224,7 +3310,7 @@ class Redis::Distributed # source://redis//lib/redis/distributed.rb#94 def info(cmd = T.unsafe(nil)); end - # source://redis//lib/redis/distributed.rb#1023 + # source://redis//lib/redis/distributed.rb#1051 def inspect; end # Find all keys matching the given pattern. @@ -3257,6 +3343,11 @@ class Redis::Distributed # source://redis//lib/redis/distributed.rb#414 def lmove(source, destination, where_source, where_destination); end + # Iterate over keys, removing elements from the first non list found. + # + # source://redis//lib/redis/distributed.rb#553 + def lmpop(*keys, modifier: T.unsafe(nil), count: T.unsafe(nil)); end + # Remove and get the first elements in a list. # # source://redis//lib/redis/distributed.rb#449 @@ -3292,10 +3383,10 @@ class Redis::Distributed # source://redis//lib/redis/distributed.rb#541 def ltrim(key, start, stop); end - # source://redis//lib/redis/distributed.rb#838 + # source://redis//lib/redis/distributed.rb#866 def mapped_hmget(key, *fields); end - # source://redis//lib/redis/distributed.rb#823 + # source://redis//lib/redis/distributed.rb#851 def mapped_hmset(key, hash); end # Get the values of all the given keys as a Hash. @@ -3355,7 +3446,7 @@ class Redis::Distributed # # @raise [CannotDistribute] # - # source://redis//lib/redis/distributed.rb#951 + # source://redis//lib/redis/distributed.rb#979 def multi(&block); end # @raise [CannotDistribute] @@ -3383,18 +3474,18 @@ class Redis::Distributed # Add one or more members to a HyperLogLog structure. # - # source://redis//lib/redis/distributed.rb#981 + # source://redis//lib/redis/distributed.rb#1009 def pfadd(key, member); end # Get the approximate cardinality of members added to HyperLogLog structure. # - # source://redis//lib/redis/distributed.rb#986 + # source://redis//lib/redis/distributed.rb#1014 def pfcount(*keys); end # Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of # the observed Sets of the source HyperLogLog structures. # - # source://redis//lib/redis/distributed.rb#994 + # source://redis//lib/redis/distributed.rb#1022 def pfmerge(dest_key, *source_key); end # Ping the server. @@ -3404,7 +3495,7 @@ class Redis::Distributed # @raise [CannotDistribute] # - # source://redis//lib/redis/distributed.rb#946 + # source://redis//lib/redis/distributed.rb#974 def pipelined; end # Set the time to live in milliseconds of a key. @@ -3416,7 +3507,7 @@ class Redis::Distributed # # @raise [NotImplementedError] # - # source://redis//lib/redis/distributed.rb#913 + # source://redis//lib/redis/distributed.rb#941 def psubscribe(*channels, &block); end # Get the time to live (in milliseconds) for a key. @@ -3426,7 +3517,7 @@ class Redis::Distributed # Post a message to a channel. # - # source://redis//lib/redis/distributed.rb#884 + # source://redis//lib/redis/distributed.rb#912 def publish(channel, message); end # Stop listening for messages posted to channels matching the given @@ -3434,7 +3525,7 @@ class Redis::Distributed # # @raise [NotImplementedError] # - # source://redis//lib/redis/distributed.rb#919 + # source://redis//lib/redis/distributed.rb#947 def punsubscribe(*channels); end # Close the connection. @@ -3492,14 +3583,14 @@ class Redis::Distributed # Add one or more members to a set. # - # source://redis//lib/redis/distributed.rb#551 + # source://redis//lib/redis/distributed.rb#565 def sadd(key, *members); end # Add one or more members to a set. # # @return [Boolean] # - # source://redis//lib/redis/distributed.rb#556 + # source://redis//lib/redis/distributed.rb#570 def sadd?(key, *members); end # Synchronously save the dataset to disk. @@ -3509,22 +3600,22 @@ class Redis::Distributed # Get the number of members in a set. # - # source://redis//lib/redis/distributed.rb#546 + # source://redis//lib/redis/distributed.rb#560 def scard(key); end # Control remote script registry. # - # source://redis//lib/redis/distributed.rb#976 + # source://redis//lib/redis/distributed.rb#1004 def script(subcommand, *args); end # Subtract multiple sets. # - # source://redis//lib/redis/distributed.rb#613 + # source://redis//lib/redis/distributed.rb#627 def sdiff(*keys); end # Subtract multiple sets and store the resulting set in a key. # - # source://redis//lib/redis/distributed.rb#621 + # source://redis//lib/redis/distributed.rb#635 def sdiffstore(destination, *keys); end # Change the selected database for the current connection. @@ -3559,32 +3650,32 @@ class Redis::Distributed # Intersect multiple sets. # - # source://redis//lib/redis/distributed.rb#629 + # source://redis//lib/redis/distributed.rb#643 def sinter(*keys); end # Intersect multiple sets and store the resulting set in a key. # - # source://redis//lib/redis/distributed.rb#637 + # source://redis//lib/redis/distributed.rb#651 def sinterstore(destination, *keys); end # Determine if a given value is a member of a set. # - # source://redis//lib/redis/distributed.rb#588 + # source://redis//lib/redis/distributed.rb#602 def sismember(key, member); end # Get all the members in a set. # - # source://redis//lib/redis/distributed.rb#598 + # source://redis//lib/redis/distributed.rb#612 def smembers(key); end # Determine if multiple values are members of a set. # - # source://redis//lib/redis/distributed.rb#593 + # source://redis//lib/redis/distributed.rb#607 def smismember(key, *members); end # Move a member from one set to another. # - # source://redis//lib/redis/distributed.rb#581 + # source://redis//lib/redis/distributed.rb#595 def smove(source, destination, member); end # Sort the elements in a list, set or sorted set. @@ -3594,34 +3685,34 @@ class Redis::Distributed # Remove and return a random member from a set. # - # source://redis//lib/redis/distributed.rb#571 + # source://redis//lib/redis/distributed.rb#585 def spop(key, count = T.unsafe(nil)); end # Get a random member from a set. # - # source://redis//lib/redis/distributed.rb#576 + # source://redis//lib/redis/distributed.rb#590 def srandmember(key, count = T.unsafe(nil)); end # Remove one or more members from a set. # - # source://redis//lib/redis/distributed.rb#561 + # source://redis//lib/redis/distributed.rb#575 def srem(key, *members); end # Remove one or more members from a set. # # @return [Boolean] # - # source://redis//lib/redis/distributed.rb#566 + # source://redis//lib/redis/distributed.rb#580 def srem?(key, *members); end # Scan a set # - # source://redis//lib/redis/distributed.rb#603 + # source://redis//lib/redis/distributed.rb#617 def sscan(key, cursor, **options); end # Scan a set and return an enumerator # - # source://redis//lib/redis/distributed.rb#608 + # source://redis//lib/redis/distributed.rb#622 def sscan_each(key, **options, &block); end # Get the length of the value stored in a key. @@ -3631,22 +3722,22 @@ class Redis::Distributed # Listen for messages published to the given channels. # - # source://redis//lib/redis/distributed.rb#893 + # source://redis//lib/redis/distributed.rb#921 def subscribe(channel, *channels, &block); end # @return [Boolean] # - # source://redis//lib/redis/distributed.rb#888 + # source://redis//lib/redis/distributed.rb#916 def subscribed?; end # Add multiple sets. # - # source://redis//lib/redis/distributed.rb#645 + # source://redis//lib/redis/distributed.rb#659 def sunion(*keys); end # Add multiple sets and store the resulting set in a key. # - # source://redis//lib/redis/distributed.rb#653 + # source://redis//lib/redis/distributed.rb#667 def sunionstore(destination, *keys); end # Get server time: an UNIX timestamp and the elapsed microseconds in the current second. @@ -3673,157 +3764,162 @@ class Redis::Distributed # # @raise [SubscriptionError] # - # source://redis//lib/redis/distributed.rb#906 + # source://redis//lib/redis/distributed.rb#934 def unsubscribe(*channels); end # Forget about all watched keys. # # @raise [CannotDistribute] # - # source://redis//lib/redis/distributed.rb#938 + # source://redis//lib/redis/distributed.rb#966 def unwatch; end # Watch the given keys to determine execution of the MULTI/EXEC block. # - # source://redis//lib/redis/distributed.rb#924 + # source://redis//lib/redis/distributed.rb#952 def watch(*keys, &block); end # Add one or more members to a sorted set, or update the score for members # that already exist. # - # source://redis//lib/redis/distributed.rb#667 + # source://redis//lib/redis/distributed.rb#681 def zadd(key, *args, **_arg2); end # Get the number of members in a sorted set. # - # source://redis//lib/redis/distributed.rb#661 + # source://redis//lib/redis/distributed.rb#675 def zcard(key); end # Get the number of members in a particular score range. # - # source://redis//lib/redis/distributed.rb#749 + # source://redis//lib/redis/distributed.rb#777 def zcount(key, min, max); end # Return the difference between the first and all successive input sorted sets. # - # source://redis//lib/redis/distributed.rb#787 + # source://redis//lib/redis/distributed.rb#815 def zdiff(*keys, **options); end # Compute the difference between the first and all successive input sorted sets # and store the resulting sorted set in a new key. # - # source://redis//lib/redis/distributed.rb#796 + # source://redis//lib/redis/distributed.rb#824 def zdiffstore(destination, *keys, **options); end # Increment the score of a member in a sorted set. # - # source://redis//lib/redis/distributed.rb#673 + # source://redis//lib/redis/distributed.rb#687 def zincrby(key, increment, member); end # Get the intersection of multiple sorted sets # - # source://redis//lib/redis/distributed.rb#754 + # source://redis//lib/redis/distributed.rb#782 def zinter(*keys, **options); end # Intersect multiple sorted sets and store the resulting sorted set in a new # key. # - # source://redis//lib/redis/distributed.rb#763 + # source://redis//lib/redis/distributed.rb#791 def zinterstore(destination, *keys, **options); end + # Iterate over keys, removing members from the first non empty sorted set found. + # + # source://redis//lib/redis/distributed.rb#719 + def zmpop(*keys, modifier: T.unsafe(nil), count: T.unsafe(nil)); end + # Get the scores associated with the given members in a sorted set. # - # source://redis//lib/redis/distributed.rb#693 + # source://redis//lib/redis/distributed.rb#707 def zmscore(key, *members); end # Get one or more random members from a sorted set. # - # source://redis//lib/redis/distributed.rb#688 + # source://redis//lib/redis/distributed.rb#702 def zrandmember(key, count = T.unsafe(nil), **options); end # Return a range of members in a sorted set, by index, score or lexicographical ordering. # - # source://redis//lib/redis/distributed.rb#698 + # source://redis//lib/redis/distributed.rb#726 def zrange(key, start, stop, **options); end # Return a range of members in a sorted set, by score. # - # source://redis//lib/redis/distributed.rb#733 + # source://redis//lib/redis/distributed.rb#761 def zrangebyscore(key, min, max, **options); end # Select a range of members in a sorted set, by index, score or lexicographical ordering # and store the resulting sorted set in a new key. # - # source://redis//lib/redis/distributed.rb#704 + # source://redis//lib/redis/distributed.rb#732 def zrangestore(dest_key, src_key, start, stop, **options); end # Determine the index of a member in a sorted set. # - # source://redis//lib/redis/distributed.rb#717 + # source://redis//lib/redis/distributed.rb#745 def zrank(key, member); end # Remove one or more members from a sorted set. # - # source://redis//lib/redis/distributed.rb#678 + # source://redis//lib/redis/distributed.rb#692 def zrem(key, member); end # Remove all members in a sorted set within the given indexes. # - # source://redis//lib/redis/distributed.rb#728 + # source://redis//lib/redis/distributed.rb#756 def zremrangebyrank(key, start, stop); end # Remove all members in a sorted set within the given scores. # - # source://redis//lib/redis/distributed.rb#744 + # source://redis//lib/redis/distributed.rb#772 def zremrangebyscore(key, min, max); end # Return a range of members in a sorted set, by index, with scores ordered # from high to low. # - # source://redis//lib/redis/distributed.rb#712 + # source://redis//lib/redis/distributed.rb#740 def zrevrange(key, start, stop, **options); end # Return a range of members in a sorted set, by score, with scores ordered # from high to low. # - # source://redis//lib/redis/distributed.rb#739 + # source://redis//lib/redis/distributed.rb#767 def zrevrangebyscore(key, max, min, **options); end # Determine the index of a member in a sorted set, with scores ordered from # high to low. # - # source://redis//lib/redis/distributed.rb#723 + # source://redis//lib/redis/distributed.rb#751 def zrevrank(key, member); end # Get the score associated with the given member in a sorted set. # - # source://redis//lib/redis/distributed.rb#683 + # source://redis//lib/redis/distributed.rb#697 def zscore(key, member); end # Return the union of multiple sorted sets. # - # source://redis//lib/redis/distributed.rb#771 + # source://redis//lib/redis/distributed.rb#799 def zunion(*keys, **options); end # Add multiple sorted sets and store the resulting sorted set in a new key. # - # source://redis//lib/redis/distributed.rb#779 + # source://redis//lib/redis/distributed.rb#807 def zunionstore(destination, *keys, **options); end protected # @yield [node_for(keys.first)] # - # source://redis//lib/redis/distributed.rb#1048 + # source://redis//lib/redis/distributed.rb#1076 def ensure_same_node(command, keys); end - # source://redis//lib/redis/distributed.rb#1043 + # source://redis//lib/redis/distributed.rb#1071 def key_tag(key); end - # source://redis//lib/redis/distributed.rb#1039 + # source://redis//lib/redis/distributed.rb#1067 def node_index_for(key); end - # source://redis//lib/redis/distributed.rb#1033 + # source://redis//lib/redis/distributed.rb#1061 def on_each_node(command, *args); end end @@ -4075,7 +4171,7 @@ class Redis::SubscribedClient # source://redis//lib/redis/subscribe.rb#10 def call_v(command); end - # source://redis//lib/redis/subscribe.rb#40 + # source://redis//lib/redis/subscribe.rb#52 def close; end # source://redis//lib/redis/subscribe.rb#24 @@ -4084,54 +4180,72 @@ class Redis::SubscribedClient # source://redis//lib/redis/subscribe.rb#28 def psubscribe_with_timeout(timeout, *channels, &block); end - # source://redis//lib/redis/subscribe.rb#36 + # source://redis//lib/redis/subscribe.rb#44 def punsubscribe(*channels); end + # source://redis//lib/redis/subscribe.rb#32 + def ssubscribe(*channels, &block); end + + # source://redis//lib/redis/subscribe.rb#36 + def ssubscribe_with_timeout(timeout, *channels, &block); end + # source://redis//lib/redis/subscribe.rb#16 def subscribe(*channels, &block); end # source://redis//lib/redis/subscribe.rb#20 def subscribe_with_timeout(timeout, *channels, &block); end - # source://redis//lib/redis/subscribe.rb#32 + # source://redis//lib/redis/subscribe.rb#48 + def sunsubscribe(*channels); end + + # source://redis//lib/redis/subscribe.rb#40 def unsubscribe(*channels); end protected - # source://redis//lib/redis/subscribe.rb#46 + # source://redis//lib/redis/subscribe.rb#58 def subscription(start, stop, channels, block, timeout = T.unsafe(nil)); end end -# source://redis//lib/redis/subscribe.rb#66 +# source://redis//lib/redis/subscribe.rb#82 class Redis::Subscription # @return [Subscription] a new instance of Subscription # @yield [_self] # @yieldparam _self [Redis::Subscription] the object that the method was called on # - # source://redis//lib/redis/subscribe.rb#69 + # source://redis//lib/redis/subscribe.rb#85 def initialize; end # Returns the value of attribute callbacks. # - # source://redis//lib/redis/subscribe.rb#67 + # source://redis//lib/redis/subscribe.rb#83 def callbacks; end - # source://redis//lib/redis/subscribe.rb#82 + # source://redis//lib/redis/subscribe.rb#98 def message(&block); end - # source://redis//lib/redis/subscribe.rb#94 + # source://redis//lib/redis/subscribe.rb#110 def pmessage(&block); end - # source://redis//lib/redis/subscribe.rb#86 + # source://redis//lib/redis/subscribe.rb#102 def psubscribe(&block); end - # source://redis//lib/redis/subscribe.rb#90 + # source://redis//lib/redis/subscribe.rb#106 def punsubscribe(&block); end - # source://redis//lib/redis/subscribe.rb#74 + # source://redis//lib/redis/subscribe.rb#122 + def smessage(&block); end + + # source://redis//lib/redis/subscribe.rb#114 + def ssubscribe(&block); end + + # source://redis//lib/redis/subscribe.rb#90 def subscribe(&block); end - # source://redis//lib/redis/subscribe.rb#78 + # source://redis//lib/redis/subscribe.rb#118 + def sunsubscribe(&block); end + + # source://redis//lib/redis/subscribe.rb#94 def unsubscribe(&block); end end diff --git a/sorbet/rbi/gems/regexp_parser@2.8.1.rbi b/sorbet/rbi/gems/regexp_parser@2.9.0.rbi similarity index 96% rename from sorbet/rbi/gems/regexp_parser@2.8.1.rbi rename to sorbet/rbi/gems/regexp_parser@2.9.0.rbi index e10d9b8de..34ad4f2a7 100644 --- a/sorbet/rbi/gems/regexp_parser@2.8.1.rbi +++ b/sorbet/rbi/gems/regexp_parser@2.9.0.rbi @@ -94,6 +94,9 @@ end class Regexp::Expression::Anchor::NonWordBoundary < ::Regexp::Expression::Anchor::Base # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#17 def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#13 + def negative?; end end # source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#13 @@ -127,12 +130,18 @@ end class Regexp::Expression::Assertion::NegativeLookahead < ::Regexp::Expression::Assertion::Base # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#21 def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#14 + def negative?; end end # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#71 class Regexp::Expression::Assertion::NegativeLookbehind < ::Regexp::Expression::Assertion::Base # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#22 def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#15 + def negative?; end end # alias for symmetry between token symbol and Expression class name @@ -574,10 +583,10 @@ end class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression # @return [CharacterSet] a new instance of CharacterSet # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#9 + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#6 def initialize(token, options = T.unsafe(nil)); end - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#19 + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#16 def close; end # Returns the value of attribute closed. @@ -600,14 +609,9 @@ class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 def match_length; end - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#15 + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#12 def negate; end - # Returns the value of attribute negative. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 - def negated?; end - # Returns the value of attribute negative. # # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 @@ -620,9 +624,7 @@ class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 def negative=(_arg0); end - # Returns the value of attribute negative. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#16 def negative?; end # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#15 @@ -686,6 +688,9 @@ end class Regexp::Expression::CharacterType::Base < ::Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#17 + def negative?; end end # source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#6 @@ -1151,10 +1156,10 @@ end # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#85 Regexp::Expression::MatchLength = Regexp::MatchLength -# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#14 +# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#10 Regexp::Expression::Nonposixclass = Regexp::Expression::PosixClass -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#121 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#118 Regexp::Expression::Nonproperty = Regexp::Expression::UnicodeProperty # source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#2 @@ -1162,23 +1167,21 @@ class Regexp::Expression::PosixClass < ::Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 def match_length; end - # source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#7 + # source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#3 def name; end - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#3 + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#18 def negative?; end end # alias for symmetry between token symbol and Expression class name # -# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#13 +# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#9 Regexp::Expression::Posixclass = Regexp::Expression::PosixClass # alias for symmetry between token symbol and Expression class name # -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#120 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#117 Regexp::Expression::Property = Regexp::Expression::UnicodeProperty # TODO: in v3.0.0, maybe put Shared back into Base, and inherit from Base and @@ -1370,7 +1373,7 @@ end # alias for symmetry between token symbol and Expression class name # -# source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#25 +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#22 Regexp::Expression::Set = Regexp::Expression::CharacterSet # source://regexp_parser//lib/regexp_parser/expression/shared.rb#2 @@ -1453,6 +1456,18 @@ module Regexp::Expression::Shared # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#36 def is?(test_token, test_type = T.unsafe(nil)); end + # not an alias so as to respect overrides of #negative? + # + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#8 + def negated?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#3 + def negative?; end + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#100 def nesting_level=(lvl); end @@ -1794,22 +1809,22 @@ end # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#2 module Regexp::Expression::UnicodeProperty; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#112 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#108 class Regexp::Expression::UnicodeProperty::Age < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#17 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#13 class Regexp::Expression::UnicodeProperty::Alnum < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#18 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#14 class Regexp::Expression::UnicodeProperty::Alpha < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#35 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#31 class Regexp::Expression::UnicodeProperty::Any < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#19 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#15 class Regexp::Expression::UnicodeProperty::Ascii < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#36 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#32 class Regexp::Expression::UnicodeProperty::Assigned < ::Regexp::Expression::UnicodeProperty::Base; end # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#3 @@ -1817,226 +1832,227 @@ class Regexp::Expression::UnicodeProperty::Base < ::Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 def match_length; end - # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#8 + # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#4 def name; end - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#4 + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#19 def negative?; end - # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#12 + # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#8 def shortcut; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#20 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#16 class Regexp::Expression::UnicodeProperty::Blank < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#116 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#109 class Regexp::Expression::UnicodeProperty::Block < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#21 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#17 class Regexp::Expression::UnicodeProperty::Cntrl < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#101 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#97 module Regexp::Expression::UnicodeProperty::Codepoint; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#104 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#100 class Regexp::Expression::UnicodeProperty::Codepoint::Any < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#102 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#98 class Regexp::Expression::UnicodeProperty::Codepoint::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#105 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#101 class Regexp::Expression::UnicodeProperty::Codepoint::Control < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#106 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#102 class Regexp::Expression::UnicodeProperty::Codepoint::Format < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#108 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#104 class Regexp::Expression::UnicodeProperty::Codepoint::PrivateUse < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#107 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#103 class Regexp::Expression::UnicodeProperty::Codepoint::Surrogate < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#109 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#105 class Regexp::Expression::UnicodeProperty::Codepoint::Unassigned < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#113 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#110 class Regexp::Expression::UnicodeProperty::Derived < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#22 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#18 class Regexp::Expression::UnicodeProperty::Digit < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#114 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#111 class Regexp::Expression::UnicodeProperty::Emoji < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#23 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#112 +class Regexp::Expression::UnicodeProperty::Enumerated < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#19 class Regexp::Expression::UnicodeProperty::Graph < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#38 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#34 module Regexp::Expression::UnicodeProperty::Letter; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#41 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#37 class Regexp::Expression::UnicodeProperty::Letter::Any < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#39 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#35 class Regexp::Expression::UnicodeProperty::Letter::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#42 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#38 class Regexp::Expression::UnicodeProperty::Letter::Cased < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#44 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#40 class Regexp::Expression::UnicodeProperty::Letter::Lowercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#46 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#42 class Regexp::Expression::UnicodeProperty::Letter::Modifier < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#47 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#43 class Regexp::Expression::UnicodeProperty::Letter::Other < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#45 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#41 class Regexp::Expression::UnicodeProperty::Letter::Titlecase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#43 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#39 class Regexp::Expression::UnicodeProperty::Letter::Uppercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#24 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#20 class Regexp::Expression::UnicodeProperty::Lower < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#50 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#46 module Regexp::Expression::UnicodeProperty::Mark; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#53 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#49 class Regexp::Expression::UnicodeProperty::Mark::Any < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#51 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#47 class Regexp::Expression::UnicodeProperty::Mark::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#54 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#50 class Regexp::Expression::UnicodeProperty::Mark::Combining < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#57 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#53 class Regexp::Expression::UnicodeProperty::Mark::Enclosing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#55 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#51 class Regexp::Expression::UnicodeProperty::Mark::Nonspacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#56 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#52 class Regexp::Expression::UnicodeProperty::Mark::Spacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#33 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#29 class Regexp::Expression::UnicodeProperty::Newline < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#60 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#56 module Regexp::Expression::UnicodeProperty::Number; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#63 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#59 class Regexp::Expression::UnicodeProperty::Number::Any < ::Regexp::Expression::UnicodeProperty::Number::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#61 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#57 class Regexp::Expression::UnicodeProperty::Number::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#64 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#60 class Regexp::Expression::UnicodeProperty::Number::Decimal < ::Regexp::Expression::UnicodeProperty::Number::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#65 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#61 class Regexp::Expression::UnicodeProperty::Number::Letter < ::Regexp::Expression::UnicodeProperty::Number::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#66 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#62 class Regexp::Expression::UnicodeProperty::Number::Other < ::Regexp::Expression::UnicodeProperty::Number::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#25 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#21 class Regexp::Expression::UnicodeProperty::Print < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#26 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#22 class Regexp::Expression::UnicodeProperty::Punct < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#69 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#65 module Regexp::Expression::UnicodeProperty::Punctuation; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#72 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#68 class Regexp::Expression::UnicodeProperty::Punctuation::Any < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#70 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#66 class Regexp::Expression::UnicodeProperty::Punctuation::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#76 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#72 class Regexp::Expression::UnicodeProperty::Punctuation::Close < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#73 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#69 class Regexp::Expression::UnicodeProperty::Punctuation::Connector < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#74 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#70 class Regexp::Expression::UnicodeProperty::Punctuation::Dash < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#78 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#74 class Regexp::Expression::UnicodeProperty::Punctuation::Final < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#77 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#73 class Regexp::Expression::UnicodeProperty::Punctuation::Initial < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#75 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#71 class Regexp::Expression::UnicodeProperty::Punctuation::Open < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#79 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#75 class Regexp::Expression::UnicodeProperty::Punctuation::Other < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#115 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#113 class Regexp::Expression::UnicodeProperty::Script < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#82 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#78 module Regexp::Expression::UnicodeProperty::Separator; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#85 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#81 class Regexp::Expression::UnicodeProperty::Separator::Any < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#83 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#79 class Regexp::Expression::UnicodeProperty::Separator::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#87 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#83 class Regexp::Expression::UnicodeProperty::Separator::Line < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#88 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#84 class Regexp::Expression::UnicodeProperty::Separator::Paragraph < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#86 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#82 class Regexp::Expression::UnicodeProperty::Separator::Space < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#27 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#23 class Regexp::Expression::UnicodeProperty::Space < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#91 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#87 module Regexp::Expression::UnicodeProperty::Symbol; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#94 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#90 class Regexp::Expression::UnicodeProperty::Symbol::Any < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#92 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#88 class Regexp::Expression::UnicodeProperty::Symbol::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#96 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#92 class Regexp::Expression::UnicodeProperty::Symbol::Currency < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#95 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#91 class Regexp::Expression::UnicodeProperty::Symbol::Math < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#97 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#93 class Regexp::Expression::UnicodeProperty::Symbol::Modifier < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#98 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#94 class Regexp::Expression::UnicodeProperty::Symbol::Other < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#28 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#24 class Regexp::Expression::UnicodeProperty::Upper < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#29 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#25 class Regexp::Expression::UnicodeProperty::Word < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#31 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#27 class Regexp::Expression::UnicodeProperty::XPosixPunct < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#30 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#26 class Regexp::Expression::UnicodeProperty::Xdigit < ::Regexp::Expression::UnicodeProperty::Base; end # source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#11 @@ -2343,7 +2359,7 @@ class Regexp::Parser private - # source://regexp_parser//lib/regexp_parser/parser.rb#573 + # source://regexp_parser//lib/regexp_parser/parser.rb#574 def active_opts; end # source://regexp_parser//lib/regexp_parser/parser.rb#99 @@ -2356,7 +2372,7 @@ class Regexp::Parser # an instance of Backreference::Number, its #referenced_expression is set to # the instance of Group::Capture that it refers to via its number. # - # source://regexp_parser//lib/regexp_parser/parser.rb#580 + # source://regexp_parser//lib/regexp_parser/parser.rb#581 def assign_referenced_expressions; end # source://regexp_parser//lib/regexp_parser/parser.rb#227 @@ -2377,13 +2393,13 @@ class Regexp::Parser # source://regexp_parser//lib/regexp_parser/parser.rb#56 def captured_group_counts=(_arg0); end - # source://regexp_parser//lib/regexp_parser/parser.rb#569 + # source://regexp_parser//lib/regexp_parser/parser.rb#570 def close_completed_character_set_range; end # source://regexp_parser//lib/regexp_parser/parser.rb#210 def close_group; end - # source://regexp_parser//lib/regexp_parser/parser.rb#537 + # source://regexp_parser//lib/regexp_parser/parser.rb#538 def close_set; end # source://regexp_parser//lib/regexp_parser/parser.rb#269 @@ -2421,10 +2437,10 @@ class Regexp::Parser # source://regexp_parser//lib/regexp_parser/parser.rb#114 def group(token); end - # source://regexp_parser//lib/regexp_parser/parser.rb#508 + # source://regexp_parser//lib/regexp_parser/parser.rb#509 def increase_group_level(exp); end - # source://regexp_parser//lib/regexp_parser/parser.rb#548 + # source://regexp_parser//lib/regexp_parser/parser.rb#549 def intersection(token); end # source://regexp_parser//lib/regexp_parser/parser.rb#360 @@ -2436,7 +2452,7 @@ class Regexp::Parser # source://regexp_parser//lib/regexp_parser/parser.rb#368 def meta(token); end - # source://regexp_parser//lib/regexp_parser/parser.rb#533 + # source://regexp_parser//lib/regexp_parser/parser.rb#534 def negate_set; end # source://regexp_parser//lib/regexp_parser/parser.rb#299 @@ -2472,7 +2488,7 @@ class Regexp::Parser # source://regexp_parser//lib/regexp_parser/parser.rb#165 def open_group(token); end - # source://regexp_parser//lib/regexp_parser/parser.rb#526 + # source://regexp_parser//lib/regexp_parser/parser.rb#527 def open_set(token); end # source://regexp_parser//lib/regexp_parser/parser.rb#130 @@ -2499,10 +2515,10 @@ class Regexp::Parser # source://regexp_parser//lib/regexp_parser/parser.rb#397 def property(token); end - # source://regexp_parser//lib/regexp_parser/parser.rb#478 + # source://regexp_parser//lib/regexp_parser/parser.rb#479 def quantifier(token); end - # source://regexp_parser//lib/regexp_parser/parser.rb#541 + # source://regexp_parser//lib/regexp_parser/parser.rb#542 def range(token); end # Returns the value of attribute root. @@ -2520,7 +2536,7 @@ class Regexp::Parser # source://regexp_parser//lib/regexp_parser/parser.rb#379 def sequence_operation(klass, token); end - # source://regexp_parser//lib/regexp_parser/parser.rb#514 + # source://regexp_parser//lib/regexp_parser/parser.rb#515 def set(token); end # Returns the value of attribute switching_options. @@ -2538,7 +2554,7 @@ class Regexp::Parser # source://regexp_parser//lib/regexp_parser/parser.rb#198 def total_captured_group_count; end - # source://regexp_parser//lib/regexp_parser/parser.rb#552 + # source://regexp_parser//lib/regexp_parser/parser.rb#553 def type(token); end class << self @@ -2590,17 +2606,17 @@ Regexp::Parser::VERSION = T.let(T.unsafe(nil), String) class Regexp::Scanner # Emits an array with the details of the scanned pattern # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2388 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2406 def emit(type, token, text); end # only public for #||= to work on ruby <= 2.5 # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2413 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2431 def literal_run; end # only public for #||= to work on ruby <= 2.5 # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2413 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2431 def literal_run=(_arg0); end # @raise [PrematureEndError] @@ -2613,168 +2629,168 @@ class Regexp::Scanner # Appends one or more characters to the literal buffer, to be emitted later # by a call to emit_literal. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2450 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2468 def append_literal(data, ts, te); end # Returns the value of attribute block. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def block; end # Sets the attribute block # # @param value the value to set the attribute block to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def block=(_arg0); end # Returns the value of attribute char_pos. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def char_pos; end # Sets the attribute char_pos # # @param value the value to set the attribute char_pos to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def char_pos=(_arg0); end # Returns the value of attribute collect_tokens. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def collect_tokens; end # Sets the attribute collect_tokens # # @param value the value to set the attribute collect_tokens to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def collect_tokens=(_arg0); end # Returns the value of attribute conditional_stack. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def conditional_stack; end # Sets the attribute conditional_stack # # @param value the value to set the attribute conditional_stack to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def conditional_stack=(_arg0); end # Copy from ts to te from data as text # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2444 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2462 def copy(data, ts, te); end # Emits the literal run collected by calls to the append_literal method. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2455 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2473 def emit_literal; end - # source://regexp_parser//lib/regexp_parser/scanner.rb#2490 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2508 def emit_meta_control_sequence(data, ts, te, token); end - # source://regexp_parser//lib/regexp_parser/scanner.rb#2461 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2479 def emit_options(text); end # Returns the value of attribute free_spacing. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def free_spacing; end # Sets the attribute free_spacing # # @param value the value to set the attribute free_spacing to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def free_spacing=(_arg0); end # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2423 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2441 def free_spacing?(input_object, options); end # Returns the value of attribute group_depth. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def group_depth; end # Sets the attribute group_depth # # @param value the value to set the attribute group_depth to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def group_depth=(_arg0); end # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2453 def in_group?; end # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2439 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2457 def in_set?; end # Returns the value of attribute prev_token. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def prev_token; end # Sets the attribute prev_token # # @param value the value to set the attribute prev_token to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def prev_token=(_arg0); end # Returns the value of attribute set_depth. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def set_depth; end # Sets the attribute set_depth # # @param value the value to set the attribute set_depth to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def set_depth=(_arg0); end # Returns the value of attribute spacing_stack. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def spacing_stack; end # Sets the attribute spacing_stack # # @param value the value to set the attribute spacing_stack to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def spacing_stack=(_arg0); end # Returns the value of attribute tokens. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def tokens; end # Sets the attribute tokens # # @param value the value to set the attribute tokens to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def tokens=(_arg0); end class << self - # source://regexp_parser//lib/regexp_parser/scanner.rb#2374 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def long_prop_map; end - # source://regexp_parser//lib/regexp_parser/scanner.rb#2378 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2396 def parse_prop_map(name); end - # source://regexp_parser//lib/regexp_parser/scanner.rb#2382 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2400 def posix_classes; end # Scans the given regular expression text, or Regexp object and collects the @@ -2789,7 +2805,7 @@ class Regexp::Scanner # lazy-load property maps when first needed # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2370 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2388 def short_prop_map; end end end @@ -3355,7 +3371,7 @@ Regexp::Syntax::Token::PosixClass::Type = T.let(T.unsafe(nil), Symbol) # alias for symmetry between token symbol and Token module name # -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#731 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#749 Regexp::Syntax::Token::Property = Regexp::Syntax::Token::UnicodeProperty # source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#3 @@ -3452,7 +3468,7 @@ Regexp::Syntax::Token::UnicodeProperty::Age_V3_1_0 = T.let(T.unsafe(nil), Array) # source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#62 Regexp::Syntax::Token::UnicodeProperty::Age_V3_2_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#721 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#739 Regexp::Syntax::Token::UnicodeProperty::All = T.let(T.unsafe(nil), Array) # source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#13 @@ -3503,7 +3519,7 @@ Regexp::Syntax::Token::UnicodeProperty::Derived_V2_4_0 = T.let(T.unsafe(nil), Ar # source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#129 Regexp::Syntax::Token::UnicodeProperty::Derived_V2_5_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#706 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#724 Regexp::Syntax::Token::UnicodeProperty::Emoji = T.let(T.unsafe(nil), Array) # source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#694 @@ -3512,7 +3528,13 @@ Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_5_0 = T.let(T.unsafe(nil), Arra # source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#702 Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_6_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#724 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#722 +Regexp::Syntax::Token::UnicodeProperty::Enumerated = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#706 +Regexp::Syntax::Token::UnicodeProperty::Enumerated_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#742 Regexp::Syntax::Token::UnicodeProperty::NonType = T.let(T.unsafe(nil), Symbol) # source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#11 @@ -3554,7 +3576,7 @@ Regexp::Syntax::Token::UnicodeProperty::Script_V3_1_0 = T.let(T.unsafe(nil), Arr # source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#322 Regexp::Syntax::Token::UnicodeProperty::Script_V3_2_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#723 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#741 Regexp::Syntax::Token::UnicodeProperty::Type = T.let(T.unsafe(nil), Symbol) # source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#692 @@ -3590,40 +3612,40 @@ Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_1_0 = T.let(T.unsafe(nil # source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#670 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_2_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#708 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#726 Regexp::Syntax::Token::UnicodeProperty::V1_9_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#709 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#727 Regexp::Syntax::Token::UnicodeProperty::V1_9_3 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#710 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#728 Regexp::Syntax::Token::UnicodeProperty::V2_0_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#711 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#729 Regexp::Syntax::Token::UnicodeProperty::V2_2_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#712 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#730 Regexp::Syntax::Token::UnicodeProperty::V2_3_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#713 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#731 Regexp::Syntax::Token::UnicodeProperty::V2_4_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#714 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#732 Regexp::Syntax::Token::UnicodeProperty::V2_5_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#715 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#733 Regexp::Syntax::Token::UnicodeProperty::V2_6_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#716 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#734 Regexp::Syntax::Token::UnicodeProperty::V2_6_2 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#717 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#735 Regexp::Syntax::Token::UnicodeProperty::V2_6_3 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#718 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#736 Regexp::Syntax::Token::UnicodeProperty::V3_1_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#719 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#737 Regexp::Syntax::Token::UnicodeProperty::V3_2_0 = T.let(T.unsafe(nil), Array) # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#12 diff --git a/sorbet/rbi/gems/reline@0.3.3.rbi b/sorbet/rbi/gems/reline@0.4.3.rbi similarity index 64% rename from sorbet/rbi/gems/reline@0.3.3.rbi rename to sorbet/rbi/gems/reline@0.4.3.rbi index d10185fb8..e14dea346 100644 --- a/sorbet/rbi/gems/reline@0.3.3.rbi +++ b/sorbet/rbi/gems/reline@0.4.3.rbi @@ -10,128 +10,142 @@ module Reline extend ::SingleForwardable class << self - # source://reline//lib/reline.rb#560 + # source://reline//lib/reline.rb#550 def core; end - # source://reline//lib/reline.rb#556 + # source://reline//lib/reline.rb#546 def encoding_system_needs; end - # source://reline//lib/reline.rb#537 + # source://reline//lib/reline.rb#527 def insert_text(*args, &block); end - # source://reline//lib/reline.rb#580 + # source://reline//lib/reline.rb#570 def line_editor; end - # source://reline//lib/reline.rb#576 + # 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#6 +# source://reline//lib/reline/ansi.rb#5 class Reline::ANSI class << self - # source://reline//lib/reline/ansi.rb#339 + # source://reline//lib/reline/ansi.rb#345 def clear_screen; end - # source://reline//lib/reline/ansi.rb#251 + # source://reline//lib/reline/ansi.rb#254 def cursor_pos; end - # source://reline//lib/reline/ansi.rb#354 + # source://reline//lib/reline/ansi.rb#360 def deprep(otio); end # @return [Boolean] # - # source://reline//lib/reline/ansi.rb#212 + # source://reline//lib/reline/ansi.rb#215 def empty_buffer?; end - # source://reline//lib/reline/ansi.rb#27 + # source://reline//lib/reline/ansi.rb#37 def encoding; end - # source://reline//lib/reline/ansi.rb#330 + # source://reline//lib/reline/ansi.rb#333 def erase_after_cursor; end - # source://reline//lib/reline/ansi.rb#234 + # source://reline//lib/reline/ansi.rb#237 def get_screen_size; end - # source://reline//lib/reline/ansi.rb#200 - def getc; 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#171 - def getc_with_bracketed_paste; end + # source://reline//lib/reline/ansi.rb#176 + def getc_with_bracketed_paste(timeout_second); end - # source://reline//lib/reline/ansi.rb#306 + # source://reline//lib/reline/ansi.rb#309 def hide_cursor; end # @return [Boolean] # - # source://reline//lib/reline/ansi.rb#208 + # source://reline//lib/reline/ansi.rb#211 def in_pasting?; end - # source://reline//lib/reline/ansi.rb#153 - def inner_getc; end + # source://reline//lib/reline/ansi.rb#156 + def inner_getc(timeout_second); end - # source://reline//lib/reline/ansi.rb#139 + # source://reline//lib/reline/ansi.rb#142 def input=(val); end - # source://reline//lib/reline/ansi.rb#286 + # source://reline//lib/reline/ansi.rb#289 def move_cursor_column(x); end - # source://reline//lib/reline/ansi.rb#298 + # source://reline//lib/reline/ansi.rb#301 def move_cursor_down(x); end - # source://reline//lib/reline/ansi.rb#290 + # source://reline//lib/reline/ansi.rb#293 def move_cursor_up(x); end - # source://reline//lib/reline/ansi.rb#144 + # source://reline//lib/reline/ansi.rb#147 def output=(val); end - # source://reline//lib/reline/ansi.rb#349 + # source://reline//lib/reline/ansi.rb#355 def prep; end - # source://reline//lib/reline/ansi.rb#223 + # source://reline//lib/reline/ansi.rb#226 def retrieve_keybuffer; end - # source://reline//lib/reline/ansi.rb#334 + # 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#35 + # 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#91 + # 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#67 + # source://reline//lib/reline/ansi.rb#89 def set_default_key_bindings_terminfo(config); end - # source://reline//lib/reline/ansi.rb#244 + # source://reline//lib/reline/ansi.rb#247 def set_screen_size(rows, columns); end - # source://reline//lib/reline/ansi.rb#345 + # source://reline//lib/reline/ansi.rb#351 def set_winch_handler(&handler); end - # source://reline//lib/reline/ansi.rb#318 + # source://reline//lib/reline/ansi.rb#321 def show_cursor; end - # source://reline//lib/reline/ansi.rb#219 + # source://reline//lib/reline/ansi.rb#222 def ungetc(c); end # @return [Boolean] # - # source://reline//lib/reline/ansi.rb#31 + # source://reline//lib/reline/ansi.rb#41 def win?; end - # source://reline//lib/reline/ansi.rb#148 + # source://reline//lib/reline/ansi.rb#151 def with_raw_input; end end end -# source://reline//lib/reline/ansi.rb#7 +# 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#170 +# source://reline//lib/reline/ansi.rb#175 Reline::ANSI::END_BRACKETED_PASTE = T.let(T.unsafe(nil), String) -# source://reline//lib/reline/ansi.rb#169 +# 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 @@ -453,7 +467,7 @@ 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#50 +# source://reline//lib/reline.rb#48 class Reline::Core extend ::Forwardable @@ -461,220 +475,223 @@ class Reline::Core # @yield [_self] # @yieldparam _self [Reline::Core] the object that the method was called on # - # source://reline//lib/reline.rb#78 + # source://reline//lib/reline.rb#76 def initialize; end # @raise [ArgumentError] # - # source://reline//lib/reline.rb#168 + # source://reline//lib/reline.rb#170 def add_dialog_proc(name_sym, p, context = T.unsafe(nil)); end - # source://reline//lib/reline.rb#483 + # source://reline//lib/reline.rb#473 def ambiguous_width; end - # source://reline//lib/reline.rb#65 + # source://reline//lib/reline.rb#63 def auto_indent_proc; end # @raise [ArgumentError] # - # source://reline//lib/reline.rb#153 + # source://reline//lib/reline.rb#155 def auto_indent_proc=(p); end - # source://reline//lib/reline.rb#65 + # source://reline//lib/reline.rb#63 def basic_quote_characters; end - # source://reline//lib/reline.rb#110 + # source://reline//lib/reline.rb#112 def basic_quote_characters=(v); end - # source://reline//lib/reline.rb#65 + # source://reline//lib/reline.rb#63 def basic_word_break_characters; end - # source://reline//lib/reline.rb#102 + # source://reline//lib/reline.rb#104 def basic_word_break_characters=(v); end - # source://reline//lib/reline.rb#65 + # source://reline//lib/reline.rb#63 def completer_quote_characters; end - # source://reline//lib/reline.rb#114 + # source://reline//lib/reline.rb#116 def completer_quote_characters=(v); end - # source://reline//lib/reline.rb#65 + # source://reline//lib/reline.rb#63 def completer_word_break_characters; end - # source://reline//lib/reline.rb#106 + # source://reline//lib/reline.rb#108 def completer_word_break_characters=(v); end - # source://reline//lib/reline.rb#65 + # source://reline//lib/reline.rb#63 def completion_append_character; end - # source://reline//lib/reline.rb#90 + # source://reline//lib/reline.rb#92 def completion_append_character=(val); end - # source://reline//lib/reline.rb#130 + # source://reline//lib/reline.rb#132 def completion_case_fold; end - # source://reline//lib/reline.rb#126 + # source://reline//lib/reline.rb#128 def completion_case_fold=(v); end - # source://reline//lib/reline.rb#65 + # source://reline//lib/reline.rb#63 def completion_proc; end # @raise [ArgumentError] # - # source://reline//lib/reline.rb#138 + # source://reline//lib/reline.rb#140 def completion_proc=(p); end - # source://reline//lib/reline.rb#134 + # source://reline//lib/reline.rb#136 def completion_quote_character; end # Returns the value of attribute config. # - # source://reline//lib/reline.rb#67 + # 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#67 + # source://reline//lib/reline.rb#65 def config=(_arg0); end - # source://reline//lib/reline.rb#174 + # source://reline//lib/reline.rb#180 def dialog_proc(name_sym); end - # source://reline//lib/reline.rb#65 + # source://reline//lib/reline.rb#63 def dig_perfect_match_proc; end # @raise [ArgumentError] # - # source://reline//lib/reline.rb#162 + # source://reline//lib/reline.rb#164 def dig_perfect_match_proc=(p); end - # source://reline//lib/reline.rb#202 + # source://reline//lib/reline.rb#204 def emacs_editing_mode; end # @return [Boolean] # - # source://reline//lib/reline.rb#211 + # source://reline//lib/reline.rb#213 def emacs_editing_mode?; end - # source://reline//lib/reline.rb#86 + # source://reline//lib/reline.rb#88 def encoding; end - # source://reline//lib/reline.rb#65 + # source://reline//lib/reline.rb#63 def filename_quote_characters; end - # source://reline//lib/reline.rb#118 + # source://reline//lib/reline.rb#120 def filename_quote_characters=(v); end - # source://reline//lib/reline.rb#215 + # source://reline//lib/reline.rb#217 def get_screen_size; end # @raise [TypeError] # - # source://reline//lib/reline.rb#178 + # 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#68 + # 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#68 + # source://reline//lib/reline.rb#66 def key_stroke=(_arg0); end # Returns the value of attribute last_incremental_search. # - # source://reline//lib/reline.rb#70 + # 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#70 + # source://reline//lib/reline.rb#68 def last_incremental_search=(_arg0); end # Returns the value of attribute line_editor. # - # source://reline//lib/reline.rb#69 + # 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#69 + # source://reline//lib/reline.rb#67 def line_editor=(_arg0); end # Returns the value of attribute output. # - # source://reline//lib/reline.rb#71 + # source://reline//lib/reline.rb#69 def output; end # @raise [TypeError] # - # source://reline//lib/reline.rb#189 + # source://reline//lib/reline.rb#191 def output=(val); end - # source://reline//lib/reline.rb#65 + # source://reline//lib/reline.rb#63 def output_modifier_proc; end # @raise [ArgumentError] # - # source://reline//lib/reline.rb#143 + # source://reline//lib/reline.rb#145 def output_modifier_proc=(p); end - # source://reline//lib/reline.rb#65 + # source://reline//lib/reline.rb#63 def pre_input_hook; end - # source://reline//lib/reline.rb#158 + # source://reline//lib/reline.rb#160 def pre_input_hook=(p); end - # source://reline//lib/reline.rb#65 + # source://reline//lib/reline.rb#63 def prompt_proc; end # @raise [ArgumentError] # - # source://reline//lib/reline.rb#148 + # 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#268 + # 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#65 + # source://reline//lib/reline.rb#63 def special_prefixes; end - # source://reline//lib/reline.rb#122 + # source://reline//lib/reline.rb#124 def special_prefixes=(v); end - # source://reline//lib/reline.rb#197 + # source://reline//lib/reline.rb#199 def vi_editing_mode; end # @return [Boolean] # - # source://reline//lib/reline.rb#207 + # source://reline//lib/reline.rb#209 def vi_editing_mode?; end private - # source://reline//lib/reline.rb#299 + # source://reline//lib/reline.rb#300 def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination); end - # source://reline//lib/reline.rb#488 + # source://reline//lib/reline.rb#478 def may_req_ambiguous_char_width; end - # source://reline//lib/reline.rb#430 + # source://reline//lib/reline.rb#431 def read_2nd_character_of_key_sequence(keyseq_timeout, buffer, c, block); end - # source://reline//lib/reline.rb#462 + # 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 @@ -687,17 +704,17 @@ class Reline::Core # GNU Readline will wait for the 2nd character with "keyseq-timeout" # milli-seconds but wait forever after 3rd characters. # - # source://reline//lib/reline.rb#391 + # source://reline//lib/reline.rb#392 def read_io(keyseq_timeout, &block); end end -# source://reline//lib/reline.rb#51 +# source://reline//lib/reline.rb#49 Reline::Core::ATTR_READER_NAMES = T.let(T.unsafe(nil), Array) -# source://reline//lib/reline.rb#266 +# source://reline//lib/reline.rb#265 Reline::DEFAULT_DIALOG_CONTEXT = T.let(T.unsafe(nil), Array) -# source://reline//lib/reline.rb#219 +# 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 @@ -705,91 +722,169 @@ Reline::DEFAULT_DIALOG_PROC_AUTOCOMPLETE = T.let(T.unsafe(nil), Proc) # source://reline//lib/reline.rb#15 Reline::FILENAME_COMPLETION_PROC = T.let(T.unsafe(nil), T.untyped) -# source://reline//lib/reline/general_io.rb#4 +# 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#85 + # source://reline//lib/reline/general_io.rb#88 def clear_screen; end - # source://reline//lib/reline/general_io.rb#60 + # source://reline//lib/reline/general_io.rb#63 def cursor_pos; end - # source://reline//lib/reline/general_io.rb#111 + # source://reline//lib/reline/general_io.rb#114 def deprep(otio); end - # source://reline//lib/reline/general_io.rb#10 + # source://reline//lib/reline/general_io.rb#13 def encoding; end - # source://reline//lib/reline/general_io.rb#79 + # source://reline//lib/reline/general_io.rb#82 def erase_after_cursor; end - # source://reline//lib/reline/general_io.rb#104 + # source://reline//lib/reline/general_io.rb#107 def finish_pasting; end - # source://reline//lib/reline/general_io.rb#56 + # source://reline//lib/reline/general_io.rb#59 def get_screen_size; end - # source://reline//lib/reline/general_io.rb#38 - def getc; end + # source://reline//lib/reline/general_io.rb#41 + def getc(_timeout_second); end - # source://reline//lib/reline/general_io.rb#64 + # source://reline//lib/reline/general_io.rb#67 def hide_cursor; end # @return [Boolean] # - # source://reline//lib/reline/general_io.rb#96 + # source://reline//lib/reline/general_io.rb#99 def in_pasting?; end - # source://reline//lib/reline/general_io.rb#30 + # source://reline//lib/reline/general_io.rb#33 def input=(val); end - # source://reline//lib/reline/general_io.rb#70 + # source://reline//lib/reline/general_io.rb#73 def move_cursor_column(val); end - # source://reline//lib/reline/general_io.rb#76 + # source://reline//lib/reline/general_io.rb#79 def move_cursor_down(val); end - # source://reline//lib/reline/general_io.rb#73 + # source://reline//lib/reline/general_io.rb#76 def move_cursor_up(val); end - # source://reline//lib/reline/general_io.rb#108 + # source://reline//lib/reline/general_io.rb#111 def prep; end - # source://reline//lib/reline/general_io.rb#5 + # source://reline//lib/reline/general_io.rb#4 def reset(encoding: T.unsafe(nil)); end - # source://reline//lib/reline/general_io.rb#82 + # source://reline//lib/reline/general_io.rb#85 def scroll_down(val); end - # source://reline//lib/reline/general_io.rb#24 + # source://reline//lib/reline/general_io.rb#27 def set_default_key_bindings(_); end - # source://reline//lib/reline/general_io.rb#88 + # source://reline//lib/reline/general_io.rb#91 def set_screen_size(rows, columns); end - # source://reline//lib/reline/general_io.rb#91 + # source://reline//lib/reline/general_io.rb#94 def set_winch_handler(&handler); end - # source://reline//lib/reline/general_io.rb#67 + # source://reline//lib/reline/general_io.rb#70 def show_cursor; end - # source://reline//lib/reline/general_io.rb#100 + # source://reline//lib/reline/general_io.rb#103 def start_pasting; end - # source://reline//lib/reline/general_io.rb#52 + # source://reline//lib/reline/general_io.rb#55 def ungetc(c); end # @return [Boolean] # - # source://reline//lib/reline/general_io.rb#20 + # source://reline//lib/reline/general_io.rb#23 def win?; end - # source://reline//lib/reline/general_io.rb#34 + # source://reline//lib/reline/general_io.rb#37 def with_raw_input; end end end -# source://reline//lib/reline.rb#603 +# source://reline//lib/reline.rb#607 Reline::HISTORY = T.let(T.unsafe(nil), Reline::History) # source://reline//lib/reline/history.rb#1 @@ -828,11 +923,62 @@ class Reline::History < ::Array def check_index(index); end end -# source://reline//lib/reline.rb#596 +# source://reline//lib/reline.rb#598 Reline::IOGate = Reline::ANSI # source://reline//lib/reline.rb#20 -Reline::Key = Struct +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 @@ -867,34 +1013,48 @@ Reline::KeyActor::ViInsert::MAPPING = T.let(T.unsafe(nil), Array) class Reline::KeyStroke # @return [KeyStroke] a new instance of KeyStroke # - # source://reline//lib/reline/key_stroke.rb#2 + # source://reline//lib/reline/key_stroke.rb#6 def initialize(config); end - # source://reline//lib/reline/key_stroke.rb#6 + # source://reline//lib/reline/key_stroke.rb#10 def compress_meta_key(ary); end # @return [Boolean] # - # source://reline//lib/reline/key_stroke.rb#42 + # source://reline//lib/reline/key_stroke.rb#46 def equal?(me, other); end - # source://reline//lib/reline/key_stroke.rb#83 + # source://reline//lib/reline/key_stroke.rb#87 def expand(input); end - # source://reline//lib/reline/key_stroke.rb#67 + # source://reline//lib/reline/key_stroke.rb#71 def match_status(input); end # @return [Boolean] # - # source://reline//lib/reline/key_stroke.rb#18 + # source://reline//lib/reline/key_stroke.rb#22 def start_with?(me, other); end private - # source://reline//lib/reline/key_stroke.rb#102 + # 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 @@ -976,7 +1136,7 @@ class Reline::LineEditor # source://reline//lib/reline/line_editor.rb#57 def initialize(config, encoding); end - # source://reline//lib/reline/line_editor.rb#634 + # 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. @@ -996,13 +1156,13 @@ class Reline::LineEditor # source://reline//lib/reline/line_editor.rb#10 def byte_pointer; end - # source://reline//lib/reline/line_editor.rb#1893 + # source://reline//lib/reline/line_editor.rb#1839 def byte_pointer=(val); end - # source://reline//lib/reline/line_editor.rb#1664 + # source://reline//lib/reline/line_editor.rb#1610 def call_completion_proc; end - # source://reline//lib/reline/line_editor.rb#1672 + # 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. @@ -1029,7 +1189,7 @@ class Reline::LineEditor # source://reline//lib/reline/line_editor.rb#12 def completion_proc=(_arg0); end - # source://reline//lib/reline/line_editor.rb#1811 + # source://reline//lib/reline/line_editor.rb#1757 def confirm_multiline_termination; end # Returns the value of attribute confirm_multiline_termination_proc. @@ -1044,7 +1204,7 @@ class Reline::LineEditor # source://reline//lib/reline/line_editor.rb#11 def confirm_multiline_termination_proc=(_arg0); end - # source://reline//lib/reline/line_editor.rb#1833 + # 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. @@ -1059,32 +1219,35 @@ class Reline::LineEditor # source://reline//lib/reline/line_editor.rb#18 def dig_perfect_match_proc=(_arg0); end - # source://reline//lib/reline/line_editor.rb#1282 + # source://reline//lib/reline/line_editor.rb#1226 def editing_mode; end # @return [Boolean] # - # source://reline//lib/reline/line_editor.rb#259 + # source://reline//lib/reline/line_editor.rb#252 def eof?; end - # source://reline//lib/reline/line_editor.rb#251 + # source://reline//lib/reline/line_editor.rb#248 def finalize; end - # source://reline//lib/reline/line_editor.rb#1919 + # source://reline//lib/reline/line_editor.rb#1865 def finish; end # @return [Boolean] # - # source://reline//lib/reline/line_editor.rb#1915 + # source://reline//lib/reline/line_editor.rb#1861 def finished?; end - # source://reline//lib/reline/line_editor.rb#1589 + # source://reline//lib/reline/line_editor.rb#1535 def input_key(key); end - # source://reline//lib/reline/line_editor.rb#1821 + # source://reline//lib/reline/line_editor.rb#1767 def insert_text(text); end - # source://reline//lib/reline/line_editor.rb#988 + # 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 @@ -1093,10 +1256,10 @@ class Reline::LineEditor # source://reline//lib/reline/line_editor.rb#9 def line; end - # source://reline//lib/reline/line_editor.rb#324 + # source://reline//lib/reline/line_editor.rb#318 def multiline_off; end - # source://reline//lib/reline/line_editor.rb#320 + # source://reline//lib/reline/line_editor.rb#314 def multiline_on; end # Sets the attribute output @@ -1142,142 +1305,145 @@ class Reline::LineEditor # source://reline//lib/reline/line_editor.rb#15 def prompt_proc=(_arg0); end - # source://reline//lib/reline/line_editor.rb#432 + # source://reline//lib/reline/line_editor.rb#426 def rerender; end - # source://reline//lib/reline/line_editor.rb#426 + # source://reline//lib/reline/line_editor.rb#420 def rerender_all; end - # source://reline//lib/reline/line_editor.rb#150 + # source://reline//lib/reline/line_editor.rb#154 def reset(prompt = T.unsafe(nil), encoding:); end - # source://reline//lib/reline/line_editor.rb#302 + # source://reline//lib/reline/line_editor.rb#296 def reset_line; end - # source://reline//lib/reline/line_editor.rb#263 + # source://reline//lib/reline/line_editor.rb#256 def reset_variables(prompt = T.unsafe(nil), encoding:); end - # source://reline//lib/reline/line_editor.rb#181 + # source://reline//lib/reline/line_editor.rb#185 def resize; end - # source://reline//lib/reline/line_editor.rb#1733 + # 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#63 + # source://reline//lib/reline/line_editor.rb#67 def set_pasting_state(in_pasting); end - # source://reline//lib/reline/line_editor.rb#221 + # source://reline//lib/reline/line_editor.rb#225 def set_signal_handlers; end # @return [Boolean] # - # source://reline//lib/reline/line_editor.rb#67 + # source://reline//lib/reline/line_editor.rb#71 def simplified_rendering?; end - # source://reline//lib/reline/line_editor.rb#1907 + # source://reline//lib/reline/line_editor.rb#1853 def whole_buffer; end - # source://reline//lib/reline/line_editor.rb#1900 + # source://reline//lib/reline/line_editor.rb#1846 def whole_lines; end - # source://reline//lib/reline/line_editor.rb#1474 + # 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#1464 + # source://reline//lib/reline/line_editor.rb#1408 def argumentable?(method_obj); end - # source://reline//lib/reline/line_editor.rb#2084 + # source://reline//lib/reline/line_editor.rb#2030 def backward_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2574 + # 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#2733 + # source://reline//lib/reline/line_editor.rb#2705 + def backward_kill_word(key); end + + # source://reline//lib/reline/line_editor.rb#2686 def backward_word(key); end - # source://reline//lib/reline/line_editor.rb#2108 + # source://reline//lib/reline/line_editor.rb#2054 def beginning_of_line(key); end - # source://reline//lib/reline/line_editor.rb#1931 + # source://reline//lib/reline/line_editor.rb#1877 def byteinsert(str, byte_pointer, other); end - # source://reline//lib/reline/line_editor.rb#1925 + # source://reline//lib/reline/line_editor.rb#1871 def byteslice!(str, byte_pointer, size); end - # source://reline//lib/reline/line_editor.rb#328 + # source://reline//lib/reline/line_editor.rb#322 def calculate_height_by_lines(lines, prompt); end - # source://reline//lib/reline/line_editor.rb#346 + # source://reline//lib/reline/line_editor.rb#340 def calculate_height_by_width(width); end - # source://reline//lib/reline/line_editor.rb#384 + # 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#931 + # 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#1938 + # 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#2797 + # source://reline//lib/reline/line_editor.rb#2752 def capitalize_word(key); end - # source://reline//lib/reline/line_editor.rb#77 + # source://reline//lib/reline/line_editor.rb#81 def check_mode_string; end - # source://reline//lib/reline/line_editor.rb#97 - def check_multiline_prompt(buffer); end - - # source://reline//lib/reline/line_editor.rb#879 - def clear_dialog; 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#885 - def clear_dialog_with_content; end + # source://reline//lib/reline/line_editor.rb#859 + def clear_dialog(cursor_column); end - # source://reline//lib/reline/line_editor.rb#893 - def clear_each_dialog(dialog); 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#2719 + # source://reline//lib/reline/line_editor.rb#2672 def clear_screen(key); end - # source://reline//lib/reline/line_editor.rb#1261 + # 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#1336 + # 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#1290 + # source://reline//lib/reline/line_editor.rb#1234 def complete_internal_proc(list, is_menu); end - # source://reline//lib/reline/line_editor.rb#2853 + # source://reline//lib/reline/line_editor.rb#2808 def copy_for_vi(text); end - # source://reline//lib/reline/line_editor.rb#2651 + # source://reline//lib/reline/line_editor.rb#2604 def delete_char(key); end - # source://reline//lib/reline/line_editor.rb#2678 + # source://reline//lib/reline/line_editor.rb#2631 def delete_char_or_list(key); end - # source://reline//lib/reline/line_editor.rb#2809 + # source://reline//lib/reline/line_editor.rb#671 + def dialog_range(dialog, dialog_y); end + + # source://reline//lib/reline/line_editor.rb#2764 def downcase_word(key); end - # source://reline//lib/reline/line_editor.rb#3152 + # source://reline//lib/reline/line_editor.rb#3107 def ed_argument_digit(key); end - # source://reline//lib/reline/line_editor.rb#2719 + # source://reline//lib/reline/line_editor.rb#2672 def ed_clear_screen(key); end - # source://reline//lib/reline/line_editor.rb#3064 + # source://reline//lib/reline/line_editor.rb#3019 def ed_delete_next_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2982 + # source://reline//lib/reline/line_editor.rb#2937 def ed_delete_prev_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2751 + # source://reline//lib/reline/line_editor.rb#2705 def ed_delete_prev_word(key); end # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) @@ -1294,7 +1460,7 @@ class Reline::LineEditor # million. # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. # - # source://reline//lib/reline/line_editor.rb#1995 + # source://reline//lib/reline/line_editor.rb#1941 def ed_digit(key); end # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) @@ -1311,7 +1477,7 @@ class Reline::LineEditor # million. # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. # - # source://reline//lib/reline/line_editor.rb#1995 + # 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+, @@ -1320,69 +1486,69 @@ class Reline::LineEditor # 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#2602 + # source://reline//lib/reline/line_editor.rb#2548 def ed_kill_line(key); end - # source://reline//lib/reline/line_editor.rb#2108 + # source://reline//lib/reline/line_editor.rb#2054 def ed_move_to_beg(key); end - # source://reline//lib/reline/line_editor.rb#2113 + # source://reline//lib/reline/line_editor.rb#2059 def ed_move_to_end(key); end - # source://reline//lib/reline/line_editor.rb#2541 + # source://reline//lib/reline/line_editor.rb#2487 def ed_newline(key); end - # source://reline//lib/reline/line_editor.rb#2064 + # 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#2493 + # 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#2084 + # 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#2442 + # 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#2733 + # source://reline//lib/reline/line_editor.rb#2686 def ed_prev_word(key); end - # source://reline//lib/reline/line_editor.rb#2048 + # 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#2390 + # 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#2343 + # 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#2762 + # source://reline//lib/reline/line_editor.rb#2717 def ed_transpose_chars(key); end - # source://reline//lib/reline/line_editor.rb#2782 + # source://reline//lib/reline/line_editor.rb#2737 def ed_transpose_words(key); end # do nothing # - # source://reline//lib/reline/line_editor.rb#1965 + # source://reline//lib/reline/line_editor.rb#1911 def ed_unassigned(key); end - # source://reline//lib/reline/line_editor.rb#2797 + # source://reline//lib/reline/line_editor.rb#2752 def em_capitol_case(key); end - # source://reline//lib/reline/line_editor.rb#2651 + # source://reline//lib/reline/line_editor.rb#2604 def em_delete(key); end - # source://reline//lib/reline/line_editor.rb#2742 + # source://reline//lib/reline/line_editor.rb#2695 def em_delete_next_word(key); end - # source://reline//lib/reline/line_editor.rb#2678 + # source://reline//lib/reline/line_editor.rb#2631 def em_delete_or_list(key); end - # source://reline//lib/reline/line_editor.rb#2574 + # 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#3336 + # source://reline//lib/reline/line_editor.rb#3291 def em_exchange_mark(key); end # Editline:: +em-kill-line+ (not bound) Delete the entire contents of the @@ -1390,69 +1556,72 @@ class Reline::LineEditor # 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#2640 + # source://reline//lib/reline/line_editor.rb#2593 def em_kill_line(key); end - # source://reline//lib/reline/line_editor.rb#2841 + # source://reline//lib/reline/line_editor.rb#2796 def em_kill_region(key); end - # source://reline//lib/reline/line_editor.rb#2809 + # source://reline//lib/reline/line_editor.rb#2764 def em_lower_case(key); end - # source://reline//lib/reline/line_editor.rb#2724 + # source://reline//lib/reline/line_editor.rb#3302 + def em_meta_next(key); end + + # source://reline//lib/reline/line_editor.rb#2677 def em_next_word(key); end - # source://reline//lib/reline/line_editor.rb#3331 + # source://reline//lib/reline/line_editor.rb#3286 def em_set_mark(key); end - # source://reline//lib/reline/line_editor.rb#2825 + # source://reline//lib/reline/line_editor.rb#2780 def em_upper_case(key); end - # source://reline//lib/reline/line_editor.rb#2690 + # source://reline//lib/reline/line_editor.rb#2643 def em_yank(key); end - # source://reline//lib/reline/line_editor.rb#2702 + # source://reline//lib/reline/line_editor.rb#2655 def em_yank_pop(key); end - # source://reline//lib/reline/line_editor.rb#2113 + # source://reline//lib/reline/line_editor.rb#2059 def end_of_line(key); end - # source://reline//lib/reline/line_editor.rb#3336 + # source://reline//lib/reline/line_editor.rb#3291 def exchange_point_and_mark(key); end - # source://reline//lib/reline/line_editor.rb#2064 + # source://reline//lib/reline/line_editor.rb#2010 def forward_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2338 + # source://reline//lib/reline/line_editor.rb#2284 def forward_search_history(key); end - # source://reline//lib/reline/line_editor.rb#2724 + # source://reline//lib/reline/line_editor.rb#2677 def forward_word(key); end - # source://reline//lib/reline/line_editor.rb#2128 + # source://reline//lib/reline/line_editor.rb#2074 def generate_searcher; end - # source://reline//lib/reline/line_editor.rb#2343 + # 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#2390 + # 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#1468 + # source://reline//lib/reline/line_editor.rb#1412 def inclusive?(method_obj); end - # source://reline//lib/reline/line_editor.rb#2246 + # source://reline//lib/reline/line_editor.rb#2192 def incremental_search_history(key); end - # source://reline//lib/reline/line_editor.rb#338 + # source://reline//lib/reline/line_editor.rb#332 def insert_new_line(cursor_line, next_line); end - # source://reline//lib/reline/line_editor.rb#1942 + # source://reline//lib/reline/line_editor.rb#1888 def key_delete(key); end - # source://reline//lib/reline/line_editor.rb#1950 + # 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+, @@ -1461,7 +1630,7 @@ class Reline::LineEditor # 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#2602 + # 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 @@ -1469,85 +1638,88 @@ class Reline::LineEditor # 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#2640 + # source://reline//lib/reline/line_editor.rb#2593 def kill_whole_line(key); end - # source://reline//lib/reline/line_editor.rb#1286 + # source://reline//lib/reline/line_editor.rb#2695 + 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#1238 - def modify_lines(before); 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#1380 + # source://reline//lib/reline/line_editor.rb#1324 def move_completed_list(list, direction); end - # source://reline//lib/reline/line_editor.rb#374 + # source://reline//lib/reline/line_editor.rb#368 def move_cursor_down(val); end - # source://reline//lib/reline/line_editor.rb#365 + # source://reline//lib/reline/line_editor.rb#359 def move_cursor_up(val); end - # source://reline//lib/reline/line_editor.rb#2493 + # source://reline//lib/reline/line_editor.rb#2439 def next_history(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1551 + # source://reline//lib/reline/line_editor.rb#1495 def normal_char(key); end - # source://reline//lib/reline/line_editor.rb#650 + # source://reline//lib/reline/line_editor.rb#658 def padding_space_with_escape_sequences(str, width); end - # source://reline//lib/reline/line_editor.rb#2442 + # source://reline//lib/reline/line_editor.rb#2388 def previous_history(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1694 + # source://reline//lib/reline/line_editor.rb#1640 def process_auto_indent; end - # source://reline//lib/reline/line_editor.rb#1967 + # source://reline//lib/reline/line_editor.rb#1913 def process_insert(force: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1494 + # source://reline//lib/reline/line_editor.rb#1438 def process_key(key, method_symbol); end - # source://reline//lib/reline/line_editor.rb#2048 + # source://reline//lib/reline/line_editor.rb#1994 def quoted_insert(str, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#644 + # 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#657 - def render_each_dialog(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#1141 + # 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#1115 + # source://reline//lib/reline/line_editor.rb#1059 def render_whole_lines(lines, prompt, prompt_width); end - # source://reline//lib/reline/line_editor.rb#964 + # 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#1060 + # source://reline//lib/reline/line_editor.rb#1004 def rerender_all_lines; end - # source://reline//lib/reline/line_editor.rb#1016 + # source://reline//lib/reline/line_editor.rb#960 def rerender_changed_current_line; end - # source://reline//lib/reline/line_editor.rb#783 - def reset_dialog(dialog, old_dialog); end - - # source://reline//lib/reline/line_editor.rb#2333 + # source://reline//lib/reline/line_editor.rb#2279 def reverse_search_history(key); end - # source://reline//lib/reline/line_editor.rb#1426 + # source://reline//lib/reline/line_editor.rb#1370 def run_for_operators(key, method_symbol, &block); end - # source://reline//lib/reline/line_editor.rb#354 + # source://reline//lib/reline/line_editor.rb#348 def scroll_down(val); end - # source://reline//lib/reline/line_editor.rb#3220 + # source://reline//lib/reline/line_editor.rb#3175 def search_next_char(key, arg, need_prev_char: T.unsafe(nil), inclusive: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#3277 + # source://reline//lib/reline/line_editor.rb#3232 def search_prev_char(key, arg, need_next_char = T.unsafe(nil)); end # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) @@ -1564,22 +1736,22 @@ class Reline::LineEditor # million. # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. # - # source://reline//lib/reline/line_editor.rb#1995 + # source://reline//lib/reline/line_editor.rb#1941 def self_insert(key); end - # source://reline//lib/reline/line_editor.rb#3331 + # source://reline//lib/reline/line_editor.rb#3286 def set_mark(key); end - # source://reline//lib/reline/line_editor.rb#1248 + # source://reline//lib/reline/line_editor.rb#1192 def show_menu; end - # source://reline//lib/reline/line_editor.rb#350 + # source://reline//lib/reline/line_editor.rb#344 def split_by_width(str, max_width); end - # source://reline//lib/reline/line_editor.rb#2762 + # source://reline//lib/reline/line_editor.rb#2717 def transpose_chars(key); end - # source://reline//lib/reline/line_editor.rb#2782 + # source://reline//lib/reline/line_editor.rb#2737 def transpose_words(key); end # Editline:: +vi-kill-line-prev+ (vi: +Ctrl-U+) Delete the string from the @@ -1588,58 +1760,66 @@ class Reline::LineEditor # 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#2625 + # source://reline//lib/reline/line_editor.rb#2578 def unix_line_discard(key); end - # source://reline//lib/reline/line_editor.rb#2841 + # source://reline//lib/reline/line_editor.rb#2796 def unix_word_rubout(key); end - # source://reline//lib/reline/line_editor.rb#2825 + # source://reline//lib/reline/line_editor.rb#2780 def upcase_word(key); end - # source://reline//lib/reline/line_editor.rb#2863 + # source://reline//lib/reline/line_editor.rb#769 + def update_each_dialog(dialog, cursor_column); end + + # source://reline//lib/reline/line_editor.rb#2818 def vi_add(key); end - # source://reline//lib/reline/line_editor.rb#2977 + # source://reline//lib/reline/line_editor.rb#2932 def vi_add_at_eol(key); end - # source://reline//lib/reline/line_editor.rb#3003 + # source://reline//lib/reline/line_editor.rb#2958 def vi_change_meta(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2868 + # Editline:: +vi_change_to_eol+ (vi command: +C+) + Kill and change from the cursor to the end of the line. + # + # source://reline//lib/reline/line_editor.rb#2567 + def vi_change_to_eol(key); end + + # source://reline//lib/reline/line_editor.rb#2823 def vi_command_mode(key); end - # source://reline//lib/reline/line_editor.rb#3021 + # source://reline//lib/reline/line_editor.rb#2976 def vi_delete_meta(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2952 + # source://reline//lib/reline/line_editor.rb#2907 def vi_delete_prev_char(key); end - # source://reline//lib/reline/line_editor.rb#2933 + # source://reline//lib/reline/line_editor.rb#2888 def vi_end_big_word(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#3048 + # source://reline//lib/reline/line_editor.rb#3003 def vi_end_of_transmission(key); end - # source://reline//lib/reline/line_editor.rb#2894 + # source://reline//lib/reline/line_editor.rb#2849 def vi_end_word(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#3048 + # source://reline//lib/reline/line_editor.rb#3003 def vi_eof_maybe(key); end - # source://reline//lib/reline/line_editor.rb#2104 + # source://reline//lib/reline/line_editor.rb#2050 def vi_first_print(key); end - # source://reline//lib/reline/line_editor.rb#3106 + # source://reline//lib/reline/line_editor.rb#3061 def vi_histedit(key); end - # source://reline//lib/reline/line_editor.rb#2859 + # source://reline//lib/reline/line_editor.rb#2814 def vi_insert(key); end - # source://reline//lib/reline/line_editor.rb#2972 + # source://reline//lib/reline/line_editor.rb#2927 def vi_insert_at_bol(key); end - # source://reline//lib/reline/line_editor.rb#3317 + # source://reline//lib/reline/line_editor.rb#3272 def vi_join_lines(key, arg: T.unsafe(nil)); end # Editline:: +vi-kill-line-prev+ (vi: +Ctrl-U+) Delete the string from the @@ -1648,75 +1828,127 @@ class Reline::LineEditor # 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#2625 + # source://reline//lib/reline/line_editor.rb#2578 def vi_kill_line_prev(key); end - # source://reline//lib/reline/line_editor.rb#3048 + # source://reline//lib/reline/line_editor.rb#3003 def vi_list_or_eof(key); end - # source://reline//lib/reline/line_editor.rb#2868 + # source://reline//lib/reline/line_editor.rb#2823 def vi_movement_mode(key); end - # source://reline//lib/reline/line_editor.rb#2913 + # source://reline//lib/reline/line_editor.rb#2868 def vi_next_big_word(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#3212 + # source://reline//lib/reline/line_editor.rb#3167 def vi_next_char(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2874 + # source://reline//lib/reline/line_editor.rb#2829 def vi_next_word(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#3140 + # source://reline//lib/reline/line_editor.rb#3095 def vi_paste_next(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#3128 + # source://reline//lib/reline/line_editor.rb#3083 def vi_paste_prev(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2923 + # source://reline//lib/reline/line_editor.rb#2878 def vi_prev_big_word(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#3269 + # source://reline//lib/reline/line_editor.rb#3224 def vi_prev_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2884 + # source://reline//lib/reline/line_editor.rb#2839 def vi_prev_word(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#3184 + # source://reline//lib/reline/line_editor.rb#3139 def vi_replace_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2338 + # source://reline//lib/reline/line_editor.rb#2284 def vi_search_next(key); end - # source://reline//lib/reline/line_editor.rb#2333 + # source://reline//lib/reline/line_editor.rb#2279 def vi_search_prev(key); end - # source://reline//lib/reline/line_editor.rb#3169 + # source://reline//lib/reline/line_editor.rb#3124 def vi_to_column(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#3083 + # source://reline//lib/reline/line_editor.rb#3038 def vi_to_history_line(key); end - # source://reline//lib/reline/line_editor.rb#3216 + # source://reline//lib/reline/line_editor.rb#3171 def vi_to_next_char(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#3273 + # source://reline//lib/reline/line_editor.rb#3228 def vi_to_prev_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#3036 + # source://reline//lib/reline/line_editor.rb#2991 def vi_yank(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2998 + # source://reline//lib/reline/line_editor.rb#2953 def vi_zero(key); end - # source://reline//lib/reline/line_editor.rb#2690 + # source://reline//lib/reline/line_editor.rb#2643 def yank(key); end - # source://reline//lib/reline/line_editor.rb#2702 + # source://reline//lib/reline/line_editor.rb#2655 def yank_pop(key); end end # source://reline//lib/reline/line_editor.rb#51 -Reline::LineEditor::CompletionJourneyData = Struct +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) @@ -1736,175 +1968,157 @@ 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#643 +# 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#587 +# 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#591 + # source://reline//lib/reline/line_editor.rb#596 def initialize(name, config, proc_scope); end - # source://reline//lib/reline/line_editor.rb#615 + # 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#589 + # 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#589 + # 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#588 + # source://reline//lib/reline/line_editor.rb#593 def contents; end - # source://reline//lib/reline/line_editor.rb#608 + # source://reline//lib/reline/line_editor.rb#613 def contents=(contents); end - # Returns the value of attribute lines_backup. - # - # source://reline//lib/reline/line_editor.rb#589 - def lines_backup; end - - # Sets the attribute lines_backup - # - # @param value the value to set the attribute lines_backup to. - # - # source://reline//lib/reline/line_editor.rb#589 - def lines_backup=(_arg0); end - # Returns the value of attribute name. # - # source://reline//lib/reline/line_editor.rb#588 + # source://reline//lib/reline/line_editor.rb#593 def name; end # Returns the value of attribute pointer. # - # source://reline//lib/reline/line_editor.rb#589 + # 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#589 + # 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#589 + # 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#589 + # source://reline//lib/reline/line_editor.rb#594 def scroll_top=(_arg0); end - # Returns the value of attribute scrollbar_pos. - # - # source://reline//lib/reline/line_editor.rb#589 - def scrollbar_pos; end - - # Sets the attribute scrollbar_pos - # - # @param value the value to set the attribute scrollbar_pos to. - # - # source://reline//lib/reline/line_editor.rb#589 - def scrollbar_pos=(_arg0); end - - # source://reline//lib/reline/line_editor.rb#600 + # 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#589 + # 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#589 + # 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#589 + # 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#589 + # 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#588 + # source://reline//lib/reline/line_editor.rb#593 def width; end - # source://reline//lib/reline/line_editor.rb#604 + # source://reline//lib/reline/line_editor.rb#609 def width=(v); end end -# source://reline//lib/reline/line_editor.rb#520 +# 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#521 + # 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#582 + # source://reline//lib/reline/line_editor.rb#587 def call; end - # source://reline//lib/reline/line_editor.rb#537 + # 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#574 + # source://reline//lib/reline/line_editor.rb#579 def completion_journey_data; end - # source://reline//lib/reline/line_editor.rb#578 + # source://reline//lib/reline/line_editor.rb#583 def config; end - # source://reline//lib/reline/line_editor.rb#529 + # source://reline//lib/reline/line_editor.rb#524 def context; end - # source://reline//lib/reline/line_editor.rb#562 + # source://reline//lib/reline/line_editor.rb#557 def cursor_pos; end - # source://reline//lib/reline/line_editor.rb#545 + # source://reline//lib/reline/line_editor.rb#540 def dialog; end - # source://reline//lib/reline/line_editor.rb#566 + # source://reline//lib/reline/line_editor.rb#561 def just_cursor_moving; end - # source://reline//lib/reline/line_editor.rb#558 + # source://reline//lib/reline/line_editor.rb#553 def key; end - # source://reline//lib/reline/line_editor.rb#533 + # 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#570 + # 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#549 + # source://reline//lib/reline/line_editor.rb#544 def set_cursor_pos(col, row); end - # source://reline//lib/reline/line_editor.rb#541 + # source://reline//lib/reline/line_editor.rb#536 def set_dialog(dialog); end - # source://reline//lib/reline/line_editor.rb#554 + # source://reline//lib/reline/line_editor.rb#549 def set_key(key); end end @@ -1912,7 +2126,37 @@ end Reline::LineEditor::MINIMUM_SCROLLBAR_HEIGHT = T.let(T.unsafe(nil), Integer) # source://reline//lib/reline/line_editor.rb#52 -Reline::LineEditor::MenuInfo = Struct +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) @@ -1935,37 +2179,37 @@ module Reline::Terminfo # @return [Boolean] # - # source://reline//lib/reline/terminfo.rb#165 + # source://reline//lib/reline/terminfo.rb#151 def enabled?; end - # source://reline//lib/reline/terminfo.rb#94 + # source://reline//lib/reline/terminfo.rb#80 def setupterm(term, fildes); end # @raise [TerminfoError] # - # source://reline//lib/reline/terminfo.rb#141 + # source://reline//lib/reline/terminfo.rb#127 def tigetflag(capname); end # @raise [TerminfoError] # - # source://reline//lib/reline/terminfo.rb#153 + # source://reline//lib/reline/terminfo.rb#139 def tigetnum(capname); end # @raise [TerminfoError] # - # source://reline//lib/reline/terminfo.rb#123 + # source://reline//lib/reline/terminfo.rb#109 def tigetstr(capname); end - # source://reline//lib/reline/terminfo.rb#133 + # source://reline//lib/reline/terminfo.rb#119 def tiparm(str, *args); end end end -# source://reline//lib/reline/terminfo.rb#117 +# source://reline//lib/reline/terminfo.rb#103 class Reline::Terminfo::StringWithTiparm < ::String # for method chain # - # source://reline//lib/reline/terminfo.rb#118 + # source://reline//lib/reline/terminfo.rb#104 def tiparm(*args); end end @@ -1975,66 +2219,63 @@ 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#130 + # source://reline//lib/reline/unicode.rb#105 def calculate_width(str, allow_escape_code = T.unsafe(nil)); end - # source://reline//lib/reline/unicode.rb#335 + # source://reline//lib/reline/unicode.rb#307 def ed_transpose_words(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#295 + # source://reline//lib/reline/unicode.rb#267 def em_backward_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#315 + # source://reline//lib/reline/unicode.rb#287 def em_big_backward_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#246 + # source://reline//lib/reline/unicode.rb#218 def em_forward_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#266 + # source://reline//lib/reline/unicode.rb#238 def em_forward_word_with_capitalization(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#69 + # source://reline//lib/reline/unicode.rb#44 def escape_for_print(str); end - # source://reline//lib/reline/unicode.rb#49 - def get_mbchar_byte_size_by_first_char(c); end - - # source://reline//lib/reline/unicode.rb#110 + # source://reline//lib/reline/unicode.rb#85 def get_mbchar_width(mbchar); end - # source://reline//lib/reline/unicode.rb#232 + # source://reline//lib/reline/unicode.rb#204 def get_next_mbchar_size(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#237 + # source://reline//lib/reline/unicode.rb#209 def get_prev_mbchar_size(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#157 + # 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#202 - def take_range(str, start_col, max_width, encoding = T.unsafe(nil)); end + # source://reline//lib/reline/unicode.rb#175 + def take_range(str, start_col, max_width); end - # source://reline//lib/reline/unicode.rb#624 + # source://reline//lib/reline/unicode.rb#596 def vi_backward_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#486 + # source://reline//lib/reline/unicode.rb#458 def vi_big_backward_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#456 + # source://reline//lib/reline/unicode.rb#428 def vi_big_forward_end_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#436 + # source://reline//lib/reline/unicode.rb#408 def vi_big_forward_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#656 + # source://reline//lib/reline/unicode.rb#628 def vi_first_print(line); end - # source://reline//lib/reline/unicode.rb#547 + # source://reline//lib/reline/unicode.rb#519 def vi_forward_end_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#506 + # source://reline//lib/reline/unicode.rb#478 def vi_forward_word(line, byte_pointer, drop_terminate_spaces = T.unsafe(nil)); end end end @@ -2042,9 +2283,6 @@ end # source://reline//lib/reline/unicode.rb#40 Reline::Unicode::CSI_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://reline//lib/reline/unicode.rb#45 -Reline::Unicode::CSI_REGEXP_INDEX = T.let(T.unsafe(nil), Integer) - # Ambiguous # # source://reline//lib/reline/unicode/east_asian_width.rb#158 @@ -2083,33 +2321,21 @@ 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#47 -Reline::Unicode::GRAPHEME_CLUSTER_INDEX = T.let(T.unsafe(nil), Integer) - -# source://reline//lib/reline/unicode.rb#82 +# source://reline//lib/reline/unicode.rb#57 Reline::Unicode::HalfwidthDakutenHandakuten = T.let(T.unsafe(nil), Regexp) -# source://reline//lib/reline/unicode.rb#84 +# 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#44 -Reline::Unicode::NON_PRINTING_END_INDEX = T.let(T.unsafe(nil), Integer) - # source://reline//lib/reline/unicode.rb#38 Reline::Unicode::NON_PRINTING_START = T.let(T.unsafe(nil), String) -# source://reline//lib/reline/unicode.rb#43 -Reline::Unicode::NON_PRINTING_START_INDEX = T.let(T.unsafe(nil), Integer) - # source://reline//lib/reline/unicode.rb#41 Reline::Unicode::OSC_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://reline//lib/reline/unicode.rb#46 -Reline::Unicode::OSC_REGEXP_INDEX = T.let(T.unsafe(nil), Integer) - # source://reline//lib/reline/unicode.rb#42 Reline::Unicode::WIDTH_SCANNER = T.let(T.unsafe(nil), Regexp) diff --git a/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.31.2.rbi similarity index 97% rename from sorbet/rbi/gems/rubocop-ast@1.29.0.rbi rename to sorbet/rbi/gems/rubocop-ast@1.31.2.rbi index 1600ae949..d0c61ba53 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.31.2.rbi @@ -275,7 +275,7 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node # # @return [Array] # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#42 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#60 def argument_list; end # The arguments of this block. @@ -285,63 +285,81 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node # # @return [Array] # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#30 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#48 def arguments; end # Checks whether this block takes any arguments. # # @return [Boolean] whether this `block` node takes any arguments # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#67 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#85 def arguments?; end # The body of this block. # # @return [Node, nil] the body of the `block` node or `nil` # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#53 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#71 def body; end # Checks whether the `block` literal is delimited by curly braces. # # @return [Boolean] whether the `block` literal is enclosed in braces # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#74 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#92 def braces?; end # The closing delimiter for this `block` literal. # # @return [String] the closing delimiter for the `block` literal # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#102 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#120 def closing_delimiter; end # The delimiters for this `block` literal. # # @return [Array] the delimiters for the `block` literal # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#88 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#106 def delimiters; end + # A shorthand for getting the first argument of this block. + # Equivalent to `arguments.first`. + # + # @return [Node, nil] the first argument of this block, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#29 + def first_argument; end + # Checks whether the `block` literal is delimited by `do`-`end` keywords. # # @return [Boolean] whether the `block` literal is enclosed in `do`-`end` # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#81 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#99 def keywords?; end # Checks whether this `block` literal belongs to a lambda. # # @return [Boolean] whether the `block` literal belongs to a lambda # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#125 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#143 def lambda?; end + # A shorthand for getting the last argument of this block. + # Equivalent to `arguments.last`. + # + # @return [Node, nil] the last argument of this block, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#38 + def last_argument; end + # The name of the dispatched method as a symbol. # # @return [Symbol] the name of the dispatched method # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#60 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#78 def method_name; end # Checks whether this is a multiline block. This is overridden here @@ -349,14 +367,14 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node # # @return [Boolean] whether the `block` literal is on a several lines # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#118 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#136 def multiline?; end # The opening delimiter for this `block` literal. # # @return [String] the opening delimiter for the `block` literal # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#95 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#113 def opening_delimiter; end # The `send` node associated with this block. @@ -371,21 +389,21 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node # # @return [Boolean] whether the `block` literal is on a single line # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#110 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#128 def single_line?; end # Checks whether this node body is a void context. # # @return [Boolean] whether the `block` node body is a void context # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#150 def void_context?; end private # Numbered arguments of this `numblock`. # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#139 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#157 def numbered_arguments; end end @@ -1716,7 +1734,7 @@ class RuboCop::AST::IfNode < ::RuboCop::AST::Node # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#80 def modifier_form?; end - # Chacks whether the `if` node has nested `if` nodes in any of its + # Checks whether the `if` node has nested `if` nodes in any of its # branches. # # @note This performs a shallow search. @@ -4823,116 +4841,116 @@ class RuboCop::AST::NodePattern::Parser < ::Racc::Parser # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#19 def initialize(builder = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#333 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#335 def _reduce_10(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#337 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#339 def _reduce_11(val, _values); end # reduce 12 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#343 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#345 def _reduce_13(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#347 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#349 def _reduce_14(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#351 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#353 def _reduce_15(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#355 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#357 def _reduce_16(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#359 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#361 def _reduce_17(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#363 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#365 def _reduce_18(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#367 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#369 def _reduce_19(val, _values); end # reduce 1 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#301 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#303 def _reduce_2(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#371 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#373 def _reduce_20(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#375 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#377 def _reduce_21(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#379 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#381 def _reduce_22(val, _values); end # reduce 24 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#387 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#389 def _reduce_25(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#393 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#395 def _reduce_26(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#305 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#307 def _reduce_3(val, _values); end # reduce 32 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#413 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#415 def _reduce_33(val, _values); end # reduce 36 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#423 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#425 def _reduce_37(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#427 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#429 def _reduce_38(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#431 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#433 def _reduce_39(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#309 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#311 def _reduce_4(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#435 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#437 def _reduce_40(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#439 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#441 def _reduce_41(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#443 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#445 def _reduce_42(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#447 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#449 def _reduce_43(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#451 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#453 def _reduce_44(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#455 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#457 def _reduce_45(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#459 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#461 def _reduce_46(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#313 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#315 def _reduce_5(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#317 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#319 def _reduce_6(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#321 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#323 def _reduce_7(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#325 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#327 def _reduce_8(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#329 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#331 def _reduce_9(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#463 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#465 def _reduce_none(val, _values); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -4992,10 +5010,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#293 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#295 RuboCop::AST::NodePattern::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#243 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#244 RuboCop::AST::NodePattern::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) # Overrides Parser to use `WithMeta` variants and provide additional methods @@ -5114,13 +5132,13 @@ RuboCop::AST::NodePattern::Sets::SET_ABSTRACT_OVERRIDE_OVERRIDABLE_ETC = T.let(T RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ALL_CONTEXT = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_ALL_ANY_CLASS_OF_ETC = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_AND_RETURN_AND_RAISE_AND_THROW_ETC = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_ALL_CONTEXT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ANY_ALL_NORETURN_ETC = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_AND_RETURN_AND_RAISE_AND_THROW_ETC = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY = T.let(T.unsafe(nil), Set) @@ -5129,7 +5147,37 @@ RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY = T.let(T.unsafe(nil), Set) RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY_NONE_ETC = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ASSERT_EQUAL_REFUTE_EQUAL = T.let(T.unsafe(nil), Set) +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_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_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_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 = T.let(T.unsafe(nil), Set) @@ -5140,9 +5188,6 @@ RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR_ATTR # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_BACKGROUND_SCENARIO_XSCENARIO_ETC = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_BEFORE_AFTER = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_BE_EQ_EQL_EQUAL = T.let(T.unsafe(nil), Set) @@ -5227,6 +5272,9 @@ RuboCop::AST::NodePattern::Sets::SET_EXPECT_ALLOW = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_FACTORYGIRL_FACTORYBOT = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FACTORY_TRAIT = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_FILETEST_FILE_DIR_SHELL = T.let(T.unsafe(nil), Set) @@ -5236,6 +5284,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) @@ -5309,7 +5360,7 @@ RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let RuboCop::AST::NodePattern::Sets::SET_PRESENT_ANY_BLANK_EMPTY = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PRIVATE_CLASS_METHOD = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PUBLIC = T.let(T.unsafe(nil), Set) @@ -5368,9 +5419,15 @@ RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SEND___SEND__ = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SIG_HELPERS = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SKIP_PENDING = T.let(T.unsafe(nil), Set) @@ -5389,9 +5446,18 @@ RuboCop::AST::NodePattern::Sets::SET_STATUS_CODE = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_STRUCT_CLASS = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_STRUCT_IMMUTABLESTRUCT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_STRUCT_IMMUTABLESTRUCT_INEXACTSTRUCT = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SUCC_PRED_NEXT = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TEXT_EXACT_TEXT = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_TO_ENUM_ENUM_FOR = T.let(T.unsafe(nil), Set) @@ -5407,9 +5473,6 @@ RuboCop::AST::NodePattern::Sets::SET_TO_TO_NOT_NOT_TO = T.let(T.unsafe(nil), Set # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_TRUE_FALSE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_TYPE_TEMPLATE_TYPE_MEMBER = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_ZERO_EMPTY = T.let(T.unsafe(nil), Set) @@ -5829,38 +5892,38 @@ end 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#29 + 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#73 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#21 def ast; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#51 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#112 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#21 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#84 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#117 def comment_at_line(line); end # Consider using `each_comment_in_lines` instead @@ -5868,170 +5931,178 @@ 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#139 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#21 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#147 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#139 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#161 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#21 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#89 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#127 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#99 def each_token(&block); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#98 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#108 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#94 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#104 def find_token(&block); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#172 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#182 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#165 def following_line(token); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#176 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#186 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#169 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#122 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#59 def lines; end + # Returns the value of attribute parser_engine. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + 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#21 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#21 def path; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#147 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#157 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#21 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#21 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#193 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#151 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#21 def tokens; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#166 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#176 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#77 def valid_syntax?; end private - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#190 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#200 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#312 + 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#328 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#333 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#206 + 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#240 + 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#338 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#223 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#24 + def from_file(path, ruby_version, parser_engine: T.unsafe(nil)); end end end # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#15 RuboCop::AST::ProcessedSource::INVALID_LEVELS = T.let(T.unsafe(nil), Array) +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 +RuboCop::AST::ProcessedSource::PARSER_ENGINES = T.let(T.unsafe(nil), Array) + # @api private # # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#13 diff --git a/sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi b/sorbet/rbi/gems/rubocop-capybara@2.20.0.rbi similarity index 63% rename from sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi rename to sorbet/rbi/gems/rubocop-capybara@2.20.0.rbi index 5cad5664e..58bd00f91 100644 --- a/sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi +++ b/sorbet/rbi/gems/rubocop-capybara@2.20.0.rbi @@ -195,6 +195,118 @@ 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 methods of button or link clicks. +# +# 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. +# +# 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') +# +# # 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#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#44 + def on_send(node); end + + private + + # @return [Boolean] + # + # 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#52 + def offense?(node); end + + # 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#65 + def strict_method?(node); end +end + +# 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#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#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#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#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 @@ -218,10 +330,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 @@ -264,21 +377,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()'] @@ -286,7 +387,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 @@ -305,10 +406,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 @@ -351,21 +453,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()'] @@ -373,7 +463,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 @@ -393,75 +483,73 @@ end # @example # # bad # expect(current_path).to eq('/callback') +# expect(page.current_path).to eq('/callback') # # # good -# expect(page).to have_current_path('/callback') +# expect(page).to have_current_path('/callback', ignore_query: true) # -# # bad (does not support autocorrection) -# expect(page.current_path).to match(variable) +# # bad (does not support autocorrection when `match` with a variable) +# expect(page).to match(variable) # -# # good -# expect(page).to have_current_path('/callback') -# -# source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#31 +# source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#29 class RuboCop::Cop::Capybara::CurrentPathExpectation < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector # Supported matchers: eq(...) / match(/regexp/) / match('regexp') # - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#48 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#46 def as_is_matcher(param0 = T.unsafe(nil)); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#42 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#40 def expectation_set_on_current_path(param0 = T.unsafe(nil)); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#65 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#63 def on_send(node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#55 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#53 def regexp_node_matcher(param0 = T.unsafe(nil)); end private - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#115 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#113 def add_argument_parentheses(corrector, arg_node); end # `have_current_path` with no options will include the querystring # while `page.current_path` does not. # This ensures the option `ignore_query: true` is added - # except when the expectation is a regexp or string + # except when `match` matcher. # - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#133 - def add_ignore_query_options(corrector, node); end + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#131 + def add_ignore_query_options(corrector, node, matcher_node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#77 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#75 def autocorrect(corrector, node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#101 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#99 def convert_regexp_node_to_literal(corrector, matcher_node, regexp_node); end # @return [Boolean] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#125 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#123 def method_call_with_no_parentheses?(arg_node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#107 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#105 def regexp_node_to_regexp_expr(regexp_node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#88 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#86 def rewrite_expectation(corrector, node, to_symbol, matcher_node); end class << self - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#61 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#59 def autocorrect_incompatible_with; end end end -# source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#35 +# source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#33 RuboCop::Cop::Capybara::CurrentPathExpectation::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#39 +# source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#37 RuboCop::Cop::Capybara::CurrentPathExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for usage of deprecated style methods. @@ -511,15 +599,7 @@ 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) -# # 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 +# @example EnforcedStyle: have_no (default) # # bad # expect(page).not_to have_selector # expect(page).not_to have_css('a') @@ -527,6 +607,14 @@ RuboCop::Cop::Capybara::MatchStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # # good # expect(page).to have_no_selector # expect(page).to have_no_css('a') +# @example EnforcedStyle: not_to +# # 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') # # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#26 class RuboCop::Cop::Capybara::NegationMatcher < ::RuboCop::Cop::Base @@ -577,6 +665,292 @@ RuboCop::Cop::Capybara::NegationMatcher::POSITIVE_MATCHERS = T.let(T.unsafe(nil) # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#41 RuboCop::Cop::Capybara::NegationMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#6 +module RuboCop::Cop::Capybara::RSpec; end + +# A helper for `explicit` style +# +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#108 +module RuboCop::Cop::Capybara::RSpec::ExplicitHelper + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#138 + def predicate_matcher?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#124 + def allowed_explicit_matchers; end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#128 + def check_explicit(node); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#162 + def corrector_explicit(corrector, to_node, actual, matcher); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#156 + def message_explicit(matcher); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#169 + def move_predicate(corrector, actual, matcher); end + + # @return [Boolean] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#149 + def predicate_matcher_name?(name); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#180 + def replacement_matcher(node); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#176 + def to_predicate_method(matcher); end +end + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#113 +RuboCop::Cop::Capybara::RSpec::ExplicitHelper::BUILT_IN_MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#118 +RuboCop::Cop::Capybara::RSpec::ExplicitHelper::INFLECTED_MATCHER = T.let(T.unsafe(nil), Array) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#111 +RuboCop::Cop::Capybara::RSpec::ExplicitHelper::MSG_EXPLICIT = T.let(T.unsafe(nil), String) + +# Use `have_css` or `have_xpath` instead of `have_selector`. +# +# @example +# # bad +# expect(foo).to have_selector(:css, 'bar') +# +# # good +# expect(foo).to have_css('bar') +# +# # bad +# expect(foo).to have_selector(:xpath, 'bar') +# +# # good +# expect(foo).to have_xpath('bar') +# @example DefaultSelector: css (default) +# # bad +# expect(foo).to have_selector('bar') +# +# # good +# expect(foo).to have_css('bar') +# @example DefaultSelector: xpath +# # bad +# expect(foo).to have_selector('bar') +# +# # good +# expect(foo).to have_xpath('bar') +# +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#36 +class RuboCop::Cop::Capybara::RSpec::HaveSelector < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#44 + def on_send(node); end + + private + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#80 + def default_selector; end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#65 + def deletion_range(first_argument, second_argument); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#61 + def message_typed(type); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#76 + def message_untyped; end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#52 + def on_select_with_type(node, type); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#70 + def on_select_without_type(node); end +end + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#40 +RuboCop::Cop::Capybara::RSpec::HaveSelector::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#41 +RuboCop::Cop::Capybara::RSpec::HaveSelector::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#42 +RuboCop::Cop::Capybara::RSpec::HaveSelector::SELECTORS = T.let(T.unsafe(nil), Array) + +# A helper for `inflected` style +# +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#8 +module RuboCop::Cop::Capybara::RSpec::InflectedHelper + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#46 + def be_bool?(param0 = T.unsafe(nil)); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#51 + def be_boolthy?(param0 = T.unsafe(nil)); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#32 + def predicate_in_actual?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#55 + def boolean_matcher?(node); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#19 + def check_inflected(node); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#67 + def message_inflected(predicate); end + + # @return [Boolean] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#63 + def predicate?(sym); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#77 + def remove_predicate(corrector, predicate); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#85 + def rewrite_matcher(corrector, predicate, matcher); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#73 + def to_predicate_matcher(name); end + + # @return [Boolean] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#94 + def true?(to_symbol, matcher); end +end + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#11 +RuboCop::Cop::Capybara::RSpec::InflectedHelper::EXPLICIT_MATCHER = T.let(T.unsafe(nil), Array) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#14 +RuboCop::Cop::Capybara::RSpec::InflectedHelper::MSG_INFLECTED = T.let(T.unsafe(nil), String) + +# Prefer using predicate matcher over using predicate method directly. +# +# Capybara defines magic matchers for predicate methods. +# This cop recommends to use the predicate matcher instead of using +# predicate method directly. +# +# @example Strict: true, EnforcedStyle: inflected (default) +# # bad +# expect(foo.matches_css?(bar: 'baz')).to be_truthy +# expect(foo.matches_selector?(bar: 'baz')).to be_truthy +# expect(foo.matches_style?(bar: 'baz')).to be_truthy +# expect(foo.matches_xpath?(bar: 'baz')).to be_truthy +# +# # good +# expect(foo).to match_css(bar: 'baz') +# expect(foo).to match_selector(bar: 'baz') +# expect(foo).to match_style(bar: 'baz') +# expect(foo).to match_xpath(bar: 'baz') +# +# # also good - It checks "true" strictly. +# expect(foo.matches_style?(bar: 'baz')).to be(true) +# @example Strict: false, EnforcedStyle: inflected +# # bad +# expect(foo.matches_style?(bar: 'baz')).to be_truthy +# expect(foo.matches_style?(bar: 'baz')).to be(true) +# +# # good +# expect(foo).to match_style(bar: 'baz') +# @example Strict: true, EnforcedStyle: explicit +# # bad +# expect(foo).to match_style(bar: 'baz') +# +# # good - the above code is rewritten to it by this cop +# expect(foo.matches_style?(bar: 'baz')).to be(true) +# @example Strict: false, EnforcedStyle: explicit +# # bad +# expect(foo).to match_style(bar: 'baz') +# +# # good - the above code is rewritten to it by this cop +# expect(foo.matches_style?(bar: 'baz')).to be_truthy +# +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#238 +class RuboCop::Cop::Capybara::RSpec::PredicateMatcher < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Capybara::RSpec::InflectedHelper + include ::RuboCop::Cop::Capybara::RSpec::ExplicitHelper + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#246 + def on_send(node); end + + private + + # returns args location with whitespace + # + # @example + # foo 1, 2 + # ^^^^^ + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#260 + def args_loc(send_node); end +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 @@ -648,68 +1022,71 @@ RuboCop::Cop::Capybara::SpecificActions::SPECIFIC_ACTION = T.let(T.unsafe(nil), # @example # # bad # find('#some-id') -# find('[visible][id=some-id]') +# find('[id=some-id]') +# find(:css, '#some-id') # # # good # find_by_id('some-id') -# find_by_id('some-id', visible: true) # # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#17 class RuboCop::Cop::Capybara::SpecificFinders < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#31 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#30 def class_options(param0); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#26 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#25 def find_argument(param0 = T.unsafe(nil)); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#35 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#34 def on_send(node); end private - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#89 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#93 def append_options(classes, options); end # @return [Boolean] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#63 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#62 def attribute?(arg); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#79 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#83 def autocorrect_classes(corrector, node, classes); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#116 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#78 + def deletion_range(node); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#120 def end_pos(node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#94 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#98 def keyword_argument_class(classes); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#112 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#116 def offense_range(node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#47 - def on_attr(node, arg); end + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#46 + def on_attr(node, sym, arg); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#55 - def on_id(node, arg); end + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#54 + def on_id(node, sym, arg); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#68 - def register_offense(node, id, classes = T.unsafe(nil)); end + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#67 + def register_offense(node, sym, id, classes = T.unsafe(nil)); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#99 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#103 def replaced_arguments(arg, id); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#104 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#108 def to_options(attrs); end end -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#22 +# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#21 RuboCop::Cop::Capybara::SpecificFinders::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#23 +# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#22 RuboCop::Cop::Capybara::SpecificFinders::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for there is a more specific matcher offered by Capybara. @@ -739,28 +1116,31 @@ 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 diff --git a/sorbet/rbi/gems/rubocop-factory_bot@2.23.1.rbi b/sorbet/rbi/gems/rubocop-factory_bot@2.25.1.rbi similarity index 83% rename from sorbet/rbi/gems/rubocop-factory_bot@2.23.1.rbi rename to sorbet/rbi/gems/rubocop-factory_bot@2.25.1.rbi index fed875311..2f5d5df21 100644 --- a/sorbet/rbi/gems/rubocop-factory_bot@2.23.1.rbi +++ b/sorbet/rbi/gems/rubocop-factory_bot@2.25.1.rbi @@ -25,6 +25,16 @@ module RuboCop::Cop::FactoryBot; end # 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 @@ -36,6 +46,16 @@ module RuboCop::Cop::FactoryBot; end # 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" @@ -45,70 +65,92 @@ module RuboCop::Cop::FactoryBot; end # email # end # -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#43 +# 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#71 + # 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#81 + # 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#76 + # 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#57 + # 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#102 + # 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#106 + # 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#114 + # 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#122 + # 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#132 + # 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#140 + # 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#146 + # 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#158 + # 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#168 + # 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#172 + # 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#185 + # 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#177 + # 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#48 +# 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#55 +# 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. @@ -274,35 +316,38 @@ class RuboCop::Cop::FactoryBot::ConsistentParenthesesStyle < ::RuboCop::Cop::Bas # 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 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#79 + def omit_hash_value?(param0 = T.unsafe(nil)); end + + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#93 def on_send(node); end private # @return [Boolean] # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#118 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#130 def ambiguous_without_parentheses?(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#90 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#101 def register_offense(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#97 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#108 def register_offense_with_parentheses(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#107 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#119 def register_offense_without_parentheses(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#122 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#134 def remove_parentheses(corrector, node); end class << self - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#78 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#89 def autocorrect_incompatible_with; end end end -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#116 +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#128 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 @@ -372,41 +417,32 @@ class RuboCop::Cop::FactoryBot::CreateList < ::RuboCop::Cop::Base include ::RuboCop::Cop::FactoryBot::ConfigurableExplicitOnly extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#101 + # 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#77 - def array_new?(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#92 + # 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#106 + # 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#116 + # 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#111 + # 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#82 - def n_times?(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#87 - def n_times_map?(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#120 + # 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#131 + # 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#145 + # 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 repetition_block?(param0 = T.unsafe(nil)); end + def repeat_count(param0 = T.unsafe(nil)); end private @@ -414,77 +450,82 @@ class RuboCop::Cop::FactoryBot::CreateList < ::RuboCop::Cop::Base # 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#161 + # 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#172 + # 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#180 + # 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#189 + # 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#195 +# 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#198 + # 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#202 + # 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#210 + # 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#255 +# 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#258 + # 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#262 + # 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#285 + # 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#294 + # 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#276 + # 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#307 + # 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#320 + # 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#328 + # 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#336 + # 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#274 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#273 def node; end end @@ -499,32 +540,69 @@ RuboCop::Cop::FactoryBot::CreateList::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # :nodoc # -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#218 +# 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#221 + # 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#225 + # 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#247 + # 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#234 + # 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#232 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#231 def node; end end +# Check for excessive model creation in a list. +# +# @example MaxAmount: 10 (default) +# # We do not allow more than 10 items to be created +# +# # bad +# create_list(:merge_request, 1000, state: :opened) +# +# # good +# create_list(:merge_request, 10, state: :opened) +# @example MaxAmount: 20 +# # We do not allow more than 20 items to be created +# +# # bad +# create_list(:merge_request, 1000, state: :opened) +# +# # good +# create_list(:merge_request, 15, state: :opened) +# +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/excessive_create_list.rb#26 +class RuboCop::Cop::FactoryBot::ExcessiveCreateList < ::RuboCop::Cop::Base + include ::RuboCop::FactoryBot::Language + include ::RuboCop::Cop::FactoryBot::ConfigurableExplicitOnly + + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/excessive_create_list.rb#33 + def create_list?(param0 = T.unsafe(nil)); end + + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/excessive_create_list.rb#39 + def on_send(node); end +end + +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/excessive_create_list.rb#29 +RuboCop::Cop::FactoryBot::ExcessiveCreateList::MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/excessive_create_list.rb#37 +RuboCop::Cop::FactoryBot::ExcessiveCreateList::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Use definition in factory association instead of hard coding a strategy. # # @example @@ -619,6 +697,9 @@ RuboCop::Cop::FactoryBot::FactoryClassName::RESTRICT_ON_SEND = T.let(T.unsafe(ni # # good # create(:user) # build :user, username: "NAME" +# +# # good - namespaced models +# create('users/internal') # @example EnforcedStyle: string # # bad # create(:user) @@ -648,44 +729,78 @@ RuboCop::Cop::FactoryBot::FactoryClassName::RESTRICT_ON_SEND = T.let(T.unsafe(ni # FactoryBot.create(:user) # create(:user) # -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#48 +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#51 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 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#62 def factory_call(param0 = T.unsafe(nil)); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#66 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#69 def on_send(node); end private # @return [Boolean] # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#82 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#89 + def namespaced?(name); end + + # @return [Boolean] + # + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#85 def offense_for_string_style?(name); end # @return [Boolean] # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#78 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#81 def offense_for_symbol_style?(name); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#86 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#93 def register_offense(name, prefer); end end -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#55 +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#58 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 +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#57 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 +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#59 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 + include ::RuboCop::FactoryBot::Language + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/id_sequence.rb#27 + def on_send(node); end +end + +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/id_sequence.rb#24 +RuboCop::Cop::FactoryBot::IdSequence::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/id_sequence.rb#25 +RuboCop::Cop::FactoryBot::IdSequence::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for redundant `factory` option. # # @example diff --git a/sorbet/rbi/gems/rubocop-rspec@2.23.1.rbi b/sorbet/rbi/gems/rubocop-rspec@2.27.1.rbi similarity index 86% rename from sorbet/rbi/gems/rubocop-rspec@2.23.1.rbi rename to sorbet/rbi/gems/rubocop-rspec@2.27.1.rbi index af5eac57c..a6a45ef67 100644 --- a/sorbet/rbi/gems/rubocop-rspec@2.23.1.rbi +++ b/sorbet/rbi/gems/rubocop-rspec@2.27.1.rbi @@ -11,10 +11,10 @@ class RuboCop::AST::Node < ::Parser::AST::Node include ::RuboCop::RSpec::Node end -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/final_end_location.rb#4 +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/file_help.rb#4 module RuboCop::Cop; end -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/final_end_location.rb#5 +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/file_help.rb#5 module RuboCop::Cop::RSpec; end # Checks that left braces for adjacent single line lets are aligned. @@ -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,41 +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/before_after_all.rb#27 +RuboCop::Cop::RSpec::BeforeAfterAll::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) # source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/current_path_expectation.rb#6 module RuboCop::Cop::RSpec::Capybara; end @@ -714,59 +708,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 +1163,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 +1187,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 +1219,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 +1264,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 +1274,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. @@ -1392,7 +1418,7 @@ class RuboCop::Cop::RSpec::DuplicatedMetadata < ::RuboCop::Cop::RSpec::Base extend ::RuboCop::Cop::AutoCorrector # source://rubocop-rspec//lib/rubocop/cop/rspec/duplicated_metadata.rb#22 - def on_metadata(symbols, _pairs); end + def on_metadata(symbols, _hash); end private @@ -1838,15 +1864,75 @@ module RuboCop::Cop::RSpec::EmptyLineSeparation def offending_loc(last_line); end end +# Avoid empty metadata hash. +# +# @example EnforcedStyle: symbol (default) +# # bad +# describe 'Something', {} +# +# # good +# describe 'Something' +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_metadata.rb#14 +class RuboCop::Cop::RSpec::EmptyMetadata < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::Metadata + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_metadata.rb#22 + def on_metadata(_symbols, hash); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_metadata.rb#32 + def remove_empty_metadata(corrector, node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_metadata.rb#20 +RuboCop::Cop::RSpec::EmptyMetadata::MSG = T.let(T.unsafe(nil), String) + +# Use `eq` instead of `be ==` to compare objects. +# +# @example +# # bad +# expect(foo).to be == 42 +# +# # good +# expect(foo).to eq 42 +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/eq.rb#15 +class RuboCop::Cop::RSpec::Eq < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/eq.rb#23 + def be_equals(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/eq.rb#27 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/eq.rb#38 + def offense_range(matcher); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/eq.rb#19 +RuboCop::Cop::RSpec::Eq::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/eq.rb#20 +RuboCop::Cop::RSpec::Eq::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for long examples. # # A long example is usually more difficult to understand. Consider # extracting out some behavior, e.g. with a `let` block, or a helper # method. # -# You can set literals you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', and 'heredoc'. Each literal -# will be counted as one line regardless of its actual size. +# You can set constructs you want to fold with `CountAsOne`. +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of +# its actual size. # # @example # # bad @@ -1864,7 +1950,7 @@ end # result = service.call # expect(result).to be(true) # end -# @example CountAsOne: ['array', 'heredoc'] +# @example CountAsOne: ['array', 'heredoc', 'method_call'] # # it do # array = [ # +1 @@ -1880,28 +1966,34 @@ end # Heredoc # content. # HEREDOC -# end # 5 points # -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#51 +# foo( # +1 +# 1, +# 2 +# ) +# end # 6 points +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#57 class RuboCop::Cop::RSpec::ExampleLength < ::RuboCop::Cop::RSpec::Base include ::RuboCop::Cop::CodeLength - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#56 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#62 def on_block(node); end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#64 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#70 def cop_label; end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#54 +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#60 RuboCop::Cop::RSpec::ExampleLength::LABEL = T.let(T.unsafe(nil), String) # Checks for examples without a description. # # RSpec allows for auto-generated example descriptions when there is no # description provided or the description is an empty one. +# It is acceptable to use `specify` without a description # # This cop removes empty descriptions. # It also defines whether auto-generated description is allowed, based @@ -1909,17 +2001,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 @@ -1941,31 +2039,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. @@ -1985,6 +2083,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 @@ -2006,66 +2107,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 @@ -2100,10 +2207,10 @@ class RuboCop::Cop::RSpec::ExcessiveDocstringSpacing < ::RuboCop::Cop::RSpec::Ba # @param node [RuboCop::AST::Node] # @param text [String] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#74 + # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#76 def add_whitespace_offense(node, text); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#83 + # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#85 def docstring(node); end # @param text [String] @@ -2120,7 +2227,7 @@ class RuboCop::Cop::RSpec::ExcessiveDocstringSpacing < ::RuboCop::Cop::RSpec::Ba # Recursive processing is required to process nested dstr nodes # that is the case for \-separated multiline strings with interpolation. # - # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#95 + # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#97 def text(node); end end @@ -2149,17 +2256,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#93 def complex_literal?(node); end # This is not implemented using a NodePattern because it seems @@ -2167,21 +2274,24 @@ 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#85 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#89 def simple_literal?(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#95 + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#98 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) @@ -2192,7 +2302,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. # @@ -2313,7 +2423,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 @@ -2533,8 +2643,22 @@ RuboCop::Cop::RSpec::FactoryBot::FactoryNameStyle = RuboCop::Cop::FactoryBot::Fa # 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. @@ -2584,78 +2708,78 @@ RuboCop::Cop::RSpec::FactoryBot::SyntaxMethods = RuboCop::Cop::FactoryBot::Synta # # good # my_class_spec.rb # describe MyClass, '#method' # -# source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#59 +# 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#66 + # 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#75 + # 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#73 + # 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#136 + # 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#143 + # 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#85 + # 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#167 + # 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#126 + # 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#151 + # 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#147 + # 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#119 + # 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#101 + # 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#115 + # 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#155 + # 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#97 + # 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#163 + # 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#159 + # 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#63 +# 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. @@ -2731,15 +2855,15 @@ class RuboCop::Cop::RSpec::Focus < ::RuboCop::Cop::RSpec::Base private - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#108 + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#110 def correct_send(corrector, focus); end # @yield [node] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#95 + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#97 def focus_metadata(node, &block); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#101 + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#103 def with_surrounding(focus); end end @@ -3413,6 +3537,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) @@ -3923,31 +4082,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. # @@ -3979,26 +4135,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 @@ -4008,11 +4164,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. # @@ -4030,7 +4183,7 @@ module RuboCop::Cop::RSpec::Metadata # @raise [::NotImplementedError] # # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#43 - def on_metadata(_symbols, _pairs); end + def on_metadata(_symbols, _hash); end # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#30 def on_numblock(node); end @@ -4040,6 +4193,107 @@ module RuboCop::Cop::RSpec::Metadata # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#13 def rspec_metadata(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#49 + def on_metadata_arguments(metadata_arguments); end +end + +# Use consistent metadata style. +# +# This cop does not support autocorrection in the case of +# `EnforcedStyle: hash` where the trailing metadata type is ambiguous. +# (e.g. `describe 'Something', :a, b`) +# +# @example EnforcedStyle: symbol (default) +# # bad +# describe 'Something', a: true +# +# # good +# describe 'Something', :a +# @example EnforcedStyle: hash +# # bad +# describe 'Something', :a +# +# # good +# describe 'Something', a: true +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#25 +class RuboCop::Cop::RSpec::MetadataStyle < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RSpec::Metadata + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#33 + def extract_metadata_hash(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#43 + def match_ambiguous_trailing_metadata?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#38 + def match_boolean_metadata_pair?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#47 + def on_metadata(symbols, hash); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#66 + def autocorrect_pair(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#71 + def autocorrect_symbol(corrector, node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#78 + def bad_metadata_pair?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#82 + def bad_metadata_symbol?(_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#86 + def format_symbol_to_pair_source(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#90 + def insert_pair(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#101 + def insert_pair_as_last_argument(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#110 + def insert_pair_to_empty_hash_metadata(corrector, node, hash_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#117 + def insert_pair_to_non_empty_hash_metadata(corrector, node, hash_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#124 + def insert_symbol(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#131 + def message_for_style; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#138 + def on_metadata_pair(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#146 + def on_metadata_symbol(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#154 + def remove_pair(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#164 + def remove_pair_following(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#176 + def remove_pair_preceding(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#188 + def remove_symbol(corrector, node); end end # Checks that the first argument to an example group is not empty. @@ -4139,12 +4393,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") @@ -4153,49 +4411,49 @@ 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-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#74 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#72 RuboCop::Cop::RSpec::MultipleExpectations::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#70 +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#75 RuboCop::Cop::RSpec::MultipleExpectations::TRUE = T.let(T.unsafe(nil), Proc) # Checks if example groups contain too many `let` and `subject` calls. @@ -5092,32 +5350,53 @@ RuboCop::Cop::RSpec::Rails::AvoidSetupHook::MSG = T.let(T.unsafe(nil), String) # Checks that tests use `have_http_status` instead of equality matchers. # -# @example +# @example ResponseMethods: ['response', 'last_response'] (default) # # bad # expect(response.status).to be(200) -# expect(response.code).to eq("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//lib/rubocop/cop/rspec/rails/have_http_status.rb#17 +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#29 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 + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#40 def match_status(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#38 + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#50 def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#72 + def response_methods; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#68 + def response_methods?(name); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#20 +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#32 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 +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#37 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 +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#36 RuboCop::Cop::RSpec::Rails::HaveHttpStatus::RUNNERS = T.let(T.unsafe(nil), Set) # Enforces use of symbolic or numeric value to describe HTTP status. @@ -5131,28 +5410,34 @@ RuboCop::Cop::RSpec::Rails::HaveHttpStatus::RUNNERS = T.let(T.unsafe(nil), Set) # # 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 } @@ -5160,127 +5445,124 @@ RuboCop::Cop::RSpec::Rails::HaveHttpStatus::RUNNERS = T.let(T.unsafe(nil), Set) # 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#51 +# 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#57 + # 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#61 + # 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#75 + # 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#167 +# 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#185 - def current; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#173 + # 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#168 + # 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#177 + # 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#195 + # 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#191 + # 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#142 +# 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 - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#151 - def current; end - # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#143 + # 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#147 + # 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#161 + # 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#157 + # 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#54 +# 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#87 +# 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#94 + # 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#106 + # 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#110 + # 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#98 + # 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#92 + # 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#102 + # 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#90 +# 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#88 +# 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#117 +# 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 - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#126 - def current; end - # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#118 + # 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#122 + # 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#136 + # 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#132 + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#140 def symbol; end end @@ -5392,97 +5674,353 @@ 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. +# 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//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#20 +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#33 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#345 + def message(preferred); end - # 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#338 + def on_assertion(node, assertion); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#43 - def replacement(node, expected, actual, failure_message); end + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#326 + def on_send(node); 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 -# @example EnforcedStyle: be_invalid -# # bad -# expect(foo).not_to be_valid +# TODO: replace with `BasicAssertion.subclasses` in Ruby 3.1+ # -# # good -# expect(foo).to be_invalid -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#27 -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/minitest_assertions.rb#318 +RuboCop::Cop::RSpec::Rails::MinitestAssertions::ASSERTION_MATCHERS = T.let(T.unsafe(nil), Array) - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#40 - def be_invalid?(param0 = T.unsafe(nil)); end +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#37 +class RuboCop::Cop::RSpec::Rails::MinitestAssertions::BasicAssertion + extend ::RuboCop::AST::NodePattern::Macros - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#35 - def not_to?(param0 = T.unsafe(nil)); end + # @return [BasicAssertion] a new instance of BasicAssertion + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#46 + def initialize(expected, actual, failure_message); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#44 - def on_send(node); end + # Returns the value of attribute actual. + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#40 + def actual; end - private + # @raise [NotImplementedError] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#65 + def assertion; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#69 - def message(_matcher); end + # Returns the value of attribute expected. + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#40 + def expected; end - # @return [Boolean] + # Returns the value of attribute failure_message. # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#56 - def offense?(node); end + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#40 + def failure_message; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#65 - def offense_range(node); end + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#61 + def negated?(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#84 - def replaced_matcher; end + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#52 + def replaced(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#75 - def replaced_runner; end + class << self + # @raise [NotImplementedError] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#42 + def minitest_assertion; end + end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#254 +class RuboCop::Cop::RSpec::Rails::MinitestAssertions::EmptyAssertion < ::RuboCop::Cop::RSpec::Rails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#270 + def assertion; end + + class << self + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#266 + def match(actual, failure_message); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#262 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#255 +RuboCop::Cop::RSpec::Rails::MinitestAssertions::EmptyAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#71 +class RuboCop::Cop::RSpec::Rails::MinitestAssertions::EqualAssertion < ::RuboCop::Cop::RSpec::Rails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#87 + def assertion; end + + class << self + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#83 + def match(expected, actual, failure_message); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#79 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#72 +RuboCop::Cop::RSpec::Rails::MinitestAssertions::EqualAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#296 +class RuboCop::Cop::RSpec::Rails::MinitestAssertions::FalseAssertion < ::RuboCop::Cop::RSpec::Rails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#310 + def assertion; end + + class << self + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#306 + def match(actual, failure_message); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#302 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#297 +RuboCop::Cop::RSpec::Rails::MinitestAssertions::FalseAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#159 +class RuboCop::Cop::RSpec::Rails::MinitestAssertions::InDeltaAssertion < ::RuboCop::Cop::RSpec::Rails::MinitestAssertions::BasicAssertion + # @return [InDeltaAssertion] a new instance of InDeltaAssertion + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#175 + def initialize(expected, actual, delta, fail_message); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#181 + def assertion; end + + class << self + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#171 + def match(expected, actual, delta, failure_message); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#167 + def minitest_assertion(param0 = T.unsafe(nil)); end + end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#31 +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#160 +RuboCop::Cop::RSpec::Rails::MinitestAssertions::InDeltaAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#137 +class RuboCop::Cop::RSpec::Rails::MinitestAssertions::IncludesAssertion < ::RuboCop::Cop::RSpec::Rails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#153 + def assertion; end + + class << self + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#149 + def match(collection, expected, failure_message); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#145 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#138 +RuboCop::Cop::RSpec::Rails::MinitestAssertions::IncludesAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#115 +class RuboCop::Cop::RSpec::Rails::MinitestAssertions::InstanceOfAssertion < ::RuboCop::Cop::RSpec::Rails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#131 + def assertion; end + + class << self + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#127 + def match(expected, actual, failure_message); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#123 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#116 +RuboCop::Cop::RSpec::Rails::MinitestAssertions::InstanceOfAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#93 +class RuboCop::Cop::RSpec::Rails::MinitestAssertions::KindOfAssertion < ::RuboCop::Cop::RSpec::Rails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#109 + def assertion; end + + class << self + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#105 + def match(expected, actual, failure_message); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#101 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#94 +RuboCop::Cop::RSpec::Rails::MinitestAssertions::KindOfAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#315 +RuboCop::Cop::RSpec::Rails::MinitestAssertions::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#211 +class RuboCop::Cop::RSpec::Rails::MinitestAssertions::MatchAssertion < ::RuboCop::Cop::RSpec::Rails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#226 + def assertion; end + + class << self + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#222 + def match(matcher, actual, failure_message); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#218 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#212 +RuboCop::Cop::RSpec::Rails::MinitestAssertions::MatchAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#232 +class RuboCop::Cop::RSpec::Rails::MinitestAssertions::NilAssertion < ::RuboCop::Cop::RSpec::Rails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#248 + def assertion; end + + class << self + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#244 + def match(actual, failure_message); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#240 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#233 +RuboCop::Cop::RSpec::Rails::MinitestAssertions::NilAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#187 +class RuboCop::Cop::RSpec::Rails::MinitestAssertions::PredicateAssertion < ::RuboCop::Cop::RSpec::Rails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#205 + def assertion; end + + class << self + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#199 + def match(subject, predicate, failure_message); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#195 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#188 +RuboCop::Cop::RSpec::Rails::MinitestAssertions::PredicateAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#324 +RuboCop::Cop::RSpec::Rails::MinitestAssertions::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#276 +class RuboCop::Cop::RSpec::Rails::MinitestAssertions::TrueAssertion < ::RuboCop::Cop::RSpec::Rails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#290 + def assertion; end + + class << self + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#286 + def match(actual, failure_message); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#282 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#277 +RuboCop::Cop::RSpec::Rails::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//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#32 +# 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`. @@ -5639,7 +6177,7 @@ class RuboCop::Cop::RSpec::ReceiveMessages < ::RuboCop::Cop::RSpec::Base # @return [Boolean] # # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#150 - def heredoc?(node); end + def heredoc_or_splat?(node); end # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#146 def item_range_by_whole_lines(item); end @@ -5664,7 +6202,7 @@ class RuboCop::Cop::RSpec::ReceiveMessages < ::RuboCop::Cop::RSpec::Base # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#154 + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#155 def requires_quotes?(value); end # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#91 @@ -5746,6 +6284,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#32 + def on_send(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/remove_const.rb#27 + def remove_const(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/remove_const.rb#22 +RuboCop::Cop::RSpec::RemoveConst::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/remove_const.rb#24 +RuboCop::Cop::RSpec::RemoveConst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Check for repeated description strings in example groups. # # @example @@ -6061,6 +6668,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#84 + def detect_offenses_in_block(node, subject_names = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#96 + def detect_offenses_in_example(node, subject_names); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#110 + def detect_subjects_in_scope(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#80 + 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 @@ -6377,9 +7057,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 @@ -6393,47 +7077,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' # -# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#23 +# # 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#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#68 - def symbol; end +# 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#72 - def wrap_with_single_quotes(string); 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#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. # @@ -6475,7 +7198,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] @@ -6580,31 +7303,151 @@ class RuboCop::Cop::RSpec::SortMetadata < ::RuboCop::Cop::RSpec::Base extend ::RuboCop::Cop::AutoCorrector # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#26 - def on_metadata(symbols, pairs); end + def on_metadata(symbols, hash); end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#37 + # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#38 def crime_scene(symbols, pairs); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#46 + # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#47 def replacement(symbols, pairs); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#54 + # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#55 def sort_pairs(pairs); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#58 + # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#59 def sort_symbols(symbols); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#50 + # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#51 def sorted?(symbols, pairs); end end # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#24 RuboCop::Cop::RSpec::SortMetadata::MSG = T.let(T.unsafe(nil), String) +# Checks that spec file paths are consistent and well-formed. +# +# @example +# # bad +# whatever_spec.rb # describe MyClass +# my_class_spec.rb # describe MyClass, '#method' +# +# # good +# my_class_spec.rb # describe MyClass +# my_class_method_spec.rb # describe MyClass, '#method' +# my_class/method_spec.rb # describe MyClass, '#method' +# @example `CustomTransform: {RuboCop=>rubocop, RSpec=>rspec}` (default) +# # good +# rubocop_spec.rb # describe RuboCop +# rspec_spec.rb # describe RSpec +# @example `IgnoreMethods: false` (default) +# # bad +# my_class_spec.rb # describe MyClass, '#method' +# @example `IgnoreMethods: true` +# # good +# my_class_spec.rb # describe MyClass, '#method' +# @example `IgnoreMetadata: {type=>routing}` (default) +# # good +# whatever_spec.rb # describe MyClass, type: :routing do; end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#35 +class RuboCop::Cop::RSpec::SpecFilePathFormat < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::TopLevelGroup + include ::RuboCop::Cop::RSpec::Namespace + include ::RuboCop::Cop::RSpec::FileHelp + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#43 + def example_group_arguments(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#48 + def metadata_key_value(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#50 + def on_top_level_example_group(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#108 + def camel_to_snake_case(string); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#81 + def correct_path_pattern(class_name, arguments); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#115 + def custom_transform; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#62 + def ensure_correct_file_path(send_node, class_name, arguments); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#98 + def expected_path(constant); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#127 + def filename_ends_with?(pattern); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#94 + def ignore?(method_name); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#123 + def ignore_metadata; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#73 + def ignore_metadata?(arguments); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#119 + def ignore_methods?; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#88 + def name_pattern(method_name); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#40 +RuboCop::Cop::RSpec::SpecFilePathFormat::MSG = T.let(T.unsafe(nil), String) + +# Checks that spec file paths suffix are consistent and well-formed. +# +# @example +# # bad +# my_class/foo_specorb.rb # describe MyClass +# spec/models/user.rb # describe User +# spec/models/user_specxrb # describe User +# +# # good +# my_class_spec.rb # describe MyClass +# +# # good - shared examples are allowed +# spec/models/user.rb # shared_examples_for 'foo' +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_suffix.rb#20 +class RuboCop::Cop::RSpec::SpecFilePathSuffix < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::TopLevelGroup + include ::RuboCop::Cop::RSpec::FileHelp + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_suffix.rb#26 + def on_top_level_example_group(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_suffix.rb#34 + def correct_path?; end +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) + # Checks that message expectations do not have a configured response. # # @example @@ -6998,7 +7841,7 @@ class RuboCop::Cop::RSpec::VariableDefinition < ::RuboCop::Cop::RSpec::Base # @return [Boolean] # # source://rubocop-rspec//lib/rubocop/cop/rspec/variable_definition.rb#62 - def style_violation?(variable); end + def style_offense?(variable); end # @return [Boolean] # @@ -7111,7 +7954,7 @@ class RuboCop::Cop::RSpec::VerifiedDoubleReference < ::RuboCop::Cop::RSpec::Base private # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#101 - def correct_style(violation); end + def correct_style(offense); end # @return [Boolean] # @@ -7264,14 +8107,14 @@ class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp - # source://rubocop/1.55.1/lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 + # source://rubocop/1.61.0/lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 def on_csend(node); end - # source://rubocop/1.55.1/lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 + # source://rubocop/1.61.0/lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 def on_send(node); end class << self - # source://rubocop-rspec//lib/rubocop-rspec.rb#59 + # source://rubocop-rspec//lib/rubocop-rspec.rb#60 def autocorrect_incompatible_with; end end end @@ -7419,7 +8262,7 @@ end # Wrapper for RSpec examples # -# source://rubocop-rspec//lib/rubocop/rspec/example.rb#7 +# source://rubocop-rspec//lib/rubocop/rspec/example.rb#6 class RuboCop::RSpec::Example < ::RuboCop::RSpec::Concept # source://rubocop-rspec//lib/rubocop/rspec/example.rb#28 def definition; end @@ -7445,7 +8288,7 @@ end # Wrapper for RSpec example groups # -# source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#12 +# source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#6 class RuboCop::RSpec::ExampleGroup < ::RuboCop::RSpec::Concept # source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#28 def examples; end @@ -7485,7 +8328,7 @@ end # Wrapper for RSpec hook # -# source://rubocop-rspec//lib/rubocop/rspec/hook.rb#7 +# source://rubocop-rspec//lib/rubocop/rspec/hook.rb#6 class RuboCop::RSpec::Hook < ::RuboCop::RSpec::Concept # @return [Boolean] # @@ -7796,56 +8639,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 @@ -7853,3 +8696,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-shopify@2.14.0.rbi b/sorbet/rbi/gems/rubocop-shopify@2.15.1.rbi similarity index 100% rename from sorbet/rbi/gems/rubocop-shopify@2.14.0.rbi rename to sorbet/rbi/gems/rubocop-shopify@2.15.1.rbi diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.7.3.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.7.8.rbi similarity index 75% rename from sorbet/rbi/gems/rubocop-sorbet@0.7.3.rbi rename to sorbet/rbi/gems/rubocop-sorbet@0.7.8.rbi index 787dd0abd..fb505a0db 100644 --- a/sorbet/rbi/gems/rubocop-sorbet@0.7.3.rbi +++ b/sorbet/rbi/gems/rubocop-sorbet@0.7.8.rbi @@ -105,6 +105,60 @@ RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::MSG = T.let(T.unsafe(nil) # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#23 RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::WITHOUT_BLOCK_MSG = T.let(T.unsafe(nil), String) +# Checks for the a mistaken variant of the "obsolete memoization pattern" that used to be required +# on every call, causing the memoized value to be discarded and recomputed on every call. +# +# This cop will correct it to read from the ivar instead of `nil`, which will memoize it correctly. +# +# The result of this correction will be the "obsolete memoization pattern", which can further be corrected by +# the `Sorbet/ObsoleteStrictMemoization` cop. +# +# See `Sorbet/ObsoleteStrictMemoization` for more details. +# +# @example +# # bad +# sig { returns(Foo) } +# def foo +# # This `nil` is likely a mistake, causing the memoized value to be discarded and recomputed on every call. +# @foo = T.let(nil, T.nilable(Foo)) +# @foo ||= some_computation +# end +# +# # good +# sig { returns(Foo) } +# def foo +# # This will now memoize the value as was likely intended, so `some_computation` is only ever called once. +# # ⚠️If `some_computation` has side effects, this might be a breaking change! +# @foo = T.let(@foo, T.nilable(Foo)) +# @foo ||= some_computation +# end +# @see Sorbet/ObsoleteStrictMemoization +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb#42 +class RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::Sorbet::TargetSorbetVersion + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb#55 + def buggy_legacy_memoization_pattern?(param0 = T.unsafe(nil)); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb#66 + def on_begin(node); end + + # @return [Boolean] + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb#77 + def relevant_file?(file); end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb#51 +RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil), String) + # Ensures that callback conditionals are bound to the right type # so that they are type checked properly. # @@ -161,18 +215,19 @@ RuboCop::Cop::Sorbet::CallbackConditionalsBinding::CALLBACKS = T.let(T.unsafe(ni # # good # sig { void } # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#22 -class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Sorbet::SignatureCop +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#19 +class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Cop include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Sorbet::SignatureHelp - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#26 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#24 def offending_node(param0); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#37 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#35 def on_signature(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#30 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#28 RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), String) # Disallows the calls that are used to get constants fom Strings @@ -215,10 +270,7 @@ end # Checks for blank lines after signatures. # -# It also suggests an autocorrect -# # @example -# # # bad # sig { void } # @@ -228,22 +280,30 @@ end # sig { void } # def foo; end # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#23 -class RuboCop::Cop::Sorbet::EmptyLineAfterSig < ::RuboCop::Cop::Sorbet::SignatureCop +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#17 +class RuboCop::Cop::Sorbet::EmptyLineAfterSig < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#33 - def autocorrect(node); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#34 + def on_signature(sig); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#26 - def on_signature(node); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#25 + def sig_or_signable_method_definition?(param0 = T.unsafe(nil)); end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#48 - def next_method(node); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#57 + def lines_between(node1, node2, buffer: T.unsafe(nil)); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#53 + def next_sibling(node); end end +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#22 +RuboCop::Cop::Sorbet::EmptyLineAfterSig::MSG = T.let(T.unsafe(nil), String) + # Checks that the Sorbet sigil comes as the first magic comment in the file. # # The expected order for magic comments is: (en)?coding, typed, warn_indent then frozen_string_literal. @@ -321,8 +381,10 @@ RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), # * `ParameterTypePlaceholder`: placeholders used for parameter types (default: 'T.untyped') # * `ReturnTypePlaceholder`: placeholders used for return types (default: 'T.untyped') # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#29 -class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Sorbet::SignatureCop +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#27 +class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Cop + include ::RuboCop::Cop::Sorbet::SignatureHelp + # @return [EnforceSignatures] a new instance of EnforceSignatures # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#30 @@ -504,37 +566,36 @@ RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::RESTRICT_ON_SEND = T.let(T # ``` # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#29 -class RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral < ::RuboCop::Cop::Cop - # @return [ForbidIncludeConstLiteral] a new instance of ForbidIncludeConstLiteral - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#41 - def initialize(*_arg0); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#60 - def autocorrect(node); end +class RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#35 - def not_lit_const_include?(param0 = T.unsafe(nil)); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#36 + def dynamic_inclusion?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#46 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#40 def on_send(node); end - # Returns the value of attribute used_names. + private + + # @return [Boolean] # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#32 - def used_names; end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#52 + def neither_const_nor_self?(node); end - # Sets the attribute used_names + # Returns true if the node is within a module declaration that is not anonymous. # - # @param value the value to set the attribute used_names to. + # @return [Boolean] # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#32 - def used_names=(_arg0); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#57 + def within_onymous_module?(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#30 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#32 RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), String) +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#33 +RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Makes sure that RBI files are always located under the defined allowed paths. # # Options: @@ -595,6 +656,165 @@ end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#29 RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String) +# Disallow using `T::Struct` and `T::Props`. +# +# @example +# +# # bad +# class MyStruct < T::Struct +# const :foo, String +# prop :bar, Integer, default: 0 +# +# def some_method; end +# end +# +# # good +# class MyStruct +# extend T::Sig +# +# sig { returns(String) } +# attr_reader :foo +# +# sig { returns(Integer) } +# attr_accessor :bar +# +# sig { params(foo: String, bar: Integer) } +# def initialize(foo:, bar: 0) +# @foo = foo +# @bar = bar +# end +# +# def some_method; end +# end +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#38 +class RuboCop::Cop::Sorbet::ForbidTStruct < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#169 + def on_class(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#210 + def on_send(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#167 + def t_props?(param0 = T.unsafe(nil)); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#162 + def t_struct?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#218 + def initialize_method(indent, props); end + + # @return [Boolean] + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#258 + def previous_line_blank?(node); end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#47 +RuboCop::Cop::Sorbet::ForbidTStruct::MSG_PROPS = T.let(T.unsafe(nil), String) + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#46 +RuboCop::Cop::Sorbet::ForbidTStruct::MSG_STRUCT = T.let(T.unsafe(nil), String) + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#104 +class RuboCop::Cop::Sorbet::ForbidTStruct::Property + # @return [Property] a new instance of Property + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#107 + def initialize(node, kind, name, type, default:, factory:); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#123 + def attr_accessor; end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#119 + def attr_sig; end + + # Returns the value of attribute default. + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105 + def default; end + + # Returns the value of attribute factory. + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105 + def factory; end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#144 + def initialize_assign; end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#131 + def initialize_param; end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#127 + def initialize_sig_param; end + + # Returns the value of attribute kind. + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105 + def kind; end + + # Returns the value of attribute name. + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105 + def name; end + + # @return [Boolean] + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#151 + def nilable?; end + + # Returns the value of attribute node. + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105 + def node; end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#155 + def type; end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#44 +RuboCop::Cop::Sorbet::ForbidTStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# This class walks down the class body of a T::Struct and collects all the properties that will need to be +# translated into `attr_reader` and `attr_accessor` methods. +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#51 +class RuboCop::Cop::Sorbet::ForbidTStruct::TStructWalker + include ::RuboCop::AST::Traversal + extend ::RuboCop::AST::NodePattern::Macros + + # @return [TStructWalker] a new instance of TStructWalker + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#57 + def initialize; end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#63 + def extend_t_sig?(param0 = T.unsafe(nil)); end + + # Returns the value of attribute has_extend_t_sig. + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#55 + def has_extend_t_sig; end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#72 + def on_send(node); end + + # Returns the value of attribute props. + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#55 + def props; end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#68 + def t_struct_prop?(param0 = T.unsafe(nil)); end +end + # Disallows using `T.unsafe` anywhere. # # @example @@ -647,6 +867,38 @@ RuboCop::Cop::Sorbet::ForbidTUntyped::MSG = T.let(T.unsafe(nil), String) # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#22 RuboCop::Cop::Sorbet::ForbidTUntyped::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Disallows defining type aliases that contain shapes +# +# @example +# +# # bad +# Foo = T.type_alias { { foo: Integer } } +# +# # good +# class Foo +# extend T::Sig +# +# sig { params(foo: Integer).void } +# def initialize(foo) +# @foo = foo +# end +# end +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb#24 +class RuboCop::Cop::Sorbet::ForbidTypeAliasedShapes < ::RuboCop::Cop::Base + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb#36 + def on_block(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb#36 + def on_numblock(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb#28 + def shape_type_alias?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb#25 +RuboCop::Cop::Sorbet::ForbidTypeAliasedShapes::MSG = T.let(T.unsafe(nil), String) + # Disallows use of `T.untyped` or `T.nilable(T.untyped)` # as a prop type for `T::Struct` or `T::ImmutableStruct`. # @@ -777,14 +1029,16 @@ RuboCop::Cop::Sorbet::ImplicitConversionMethod::RESTRICT_ON_SEND = T.let(T.unsaf # sig { params(b: String, a: Integer).void } # def foo(b:, a: 1); end # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#23 -class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Sorbet::SignatureCop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#24 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#20 +class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Cop + include ::RuboCop::Cop::Sorbet::SignatureHelp + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#23 def on_signature(node); end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#35 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#34 def check_order_for_kwoptargs(parameters); end end @@ -920,40 +1174,63 @@ RuboCop::Cop::Sorbet::OneAncestorPerLine::MSG = T.let(T.unsafe(nil), String) # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#28 class RuboCop::Cop::Sorbet::RedundantExtendTSig < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#35 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#36 def extend_t_sig?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#39 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#40 def on_send(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#31 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#32 RuboCop::Cop::Sorbet::RedundantExtendTSig::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#32 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#33 RuboCop::Cop::Sorbet::RedundantExtendTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#15 -class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Sorbet::SignatureCop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#59 +# Checks for the correct order of sig builder methods: +# - abstract, override, or overridable +# - type_parameters +# - params +# - returns, or void +# - soft, checked, or on_failure +# +# @example +# # bad +# sig { void.abstract } +# +# # good +# sig { abstract.void } +# +# # bad +# sig { returns(Integer).params(x: Integer) } +# +# # good +# sig { params(x: Integer).returns(Integer) } +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#31 +class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Cop + include ::RuboCop::Cop::Sorbet::SignatureHelp + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#77 def autocorrect(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#35 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#53 def on_signature(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#31 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#49 def root_call(param0); end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#101 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#119 def call_chain(sig_child_node); end # @return [Boolean] # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#97 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#115 def can_autocorrect?; end # This method exists to reparse the current node with modern features enabled. @@ -961,40 +1238,40 @@ class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Sorbet::Signat # "index sends" (i.e. `[]` calls) back to index accessors (i.e. as `foo[bar]``). # Otherwise, we would get the unparsed node as `foo.[](bar)`. # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#88 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#106 def node_reparsed_with_modern_features(node); end end # Create a subclass of AST Builder that has modern features turned on # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#77 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#95 class RuboCop::Cop::Sorbet::SignatureBuildOrder::ModernBuilder < ::RuboCop::AST::Builder; end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#16 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#34 RuboCop::Cop::Sorbet::SignatureBuildOrder::ORDER = T.let(T.unsafe(nil), Hash) -# Abstract cop specific to Sorbet signatures +# Mixin for writing cops for signatures, providing a `signature?` node matcher and an `on_signature` trigger. # -# You can subclass it to use the `on_signature` trigger and the `signature?` node matcher. -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#11 -class RuboCop::Cop::Sorbet::SignatureCop < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#33 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#7 +module RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#29 def on_block(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#33 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#29 def on_numblock(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#39 - def on_signature(_); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#35 + def on_signature(_node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#15 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#11 def signature?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#24 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#20 def with_runtime?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#29 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#25 def without_runtime?(param0 = T.unsafe(nil)); end end @@ -1051,13 +1328,18 @@ module RuboCop::Cop::Sorbet::TargetSorbetVersion # @return [Boolean] # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#24 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#28 def enabled_for_sorbet_static_version?; end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#40 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#44 def read_sorbet_static_version_from_bundler_lock_file; end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#31 + # @return [Boolean] + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#24 + def sorbet_enabled?; end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#35 def target_sorbet_static_version_from_bundler_lock_file; end class << self @@ -1070,7 +1352,7 @@ end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#13 module RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods - # The version of the Sorbet static type checker required by this cop + # Sets the version of the Sorbet static type checker required by this cop # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#15 def minimum_target_sorbet_static_version(version); end @@ -1078,7 +1360,7 @@ module RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods # @return [Boolean] # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#19 - def support_target_sorbet_static_version?(version); end + def supports_target_sorbet_static_version?(version); end end # Makes the Sorbet `true` sigil mandatory in all files. @@ -1190,6 +1472,53 @@ RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#53 RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) +# Disallows the usage of `.void.checked(:tests)`. +# +# Using `.void` changes the value returned from the method, but only if +# runtime type checking is enabled for the method. Methods marked `.void` +# will return different values in tests compared with non-test +# environments. This is particularly troublesome if branching on the +# result of a `.void` method, because the returned value in test code +# will be the truthy `VOID` value, while the non-test return value may be +# falsy depending on the method's implementation. +# +# - Use `.returns(T.anything).checked(:tests)` to keep the runtime type +# checking for the rest of the parameters. +# - Use `.void.checked(:never)` if you are on an older version of Sorbet +# which does not have `T.anything` (meaning versions 0.5.10781 or +# earlier. Versions released after 2023-04-14 include `T.anything`.) +# +# @example +# +# # bad +# sig { void.checked(:tests) } +# +# # good +# sig { void } +# sig { returns(T.anything).checked(:tests) } +# sig { void.checked(:never) } +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb#31 +class RuboCop::Cop::Sorbet::VoidCheckedTests < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb#37 + def checked_tests(param0); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb#58 + def on_signature(node); end + + private + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb#48 + def top_level_void(node); end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb#41 +RuboCop::Cop::Sorbet::VoidCheckedTests::MESSAGE = T.let(T.unsafe(nil), String) + module RuboCop::Cop::Style; end class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base diff --git a/sorbet/rbi/gems/rubocop@1.56.1.rbi b/sorbet/rbi/gems/rubocop@1.62.1.rbi similarity index 95% rename from sorbet/rbi/gems/rubocop@1.56.1.rbi rename to sorbet/rbi/gems/rubocop@1.62.1.rbi index fad5ce0fc..cf57332c4 100644 --- a/sorbet/rbi/gems/rubocop@1.56.1.rbi +++ b/sorbet/rbi/gems/rubocop@1.62.1.rbi @@ -100,15 +100,18 @@ class RuboCop::CLI # source://rubocop//lib/rubocop/cli.rb#152 def act_on_options; end - # source://rubocop//lib/rubocop/cli.rb#189 + # source://rubocop//lib/rubocop/cli.rb#194 def apply_default_formatter; end # source://rubocop//lib/rubocop/cli.rb#121 def execute_runners; end + # source://rubocop//lib/rubocop/cli.rb#178 + def handle_editor_mode; end + # @raise [Finished] # - # source://rubocop//lib/rubocop/cli.rb#178 + # source://rubocop//lib/rubocop/cli.rb#183 def handle_exiting_options; end # source://rubocop//lib/rubocop/cli.rb#140 @@ -123,7 +126,7 @@ class RuboCop::CLI # source://rubocop//lib/rubocop/cli.rb#117 def run_command(name); end - # source://rubocop//lib/rubocop/cli.rb#169 + # source://rubocop//lib/rubocop/cli.rb#170 def set_options_to_config_loader; end # source://rubocop//lib/rubocop/cli.rb#129 @@ -166,77 +169,83 @@ end class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#21 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#25 def run; end private # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#97 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#107 def add_formatter; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#105 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#115 def add_inheritance_from_auto_generated_file(config_file); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#101 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#111 def execute_runner; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#126 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#136 def existing_configuration(config_file); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#59 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#65 def line_length_cop(config); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#47 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#53 def line_length_enabled?(config); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#55 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#61 def max_line_length(config); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#30 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#34 def maybe_run_line_length_cop; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#148 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#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#63 + # 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#139 + # 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#90 + # 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#81 + # 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 +254,23 @@ class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base # # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#70 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#80 def run_line_length_cop; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#51 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#57 def same_max_line_length?(config1, config2); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#42 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#48 def skip_line_length_cop(reason); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#132 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#142 def write_config_file(file_name, file_string, rubocop_yml_contents); end end @@ -272,29 +281,39 @@ RuboCop::CLI::Command::AutoGenerateConfig::AUTO_GENERATED_FILE = T.let(T.unsafe( # @api private # -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#14 +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#15 RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1 = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#18 +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#19 RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_DISABLED = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#17 +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#18 RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_OVERRIDDEN = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#19 -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#20 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_COPS = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#15 +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#22 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_EXCLUDE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#16 RuboCop::CLI::Command::AutoGenerateConfig::PHASE_2 = T.let(T.unsafe(nil), String) +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#13 +RuboCop::CLI::Command::AutoGenerateConfig::PLACEHOLDER = T.let(T.unsafe(nil), String) + # @api private # # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#12 @@ -421,7 +440,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 @@ -941,7 +960,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 @@ -949,7 +968,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 @@ -960,15 +979,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 @@ -977,25 +996,25 @@ class RuboCop::Config # config/default.yml, for example, are not relative to RuboCop's config # directory since that wouldn't work. # - # source://rubocop//lib/rubocop/config.rb#239 + # source://rubocop//lib/rubocop/config.rb#237 def base_dir_for_path_parameters; end - # source://rubocop//lib/rubocop/config.rb#264 + # source://rubocop//lib/rubocop/config.rb#266 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 @@ -1003,7 +1022,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 @@ -1014,7 +1033,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 @@ -1022,22 +1041,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 @@ -1045,7 +1064,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 @@ -1053,17 +1072,17 @@ 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 + # source://rubocop//lib/rubocop/config.rb#289 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 @@ -1072,15 +1091,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 @@ -1089,16 +1108,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#277 def pending_cops; end # Returns true if there's a chance that an Include pattern matches hidden @@ -1106,19 +1128,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 @@ -1130,7 +1152,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 @@ -1139,32 +1161,32 @@ 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#324 def department_of(qualified_cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#310 + # source://rubocop//lib/rubocop/config.rb#312 def enable_cop?(qualified_cop_name, cop_options); end - # source://rubocop//lib/rubocop/config.rb#297 + # source://rubocop//lib/rubocop/config.rb#299 def read_rails_version_from_bundler_lock_file; end - # source://rubocop//lib/rubocop/config.rb#293 + # source://rubocop//lib/rubocop/config.rb#295 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 # @@ -1197,7 +1219,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. @@ -1231,7 +1253,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 @@ -1247,11 +1269,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 @@ -1282,12 +1309,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 @@ -1295,13 +1322,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 @@ -1310,128 +1337,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 @@ -1439,48 +1466,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. @@ -1633,7 +1660,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. @@ -1645,23 +1672,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 @@ -1670,7 +1697,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 @@ -1679,7 +1706,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 @@ -1687,28 +1714,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 @@ -1861,6 +1888,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 @@ -2197,13 +2229,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 @@ -2212,10 +2244,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 @@ -2224,100 +2256,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 @@ -2738,34 +2773,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#111 + # 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#115 + # 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#107 + # 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#97 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#104 def range_by_lines(range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#88 + # 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,7 +2918,7 @@ class RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#239 + # source://rubocop//lib/rubocop/cop/base.rb#243 def active_support_extensions_enabled?; end # Adds an offense that has no particular location. @@ -2900,16 +2935,22 @@ class RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/base.rb#172 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#313 + 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#299 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#284 def callbacks_needed; end # Returns the value of attribute config. @@ -2923,6 +2964,12 @@ class RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/base.rb#227 def config_to_allow_offenses=(hash); end + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#319 + def contextual_autocorrect?; end + # Configuration Helpers # # source://rubocop//lib/rubocop/cop/base.rb#217 @@ -2933,7 +2980,7 @@ class RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#251 + # source://rubocop//lib/rubocop/cop/base.rb#255 def excluded_file?(file); end # This method should be overridden when a cop's behavior depends @@ -2955,7 +3002,7 @@ class RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/base.rb#205 def external_dependency_checksum; end - # source://rubocop//lib/rubocop/cop/base.rb#308 + # source://rubocop//lib/rubocop/cop/base.rb#323 def inspect; end # Gets called if no message is specified when calling `add_offense` or @@ -2970,7 +3017,7 @@ class RuboCop::Cop::Base # @deprecated Make potential errors with previous API more obvious # - # source://rubocop//lib/rubocop/cop/base.rb#271 + # source://rubocop//lib/rubocop/cop/base.rb#275 def offenses; end # Called after all on_... have been called @@ -2993,9 +3040,12 @@ class RuboCop::Cop::Base # 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#260 def parse(source, path = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/base.rb#235 + def parser_engine; end + # Returns the value of attribute processed_source. # # source://rubocop//lib/rubocop/cop/base.rb#43 @@ -3005,15 +3055,15 @@ class RuboCop::Cop::Base # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#262 + # source://rubocop//lib/rubocop/cop/base.rb#266 def ready; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#243 + # source://rubocop//lib/rubocop/cop/base.rb#247 def relevant_file?(file); end - # source://rubocop//lib/rubocop/cop/base.rb#235 + # source://rubocop//lib/rubocop/cop/base.rb#239 def target_rails_version; end # source://rubocop//lib/rubocop/cop/base.rb#231 @@ -3021,83 +3071,83 @@ class RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/base.rb#436 + # source://rubocop//lib/rubocop/cop/base.rb#451 def annotate(message); end - # source://rubocop//lib/rubocop/cop/base.rb#320 + # source://rubocop//lib/rubocop/cop/base.rb#335 def apply_correction(corrector); end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#400 + # source://rubocop//lib/rubocop/cop/base.rb#415 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#331 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#364 def complete_investigation; end # @return [Symbol, Corrector] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#374 + # source://rubocop//lib/rubocop/cop/base.rb#389 def correct(range); end - # source://rubocop//lib/rubocop/cop/base.rb#334 + # source://rubocop//lib/rubocop/cop/base.rb#349 def current_corrector; end # Reserved for Commissioner: # - # source://rubocop//lib/rubocop/cop/base.rb#326 + # source://rubocop//lib/rubocop/cop/base.rb#341 def current_offense_locations; end - # source://rubocop//lib/rubocop/cop/base.rb#338 + # source://rubocop//lib/rubocop/cop/base.rb#353 def current_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#330 + # source://rubocop//lib/rubocop/cop/base.rb#345 def currently_disabled_lines; end - # source://rubocop//lib/rubocop/cop/base.rb#464 + # source://rubocop//lib/rubocop/cop/base.rb#479 def custom_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#460 + # source://rubocop//lib/rubocop/cop/base.rb#475 def default_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#414 + # source://rubocop//lib/rubocop/cop/base.rb#429 def disable_uncorrectable(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#450 + # source://rubocop//lib/rubocop/cop/base.rb#465 def enabled_line?(line_number); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#442 + # source://rubocop//lib/rubocop/cop/base.rb#457 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#447 def find_message(range, message); end - # source://rubocop//lib/rubocop/cop/base.rb#456 + # source://rubocop//lib/rubocop/cop/base.rb#471 def find_severity(_range, severity); end - # source://rubocop//lib/rubocop/cop/base.rb#477 + # source://rubocop//lib/rubocop/cop/base.rb#492 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/base.rb#421 + # source://rubocop//lib/rubocop/cop/base.rb#436 def range_from_node_or_range(node_or_range); end - # source://rubocop//lib/rubocop/cop/base.rb#369 + # source://rubocop//lib/rubocop/cop/base.rb#384 def reset_investigation; end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#389 + # source://rubocop//lib/rubocop/cop/base.rb#404 def use_corrector(range, corrector); end class << self @@ -3117,7 +3167,7 @@ class RuboCop::Cop::Base # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#285 + # source://rubocop//lib/rubocop/cop/base.rb#289 def callbacks_needed; end # source://rubocop//lib/rubocop/cop/base.rb#93 @@ -3187,15 +3237,15 @@ class RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#360 + # source://rubocop//lib/rubocop/cop/base.rb#375 def builtin?; end - # source://rubocop//lib/rubocop/cop/base.rb#342 + # source://rubocop//lib/rubocop/cop/base.rb#357 def restrict_on_send; end end end -# source://rubocop//lib/rubocop/cop/base.rb#346 +# source://rubocop//lib/rubocop/cop/base.rb#361 RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) # Reports of an investigation. @@ -4741,7 +4791,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 @@ -4749,7 +4799,7 @@ module RuboCop::Cop::ConfigurableFormatting # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#23 + # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#24 def valid_name?(node, name, given_style = T.unsafe(nil)); end end @@ -4989,7 +5039,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter # Legacy # - # source://parser/3.2.2.3/lib/parser/source/tree_rewriter.rb#252 + # source://parser/3.3.0.5/lib/parser/source/tree_rewriter.rb#252 def rewrite; end # Swaps sources at the given ranges. @@ -5221,9 +5271,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 @@ -5379,45 +5426,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 @@ -6090,7 +6131,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 @@ -6100,13 +6141,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 @@ -6523,61 +6564,61 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#122 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#125 def brackets?(method_dispatch_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#152 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#155 def breakdown_value_types_of_hash(hash_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#99 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#102 def def_node_that_require_parentheses(node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#176 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#179 def each_omittable_value_pair(hash_value_type_breakdown, &block); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#172 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#175 def each_omitted_value_pair(hash_value_type_breakdown, &block); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#77 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#80 def enforced_shorthand_syntax; end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#114 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#117 def find_ancestor_method_dispatch_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#164 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#167 def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#168 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#171 def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#71 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#74 def ignore_hash_shorthand_syntax?(pair_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#66 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#69 def ignore_mixed_hash_shorthand_syntax?(hash_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#137 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#140 def last_expression?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#145 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#148 def method_dispatch_as_argument?(method_dispatch_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#180 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#183 def mixed_shorthand_syntax_check(hash_value_type_breakdown); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#196 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#199 def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#49 @@ -6585,22 +6626,22 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#81 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#84 def require_hash_value?(hash_key_source, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#90 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#93 def require_hash_value_for_around_hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#126 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#129 def use_element_of_hash_literal_as_receiver?(ancestor, parent); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#131 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#134 def use_modifier_form_without_parenthesized_method_call?(ancestor); end end @@ -6613,12 +6654,12 @@ RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_MSG_PREFIX = T.let(T.unsafe(nil), # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#11 RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_OMIT_VALUE_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#206 +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#209 class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#215 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#218 def first_argument; end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#219 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#222 def last_argument; end # Returns the value of attribute node @@ -6632,7 +6673,7 @@ class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct # @return [Object] the newly set value def node=(_); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#207 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#210 def selector; end class << self @@ -8490,11 +8531,6 @@ class RuboCop::Cop::Layout::DotPosition < ::RuboCop::Cop::Base private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#137 - def ampersand_dot?(node); end - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#49 def autocorrect(corrector, dot, node); end @@ -8717,7 +8753,23 @@ end # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#67 RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String) -# Enforces empty line after guard clause +# Enforces empty line after guard clause. +# +# This cop allows `# :nocov:` directive after guard clause because +# SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`: +# +# [source,ruby] +# ---- +# def foo +# # :nocov: +# return if condition +# # :nocov: +# bar +# end +# ---- +# +# Refer to SimpleCov's documentation for more details: +# https://github.com/simplecov-ruby/simplecov#ignoringskipping-code # # @example # @@ -8750,90 +8802,106 @@ RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String) # end # end # -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#38 +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#54 class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::PathUtil extend ::RuboCop::Cop::Util - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#46 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#63 def on_if(node); end private - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#65 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#84 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#87 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#106 def contains_guard_clause?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#80 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#99 def correct_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#160 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#181 def heredoc?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#153 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#174 def heredoc_line(node, heredoc_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#129 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#148 def last_heredoc_argument(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#143 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#162 def last_heredoc_argument_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#172 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#199 def multiple_statements_on_line?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#98 - def next_line_empty?(line); end + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#121 + def next_line_allowed_directive_comment?(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#91 - def next_line_empty_or_enable_directive_comment?(line); end + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#117 + def next_line_empty?(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#102 - def next_line_enable_directive_comment?(line); end + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#110 + def next_line_empty_or_allowed_directive_comment?(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#108 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#127 def next_line_rescue_or_ensure?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#122 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#141 def next_sibling_empty_or_guard_clause?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#113 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#132 def next_sibling_parent_empty_or_else?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#164 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#191 def offense_location(node); end + + # SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`: + # https://github.com/simplecov-ruby/simplecov#ignoringskipping-code + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#208 + def simplecov_directive_comment?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#185 + def use_heredoc_in_condition?(condition); end end -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#44 +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#60 RuboCop::Cop::Layout::EmptyLineAfterGuardClause::END_OF_HEREDOC_LINE = T.let(T.unsafe(nil), Integer) -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#43 +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#59 RuboCop::Cop::Layout::EmptyLineAfterGuardClause::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#61 +RuboCop::Cop::Layout::EmptyLineAfterGuardClause::SIMPLE_DIRECTIVE_COMMENT_PATTERN = T.let(T.unsafe(nil), Regexp) + # Checks for a newline after the final magic comment. # # @example @@ -8862,15 +8930,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 @@ -10003,7 +10075,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 @@ -10054,7 +10128,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 @@ -10062,54 +10136,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#172 + # 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#190 + # 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 @@ -10212,13 +10286,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 @@ -10226,46 +10300,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 @@ -10498,7 +10572,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 @@ -10518,7 +10595,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 # ] @@ -10526,7 +10603,7 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # :no_difference # ]) # -# #good +# # good # array = [ # :value # ] @@ -10539,7 +10616,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 @@ -10548,7 +10625,7 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # :its_like_this # ]) # -# #good +# # good # array = [ # :value # ] @@ -10559,61 +10636,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#98 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#95 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#98 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#104 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#189 + def array_alignment_config; end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#109 def autocorrect(corrector, node); end # Returns the description of what the correct indentation is based on. # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#142 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#147 def base_description(indent_base_type); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#108 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#113 def brace_alignment_style; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#112 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#117 def check(array_node, left_parenthesis); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#126 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#131 def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#155 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#183 + def enforce_first_argument_with_fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#160 def message(base_description); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#163 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#168 def message_for_right_bracket(indent_base_type); end end -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#88 +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 RuboCop::Cop::Layout::FirstArrayElementIndentation::MSG = T.let(T.unsafe(nil), String) # Checks for a line break before the first element in a @@ -11614,7 +11699,7 @@ RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis::MSG = T.let(T.unsafe(ni # # Note: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default), # this cop does not add any offenses for long here documents to -# avoid `Layout/LineLength`'s offenses. +# avoid ``Layout/LineLength``'s offenses. # # @example # # bad @@ -11632,71 +11717,72 @@ class RuboCop::Cop::Layout::HeredocIndentation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::Heredoc extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#33 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#36 def on_heredoc(node); end private - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#117 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#120 def adjust_minus(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#112 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#115 def adjust_squiggly(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#141 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#144 def base_indent_level(node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#152 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#155 def heredoc_body(node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#156 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#159 def heredoc_end(node); end # Returns '~', '-' or nil # - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#148 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#151 def heredoc_indent_type(node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#123 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#126 def indented_body(node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#130 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#133 def indented_end(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#88 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#91 def line_too_long?(node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#100 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#103 def longest_line(lines); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#108 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#111 def max_line_length; end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#66 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#69 def message(heredoc_indent_type); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#54 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#57 def register_offense(node, heredoc_indent_type); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#76 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#79 def type_message(indentation_width, current_indent_type); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#104 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#107 def unlimited_heredoc_length?; end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#84 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#87 def width_message(indentation_width); end end -# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#29 +# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#32 RuboCop::Cop::Layout::HeredocIndentation::TYPE_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#31 +# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#34 RuboCop::Cop::Layout::HeredocIndentation::WIDTH_MSG = T.let(T.unsafe(nil), String) # Checks for inconsistent indentation. @@ -12356,35 +12442,38 @@ class RuboCop::Cop::Layout::LineContinuationLeadingSpace < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#105 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#113 def autocorrect(corrector, offense_range, insert_pos, spaces); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#101 - def continuation?(line); end + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#106 + def continuation?(line, line_num, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#130 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#138 def enforced_style_leading?; end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#79 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#76 + def investigate(first_line, second_line, end_of_first_line); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#84 def investigate_leading_style(first_line, second_line, end_of_first_line); end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#90 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#95 def investigate_trailing_style(first_line, second_line, end_of_first_line); end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#110 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#118 def leading_offense_range(end_of_first_line, matches); end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#122 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#130 def message(_range); end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#75 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#72 def raw_lines(node); end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#116 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#124 def trailing_offense_range(end_of_first_line, matches); end end @@ -13550,10 +13639,13 @@ class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Bas # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#101 def extra_indentation(given_style, parent); end - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#222 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#226 + def find_multiline_block_chain_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#237 def first_call_has_a_dot(node); end - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#213 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#217 def get_dot_right_above(node); end # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#113 @@ -13567,12 +13659,12 @@ class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Bas # @yield [operation_rhs.first_argument] # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#232 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#247 def operation_rhs(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#242 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#257 def operator_rhs?(node, receiver); end # a @@ -14031,6 +14123,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 @@ -14039,61 +14134,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 @@ -14228,21 +14333,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 @@ -14849,149 +14962,166 @@ RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::SPACES_REGEXP = T.let(T.uns # # # good # a ** b +# @example EnforcedStyleForRationalLiterals: no_space (default) +# # bad +# 1 / 48r # -# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#53 +# # good +# 1/48r +# @example EnforcedStyleForRationalLiterals: space +# # bad +# 1/48r +# +# # good +# 1 / 48r +# +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#67 class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base include ::RuboCop::Cop::PrecedingFollowingAlignment include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::RationalLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 def on_and(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_and_asgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_assignment(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 def on_binary(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#111 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#125 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 def on_class(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_cvasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_gvasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#78 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#92 def on_if(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_ivasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_masgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#135 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#149 def on_match_pattern(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#127 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#141 def on_op_asgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 def on_or(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_or_asgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#70 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#84 def on_pair(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#85 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#99 def on_resbody(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#66 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#80 def on_sclass(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#93 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#107 def on_send(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#127 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#141 def on_special_asgn(node); end private - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#238 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#256 def align_hash_cop_config; end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#181 - def autocorrect(corrector, range); end + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#195 + def autocorrect(corrector, range, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#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#209 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#236 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#251 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#274 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#260 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#190 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#222 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#278 + 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#264 def space_around_exponent_operator?; end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#268 + def space_around_slash_operator?(right_operand); end + class << self - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#62 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#76 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#60 +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#74 RuboCop::Cop::Layout::SpaceAroundOperators::EXCESSIVE_SPACE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#59 +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#73 RuboCop::Cop::Layout::SpaceAroundOperators::IRREGULAR_METHODS = T.let(T.unsafe(nil), Array) # Checks that block braces have or don't have a space before the opening @@ -15044,35 +15174,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 @@ -16766,22 +16899,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 # @@ -16863,10 +16996,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 @@ -17089,7 +17222,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`. @@ -17269,31 +17402,39 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/lint/debugger.rb#67 class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#70 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#71 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#95 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#117 + def assumed_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#96 def assumed_usage_context?(node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#102 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#106 def chained_method_name(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#89 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 def debugger_method?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#82 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#83 def debugger_methods; end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#79 def message(node); end end +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#69 +RuboCop::Cop::Lint::Debugger::BLOCK_TYPES = T.let(T.unsafe(nil), Array) + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#68 RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) @@ -18293,7 +18434,7 @@ RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String) # Checks for blocks without a body. # Such empty blocks are typically an oversight or we should provide a comment -# be clearer what we're aiming for. +# to clarify what we're aiming for. # # Empty lambdas and procs are ignored by default. # @@ -18998,13 +19139,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 @@ -19016,38 +19153,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 @@ -19241,6 +19391,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 @@ -19687,6 +19840,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: # @@ -19821,6 +20011,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 @@ -20508,22 +20762,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 @@ -20615,89 +20863,91 @@ RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#44 class RuboCop::Cop::Lint::NonAtomicFileOperation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#75 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#76 def explicit_not_force?(param0); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#70 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#71 def force?(param0); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#79 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#80 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#65 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#66 def receiver_and_method_name(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#60 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#61 def send_exist_node(param0); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#96 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#97 def allowable_use_with_if?(if_node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#120 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#121 def autocorrect(corrector, node, range); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#131 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#132 def autocorrect_replace_method(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#148 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#151 def force_method?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#156 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#159 def force_method_name?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#152 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#155 def force_option?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#90 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#91 def if_node_child?(node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#111 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#112 def message_change_force_method(node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#115 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#116 def message_remove_file_exist_check(node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#100 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#101 def register_offense(node, exist_node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#138 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#139 def replacement_method(node); end end -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#51 +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#50 RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_FORCE_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#52 +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#51 RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#50 +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#49 RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_CHANGE_FORCE_METHOD = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#48 +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#47 RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_REMOVE_FILE_EXIST_CHECK = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#53 +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#54 +RuboCop::Cop::Lint::NonAtomicFileOperation::RECURSIVE_REMOVE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#52 RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_FORCE_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#54 +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#53 RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#56 +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#55 RuboCop::Cop::Lint::NonAtomicFileOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # `Dir[...]` and `Dir.glob(...)` do not make any guarantees about @@ -20754,10 +21004,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 @@ -20769,19 +21019,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 @@ -20801,12 +21051,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 @@ -20881,7 +21131,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. # @@ -20939,7 +21189,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 @@ -20952,43 +21205,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 @@ -21836,48 +22089,53 @@ RuboCop::Cop::Lint::RedundantRegexpQuantifiers::MSG_REDUNDANT_QUANTIFIER = T.let # # good # require 'unloaded_feature' # -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#34 +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#38 class RuboCop::Cop::Lint::RedundantRequireStatement < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#57 + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#61 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#53 + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#57 def pp_const?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#47 + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#51 def redundant_require_statement?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#87 + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#91 def need_to_require_pp?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#76 + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#80 def redundant_feature?(feature_name); end end -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#38 +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#42 RuboCop::Cop::Lint::RedundantRequireStatement::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#41 +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#45 RuboCop::Cop::Lint::RedundantRequireStatement::PRETTY_PRINT_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#39 +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#43 RuboCop::Cop::Lint::RedundantRequireStatement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#40 +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#44 RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T.unsafe(nil), Array) # Checks for redundant safe navigation calls. -# `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`, and `equal?` methods -# are checked by default. These are customizable with `AllowedMethods` option. +# Use cases where a constant, named in camel case for classes and modules is `nil` are rare, +# and an offense is not detected when the receiver is a 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. +# These are customizable with `AllowedMethods` option. # # The `AllowedMethods` option specifies nil-safe methods, # in other words, it is a method that is allowed to skip safe navigation. @@ -21889,6 +22147,9 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # # @example # # bad +# CamelCaseConst&.do_something +# +# # bad # do_something if attrs&.respond_to?(:[]) # # # good @@ -21900,12 +22161,31 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # end # # # good +# CamelCaseConst.do_something +# +# # good # while node.is_a?(BeginNode) # node = node.parent # end # # # good - without `&.` this will always return `true` # foo&.respond_to?(:to_a) +# +# # bad - for `nil`s conversion methods return default values for the type +# foo&.to_h || {} +# foo&.to_h { |k, v| [k, v] } || {} +# foo&.to_a || [] +# foo&.to_i || 0 +# foo&.to_f || 0.0 +# foo&.to_s || '' +# +# # good +# foo.to_h +# foo.to_h { |k, v| [k, v] } +# foo.to_a +# foo.to_i +# foo.to_f +# foo.to_s # @example AllowedMethods: [nil_safe_method] # # bad # do_something if attrs&.nil_safe_method(:[]) @@ -21914,37 +22194,53 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # do_something if attrs.nil_safe_method(:[]) # do_something if attrs&.not_nil_safe_method(:[]) # -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#51 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#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#65 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#95 + def conversion_with_default?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#107 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#61 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#117 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#90 def respond_to_nil_specific_method?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#75 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#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#85 + # 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#56 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#82 RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#58 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#83 +RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_LITERAL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#85 RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsafe(nil), Set) +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#87 +RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + # Checks for unneeded usages of splat expansion # # @example @@ -22175,15 +22471,15 @@ class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#36 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#57 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#67 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#75 def with_index_range(send); end end @@ -22517,13 +22813,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 @@ -22614,20 +22910,25 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base # @param send_node [RuboCop::AST::SendNode] # @return [String] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#63 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#62 def add_safe_navigation_operator(offense_range:, send_node:); end # @param corrector [RuboCop::Cop::Corrector] # @param offense_range [Parser::Source::Range] # @param send_node [RuboCop::AST::SendNode] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#82 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#81 def autocorrect(corrector, offense_range:, send_node:); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#92 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#90 def brackets?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#94 + def require_parentheses?(send_node); end end # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33 @@ -22756,7 +23057,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] # @@ -22780,55 +23081,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 # -# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#19 +# # good (method calls possibly can return different results) +# hash[foo] = hash[foo] +# +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#26 class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#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 @@ -22968,7 +23288,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 @@ -22984,17 +23304,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 @@ -23352,6 +23672,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 @@ -23359,6 +23680,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 @@ -23394,60 +23716,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 @@ -23463,13 +23785,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 @@ -23512,12 +23834,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#83 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#68 def arguments_match?(arguments, def_node); end end @@ -24703,12 +25025,18 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) # scope. # The basic idea for this cop was from the warning of `ruby -cw`: # -# assigned but unused variable - foo +# [source,console] +# ---- +# assigned but unused variable - foo +# ---- # # Currently this cop has advanced logic that detects unreferenced # reassignments and properly handles varied cases such as branch, loop, # rescue, ensure, etc. # +# NOTE: Given the assignment `foo = 1, bar = 2`, removing unused variables +# can lead to a syntax error, so this case is not autocorrected. +# # @example # # # bad @@ -24726,70 +25054,83 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) # do_something(some_var) # end # -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#39 +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56 def after_leaving_scope(scope, _variable_table); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#135 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#162 def autocorrect(corrector, assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#54 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103 + def chained_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#61 def check_for_unused_assignments(variable); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#119 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#146 def collect_variable_like_names(scope); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#74 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#79 def message_for_useless_assignment(assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#80 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#107 def message_specification(assignment, variable); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#90 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#117 def multiple_assignment_message(variable_name); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#95 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#85 + def offense_range(assignment); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#122 def operator_assignment_message(scope, assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#152 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#179 def remove_exception_assignment_part(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#176 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#203 def remove_local_variable_assignment_part(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#165 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#192 def remove_trailing_character_from_operator(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#161 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#188 def rename_variable_with_underscore(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#169 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#196 def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end # TODO: More precise handling (rescue, ensure, nested begin, etc.) # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#109 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#136 def return_value_node_of_scope(scope); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#102 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#93 + def sequential_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129 def similar_name_message(variable); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#128 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#155 def variable_like_method_invocation?(node); end class << self - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#46 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#52 def joining_forces; end end end -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#44 +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50 RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) # Checks for useless `else` in `begin..end` without `rescue`. @@ -25132,7 +25473,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 @@ -25200,6 +25541,16 @@ RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for operators, variables, literals, lambda, proc and nonmutating # methods used in void context. # +# `each` blocks are allowed to prevent false positives. +# For example, the expression inside the `each` block below. +# It's not void, especially when the receiver is an `Enumerator`: +# +# [source,ruby] +# ---- +# enumerator = [1, 2, 3].filter +# enumerator.each { |item| item >= 2 } #=> [2, 3] +# ---- +# # @example CheckForMethodsWithNoSideEffects: false (default) # # bad # def some_method @@ -25234,101 +25585,109 @@ RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # do_something(some_array) # end # -# source://rubocop//lib/rubocop/cop/lint/void.rb#43 +# source://rubocop//lib/rubocop/cop/lint/void.rb#53 class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/void.rb#80 + # source://rubocop//lib/rubocop/cop/lint/void.rb#92 def on_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#71 + # source://rubocop//lib/rubocop/cop/lint/void.rb#82 def on_block(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#80 + # source://rubocop//lib/rubocop/cop/lint/void.rb#92 def on_kwbegin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#71 + # source://rubocop//lib/rubocop/cop/lint/void.rb#82 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/lint/void.rb#194 + # source://rubocop//lib/rubocop/cop/lint/void.rb#217 def autocorrect_nonmutating_send(corrector, node, suggestion); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#190 + # source://rubocop//lib/rubocop/cop/lint/void.rb#213 def autocorrect_void_expression(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#178 + # source://rubocop//lib/rubocop/cop/lint/void.rb#201 def autocorrect_void_op(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#87 + # source://rubocop//lib/rubocop/cop/lint/void.rb#99 def check_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#93 + # source://rubocop//lib/rubocop/cop/lint/void.rb#113 def check_expression(expr); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#128 + # source://rubocop//lib/rubocop/cop/lint/void.rb#151 def check_literal(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#152 + # source://rubocop//lib/rubocop/cop/lint/void.rb#175 def check_nonmutating(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#136 + # source://rubocop//lib/rubocop/cop/lint/void.rb#159 def check_self(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#113 + # source://rubocop//lib/rubocop/cop/lint/void.rb#133 def check_var(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#144 + # source://rubocop//lib/rubocop/cop/lint/void.rb#167 def check_void_expression(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#104 - def check_void_op(node); end + # source://rubocop//lib/rubocop/cop/lint/void.rb#123 + def check_void_op(node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#226 + def entirely_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#170 + # source://rubocop//lib/rubocop/cop/lint/void.rb#193 def in_void_context?(node); end end -# source://rubocop//lib/rubocop/cop/lint/void.rb#55 +# source://rubocop//lib/rubocop/cop/lint/void.rb#66 RuboCop::Cop::Lint::Void::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#52 +# source://rubocop//lib/rubocop/cop/lint/void.rb#60 +RuboCop::Cop::Lint::Void::CONST_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#63 RuboCop::Cop::Lint::Void::EXPRESSION_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#50 +# source://rubocop//lib/rubocop/cop/lint/void.rb#61 RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#66 +# source://rubocop//lib/rubocop/cop/lint/void.rb#77 RuboCop::Cop::Lint::Void::METHODS_REPLACEABLE_BY_EACH = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#68 +# source://rubocop//lib/rubocop/cop/lint/void.rb#79 RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#59 +# source://rubocop//lib/rubocop/cop/lint/void.rb#70 RuboCop::Cop::Lint::Void::NONMUTATING_METHODS_WITH_BANG_VERSION = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#53 +# source://rubocop//lib/rubocop/cop/lint/void.rb#64 RuboCop::Cop::Lint::Void::NONMUTATING_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#57 +# source://rubocop//lib/rubocop/cop/lint/void.rb#68 RuboCop::Cop::Lint::Void::OPERATORS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#48 +# source://rubocop//lib/rubocop/cop/lint/void.rb#58 RuboCop::Cop::Lint::Void::OP_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#51 +# source://rubocop//lib/rubocop/cop/lint/void.rb#62 RuboCop::Cop::Lint::Void::SELF_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#56 +# source://rubocop//lib/rubocop/cop/lint/void.rb#67 RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#49 +# source://rubocop//lib/rubocop/cop/lint/void.rb#59 RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#58 +# source://rubocop//lib/rubocop/cop/lint/void.rb#69 RuboCop::Cop::Lint::Void::VOID_CONTEXT_TYPES = T.let(T.unsafe(nil), Array) # Common functionality for obtaining source ranges from regexp matches @@ -25540,9 +25899,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 @@ -25591,13 +25950,12 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct # will be counted as one line regardless of its actual size. # +# NOTE: This cop does not apply for `Struct` definitions. # # NOTE: The `ExcludedMethods` configuration is deprecated and only kept # for backwards compatibility. Please use `AllowedMethods` and `AllowedPatterns` # instead. By default, there are no methods to allowed. # -# NOTE: This cop does not apply for `Struct` definitions. -# # @example CountAsOne: ['array', 'heredoc', 'method_call'] # # something do @@ -25723,18 +26081,18 @@ RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#47 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#52 def on_casgn(node); end # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#42 def on_class(node); end - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#42 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#46 def on_sclass(node); end private - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#65 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#70 def message(length, max_length); end end @@ -26609,18 +26967,21 @@ end # # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#7 module RuboCop::Cop::MultilineExpressionIndentation + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#14 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#14 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#131 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#132 def argument_in_method_call(node, kind); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#187 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#188 def assignment_rhs(node); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#64 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#65 def check(range, node, lhs, rhs); end # The correct indentation of `node` is usually `IndentationWidth`, with @@ -26640,62 +27001,62 @@ module RuboCop::Cop::MultilineExpressionIndentation # bar # normal indentation, not special # ``` # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#54 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#55 def correct_indentation(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#159 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#160 def disqualified_rhs?(candidate, ancestor); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#203 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#204 def grouped_expression?(node); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#72 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#73 def incorrect_style_detected(range, node, lhs, rhs); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#84 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#85 def indentation(node); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#121 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#122 def indented_keyword_expression(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#207 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#208 def inside_arg_list_parentheses?(node, ancestor); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#98 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#99 def keyword_message_tail(node); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#106 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#107 def kw_node_with_special_indentation(node); end - # In a chain of method calls, we regard the top send node as the base + # In a chain of method calls, we regard the top call node as the base # for indentation of all lines following the first. For example: # a. # b c { block }. <-- b is indented relative to a # d <-- d is indented relative to a # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#31 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#32 def left_hand_side(lhs); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#197 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#198 def not_for_this_cop?(node); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#88 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#89 def operation_description(node, rhs); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#145 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#146 def part_of_assignment_rhs(node, candidate); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#183 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#184 def part_of_block_body?(candidate, block_node); end # Returns true if `node` is a conditional whose `body` and `condition` @@ -26703,29 +27064,29 @@ module RuboCop::Cop::MultilineExpressionIndentation # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#216 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#217 def postfix_conditional?(node); end # The []= operator and setters (a.b = c) are parsed as :send nodes. # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#175 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#176 def valid_method_rhs_candidate?(candidate, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#164 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#165 def valid_rhs?(candidate, ancestor); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#179 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#180 def valid_rhs_candidate?(candidate, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#220 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#221 def within_node?(inner, outer); end end @@ -27128,43 +27489,43 @@ class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#55 def on_def(node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#55 def on_defs(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#87 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#95 def anonymous_block_argument?(node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#119 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#127 def block_forwarding_name; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#73 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#81 def expected_block_forwarding_style?(node, last_argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#91 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#99 def explicit_block_argument?(node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#95 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#103 def register_offense(block_argument, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#111 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#119 def use_block_argument_as_local_variable?(node, last_argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#83 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#91 def use_kwarg_in_method_definition?(node); end class << self @@ -27273,7 +27634,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 @@ -27288,7 +27649,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] @@ -27298,7 +27659,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 @@ -29072,7 +29433,7 @@ module RuboCop::Cop::PrecedingFollowingAlignment # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#95 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#93 def aligned_assignment?(range, line); end # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#70 @@ -29080,12 +29441,7 @@ module RuboCop::Cop::PrecedingFollowingAlignment # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#89 - def aligned_dot?(range, line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#107 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#105 def aligned_identical?(range, line); end # @return [Boolean] @@ -29115,10 +29471,10 @@ module RuboCop::Cop::PrecedingFollowingAlignment # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#100 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#98 def aligned_with_append_operator?(range, line); end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#111 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#109 def aligned_with_assignment(token, line_range); end # @return [Boolean] @@ -29152,16 +29508,16 @@ module RuboCop::Cop::PrecedingFollowingAlignment # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#10 def allow_for_alignment?; end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#129 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#127 def assignment_lines; end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#133 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#131 def assignment_tokens; end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#149 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#147 def relevant_assignment_lines(line_range); end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#176 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#174 def remove_optarg_equals(asgn_tokens, processed_source); end end @@ -29792,6 +30148,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 @@ -29801,7 +30158,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 @@ -30612,44 +30968,57 @@ 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`. # -# @example -# # bad -# def foo(*args, &block) -# bar(*args, &block) -# end +# And this cop has `RedundantRestArgumentNames`, `RedundantKeywordRestArgumentNames`, +# and `RedundantBlockArgumentNames` options. This configuration is a list of redundant names +# that are sufficient for anonymizing meaningless naming. # -# # bad -# def foo(*args, **kwargs, &block) -# bar(*args, **kwargs, &block) +# Meaningless names that are commonly used can be anonymized by default: +# e.g., `*args`, `**options`, `&block`, and so on. +# +# Names not on this list are likely to be meaningful and are allowed by default. +# +# @example RedundantBlockArgumentNames: ['blk', 'block', 'proc'] (default) +# # bad - But it is good with `EnforcedStyle: explicit` set for `Naming/BlockForwarding`. +# def foo(&block) +# bar(&block) # end # # # good -# def foo(...) -# bar(...) +# def foo(&) +# bar(&) # 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 @@ -30671,181 +31040,258 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # def foo(**kwargs) # bar(**kwargs) # end +# @example RedundantRestArgumentNames: ['args', 'arguments'] (default) +# # bad +# def foo(*args) +# bar(*args) +# end +# +# # good +# def foo(*) +# bar(*) +# end +# @example RedundantKeywordRestArgumentNames: ['kwargs', 'options', 'opts'] (default) +# # bad +# def foo(**kwargs) +# bar(**kwargs) +# end +# +# # good +# def foo(**) +# bar(**) +# end +# @example +# # bad +# def foo(*args, &block) +# bar(*args, &block) +# end +# +# # bad +# def foo(*args, **kwargs, &block) +# bar(*args, **kwargs, &block) +# end # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#75 +# # good +# def foo(...) +# bar(...) +# end +# +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#125 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#144 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#89 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#144 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#185 def add_forward_all_offenses(node, send_classifications, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#231 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#350 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#212 def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#223 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#342 def allow_only_rest_arguments?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#215 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#334 def arguments_range(node, first_node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#172 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#263 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#248 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#494 + def explicit_block_name?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#168 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#238 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#180 def only_forwards_all?(send_classifications); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#205 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#292 + def outside_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#172 + def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#282 + def redundant_named_arg(arg, config_name, keyword); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#324 def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#189 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#298 def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#197 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#314 + def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#306 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#227 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#346 def use_anonymous_forwarding?; end + + class << self + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#140 + 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#133 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#136 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#138 +RuboCop::Cop::Style::ArgumentsForwarding::BLOCK_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#132 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#135 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#137 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#238 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#357 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#250 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#369 def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#278 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#397 def classification; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#245 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#364 def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#272 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#391 def forwarded_block_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#248 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#367 def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#266 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#385 def forwarded_kwrest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#260 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#379 def forwarded_rest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#242 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#361 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#465 + def additional_kwargs?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#461 + def additional_kwargs_or_forwarded_kwargs?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#475 def allow_offense_for_no_block?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#327 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#446 def any_arg_referenced?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#311 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#430 def arguments; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#290 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#409 def can_forward_all?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#342 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#469 def forward_additional_kwargs?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#307 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#426 def forwarded_rest_and_kwrest_args; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#352 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#488 + def missing_rest_arg_or_kwrest_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#479 def no_additional_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#335 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#454 def no_post_splat_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#303 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#422 def offensive_block_forwarding?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#323 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#442 def referenced_block_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#319 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#438 def referenced_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#315 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#434 def referenced_rest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#299 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#418 def ruby_32_missing_rest_or_kwest?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#331 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#450 def target_ruby_version; end end @@ -30887,6 +31333,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?` @@ -30895,6 +31381,15 @@ RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String) # The `array1.intersect?(array2)` method is faster than # `(array1 & array2).any?` and is more readable. # +# In cases like the following, compatibility is not ensured, +# so it will not be detected when using block argument. +# +# [source,ruby] +# ---- +# ([1] & [1,2]).any? { |x| false } # => false +# [1].intersect?([1,2]) { |x| false } # => true +# ---- +# # @example # # bad # (array1 & array2).any? @@ -30916,46 +31411,46 @@ RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String) # array1.intersect?(array2) # !array1.intersect?(array2) # -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#40 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#49 class RuboCop::Cop::Style::ArrayIntersect < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#56 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#65 def active_support_bad_intersection_check?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#70 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#79 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#47 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#56 def regular_bad_intersection_check?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#86 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#94 def bad_intersection_check?(node); end - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#98 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#106 def message(receiver, argument, method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#94 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#102 def straight?(method_name); end end -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#64 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#73 RuboCop::Cop::Style::ArrayIntersect::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#67 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#76 RuboCop::Cop::Style::ArrayIntersect::NEGATED_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#68 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#77 RuboCop::Cop::Style::ArrayIntersect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#66 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#75 RuboCop::Cop::Style::ArrayIntersect::STRAIGHT_METHODS = T.let(T.unsafe(nil), Array) # Checks for uses of "*" as a substitute for _join_. @@ -31080,28 +31575,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) @@ -31695,27 +32198,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 @@ -32079,9 +32582,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 @@ -32130,53 +32636,53 @@ RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # self.class.eq(other.class) && name.eq(other.name) # end # -# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#47 +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#52 class RuboCop::Cop::Style::ClassEqualityComparison < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#59 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#64 def class_comparison_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#65 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#70 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#87 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#92 def class_name(class_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#107 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#112 def class_name_method?(method_name); end - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#123 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#128 def offense_range(receiver_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#111 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#116 def require_cbase?(class_node); end - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#119 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#124 def trim_string_quotes(class_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#115 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#120 def unable_to_determine_type?(class_node); end end -# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#56 +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#61 RuboCop::Cop::Style::ClassEqualityComparison::CLASS_NAME_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#53 +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#58 RuboCop::Cop::Style::ClassEqualityComparison::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#55 +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#60 RuboCop::Cop::Style::ClassEqualityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for uses of the class/module name instead of @@ -32387,6 +32893,8 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # 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 @@ -32402,49 +32910,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 @@ -32464,6 +32978,7 @@ RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), A # # bad # items.collect # items.collect! +# items.collect_concat # items.inject # items.detect # items.find_all @@ -32472,46 +32987,47 @@ RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), A # # good # items.map # items.map! +# items.flat_map # items.reduce # items.find # items.select # items.include? # -# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#41 +# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#43 class RuboCop::Cop::Style::CollectionMethods < ::RuboCop::Cop::Base include ::RuboCop::Cop::MethodPreference extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#53 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#55 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#61 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#63 def check_method_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#70 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#72 def implicit_block?(node); end - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#78 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#80 def message(node); end # Some enumerable methods accept a bare symbol (ie. _not_ Symbol#to_proc) instead # of a block. # - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#84 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#86 def methods_accepting_symbol; end end -# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#45 +# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47 RuboCop::Cop::Style::CollectionMethods::MSG = T.let(T.unsafe(nil), String) # Checks for methods invoked via the `::` operator instead @@ -32625,40 +33141,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#106 + # 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#102 + # 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. @@ -32936,44 +33454,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. @@ -33062,20 +33580,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 @@ -33089,8 +33610,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 @@ -33431,16 +33952,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 @@ -33665,6 +34186,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 @@ -33673,12 +34197,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 @@ -34421,7 +34945,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 @@ -34578,30 +35102,33 @@ class RuboCop::Cop::Style::EmptyCaseCondition < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#44 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#46 def on_case(case_node); end private - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#58 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#63 def autocorrect(corrector, case_node); end - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#65 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#70 def correct_case_when(corrector, case_node, when_nodes); end - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#77 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#82 def correct_when_conditions(corrector, when_nodes); end - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#92 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#97 def keep_first_when_comment(case_range, corrector); end - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#102 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#107 def replace_then_with_line_break(corrector, conditions, when_node); end end # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#42 RuboCop::Cop::Style::EmptyCaseCondition::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#43 +RuboCop::Cop::Style::EmptyCaseCondition::NOT_SUPPORTED_PARENT_TYPES = T.let(T.unsafe(nil), Array) + # Checks for empty else-clauses, possibly including comments and/or an # explicit `nil` depending on the EnforcedStyle. # @@ -35284,40 +35811,40 @@ class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#195 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#184 def add_offense_for_different_line(node, line_node, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#142 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#131 def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#210 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#199 def add_offense_for_missing_line(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#217 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#206 def add_offense_for_missing_location(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#189 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#178 def add_offense_for_same_line(node, line_node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#154 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#143 def check_file(node, file_node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#167 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#156 def check_line(node, code); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#95 def check_location(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#202 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#191 def expected_line(sign, line_diff); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#122 def file_and_line(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#177 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#166 def line_difference(line_node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#229 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#218 def missing_line(node, code); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#109 @@ -35333,20 +35860,13 @@ class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#118 def special_line_keyword?(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#181 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#170 def string_first_line(str_node); end # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#127 def with_binding?(node); end - - # FIXME: It's a Style/ConditionalAssignment's false positive. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#133 - def with_lineno?(node); end end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#59 @@ -35425,6 +35945,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 @@ -35432,10 +35955,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#56 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#63 def new_method(node); end end @@ -36162,7 +36685,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 @@ -36176,13 +36699,25 @@ RuboCop::Cop::Style::For::PREFER_EACH = T.let(T.unsafe(nil), String) RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String) # Enforces the use of a single string formatting utility. -# Valid options include Kernel#format, Kernel#sprintf and String#%. +# Valid options include `Kernel#format`, `Kernel#sprintf`, and `String#%`. # -# The detection of String#% cannot be implemented in a reliable +# The detection of `String#%` cannot be implemented in a reliable # manner for all cases, so only two scenarios are considered - # if the first argument is a string literal and if the second # argument is an array literal. # +# Autocorrection will be applied when using argument is a literal or known built-in conversion +# methods such as `to_d`, `to_f`, `to_h`, `to_i`, `to_r`, `to_s`, and `to_sym` on variables, +# provided that their return value is not an array. For example, when using `to_s`, +# `'%s' % [1, 2, 3].to_s` can be autocorrected without any incompatibility: +# +# [source,ruby] +# ---- +# '%s' % [1, 2, 3] #=> '1' +# format('%s', [1, 2, 3]) #=> '[1, 2, 3]' +# '%s' % [1, 2, 3].to_s #=> '[1, 2, 3]' +# ---- +# # @example EnforcedStyle: format (default) # # bad # puts sprintf('%10s', 'hoge') @@ -36205,45 +36740,55 @@ RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String) # # good # puts '%10s' % 'hoge' # -# source://rubocop//lib/rubocop/cop/style/format_string.rb#38 +# source://rubocop//lib/rubocop/cop/style/format_string.rb#50 class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/format_string.rb#46 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#61 def formatter(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/format_string.rb#59 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#74 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/format_string.rb#55 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#70 def variable_argument?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/format_string.rb#81 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#102 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/format_string.rb#97 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#118 def autocorrect_from_percent(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/format_string.rb#111 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#132 def autocorrect_to_percent(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/format_string.rb#124 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string.rb#88 + def autocorrectable?(node); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#145 def format_single_parameter(arg); end - # source://rubocop//lib/rubocop/cop/style/format_string.rb#73 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#94 def message(detected_style); end - # source://rubocop//lib/rubocop/cop/style/format_string.rb#77 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#98 def method_name(style_name); end end -# source://rubocop//lib/rubocop/cop/style/format_string.rb#42 +# Known conversion methods whose return value is not an array. +# +# source://rubocop//lib/rubocop/cop/style/format_string.rb#58 +RuboCop::Cop::Style::FormatString::AUTOCORRECTABLE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/format_string.rb#54 RuboCop::Cop::Style::FormatString::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/format_string.rb#43 +# source://rubocop//lib/rubocop/cop/style/format_string.rb#55 RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Use a consistent style for named format string tokens. @@ -36676,6 +37221,25 @@ RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String) # # good # foo || raise('exception') if something # ok +# +# # bad +# define_method(:test) do +# if something +# work +# end +# end +# +# # good +# define_method(:test) do +# return unless something +# +# work +# end +# +# # also good +# define_method(:test) do +# work if something +# end # @example AllowConsecutiveConditionals: false (default) # # bad # def test @@ -36712,7 +37276,7 @@ RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String) # end # end # -# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#95 +# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#114 class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp @@ -36721,83 +37285,89 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#104 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#132 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#123 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#104 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#123 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#113 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#139 def on_if(node); end + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#132 + def on_numblock(node); end + private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#249 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#275 def accepted_form?(node, ending: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#257 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#283 def accepted_if?(node, ending); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#271 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#297 def allowed_consecutive_conditionals?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#239 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#265 def and_or_guard_clause?(guard_clause); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#184 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#210 def autocorrect(corrector, node, condition, replacement, guard); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#210 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#236 def autocorrect_heredoc_argument(corrector, node, heredoc_branch, leave_branch, guard); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#133 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#159 def check_ending_body(body); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#144 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#170 def check_ending_if(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#154 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#180 def consecutive_conditionals?(parent, node); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#231 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#257 def guard_clause_source(guard_clause); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#206 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#232 def heredoc?(argument); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#222 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#248 def range_of_branch_to_remove(node, guard); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#162 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#188 def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#267 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#293 def remove_whole_lines(corrector, range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#244 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#270 def too_long_for_single_line?(node, example); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#253 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#279 def trivial?(node); end end -# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#101 +# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#120 RuboCop::Cop::Style::GuardClause::MSG = T.let(T.unsafe(nil), String) # Checks for presence or absence of braces around hash literal as a last @@ -36957,72 +37527,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#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#92 + # 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. # @@ -37058,6 +37670,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 @@ -37065,42 +37680,42 @@ class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#93 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#94 def bad_method?(block); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#165 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#166 def decorate_source(value); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#173 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#174 def except_key(node); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#152 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#153 def except_key_source(key); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#146 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#147 def extract_body_if_negated(body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#127 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#128 def included?(negated, body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#131 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#132 def not_included?(negated, body); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#182 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#183 def offense_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#135 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#136 def safe_to_register_offense?(block, except_key); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#111 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#112 def semantically_except_method?(send, block); end end @@ -37292,35 +37907,35 @@ class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#198 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#199 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#256 def argument_without_space?(node); end # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#178 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#256 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#260 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#269 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#235 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#220 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#277 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#248 def range_for_autocorrect_ruby19(pair_node); end # @return [Boolean] @@ -37534,40 +38149,43 @@ class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base private + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#184 + def assignable_condition_value(node); end + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#140 def check_branches(node, branches); end - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#168 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#193 def check_expressions(node, expressions, insert_position); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#156 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#173 def duplicated_expressions?(node, expressions); end # `elsif` branches show up in the if node as nested `else` branches. We # need to recursively iterate over all `else` branches. # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#208 + # 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#223 + # 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#192 + # 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#202 + # 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#198 + # 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#219 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#244 def tail(node); end end @@ -37576,24 +38194,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 @@ -38264,10 +38882,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 @@ -38277,39 +38898,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 @@ -38317,10 +38938,15 @@ 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 @@ -38371,12 +38997,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? @@ -38387,36 +39015,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 @@ -39012,32 +39649,35 @@ class RuboCop::Cop::Style::MapCompactWithConditionalBlock < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#46 def map_and_compact?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#72 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#72 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#125 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#126 def range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#91 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#92 def returns_block_argument?(block_argument_node, return_value_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#95 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#96 def truthy_branch?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#115 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#116 def truthy_branch_for_guard?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#105 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#106 def truthy_branch_for_if?(node); end end @@ -39071,15 +39711,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#48 + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#52 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#52 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#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 @@ -39328,23 +39976,20 @@ class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 - def on_super(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 def on_yield(node); end private - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#226 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#225 def args_begin(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#235 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#233 def args_end(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#239 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#237 def args_parenthesized?(node); end class << self @@ -39366,12 +40011,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @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#174 def allowed_chained_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#161 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#170 def allowed_multiline_call_with_parentheses?(node); end # @return [Boolean] @@ -39381,17 +40026,17 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @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#183 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#212 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#220 def assignment_in_condition?(node); end # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#31 @@ -39399,57 +40044,62 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#142 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#151 def call_as_argument_or_chain?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#99 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#144 + def call_in_argument_with_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#100 def call_in_literals?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#110 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#111 def call_in_logical_operators?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#148 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#157 def call_in_match_pattern?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#119 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#120 def call_in_optional_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#123 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#124 def call_in_single_line_inheritance?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#127 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#128 def call_with_ambiguous_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#138 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#140 def call_with_braced_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#221 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#230 def forwards_anonymous_rest_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#190 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#199 def hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#154 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#163 def hash_literal_in_arguments?(node); end # @return [Boolean] @@ -39459,7 +40109,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @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#216 def inside_string_interpolation?(node); end # Require hash value omission be enclosed in parentheses to prevent the following issue: @@ -39477,7 +40127,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @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#195 def logical_operator?(node); end # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#40 @@ -39493,7 +40143,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @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#203 def regexp_slash_literal?(node); end # @return [Boolean] @@ -39503,7 +40153,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @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#187 def splat?(node); end # @return [Boolean] @@ -39518,12 +40168,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @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#191 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#207 def unary_literal?(node); end end @@ -39569,6 +40219,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() @@ -39582,55 +40235,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 @@ -40069,12 +40733,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 @@ -40606,33 +41270,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 @@ -40679,28 +41343,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 @@ -40950,7 +41614,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet/0.7.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 + # source://rubocop-sorbet/0.7.8/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 def on_assignment(value); end # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#127 @@ -40968,7 +41632,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#217 def splat_value(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet/0.7.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 + # source://rubocop-sorbet/0.7.8/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 def t_let(param0 = T.unsafe(nil)); end private @@ -41507,16 +42171,13 @@ class RuboCop::Cop::Style::NestedTernaryOperator < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#48 + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#40 def autocorrect(corrector, if_node); end - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#41 - def if_node(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#55 + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#47 def remove_parentheses(source); end - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#61 + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#53 def replace_loc_and_whitespace(corrector, range, replacement); end end @@ -41718,17 +42379,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 @@ -42368,11 +43029,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 @@ -42504,8 +43167,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 # @@ -42521,24 +43184,24 @@ RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::OperatorMethodCall < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#26 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#27 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#48 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#53 def anonymous_forwarding?(argument); end # Checks for an acceptable case of `foo.+(bar).baz`. # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#42 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#47 def method_call_with_parenthesized_arg?(argument); end - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#55 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#60 def wrap_in_parentheses_if_chained(corrector, node); end end @@ -42838,7 +43501,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 @@ -43010,20 +43673,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 @@ -43031,7 +43694,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 @@ -43452,56 +44120,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, @@ -43621,20 +44289,23 @@ 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 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#94 def argument_range(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#86 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#87 def redundant_arg_for_method(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#79 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#80 def redundant_argument?(node); end end @@ -43734,22 +44405,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 @@ -43848,50 +44522,53 @@ class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#169 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#177 def begin_block_has_multiline_statements?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#161 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#169 def condition_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#181 def contain_rescue_or_ensure?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#154 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#162 def correct_modifier_form_after_multiline_begin_block(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#165 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173 def empty_begin?(node); end # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#110 def register_offense(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#139 + def remove_begin(corrector, offense_range, node); end + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#127 def replace_begin_with_statement(corrector, offense_range, node); end # Restore comments that occur between "begin" and "first_child". # These comments will be moved to above the assignment line. # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#141 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#149 def restore_removed_comments(corrector, offense_range, node, first_child); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#148 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#156 def use_modifier_form_after_multiline_begin_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#186 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#194 def valid_begin_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#179 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#187 def valid_context_using_only_begin?(node); end end @@ -44124,13 +44801,8 @@ class RuboCop::Cop::Style::RedundantConditional < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#86 - def indented_else_node(expression, node); end - - # @return [Boolean] - # # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#78 - def invert_expression?(node); end + def indented_else_node(expression, node); end # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#48 def message(node); end @@ -44257,23 +44929,63 @@ RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::MSG = T.let(T.unsafe(nil), # # good # do_something(foo: bar, baz: qux) # -# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#16 +# # bad +# do_something(**{foo: bar, baz: qux}.merge(options)) +# +# # good +# do_something(foo: bar, baz: qux, **options) +# +# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#22 class RuboCop::Cop::Style::RedundantDoubleSplatHashBraces < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#21 + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#29 def on_hash(node); end private - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#39 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#45 + def allowed_double_splat_receiver?(kwsplat); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#55 + def autocorrect(corrector, node, kwsplat); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#89 + def autocorrect_merge_methods(corrector, merge_methods, kwsplat); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#85 def closing_brace(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#35 + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#111 + def convert_to_new_arguments(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#107 + def extract_send_methods(kwsplat); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#123 + def mergeable?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#81 def opening_brace(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#100 + def range_of_merge_methods(merge_methods); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#66 + def root_receiver(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#75 + def select_merge_method_nodes(kwsplat); end end -# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#19 +# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#26 +RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MERGE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#25 RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MSG = T.let(T.unsafe(nil), String) # Checks for redundant `each`. @@ -44304,21 +45016,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 @@ -44336,48 +45051,64 @@ RuboCop::Cop::Style::RedundantEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # Checks for RuntimeError as the argument of raise/fail. # -# It checks for code like this: -# # @example -# # Bad +# # bad # raise RuntimeError, 'message' -# -# # Bad # raise RuntimeError.new('message') # -# # Good +# # good # raise 'message' # -# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#19 +# # bad - message is not a string +# raise RuntimeError, Object.new +# raise RuntimeError.new(Object.new) +# +# # good +# raise Object.new.to_s +# +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#23 class RuboCop::Cop::Style::RedundantException < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#59 + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#79 def compact?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#54 + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#74 def exploded?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#45 + # Switch `raise RuntimeError, 'message'` to `raise 'message'`, and + # `raise RuntimeError.new('message')` to `raise 'message'`. + # + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#33 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#57 def fix_compact(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#33 + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#39 def fix_exploded(node); end - # Switch `raise RuntimeError, 'message'` to `raise 'message'`, and - # `raise RuntimeError.new('message')` to `raise 'message'`. + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#65 + def replaced_compact(message); end + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#47 + def replaced_exploded(node, command, message); end + + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#29 - def on_send(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#53 + def string_message?(message); end end -# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#22 +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#26 RuboCop::Cop::Style::RedundantException::MSG_1 = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#23 +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#27 RuboCop::Cop::Style::RedundantException::MSG_2 = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#25 +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#29 RuboCop::Cop::Style::RedundantException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where `fetch(key) { value }` can be replaced by `fetch(key, value)`. @@ -44530,6 +45261,9 @@ RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T # @example AllCops:ActiveSupportExtensionsEnabled: false (default) # # good # arr.select { |x| x > 1 }.many? +# +# # good +# arr.select { |x| x > 1 }.present? # @example AllCops:ActiveSupportExtensionsEnabled: true # # bad # arr.select { |x| x > 1 }.many? @@ -44537,38 +45271,47 @@ RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T # # good # arr.many? { |x| x > 1 } # -# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#38 +# # bad +# arr.select { |x| x > 1 }.present? +# +# # good +# arr.any? { |x| x > 1 } +# +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#53 class RuboCop::Cop::Style::RedundantFilterChain < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#65 + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#81 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#81 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#47 + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#62 def select_predicate?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#91 + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#108 def offense_range(select_node, predicate_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#95 + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#112 def predicate_range(predicate_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#77 + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#94 def register_offense(select_node, predicate_node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#41 +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#56 RuboCop::Cop::Style::RedundantFilterChain::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#43 +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#58 RuboCop::Cop::Style::RedundantFilterChain::RAILS_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#56 +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#71 RuboCop::Cop::Style::RedundantFilterChain::REPLACEMENT_METHODS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#44 +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#59 RuboCop::Cop::Style::RedundantFilterChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Check for uses of `Object#freeze` on immutable objects. @@ -44938,35 +45681,45 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#166 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#168 + def allowed_type?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#186 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#146 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#101 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#162 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#133 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#109 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#117 + def leading_dot_method_chain_with_blank_line?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#193 def method_call_with_arguments?(node); end # A method call without parentheses such as the following cannot remove `\`: @@ -44976,12 +45729,12 @@ 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#141 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#123 def redundant_line_continuation?(range); end # @return [Boolean] @@ -44991,17 +45744,17 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#152 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#172 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#197 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#105 def string_concatenation?(source_line); end end @@ -45029,41 +45782,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#222 + # 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#227 + # 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#232 + # 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#140 + # 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 @@ -45071,7 +45826,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] @@ -45091,51 +45846,54 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#236 + # 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#127 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#136 def check(begin_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#142 + # 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#151 + # 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#175 + # 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#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#217 + # 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#171 + # 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#190 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#232 def keyword_with_redundant_parentheses?(node); end # @return [Boolean] @@ -45145,35 +45903,38 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#203 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#245 def method_call_with_redundant_parentheses?(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#128 + def method_chain_begins_with_hash_literal(node); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#119 - def method_chain_begins_with_hash_literal?(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#107 + def multiline_control_flow_statements?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#161 + # 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#213 + # 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#179 + # 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#167 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#209 def suspect_unary?(node); end # @return [Boolean] @@ -45182,6 +45943,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 @@ -45597,31 +46361,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 @@ -45635,7 +46402,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 @@ -45662,7 +46429,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 # @@ -45687,114 +46455,125 @@ RuboCop::Cop::Style::RedundantReturn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # end # end # -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#44 +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#45 class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector # @return [RedundantSelf] a new instance of RedundantSelf # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#59 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#60 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end # Assignment of self.x # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#67 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#68 def on_and_asgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#85 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#86 def on_args(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#119 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#120 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#89 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#90 def on_blockarg(node); end # Using self.x to distinguish from local variable x # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#80 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#81 def on_def(node); end # Using self.x to distinguish from local variable x # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#80 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#81 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 def on_if(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#103 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#104 def on_in_pattern(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#98 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#99 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#93 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#94 def on_masgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#119 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#120 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#73 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#74 def on_op_asgn(node); end # Assignment of self.x # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#67 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#68 def on_or_asgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#107 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#108 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 def on_until(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 def on_while(node); end private - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#181 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#196 def add_lhs_to_local_variables_scopes(rhs, lhs); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#189 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#204 def add_masgn_lhs_variables(rhs, lhs); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#195 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#210 def add_match_var_scopes(in_pattern_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#143 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#144 def add_scope(node, local_variables = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#175 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#190 def allow_self(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#149 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#150 def allowed_send_node?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#166 + # Respects `Lint/ItWithoutArgumentsInBlock` cop and the following Ruby 3.3's warning: + # + # $ ruby -e '0.times { begin; it; end }' + # -e:1: warning: `it` calls without arguments will refer to the first block param in + # Ruby 3.4; use it() or self.it + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#165 + def it_method_in_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#181 def on_argument(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#158 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#173 def regular_method_call?(node); end class << self - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#55 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#56 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#48 +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#49 RuboCop::Cop::Style::RedundantSelf::KERNEL_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#49 +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#50 RuboCop::Cop::Style::RedundantSelf::KEYWORDS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#47 +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#48 RuboCop::Cop::Style::RedundantSelf::MSG = T.let(T.unsafe(nil), String) # Checks for places where redundant assignments are made for in place @@ -45978,6 +46757,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 @@ -45989,45 +46771,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 @@ -46640,9 +47422,13 @@ RuboCop::Cop::Style::RescueStandardError::MSG_EXPLICIT = T.let(T.unsafe(nil), St # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#79 RuboCop::Cop::Style::RescueStandardError::MSG_IMPLICIT = T.let(T.unsafe(nil), String) -# Enforces consistency between 'return nil' and 'return'. +# Enforces consistency between `return nil` and `return`. +# +# This cop is disabled by default. Because there seems to be a perceived semantic difference +# between `return` and `return nil`. The former can be seen as just halting evaluation, +# while the latter might be used when the return value is of specific concern. # -# Supported styles are: return, return_nil. +# Supported styles are `return` and `return_nil`. # # @example EnforcedStyle: return (default) # # bad @@ -46665,46 +47451,46 @@ RuboCop::Cop::Style::RescueStandardError::MSG_IMPLICIT = T.let(T.unsafe(nil), St # return nil if arg # end # -# source://rubocop//lib/rubocop/cop/style/return_nil.rb#31 +# source://rubocop//lib/rubocop/cop/style/return_nil.rb#35 class RuboCop::Cop::Style::ReturnNil < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#86 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#90 def chained_send?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#89 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#93 def define_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#44 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#48 def on_return(node); end - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#42 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#46 def return_nil_node?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#39 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#43 def return_node?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#76 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#80 def correct_style?(node); end - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#72 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#76 def message(_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#81 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#85 def scoped_node?(node); end end -# source://rubocop//lib/rubocop/cop/style/return_nil.rb#35 +# source://rubocop//lib/rubocop/cop/style/return_nil.rb#39 RuboCop::Cop::Style::ReturnNil::RETURN_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/return_nil.rb#36 +# source://rubocop//lib/rubocop/cop/style/return_nil.rb#40 RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) # Checks if `return` or `return nil` is used in predicate method definitions. @@ -46985,6 +47771,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 @@ -46993,36 +47782,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 @@ -47079,6 +47868,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 @@ -47087,31 +47879,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 @@ -47231,40 +48023,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 @@ -47462,8 +48259,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 @@ -47482,21 +48282,24 @@ RuboCop::Cop::Style::SignalException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # keys = %i[key1 key2] # { key1: { key2: 'value' } }.dig(*keys) # -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#31 +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#34 class RuboCop::Cop::Style::SingleArgumentDig < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#42 + # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#46 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#38 + # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#42 def single_argument_dig?(param0 = T.unsafe(nil)); end end -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#34 +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#39 +RuboCop::Cop::Style::SingleArgumentDig::IGNORED_ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#37 RuboCop::Cop::Style::SingleArgumentDig::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#35 +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#38 RuboCop::Cop::Style::SingleArgumentDig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks whether the block parameters of a single-line @@ -47571,6 +48374,50 @@ end # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#34 RuboCop::Cop::Style::SingleLineBlockParams::MSG = T.let(T.unsafe(nil), String) +# Checks for single-line `do`...`end` block. +# +# In practice a single line `do`...`end` is autocorrected when `EnforcedStyle: semantic` +# in `Style/BlockDelimiters`. The autocorrection maintains the `do` ... `end` syntax to +# preserve semantics and does not change it to `{`...`}` block. +# +# @example +# +# # bad +# foo do |arg| bar(arg) end +# +# # good +# foo do |arg| +# bar(arg) +# end +# +# # bad +# ->(arg) do bar(arg) end +# +# # good +# ->(arg) { bar(arg) } +# +# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#28 +class RuboCop::Cop::Style::SingleLineDoEndBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#34 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#34 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#55 + def do_line(node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#63 + def x(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#31 +RuboCop::Cop::Style::SingleLineDoEndBlock::MSG = T.let(T.unsafe(nil), String) + # Checks for single-line method definitions that contain a body. # It will accept single-line methods with no body. # @@ -47658,32 +48505,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[1..] +# items # -# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#28 +# # bad +# items[1..-1] # Ruby 2.6+ +# items[1..nil] # Ruby 2.6+ +# +# # good +# items[1..] # Ruby 2.6+ +# +# # bad +# items[nil..42] # Ruby 2.7+ +# +# # good +# items[..42] # Ruby 2.7+ +# items[0..42] # Ruby 2.7+ +# +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#46 class RuboCop::Cop::Style::SlicingWithRange < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#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, @@ -47740,10 +48624,10 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#240 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#242 def allow_modifier?; end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#225 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#227 def arguments_range(node); end # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81 @@ -47773,13 +48657,13 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#130 def correct_from_unless_to_if(corrector, node, is_modify_form: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#182 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#184 def correct_outer_condition(corrector, condition); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#195 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#197 def insert_bang(corrector, node, is_modify_form); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#208 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#210 def insert_bang_for_and(corrector, node); end # @return [Boolean] @@ -47789,15 +48673,15 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#244 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#246 def outer_condition_modify_form?(node, if_branch); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#236 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#238 def replace_condition(condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#220 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#222 def require_parentheses?(condition); end # @return [Boolean] @@ -47810,7 +48694,7 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#231 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233 def wrap_condition?(node); end class << self @@ -48177,6 +49061,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 @@ -48524,7 +49411,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 @@ -48574,6 +49464,29 @@ end # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#30 RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) +# Enforces the presence of parentheses in `super` containing arguments. +# +# `super` is a keyword and is provided as a distinct cop from those designed for method call. +# +# @example +# +# # bad +# super name, age +# +# # good +# super(name, age) +# +# source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#18 +class RuboCop::Cop::Style::SuperWithArgsParentheses < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#23 + def on_super(node); end +end + +# source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#21 +RuboCop::Cop::Style::SuperWithArgsParentheses::MSG = T.let(T.unsafe(nil), String) + # Enforces the use of shorthand-style swapping of 2 variables. # # @example @@ -48690,43 +49603,43 @@ class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#58 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#66 def on_array(node); end private - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#88 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#96 def build_bracketed_array(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#70 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#78 def complex_content?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#84 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#92 def invalid_percent_array_contents?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#111 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#119 def symbol_without_quote?(string); end - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#103 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#111 def to_symbol_literal(string); end class << self # Returns the value of attribute largest_brackets. # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#55 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 def largest_brackets; end # Sets the attribute largest_brackets # # @param value the value to set the attribute largest_brackets to. # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#55 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 def largest_brackets=(_arg0); end end end @@ -48740,6 +49653,12 @@ RuboCop::Cop::Style::SymbolArray::DELIMITERS = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#50 RuboCop::Cop::Style::SymbolArray::PERCENT_MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#57 +RuboCop::Cop::Style::SymbolArray::REDEFINABLE_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#53 +RuboCop::Cop::Style::SymbolArray::SPECIAL_GVARS = T.let(T.unsafe(nil), Array) + # Checks symbol literal syntax. # # @example @@ -48808,7 +49727,7 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # # good # something.map(&:upcase) # -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#87 +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#123 class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base include ::RuboCop::Cop::CommentsHelp include ::RuboCop::Cop::RangeHelp @@ -48818,117 +49737,117 @@ class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#136 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#172 def destructuring_block_argument?(argument_node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#116 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#116 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#98 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#134 def proc_node?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#104 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#140 def symbol_proc?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#101 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#137 def symbol_proc_receiver?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#204 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#240 def allow_comments?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#200 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#236 def allow_if_method_has_argument?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#151 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#187 def allowed_method_name?(name); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#164 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#200 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#176 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#212 def autocorrect_with_args(corrector, node, args, method_name); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#172 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#208 def autocorrect_without_args(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#190 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#226 def begin_pos_for_replacement(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#185 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#221 def block_range_with_space(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#155 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#191 def register_offense(node, method_name, block_method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#147 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#183 def unsafe_array_usage?(node); end # See: https://github.com/rubocop/rubocop/issues/10864 # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#143 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#179 def unsafe_hash_usage?(node); end class << self - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#111 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#147 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#94 +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#130 RuboCop::Cop::Style::SymbolProc::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#95 +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#131 RuboCop::Cop::Style::SymbolProc::SUPER_TYPES = T.let(T.unsafe(nil), Array) # Corrector to correct conditional assignment in ternary conditions. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#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 @@ -49356,7 +50275,7 @@ class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base def on_send(node); end class << self - # source://rubocop-rspec/2.23.1/lib/rubocop-rspec.rb#59 + # source://rubocop-rspec/2.27.1/lib/rubocop-rspec.rb#60 def autocorrect_incompatible_with; end end end @@ -50077,22 +50996,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"). @@ -50565,61 +51487,62 @@ RuboCop::Cop::Style::YodaCondition::REVERSE_COMPARISON = T.let(T.unsafe(nil), Ha # config.server_port = 9000 + ENV["TEST_ENV_NUMBER"].to_i # ---- # -# @example SupportedOperators: ['*', '+', '&''] +# @example SupportedOperators: ['*', '+', '&', '|', '^'] (default) # # bad -# 1 + x # 10 * y +# 1 + x # 1 & z +# 1 | x +# 1 ^ x # 1 + CONST # # # good -# 60 * 24 -# x + 1 # y * 10 +# x + 1 # z & 1 +# x | 1 +# x ^ 1 # CONST + 1 +# 60 * 24 # -# # good -# 1 | x -# -# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#39 +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#40 class RuboCop::Cop::Style::YodaExpression < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#46 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#47 def on_new_investigation; end - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#50 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#51 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#72 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#73 def constant_portion?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#80 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#81 def offended_ancestor?(node); end - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#84 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#85 def offended_nodes; end - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#76 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#77 def supported_operators; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#68 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#69 def yoda_expression_constant?(lhs, rhs); end end -# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#42 +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#43 RuboCop::Cop::Style::YodaExpression::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#44 +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#45 RuboCop::Cop::Style::YodaExpression::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for numeric comparisons that can be replaced @@ -52748,176 +53671,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 @@ -53058,7 +53986,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 @@ -53237,32 +54170,31 @@ end module RuboCop::FileFinder # @api private # - # source://rubocop//lib/rubocop/file_finder.rb#17 + # source://rubocop//lib/rubocop/file_finder.rb#13 def find_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/file_finder.rb#24 + # source://rubocop//lib/rubocop/file_finder.rb#20 def find_last_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end private # @api private # - # source://rubocop//lib/rubocop/file_finder.rb#32 + # source://rubocop//lib/rubocop/file_finder.rb#28 def traverse_files_upwards(filename, start_dir, stop_dir); end class << self # @api private # - # source://rubocop//lib/rubocop/file_finder.rb#9 - def root_level=(level); end + # source://rubocop//lib/rubocop/file_finder.rb#10 + def root_level; end # @api private - # @return [Boolean] # - # source://rubocop//lib/rubocop/file_finder.rb#13 - def root_level?(path, stop_dir); end + # source://rubocop//lib/rubocop/file_finder.rb#10 + def root_level=(_arg0); end end end @@ -53498,100 +54430,108 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#27 def initialize(output, options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#39 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#40 def file_finished(file, offenses); end # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#33 - def file_started(_file, _file_info); end + def file_started(_file, options); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#47 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#48 def finished(_inspected_files); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#68 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#69 def auto_gen_enforced_style?; end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#72 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#73 def command; end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#156 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#161 def cop_config_params(default_cfg, cfg); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#176 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#181 def default_config(cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#220 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#225 def excludes(offending_files, cop_name, parent); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#191 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#196 def filtered_config(cfg); end + # Returns true if the given arr include the given elm or if any of the + # given arr is a regexp that matches the given elm. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#273 + 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#246 def merge_mode_for_exclude?(cfg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#262 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#267 def no_exclude_limit?; end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#101 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#102 def output_cop(cop_name, offense_count); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#128 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#133 def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#180 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#185 def output_cop_config(output_buffer, cfg, cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#163 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#168 def output_cop_param_comments(output_buffer, params, default_cfg); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#210 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#215 def output_exclude_list(output_buffer, offending_files, cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#245 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#250 def output_exclude_path(output_buffer, exclude_path, parent); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#199 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#204 def output_offending_files(output_buffer, cfg, cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#95 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#96 def output_offenses; end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#258 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#263 def safe_autocorrect?(config); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#115 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#116 def set_max(cfg, cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#64 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#65 def show_offense_counts?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#60 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#61 def show_timestamp?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#148 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#153 def supports_safe_autocorrect?(cop_class, default_cfg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#152 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#157 def supports_unsafe_autocorrect?(cop_class, default_cfg); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#91 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#92 def timestamp; end class << self @@ -53734,68 +54674,84 @@ RuboCop::Formatter::FuubarStyleFormatter::RESET_SEQUENCE = T.let(T.unsafe(nil), # This formatter formats report data as GitHub Workflow commands resulting # in GitHub check annotations when run within GitHub Actions. # -# source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#7 +# source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#7 class RuboCop::Formatter::GitHubActionsFormatter < ::RuboCop::Formatter::BaseFormatter - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#14 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#14 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#18 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#18 def finished(_inspected_files); end - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#10 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#10 def started(_target_files); end private - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#29 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#29 def github_escape(string); end - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#41 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#41 def github_severity(offense); end - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#33 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#33 def minimum_severity_to_fail; end - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#45 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#45 def report_offense(file, offense); end end -# source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#8 +# source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#8 RuboCop::Formatter::GitHubActionsFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) # This formatter saves the output as an html file. # -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#11 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#9 class RuboCop::Formatter::HTMLFormatter < ::RuboCop::Formatter::BaseFormatter # @return [HTMLFormatter] a new instance of HTMLFormatter # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#30 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#29 def initialize(output, options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#40 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#39 def file_finished(file, offenses); end # Returns the value of attribute files. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#28 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#27 def files; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#45 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#44 def finished(inspected_files); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#51 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#50 def render_html; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#36 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#35 def started(target_files); end # Returns the value of attribute summary. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#28 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#27 def summary; end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#15 +# This class provides helper methods used in the ERB CSS template. +# +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#135 +class RuboCop::Formatter::HTMLFormatter::CSSContext + # Make Kernel#binding public. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#146 + def binding; end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#136 +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 # @@ -53819,7 +54775,7 @@ class RuboCop::Formatter::HTMLFormatter::Color < ::Struct # @return [Object] the newly set value def blue=(_); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#20 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#19 def fade_out(amount); end # Returns the value of attribute green @@ -53844,7 +54800,7 @@ class RuboCop::Formatter::HTMLFormatter::Color < ::Struct # @return [Object] the newly set value def red=(_); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#16 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#15 def to_s; end class << self @@ -53856,68 +54812,68 @@ class RuboCop::Formatter::HTMLFormatter::Color < ::Struct end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#12 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#10 RuboCop::Formatter::HTMLFormatter::ELLIPSES = T.let(T.unsafe(nil), String) # This class provides helper methods used in the ERB template. # -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#62 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#61 class RuboCop::Formatter::HTMLFormatter::ERBContext include ::RuboCop::PathUtil include ::RuboCop::Formatter::TextUtil # @return [ERBContext] a new instance of ERBContext # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#78 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69 def initialize(files, summary); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#125 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#116 def base64_encoded_logo_image; end # Make Kernel#binding public. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#85 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#76 def binding; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#90 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#81 def decorated_message(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#121 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#112 def escape(string); end # Returns the value of attribute files. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#76 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#67 def files; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#101 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#92 def highlight_source_tag(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#94 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#85 def highlighted_source_line(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#117 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#108 def possible_ellipses(location); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#112 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#124 + def render_css; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#103 def source_after_highlight(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#107 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#98 def source_before_highlight(offense); end # Returns the value of attribute summary. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#76 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#67 def summary; end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#74 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#65 RuboCop::Formatter::HTMLFormatter::ERBContext::LOGO_IMAGE_PATH = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#66 -RuboCop::Formatter::HTMLFormatter::ERBContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#26 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct # Returns the value of attribute offenses # @@ -53950,7 +54906,7 @@ class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct # Returns the value of attribute inspected_files # @@ -53994,27 +54950,27 @@ class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#13 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#11 RuboCop::Formatter::HTMLFormatter::TEMPLATE_PATH = T.let(T.unsafe(nil), String) # This formatter formats the report data in JSON format. # -# source://rubocop//lib/rubocop/formatter/json_formatter.rb#9 +# source://rubocop//lib/rubocop/formatter/json_formatter.rb#8 class RuboCop::Formatter::JSONFormatter < ::RuboCop::Formatter::BaseFormatter include ::RuboCop::PathUtil # @return [JSONFormatter] a new instance of JSONFormatter # - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#14 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#13 def initialize(output, options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#23 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#22 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#28 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#27 def finished(inspected_files); end - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#43 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#42 def hash_for_file(file, offenses); end # TODO: Consider better solution for Offense#real_column. @@ -54022,21 +54978,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 @@ -54142,6 +55098,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 @@ -54153,7 +55112,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 @@ -54162,7 +55121,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 @@ -54428,50 +55387,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; 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; 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 # @@ -54485,7 +55457,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 # @@ -54500,52 +55472,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#58 + # source://rubocop//lib/rubocop/lsp/routes.rb#61 def handle_initialized(_request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#167 + # source://rubocop//lib/rubocop/lsp/routes.rb#170 def handle_method_missing(request); end - # source://rubocop//lib/rubocop/lsp/routes.rb#64 + # source://rubocop//lib/rubocop/lsp/routes.rb#67 def handle_shutdown(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#156 + # source://rubocop//lib/rubocop/lsp/routes.rb#159 def handle_unsupported_method(request, method = T.unsafe(nil)); end private # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#205 + # source://rubocop//lib/rubocop/lsp/routes.rb#208 def diagnostic(file_uri, text); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#175 + # source://rubocop//lib/rubocop/lsp/routes.rb#178 def extract_initialization_options_from(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#185 + # source://rubocop//lib/rubocop/lsp/routes.rb#188 def format_file(file_uri, command: T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#219 + # source://rubocop//lib/rubocop/lsp/routes.rb#222 def remove_file_protocol_from(uri); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#223 + # source://rubocop//lib/rubocop/lsp/routes.rb#226 def to_diagnostic(offense); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#235 + # source://rubocop//lib/rubocop/lsp/routes.rb#238 def to_range(location); end class << self @@ -54563,7 +55535,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 # @@ -54629,42 +55601,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#59 def configure(options); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#48 + # source://rubocop//lib/rubocop/lsp/server.rb#51 def format(path, text, command:); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#52 + # source://rubocop//lib/rubocop/lsp/server.rb#55 def offenses(path, text); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#29 + # source://rubocop//lib/rubocop/lsp/server.rb#32 def start; end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#62 + # source://rubocop//lib/rubocop/lsp/server.rb#65 def stop(&block); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#44 + # source://rubocop//lib/rubocop/lsp/server.rb#47 def write(response); end end @@ -54673,7 +55645,7 @@ end # @api private # # source://rubocop//lib/rubocop/lsp/severity.rb#7 -class RuboCop::Lsp::Severity +class RuboCop::LSP::Severity class << self # @api private # @@ -54685,7 +55657,42 @@ 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#7 +class RuboCop::Lockfile + # Gems that the bundle depends on + # + # @api private + # + # source://rubocop//lib/rubocop/lockfile.rb#9 + def dependencies; end + + # All activated gems, including transitive dependencies + # + # @api private + # + # source://rubocop//lib/rubocop/lockfile.rb#16 + def gems; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lockfile.rb#24 + def includes_gem?(name); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/lockfile.rb#30 + def parser; end +end # Parse different formats of magic comments. # @@ -54893,12 +55900,12 @@ RuboCop::MagicComment::KEYWORDS = T.let(T.unsafe(nil), Hash) class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment # Match `encoding` or `coding` # - # source://rubocop//lib/rubocop/magic_comment.rb#263 + # source://rubocop//lib/rubocop/magic_comment.rb#265 def encoding; end # Rewrite the comment without a given token type # - # source://rubocop//lib/rubocop/magic_comment.rb#268 + # source://rubocop//lib/rubocop/magic_comment.rb#270 def without(type); end private @@ -54912,22 +55919,25 @@ class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment # # @see https://github.com/ruby/ruby/blob/78b95b4/parse.y#L7134-L7138 # - # source://rubocop//lib/rubocop/magic_comment.rb#285 + # source://rubocop//lib/rubocop/magic_comment.rb#287 def extract_frozen_string_literal; end - # source://rubocop//lib/rubocop/magic_comment.rb#289 + # source://rubocop//lib/rubocop/magic_comment.rb#291 def extract_shareable_constant_value; end - # source://rubocop//lib/rubocop/magic_comment.rb#293 + # source://rubocop//lib/rubocop/magic_comment.rb#295 def extract_typed; end end +# source://rubocop//lib/rubocop/magic_comment.rb#262 +RuboCop::MagicComment::SimpleComment::FSTRING_LITERAL_COMMENT = T.let(T.unsafe(nil), String) + # IRB's pattern for matching magic comment tokens. # # @see https://github.com/ruby/ruby/blob/b4a55c1/lib/irb/magic-file.rb#L5 # # source://rubocop//lib/rubocop/magic_comment.rb#10 -RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), Regexp) +RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), String) # Wrapper for Vim style magic comments. # @@ -55041,7 +56051,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: @@ -55053,12 +56063,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 @@ -55068,42 +56078,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 @@ -55113,7 +56123,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, @@ -55121,7 +56131,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 @@ -55129,17 +56139,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 @@ -55147,7 +56157,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 @@ -55170,141 +56180,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 @@ -55317,21 +56327,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 @@ -55339,7 +56349,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 @@ -55353,29 +56363,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] @@ -55387,7 +56397,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 @@ -55410,7 +56420,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 @@ -55632,39 +56642,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 @@ -55672,7 +56682,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 @@ -55682,17 +56692,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 @@ -55701,25 +56711,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 @@ -55727,19 +56737,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 @@ -55751,67 +56761,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 @@ -55916,7 +56926,7 @@ class RuboCop::Runner # source://rubocop//lib/rubocop/runner.rb#414 def formatter_set; end - # source://rubocop//lib/rubocop/runner.rb#470 + # source://rubocop//lib/rubocop/runner.rb#471 def get_processed_source(file); end # source://rubocop//lib/rubocop/runner.rb#342 @@ -55967,7 +56977,7 @@ class RuboCop::Runner # otherwise dormant team that can be used for config- and option- # level caching in ResultCache. # - # source://rubocop//lib/rubocop/runner.rb#492 + # source://rubocop//lib/rubocop/runner.rb#499 def standby_team(config); end # @return [Boolean] @@ -56064,173 +57074,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. @@ -56242,34 +57259,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 @@ -56278,23 +57295,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 @@ -56307,18 +57324,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 @@ -56326,62 +57343,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 @@ -56417,49 +57434,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. @@ -56495,34 +57512,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 @@ -56548,12 +57565,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: @@ -56563,12 +57580,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/shopify-money@1.3.0.rbi b/sorbet/rbi/gems/shopify-money@2.0.0.rbi similarity index 95% rename from sorbet/rbi/gems/shopify-money@1.3.0.rbi rename to sorbet/rbi/gems/shopify-money@2.0.0.rbi index 6f92c6cc6..ecafcb2c8 100644 --- a/sorbet/rbi/gems/shopify-money@1.3.0.rbi +++ b/sorbet/rbi/gems/shopify-money@2.0.0.rbi @@ -18,6 +18,8 @@ class Money # source://shopify-money//lib/money/money.rb#82 def initialize(value, currency); end + # @raise [ArgumentError] + # # source://shopify-money//lib/money/money.rb#139 def *(numeric); end @@ -30,29 +32,29 @@ class Money # source://shopify-money//lib/money/money.rb#114 def -@; end - # source://shopify-money//lib/money/money.rb#151 + # source://shopify-money//lib/money/money.rb#146 def /(numeric); end # source://shopify-money//lib/money/money.rb#118 def <=>(other); end - # source://shopify-money//lib/money/money.rb#159 + # source://shopify-money//lib/money/money.rb#154 def ==(other); end - # source://shopify-money//lib/money/money.rb#262 + # source://shopify-money//lib/money/money.rb#257 def abs; end # @see Money::Allocator#allocate # - # source://shopify-money//lib/money/money.rb#288 + # source://shopify-money//lib/money/money.rb#283 def allocate(splits, strategy = T.unsafe(nil)); end # @see Money::Allocator#allocate_max_amounts # - # source://shopify-money//lib/money/money.rb#293 + # source://shopify-money//lib/money/money.rb#288 def allocate_max_amounts(maximums); end - # source://shopify-money//lib/money/money.rb#254 + # source://shopify-money//lib/money/money.rb#249 def as_json(options = T.unsafe(nil)); end # Calculate the splits evenly without losing pennies. @@ -66,7 +68,7 @@ class Money # @raise [ArgumentError] # @return [Hash] # - # source://shopify-money//lib/money/money.rb#320 + # source://shopify-money//lib/money/money.rb#315 def calculate_splits(num); end # Clamps the value to be within the specified minimum and maximum. Returns @@ -79,12 +81,12 @@ class Money # Money.new(120, "CAD").clamp(0, 100) #=> Money.new(100, "CAD") # @raise [ArgumentError] # - # source://shopify-money//lib/money/money.rb#342 + # source://shopify-money//lib/money/money.rb#337 def clamp(min, max); end # @raise [TypeError] # - # source://shopify-money//lib/money/money.rb#194 + # source://shopify-money//lib/money/money.rb#189 def coerce(other); end # Returns the value of attribute currency. @@ -99,15 +101,15 @@ class Money # # @return [Boolean] # - # source://shopify-money//lib/money/money.rb#164 + # source://shopify-money//lib/money/money.rb#159 def eql?(other); end - # source://shopify-money//lib/money/money.rb#268 + # source://shopify-money//lib/money/money.rb#263 def floor; end # @raise [ArgumentError] # - # source://shopify-money//lib/money/money.rb#280 + # source://shopify-money//lib/money/money.rb#275 def fraction(rate); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -116,7 +118,7 @@ class Money # source://shopify-money//lib/money/money.rb#89 def init_with(coder); end - # source://shopify-money//lib/money/money.rb#155 + # source://shopify-money//lib/money/money.rb#150 def inspect; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -133,7 +135,7 @@ class Money # source://forwardable/1.3.3/forwardable.rb#231 def positive?(*args, **_arg1, &block); end - # source://shopify-money//lib/money/money.rb#274 + # source://shopify-money//lib/money/money.rb#269 def round(ndigits = T.unsafe(nil)); end # Split money amongst parties evenly without losing pennies. @@ -143,34 +145,34 @@ class Money # @param number [2] of parties. # @return [Array] # - # source://shopify-money//lib/money/money.rb#305 + # source://shopify-money//lib/money/money.rb#300 def split(num); end # source://shopify-money//lib/money/money.rb#98 def subunits(format: T.unsafe(nil)); end - # source://shopify-money//lib/money/money.rb#217 + # source://shopify-money//lib/money/money.rb#212 def to_d; end # source://forwardable/1.3.3/forwardable.rb#231 def to_f(*args, **_arg1, &block); end - # source://shopify-money//lib/money/money.rb#221 + # source://shopify-money//lib/money/money.rb#216 def to_formatted_s(style = T.unsafe(nil)); end - # source://shopify-money//lib/money/money.rb#221 + # source://shopify-money//lib/money/money.rb#216 def to_fs(style = T.unsafe(nil)); end # source://forwardable/1.3.3/forwardable.rb#231 def to_i(*args, **_arg1, &block); end - # source://shopify-money//lib/money/money.rb#246 + # source://shopify-money//lib/money/money.rb#241 def to_json(options = T.unsafe(nil)); end - # source://shopify-money//lib/money/money.rb#199 + # source://shopify-money//lib/money/money.rb#194 def to_money(curr = T.unsafe(nil)); end - # source://shopify-money//lib/money/money.rb#221 + # source://shopify-money//lib/money/money.rb#216 def to_s(style = T.unsafe(nil)); end # Returns the value of attribute value. @@ -186,10 +188,10 @@ class Money # @raise [TypeError] # @yield [other] # - # source://shopify-money//lib/money/money.rb#357 + # source://shopify-money//lib/money/money.rb#352 def arithmetic(money_or_numeric); end - # source://shopify-money//lib/money/money.rb#364 + # source://shopify-money//lib/money/money.rb#359 def calculated_currency(other); end class << self @@ -485,14 +487,14 @@ class Money::Error < ::StandardError; end module Money::Helpers private - # source://shopify-money//lib/money/helpers.rb#44 + # source://shopify-money//lib/money/helpers.rb#42 def value_to_currency(currency); end # source://shopify-money//lib/money/helpers.rb#16 def value_to_decimal(num); end class << self - # source://shopify-money//lib/money/helpers.rb#44 + # source://shopify-money//lib/money/helpers.rb#42 def value_to_currency(currency); end # source://shopify-money//lib/money/helpers.rb#16 @@ -765,25 +767,25 @@ Money::Parser::Simple::SIGNED_DECIMAL_MATCHER = T.let(T.unsafe(nil), Regexp) # source://shopify-money//lib/money/railtie.rb#4 class Money::Railtie < ::Rails::Railtie; end -# source://shopify-money//lib/money/money.rb#170 +# source://shopify-money//lib/money/money.rb#165 class Money::ReverseOperationProxy include ::Comparable # @return [ReverseOperationProxy] a new instance of ReverseOperationProxy # - # source://shopify-money//lib/money/money.rb#173 + # source://shopify-money//lib/money/money.rb#168 def initialize(value); end - # source://shopify-money//lib/money/money.rb#189 + # source://shopify-money//lib/money/money.rb#184 def *(other); end - # source://shopify-money//lib/money/money.rb#181 + # source://shopify-money//lib/money/money.rb#176 def +(other); end - # source://shopify-money//lib/money/money.rb#185 + # source://shopify-money//lib/money/money.rb#180 def -(other); end - # source://shopify-money//lib/money/money.rb#177 + # source://shopify-money//lib/money/money.rb#172 def <=>(other); end end diff --git a/sorbet/rbi/gems/sidekiq@7.1.2.rbi b/sorbet/rbi/gems/sidekiq@7.2.2.rbi similarity index 81% rename from sorbet/rbi/gems/sidekiq@7.1.2.rbi rename to sorbet/rbi/gems/sidekiq@7.2.2.rbi index ea97a1a45..c1b40de4f 100644 --- a/sorbet/rbi/gems/sidekiq@7.1.2.rbi +++ b/sorbet/rbi/gems/sidekiq@7.2.2.rbi @@ -86,7 +86,7 @@ module Sidekiq # source://sidekiq//lib/sidekiq.rb#76 def strict_args!(mode = T.unsafe(nil)); end - # source://sidekiq//lib/sidekiq/transaction_aware_client.rb#33 + # source://sidekiq//lib/sidekiq/transaction_aware_client.rb#40 def transactional_push!; end # source://sidekiq//lib/sidekiq.rb#44 @@ -136,6 +136,7 @@ class Sidekiq::Client # args - an array of simple arguments to the perform method, must be JSON-serializable # at - timestamp to schedule the job (optional), must be Numeric (e.g. Time.now.to_f) # retry - whether to retry this job if it fails, default true or an integer number of retries + # retry_for - relative amount of time to retry this job if it fails, default nil # backtrace - whether to save any error backtrace, default false # # If class is set to the class name, the jobs' options will be based on Sidekiq's default @@ -143,7 +144,7 @@ class Sidekiq::Client # # Any options valid for a job class's sidekiq_options are also available here. # - # All options must be strings, not symbols. NB: because we are serializing to JSON, all + # All keys must be strings, not symbols. NB: because we are serializing to JSON, all # symbols in 'args' will be converted to strings. Note that +backtrace: true+ can take quite a bit of # space in Redis; a large volume of failing jobs can start Redis swapping if you aren't careful. # @@ -152,7 +153,7 @@ class Sidekiq::Client # Example: # push('queue' => 'my_queue', 'class' => MyJob, 'args' => ['foo', 1, :bat => 'bar']) # - # source://sidekiq//lib/sidekiq/client.rb#85 + # source://sidekiq//lib/sidekiq/client.rb#86 def push(item); end # Push a large number of jobs to Redis. This method cuts out the redis @@ -170,11 +171,11 @@ class Sidekiq::Client # prevented a job push. # # Example (pushing jobs in batches): - # push_bulk('class' => 'MyJob', 'args' => (1..100_000).to_a, batch_size: 1_000) + # push_bulk('class' => MyJob, 'args' => (1..100_000).to_a, batch_size: 1_000) # # @raise [ArgumentError] # - # source://sidekiq//lib/sidekiq/client.rb#115 + # source://sidekiq//lib/sidekiq/client.rb#116 def push_bulk(items); end # Returns the value of attribute redis_pool. @@ -191,10 +192,10 @@ class Sidekiq::Client private - # source://sidekiq//lib/sidekiq/client.rb#245 + # source://sidekiq//lib/sidekiq/client.rb#248 def atomic_push(conn, payloads); end - # source://sidekiq//lib/sidekiq/client.rb#221 + # source://sidekiq//lib/sidekiq/client.rb#224 def raw_push(payloads); end class << self @@ -206,31 +207,31 @@ class Sidekiq::Client # # Messages are enqueued to the 'default' queue. # - # source://sidekiq//lib/sidekiq/client.rb#186 + # source://sidekiq//lib/sidekiq/client.rb#189 def enqueue(klass, *args); end # Example usage: # Sidekiq::Client.enqueue_in(3.minutes, MyJob, 'foo', 1, :bat => 'bar') # - # source://sidekiq//lib/sidekiq/client.rb#214 + # source://sidekiq//lib/sidekiq/client.rb#217 def enqueue_in(interval, klass, *args); end # Example usage: # Sidekiq::Client.enqueue_to(:queue_name, MyJob, 'foo', 1, :bat => 'bar') # - # source://sidekiq//lib/sidekiq/client.rb#193 + # source://sidekiq//lib/sidekiq/client.rb#196 def enqueue_to(queue, klass, *args); end # Example usage: # Sidekiq::Client.enqueue_to_in(:queue_name, 3.minutes, MyJob, 'foo', 1, :bat => 'bar') # - # source://sidekiq//lib/sidekiq/client.rb#200 + # source://sidekiq//lib/sidekiq/client.rb#203 def enqueue_to_in(queue, interval, klass, *args); end - # source://sidekiq//lib/sidekiq/client.rb#170 + # source://sidekiq//lib/sidekiq/client.rb#173 def push(item); end - # source://sidekiq//lib/sidekiq/client.rb#174 + # source://sidekiq//lib/sidekiq/client.rb#177 def push_bulk(*_arg0, **_arg1, &_arg2); end # Allows sharding of jobs across any number of Redis instances. All jobs @@ -246,7 +247,7 @@ class Sidekiq::Client # thousands of jobs per second. I do not recommend sharding unless # you cannot scale any other way (e.g. splitting your app into smaller apps). # - # source://sidekiq//lib/sidekiq/client.rb#160 + # source://sidekiq//lib/sidekiq/client.rb#163 def via(pool); end end end @@ -264,13 +265,13 @@ class Sidekiq::Config # @return [Config] a new instance of Config # - # source://sidekiq//lib/sidekiq/config.rb#48 + # source://sidekiq//lib/sidekiq/config.rb#47 def initialize(options = T.unsafe(nil)); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def [](*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def []=(*args, **_arg1, &block); end # How frequently Redis should be checked by a random Sidekiq process for @@ -279,33 +280,33 @@ class Sidekiq::Config # # See sidekiq/scheduled.rb for an in-depth explanation of this value # - # source://sidekiq//lib/sidekiq/config.rb#213 + # source://sidekiq//lib/sidekiq/config.rb#212 def average_scheduled_poll_interval=(interval); end # register a new queue processing subsystem # # @yield [cap] # - # source://sidekiq//lib/sidekiq/config.rb#112 + # source://sidekiq//lib/sidekiq/config.rb#111 def capsule(name); end # Returns the value of attribute capsules. # - # source://sidekiq//lib/sidekiq/config.rb#57 + # source://sidekiq//lib/sidekiq/config.rb#56 def capsules; end # @yield [@client_chain] # - # source://sidekiq//lib/sidekiq/config.rb#95 + # source://sidekiq//lib/sidekiq/config.rb#94 def client_middleware; end - # source://sidekiq//lib/sidekiq/config.rb#69 + # source://sidekiq//lib/sidekiq/config.rb#68 def concurrency; end # LEGACY: edits the default capsule # config.concurrency = 5 # - # source://sidekiq//lib/sidekiq/config.rb#65 + # source://sidekiq//lib/sidekiq/config.rb#64 def concurrency=(val); end # Death handlers are called when all retries for a job have been exhausted and @@ -317,10 +318,10 @@ class Sidekiq::Config # end # end # - # source://sidekiq//lib/sidekiq/config.rb#204 + # source://sidekiq//lib/sidekiq/config.rb#203 def death_handlers; end - # source://sidekiq//lib/sidekiq/config.rb#107 + # source://sidekiq//lib/sidekiq/config.rb#106 def default_capsule(&block); end # Register a proc to handle any error which occurs within the Sidekiq process. @@ -331,38 +332,38 @@ class Sidekiq::Config # # The default error handler logs errors to @logger. # - # source://sidekiq//lib/sidekiq/config.rb#224 + # source://sidekiq//lib/sidekiq/config.rb#223 def error_handlers; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def fetch(*args, **_arg1, &block); end # INTERNAL USE ONLY # - # source://sidekiq//lib/sidekiq/config.rb#263 + # source://sidekiq//lib/sidekiq/config.rb#267 def handle_exception(ex, ctx = T.unsafe(nil)); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def has_key?(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def key?(*args, **_arg1, &block); end - # source://sidekiq//lib/sidekiq/config.rb#242 + # source://sidekiq//lib/sidekiq/config.rb#241 def logger; end - # source://sidekiq//lib/sidekiq/config.rb#253 + # source://sidekiq//lib/sidekiq/config.rb#252 def logger=(logger); end # find a singleton # - # source://sidekiq//lib/sidekiq/config.rb#187 + # source://sidekiq//lib/sidekiq/config.rb#186 def lookup(name, default_class = T.unsafe(nil)); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def merge!(*args, **_arg1, &block); end - # source://sidekiq//lib/sidekiq/config.rb#137 + # source://sidekiq//lib/sidekiq/config.rb#136 def new_redis_pool(size, name = T.unsafe(nil)); end # Register a block to run at a point in the Sidekiq lifecycle. @@ -376,10 +377,10 @@ class Sidekiq::Config # # @raise [ArgumentError] # - # source://sidekiq//lib/sidekiq/config.rb#236 + # source://sidekiq//lib/sidekiq/config.rb#235 def on(event, &block); end - # source://sidekiq//lib/sidekiq/config.rb#91 + # source://sidekiq//lib/sidekiq/config.rb#90 def queues; end # Edit the default capsule. @@ -393,45 +394,48 @@ class Sidekiq::Config # are ridiculous and unnecessarily expensive. You can get random queue ordering # by explicitly setting all weights to 1. # - # source://sidekiq//lib/sidekiq/config.rb#87 + # source://sidekiq//lib/sidekiq/config.rb#86 def queues=(val); end # @raise [ArgumentError] # - # source://sidekiq//lib/sidekiq/config.rb#159 + # source://sidekiq//lib/sidekiq/config.rb#158 def redis; end # All capsules must use the same Redis configuration # - # source://sidekiq//lib/sidekiq/config.rb#123 + # source://sidekiq//lib/sidekiq/config.rb#122 def redis=(hash); end - # source://sidekiq//lib/sidekiq/config.rb#143 + # source://sidekiq//lib/sidekiq/config.rb#142 def redis_info; end - # source://sidekiq//lib/sidekiq/config.rb#127 + # source://sidekiq//lib/sidekiq/config.rb#126 def redis_pool; end # register global singletons which can be accessed elsewhere # - # source://sidekiq//lib/sidekiq/config.rb#182 + # source://sidekiq//lib/sidekiq/config.rb#181 def register(name, instance); end # @yield [@server_chain] # - # source://sidekiq//lib/sidekiq/config.rb#101 + # source://sidekiq//lib/sidekiq/config.rb#100 def server_middleware; end - # source://sidekiq//lib/sidekiq/config.rb#59 + # source://sidekiq//lib/sidekiq/config.rb#58 def to_json(*_arg0); end - # source://sidekiq//lib/sidekiq/config.rb#73 + # source://sidekiq//lib/sidekiq/config.rb#72 def total_concurrency; end private - # source://sidekiq//lib/sidekiq/config.rb#131 + # source://sidekiq//lib/sidekiq/config.rb#130 def local_redis_pool; end + + # source://sidekiq//lib/sidekiq/config.rb#261 + def parameter_size(handler); end end # source://sidekiq//lib/sidekiq/config.rb#11 @@ -759,10 +763,10 @@ end module Sidekiq::JobUtil # @raise [ArgumentError] # - # source://sidekiq//lib/sidekiq/job_util.rb#40 + # source://sidekiq//lib/sidekiq/job_util.rb#41 def normalize_item(item); end - # source://sidekiq//lib/sidekiq/job_util.rb#61 + # source://sidekiq//lib/sidekiq/job_util.rb#63 def normalized_hash(item_class); end # @raise [ArgumentError] @@ -770,18 +774,18 @@ module Sidekiq::JobUtil # source://sidekiq//lib/sidekiq/job_util.rb#10 def validate(item); end - # source://sidekiq//lib/sidekiq/job_util.rb#18 + # source://sidekiq//lib/sidekiq/job_util.rb#19 def verify_json(item); end private # @return [Boolean] # - # source://sidekiq//lib/sidekiq/job_util.rb#101 + # source://sidekiq//lib/sidekiq/job_util.rb#103 def json_unsafe?(item); end end -# source://sidekiq//lib/sidekiq/job_util.rb#72 +# source://sidekiq//lib/sidekiq/job_util.rb#74 Sidekiq::JobUtil::RECURSIVE_JSON_UNSAFE = T.let(T.unsafe(nil), Hash) # These functions encapsulate various job utilities. @@ -1066,7 +1070,7 @@ Sidekiq::NAME = T.let(T.unsafe(nil), String) # source://sidekiq//lib/sidekiq/rails.rb#7 class Sidekiq::Rails < ::Rails::Engine class << self - # source://activesupport/7.0.5/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 def __callbacks; end end end @@ -1085,22 +1089,22 @@ class Sidekiq::Rails::Reloader def inspect; end # source://sidekiq//lib/sidekiq/rails.rb#24 - def to_json(*_arg0); end + def to_hash; end end # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#8 class Sidekiq::RedisClientAdapter # @return [RedisClientAdapter] a new instance of RedisClientAdapter # - # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#47 + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#63 def initialize(options); end - # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#56 + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#72 def new_client; end private - # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#62 + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#78 def client_opts(options); end end @@ -1114,7 +1118,7 @@ Sidekiq::RedisClientAdapter::CommandError = RedisClient::CommandError class Sidekiq::RedisClientAdapter::CompatClient < ::RedisClient::Decorator::Client include ::Sidekiq::RedisClientAdapter::CompatMethods - # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#42 + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#58 def config; end end @@ -1125,26 +1129,177 @@ end # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#15 module Sidekiq::RedisClientAdapter::CompatMethods + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def bitfield(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def bitfield_ro(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def del(*args); end + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#20 def evalsha(sha, keys, argv); end + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def exists(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def expire(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def flushdb(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def get(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def hdel(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def hget(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def hgetall(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def hincrby(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def hlen(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def hmget(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def hset(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def hsetnx(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def incr(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def incrby(*args); end + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#16 def info; end + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def lindex(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def llen(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def lmove(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def lpop(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def lpush(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def lrange(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def lrem(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def mget(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def mset(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def ping(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def pttl(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def publish(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def rpop(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def rpush(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def sadd(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def scard(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def script(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def set(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def sismember(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def smembers(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def srem(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def ttl(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def type(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def unlink(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def zadd(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def zcard(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def zincrby(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def zrange(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def zrem(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def zremrangebyrank(*args); end + + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#35 + def zremrangebyscore(*args); end + private # this allows us to use methods like `conn.hmset(...)` instead of having to use # redis-client's native `conn.call("hmset", ...)` # - # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#28 + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#44 def method_missing(*args, **_arg1, &block); end # @return [Boolean] # - # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#34 + # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#50 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end +# this is the set of Redis commands used by Sidekiq. Not guaranteed +# to be comprehensive, we use this as a performance enhancement to +# avoid calling method_missing on most commands +# +# source://sidekiq//lib/sidekiq/redis_client_adapter.rb#27 +Sidekiq::RedisClientAdapter::CompatMethods::USED_COMMANDS = T.let(T.unsafe(nil), Array) + # You can add/remove items or clear the whole thing if you don't want deprecation warnings. # # source://sidekiq//lib/sidekiq/redis_client_adapter.rb#13 @@ -1161,7 +1316,7 @@ module Sidekiq::RedisConnection # source://sidekiq//lib/sidekiq/redis_connection.rb#50 def determine_redis_provider; end - # source://sidekiq//lib/sidekiq/redis_connection.rb#29 + # source://sidekiq//lib/sidekiq/redis_connection.rb#30 def scrub(options); end end end @@ -1210,14 +1365,19 @@ class Sidekiq::TransactionAwareClient # source://sidekiq//lib/sidekiq/transaction_aware_client.rb#8 def initialize(pool: T.unsafe(nil), config: T.unsafe(nil)); end + # @return [Boolean] + # # source://sidekiq//lib/sidekiq/transaction_aware_client.rb#12 + def batching?; end + + # source://sidekiq//lib/sidekiq/transaction_aware_client.rb#16 def push(item); end # We don't provide transactionality for push_bulk because we don't want # to hold potentially hundreds of thousands of job records in memory due to # a long running enqueue process. # - # source://sidekiq//lib/sidekiq/transaction_aware_client.rb#24 + # source://sidekiq//lib/sidekiq/transaction_aware_client.rb#31 def push_bulk(items); end end diff --git a/sorbet/rbi/gems/spoom@1.2.3.rbi b/sorbet/rbi/gems/spoom@1.2.4.rbi similarity index 80% rename from sorbet/rbi/gems/spoom@1.2.3.rbi rename to sorbet/rbi/gems/spoom@1.2.4.rbi index 7f3b03ef3..e1ae7a41d 100644 --- a/sorbet/rbi/gems/spoom@1.2.3.rbi +++ b/sorbet/rbi/gems/spoom@1.2.4.rbi @@ -958,7 +958,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct prop :strong, ::String class << self - # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -1298,7 +1298,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.10962/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -1353,7 +1353,7 @@ end # source://spoom//lib/spoom/deadcode/erb.rb#27 module Spoom::Deadcode class << self - # source://spoom//lib/spoom/deadcode.rb#50 + # source://spoom//lib/spoom/deadcode.rb#51 sig do params( index: ::Spoom::Deadcode::Index, @@ -1364,7 +1364,7 @@ module Spoom::Deadcode end def index_erb(index, erb, file:, plugins: T.unsafe(nil)); end - # source://spoom//lib/spoom/deadcode.rb#39 + # source://spoom//lib/spoom/deadcode.rb#40 sig do params( index: ::Spoom::Deadcode::Index, @@ -1374,9 +1374,23 @@ module Spoom::Deadcode ).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]) } + 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]) } + def plugins_from_gemfile_lock(context); end end end +# source://spoom//lib/spoom/deadcode/plugins.rb#25 +Spoom::Deadcode::DEFAULT_CUSTOM_PLUGINS_PATH = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/deadcode/plugins.rb#27 +Spoom::Deadcode::DEFAULT_PLUGINS = T.let(T.unsafe(nil), Set) + # A definition is a class, module, method, constant, etc. being defined in the code # # source://spoom//lib/spoom/deadcode/definition.rb#7 @@ -1436,7 +1450,7 @@ class Spoom::Deadcode::Definition < ::T::Struct def module?; end class << self - # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -1473,19 +1487,19 @@ class Spoom::Deadcode::ERB < ::Erubi::Engine private # source://spoom//lib/spoom/deadcode/erb.rb#83 - sig { params(code: T.untyped).void } + sig { override.params(code: T.untyped).void } def add_code(code); end # source://spoom//lib/spoom/deadcode/erb.rb#66 - sig { params(indicator: T.untyped, code: T.untyped).void } + sig { override.params(indicator: T.untyped, code: T.untyped).void } def add_expression(indicator, code); end # source://spoom//lib/spoom/deadcode/erb.rb#89 - sig { params(_: T.untyped).void } + sig { override.params(_: T.untyped).void } def add_postamble(_); end # source://spoom//lib/spoom/deadcode/erb.rb#48 - sig { params(text: T.untyped).void } + sig { override.params(text: T.untyped).void } def add_text(text); end # source://spoom//lib/spoom/deadcode/erb.rb#95 @@ -1498,11 +1512,11 @@ 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#19 +# source://spoom//lib/spoom/deadcode.rb#20 class Spoom::Deadcode::Error < ::Spoom::Error abstract! - # source://spoom//lib/spoom/deadcode.rb#26 + # source://spoom//lib/spoom/deadcode.rb#27 sig { params(message: ::String, parent: ::Exception).void } def initialize(message, parent:); end end @@ -1567,7 +1581,7 @@ class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor end def initialize(path, source, index, plugins: T.unsafe(nil)); end - # source://spoom//lib/spoom/deadcode/indexer.rb#391 + # source://spoom//lib/spoom/deadcode/indexer.rb#459 sig do params( node: T.nilable(T.any(::SyntaxTree::ArgParen, ::SyntaxTree::Args, ::SyntaxTree::ArgsForward)) @@ -1575,6 +1589,12 @@ class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor end def call_args(node); end + # Context + # + # source://spoom//lib/spoom/deadcode/indexer.rb#367 + sig { returns(::SyntaxTree::Node) } + def current_node; end + # Definition indexing # # source://spoom//lib/spoom/deadcode/indexer.rb#281 @@ -1610,13 +1630,45 @@ class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor sig { returns(::Spoom::Deadcode::Index) } def index; end - # source://spoom//lib/spoom/deadcode/indexer.rb#377 + # source://spoom//lib/spoom/deadcode/indexer.rb#426 + sig { returns(T.nilable(::String)) } + def last_sig; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#386 + sig { returns(T.nilable(::SyntaxTree::BlockNode)) } + def nesting_block; 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/indexer.rb#396 + sig { returns(T.nilable(::String)) } + def nesting_block_call_name; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#381 + sig { returns(T.nilable(::SyntaxTree::ClassDeclaration)) } + def nesting_class; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#410 + sig { returns(T.nilable(::String)) } + def nesting_class_name; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#418 + sig { returns(T.nilable(::String)) } + def nesting_class_superclass_name; 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/indexer.rb#445 sig { params(node: ::SyntaxTree::Node).returns(::Spoom::Deadcode::Location) } def node_location(node); end # Node utils # - # source://spoom//lib/spoom/deadcode/indexer.rb#367 + # source://spoom//lib/spoom/deadcode/indexer.rb#435 sig { params(node: T.any(::Symbol, ::SyntaxTree::Node)).returns(::String) } def node_string(node); end @@ -1634,7 +1686,7 @@ class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor sig { params(name: ::String, node: ::SyntaxTree::Node).void } def reference_method(name, node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#382 + # source://spoom//lib/spoom/deadcode/indexer.rb#450 sig { params(node: ::SyntaxTree::Node).returns(::String) } def symbol_string(node); end @@ -1725,14 +1777,14 @@ class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor def visit_vcall(node); end end -# source://spoom//lib/spoom/deadcode.rb#33 +# 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#37 + # source://spoom//lib/spoom/deadcode/location.rb#54 sig do params( file: ::String, @@ -1744,39 +1796,49 @@ class Spoom::Deadcode::Location end def initialize(file, start_line, start_column, end_line, end_column); end - # source://spoom//lib/spoom/deadcode/location.rb#46 + # 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#26 + # source://spoom//lib/spoom/deadcode/location.rb#43 def end_column; end # @return [Integer] # - # source://spoom//lib/spoom/deadcode/location.rb#26 + # source://spoom//lib/spoom/deadcode/location.rb#43 def end_line; end - # source://spoom//lib/spoom/deadcode/location.rb#23 + # 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#26 + # source://spoom//lib/spoom/deadcode/location.rb#43 def start_column; end - # source://spoom//lib/spoom/deadcode/location.rb#26 + # source://spoom//lib/spoom/deadcode/location.rb#43 sig { returns(::Integer) } def start_line; end - # source://spoom//lib/spoom/deadcode/location.rb#53 + # 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 @@ -1785,18 +1847,107 @@ end # source://spoom//lib/spoom/deadcode/location.rb#11 class Spoom::Deadcode::Location::LocationError < ::Spoom::Error; end -# source://spoom//lib/spoom/deadcode.rb#32 +# 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 + + # 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 + + # 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 + + # 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 + + # 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 + # Called when an accessor is defined. # # Will be called when the indexer processes a `attr_reader`, `attr_writer` or `attr_accessor` node. @@ -1811,7 +1962,7 @@ class Spoom::Deadcode::Plugins::Base # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#72 + # 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 @@ -1829,7 +1980,7 @@ class Spoom::Deadcode::Plugins::Base # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#90 + # 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 @@ -1847,7 +1998,7 @@ class Spoom::Deadcode::Plugins::Base # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#108 + # 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 @@ -1867,7 +2018,7 @@ class Spoom::Deadcode::Plugins::Base # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#128 + # 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 @@ -1885,7 +2036,7 @@ class Spoom::Deadcode::Plugins::Base # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#146 + # 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 @@ -1903,33 +2054,107 @@ class Spoom::Deadcode::Plugins::Base # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#164 + # 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 private - # source://spoom//lib/spoom/deadcode/plugins/base.rb#171 + # Plugin utils + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#339 + sig { params(name: ::String).returns(::String) } + def camelize(name); end + + # DSL support + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#293 + sig { params(name: T.nilable(::String)).returns(T::Boolean) } + def ignored_class_name?(name); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#307 + sig { params(name: ::String).returns(T::Boolean) } + def ignored_constant_name?(name); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#312 sig { params(name: ::String).returns(T::Boolean) } def ignored_method_name?(name); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#181 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#317 + sig { params(name: ::String).returns(T::Boolean) } + def ignored_module_name?(name); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#322 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#176 + # 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#327 sig { params(const: ::Symbol).returns(T::Set[::String]) } def names(const); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#186 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#332 sig { params(const: ::Symbol).returns(T::Array[::Regexp]) } def patterns(const); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#191 - sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def reference_send_first_symbol_as_method(indexer, send); end - class << self + # Mark classes directly subclassing a class matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_classes_inheriting_from( + # "Foo", + # "Bar", + # /Baz.*/, + # ) + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#52 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_classes_inheriting_from(*names); end + + # Mark classes matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_class_names( + # "Foo", + # "Bar", + # /Baz.*/, + # ) + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#34 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_classes_named(*names); end + + # Mark constants matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_class_names( + # "FOO", + # "BAR", + # /BAZ.*/, + # ) + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#70 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_constants_named(*names); end + # Mark methods matching `names` as ignored. # # Names can be either strings or regexps: @@ -1944,13 +2169,31 @@ class Spoom::Deadcode::Plugins::Base # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#34 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#88 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_methods_named(*names); end + + # Mark modules matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_class_names( + # "Foo", + # "Bar", + # /Baz.*/, + # ) + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#106 sig { params(names: T.any(::Regexp, ::String)).void } - def ignore_method_names(*names); end + def ignore_modules_named(*names); end private - # source://spoom//lib/spoom/deadcode/plugins/base.rb#41 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#113 sig do params( names: T::Array[T.any(::Regexp, ::String)], @@ -1962,6 +2205,84 @@ class Spoom::Deadcode::Plugins::Base end 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 +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 +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 + + # 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 + + 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 +end + +# source://spoom//lib/spoom/deadcode/plugins/rspec.rb#7 +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 + + # 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 + + 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 +end + +# source://spoom//lib/spoom/deadcode/plugins/rake.rb#7 +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 + + # 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 +end + +# source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#10 +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 @@ -1970,11 +2291,39 @@ class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base private - # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#49 + # 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 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 + + # 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 + + 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#23 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } + def sorbet_type_member?(indexer, 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 @@ -1994,7 +2343,7 @@ class Spoom::Deadcode::Reference < ::T::Struct def method?; end class << self - # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -2007,6 +2356,217 @@ class Spoom::Deadcode::Reference::Kind < ::T::Enum end end +# source://spoom//lib/spoom/deadcode/remover.rb#6 +class Spoom::Deadcode::Remover + # source://spoom//lib/spoom/deadcode/remover.rb#12 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end + + # source://spoom//lib/spoom/deadcode/remover.rb#17 + sig { params(kind: ::Spoom::Deadcode::Definition::Kind, location: ::Spoom::Deadcode::Location).void } + 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 +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#467 + sig { returns(T::Array[::SyntaxTree::Node]) } + def attached_comments_and_sigs; end + + # source://spoom//lib/spoom/deadcode/remover.rb#480 + sig { returns(T.nilable(::SyntaxTree::MethodAddBlock)) } + 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#355 + sig { returns(T::Array[::SyntaxTree::Node]) } + def nesting; end + + # @return [Array] + # + # source://spoom//lib/spoom/deadcode/remover.rb#355 + def nesting=(_arg0); end + + # source://spoom//lib/spoom/deadcode/remover.rb#407 + sig { returns(T.nilable(::SyntaxTree::Node)) } + def next_node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#397 + sig { returns(T::Array[::SyntaxTree::Node]) } + def next_nodes; end + + # source://spoom//lib/spoom/deadcode/remover.rb#352 + sig { returns(::SyntaxTree::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 + sig { returns(::Spoom::Deadcode::Remover::NodeContext) } + def parent_context; end + + # source://spoom//lib/spoom/deadcode/remover.rb#365 + sig { returns(::SyntaxTree::Node) } + def parent_node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#392 + sig { returns(T.nilable(::SyntaxTree::Node)) } + def previous_node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#382 + sig { returns(T::Array[::SyntaxTree::Node]) } + def previous_nodes; end + + # source://spoom//lib/spoom/deadcode/remover.rb#412 + 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) } + def sorbet_extend_sig?(node); end + + # source://spoom//lib/spoom/deadcode/remover.rb#438 + sig { params(node: T.nilable(::SyntaxTree::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#548 + sig { returns(T.nilable(::SyntaxTree::Node)) } + def node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#551 + sig { returns(T::Array[::SyntaxTree::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 } + 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 + sig do + params( + source: ::String, + location: ::Spoom::Deadcode::Location, + kind: ::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) } + def node_match_kind?(node, kind); end + end +end + +# source://spoom//lib/spoom/deadcode/remover.rb#29 +class Spoom::Deadcode::Remover::NodeRemover + # source://spoom//lib/spoom/deadcode/remover.rb#36 + sig do + params( + source: ::String, + kind: ::Spoom::Deadcode::Definition::Kind, + location: ::Spoom::Deadcode::Location + ).void + end + def initialize(source, kind, location); end + + # source://spoom//lib/spoom/deadcode/remover.rb#46 + sig { void } + def apply_edit; end + + # source://spoom//lib/spoom/deadcode/remover.rb#33 + sig { returns(::String) } + def new_source; end + + private + + # source://spoom//lib/spoom/deadcode/remover.rb#142 + sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } + def delete_attr_accessor(context); end + + # source://spoom//lib/spoom/deadcode/remover.rb#290 + 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 + 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 + 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 + 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 + sig do + params( + node: ::SyntaxTree::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 + 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 + sig do + params( + node: ::SyntaxTree::MethodAddBlock, + name: ::String, + kind: ::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. # @@ -2018,8 +2578,22 @@ class Spoom::Deadcode::Send < ::T::Struct const :args, T::Array[::SyntaxTree::Node], default: T.unsafe(nil) const :block, T.nilable(::SyntaxTree::Node), default: T.unsafe(nil) + # source://spoom//lib/spoom/deadcode/send.rb#22 + sig do + type_parameters(:T) + .params( + arg_type: T::Class[T.type_parameter(:T)], + block: T.proc.params(arg: T.type_parameter(:T)).void + ).void + end + 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 } + def each_arg_assoc(&block); end + class << self - # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -2039,7 +2613,7 @@ class Spoom::ExecResult < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -2247,7 +2821,7 @@ class Spoom::FileTree::Node < ::T::Struct def path; end class << self - # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -2313,7 +2887,7 @@ class Spoom::Git::Commit < ::T::Struct def timestamp; end class << self - # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end # Parse a line formated as `%h %at` into a `Commit` @@ -2425,7 +2999,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.10962/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -2458,7 +3032,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.10962/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -2516,7 +3090,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.10962/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -2541,7 +3115,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.10962/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -2604,7 +3178,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.10962/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -2642,7 +3216,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.10962/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -2708,7 +3282,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.10962/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end diff --git a/sorbet/rbi/gems/sprockets@4.2.0.rbi b/sorbet/rbi/gems/sprockets@4.2.1.rbi similarity index 99% rename from sorbet/rbi/gems/sprockets@4.2.0.rbi rename to sorbet/rbi/gems/sprockets@4.2.1.rbi index cf311554f..348d963bf 100644 --- a/sorbet/rbi/gems/sprockets@4.2.0.rbi +++ b/sorbet/rbi/gems/sprockets@4.2.1.rbi @@ -150,7 +150,7 @@ class Sprockets::Asset # source://sprockets//lib/sprockets/asset.rb#207 def eql?(other); end - # Pubic: ETag String of Asset. + # Public: ETag String of Asset. # # source://sprockets//lib/sprockets/asset.rb#141 def etag; end @@ -2663,7 +2663,7 @@ module Sprockets::Loader # When this happens the dependencies for the returned asset are added to the "history", and older # entries are removed if the "history" is above `limit`. # - # source://sprockets//lib/sprockets/loader.rb#323 + # source://sprockets//lib/sprockets/loader.rb#325 def fetch_asset_from_dependency_cache(unloaded, limit = T.unsafe(nil)); end # Internal: Loads an asset and saves it to cache @@ -2694,7 +2694,7 @@ module Sprockets::Loader # # Returns array of resolved dependencies # - # source://sprockets//lib/sprockets/loader.rb#287 + # source://sprockets//lib/sprockets/loader.rb#289 def resolve_dependencies(uris); end # Internal: Save a given asset to the cache @@ -2705,7 +2705,7 @@ module Sprockets::Loader # This method converts all absolute paths to "compressed" paths # which are relative if they're in the root. # - # source://sprockets//lib/sprockets/loader.rb#237 + # source://sprockets//lib/sprockets/loader.rb#239 def store_asset(asset, unloaded); end end @@ -4221,70 +4221,70 @@ module Sprockets::Server # A request for `"/assets/foo/bar.js"` will search your # environment for `"foo/bar.js"`. # - # source://sprockets//lib/sprockets/server.rb#27 + # source://sprockets//lib/sprockets/server.rb#37 def call(env); end private # Returns a 400 Forbidden response tuple # - # source://sprockets//lib/sprockets/server.rb#149 + # source://sprockets//lib/sprockets/server.rb#159 def bad_request_response(env); end - # source://sprockets//lib/sprockets/server.rb#257 + # source://sprockets//lib/sprockets/server.rb#267 def cache_headers(env, etag); end # Returns a CSS response that hides all elements on the page and # displays the exception # - # source://sprockets//lib/sprockets/server.rb#197 + # source://sprockets//lib/sprockets/server.rb#207 def css_exception_response(exception); end # Escape special characters for use inside a CSS content("...") string # - # source://sprockets//lib/sprockets/server.rb#249 + # source://sprockets//lib/sprockets/server.rb#259 def escape_css_content(content); end # @return [Boolean] # - # source://sprockets//lib/sprockets/server.rb#122 + # source://sprockets//lib/sprockets/server.rb#132 def forbidden_request?(path); end # Returns a 403 Forbidden response tuple # - # source://sprockets//lib/sprockets/server.rb#158 + # source://sprockets//lib/sprockets/server.rb#168 def forbidden_response(env); end # @return [Boolean] # - # source://sprockets//lib/sprockets/server.rb#130 + # source://sprockets//lib/sprockets/server.rb#140 def head_request?(env); end - # source://sprockets//lib/sprockets/server.rb#278 + # source://sprockets//lib/sprockets/server.rb#288 def headers(env, asset, length); end # Returns a JavaScript response that re-throws a Ruby exception # in the browser # - # source://sprockets//lib/sprockets/server.rb#189 + # source://sprockets//lib/sprockets/server.rb#199 def javascript_exception_response(exception); end - # source://sprockets//lib/sprockets/server.rb#175 + # source://sprockets//lib/sprockets/server.rb#185 def method_not_allowed_response; end # Returns a 404 Not Found response tuple # - # source://sprockets//lib/sprockets/server.rb#167 + # source://sprockets//lib/sprockets/server.rb#177 def not_found_response(env); end # Returns a 304 Not Modified response tuple # - # source://sprockets//lib/sprockets/server.rb#144 + # source://sprockets//lib/sprockets/server.rb#154 def not_modified_response(env, etag); end # Returns a 200 OK response tuple # - # source://sprockets//lib/sprockets/server.rb#135 + # source://sprockets//lib/sprockets/server.rb#145 def ok_response(asset, env); end # Gets ETag fingerprint. @@ -4292,10 +4292,10 @@ module Sprockets::Server # "foo-0aa2105d29558f3eb790d411d7d8fb66.js" # # => "0aa2105d29558f3eb790d411d7d8fb66" # - # source://sprockets//lib/sprockets/server.rb#301 + # source://sprockets//lib/sprockets/server.rb#311 def path_fingerprint(path); end - # source://sprockets//lib/sprockets/server.rb#179 + # source://sprockets//lib/sprockets/server.rb#189 def precondition_failed_response(env); end end @@ -4304,6 +4304,12 @@ end # source://sprockets//lib/sprockets/server.rb#12 Sprockets::Server::ALLOWED_REQUEST_METHODS = T.let(T.unsafe(nil), Set) +# source://sprockets//lib/sprockets/server.rb#17 +Sprockets::Server::VARY = T.let(T.unsafe(nil), String) + +# source://sprockets//lib/sprockets/server.rb#16 +Sprockets::Server::X_CASCADE = T.let(T.unsafe(nil), String) + # The purpose of this class is to generate a source map file # that can be read and understood by browsers. # diff --git a/sorbet/rbi/gems/sqlite3@1.6.4.rbi b/sorbet/rbi/gems/sqlite3@1.7.2.rbi similarity index 92% rename from sorbet/rbi/gems/sqlite3@1.6.4.rbi rename to sorbet/rbi/gems/sqlite3@1.7.2.rbi index 4eeeace8d..d7ff4383e 100644 --- a/sorbet/rbi/gems/sqlite3@1.6.4.rbi +++ b/sorbet/rbi/gems/sqlite3@1.7.2.rbi @@ -260,7 +260,7 @@ class SQLite3::CorruptException < ::SQLite3::Exception; end # end # end # -# It wraps the lower-level methods provides by the selected driver, and +# It wraps the lower-level methods provided by the selected driver, and # includes the Pragmas module for access to various pragma convenience # methods. # @@ -281,15 +281,26 @@ class SQLite3::Database # call-seq: SQLite3::Database.new(file, options = {}) # - # Create a new Database object that opens the given file. If utf16 - # is +true+, the filename is interpreted as a UTF-16 encoded string. + # Create a new Database object that opens the given file. # - # By default, the new database will return result rows as arrays - # (#results_as_hash) and has type translation disabled (#type_translation=). + # Supported permissions +options+: + # - the default mode is READWRITE | CREATE + # - +:readonly+: boolean (default false), true to set the mode to +READONLY+ + # - +:readwrite+: boolean (default false), true to set the mode to +READWRITE+ + # - +:flags+: set the mode to a combination of SQLite3::Constants::Open flags. + # + # Supported encoding +options+: + # - +:utf16+: boolean (default false), is the filename's encoding UTF-16 (only needed if the filename encoding is not UTF_16LE or BE) + # + # Other supported +options+: + # - +:strict+: boolean (default false), disallow the use of double-quoted string literals (see https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted) + # - +:results_as_hash+: boolean (default false), return rows as hashes instead of arrays + # - +:type_translation+: boolean (default false), enable type translation + # - +:default_transaction_mode+: one of +:deferred+ (default), +:immediate+, or +:exclusive+. If a mode is not specified in a call to #transaction, this will be the default transaction mode. # # @return [Database] a new instance of Database # - # source://sqlite3//lib/sqlite3/database.rb#65 + # source://sqlite3//lib/sqlite3/database.rb#91 def initialize(file, options = T.unsafe(nil), zvfs = T.unsafe(nil)); end # Installs (or removes) a block that will be invoked for every access @@ -297,7 +308,7 @@ class SQLite3::Database # is allowed to proceed. Returning 1 causes an authorization error to # occur, and returning 2 causes the access to be silently denied. # - # source://sqlite3//lib/sqlite3/database.rb#142 + # source://sqlite3//lib/sqlite3/database.rb#167 def authorizer(&block); end def authorizer=(_arg0); end @@ -319,7 +330,7 @@ class SQLite3::Database # to allow it to be used in idioms like # abort? and rollback or commit. # - # source://sqlite3//lib/sqlite3/database.rb#654 + # source://sqlite3//lib/sqlite3/database.rb#674 def commit; end def complete?(_arg0); end @@ -361,7 +372,7 @@ class SQLite3::Database # See also #create_aggregate_handler for a more object-oriented approach to # aggregate functions. # - # source://sqlite3//lib/sqlite3/database.rb#445 + # source://sqlite3//lib/sqlite3/database.rb#462 def create_aggregate(name, arity, step = T.unsafe(nil), finalize = T.unsafe(nil), text_rep = T.unsafe(nil), &block); end # This is another approach to creating an aggregate function (see @@ -412,7 +423,7 @@ class SQLite3::Database # db.create_aggregate_handler( LengthsAggregateHandler ) # puts db.get_first_value( "select lengths(name) from A" ) # - # source://sqlite3//lib/sqlite3/database.rb#543 + # source://sqlite3//lib/sqlite3/database.rb#560 def create_aggregate_handler(handler); end # Creates a new function for use in SQL statements. It will be added as @@ -439,7 +450,7 @@ class SQLite3::Database # # puts db.get_first_value( "select maim(name) from table" ) # - # source://sqlite3//lib/sqlite3/database.rb#400 + # source://sqlite3//lib/sqlite3/database.rb#417 def create_function(name, arity, text_rep = T.unsafe(nil), &block); end # Define an aggregate function named +name+ using a object template @@ -453,7 +464,7 @@ class SQLite3::Database # already provide a suitable +clone+. # The functions arity is the arity of the +step+ method. # - # source://sqlite3//lib/sqlite3/database.rb#580 + # source://sqlite3//lib/sqlite3/database.rb#597 def define_aggregator(name, aggregator); end def define_function(_arg0); end @@ -478,7 +489,7 @@ class SQLite3::Database # See also #execute2, #query, and #execute_batch for additional ways of # executing statements. # - # source://sqlite3//lib/sqlite3/database.rb#183 + # source://sqlite3//lib/sqlite3/database.rb#208 def execute(sql, bind_vars = T.unsafe(nil), *args, &block); end # Executes the given SQL statement, exactly as with #execute. However, the @@ -492,7 +503,7 @@ class SQLite3::Database # See also #execute, #query, and #execute_batch for additional ways of # executing statements. # - # source://sqlite3//lib/sqlite3/database.rb#222 + # source://sqlite3//lib/sqlite3/database.rb#245 def execute2(sql, *bind_vars); end # Executes all SQL statements in the given string. By contrast, the other @@ -507,7 +518,7 @@ class SQLite3::Database # See also #execute_batch2 for additional ways of # executing statements. # - # source://sqlite3//lib/sqlite3/database.rb#246 + # source://sqlite3//lib/sqlite3/database.rb#269 def execute_batch(sql, bind_vars = T.unsafe(nil), *args); end # Executes all SQL statements in the given string. By contrast, the other @@ -524,7 +535,7 @@ class SQLite3::Database # See also #execute_batch for additional ways of # executing statements. # - # source://sqlite3//lib/sqlite3/database.rb#303 + # source://sqlite3//lib/sqlite3/database.rb#322 def execute_batch2(sql, &block); end def extended_result_codes=(_arg0); end @@ -533,7 +544,7 @@ class SQLite3::Database # to "main". Main return `nil` or an empty string if the database is # temporary or in-memory. # - # source://sqlite3//lib/sqlite3/database.rb#165 + # source://sqlite3//lib/sqlite3/database.rb#190 def filename(db_name = T.unsafe(nil)); end # A convenience method for obtaining the first row of a result set, and @@ -541,7 +552,7 @@ class SQLite3::Database # # See also #get_first_value. # - # source://sqlite3//lib/sqlite3/database.rb#357 + # source://sqlite3//lib/sqlite3/database.rb#374 def get_first_row(sql, *bind_vars); end # A convenience method for obtaining the first value of the first row of a @@ -550,7 +561,7 @@ class SQLite3::Database # # See also #get_first_row. # - # source://sqlite3//lib/sqlite3/database.rb#366 + # source://sqlite3//lib/sqlite3/database.rb#383 def get_first_value(sql, *bind_vars); end def interrupt; end @@ -562,7 +573,7 @@ class SQLite3::Database # # The Statement can then be executed using Statement#execute. # - # source://sqlite3//lib/sqlite3/database.rb#151 + # source://sqlite3//lib/sqlite3/database.rb#176 def prepare(sql); end # This is a convenience method for creating a statement, binding @@ -577,7 +588,7 @@ class SQLite3::Database # with a block, +close+ will be invoked implicitly when the block # terminates. # - # source://sqlite3//lib/sqlite3/database.rb#325 + # source://sqlite3//lib/sqlite3/database.rb#344 def query(sql, bind_vars = T.unsafe(nil), *args); end # Returns +true+ if the database has been open in readonly mode @@ -585,19 +596,19 @@ class SQLite3::Database # # @return [Boolean] # - # source://sqlite3//lib/sqlite3/database.rb#670 + # source://sqlite3//lib/sqlite3/database.rb#690 def readonly?; end # A boolean that indicates whether rows in result sets should be returned # as hashes or not. By default, rows are returned as arrays. # - # source://sqlite3//lib/sqlite3/database.rb#55 + # source://sqlite3//lib/sqlite3/database.rb#70 def results_as_hash; end # A boolean that indicates whether rows in result sets should be returned # as hashes or not. By default, rows are returned as arrays. # - # source://sqlite3//lib/sqlite3/database.rb#55 + # source://sqlite3//lib/sqlite3/database.rb#70 def results_as_hash=(_arg0); end # Rolls the current transaction back. If there is no current transaction, @@ -605,7 +616,7 @@ class SQLite3::Database # to allow it to be used in idioms like # abort? and rollback or commit. # - # source://sqlite3//lib/sqlite3/database.rb#663 + # source://sqlite3//lib/sqlite3/database.rb#683 def rollback; end def total_changes; end @@ -615,8 +626,10 @@ class SQLite3::Database # by SQLite, so attempting to nest a transaction will result in a runtime # exception. # - # The +mode+ parameter may be either :deferred (the default), + # The +mode+ parameter may be either :deferred, # :immediate, or :exclusive. + # If `nil` is specified, the default transaction mode, which was + # passed to #initialize, is used. # # If a block is given, the database instance is yielded to it, and the # transaction is committed when the block terminates. If the block @@ -628,14 +641,14 @@ class SQLite3::Database # transaction explicitly, either by calling #commit, or by calling # #rollback. # - # source://sqlite3//lib/sqlite3/database.rb#632 + # source://sqlite3//lib/sqlite3/database.rb#651 def transaction(mode = T.unsafe(nil)); end def transaction_active?; end # Translates a +row+ of data from the database with the given +types+ # - # source://sqlite3//lib/sqlite3/database.rb#721 + # source://sqlite3//lib/sqlite3/database.rb#741 def translate_from_db(types, row); end # Return the type translator employed by this database instance. Each @@ -645,13 +658,13 @@ class SQLite3::Database # if a database does not use type translation, it will not be burdened by # the overhead of a useless type translator. (See the Translator class.) # - # source://sqlite3//lib/sqlite3/database.rb#134 + # source://sqlite3//lib/sqlite3/database.rb#159 def translator; end - # source://sqlite3//lib/sqlite3/database.rb#126 + # source://sqlite3//lib/sqlite3/database.rb#151 def type_translation; end - # source://sqlite3//lib/sqlite3/database.rb#117 + # source://sqlite3//lib/sqlite3/database.rb#144 def type_translation=(value); end private @@ -661,20 +674,25 @@ class SQLite3::Database def disable_quirk_mode; end def exec_batch(_arg0, _arg1); end - # source://sqlite3//lib/sqlite3/database.rb#729 + # source://sqlite3//lib/sqlite3/database.rb#749 def make_type_translator(should_translate); end def open16(_arg0); end def open_v2(_arg0, _arg1, _arg2); end class << self - def open(*_arg0); end + # Without block works exactly as new. + # With block, like new closes the database at the end, but unlike new + # returns the result of the block instead of the database instance. + # + # source://sqlite3//lib/sqlite3/database.rb#45 + def open(*args); end # Quotes the given string, making it safe to use in an SQL statement. # It replaces all instances of the single-quote character with two # single-quote characters. The modified string is returned. # - # source://sqlite3//lib/sqlite3/database.rb#47 + # source://sqlite3//lib/sqlite3/database.rb#62 def quote(string); end end end @@ -688,7 +706,7 @@ end # This class will almost _always_ be instantiated indirectly, by working # with the create methods mentioned above. # -# source://sqlite3//lib/sqlite3/database.rb#682 +# source://sqlite3//lib/sqlite3/database.rb#702 class SQLite3::Database::FunctionProxy # Create a new FunctionProxy that encapsulates the given +func+ object. # If context is non-nil, the functions context will be set to that. If @@ -697,48 +715,48 @@ class SQLite3::Database::FunctionProxy # # @return [FunctionProxy] a new instance of FunctionProxy # - # source://sqlite3//lib/sqlite3/database.rb#689 + # source://sqlite3//lib/sqlite3/database.rb#709 def initialize; end # Returns the value with the given key from the context. This is only # available to aggregate functions. # - # source://sqlite3//lib/sqlite3/database.rb#709 + # source://sqlite3//lib/sqlite3/database.rb#729 def [](key); end # Sets the value with the given key in the context. This is only # available to aggregate functions. # - # source://sqlite3//lib/sqlite3/database.rb#715 + # source://sqlite3//lib/sqlite3/database.rb#735 def []=(key, value); end # (Only available to aggregate functions.) Returns the number of rows # that the aggregate has processed so far. This will include the current # row, and so will always return at least 1. # - # source://sqlite3//lib/sqlite3/database.rb#703 + # source://sqlite3//lib/sqlite3/database.rb#723 def count; end # Returns the value of attribute result. # - # source://sqlite3//lib/sqlite3/database.rb#683 + # source://sqlite3//lib/sqlite3/database.rb#703 def result; end # Sets the attribute result # # @param value the value to set the attribute result to. # - # source://sqlite3//lib/sqlite3/database.rb#683 + # source://sqlite3//lib/sqlite3/database.rb#703 def result=(_arg0); end # Set the result of the function to the given error message. # The function will then return that error. # - # source://sqlite3//lib/sqlite3/database.rb#696 + # source://sqlite3//lib/sqlite3/database.rb#716 def set_error(error); end end -# source://sqlite3//lib/sqlite3/database.rb#727 +# source://sqlite3//lib/sqlite3/database.rb#747 SQLite3::Database::NULL_TRANSLATOR = T.let(T.unsafe(nil), Proc) # source://sqlite3//lib/sqlite3/errors.rb#24 @@ -1260,45 +1278,45 @@ class SQLite3::ResultSet # # @return [ResultSet] a new instance of ResultSet # - # source://sqlite3//lib/sqlite3/resultset.rb#72 + # source://sqlite3//lib/sqlite3/resultset.rb#64 def initialize(db, stmt); end # Closes the statement that spawned this result set. # Use with caution! Closing a result set will automatically # close any other result sets that were spawned from the same statement. # - # source://sqlite3//lib/sqlite3/resultset.rb#149 + # source://sqlite3//lib/sqlite3/resultset.rb#141 def close; end # Queries whether the underlying statement has been closed or not. # # @return [Boolean] # - # source://sqlite3//lib/sqlite3/resultset.rb#154 + # source://sqlite3//lib/sqlite3/resultset.rb#146 def closed?; end # Returns the names of the columns returned by this result set. # - # source://sqlite3//lib/sqlite3/resultset.rb#164 + # source://sqlite3//lib/sqlite3/resultset.rb#156 def columns; end # Required by the Enumerable mixin. Provides an internal iterator over the # rows of the result set. # - # source://sqlite3//lib/sqlite3/resultset.rb#132 + # source://sqlite3//lib/sqlite3/resultset.rb#124 def each; end # Provides an internal iterator over the rows of the result set where # each row is yielded as a hash. # - # source://sqlite3//lib/sqlite3/resultset.rb#140 + # source://sqlite3//lib/sqlite3/resultset.rb#132 def each_hash; end # Query whether the cursor has reached the end of the result set or not. # # @return [Boolean] # - # source://sqlite3//lib/sqlite3/resultset.rb#86 + # source://sqlite3//lib/sqlite3/resultset.rb#78 def eof?; end # Obtain the next row from the cursor. If there are no more rows to be @@ -1315,23 +1333,23 @@ class SQLite3::ResultSet # For hashes, the column names are the keys of the hash, and the column # types are accessible via the +types+ property. # - # source://sqlite3//lib/sqlite3/resultset.rb#103 + # source://sqlite3//lib/sqlite3/resultset.rb#95 def next; end # Return the next row as a hash # - # source://sqlite3//lib/sqlite3/resultset.rb#169 + # source://sqlite3//lib/sqlite3/resultset.rb#161 def next_hash; end # Reset the cursor, so that a result set which has reached end-of-file # can be rewound and reiterated. # - # source://sqlite3//lib/sqlite3/resultset.rb#79 + # source://sqlite3//lib/sqlite3/resultset.rb#71 def reset(*bind_params); end # Returns the types of the columns returned by this result set. # - # source://sqlite3//lib/sqlite3/resultset.rb#159 + # source://sqlite3//lib/sqlite3/resultset.rb#151 def types; end end @@ -1352,7 +1370,7 @@ end # source://sqlite3//lib/sqlite3/resultset.rb#17 class SQLite3::ResultSet::ArrayWithTypesAndFields < ::Array - # source://sqlite3//lib/sqlite3/resultset.rb#30 + # source://sqlite3//lib/sqlite3/resultset.rb#28 def fields; end # Sets the attribute fields @@ -1376,25 +1394,25 @@ end # The class of which we return an object in case we want a Hash as # result. # -# source://sqlite3//lib/sqlite3/resultset.rb#42 +# source://sqlite3//lib/sqlite3/resultset.rb#38 class SQLite3::ResultSet::HashWithTypesAndFields < ::Hash - # source://sqlite3//lib/sqlite3/resultset.rb#64 + # source://sqlite3//lib/sqlite3/resultset.rb#56 def [](key); end - # source://sqlite3//lib/sqlite3/resultset.rb#55 + # source://sqlite3//lib/sqlite3/resultset.rb#49 def fields; end # Sets the attribute fields # # @param value the value to set the attribute fields to. # - # source://sqlite3//lib/sqlite3/resultset.rb#44 + # source://sqlite3//lib/sqlite3/resultset.rb#40 def fields=(_arg0); end - # source://sqlite3//lib/sqlite3/resultset.rb#46 + # source://sqlite3//lib/sqlite3/resultset.rb#42 def types; end - # source://sqlite3//lib/sqlite3/resultset.rb#43 + # source://sqlite3//lib/sqlite3/resultset.rb#39 def types=(_arg0); end end @@ -1580,7 +1598,7 @@ class SQLite3::Translator # itself is always returned. Further, +nil+ values are never translated, # and are always passed straight through regardless of the type parameter. # - # source://sqlite3//lib/sqlite3/translator.rb#49 + # source://sqlite3//lib/sqlite3/translator.rb#48 def translate(type, value); end private @@ -1588,13 +1606,13 @@ class SQLite3::Translator # Register the default translators for the current Translator instance. # This includes translators for most major SQL data types. # - # source://sqlite3//lib/sqlite3/translator.rb#73 + # source://sqlite3//lib/sqlite3/translator.rb#72 def register_default_translators; end # A convenience method for working with type names. This returns the "base" # type name, without any parenthetical data. # - # source://sqlite3//lib/sqlite3/translator.rb#62 + # source://sqlite3//lib/sqlite3/translator.rb#61 def type_name(type); end end diff --git a/sorbet/rbi/gems/state_machines@0.6.0.rbi b/sorbet/rbi/gems/state_machines@0.6.0.rbi index d6c89c7ff..88cd3575b 100644 --- a/sorbet/rbi/gems/state_machines@0.6.0.rbi +++ b/sorbet/rbi/gems/state_machines@0.6.0.rbi @@ -84,6 +84,13 @@ class StateMachines::AllMatcher < ::StateMachines::Matcher # # source://state_machines//lib/state_machines/matcher.rb#38 def matches?(value, context = T.unsafe(nil)); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end end # Represents a collection of transitions that were generated from attribute- @@ -122,7 +129,7 @@ end # Matches everything but a specific set of values # -# source://state_machines//lib/state_machines/matcher.rb#82 +# source://state_machines//lib/state_machines/matcher.rb#74 class StateMachines::BlacklistMatcher < ::StateMachines::Matcher # A human-readable description of this matcher # @@ -564,7 +571,7 @@ end # An error occurred during a state machine invocation # -# source://state_machines//lib/state_machines/error.rb#4 +# source://state_machines//lib/state_machines/error.rb#3 class StateMachines::Error < ::StandardError # @return [Error] a new instance of Error # @@ -1263,7 +1270,7 @@ class StateMachines::InvalidContext < ::StateMachines::Error; end # An invalid event was specified # -# source://state_machines//lib/state_machines/error.rb#47 +# source://state_machines//lib/state_machines/error.rb#46 class StateMachines::InvalidEvent < ::StateMachines::Error # @return [InvalidEvent] a new instance of InvalidEvent # @@ -1278,7 +1285,7 @@ end # A set of transition failed to run in parallel # -# source://state_machines//lib/state_machines/error.rb#99 +# source://state_machines//lib/state_machines/error.rb#98 class StateMachines::InvalidParallelTransition < ::StateMachines::Error # @return [InvalidParallelTransition] a new instance of InvalidParallelTransition # @@ -1293,7 +1300,7 @@ end # An invalid transition was attempted # -# source://state_machines//lib/state_machines/error.rb#58 +# source://state_machines//lib/state_machines/error.rb#57 class StateMachines::InvalidTransition < ::StateMachines::Error # @return [InvalidTransition] a new instance of InvalidTransition # @@ -1357,6 +1364,13 @@ class StateMachines::LoopbackMatcher < ::StateMachines::Matcher # # source://state_machines//lib/state_machines/matcher.rb#112 def matches?(value, context); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end end # Represents a state machine for a particular attribute. State machines @@ -3750,7 +3764,7 @@ end # Represents a collection of state machines for a class # -# source://state_machines//lib/state_machines/machine_collection.rb#21 +# source://state_machines//lib/state_machines/machine_collection.rb#3 class StateMachines::MachineCollection < ::Hash # Runs one or more events in parallel on the given object. See # StateMachines::InstanceMethods#fire_events for more information. @@ -5721,7 +5735,7 @@ StateMachines::VERSION = T.let(T.unsafe(nil), String) # Matches a specific set of values # -# source://state_machines//lib/state_machines/matcher.rb#62 +# source://state_machines//lib/state_machines/matcher.rb#54 class StateMachines::WhitelistMatcher < ::StateMachines::Matcher # A human-readable description of this matcher # diff --git a/sorbet/rbi/gems/stringio@3.1.0.rbi b/sorbet/rbi/gems/stringio@3.1.0.rbi new file mode 100644 index 000000000..01a26ea58 --- /dev/null +++ b/sorbet/rbi/gems/stringio@3.1.0.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# 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/thor@1.2.2.rbi b/sorbet/rbi/gems/thor@1.3.1.rbi similarity index 79% rename from sorbet/rbi/gems/thor@1.2.2.rbi rename to sorbet/rbi/gems/thor@1.3.1.rbi index dcb11ee22..a806aa385 100644 --- a/sorbet/rbi/gems/thor@1.2.2.rbi +++ b/sorbet/rbi/gems/thor@1.3.1.rbi @@ -4,6 +4,30 @@ # 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 + + # Overwrite show_diff to show diff with colors if Diff::LCS is + # available. + # + # source://thor//lib/thor/shell/lcs_diff.rb#6 + def show_diff(destination, content); end + + private + + # Check if Diff::LCS is loaded. If it is, use it to create pretty output + # for diff. + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/lcs_diff.rb#37 + def diff_lcs_loaded?; end + + # source://thor//lib/thor/shell/lcs_diff.rb#21 + def output_diff_line(diff); end +end + # source://thor//lib/thor/command.rb#1 class Thor include ::Thor::Base @@ -12,23 +36,63 @@ class Thor extend ::Thor::Base::ClassMethods extend ::Thor::Invocation::ClassMethods - # source://thor//lib/thor.rb#505 + # source://thor//lib/thor.rb#652 def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end class << self + # Adds and declares option group for required at least one of options in the + # block of arguments. You can declare options as the outside of the block. + # + # If :for is given as option, it allows you to change the options from + # a previous defined command. + # + # ==== Parameters + # Array[Thor::Option.name] + # options:: :for is applied for previous defined command. + # + # ==== Examples + # + # at_least_one do + # option :one + # option :two + # end + # + # Or + # + # option :one + # option :two + # at_least_one :one, :two + # + # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError + # will be raised. + # + # You can use at_least_one and exclusive at the same time. + # + # exclusive do + # at_least_one do + # option :one + # option :two + # end + # end + # + # Then it is required either only one of "--one" or "--two". + # + # source://thor//lib/thor.rb#246 + def at_least_one(*args, &block); end + # Extend check unknown options to accept a hash of conditions. # # === Parameters # options: A hash containing :only and/or :except keys # - # source://thor//lib/thor.rb#255 + # source://thor//lib/thor.rb#350 def check_unknown_options!(options = T.unsafe(nil)); end # Overwrite check_unknown_options? to take subcommands and options into account. # # @return [Boolean] # - # source://thor//lib/thor.rb#268 + # source://thor//lib/thor.rb#363 def check_unknown_options?(config); end # Prints help information for the given command. @@ -37,7 +101,7 @@ class Thor # shell # command_name # - # source://thor//lib/thor.rb#172 + # source://thor//lib/thor.rb#258 def command_help(shell, command_name); end # Sets the default command when thor is executed without an explicit command to be called. @@ -76,28 +140,64 @@ class Thor # ==== Parameters # Symbol ...:: A list of commands that should be affected. # - # source://thor//lib/thor.rb#339 + # source://thor//lib/thor.rb#434 def disable_required_check!(*command_names); end # @return [Boolean] # - # source://thor//lib/thor.rb#343 + # source://thor//lib/thor.rb#438 def disable_required_check?(command); end + # Adds and declares option group for exclusive options in the + # block and arguments. You can declare options as the outside of the block. + # + # If :for is given as option, it allows you to change the options from + # a previous defined command. + # + # ==== Parameters + # Array[Thor::Option.name] + # options:: :for is applied for previous defined command. + # + # ==== Examples + # + # exclusive do + # option :one + # option :two + # end + # + # Or + # + # option :one + # option :two + # exclusive :one, :two + # + # If you give "--one" and "--two" at the same time ExclusiveArgumentsError + # will be raised. + # + # source://thor//lib/thor.rb#203 + def exclusive(*args, &block); end + # Prints help information for this class. # # ==== Parameters # shell # - # source://thor//lib/thor.rb#195 + # source://thor//lib/thor.rb#288 def help(shell, subcommand = T.unsafe(nil)); end # Defines the long description of the next command. # + # Long description is by default indented, line-wrapped and repeated whitespace merged. + # In order to print long description verbatim, with indentation and spacing exactly + # as found in the code, use the +wrap+ option + # + # long_desc 'your very long description', wrap: false + # # ==== Parameters # long description + # options # - # source://thor//lib/thor.rb#71 + # source://thor//lib/thor.rb#78 def long_desc(long_description, options = T.unsafe(nil)); end # Maps an input to a command. If you define: @@ -113,9 +213,78 @@ class Thor # ==== Parameters # Hash[String|Array => Symbol]:: Maps the string or the strings in the array to the given command. # - # source://thor//lib/thor.rb#93 + # source://thor//lib/thor.rb#101 def map(mappings = T.unsafe(nil), **kw); end + # Adds and declares option group for required at least one of options in the + # block of arguments. You can declare options as the outside of the block. + # + # If :for is given as option, it allows you to change the options from + # a previous defined command. + # + # ==== Parameters + # Array[Thor::Option.name] + # options:: :for is applied for previous defined command. + # + # ==== Examples + # + # at_least_one do + # option :one + # option :two + # end + # + # Or + # + # option :one + # option :two + # at_least_one :one, :two + # + # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError + # will be raised. + # + # You can use at_least_one and exclusive at the same time. + # + # exclusive do + # at_least_one do + # option :one + # option :two + # end + # end + # + # Then it is required either only one of "--one" or "--two". + # + # source://thor//lib/thor.rb#246 + def method_at_least_one(*args, &block); end + + # Adds and declares option group for exclusive options in the + # block and arguments. You can declare options as the outside of the block. + # + # If :for is given as option, it allows you to change the options from + # a previous defined command. + # + # ==== Parameters + # Array[Thor::Option.name] + # options:: :for is applied for previous defined command. + # + # ==== Examples + # + # exclusive do + # option :one + # option :two + # end + # + # Or + # + # option :one + # option :two + # exclusive :one, :two + # + # If you give "--one" and "--two" at the same time ExclusiveArgumentsError + # will be raised. + # + # source://thor//lib/thor.rb#203 + def method_exclusive(*args, &block); end + # Adds an option to the set of method options. If :for is given as option, # it allows you to change the options from a previous defined command. # @@ -123,7 +292,7 @@ class Thor # # magic # end # - # method_option :foo => :bar, :for => :previous_command + # method_option :foo, :for => :previous_command # # def next_command # # magic @@ -142,7 +311,7 @@ class Thor # :banner - String to show on usage notes. # :hide - If you want to hide this option from the help. # - # source://thor//lib/thor.rb#155 + # source://thor//lib/thor.rb#163 def method_option(name, options = T.unsafe(nil)); end # Declares the options for the next command to be declared. @@ -152,7 +321,7 @@ class Thor # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric # or :required (string). If you give a value, the type of the value is used. # - # source://thor//lib/thor.rb#121 + # source://thor//lib/thor.rb#129 def method_options(options = T.unsafe(nil)); end # Adds an option to the set of method options. If :for is given as option, @@ -162,7 +331,7 @@ class Thor # # magic # end # - # method_option :foo => :bar, :for => :previous_command + # method_option :foo, :for => :previous_command # # def next_command # # magic @@ -181,7 +350,7 @@ class Thor # :banner - String to show on usage notes. # :hide - If you want to hide this option from the help. # - # source://thor//lib/thor.rb#155 + # source://thor//lib/thor.rb#163 def option(name, options = T.unsafe(nil)); end # Declares the options for the next command to be declared. @@ -191,7 +360,7 @@ class Thor # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric # or :required (string). If you give a value, the type of the value is used. # - # source://thor//lib/thor.rb#121 + # source://thor//lib/thor.rb#129 def options(options = T.unsafe(nil)); end # Allows for custom "Command" package naming. @@ -205,12 +374,12 @@ class Thor # Returns commands ready to be printed. # - # source://thor//lib/thor.rb#214 + # source://thor//lib/thor.rb#309 def printable_commands(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end # Returns commands ready to be printed. # - # source://thor//lib/thor.rb#214 + # source://thor//lib/thor.rb#309 def printable_tasks(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end # Registers another Thor subclass as a command. @@ -262,27 +431,27 @@ class Thor # ==== Parameters # Symbol ...:: A list of commands that should be affected. # - # source://thor//lib/thor.rb#325 + # source://thor//lib/thor.rb#420 def stop_on_unknown_option!(*command_names); end # @return [Boolean] # - # source://thor//lib/thor.rb#329 + # source://thor//lib/thor.rb#424 def stop_on_unknown_option?(command); end - # source://thor//lib/thor.rb#234 + # source://thor//lib/thor.rb#329 def subcommand(subcommand, subcommand_class); end - # source://thor//lib/thor.rb#230 + # source://thor//lib/thor.rb#325 def subcommand_classes; end - # source://thor//lib/thor.rb#225 + # source://thor//lib/thor.rb#320 def subcommands; end - # source://thor//lib/thor.rb#234 + # source://thor//lib/thor.rb#329 def subtask(subcommand, subcommand_class); end - # source://thor//lib/thor.rb#225 + # source://thor//lib/thor.rb#320 def subtasks; end # Prints help information for the given command. @@ -291,7 +460,7 @@ class Thor # shell # command_name # - # source://thor//lib/thor.rb#172 + # source://thor//lib/thor.rb#258 def task_help(shell, command_name); end protected @@ -301,50 +470,66 @@ 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#400 + # source://thor//lib/thor.rb#535 def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://thor//lib/thor.rb#406 + # source://thor//lib/thor.rb#541 def baseclass; end - # source://thor//lib/thor.rb#414 + # source://thor//lib/thor.rb#549 def create_command(meth); end - # source://thor//lib/thor.rb#414 + # source://thor//lib/thor.rb#549 def create_task(meth); end # help command has the required check disabled by default. # - # source://thor//lib/thor.rb#354 + # source://thor//lib/thor.rb#467 def disable_required_check; end # The method responsible for dispatching given the args. # # @yield [instance] # - # source://thor//lib/thor.rb#359 + # source://thor//lib/thor.rb#494 def dispatch(meth, given_args, given_opts, config); end - # source://thor//lib/thor.rb#410 + # source://thor//lib/thor.rb#545 def dynamic_command_class; end # this is the logic that takes the command name passed in by the user # and determines whether it is an unambiguous substrings of a command or # alias name. # - # source://thor//lib/thor.rb#476 + # source://thor//lib/thor.rb#615 def find_command_possibilities(meth); end # this is the logic that takes the command name passed in by the user # and determines whether it is an unambiguous substrings of a command or # alias name. # - # source://thor//lib/thor.rb#476 + # source://thor//lib/thor.rb#615 def find_task_possibilities(meth); end - # source://thor//lib/thor.rb#436 + # source://thor//lib/thor.rb#575 def initialize_added; end + # Returns this class at least one of required options array set. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # source://thor//lib/thor.rb#458 + def method_at_least_one_option_names; end + + # Returns this class exclusive options array set. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # source://thor//lib/thor.rb#449 + def method_exclusive_option_names; end + # receives a (possibly nil) command name and returns a name that is in # the commands hash. In addition to normalizing aliases, this logic # will determine if a shortened command is an unambiguous substring of @@ -355,7 +540,7 @@ class Thor # # @raise [AmbiguousTaskError] # - # source://thor//lib/thor.rb#455 + # source://thor//lib/thor.rb#594 def normalize_command_name(meth); end # receives a (possibly nil) command name and returns a name that is in @@ -368,26 +553,40 @@ class Thor # # @raise [AmbiguousTaskError] # - # source://thor//lib/thor.rb#455 + # source://thor//lib/thor.rb#594 def normalize_task_name(meth); end + # source://thor//lib/thor.rb#482 + def print_at_least_one_required_options(shell, command = T.unsafe(nil)); end + + # source://thor//lib/thor.rb#471 + def print_exclusive_options(shell, command = T.unsafe(nil)); end + # Retrieve the command name from given args. # - # source://thor//lib/thor.rb#442 + # source://thor//lib/thor.rb#581 def retrieve_command_name(args); end # Retrieve the command name from given args. # - # source://thor//lib/thor.rb#442 + # source://thor//lib/thor.rb#581 def retrieve_task_name(args); end - # source://thor//lib/thor.rb#349 + # Sort the commands, lexicographically by default. + # + # Can be overridden in the subclass to change the display order of the + # commands. + # + # source://thor//lib/thor.rb#642 + def sort_commands!(list); end + + # source://thor//lib/thor.rb#462 def stop_on_unknown_option; end - # source://thor//lib/thor.rb#491 + # source://thor//lib/thor.rb#630 def subcommand_help(cmd); end - # source://thor//lib/thor.rb#491 + # source://thor//lib/thor.rb#630 def subtask_help(cmd); end end end @@ -463,7 +662,7 @@ module Thor::Actions # 'config.gem "rspec"' # end # - # source://thor//lib/thor/actions/file_manipulation.rb#195 + # source://thor//lib/thor/actions/file_manipulation.rb#192 def append_file(path, *args, &block); end # Append text to a file. Since it depends on insert_into_file, it's reversible. @@ -481,7 +680,7 @@ module Thor::Actions # 'config.gem "rspec"' # end # - # source://thor//lib/thor/actions/file_manipulation.rb#195 + # source://thor//lib/thor/actions/file_manipulation.rb#192 def append_to_file(path, *args, &block); end # Loads an external file and execute it in the instance binding. @@ -522,7 +721,7 @@ module Thor::Actions # # chmod "script/server", 0755 # - # source://thor//lib/thor/actions/file_manipulation.rb#148 + # source://thor//lib/thor/actions/file_manipulation.rb#145 def chmod(path, mode, config = T.unsafe(nil)); end # Comment all lines matching a given regex. It will leave the space @@ -538,16 +737,25 @@ module Thor::Actions # # comment_lines 'config/initializers/session_store.rb', /cookie_store/ # - # source://thor//lib/thor/actions/file_manipulation.rb#312 + # source://thor//lib/thor/actions/file_manipulation.rb#308 def comment_lines(path, flag, *args); end + # Copies the file from the relative source to the relative destination. If + # the destination is not given it's assumed to be equal to the source. + # + # ==== Parameters + # source:: the relative path to the source root. + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status, and + # :mode => :preserve, to preserve the file mode from the source. + # # ==== Examples # # copy_file "README", "doc/README" # # copy_file "doc/README" # - # source://thor//lib/thor/actions/file_manipulation.rb#21 + # source://thor//lib/thor/actions/file_manipulation.rb#20 def copy_file(source, *args, &block); end # Create a new file relative to the destination root with the given data, @@ -673,17 +881,20 @@ module Thor::Actions # ==== Parameters # source:: the address of the given content. # destination:: the relative path to the destination root. - # config:: give :verbose => false to not log the status. + # config:: give :verbose => false to not log the status, and + # :http_headers => to add headers to an http request. # # ==== Examples # # get "http://gist.github.com/103208", "doc/README" # + # get "http://gist.github.com/103208", "doc/README", :http_headers => {"Content-Type" => "application/json"} + # # get "http://gist.github.com/103208" do |content| # content.split("\n").first # end # - # source://thor//lib/thor/actions/file_manipulation.rb#79 + # source://thor//lib/thor/actions/file_manipulation.rb#81 def get(source, *args, &block); end # Run a regular expression replacement on a file. @@ -703,7 +914,7 @@ module Thor::Actions # match << " no more. Use thor!" # end # - # source://thor//lib/thor/actions/file_manipulation.rb#265 + # source://thor//lib/thor/actions/file_manipulation.rb#262 def gsub_file(path, flag, *args, &block); end # Goes to the root and execute the given block. @@ -728,7 +939,7 @@ module Thor::Actions # " filter_parameter :password\n" # end # - # source://thor//lib/thor/actions/file_manipulation.rb#219 + # source://thor//lib/thor/actions/file_manipulation.rb#216 def inject_into_class(path, klass, *args, &block); end # source://thor//lib/thor/actions/inject_into_file.rb#26 @@ -751,7 +962,7 @@ module Thor::Actions # " def help; 'help'; end\n" # end # - # source://thor//lib/thor/actions/file_manipulation.rb#242 + # source://thor//lib/thor/actions/file_manipulation.rb#239 def inject_into_module(path, module_name, *args, &block); end # source://thor//lib/thor/actions/inject_into_file.rb#26 @@ -785,7 +996,7 @@ module Thor::Actions # # link_file "doc/README" # - # source://thor//lib/thor/actions/file_manipulation.rb#51 + # source://thor//lib/thor/actions/file_manipulation.rb#50 def link_file(source, *args); end # Prepend text to a file. Since it depends on insert_into_file, it's reversible. @@ -803,7 +1014,7 @@ module Thor::Actions # 'config.gem "rspec"' # end # - # source://thor//lib/thor/actions/file_manipulation.rb#173 + # source://thor//lib/thor/actions/file_manipulation.rb#170 def prepend_file(path, *args, &block); end # Prepend text to a file. Since it depends on insert_into_file, it's reversible. @@ -821,7 +1032,7 @@ module Thor::Actions # 'config.gem "rspec"' # end # - # source://thor//lib/thor/actions/file_manipulation.rb#173 + # source://thor//lib/thor/actions/file_manipulation.rb#170 def prepend_to_file(path, *args, &block); end # Returns the given path relative to the absolute root (ie, root where @@ -841,7 +1052,7 @@ module Thor::Actions # remove_file 'README' # remove_file 'app/controllers/application_controller.rb' # - # source://thor//lib/thor/actions/file_manipulation.rb#329 + # source://thor//lib/thor/actions/file_manipulation.rb#325 def remove_dir(path, config = T.unsafe(nil)); end # Removes a file at the given location. @@ -855,7 +1066,7 @@ module Thor::Actions # remove_file 'README' # remove_file 'app/controllers/application_controller.rb' # - # source://thor//lib/thor/actions/file_manipulation.rb#329 + # source://thor//lib/thor/actions/file_manipulation.rb#325 def remove_file(path, config = T.unsafe(nil)); end # Executes a command returning the contents of the command. @@ -871,7 +1082,7 @@ module Thor::Actions # run('ln -s ~/edge rails') # end # - # source://thor//lib/thor/actions.rb#249 + # source://thor//lib/thor/actions.rb#248 def run(command, config = T.unsafe(nil)); end # Executes a ruby script (taking into account WIN32 platform quirks). @@ -880,7 +1091,7 @@ module Thor::Actions # command:: the command to be executed. # config:: give :verbose => false to not log the status. # - # source://thor//lib/thor/actions.rb#286 + # source://thor//lib/thor/actions.rb#285 def run_ruby_script(command, config = T.unsafe(nil)); end # Holds source paths in instance so they can be manipulated. @@ -903,7 +1114,7 @@ module Thor::Actions # # template "doc/README" # - # source://thor//lib/thor/actions/file_manipulation.rb#115 + # source://thor//lib/thor/actions/file_manipulation.rb#117 def template(source, *args, &block); end # Run a thor command. A hash of options can be given and it's converted to @@ -924,12 +1135,11 @@ module Thor::Actions # thor :list, :all => true, :substring => 'rails' # #=> thor list --all --substring=rails # - # source://thor//lib/thor/actions.rb#309 + # source://thor//lib/thor/actions.rb#308 def thor(command, *args); end - # Uncomment all lines matching a given regex. It will leave the space - # which existed before the comment hash in tact but will remove any spacing - # between the comment hash and the beginning of the line. + # Uncomment all lines matching a given regex. Preserves indentation before + # the comment hash and removes the hash and any immediate following space. # # ==== Parameters # path:: path of the file to be changed @@ -940,40 +1150,40 @@ module Thor::Actions # # uncomment_lines 'config/initializers/session_store.rb', /active_record/ # - # source://thor//lib/thor/actions/file_manipulation.rb#293 + # source://thor//lib/thor/actions/file_manipulation.rb#289 def uncomment_lines(path, flag, *args); end protected - # source://thor//lib/thor/actions.rb#330 + # source://thor//lib/thor/actions.rb#329 def _cleanup_options_and_set(options, key); end # Allow current root to be shared between invocations. # - # source://thor//lib/thor/actions.rb#326 + # source://thor//lib/thor/actions.rb#325 def _shared_configuration; end private - # source://thor//lib/thor/actions/file_manipulation.rb#350 + # source://thor//lib/thor/actions/file_manipulation.rb#346 def capture(*args); end - # source://thor//lib/thor/actions/file_manipulation.rb#346 + # source://thor//lib/thor/actions/file_manipulation.rb#342 def concat(string); end # Returns the value of attribute output_buffer. # - # source://thor//lib/thor/actions/file_manipulation.rb#341 + # source://thor//lib/thor/actions/file_manipulation.rb#337 def output_buffer; end # Sets the attribute output_buffer # # @param value the value to set the attribute output_buffer to. # - # source://thor//lib/thor/actions/file_manipulation.rb#341 + # source://thor//lib/thor/actions/file_manipulation.rb#337 def output_buffer=(_arg0); end - # source://thor//lib/thor/actions/file_manipulation.rb#354 + # source://thor//lib/thor/actions/file_manipulation.rb#350 def with_output_buffer(buf = T.unsafe(nil)); end class << self @@ -985,9 +1195,9 @@ end # Thor::Actions#capture depends on what kind of buffer is used in ERB. # Thus CapturableERB fixes ERB to use String buffer. # -# source://thor//lib/thor/actions/file_manipulation.rb#366 +# source://thor//lib/thor/actions/file_manipulation.rb#362 class Thor::Actions::CapturableERB < ::ERB - # source://thor//lib/thor/actions/file_manipulation.rb#367 + # source://thor//lib/thor/actions/file_manipulation.rb#363 def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end end @@ -1043,12 +1253,12 @@ class Thor::Actions::CreateFile < ::Thor::Actions::EmptyDirectory # source://thor//lib/thor/actions/create_file.rb#45 def identical?; end - # source://thor//lib/thor/actions/create_file.rb#59 + # source://thor//lib/thor/actions/create_file.rb#60 def invoke!; end # Holds the content to be added to the file. # - # source://thor//lib/thor/actions/create_file.rb#51 + # source://thor//lib/thor/actions/create_file.rb#52 def render; end protected @@ -1057,19 +1267,19 @@ class Thor::Actions::CreateFile < ::Thor::Actions::EmptyDirectory # # @return [Boolean] # - # source://thor//lib/thor/actions/create_file.rb#99 + # source://thor//lib/thor/actions/create_file.rb#100 def force_on_collision?; end # If force is true, run the action, otherwise check if it's not being # skipped. If both are false, show the file_collision menu, if the menu # returns true, force it, otherwise skip. # - # source://thor//lib/thor/actions/create_file.rb#85 + # source://thor//lib/thor/actions/create_file.rb#86 def force_or_skip_or_conflict(force, skip, &block); end # Now on conflict we check if the file is identical or not. # - # source://thor//lib/thor/actions/create_file.rb#72 + # source://thor//lib/thor/actions/create_file.rb#73 def on_conflict_behavior(&block); end end @@ -1261,17 +1471,25 @@ class Thor::Actions::InjectIntoFile < ::Thor::Actions::EmptyDirectory # source://thor//lib/thor/actions/inject_into_file.rb#37 def replacement; end - # source://thor//lib/thor/actions/inject_into_file.rb#72 + # source://thor//lib/thor/actions/inject_into_file.rb#74 def revoke!; end protected + # source://thor//lib/thor/actions/inject_into_file.rb#110 + def content; end + # Adds the content to the file. # - # source://thor//lib/thor/actions/inject_into_file.rb#108 + # source://thor//lib/thor/actions/inject_into_file.rb#120 def replace!(regexp, string, force); end - # source://thor//lib/thor/actions/inject_into_file.rb#88 + # @return [Boolean] + # + # source://thor//lib/thor/actions/inject_into_file.rb#114 + def replacement_present?; end + + # source://thor//lib/thor/actions/inject_into_file.rb#90 def say_status(behavior, warning: T.unsafe(nil), color: T.unsafe(nil)); end end @@ -1297,10 +1515,10 @@ end # source://thor//lib/thor/actions/inject_into_file.rb#24 Thor::Actions::WARNINGS = T.let(T.unsafe(nil), Hash) -# source://thor//lib/thor/error.rb#68 +# source://thor//lib/thor/error.rb#57 class Thor::AmbiguousCommandError < ::Thor::Error; end -# source://thor//lib/thor/error.rb#70 +# source://thor//lib/thor/error.rb#59 Thor::AmbiguousTaskError = Thor::AmbiguousCommandError # source://thor//lib/thor/parser/argument.rb#2 @@ -1331,6 +1549,9 @@ class Thor::Argument # source://thor//lib/thor/parser/argument.rb#5 def enum; end + # source://thor//lib/thor/parser/argument.rb#52 + def enum_to_s; end + # Returns the value of attribute name. # # source://thor//lib/thor/parser/argument.rb#5 @@ -1341,6 +1562,9 @@ class Thor::Argument # source://thor//lib/thor/parser/argument.rb#5 def name; end + # source://thor//lib/thor/parser/argument.rb#27 + def print_default; end + # Returns the value of attribute required. # # source://thor//lib/thor/parser/argument.rb#5 @@ -1348,12 +1572,12 @@ class Thor::Argument # @return [Boolean] # - # source://thor//lib/thor/parser/argument.rb#31 + # source://thor//lib/thor/parser/argument.rb#39 def required?; end # @return [Boolean] # - # source://thor//lib/thor/parser/argument.rb#35 + # source://thor//lib/thor/parser/argument.rb#43 def show_default?; end # Returns the value of attribute type. @@ -1361,22 +1585,22 @@ class Thor::Argument # source://thor//lib/thor/parser/argument.rb#5 def type; end - # source://thor//lib/thor/parser/argument.rb#27 + # source://thor//lib/thor/parser/argument.rb#35 def usage; end protected - # source://thor//lib/thor/parser/argument.rb#55 + # source://thor//lib/thor/parser/argument.rb#71 def default_banner; end # @return [Boolean] # - # source://thor//lib/thor/parser/argument.rb#51 + # source://thor//lib/thor/parser/argument.rb#67 def valid_type?(type); end # @raise [ArgumentError] # - # source://thor//lib/thor/parser/argument.rb#46 + # source://thor//lib/thor/parser/argument.rb#62 def validate!; end end @@ -1392,10 +1616,10 @@ class Thor::Arguments # source://thor//lib/thor/parser/arguments.rb#26 def initialize(arguments = T.unsafe(nil)); end - # source://thor//lib/thor/parser/arguments.rb#44 + # source://thor//lib/thor/parser/arguments.rb#40 def parse(args); end - # source://thor//lib/thor/parser/arguments.rb#57 + # source://thor//lib/thor/parser/arguments.rb#53 def remaining; end private @@ -1404,22 +1628,22 @@ class Thor::Arguments # # @raise [RequiredArgumentMissingError] # - # source://thor//lib/thor/parser/arguments.rb#170 + # source://thor//lib/thor/parser/arguments.rb#186 def check_requirement!; end # @return [Boolean] # - # source://thor//lib/thor/parser/arguments.rb#88 + # source://thor//lib/thor/parser/arguments.rb#84 def current_is_value?; end # @return [Boolean] # - # source://thor//lib/thor/parser/arguments.rb#68 + # source://thor//lib/thor/parser/arguments.rb#64 def last?; end # @return [Boolean] # - # source://thor//lib/thor/parser/arguments.rb#63 + # source://thor//lib/thor/parser/arguments.rb#59 def no_or_skip?(arg); end # Runs through the argument array getting all strings until no string is @@ -1431,7 +1655,7 @@ class Thor::Arguments # # ["a", "b", "c"] # - # source://thor//lib/thor/parser/arguments.rb#122 + # source://thor//lib/thor/parser/arguments.rb#118 def parse_array(name); end # Runs through the argument array getting strings that contains ":" and @@ -1443,14 +1667,14 @@ class Thor::Arguments # # { "name" => "string", "age" => "integer" } # - # source://thor//lib/thor/parser/arguments.rb#101 + # source://thor//lib/thor/parser/arguments.rb#97 def parse_hash(name); end # Check if the peek is numeric format and return a Float or Integer. # Check if the peek is included in enum if enum is provided. # Otherwise raises an error. # - # source://thor//lib/thor/parser/arguments.rb#133 + # source://thor//lib/thor/parser/arguments.rb#139 def parse_numeric(name); end # Parse string: @@ -1458,18 +1682,23 @@ class Thor::Arguments # for --no-string-arg, nil # Check if the peek is included in enum if enum is provided. Otherwise raises an error. # - # source://thor//lib/thor/parser/arguments.rb#154 + # source://thor//lib/thor/parser/arguments.rb#158 def parse_string(name); end - # source://thor//lib/thor/parser/arguments.rb#72 + # source://thor//lib/thor/parser/arguments.rb#68 def peek; end - # source://thor//lib/thor/parser/arguments.rb#76 + # source://thor//lib/thor/parser/arguments.rb#72 def shift; end - # source://thor//lib/thor/parser/arguments.rb#80 + # source://thor//lib/thor/parser/arguments.rb#76 def unshift(arg); end + # Raises an error if the switch is an enum and the values aren't included on it. + # + # source://thor//lib/thor/parser/arguments.rb#172 + def validate_enum_value!(name, value, message); end + class << self # source://thor//lib/thor/parser/arguments.rb#19 def parse(*args); end @@ -1485,6 +1714,9 @@ end # source://thor//lib/thor/parser/arguments.rb#3 Thor::Arguments::NUMERIC = T.let(T.unsafe(nil), Regexp) +# source://thor//lib/thor/error.rb#104 +class Thor::AtLeastOneRequiredArgumentError < ::Thor::InvocationError; end + # source://thor//lib/thor/shell.rb#4 module Thor::Base include ::Thor::Invocation @@ -1549,13 +1781,13 @@ module Thor::Base def parent_options=(_arg0); end class << self - # source://thor//lib/thor/base.rb#100 + # source://thor//lib/thor/base.rb#116 def included(base); end # Whenever a class inherits from Thor or Thor::Group, we should track the # class and the file on Thor::Base. This is the method responsible for it. # - # source://thor//lib/thor/base.rb#128 + # source://thor//lib/thor/base.rb#144 def register_klass_file(klass); end # Returns the shell used in all Thor classes. If you are in a Unix platform @@ -1576,7 +1808,7 @@ module Thor::Base # ==== Returns # Hash[path => Class] # - # source://thor//lib/thor/base.rb#121 + # source://thor//lib/thor/base.rb#137 def subclass_files; end # Returns the classes that inherits from Thor or Thor::Group. @@ -1584,12 +1816,12 @@ module Thor::Base # ==== Returns # Array[Class] # - # source://thor//lib/thor/base.rb#112 + # source://thor//lib/thor/base.rb#128 def subclasses; end end end -# source://thor//lib/thor/base.rb#137 +# source://thor//lib/thor/base.rb#153 module Thor::Base::ClassMethods # Returns the commands for this Thor class and all subclasses. # @@ -1597,7 +1829,7 @@ module Thor::Base::ClassMethods # Hash:: An ordered hash with commands names as keys and Thor::Command # objects as values. # - # source://thor//lib/thor/base.rb#383 + # source://thor//lib/thor/base.rb#482 def all_commands; end # Returns the commands for this Thor class and all subclasses. @@ -1606,13 +1838,13 @@ module Thor::Base::ClassMethods # Hash:: An ordered hash with commands names as keys and Thor::Command # objects as values. # - # source://thor//lib/thor/base.rb#383 + # source://thor//lib/thor/base.rb#482 def all_tasks; end # If you want to use defaults that don't match the type of an option, # either specify `check_default_type: false` or call `allow_incompatible_default_type!` # - # source://thor//lib/thor/base.rb#173 + # source://thor//lib/thor/base.rb#189 def allow_incompatible_default_type!; end # Adds an argument to the class and creates an attr_accessor for it. @@ -1650,7 +1882,7 @@ module Thor::Base::ClassMethods # ==== Errors # ArgumentError:: Raised if you supply a required argument after a non required one. # - # source://thor//lib/thor/base.rb#245 + # source://thor//lib/thor/base.rb#261 def argument(name, options = T.unsafe(nil)); end # Returns this class arguments, looking up in the ancestors chain. @@ -1658,42 +1890,116 @@ module Thor::Base::ClassMethods # ==== Returns # Array[Thor::Argument] # - # source://thor//lib/thor/base.rb#277 + # source://thor//lib/thor/base.rb#293 def arguments; end - # source://thor//lib/thor/base.rb#146 + # source://thor//lib/thor/base.rb#162 def attr_accessor(*_arg0); end - # source://thor//lib/thor/base.rb#138 + # source://thor//lib/thor/base.rb#154 def attr_reader(*_arg0); end - # source://thor//lib/thor/base.rb#142 + # source://thor//lib/thor/base.rb#158 def attr_writer(*_arg0); end - # source://thor//lib/thor/base.rb#177 + # source://thor//lib/thor/base.rb#193 def check_default_type; end # If you want to raise an error when the default value of an option does not match # the type call check_default_type! # This will be the default; for compatibility a deprecation warning is issued if necessary. # - # source://thor//lib/thor/base.rb#167 + # source://thor//lib/thor/base.rb#183 def check_default_type!; end - # source://thor//lib/thor/base.rb#156 + # source://thor//lib/thor/base.rb#172 def check_unknown_options; end # If you want to raise an error for unknown options, call check_unknown_options! # This is disabled by default to allow dynamic invocations. # - # source://thor//lib/thor/base.rb#152 + # source://thor//lib/thor/base.rb#168 def check_unknown_options!; end # @return [Boolean] # - # source://thor//lib/thor/base.rb#160 + # source://thor//lib/thor/base.rb#176 def check_unknown_options?(config); end + # Adds and declares option group for required at least one of options in the + # block and arguments. You can declare options as the outside of the block. + # + # ==== Examples + # + # class_at_least_one do + # class_option :one + # class_option :two + # end + # + # Or + # + # class_option :one + # class_option :two + # class_at_least_one :one, :two + # + # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError + # will be raised. + # + # You can use class_at_least_one and class_exclusive at the same time. + # + # class_exclusive do + # class_at_least_one do + # class_option :one + # class_option :two + # end + # end + # + # Then it is required either only one of "--one" or "--two". + # + # source://thor//lib/thor/base.rb#392 + def class_at_least_one(*args, &block); end + + # Returns this class at least one of required options array set, looking up in the ancestors chain. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # source://thor//lib/thor/base.rb#411 + def class_at_least_one_option_names; end + + # Adds and declares option group for exclusive options in the + # block and arguments. You can declare options as the outside of the block. + # + # ==== Parameters + # Array[Thor::Option.name] + # + # ==== Examples + # + # class_exclusive do + # class_option :one + # class_option :two + # end + # + # Or + # + # class_option :one + # class_option :two + # class_exclusive :one, :two + # + # If you give "--one" and "--two" at the same time ExclusiveArgumentsError + # will be raised. + # + # source://thor//lib/thor/base.rb#357 + def class_exclusive(*args, &block); end + + # Returns this class exclusive options array set, looking up in the ancestors chain. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # source://thor//lib/thor/base.rb#402 + def class_exclusive_option_names; end + # Adds an option to the set of class options # # ==== Parameters @@ -1710,7 +2016,7 @@ module Thor::Base::ClassMethods # :banner:: -- String to show on usage notes. # :hide:: -- If you want to hide this option from the help. # - # source://thor//lib/thor/base.rb#312 + # source://thor//lib/thor/base.rb#328 def class_option(name, options = T.unsafe(nil)); end # Adds a bunch of options to the set of class options. @@ -1722,7 +2028,7 @@ module Thor::Base::ClassMethods # ==== Parameters # Hash[Symbol => Object] # - # source://thor//lib/thor/base.rb#290 + # source://thor//lib/thor/base.rb#306 def class_options(options = T.unsafe(nil)); end # Returns the commands for this Thor class. @@ -1731,7 +2037,7 @@ module Thor::Base::ClassMethods # Hash:: An ordered hash with commands names as keys and Thor::Command # objects as values. # - # source://thor//lib/thor/base.rb#372 + # source://thor//lib/thor/base.rb#471 def commands; end # If true, option set will not suspend the execution of the command when @@ -1739,14 +2045,14 @@ module Thor::Base::ClassMethods # # @return [Boolean] # - # source://thor//lib/thor/base.rb#191 + # source://thor//lib/thor/base.rb#207 def disable_required_check?(command_name); end # A flag that makes the process exit with status 1 if any error happens. # # @return [Boolean] # - # source://thor//lib/thor/base.rb#529 + # source://thor//lib/thor/base.rb#628 def exit_on_failure?; end # Defines the group. This is used when thor list is invoked so you can specify @@ -1755,22 +2061,22 @@ module Thor::Base::ClassMethods # ==== Parameters # name # - # source://thor//lib/thor/base.rb#358 + # source://thor//lib/thor/base.rb#457 def group(name = T.unsafe(nil)); end # @raise [InvocationError] # - # source://thor//lib/thor/base.rb#519 + # source://thor//lib/thor/base.rb#618 def handle_argument_error(command, error, args, arity); end # @raise [UndefinedCommandError] # - # source://thor//lib/thor/base.rb#514 + # source://thor//lib/thor/base.rb#613 def handle_no_command_error(command, has_namespace = T.unsafe(nil)); end # @raise [UndefinedCommandError] # - # source://thor//lib/thor/base.rb#514 + # source://thor//lib/thor/base.rb#613 def handle_no_task_error(command, has_namespace = T.unsafe(nil)); end # Sets the namespace for the Thor or Thor::Group class. By default the @@ -1795,7 +2101,7 @@ module Thor::Base::ClassMethods # # thor :my_command # - # source://thor//lib/thor/base.rb#467 + # source://thor//lib/thor/base.rb#566 def namespace(name = T.unsafe(nil)); end # All methods defined inside the given block are not added as commands. @@ -1817,15 +2123,15 @@ module Thor::Base::ClassMethods # remove_command :this_is_not_a_command # end # - # source://thor//lib/thor/base.rb#431 + # source://thor//lib/thor/base.rb#530 def no_commands(&block); end # @return [Boolean] # - # source://thor//lib/thor/base.rb#441 + # source://thor//lib/thor/base.rb#540 def no_commands?; end - # source://thor//lib/thor/base.rb#437 + # source://thor//lib/thor/base.rb#536 def no_commands_context; end # All methods defined inside the given block are not added as commands. @@ -1847,7 +2153,7 @@ module Thor::Base::ClassMethods # remove_command :this_is_not_a_command # end # - # source://thor//lib/thor/base.rb#431 + # source://thor//lib/thor/base.rb#530 def no_tasks(&block); end # Allows to use private methods from parent in child classes as commands. @@ -1860,7 +2166,7 @@ module Thor::Base::ClassMethods # public_command :foo # public_command :foo, :bar, :baz # - # source://thor//lib/thor/base.rb#507 + # source://thor//lib/thor/base.rb#606 def public_command(*names); end # Allows to use private methods from parent in child classes as commands. @@ -1873,7 +2179,7 @@ module Thor::Base::ClassMethods # public_command :foo # public_command :foo, :bar, :baz # - # source://thor//lib/thor/base.rb#507 + # source://thor//lib/thor/base.rb#606 def public_task(*names); end # Removes a previous defined argument. If :undefine is given, undefine @@ -1887,7 +2193,7 @@ module Thor::Base::ClassMethods # remove_argument :foo # remove_argument :foo, :bar, :baz, :undefine => true # - # source://thor//lib/thor/base.rb#327 + # source://thor//lib/thor/base.rb#426 def remove_argument(*names); end # Removes a previous defined class option. @@ -1900,7 +2206,7 @@ module Thor::Base::ClassMethods # remove_class_option :foo # remove_class_option :foo, :bar, :baz # - # source://thor//lib/thor/base.rb#346 + # source://thor//lib/thor/base.rb#445 def remove_class_option(*names); end # Removes a given command from this Thor class. This is usually done if you @@ -1915,7 +2221,7 @@ module Thor::Base::ClassMethods # options:: You can give :undefine => true if you want commands the method # to be undefined from the class as well. # - # source://thor//lib/thor/base.rb#401 + # source://thor//lib/thor/base.rb#500 def remove_command(*names); end # Removes a given command from this Thor class. This is usually done if you @@ -1930,7 +2236,7 @@ module Thor::Base::ClassMethods # options:: You can give :undefine => true if you want commands the method # to be undefined from the class as well. # - # source://thor//lib/thor/base.rb#401 + # source://thor//lib/thor/base.rb#500 def remove_task(*names); end # Parses the command and options from the given args, instantiate the class @@ -1941,7 +2247,7 @@ module Thor::Base::ClassMethods # script = MyScript.new(args, options, config) # script.invoke(:command, first_arg, second_arg, third_arg) # - # source://thor//lib/thor/base.rb#483 + # source://thor//lib/thor/base.rb#582 def start(given_args = T.unsafe(nil), config = T.unsafe(nil)); end # If true, option parsing is suspended as soon as an unknown option or a @@ -1950,22 +2256,22 @@ module Thor::Base::ClassMethods # # @return [Boolean] # - # source://thor//lib/thor/base.rb#185 + # source://thor//lib/thor/base.rb#201 def stop_on_unknown_option?(command_name); end - # source://thor//lib/thor/base.rb#202 + # source://thor//lib/thor/base.rb#218 def strict_args_position; end # If you want only strict string args (useful when cascading thor classes), # call strict_args_position! This is disabled by default to allow dynamic # invocations. # - # source://thor//lib/thor/base.rb#198 + # source://thor//lib/thor/base.rb#214 def strict_args_position!; end # @return [Boolean] # - # source://thor//lib/thor/base.rb#206 + # source://thor//lib/thor/base.rb#222 def strict_args_position?(config); end # Returns the commands for this Thor class. @@ -1974,7 +2280,7 @@ module Thor::Base::ClassMethods # Hash:: An ordered hash with commands names as keys and Thor::Command # objects as values. # - # source://thor//lib/thor/base.rb#372 + # source://thor//lib/thor/base.rb#471 def tasks; end protected @@ -1982,12 +2288,12 @@ module Thor::Base::ClassMethods # SIGNATURE: Sets the baseclass. This is where the superclass lookup # finishes. # - # source://thor//lib/thor/base.rb#678 + # source://thor//lib/thor/base.rb#777 def baseclass; end # The basename of the program invoking the thor class. # - # source://thor//lib/thor/base.rb#672 + # source://thor//lib/thor/base.rb#771 def basename; end # Build an option and adds it to the given scope. @@ -1997,7 +2303,7 @@ module Thor::Base::ClassMethods # options:: Described in both class_option and method_option. # scope:: Options hash that is being built up # - # source://thor//lib/thor/base.rb#589 + # source://thor//lib/thor/base.rb#688 def build_option(name, options, scope); end # Receives a hash of options, parse them and add to the scope. This is a @@ -2008,83 +2314,100 @@ module Thor::Base::ClassMethods # ==== Parameters # Hash[Symbol => Object] # - # source://thor//lib/thor/base.rb#600 + # source://thor//lib/thor/base.rb#699 def build_options(options, scope); end + # Get target(method_options or class_options) options + # of before and after by block evaluation. + # + # source://thor//lib/thor/base.rb#808 + def built_option_names(target, opt = T.unsafe(nil), &block); end + # Prints the class options per group. If an option does not belong to # any group, it's printed as Class option. # - # source://thor//lib/thor/base.rb#539 + # source://thor//lib/thor/base.rb#638 def class_options_help(shell, groups = T.unsafe(nil)); end + # Get command scope member by name. + # + # source://thor//lib/thor/base.rb#816 + def command_scope_member(name, options = T.unsafe(nil)); end + # SIGNATURE: Creates a new command if valid_command? is true. This method is # called when a new method is added to the class. # - # source://thor//lib/thor/base.rb#683 + # source://thor//lib/thor/base.rb#782 def create_command(meth); end # SIGNATURE: Creates a new command if valid_command? is true. This method is # called when a new method is added to the class. # - # source://thor//lib/thor/base.rb#683 + # source://thor//lib/thor/base.rb#782 def create_task(meth); end # SIGNATURE: The hook invoked by start. # # @raise [NotImplementedError] # - # source://thor//lib/thor/base.rb#693 + # source://thor//lib/thor/base.rb#792 def dispatch(command, given_args, given_opts, config); end # Finds a command with the given name. If the command belongs to the current # class, just return it, otherwise dup it and add the fresh copy to the # current command hash. # - # source://thor//lib/thor/base.rb#609 + # source://thor//lib/thor/base.rb#708 def find_and_refresh_command(name); end # Finds a command with the given name. If the command belongs to the current # class, just return it, otherwise dup it and add the fresh copy to the # current command hash. # - # source://thor//lib/thor/base.rb#609 + # source://thor//lib/thor/base.rb#708 def find_and_refresh_task(name); end # Retrieves a value from superclass. If it reaches the baseclass, # returns default. # - # source://thor//lib/thor/base.rb#650 + # source://thor//lib/thor/base.rb#749 def from_superclass(method, default = T.unsafe(nil)); end # Every time someone inherits from a Thor class, register the klass # and file into baseclass. # - # source://thor//lib/thor/base.rb#622 + # source://thor//lib/thor/base.rb#721 def inherited(klass); end # SIGNATURE: Defines behavior when the initialize method is added to the # class. # - # source://thor//lib/thor/base.rb#689 + # source://thor//lib/thor/base.rb#788 def initialize_added; end # Raises an error if the word given is a Thor reserved word. # # @return [Boolean] # - # source://thor//lib/thor/base.rb#578 + # source://thor//lib/thor/base.rb#677 def is_thor_reserved_word?(word, type); end # Fire this callback whenever a method is added. Added methods are # tracked as commands by invoking the create_command method. # - # source://thor//lib/thor/base.rb#630 + # source://thor//lib/thor/base.rb#729 def method_added(meth); end # Receives a set of options and print them. # - # source://thor//lib/thor/base.rb#557 + # source://thor//lib/thor/base.rb#656 def print_options(shell, options, group_name = T.unsafe(nil)); end + + # Register a relation of options for target(method_option/class_option) + # by args and block. + # + # source://thor//lib/thor/base.rb#798 + def register_options_relation_for(target, relation, *args, &block); end end # source://thor//lib/thor/command.rb#2 @@ -2092,68 +2415,74 @@ class Thor::Command < ::Struct # @return [Command] a new instance of Command # # source://thor//lib/thor/command.rb#5 - def initialize(name, description, long_description, usage, options = T.unsafe(nil)); end + def initialize(name, description, long_description, wrap_long_description, usage, options = T.unsafe(nil), options_relation = T.unsafe(nil)); end # Returns the formatted usage by injecting given required arguments # and required options into the given usage. # - # source://thor//lib/thor/command.rb#41 + # source://thor//lib/thor/command.rb#42 def formatted_usage(klass, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end # @return [Boolean] # - # source://thor//lib/thor/command.rb#14 + # source://thor//lib/thor/command.rb#15 def hidden?; end + # source://thor//lib/thor/command.rb#70 + def method_at_least_one_option_names; end + + # source://thor//lib/thor/command.rb#66 + def method_exclusive_option_names; end + # By default, a command invokes a method in the thor class. You can change this # implementation to create custom commands. # - # source://thor//lib/thor/command.rb#20 + # source://thor//lib/thor/command.rb#21 def run(instance, args = T.unsafe(nil)); end protected # @return [Boolean] # - # source://thor//lib/thor/command.rb#105 + # source://thor//lib/thor/command.rb#114 def handle_argument_error?(instance, error, caller); end # @return [Boolean] # - # source://thor//lib/thor/command.rb#112 + # source://thor//lib/thor/command.rb#121 def handle_no_method_error?(instance, error, caller); end # @return [Boolean] # - # source://thor//lib/thor/command.rb#95 + # source://thor//lib/thor/command.rb#104 def local_method?(instance, name); end # @return [Boolean] # - # source://thor//lib/thor/command.rb#78 + # source://thor//lib/thor/command.rb#87 def not_debugging?(instance); end # @return [Boolean] # - # source://thor//lib/thor/command.rb#91 + # source://thor//lib/thor/command.rb#100 def private_method?(instance); end # Given a target, checks if this class name is a public method. # # @return [Boolean] # - # source://thor//lib/thor/command.rb#87 + # source://thor//lib/thor/command.rb#96 def public_method?(instance); end # Add usage with required arguments # - # source://thor//lib/thor/command.rb#68 + # source://thor//lib/thor/command.rb#77 def required_arguments_for(klass, usage); end - # source://thor//lib/thor/command.rb#82 + # source://thor//lib/thor/command.rb#91 def required_options; end - # source://thor//lib/thor/command.rb#100 + # source://thor//lib/thor/command.rb#109 def sans_backtrace(backtrace, caller); end private @@ -2200,35 +2529,38 @@ class Thor::CoreExt::HashWithIndifferentAccess < ::Hash # @return [Boolean] # - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#41 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#45 def key?(key); end - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#49 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#53 def merge(other); end - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#53 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#57 def merge!(other); end - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#68 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#72 def replace(other_hash); end - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#60 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#64 def reverse_merge(other); end - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#64 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#68 def reverse_merge!(other_hash); end + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#41 + def slice(*keys); end + # Convert to a Hash with String keys. # - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#73 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#77 def to_hash; end - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#45 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#49 def values_at(*indices); end protected - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#79 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#83 def convert_key(key); end # Magic predicates. For instance: @@ -2237,33 +2569,33 @@ class Thor::CoreExt::HashWithIndifferentAccess < ::Hash # options.shebang # => "/usr/lib/local/ruby" # options.test_framework?(:rspec) # => options[:test_framework] == :rspec # - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#89 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#93 def method_missing(method, *args); end end -# source://thor//lib/thor/error.rb#14 +# source://thor//lib/thor/error.rb#3 module Thor::Correctable - # source://thor//lib/thor/error.rb#19 + # source://thor//lib/thor/error.rb#8 def corrections; end - # source://thor//lib/thor/error.rb#15 + # source://thor//lib/thor/error.rb#4 def to_s; end end # A dynamic command that handles method missing scenarios. # -# source://thor//lib/thor/command.rb#128 +# source://thor//lib/thor/command.rb#137 class Thor::DynamicCommand < ::Thor::Command # @return [DynamicCommand] a new instance of DynamicCommand # - # source://thor//lib/thor/command.rb#129 + # source://thor//lib/thor/command.rb#138 def initialize(name, options = T.unsafe(nil)); end - # source://thor//lib/thor/command.rb#133 + # source://thor//lib/thor/command.rb#142 def run(instance, args = T.unsafe(nil)); end end -# source://thor//lib/thor/command.rb#141 +# source://thor//lib/thor/command.rb#150 Thor::DynamicTask = Thor::DynamicCommand # Thor::Error is raised when it's caused by wrong usage of thor classes. Those @@ -2273,9 +2605,12 @@ Thor::DynamicTask = Thor::DynamicCommand # overwrites a thor keyword, SHOULD NOT raise a Thor::Error. This way, we # ensure that developer errors are shown with full backtrace. # -# source://thor//lib/thor/error.rb#31 +# source://thor//lib/thor/error.rb#20 class Thor::Error < ::StandardError; end +# source://thor//lib/thor/error.rb#101 +class Thor::ExclusiveArgumentError < ::Thor::InvocationError; end + # Thor has a special class called Thor::Group. The main difference to Thor class # is that it invokes all commands at once. It also include some methods that allows # invocations to be done at the class method, which are not available to Thor @@ -2449,15 +2784,15 @@ Thor::HELP_MAPPINGS = T.let(T.unsafe(nil), Array) # A command that is hidden in help messages but still invocable. # -# source://thor//lib/thor/command.rb#120 +# source://thor//lib/thor/command.rb#129 class Thor::HiddenCommand < ::Thor::Command # @return [Boolean] # - # source://thor//lib/thor/command.rb#121 + # source://thor//lib/thor/command.rb#130 def hidden?; end end -# source://thor//lib/thor/command.rb#125 +# source://thor//lib/thor/command.rb#134 Thor::HiddenTask = Thor::HiddenCommand # source://thor//lib/thor/invocation.rb#2 @@ -2611,7 +2946,7 @@ end # Raised when a command was found, but not invoked properly. # -# source://thor//lib/thor/error.rb#73 +# source://thor//lib/thor/error.rb#62 class Thor::InvocationError < ::Thor::Error; end # source://thor//lib/thor/line_editor/basic.rb#2 @@ -2724,7 +3059,7 @@ class Thor::LineEditor::Readline::PathCompletion def text; end end -# source://thor//lib/thor/error.rb#109 +# source://thor//lib/thor/error.rb#98 class Thor::MalformattedArgumentError < ::Thor::InvocationError; end # source://thor//lib/thor/nested_context.rb#2 @@ -2751,12 +3086,6 @@ class Thor::NestedContext def push; end end -# source://thor//lib/thor/error.rb#8 -class Thor::NoKwargSpellChecker < ::DidYouMean::SpellChecker - # source://thor//lib/thor/error.rb#9 - def initialize(dictionary); end -end - # source://thor//lib/thor/parser/option.rb#2 class Thor::Option < ::Thor::Argument # @return [Option] a new instance of Option @@ -2772,10 +3101,10 @@ class Thor::Option < ::Thor::Argument # source://thor//lib/thor/parser/option.rb#99 def aliases_for_usage; end - # source://thor//lib/thor/parser/option.rb#109 + # source://thor//lib/thor/parser/option.rb#118 def array?; end - # source://thor//lib/thor/parser/option.rb#109 + # source://thor//lib/thor/parser/option.rb#118 def boolean?; end # Returns the value of attribute group. @@ -2783,7 +3112,7 @@ class Thor::Option < ::Thor::Argument # source://thor//lib/thor/parser/option.rb#3 def group; end - # source://thor//lib/thor/parser/option.rb#109 + # source://thor//lib/thor/parser/option.rb#118 def hash?; end # Returns the value of attribute hide. @@ -2799,7 +3128,7 @@ class Thor::Option < ::Thor::Argument # source://thor//lib/thor/parser/option.rb#3 def lazy_default; end - # source://thor//lib/thor/parser/option.rb#109 + # source://thor//lib/thor/parser/option.rb#118 def numeric?; end # Returns the value of attribute repeatable. @@ -2807,7 +3136,12 @@ class Thor::Option < ::Thor::Argument # source://thor//lib/thor/parser/option.rb#3 def repeatable; end - # source://thor//lib/thor/parser/option.rb#109 + # @return [Boolean] + # + # source://thor//lib/thor/parser/option.rb#107 + def show_default?; end + + # source://thor//lib/thor/parser/option.rb#118 def string?; end # source://thor//lib/thor/parser/option.rb#75 @@ -2818,25 +3152,30 @@ class Thor::Option < ::Thor::Argument protected - # source://thor//lib/thor/parser/option.rb#159 + # source://thor//lib/thor/parser/option.rb#168 def dasherize(str); end # @return [Boolean] # - # source://thor//lib/thor/parser/option.rb#151 + # source://thor//lib/thor/parser/option.rb#160 def dasherized?; end - # source://thor//lib/thor/parser/option.rb#155 + # source://thor//lib/thor/parser/option.rb#164 def undasherize(str); end # @raise [ArgumentError] # - # source://thor//lib/thor/parser/option.rb#117 + # source://thor//lib/thor/parser/option.rb#126 def validate!; end - # source://thor//lib/thor/parser/option.rb#122 + # source://thor//lib/thor/parser/option.rb#131 def validate_default_type!; end + private + + # source://thor//lib/thor/parser/option.rb#174 + def normalize_aliases(aliases); end + class << self # This parse quick options given as method_options. It makes several # assumptions, but you can be more specific using the option method. @@ -2883,31 +3222,37 @@ class Thor::Options < ::Thor::Arguments # @return [Options] a new instance of Options # # source://thor//lib/thor/parser/options.rb#32 - def initialize(hash_options = T.unsafe(nil), defaults = T.unsafe(nil), stop_on_unknown = T.unsafe(nil), disable_required_check = T.unsafe(nil)); end + def initialize(hash_options = T.unsafe(nil), defaults = T.unsafe(nil), stop_on_unknown = T.unsafe(nil), disable_required_check = T.unsafe(nil), relations = T.unsafe(nil)); end + + # source://thor//lib/thor/parser/options.rb#156 + def check_at_least_one!; end + + # source://thor//lib/thor/parser/options.rb#144 + def check_exclusive!; end # @raise [UnknownArgumentError] # - # source://thor//lib/thor/parser/options.rb#141 + # source://thor//lib/thor/parser/options.rb#168 def check_unknown!; end - # source://thor//lib/thor/parser/options.rb#88 + # source://thor//lib/thor/parser/options.rb#89 def parse(args); end - # source://thor//lib/thor/parser/options.rb#64 + # source://thor//lib/thor/parser/options.rb#65 def peek; end - # source://thor//lib/thor/parser/options.rb#60 + # source://thor//lib/thor/parser/options.rb#61 def remaining; end - # source://thor//lib/thor/parser/options.rb#78 + # source://thor//lib/thor/parser/options.rb#79 def shift; end - # source://thor//lib/thor/parser/options.rb#83 + # source://thor//lib/thor/parser/options.rb#84 def unshift(arg, is_value: T.unsafe(nil)); end protected - # source://thor//lib/thor/parser/options.rb#151 + # source://thor//lib/thor/parser/options.rb#189 def assign_result!(option, result); end # Check if the current value in peek is a registered switch. @@ -2917,45 +3262,51 @@ class Thor::Options < ::Thor::Arguments # # @return [Boolean] # - # source://thor//lib/thor/parser/options.rb#165 + # source://thor//lib/thor/parser/options.rb#203 def current_is_switch?; end # @return [Boolean] # - # source://thor//lib/thor/parser/options.rb#177 + # source://thor//lib/thor/parser/options.rb#215 def current_is_switch_formatted?; end # @return [Boolean] # - # source://thor//lib/thor/parser/options.rb#187 + # source://thor//lib/thor/parser/options.rb#225 def current_is_value?; end + # Option names changes to swith name or human name + # + # source://thor//lib/thor/parser/options.rb#179 + def names_to_switch_names(names = T.unsafe(nil)); end + # Check if the given argument is actually a shortcut. # - # source://thor//lib/thor/parser/options.rb#206 + # source://thor//lib/thor/parser/options.rb#244 def normalize_switch(arg); end - # Parse boolean values which can be given as --foo=true, --foo or --no-foo. + # Parse boolean values which can be given as --foo=true or --foo for true values, or + # --foo=false, --no-foo or --skip-foo for false values. # - # source://thor//lib/thor/parser/options.rb#217 + # source://thor//lib/thor/parser/options.rb#256 def parse_boolean(switch); end # Parse the value at the peek analyzing if it requires an input or not. # - # source://thor//lib/thor/parser/options.rb#235 + # source://thor//lib/thor/parser/options.rb#274 def parse_peek(switch, option); end # @return [Boolean] # - # source://thor//lib/thor/parser/options.rb#210 + # source://thor//lib/thor/parser/options.rb#248 def parsing_options?; end # @return [Boolean] # - # source://thor//lib/thor/parser/options.rb#192 + # source://thor//lib/thor/parser/options.rb#230 def switch?(arg); end - # source://thor//lib/thor/parser/options.rb#196 + # source://thor//lib/thor/parser/options.rb#234 def switch_option(arg); end class << self @@ -3019,7 +3370,7 @@ module Thor::RakeCompat end end -# source://thor//lib/thor/error.rb#106 +# source://thor//lib/thor/error.rb#95 class Thor::RequiredArgumentMissingError < ::Thor::InvocationError; end # source://thor//lib/thor/util.rb#4 @@ -3108,13 +3459,13 @@ module Thor::Shell def _shared_configuration; end end -# source://thor//lib/thor/shell/basic.rb#3 +# source://thor//lib/thor/shell/basic.rb#7 class Thor::Shell::Basic # Initialize base, mute and padding to nil. # # @return [Basic] a new instance of Basic # - # source://thor//lib/thor/shell/basic.rb#11 + # source://thor//lib/thor/shell/basic.rb#13 def initialize; end # Asks something to the user and receives a response. @@ -3137,29 +3488,29 @@ class Thor::Shell::Basic # Readline. # # ==== Example - # ask("What is your name?") + # ask("What is your name?") # - # ask("What is the planet furthest from the sun?", :default => "Pluto") + # ask("What is the planet furthest from the sun?", :default => "Neptune") # - # ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"]) + # ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"]) # - # ask("What is your password?", :echo => false) + # ask("What is your password?", :echo => false) # - # ask("Where should the file be saved?", :path => true) + # ask("Where should the file be saved?", :path => true) # - # source://thor//lib/thor/shell/basic.rb#78 + # source://thor//lib/thor/shell/basic.rb#80 def ask(statement, *args); end # Returns the value of attribute base. # - # source://thor//lib/thor/shell/basic.rb#6 + # source://thor//lib/thor/shell/basic.rb#8 def base; end # Sets the attribute base # # @param value the value to set the attribute base to. # - # source://thor//lib/thor/shell/basic.rb#6 + # source://thor//lib/thor/shell/basic.rb#8 def base=(_arg0); end # Called if something goes wrong during the execution. This is used by Thor @@ -3167,7 +3518,7 @@ class Thor::Shell::Basic # wrong, you can always raise an exception. If you raise a Thor::Error, it # will be rescued and wrapped in the method below. # - # source://thor//lib/thor/shell/basic.rb#342 + # source://thor//lib/thor/shell/basic.rb#251 def error(statement); end # Deals with file collision and returns true if the file should be @@ -3178,42 +3529,42 @@ class Thor::Shell::Basic # destination:: the destination file to solve conflicts # block:: an optional block that returns the value to be used in diff and merge # - # source://thor//lib/thor/shell/basic.rb#285 + # source://thor//lib/thor/shell/basic.rb#207 def file_collision(destination); end # Sets the output padding while executing a block and resets it. # - # source://thor//lib/thor/shell/basic.rb#41 + # source://thor//lib/thor/shell/basic.rb#43 def indent(count = T.unsafe(nil)); end # Mute everything that's inside given block # - # source://thor//lib/thor/shell/basic.rb#20 + # source://thor//lib/thor/shell/basic.rb#22 def mute; end # Check if base is muted # # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#29 + # source://thor//lib/thor/shell/basic.rb#31 def mute?; end - # Make a question the to user and returns true if the user replies "n" or + # Asks the user a question and returns true if the user replies "n" or # "no". # # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#154 + # source://thor//lib/thor/shell/basic.rb#156 def no?(statement, color = T.unsafe(nil)); end # Returns the value of attribute padding. # - # source://thor//lib/thor/shell/basic.rb#7 + # source://thor//lib/thor/shell/basic.rb#9 def padding; end # Sets the output padding, not allowing less than zero values. # - # source://thor//lib/thor/shell/basic.rb#35 + # source://thor//lib/thor/shell/basic.rb#37 def padding=(value); end # Prints values in columns @@ -3221,7 +3572,7 @@ class Thor::Shell::Basic # ==== Parameters # Array[String, String, ...] # - # source://thor//lib/thor/shell/basic.rb#163 + # source://thor//lib/thor/shell/basic.rb#165 def print_in_columns(array); end # Prints a table. @@ -3232,8 +3583,9 @@ class Thor::Shell::Basic # ==== Options # indent:: Indent the first column by indent value. # colwidth:: Force the first column to colwidth spaces wide. + # borders:: Adds ascii borders. # - # source://thor//lib/thor/shell/basic.rb#185 + # source://thor//lib/thor/shell/basic.rb#180 def print_table(array, options = T.unsafe(nil)); end # Prints a long string, word-wrapping the text to the current width of the @@ -3245,7 +3597,7 @@ class Thor::Shell::Basic # ==== Options # indent:: Indent each line of the printed paragraph by indent value. # - # source://thor//lib/thor/shell/basic.rb#247 + # source://thor//lib/thor/shell/basic.rb#194 def print_wrapped(message, options = T.unsafe(nil)); end # Say (print) something to the user. If the sentence ends with a whitespace @@ -3253,9 +3605,9 @@ class Thor::Shell::Basic # are passed straight to puts (behavior got from Highline). # # ==== Example - # say("I know you knew that.") + # say("I know you knew that.") # - # source://thor//lib/thor/shell/basic.rb#96 + # source://thor//lib/thor/shell/basic.rb#98 def say(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end # Say (print) an error to the user. If the sentence ends with a whitespace @@ -3263,9 +3615,9 @@ class Thor::Shell::Basic # are passed straight to puts (behavior got from Highline). # # ==== Example - # say_error("error: something went wrong") + # say_error("error: something went wrong") # - # source://thor//lib/thor/shell/basic.rb#113 + # source://thor//lib/thor/shell/basic.rb#115 def say_error(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end # Say a status with the given color and appends the message. Since this @@ -3273,110 +3625,89 @@ class Thor::Shell::Basic # in log_status, avoiding the message from being shown. If a Symbol is # given in log_status, it's used as the color. # - # source://thor//lib/thor/shell/basic.rb#128 + # source://thor//lib/thor/shell/basic.rb#130 def say_status(status, message, log_status = T.unsafe(nil)); end # Apply color to the given string with optional bold. Disabled in the # Thor::Shell::Basic class. # - # source://thor//lib/thor/shell/basic.rb#349 + # source://thor//lib/thor/shell/basic.rb#258 def set_color(string, *_arg1); end - # source://thor//lib/thor/shell/basic.rb#326 - def terminal_width; end - - # Make a question the to user and returns true if the user replies "y" or + # Asks the user a question and returns true if the user replies "y" or # "yes". # # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#147 + # source://thor//lib/thor/shell/basic.rb#149 def yes?(statement, color = T.unsafe(nil)); end protected - # source://thor//lib/thor/shell/basic.rb#486 + # source://thor//lib/thor/shell/basic.rb#362 def answer_match(possibilities, answer, case_insensitive); end - # source://thor//lib/thor/shell/basic.rb#443 - def as_unicode; end - - # source://thor//lib/thor/shell/basic.rb#473 + # source://thor//lib/thor/shell/basic.rb#349 def ask_filtered(statement, color, options); end - # source://thor//lib/thor/shell/basic.rb#456 + # source://thor//lib/thor/shell/basic.rb#332 def ask_simply(statement, color, options); end # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#360 + # source://thor//lib/thor/shell/basic.rb#269 def can_display_colors?; end - # Calculate the dynamic width of the terminal - # - # source://thor//lib/thor/shell/basic.rb#415 - def dynamic_width; end - - # source://thor//lib/thor/shell/basic.rb#419 - def dynamic_width_stty; end + # source://thor//lib/thor/shell/basic.rb#296 + def file_collision_help(block_given); end - # source://thor//lib/thor/shell/basic.rb#423 - def dynamic_width_tput; end - - # source://thor//lib/thor/shell/basic.rb#387 - def file_collision_help; end - - # source://thor//lib/thor/shell/basic.rb#507 + # source://thor//lib/thor/shell/basic.rb#383 def git_merge_tool; end # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#377 + # source://thor//lib/thor/shell/basic.rb#286 def is?(value); end - # source://thor//lib/thor/shell/basic.rb#364 + # source://thor//lib/thor/shell/basic.rb#273 def lookup_color(color); end - # source://thor//lib/thor/shell/basic.rb#494 + # source://thor//lib/thor/shell/basic.rb#370 def merge(destination, content); end - # source://thor//lib/thor/shell/basic.rb#503 + # source://thor//lib/thor/shell/basic.rb#379 def merge_tool; end - # source://thor//lib/thor/shell/basic.rb#355 + # source://thor//lib/thor/shell/basic.rb#264 def prepare_message(message, *color); end # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#410 + # source://thor//lib/thor/shell/basic.rb#324 def quiet?; end - # source://thor//lib/thor/shell/basic.rb#399 + # source://thor//lib/thor/shell/basic.rb#313 def show_diff(destination, content); end - # source://thor//lib/thor/shell/basic.rb#373 + # source://thor//lib/thor/shell/basic.rb#282 def stderr; end - # source://thor//lib/thor/shell/basic.rb#369 + # source://thor//lib/thor/shell/basic.rb#278 def stdout; end - # source://thor//lib/thor/shell/basic.rb#431 - def truncate(string, width); end - # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#427 + # source://thor//lib/thor/shell/basic.rb#328 def unix?; end end -# source://thor//lib/thor/shell/basic.rb#4 -Thor::Shell::Basic::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) - # Inherit from Thor::Shell::Basic and add set_color behavior. Check # Thor::Shell::Basic to see all available methods. # -# source://thor//lib/thor/shell/color.rb#8 +# source://thor//lib/thor/shell/color.rb#9 class Thor::Shell::Color < ::Thor::Shell::Basic + include ::LCSDiff + # Set color by using a string or one of the defined constants. If a third # option is set to true, it also adds bold to the string. This is based # on Highline implementation and it automatically appends CLEAR to the end @@ -3409,149 +3740,155 @@ class Thor::Shell::Color < ::Thor::Shell::Basic # :on_cyan # :on_white # - # source://thor//lib/thor/shell/color.rb#79 + # source://thor//lib/thor/shell/color.rb#82 def set_color(string, *colors); end protected # @return [Boolean] # - # source://thor//lib/thor/shell/color.rb#107 + # source://thor//lib/thor/shell/color.rb#110 def are_colors_disabled?; end # @return [Boolean] # - # source://thor//lib/thor/shell/color.rb#103 + # source://thor//lib/thor/shell/color.rb#106 def are_colors_supported?; end # @return [Boolean] # - # source://thor//lib/thor/shell/color.rb#99 + # source://thor//lib/thor/shell/color.rb#102 def can_display_colors?; end - - # Check if Diff::LCS is loaded. If it is, use it to create pretty output - # for diff. - # - # @return [Boolean] - # - # source://thor//lib/thor/shell/color.rb#144 - def diff_lcs_loaded?; end - - # source://thor//lib/thor/shell/color.rb#127 - def output_diff_line(diff); end - - # Overwrite show_diff to show diff with colors if Diff::LCS is - # available. - # - # source://thor//lib/thor/shell/color.rb#114 - def show_diff(destination, content); end end # Set the terminal's foreground ANSI color to black. # -# source://thor//lib/thor/shell/color.rb#15 +# source://thor//lib/thor/shell/color.rb#18 Thor::Shell::Color::BLACK = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to blue. # -# source://thor//lib/thor/shell/color.rb#23 +# source://thor//lib/thor/shell/color.rb#26 Thor::Shell::Color::BLUE = T.let(T.unsafe(nil), String) # The start of an ANSI bold sequence. # -# source://thor//lib/thor/shell/color.rb#12 +# source://thor//lib/thor/shell/color.rb#15 Thor::Shell::Color::BOLD = T.let(T.unsafe(nil), String) # Embed in a String to clear all previous ANSI sequences. # -# source://thor//lib/thor/shell/color.rb#10 +# source://thor//lib/thor/shell/color.rb#13 Thor::Shell::Color::CLEAR = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to cyan. # -# source://thor//lib/thor/shell/color.rb#27 +# source://thor//lib/thor/shell/color.rb#30 Thor::Shell::Color::CYAN = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to green. # -# source://thor//lib/thor/shell/color.rb#19 +# source://thor//lib/thor/shell/color.rb#22 Thor::Shell::Color::GREEN = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to magenta. # -# source://thor//lib/thor/shell/color.rb#25 +# source://thor//lib/thor/shell/color.rb#28 Thor::Shell::Color::MAGENTA = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to black. # -# source://thor//lib/thor/shell/color.rb#32 +# source://thor//lib/thor/shell/color.rb#35 Thor::Shell::Color::ON_BLACK = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to blue. # -# source://thor//lib/thor/shell/color.rb#40 +# source://thor//lib/thor/shell/color.rb#43 Thor::Shell::Color::ON_BLUE = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to cyan. # -# source://thor//lib/thor/shell/color.rb#44 +# source://thor//lib/thor/shell/color.rb#47 Thor::Shell::Color::ON_CYAN = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to green. # -# source://thor//lib/thor/shell/color.rb#36 +# source://thor//lib/thor/shell/color.rb#39 Thor::Shell::Color::ON_GREEN = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to magenta. # -# source://thor//lib/thor/shell/color.rb#42 +# source://thor//lib/thor/shell/color.rb#45 Thor::Shell::Color::ON_MAGENTA = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to red. # -# source://thor//lib/thor/shell/color.rb#34 +# source://thor//lib/thor/shell/color.rb#37 Thor::Shell::Color::ON_RED = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to white. # -# source://thor//lib/thor/shell/color.rb#46 +# source://thor//lib/thor/shell/color.rb#49 Thor::Shell::Color::ON_WHITE = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to yellow. # -# source://thor//lib/thor/shell/color.rb#38 +# source://thor//lib/thor/shell/color.rb#41 Thor::Shell::Color::ON_YELLOW = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to red. # -# source://thor//lib/thor/shell/color.rb#17 +# source://thor//lib/thor/shell/color.rb#20 Thor::Shell::Color::RED = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to white. # -# source://thor//lib/thor/shell/color.rb#29 +# source://thor//lib/thor/shell/color.rb#32 Thor::Shell::Color::WHITE = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to yellow. # -# source://thor//lib/thor/shell/color.rb#21 +# source://thor//lib/thor/shell/color.rb#24 Thor::Shell::Color::YELLOW = T.let(T.unsafe(nil), String) +# source://thor//lib/thor/shell/column_printer.rb#5 +class Thor::Shell::ColumnPrinter + # @return [ColumnPrinter] a new instance of ColumnPrinter + # + # source://thor//lib/thor/shell/column_printer.rb#8 + def initialize(stdout, options = T.unsafe(nil)); end + + # Returns the value of attribute options. + # + # source://thor//lib/thor/shell/column_printer.rb#6 + def options; end + + # source://thor//lib/thor/shell/column_printer.rb#14 + def print(array); end + + # Returns the value of attribute stdout. + # + # source://thor//lib/thor/shell/column_printer.rb#6 + def stdout; end +end + # Inherit from Thor::Shell::Basic and add set_color behavior. Check # Thor::Shell::Basic to see all available methods. # -# source://thor//lib/thor/shell/html.rb#8 +# source://thor//lib/thor/shell/html.rb#9 class Thor::Shell::HTML < ::Thor::Shell::Basic + include ::LCSDiff + # Ask something to the user and receives a response. # # ==== Example - # ask("What is your name?") + # ask("What is your name?") # # TODO: Implement #ask for Thor::Shell::HTML # # @raise [NotImplementedError] # - # source://thor//lib/thor/shell/html.rb#70 + # source://thor//lib/thor/shell/html.rb#73 def ask(statement, color = T.unsafe(nil)); end # Set color by using a string or one of the defined constants. If a third @@ -3559,122 +3896,171 @@ class Thor::Shell::HTML < ::Thor::Shell::Basic # on Highline implementation and it automatically appends CLEAR to the end # of the returned String. # - # source://thor//lib/thor/shell/html.rb#51 + # source://thor//lib/thor/shell/html.rb#54 def set_color(string, *colors); end protected # @return [Boolean] # - # source://thor//lib/thor/shell/html.rb#76 + # source://thor//lib/thor/shell/html.rb#79 def can_display_colors?; end - - # Check if Diff::LCS is loaded. If it is, use it to create pretty output - # for diff. - # - # @return [Boolean] - # - # source://thor//lib/thor/shell/html.rb#113 - def diff_lcs_loaded?; end - - # source://thor//lib/thor/shell/html.rb#96 - def output_diff_line(diff); end - - # Overwrite show_diff to show diff with colors if Diff::LCS is - # available. - # - # source://thor//lib/thor/shell/html.rb#83 - def show_diff(destination, content); end end # Set the terminal's foreground HTML color to black. # -# source://thor//lib/thor/shell/html.rb#13 +# source://thor//lib/thor/shell/html.rb#16 Thor::Shell::HTML::BLACK = T.let(T.unsafe(nil), String) # Set the terminal's foreground HTML color to blue. # -# source://thor//lib/thor/shell/html.rb#21 +# source://thor//lib/thor/shell/html.rb#24 Thor::Shell::HTML::BLUE = T.let(T.unsafe(nil), String) # The start of an HTML bold sequence. # -# source://thor//lib/thor/shell/html.rb#10 +# source://thor//lib/thor/shell/html.rb#13 Thor::Shell::HTML::BOLD = T.let(T.unsafe(nil), String) # Set the terminal's foreground HTML color to cyan. # -# source://thor//lib/thor/shell/html.rb#25 +# source://thor//lib/thor/shell/html.rb#28 Thor::Shell::HTML::CYAN = T.let(T.unsafe(nil), String) # Set the terminal's foreground HTML color to green. # -# source://thor//lib/thor/shell/html.rb#17 +# source://thor//lib/thor/shell/html.rb#20 Thor::Shell::HTML::GREEN = T.let(T.unsafe(nil), String) # Set the terminal's foreground HTML color to magenta. # -# source://thor//lib/thor/shell/html.rb#23 +# source://thor//lib/thor/shell/html.rb#26 Thor::Shell::HTML::MAGENTA = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to black. # -# source://thor//lib/thor/shell/html.rb#30 +# source://thor//lib/thor/shell/html.rb#33 Thor::Shell::HTML::ON_BLACK = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to blue. # -# source://thor//lib/thor/shell/html.rb#38 +# source://thor//lib/thor/shell/html.rb#41 Thor::Shell::HTML::ON_BLUE = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to cyan. # -# source://thor//lib/thor/shell/html.rb#42 +# source://thor//lib/thor/shell/html.rb#45 Thor::Shell::HTML::ON_CYAN = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to green. # -# source://thor//lib/thor/shell/html.rb#34 +# source://thor//lib/thor/shell/html.rb#37 Thor::Shell::HTML::ON_GREEN = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to magenta. # -# source://thor//lib/thor/shell/html.rb#40 +# source://thor//lib/thor/shell/html.rb#43 Thor::Shell::HTML::ON_MAGENTA = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to red. # -# source://thor//lib/thor/shell/html.rb#32 +# source://thor//lib/thor/shell/html.rb#35 Thor::Shell::HTML::ON_RED = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to white. # -# source://thor//lib/thor/shell/html.rb#44 +# source://thor//lib/thor/shell/html.rb#47 Thor::Shell::HTML::ON_WHITE = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to yellow. # -# source://thor//lib/thor/shell/html.rb#36 +# source://thor//lib/thor/shell/html.rb#39 Thor::Shell::HTML::ON_YELLOW = T.let(T.unsafe(nil), String) # Set the terminal's foreground HTML color to red. # -# source://thor//lib/thor/shell/html.rb#15 +# source://thor//lib/thor/shell/html.rb#18 Thor::Shell::HTML::RED = T.let(T.unsafe(nil), String) # Set the terminal's foreground HTML color to white. # -# source://thor//lib/thor/shell/html.rb#27 +# source://thor//lib/thor/shell/html.rb#30 Thor::Shell::HTML::WHITE = T.let(T.unsafe(nil), String) # Set the terminal's foreground HTML color to yellow. # -# source://thor//lib/thor/shell/html.rb#19 +# source://thor//lib/thor/shell/html.rb#22 Thor::Shell::HTML::YELLOW = T.let(T.unsafe(nil), String) # source://thor//lib/thor/shell.rb#24 Thor::Shell::SHELL_DELEGATED_METHODS = T.let(T.unsafe(nil), Array) +# source://thor//lib/thor/shell/table_printer.rb#6 +class Thor::Shell::TablePrinter < ::Thor::Shell::ColumnPrinter + # @return [TablePrinter] a new instance of TablePrinter + # + # source://thor//lib/thor/shell/table_printer.rb#9 + def initialize(stdout, options = T.unsafe(nil)); end + + # source://thor//lib/thor/shell/table_printer.rb#18 + def print(array); end + + private + + # source://thor//lib/thor/shell/table_printer.rb#72 + def format_cell(column, row_size, index); end + + # source://thor//lib/thor/shell/table_printer.rb#113 + def indentation; end + + # source://thor//lib/thor/shell/table_printer.rb#47 + def prepare(array); end + + # source://thor//lib/thor/shell/table_printer.rb#96 + def print_border_separator; end + + # source://thor//lib/thor/shell/table_printer.rb#103 + def truncate(string); end +end + +# source://thor//lib/thor/shell/table_printer.rb#7 +Thor::Shell::TablePrinter::BORDER_SEPARATOR = T.let(T.unsafe(nil), Symbol) + +# source://thor//lib/thor/shell/terminal.rb#3 +module Thor::Shell::Terminal + class << self + # source://thor//lib/thor/shell/terminal.rb#9 + def terminal_width; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/terminal.rb#20 + def unix?; end + + private + + # Calculate the dynamic width of the terminal + # + # source://thor//lib/thor/shell/terminal.rb#27 + def dynamic_width; end + + # source://thor//lib/thor/shell/terminal.rb#31 + def dynamic_width_stty; end + + # source://thor//lib/thor/shell/terminal.rb#35 + def dynamic_width_tput; end + end +end + +# source://thor//lib/thor/shell/terminal.rb#4 +Thor::Shell::Terminal::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) + +# source://thor//lib/thor/shell/wrapped_printer.rb#6 +class Thor::Shell::WrappedPrinter < ::Thor::Shell::ColumnPrinter + # source://thor//lib/thor/shell/wrapped_printer.rb#7 + def print(message); end +end + # source://thor//lib/thor/base.rb#23 Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String) @@ -3683,89 +4069,89 @@ Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String) # source://thor//lib/thor/base.rb#20 Thor::THOR_RESERVED_WORDS = T.let(T.unsafe(nil), Array) -# source://thor//lib/thor/command.rb#117 +# source://thor//lib/thor/command.rb#126 Thor::Task = Thor::Command # Raised when a command was not found. # -# source://thor//lib/thor/error.rb#35 +# source://thor//lib/thor/error.rb#24 class Thor::UndefinedCommandError < ::Thor::Error include ::Thor::Correctable # @return [UndefinedCommandError] a new instance of UndefinedCommandError # - # source://thor//lib/thor/error.rb#54 + # source://thor//lib/thor/error.rb#43 def initialize(command, all_commands, namespace); end # Returns the value of attribute all_commands. # - # source://thor//lib/thor/error.rb#52 + # source://thor//lib/thor/error.rb#41 def all_commands; end # Returns the value of attribute command. # - # source://thor//lib/thor/error.rb#52 + # source://thor//lib/thor/error.rb#41 def command; end end -# source://thor//lib/thor/error.rb#36 +# source://thor//lib/thor/error.rb#25 class Thor::UndefinedCommandError::SpellChecker # @return [SpellChecker] a new instance of SpellChecker # - # source://thor//lib/thor/error.rb#39 + # source://thor//lib/thor/error.rb#28 def initialize(error); end - # source://thor//lib/thor/error.rb#43 + # source://thor//lib/thor/error.rb#32 def corrections; end # Returns the value of attribute error. # - # source://thor//lib/thor/error.rb#37 + # source://thor//lib/thor/error.rb#26 def error; end - # source://thor//lib/thor/error.rb#47 + # source://thor//lib/thor/error.rb#36 def spell_checker; end end -# source://thor//lib/thor/error.rb#66 +# source://thor//lib/thor/error.rb#55 Thor::UndefinedTaskError = Thor::UndefinedCommandError -# source://thor//lib/thor/error.rb#76 +# source://thor//lib/thor/error.rb#65 class Thor::UnknownArgumentError < ::Thor::Error include ::Thor::Correctable # @return [UnknownArgumentError] a new instance of UnknownArgumentError # - # source://thor//lib/thor/error.rb#96 + # source://thor//lib/thor/error.rb#85 def initialize(switches, unknown); end # Returns the value of attribute switches. # - # source://thor//lib/thor/error.rb#94 + # source://thor//lib/thor/error.rb#83 def switches; end # Returns the value of attribute unknown. # - # source://thor//lib/thor/error.rb#94 + # source://thor//lib/thor/error.rb#83 def unknown; end end -# source://thor//lib/thor/error.rb#77 +# source://thor//lib/thor/error.rb#66 class Thor::UnknownArgumentError::SpellChecker # @return [SpellChecker] a new instance of SpellChecker # - # source://thor//lib/thor/error.rb#80 + # source://thor//lib/thor/error.rb#69 def initialize(error); end - # source://thor//lib/thor/error.rb#84 + # source://thor//lib/thor/error.rb#73 def corrections; end # Returns the value of attribute error. # - # source://thor//lib/thor/error.rb#78 + # source://thor//lib/thor/error.rb#67 def error; end - # source://thor//lib/thor/error.rb#89 + # source://thor//lib/thor/error.rb#78 def spell_checker; end end @@ -3806,7 +4192,7 @@ module Thor::Util # ==== Returns # String # - # source://thor//lib/thor/util.rb#263 + # source://thor//lib/thor/util.rb#264 def escape_globs(path); end # Returns a string that has had any HTML characters escaped. @@ -3821,7 +4207,7 @@ module Thor::Util # ==== Returns # String # - # source://thor//lib/thor/util.rb#279 + # source://thor//lib/thor/util.rb#280 def escape_html(string); end # Receives a namespace and search for it in the Thor::Base subclasses. @@ -3884,13 +4270,13 @@ module Thor::Util # Where to look for Thor files. # - # source://thor//lib/thor/util.rb#212 + # source://thor//lib/thor/util.rb#213 def globs_for(path); end # Receives a path and load the thor file in the path. The file is evaluated # inside the sandbox to avoid namespacing conflicts. # - # source://thor//lib/thor/util.rb#152 + # source://thor//lib/thor/util.rb#153 def load_thorfile(path, content = T.unsafe(nil), debug = T.unsafe(nil)); end # Receives a constant and converts it to a Thor namespace. Since Thor @@ -3925,7 +4311,7 @@ module Thor::Util # Return the path to the ruby interpreter taking into account multiple # installations and windows extensions. # - # source://thor//lib/thor/util.rb#220 + # source://thor//lib/thor/util.rb#221 def ruby_command; end # Receives a string and convert it to snake case. SnakeCase returns snake_case. @@ -3946,7 +4332,7 @@ module Thor::Util # Returns the root where thor files are located, depending on the OS. # - # source://thor//lib/thor/util.rb#191 + # source://thor//lib/thor/util.rb#192 def thor_root; end # Returns the files in the thor root. On Windows thor_root will be something @@ -3956,10 +4342,10 @@ module Thor::Util # # If we don't #gsub the \ character, Dir.glob will fail. # - # source://thor//lib/thor/util.rb#202 + # source://thor//lib/thor/util.rb#203 def thor_root_glob; end - # source://thor//lib/thor/util.rb#167 + # source://thor//lib/thor/util.rb#168 def user_home; end end end diff --git a/sorbet/rbi/gems/timeout@0.4.0.rbi b/sorbet/rbi/gems/timeout@0.4.1.rbi similarity index 100% rename from sorbet/rbi/gems/timeout@0.4.0.rbi rename to sorbet/rbi/gems/timeout@0.4.1.rbi diff --git a/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi b/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi similarity index 100% rename from sorbet/rbi/gems/unicode-display_width@2.4.2.rbi rename to sorbet/rbi/gems/unicode-display_width@2.5.0.rbi diff --git a/sorbet/rbi/gems/unparser@0.6.8.rbi b/sorbet/rbi/gems/unparser@0.6.8.rbi deleted file mode 100644 index 937e27312..000000000 --- a/sorbet/rbi/gems/unparser@0.6.8.rbi +++ /dev/null @@ -1,4525 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `unparser` gem. -# Please instead update this file by running `bin/tapioca gem unparser`. - -# Library namespace -# -# source://unparser//lib/unparser/equalizer.rb#3 -module Unparser - class << self - # Construct a parser buffer from string - # - # @param source [String] - # @return [Parser::Source::Buffer] - # - # source://unparser//lib/unparser.rb#147 - def buffer(source, identification = T.unsafe(nil)); end - - # Parse string into AST - # - # @param source [String] - # @return [Parser::AST::Node, nil] - # - # source://unparser//lib/unparser.rb#105 - def parse(source); end - - # Parse string into either syntax error or AST - # - # @param source [String] - # @return [Either] - # - # source://unparser//lib/unparser.rb#114 - def parse_either(source); end - - # Parse string into AST, with comments - # - # @param source [String] - # @return [Parser::AST::Node] - # - # source://unparser//lib/unparser.rb#125 - def parse_with_comments(source); end - - # Parser instance that produces AST unparser understands - # - # @api private - # @return [Parser::Base] - # - # source://unparser//lib/unparser.rb#134 - def parser; end - - # Unparse an AST (and, optionally, comments) into a string - # - # @api public - # @param node [Parser::AST::Node, nil] - # @param comment_array [Array] - # @raise InvalidNodeError - # if the node passed is invalid - # @return [String] - # - # source://unparser//lib/unparser.rb#60 - def unparse(node, comment_array = T.unsafe(nil)); end - - # Unparse capturing errors - # - # This is mostly useful for writing testing tools against unparser. - # - # @param node [Parser::AST::Node, nil] - # @return [Either] - # - # source://unparser//lib/unparser.rb#96 - def unparse_either(node); end - - # Unparse with validation - # - # @param node [Parser::AST::Node, nil] - # @param comment_array [Array] - # @return [Either] - # - # source://unparser//lib/unparser.rb#78 - def unparse_validate(node, comment_array = T.unsafe(nil)); end - end -end - -# Namespace for AST processing tools -# -# source://unparser//lib/unparser/ast.rb#5 -module Unparser::AST - class << self - # Return local variables that get assigned in scope - # - # @api private - # @param node [Parser::AST::Node] - # @return [Set] - # - # source://unparser//lib/unparser/ast.rb#57 - def local_variable_assignments(node); end - - # Return local variables read - # - # @api private - # @param node [Parser::AST::Node] - # @return [Set] - # - # source://unparser//lib/unparser/ast.rb#72 - def local_variable_reads(node); end - - # Test for local variable inherited scope reset - # - # @api private - # @param node [Parser::AST::Node] - # @return [Boolean] - # - # source://unparser//lib/unparser/ast.rb#33 - def not_close_scope?(node); end - - # Test for local variable scope reset - # - # @api private - # @param node [Parser::AST::Node] - # @return [Boolean] - # - # source://unparser//lib/unparser/ast.rb#45 - def not_reset_scope?(node); end - end -end - -# Nodes that assign a local variable -# -# source://unparser//lib/unparser/ast.rb#14 -Unparser::AST::ASSIGN_NODES = T.let(T.unsafe(nil), Set) - -# source://unparser//lib/unparser/ast.rb#11 -Unparser::AST::CLOSE_NODES = T.let(T.unsafe(nil), Array) - -# AST enumerator -# -# source://unparser//lib/unparser/ast.rb#80 -class Unparser::AST::Enumerator - include ::Enumerable - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # Return each node - # - # @api private - # @return [Enumerator] if no block given - # @return [self] otherwise - # - # source://unparser//lib/unparser/ast.rb#106 - def each(&block); end - - # Return nodes selected by type - # - # @api private - # @param type [Symbol] - # @return [Enumerable] - # - # source://unparser//lib/unparser/ast.rb#130 - def type(type); end - - # Return nodes selected by types - # - # @api private - # @param types [Enumerable] - # @return [Enumerable] - # - # source://unparser//lib/unparser/ast.rb#118 - def types(types); end - - class << self - # Return new instance - # - # @api private - # @param node [Parser::AST::Node] - # @param controller [#call(node)] - # @return [Enumerator] - # - # source://unparser//lib/unparser/ast.rb#92 - def new(node, controller = T.unsafe(nil)); end - - private - - # Return frozne set of objects - # - # @api private - # @param enumerable [Enumerable] - # @return [Set] - # - # source://unparser//lib/unparser/ast.rb#142 - def set(enumerable); end - - # Return nodes of type - # - # @api private - # @param node [Parser::AST::Node] - # @param type [Symbol] - # @return [Enumerable>] ] - # otherwise - # - # source://unparser//lib/unparser/ast/local_variable_scope.rb#121 - def each(node, &block); end - - private - - # source://unparser//lib/unparser/ast/local_variable_scope.rb#127 - def current; end - - # source://unparser//lib/unparser/ast/local_variable_scope.rb#156 - def define(name); end - - # source://unparser//lib/unparser/ast/local_variable_scope.rb#141 - def enter(node); end - - # source://unparser//lib/unparser/ast/local_variable_scope.rb#152 - def leave(node); end - - # source://unparser//lib/unparser/ast/local_variable_scope.rb#168 - def pop; end - - # source://unparser//lib/unparser/ast/local_variable_scope.rb#164 - def push_inherit; end - - # source://unparser//lib/unparser/ast/local_variable_scope.rb#160 - def push_reset; end - - # @yield [node, current.dup, before] - # - # source://unparser//lib/unparser/ast/local_variable_scope.rb#131 - def visit(node, &block); end - - class << self - # Enumerate each node with its local variable scope - # - # @api private - # @param node [Parser::AST::Node] - # @return [self] - # - # source://unparser//lib/unparser/ast/local_variable_scope.rb#106 - def each(node, &block); end - end -end - -# source://unparser//lib/unparser/ast.rb#9 -Unparser::AST::RESET_NODES = T.let(T.unsafe(nil), Array) - -# source://unparser//lib/unparser/ast.rb#7 -Unparser::AST::TAUTOLOGY = T.let(T.unsafe(nil), Proc) - -# Controlled AST walker walking the AST in deeth first search with pre order -# -# source://unparser//lib/unparser/ast.rb#164 -class Unparser::AST::Walker - include ::Unparser::Equalizer::Methods - - # Call walker with node - # - # @api private - # @param node [Parser::AST::Node] - # @return [undefined] - # - # source://unparser//lib/unparser/ast.rb#188 - def call(node); end - - class << self - # Call ast walker - # - # @api private - # @param node [Parser::AST::Node] - # @return [self] - # - # source://unparser//lib/unparser/ast.rb#175 - def call(node, controller = T.unsafe(nil), &block); end - end -end - -# Module to allow class and methods to be abstract -# -# Original code before vendoring and reduction from: https://github.com/dkubb/abstract_type. -# -# source://unparser//lib/unparser/abstract_type.rb#7 -module Unparser::AbstractType - mixes_in_class_methods ::Unparser::AbstractType::AbstractMethodDeclarations - - class << self - private - - # Define the new method on the abstract type - # - # Ensures that the instance cannot be of the abstract type - # and must be a descendant. - # - # @api private - # @param abstract_class [Class] - # @return [undefined] - # - # source://unparser//lib/unparser/abstract_type.rb#35 - def create_new_method(abstract_class); end - - # Hook called when module is included - # - # @api private - # @param descendant [Module] the module or class including AbstractType - # @return [undefined] - # - # source://unparser//lib/unparser/abstract_type.rb#17 - def included(descendant); end - end -end - -# source://unparser//lib/unparser/abstract_type.rb#47 -module Unparser::AbstractType::AbstractMethodDeclarations - # Create abstract instance methods - # - # @api public - # @example - # class Foo - # include AbstractType - # - # # Create an abstract instance method - # abstract_method :some_method - # end - # @param names [Array<#to_s>] - # @return [self] - # - # source://unparser//lib/unparser/abstract_type.rb#64 - def abstract_method(*names); end - - # Create abstract singleton methods - # - # @api private - # @example - # class Foo - # include AbstractType - # - # # Create an abstract instance method - # abstract_singleton_method :some_method - # end - # @param names [Array<#to_s>] - # @return [self] - # - # source://unparser//lib/unparser/abstract_type.rb#84 - def abstract_singleton_method(*names); end - - private - - # Create abstract instance method - # - # @api private - # @param name [#to_s] the name of the method to create - # @return [undefined] - # - # source://unparser//lib/unparser/abstract_type.rb#113 - def create_abstract_instance_method(name); end - - # Create abstract singleton method - # - # @api private - # @param name [#to_s] the name of the method to create - # @return [undefined] - # - # source://unparser//lib/unparser/abstract_type.rb#99 - def create_abstract_singleton_method(name); end -end - -# Allows objects to be made immutable -# -# Original code before vendoring and reduction from: https://github.com/dkubb/adamantium. -# -# source://unparser//lib/unparser/adamantium.rb#7 -module Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - - mixes_in_class_methods ::Unparser::Adamantium::ModuleMethods - mixes_in_class_methods ::Unparser::Adamantium::ClassMethods - - class << self - private - - # ModuleMethods - # - # source://unparser//lib/unparser/adamantium.rb#141 - def included(descendant); end - end -end - -# Methods mixed in to adamantium classes -# -# source://unparser//lib/unparser/adamantium.rb#70 -module Unparser::Adamantium::ClassMethods - # Instantiate a new frozen object - # - # @api public - # @return [Object] - # - # source://unparser//lib/unparser/adamantium.rb#77 - def new(*_arg0); end -end - -# source://unparser//lib/unparser/adamantium.rb#8 -module Unparser::Adamantium::InstanceMethods - # A noop #dup for immutable objects - # - # @api public - # @return [self] - # - # source://unparser//lib/unparser/adamantium.rb#14 - def dup; end - - # Freeze the object - # - # @api public - # @return [Object] - # - # source://unparser//lib/unparser/adamantium.rb#23 - def freeze; end - - private - - # source://unparser//lib/unparser/adamantium.rb#30 - def memoized_method_cache; end -end - -# Storage for memoized methods -# -# source://unparser//lib/unparser/adamantium.rb#37 -class Unparser::Adamantium::Memory - # Initialize the memory storage for memoized methods - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/adamantium.rb#44 - def initialize(values); end - - # Fetch the value from memory, or evaluate if it does not exist - # - # @api public - # @param name [Symbol] - # @yieldreturn [Object] the value to memoize - # - # source://unparser//lib/unparser/adamantium.rb#58 - def fetch(name); end -end - -# Build the memoized method -# -# source://unparser//lib/unparser/adamantium/method_builder.rb#6 -class Unparser::Adamantium::MethodBuilder - # Initialize an object to build a memoized method - # - # @api private - # @param descendant [Module] - # @param method_name [Symbol] - # @return [undefined] - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#47 - def initialize(descendant, method_name); end - - # Build a new memoized method - # - # @api public - # @example - # method_builder.call # => creates new method - # @return [UnboundMethod] - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#63 - def call; end - - private - - # source://unparser//lib/unparser/adamantium/method_builder.rb#72 - def assert_arity(arity); end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#83 - def create_memoized_method; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#78 - def remove_original_method; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#97 - def set_method_visibility; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#101 - def visibility; end -end - -# Raised when a block is passed to a memoized method -# -# source://unparser//lib/unparser/adamantium/method_builder.rb#25 -class Unparser::Adamantium::MethodBuilder::BlockNotAllowedError < ::ArgumentError - # Initialize a block not allowed exception - # - # @api private - # @param descendant [Module] - # @param method [Symbol] - # @return [BlockNotAllowedError] a new instance of BlockNotAllowedError - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#33 - def initialize(descendant, method); end -end - -# Raised when the method arity is invalid -# -# source://unparser//lib/unparser/adamantium/method_builder.rb#9 -class Unparser::Adamantium::MethodBuilder::InvalidArityError < ::ArgumentError - # Initialize an invalid arity exception - # - # @api private - # @param descendant [Module] - # @param method [Symbol] - # @param arity [Integer] - # @return [InvalidArityError] a new instance of InvalidArityError - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#18 - def initialize(descendant, method, arity); end -end - -# Methods mixed in to adamantium modules -# -# source://unparser//lib/unparser/adamantium.rb#84 -module Unparser::Adamantium::ModuleMethods - # Memoize a list of methods - # - # @api public - # @param methods [Array<#to_s>] a list of methods to memoize - # @return [self] - # - # source://unparser//lib/unparser/adamantium.rb#94 - def memoize(*methods); end - - # Test if method is memoized - # - # @param name [Symbol] - # @return [Bool] - # - # source://unparser//lib/unparser/adamantium.rb#104 - def memoized?(method_name); end - - # Return unmemoized instance method - # - # @api public - # @param name [Symbol] - # @raise [NameError] raised if the method is unknown - # @return [UnboundMethod] the memoized method - # - # source://unparser//lib/unparser/adamantium.rb#119 - def unmemoized_instance_method(method_name); end - - private - - # source://unparser//lib/unparser/adamantium.rb#127 - def memoize_method(method_name); end - - # source://unparser//lib/unparser/adamantium.rb#135 - def memoized_methods; end -end - -# Original code before vendoring and reduction from: https://github.com/mbj/anima. -# -# source://unparser//lib/unparser/anima.rb#5 -class Unparser::Anima < ::Module - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # Initialize object - # - # - # @return [undefined] - # - # source://unparser//lib/unparser/anima.rb#18 - def initialize(*names); end - - # Return new anima with attributes added - # - # @example - # anima = Anima.new(:foo) - # anima.add(:bar) # equals Anima.new(:foo, :bar) - # @return [Anima] - # - # source://unparser//lib/unparser/anima.rb#31 - def add(*names); end - - # Return attribute names - # - # @return [Enumerable] - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def attribute_names(&block); end - - # Return names - # - # @return [AttributeSet] - # - # source://unparser//lib/unparser/anima.rb#11 - def attributes; end - - # Return attributes hash for instance - # - # @param object [Object] - # @return [Hash] - # - # source://unparser//lib/unparser/anima.rb#52 - def attributes_hash(object); end - - # Initialize instance - # - # @param object [Object] - # @param attribute_hash [Hash] - # @return [self] - # - # source://unparser//lib/unparser/anima.rb#73 - def initialize_instance(object, attribute_hash); end - - # Return new anima with attributes removed - # - # @example - # anima = Anima.new(:foo, :bar) - # anima.remove(:bar) # equals Anima.new(:foo) - # @return [Anima] - # - # source://unparser//lib/unparser/anima.rb#43 - def remove(*names); end - - private - - # Fail unless keys in +attribute_hash+ matches #attribute_names - # - # @param klass [Class] the class being initialized - # @param attribute_hash [Hash] the attributes to initialize +object+ with - # @raise [Error] - # @return [undefined] - # - # source://unparser//lib/unparser/anima.rb#164 - def assert_known_attributes(klass, attribute_hash); end - - # Infect the instance with anima - # - # @param scope [Class, Module] - # @return [undefined] - # - # source://unparser//lib/unparser/anima.rb#137 - def included(descendant); end - - # Return new instance - # - # @param attributes [Enumerable] - # @return [Anima] - # - # source://unparser//lib/unparser/anima.rb#180 - def new(attributes); end -end - -# An attribute -# -# source://unparser//lib/unparser/anima/attribute.rb#6 -class Unparser::Anima::Attribute - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # Initialize attribute - # - # @param name [Symbol] - # @return [Attribute] a new instance of Attribute - # - # source://unparser//lib/unparser/anima/attribute.rb#12 - def initialize(name); end - - # Get attribute value from object - # - # @param object [Object] - # @return [Object] - # - # source://unparser//lib/unparser/anima/attribute.rb#42 - def get(object); end - - # Return instance variable name - # - # @return [Symbol] - # - # source://unparser//lib/unparser/anima/attribute.rb#25 - def instance_variable_name; end - - # Load attribute - # - # @param object [Object] - # @param attributes [Hash] - # @return [self] - # - # source://unparser//lib/unparser/anima/attribute.rb#33 - def load(object, attributes); end - - # Return attribute name - # - # @return [Symbol] - # - # source://unparser//lib/unparser/anima/attribute.rb#20 - def name; end - - # Set attribute value in object - # - # @param object [Object] - # @param value [Object] - # @return [self] - # - # source://unparser//lib/unparser/anima/attribute.rb#52 - def set(object, value); end -end - -# Abstract base class for anima errors -# -# source://unparser//lib/unparser/anima/error.rb#6 -class Unparser::Anima::Error < ::RuntimeError - # Initialize object - # - # @param klass [Class] the class being initialized - # @param missing [Enumerable] - # @param unknown [Enumerable] - # @return [undefined] - # - # source://unparser//lib/unparser/anima/error.rb#18 - def initialize(klass, missing, unknown); end -end - -# source://unparser//lib/unparser/anima/error.rb#7 -Unparser::Anima::Error::FORMAT = T.let(T.unsafe(nil), String) - -# Static instance methods for anima infected classes -# -# source://unparser//lib/unparser/anima.rb#82 -module Unparser::Anima::InstanceMethods - # Initialize an anima infected object - # - # - # @param attributes [#to_h] a hash that matches anima defined attributes - # @return [undefined] - # - # source://unparser//lib/unparser/anima.rb#91 - def initialize(attributes); end - - # Return a hash representation of an anima infected object - # - # @api public - # @example - # anima.to_h # => { :foo => : bar } - # @return [Hash] - # - # source://unparser//lib/unparser/anima.rb#104 - def to_h; end - - # Return updated instance - # - # @api public - # @example - # klass = Class.new do - # include Anima.new(:foo, :bar) - # end - # - # foo = klass.new(:foo => 1, :bar => 2) - # updated = foo.with(:foo => 3) - # updated.foo # => 3 - # updated.bar # => 2 - # @param attributes [Hash] - # @return [Anima] - # - # source://unparser//lib/unparser/anima.rb#125 - def with(attributes); end -end - -# Buffer used to emit into -# -# source://unparser//lib/unparser/buffer.rb#6 -class Unparser::Buffer - # Initialize object - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/buffer.rb#16 - def initialize; end - - # Append string - # - # @api private - # @param string [String] - # @return [self] - # - # source://unparser//lib/unparser/buffer.rb#29 - def append(string); end - - # Append a string without an indentation prefix - # - # @api private - # @param string [String] - # @return [self] - # - # source://unparser//lib/unparser/buffer.rb#45 - def append_without_prefix(string); end - - # Return content of buffer - # - # @api private - # @return [String] - # - # source://unparser//lib/unparser/buffer.rb#104 - def content; end - - # Test for a fresh line - # - # @api private - # @return [Boolean] - # - # source://unparser//lib/unparser/buffer.rb#94 - def fresh_line?; end - - # Increase indent - # - # @api private - # @return [self] - # - # source://unparser//lib/unparser/buffer.rb#55 - def indent; end - - # Write newline - # - # @api private - # @return [self] - # - # source://unparser//lib/unparser/buffer.rb#77 - def nl; end - - # source://unparser//lib/unparser/buffer.rb#81 - def root_indent; end - - # Decrease indent - # - # @api private - # @return [self] - # - # source://unparser//lib/unparser/buffer.rb#66 - def unindent; end - - # Write raw fragment to buffer - # - # Does not do indentation logic. - # - # @param fragment [String] - # @return [self] - # - # source://unparser//lib/unparser/buffer.rb#115 - def write(fragment); end - - private - - # source://unparser//lib/unparser/buffer.rb#124 - def prefix; end -end - -# source://unparser//lib/unparser/buffer.rb#122 -Unparser::Buffer::INDENT_SPACE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/buffer.rb#8 -Unparser::Buffer::NL = T.let(T.unsafe(nil), String) - -# Unparser specific AST builder defaulting to modern AST format -# -# source://unparser//lib/unparser.rb#23 -class Unparser::Builder < ::Parser::Builders::Default - # @return [Builder] a new instance of Builder - # - # source://unparser//lib/unparser.rb#26 - def initialize; end -end - -# Unparser CLI implementation -# -# source://unparser//lib/unparser/cli.rb#5 -class Unparser::CLI - # Initialize object - # - # @api private - # @param arguments [Array] - # @return [undefined] - # - # source://unparser//lib/unparser/cli.rb#74 - def initialize(arguments); end - - # Add options - # - # - # @api private - # @param builder [OptionParser] - # @return [undefined] - # - # source://unparser//lib/unparser/cli.rb#102 - def add_options(builder); end - - # Return exit status - # - # @api private - # @return [Integer] - # - # source://unparser//lib/unparser/cli.rb#132 - def exit_status; end - - private - - # source://unparser//lib/unparser/cli.rb#155 - def effective_targets; end - - # source://unparser//lib/unparser/cli.rb#143 - def process_target(target); end - - # source://unparser//lib/unparser/cli.rb#170 - def targets(file_name); end - - class << self - # Run CLI - # - # @api private - # @param arguments [Array] - # @return [Integer] the exit status - # - # source://unparser//lib/unparser/cli.rb#63 - def run(*arguments); end - end -end - -# source://unparser//lib/unparser/cli.rb#8 -Unparser::CLI::EXIT_FAILURE = T.let(T.unsafe(nil), Integer) - -# source://unparser//lib/unparser/cli.rb#7 -Unparser::CLI::EXIT_SUCCESS = T.let(T.unsafe(nil), Integer) - -# source://unparser//lib/unparser/cli.rb#10 -class Unparser::CLI::Target - include ::Unparser::AbstractType - extend ::Unparser::AbstractType::AbstractMethodDeclarations - - class << self - # source://unparser//lib/unparser/abstract_type.rb#36 - def new(*args, &block); end - end -end - -# Path target -# -# source://unparser//lib/unparser/cli.rb#14 -class Unparser::CLI::Target::Path < ::Unparser::CLI::Target - include ::Unparser::Equalizer::Methods - - # Literal for this target - # - # @return [Validation] - # - # source://unparser//lib/unparser/cli.rb#27 - def literal_validation; end - - # Validation for this target - # - # @return [Validation] - # - # source://unparser//lib/unparser/cli.rb#20 - def validation; end -end - -# String target -# -# source://unparser//lib/unparser/cli.rb#33 -class Unparser::CLI::Target::String - include ::Unparser::Equalizer::Methods - - # Literal for this target - # - # @return [Validation] - # - # source://unparser//lib/unparser/cli.rb#46 - def literal_validation; end - - # Validation for this target - # - # @return [Validation] - # - # source://unparser//lib/unparser/cli.rb#39 - def validation; end -end - -# Class to colorize strings -# -# source://unparser//lib/unparser/color.rb#5 -class Unparser::Color - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # Format text with color - # - # @param text [String] - # @return [String] - # - # source://unparser//lib/unparser/color.rb#13 - def format(text); end -end - -# source://unparser//lib/unparser/color.rb#41 -Unparser::Color::GREEN = T.let(T.unsafe(nil), Unparser::Color) - -# source://unparser//lib/unparser/color.rb#17 -Unparser::Color::NONE = T.let(T.unsafe(nil), T.untyped) - -# source://unparser//lib/unparser/color.rb#40 -Unparser::Color::RED = T.let(T.unsafe(nil), Unparser::Color) - -# Holds the comments that remain to be emitted -# -# source://unparser//lib/unparser/comments.rb#6 -class Unparser::Comments - # Initialize object - # - # @api private - # @param comments [Array] - # @return [undefined] - # - # source://unparser//lib/unparser/comments.rb#30 - def initialize(comments); end - - # Consume part or all of the node - # - # @api private - # @param node [Parser::AST::Node] - # @param source_part [Symbol] - # @return [undefined] - # - # source://unparser//lib/unparser/comments.rb#44 - def consume(node, source_part = T.unsafe(nil)); end - - # Proxy to singleton - # - # NOTICE: - # Delegating to stateless helpers is a pattern I saw many times in our code. - # Maybe we should make another helper module? include SingletonDelegator.new(:source_range) ? - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/comments.rb#18 - def source_range(*arguments); end - - # Take all remaining comments - # - # @api private - # @return [Array] - # - # source://unparser//lib/unparser/comments.rb#68 - def take_all; end - - # Take comments appear in the source before the specified part of the node - # - # @api private - # @param node [Parser::AST::Node] - # @param source_part [Symbol] - # @return [Array] - # - # source://unparser//lib/unparser/comments.rb#81 - def take_before(node, source_part); end - - # Take end-of-line comments - # - # @api private - # @return [Array] - # - # source://unparser//lib/unparser/comments.rb#55 - def take_eol_comments; end - - private - - # source://unparser//lib/unparser/comments.rb#119 - def take_up_to_line(line); end - - # source://unparser//lib/unparser/comments.rb#114 - def take_while; end - - # source://unparser//lib/unparser/comments.rb#123 - def unshift_documents(comments); end - - class << self - # Return source location part - # - # FIXME: This method should not be needed. It does to much inline signalling. - # - # :reek:ManualDispatch - # - # @api private - # @param node [Parser::AST::Node] - # @param part [Symbol] - # @return [Parser::Source::Range] if present - # @return [nil] otherwise - # - # source://unparser//lib/unparser/comments.rb#107 - def source_range(node, part); end - end -end - -# A mixin to define a composition -# -# Original code before vendoring and reduction from: https://github.com/mbj/concord. -# -# source://unparser//lib/unparser/concord.rb#7 -class Unparser::Concord < ::Module - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # Initialize object - # - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/concord.rb#30 - def initialize(*names); end - - # Return names - # - # @api private - # @return [Enumerable] - # - # source://unparser//lib/unparser/concord.rb#19 - def names; end - - private - - # Define equalizer - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/concord.rb#48 - def define_equalizer; end - - # Define initialize method - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/concord.rb#72 - def define_initialize; end - - # Define readers - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/concord.rb#58 - def define_readers; end - - # Return instance variable names - # - # @api private - # @return [String] - # - # source://unparser//lib/unparser/concord.rb#92 - def instance_variable_names; end -end - -# The maximum number of objects the hosting class is composed of -# -# source://unparser//lib/unparser/concord.rb#11 -Unparser::Concord::MAX_NR_OF_OBJECTS = T.let(T.unsafe(nil), Integer) - -# Mixin for public attribute readers -# -# source://unparser//lib/unparser/concord.rb#97 -class Unparser::Concord::Public < ::Unparser::Concord - # Hook called when module is included - # - # @api private - # @param descendant [Class, Module] - # @return [undefined] - # - # source://unparser//lib/unparser/concord.rb#107 - def included(descendant); end -end - -# All unparser constants maybe included in other libraries. -# -# source://unparser//lib/unparser/constants.rb#5 -module Unparser::Constants; end - -# All binary operators of the ruby language -# -# source://unparser//lib/unparser/constants.rb#13 -Unparser::Constants::BINARY_OPERATORS = T.let(T.unsafe(nil), Set) - -# source://unparser//lib/unparser/constants.rb#63 -Unparser::Constants::KEYWORDS = T.let(T.unsafe(nil), Set) - -# source://unparser//lib/unparser/constants.rb#45 -Unparser::Constants::K_ALIAS = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#44 -Unparser::Constants::K_AND = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#23 -Unparser::Constants::K_BEGIN = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#37 -Unparser::Constants::K_BREAK = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#24 -Unparser::Constants::K_CASE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#25 -Unparser::Constants::K_CLASS = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#21 -Unparser::Constants::K_DEF = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#28 -Unparser::Constants::K_DEFINE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#33 -Unparser::Constants::K_DEFINED = T.let(T.unsafe(nil), String) - -# Keywords -# -# source://unparser//lib/unparser/constants.rb#20 -Unparser::Constants::K_DO = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#59 -Unparser::Constants::K_EEND = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#46 -Unparser::Constants::K_ELSE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#47 -Unparser::Constants::K_ELSIF = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#58 -Unparser::Constants::K_ENCODING = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#22 -Unparser::Constants::K_END = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#27 -Unparser::Constants::K_ENSURE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#41 -Unparser::Constants::K_FALSE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#60 -Unparser::Constants::K_FILE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#48 -Unparser::Constants::K_FOR = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#43 -Unparser::Constants::K_IF = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#51 -Unparser::Constants::K_IN = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#29 -Unparser::Constants::K_MODULE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#40 -Unparser::Constants::K_NEXT = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#49 -Unparser::Constants::K_NIL = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#50 -Unparser::Constants::K_NOT = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#52 -Unparser::Constants::K_OR = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#35 -Unparser::Constants::K_POSTEXE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#34 -Unparser::Constants::K_PREEXE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#39 -Unparser::Constants::K_REDO = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#30 -Unparser::Constants::K_RESCUE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#38 -Unparser::Constants::K_RETRY = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#31 -Unparser::Constants::K_RETURN = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#26 -Unparser::Constants::K_SELF = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#36 -Unparser::Constants::K_SUPER = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#61 -Unparser::Constants::K_THEN = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#42 -Unparser::Constants::K_TRUE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#32 -Unparser::Constants::K_UNDEF = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#53 -Unparser::Constants::K_UNLESS = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#56 -Unparser::Constants::K_UNTIL = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#54 -Unparser::Constants::K_WHEN = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#55 -Unparser::Constants::K_WHILE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#57 -Unparser::Constants::K_YIELD = T.let(T.unsafe(nil), String) - -# All unary operators of the ruby language -# -# source://unparser//lib/unparser/constants.rb#8 -Unparser::Constants::UNARY_OPERATORS = T.let(T.unsafe(nil), Set) - -# DSL to help defining emitters -# -# source://unparser//lib/unparser/dsl.rb#5 -module Unparser::DSL - private - - # source://unparser//lib/unparser/dsl.rb#32 - def children(*names); end - - # source://unparser//lib/unparser/dsl.rb#17 - def define_child(name, index); end - - # source://unparser//lib/unparser/dsl.rb#24 - def define_group(name, range); end - - # source://unparser//lib/unparser/dsl.rb#9 - def define_remaining_children(names); end -end - -# Class to create diffs from source code -# -# source://unparser//lib/unparser/diff.rb#5 -class Unparser::Diff - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # Colorized unified source diff between old and new - # - # @return [String] if there is a diff - # @return [nil] otherwise - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def colorized_diff(&block); end - - # Unified source diff between old and new - # - # @return [String] if there is exactly one diff - # @return [nil] otherwise - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def diff(&block); end - - private - - # source://unparser//lib/unparser/diff.rb#62 - def diffs; end - - # source://unparser//lib/unparser/diff.rb#66 - def hunks; end - - # source://unparser//lib/unparser/diff.rb#81 - def max_length; end - - # source://unparser//lib/unparser/diff.rb#72 - def minimized_hunk; end - - class << self - # Build new object from source strings - # - # @param old [String] - # @param new [String] - # @return [Diff] - # - # source://unparser//lib/unparser/diff.rb#46 - def build(old, new); end - - private - - # source://unparser//lib/unparser/diff.rb#85 - def colorize_line(line); end - - # Break up source into lines - # - # @param source [String] - # @return [Array] - # - # source://unparser//lib/unparser/diff.rb#55 - def lines(source); end - end -end - -# source://unparser//lib/unparser/diff.rb#8 -Unparser::Diff::ADDITION = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/diff.rb#9 -Unparser::Diff::DELETION = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/diff.rb#10 -Unparser::Diff::NEWLINE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser.rb#34 -Unparser::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) - -# source://unparser//lib/unparser.rb#33 -Unparser::EMPTY_STRING = T.let(T.unsafe(nil), String) - -# RequireBLock -# -# source://unparser//lib/unparser/either.rb#21 -class Unparser::Either - include ::Unparser::RequireBlock - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # Test for left constructor - # - # @return [Boolean] - # - # source://unparser//lib/unparser/either.rb#42 - def left?; end - - # Test for right constructor - # - # @return [Boolean] - # - # source://unparser//lib/unparser/either.rb#49 - def right?; end - - class << self - # Execute block and wrap error in left - # - # @param exception [Class] - # @return [Either] - # - # source://unparser//lib/unparser/either.rb#33 - def wrap_error(*exceptions); end - end -end - -# source://unparser//lib/unparser/either.rb#53 -class Unparser::Either::Left < ::Unparser::Either - # Evaluate applicative block - # - # @return [Either::Left] - # - # source://unparser//lib/unparser/either.rb#64 - def bind(&block); end - - # Evaluate left side of branch - # - # @param left [#call] - # @param _right [#call] - # - # source://unparser//lib/unparser/either.rb#98 - def either(left, _right); end - - # Evaluate functor block - # - # @return [Either::Left] - # - # source://unparser//lib/unparser/either.rb#57 - def fmap(&block); end - - # Unwrap value from left - # - # @return [Object] - # - # source://unparser//lib/unparser/either.rb#71 - def from_left; end - - # Unwrap value from right - # - # @return [Object] - # - # source://unparser//lib/unparser/either.rb#79 - def from_right; end - - # Map over left value - # - # @return [Either::Right] - # - # source://unparser//lib/unparser/either.rb#90 - def lmap; end -end - -# Left -# -# source://unparser//lib/unparser/either.rb#103 -class Unparser::Either::Right < ::Unparser::Either - # Evaluate applicative block - # - # @return [Either] - # @yield [value] - # - # source://unparser//lib/unparser/either.rb#114 - def bind; end - - # Evaluate right side of branch - # - # @param _left [#call] - # @param right [#call] - # - # source://unparser//lib/unparser/either.rb#148 - def either(_left, right); end - - # Evaluate functor block - # - # @return [Either::Right] - # - # source://unparser//lib/unparser/either.rb#107 - def fmap; end - - # Unwrap value from left - # - # @return [Object] - # - # source://unparser//lib/unparser/either.rb#122 - def from_left; end - - # Unwrap value from right - # - # @return [Object] - # - # source://unparser//lib/unparser/either.rb#133 - def from_right; end - - # Map over left value - # - # @return [Either::Right] - # - # source://unparser//lib/unparser/either.rb#140 - def lmap(&block); end -end - -# Emitter base class -# -# source://unparser//lib/unparser/emitter.rb#7 -class Unparser::Emitter - include ::Unparser::NodeHelpers - include ::Unparser::Generation - include ::Unparser::Constants - include ::Unparser::AbstractType - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - extend ::Unparser::AbstractType::AbstractMethodDeclarations - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - extend ::Unparser::DSL - - # source://unparser//lib/unparser/anima.rb#146 - def buffer; end - - # source://unparser//lib/unparser/anima.rb#146 - def comments; end - - # Dispatch node write as statement - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/abstract_type.rb#114 - def dispatch(*_arg0); end - - # source://unparser//lib/unparser/emitter.rb#59 - def emit_mlhs; end - - # source://unparser//lib/unparser/anima.rb#146 - def local_variable_scope; end - - # source://unparser//lib/unparser/anima.rb#146 - def node; end - - # LocalVariableRoot - # - # source://unparser//lib/unparser/emitter.rb#38 - def node_type; end - - class << self - # source://unparser//lib/unparser/anima.rb#140 - def anima; end - - # Return emitter - # - # - # @api private - # @return [Emitter] - # - # source://unparser//lib/unparser/emitter.rb#70 - def emitter(buffer:, comments:, node:, local_variable_scope:); end - - # source://unparser//lib/unparser/abstract_type.rb#36 - def new(*args, &block); end - - private - - # Register emitter for type - # - # @api private - # @param types [Symbol] - # @return [undefined] - # - # source://unparser//lib/unparser/emitter.rb#50 - def handle(*types); end - end -end - -# Emitter for alias nodes -# -# source://unparser//lib/unparser/emitter/alias.rb#6 -class Unparser::Emitter::Alias < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/alias.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def source; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# Arguments emitter -# -# source://unparser//lib/unparser/emitter/args.rb#6 -class Unparser::Emitter::Args < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/args.rb#7 - def emit_block_arguments; end - - # source://unparser//lib/unparser/emitter/args.rb#15 - def emit_def_arguments; end - - # source://unparser//lib/unparser/emitter/args.rb#19 - def emit_lambda_arguments; end - - private - - # source://unparser//lib/unparser/emitter/args.rb#26 - def emit_shadowargs; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def normal_arguments(&block); end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def shadowargs(&block); end -end - -# Argument emitter -# -# source://unparser//lib/unparser/emitter/argument.rb#84 -class Unparser::Emitter::Argument < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#91 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Array literal emitter -# -# source://unparser//lib/unparser/emitter/array.rb#6 -class Unparser::Emitter::Array < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/array.rb#9 - def emit_heredoc_reminders; end - - private - - # source://unparser//lib/unparser/emitter/array.rb#15 - def dispatch; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def emitters(&block); end -end - -# Emitter for array patterns -# -# source://unparser//lib/unparser/emitter/array_pattern.rb#6 -class Unparser::Emitter::ArrayPattern < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/array_pattern.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/emitter/array_pattern.rb#20 - def emit_member(node); end -end - -# Base class for assignment emitters -# -# source://unparser//lib/unparser/emitter/assignment.rb#7 -class Unparser::Emitter::Assignment < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/assignment.rb#14 - def emit_heredoc_reminders; end - - # source://unparser//lib/unparser/abstract_type.rb#114 - def emit_left(*_arg0); end - - # source://unparser//lib/unparser/emitter/assignment.rb#10 - def symbol_name; end - - private - - # source://unparser//lib/unparser/emitter/assignment.rb#22 - def dispatch; end - - # source://unparser//lib/unparser/emitter/assignment.rb#27 - def emit_right; end -end - -# source://unparser//lib/unparser/emitter/assignment.rb#8 -Unparser::Emitter::Assignment::BINARY_OPERATOR = T.let(T.unsafe(nil), Array) - -# Constant assignment emitter -# -# source://unparser//lib/unparser/emitter/assignment.rb#57 -class Unparser::Emitter::Assignment::Constant < ::Unparser::Emitter::Assignment - private - - # source://unparser//lib/unparser/dsl.rb#18 - def base; end - - # source://unparser//lib/unparser/emitter/assignment.rb#65 - def emit_left; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def right; end -end - -# Variable assignment emitter -# -# source://unparser//lib/unparser/emitter/assignment.rb#42 -class Unparser::Emitter::Assignment::Variable < ::Unparser::Emitter::Assignment - private - - # source://unparser//lib/unparser/emitter/assignment.rb#50 - def emit_left; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def right; end -end - -# Emitter for begin nodes -# -# source://unparser//lib/unparser/emitter/begin.rb#7 -class Unparser::Emitter::Begin < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/begin.rb#11 - def emit_heredoc_reminders; end - - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/begin.rb#19 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Non send binary operator / keyword emitter -# -# source://unparser//lib/unparser/emitter/binary.rb#6 -class Unparser::Emitter::Binary < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/binary.rb#11 - def dispatch; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def writer(&block); end -end - -# Base class for and and or op-assign -# -# source://unparser//lib/unparser/emitter/op_assign.rb#7 -class Unparser::Emitter::BinaryAssign < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/op_assign.rb#17 - def emit_heredoc_reminders; end - - private - - # source://unparser//lib/unparser/emitter/op_assign.rb#24 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def expression; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# source://unparser//lib/unparser/emitter/op_assign.rb#10 -Unparser::Emitter::BinaryAssign::MAP = T.let(T.unsafe(nil), Hash) - -# Block emitter -# -# source://unparser//lib/unparser/emitter/block.rb#7 -class Unparser::Emitter::Block < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def arguments; end - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/block.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/emitter/block.rb#75 - def emit_block_arguments; end - - # source://unparser//lib/unparser/emitter/block.rb#67 - def emit_lambda_arguments; end - - # source://unparser//lib/unparser/emitter/block.rb#61 - def emit_send_target; end - - # source://unparser//lib/unparser/emitter/block.rb#49 - def emit_target; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/block.rb#24 - def need_do?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/block.rb#71 - def numblock?; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def target_writer(&block); end - - # source://unparser//lib/unparser/emitter/block.rb#36 - def write_close; end - - # source://unparser//lib/unparser/emitter/block.rb#28 - def write_open; end -end - -# Block pass node emitter -# -# source://unparser//lib/unparser/emitter/argument.rb#123 -class Unparser::Emitter::BlockPass < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#130 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for toplevel constant reference nodes -# -# source://unparser//lib/unparser/emitter/cbase.rb#6 -class Unparser::Emitter::CBase < ::Unparser::Emitter - private - - # Perform dispatch - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/emitter/cbase.rb#17 - def dispatch; end -end - -# Emitter for case nodes -# -# source://unparser//lib/unparser/emitter/case.rb#6 -class Unparser::Emitter::Case < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def condition; end - - # source://unparser//lib/unparser/emitter/case.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/emitter/case.rb#35 - def emit_condition; end - - # source://unparser//lib/unparser/emitter/case.rb#22 - def emit_else; end - - # source://unparser//lib/unparser/emitter/case.rb#30 - def emit_whens; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def whens(&block); end -end - -# Emitter for case guards -# -# source://unparser//lib/unparser/emitter/case_guard.rb#6 -class Unparser::Emitter::CaseGuard < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def condition; end - - # source://unparser//lib/unparser/emitter/case_guard.rb#19 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/case_guard.rb#10 -Unparser::Emitter::CaseGuard::MAP = T.let(T.unsafe(nil), Hash) - -# Emitter for case matches -# -# source://unparser//lib/unparser/emitter/case_match.rb#6 -class Unparser::Emitter::CaseMatch < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/case_match.rb#20 - def dispatch; end - - # source://unparser//lib/unparser/emitter/case_match.rb#16 - def else_branch; end - - # source://unparser//lib/unparser/emitter/case_match.rb#30 - def emit_else_branch; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def patterns(&block); end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# Emitter for class nodes -# -# source://unparser//lib/unparser/emitter/class.rb#6 -class Unparser::Emitter::Class < ::Unparser::Emitter - include ::Unparser::Emitter::LocalVariableRoot - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def local_variable_scope(&block); end - - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/class.rb#15 - def dispatch; end - - # source://unparser//lib/unparser/emitter/class.rb#23 - def emit_superclass; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def superclass; end -end - -# Emitter for constant access -# -# source://unparser//lib/unparser/emitter/variable.rb#21 -class Unparser::Emitter::Const < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/variable.rb#28 - def dispatch; end - - # source://unparser//lib/unparser/emitter/variable.rb#33 - def emit_scope; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def scope; end -end - -# Emitter for const pattern node -# -# source://unparser//lib/unparser/emitter/const_pattern.rb#6 -class Unparser::Emitter::ConstPattern < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def const; end - - # source://unparser//lib/unparser/emitter/const_pattern.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def pattern; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Dynamic string emitter -# -# source://unparser//lib/unparser/emitter/dstr.rb#6 -class Unparser::Emitter::DStr < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/dstr.rb#10 - def emit_heredoc_reminders; end - - private - - # source://unparser//lib/unparser/emitter/dstr.rb#16 - def dispatch; end -end - -# Dynamic symbol literal emitter -# -# source://unparser//lib/unparser/emitter/dsym.rb#6 -class Unparser::Emitter::DSym < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/dsym.rb#11 - def dispatch; end - - # source://unparser//lib/unparser/emitter/dsym.rb#34 - def emit_begin_child(component); end - - # source://unparser//lib/unparser/emitter/dsym.rb#24 - def emit_str_child(value); end -end - -# Emitter for def node -# -# source://unparser//lib/unparser/emitter/def.rb#6 -class Unparser::Emitter::Def < ::Unparser::Emitter - include ::Unparser::Emitter::LocalVariableRoot - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def local_variable_scope(&block); end - - private - - # source://unparser//lib/unparser/abstract_type.rb#114 - def body(*_arg0); end - - # source://unparser//lib/unparser/emitter/def.rb#17 - def dispatch; end - - # source://unparser//lib/unparser/emitter/def.rb#25 - def emit_arguments; end - - # source://unparser//lib/unparser/abstract_type.rb#114 - def emit_name(*_arg0); end -end - -# Instance def emitter -# -# source://unparser//lib/unparser/emitter/def.rb#34 -class Unparser::Emitter::Def::Instance < ::Unparser::Emitter::Def - private - - # source://unparser//lib/unparser/dsl.rb#18 - def arguments; end - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/def.rb#41 - def emit_name; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for defines on singleton -# -# source://unparser//lib/unparser/emitter/def.rb#48 -class Unparser::Emitter::Def::Singleton < ::Unparser::Emitter::Def - private - - # source://unparser//lib/unparser/dsl.rb#18 - def arguments; end - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/def.rb#56 - def emit_name; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def subject; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/def.rb#63 - def subject_without_parens?; end -end - -# Emitter for defined? nodes -# -# source://unparser//lib/unparser/emitter/defined.rb#6 -class Unparser::Emitter::Defined < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/defined.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def subject; end -end - -# Emitter for in pattern nodes -# -# source://unparser//lib/unparser/emitter/find_pattern.rb#6 -class Unparser::Emitter::FindPattern < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/find_pattern.rb#11 - def dispatch; end -end - -# Emitter for flip flops -# -# source://unparser//lib/unparser/emitter/flipflop.rb#6 -class Unparser::Emitter::FlipFlop < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/flipflop.rb#17 - def symbol_name; end - - private - - # source://unparser//lib/unparser/emitter/flipflop.rb#27 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def left; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def right; end -end - -# source://unparser//lib/unparser/emitter/flipflop.rb#7 -Unparser::Emitter::FlipFlop::MAP = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/emitter/flipflop.rb#12 -Unparser::Emitter::FlipFlop::SYMBOLS = T.let(T.unsafe(nil), Hash) - -# Emiter for float literals -# -# source://unparser//lib/unparser/emitter/float.rb#6 -class Unparser::Emitter::Float < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/float.rb#16 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def value; end -end - -# source://unparser//lib/unparser/emitter/float.rb#11 -Unparser::Emitter::Float::INFINITY = T.let(T.unsafe(nil), Float) - -# source://unparser//lib/unparser/emitter/float.rb#12 -Unparser::Emitter::Float::NEG_INFINITY = T.let(T.unsafe(nil), Float) - -# Emitter control flow modifiers -# -# source://unparser//lib/unparser/emitter/flow_modifier.rb#6 -class Unparser::Emitter::FlowModifier < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/flow_modifier.rb#17 - def emit_heredoc_reminders; end - - private - - # source://unparser//lib/unparser/emitter/flow_modifier.rb#25 - def dispatch; end - - # source://unparser//lib/unparser/emitter/flow_modifier.rb#36 - def emit_arguments; end -end - -# source://unparser//lib/unparser/emitter/flow_modifier.rb#7 -Unparser::Emitter::FlowModifier::MAP = T.let(T.unsafe(nil), Hash) - -# Emitter for for nodes -# -# source://unparser//lib/unparser/emitter/for.rb#6 -class Unparser::Emitter::For < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def assignment; end - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/dsl.rb#18 - def condition; end - - # source://unparser//lib/unparser/emitter/for.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/emitter/for.rb#20 - def emit_condition; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for forwarding arguments -# -# source://unparser//lib/unparser/emitter/argument.rb#6 -class Unparser::Emitter::ForwardArg < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#20 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/argument.rb#7 -Unparser::Emitter::ForwardArg::MAP = T.let(T.unsafe(nil), Hash) - -# Emitter for Hash literals -# -# source://unparser//lib/unparser/emitter/hash.rb#6 -class Unparser::Emitter::Hash < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/hash.rb#9 - def emit_heredoc_reminders; end - - private - - # source://unparser//lib/unparser/emitter/hash.rb#15 - def dispatch; end - - # source://unparser//lib/unparser/emitter/hash.rb#31 - def emit_hash_body; end - - # source://unparser//lib/unparser/emitter/hash.rb#27 - def emit_heredoc_reminder_member(node); end -end - -# Emitter for hash patterns -# -# source://unparser//lib/unparser/emitter/hash_pattern.rb#6 -class Unparser::Emitter::HashPattern < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/hash_pattern.rb#10 - def emit_const_pattern; end - - private - - # source://unparser//lib/unparser/emitter/hash_pattern.rb#18 - def dispatch; end - - # source://unparser//lib/unparser/emitter/hash_pattern.rb#24 - def emit_hash_body; end - - # source://unparser//lib/unparser/emitter/hash_pattern.rb#41 - def emit_match_var(node); end - - # source://unparser//lib/unparser/emitter/hash_pattern.rb#28 - def emit_member(node); end - - # source://unparser//lib/unparser/emitter/hash_pattern.rb#46 - def emit_pair(node); end - - # source://unparser//lib/unparser/emitter/hash_pattern.rb#62 - def write_symbol_body(symbol); end -end - -# Base class for pre and postexe emitters -# -# source://unparser//lib/unparser/emitter/hookexe.rb#6 -class Unparser::Emitter::Hookexe < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/hookexe.rb#19 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/hookexe.rb#8 -Unparser::Emitter::Hookexe::MAP = T.let(T.unsafe(nil), Hash) - -# Emitter if nodes -# -# source://unparser//lib/unparser/emitter/if.rb#6 -class Unparser::Emitter::If < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/if.rb#11 - def emit_ternary; end - - private - - # source://unparser//lib/unparser/dsl.rb#18 - def condition; end - - # source://unparser//lib/unparser/emitter/if.rb#21 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def else_branch; end - - # source://unparser//lib/unparser/emitter/if.rb#59 - def emit_condition; end - - # source://unparser//lib/unparser/emitter/if.rb#71 - def emit_else_branch; end - - # source://unparser//lib/unparser/emitter/if.rb#63 - def emit_if_branch; end - - # source://unparser//lib/unparser/emitter/if.rb#43 - def emit_normal; end - - # source://unparser//lib/unparser/emitter/if.rb#37 - def emit_postcondition; end - - # source://unparser//lib/unparser/dsl.rb#18 - def if_branch; end - - # source://unparser//lib/unparser/emitter/if.rb#55 - def keyword; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/if.rb#29 - def postcondition?; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/if.rb#51 - def unless?; end -end - -# Emitter for in pattern nodes -# -# source://unparser//lib/unparser/emitter/in_match.rb#6 -class Unparser::Emitter::InMatch < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/in_match.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def pattern; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# Emitter for in pattern nodes -# -# source://unparser//lib/unparser/emitter/in_pattern.rb#6 -class Unparser::Emitter::InPattern < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def branch; end - - # source://unparser//lib/unparser/emitter/in_pattern.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def else_branch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end - - # source://unparser//lib/unparser/dsl.rb#18 - def unless_guard; end -end - -# Emitter for send to index references -# -# source://unparser//lib/unparser/emitter/index.rb#6 -class Unparser::Emitter::Index < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/index.rb#10 - def dispatch; end - - # source://unparser//lib/unparser/emitter/index.rb#15 - def emit_receiver; end -end - -# Emitter for assign to index nodes -# -# source://unparser//lib/unparser/emitter/index.rb#34 -class Unparser::Emitter::Index::Assign < ::Unparser::Emitter::Index - # source://unparser//lib/unparser/emitter/index.rb#47 - def dispatch; end - - # source://unparser//lib/unparser/emitter/index.rb#43 - def emit_heredoc_reminders; end - - # source://unparser//lib/unparser/emitter/index.rb#54 - def emit_mlhs; end - - private - - # source://unparser//lib/unparser/emitter/index.rb#61 - def emit_operation(indices); end -end - -# source://unparser//lib/unparser/emitter/index.rb#39 -Unparser::Emitter::Index::Assign::NO_VALUE_PARENT = T.let(T.unsafe(nil), Set) - -# source://unparser//lib/unparser/emitter/index.rb#38 -Unparser::Emitter::Index::Assign::VALUE_RANGE = T.let(T.unsafe(nil), Range) - -# source://unparser//lib/unparser/emitter/index.rb#19 -class Unparser::Emitter::Index::Reference < ::Unparser::Emitter::Index - private - - # source://unparser//lib/unparser/emitter/index.rb#26 - def emit_operation; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def indices(&block); end -end - -# Emitter for explicit begins -# -# source://unparser//lib/unparser/emitter/kwbegin.rb#6 -class Unparser::Emitter::KWBegin < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/kwbegin.rb#11 - def dispatch; end - - # source://unparser//lib/unparser/emitter/kwbegin.rb#25 - def emit_multiple_body; end -end - -# Optional keyword argument emitter -# -# source://unparser//lib/unparser/emitter/argument.rb#41 -class Unparser::Emitter::KeywordOptional < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#48 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def value; end -end - -# Emitter for splats -# -# source://unparser//lib/unparser/emitter/splat.rb#6 -class Unparser::Emitter::KwSplat < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/splat.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def subject; end -end - -# Keyword argument emitter -# -# source://unparser//lib/unparser/emitter/argument.rb#56 -class Unparser::Emitter::Kwarg < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#63 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/kwargs.rb#5 -class Unparser::Emitter::Kwargs < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/kwargs.rb#8 - def dispatch; end -end - -# Emitter for lambda nodes -# -# source://unparser//lib/unparser/emitter/lambda.rb#6 -class Unparser::Emitter::Lambda < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/lambda.rb#11 - def dispatch; end -end - -# source://unparser//lib/unparser/emitter.rb#20 -module Unparser::Emitter::LocalVariableRoot - # Return local variable root - # - # @api private - # @return [Parser::AST::Node] - # - # source://unparser//lib/unparser/emitter.rb#27 - def local_variable_scope; end - - class << self - # @private - # - # source://unparser//lib/unparser/emitter.rb#31 - def included(descendant); end - end -end - -# Emitter for multiple assignment nodes -# -# source://unparser//lib/unparser/emitter/masgn.rb#6 -class Unparser::Emitter::MASGN < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/masgn.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def source; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# Emitter for multiple assignment left hand side -# -# source://unparser//lib/unparser/emitter/mlhs.rb#6 -class Unparser::Emitter::MLHS < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/mlhs.rb#15 - def dispatch; end - - # source://unparser//lib/unparser/emitter/mlhs.rb#31 - def emit_many; end - - # source://unparser//lib/unparser/emitter/mlhs.rb#23 - def emit_one_child_mlhs; end -end - -# source://unparser//lib/unparser/emitter/mlhs.rb#9 -Unparser::Emitter::MLHS::NO_COMMA = T.let(T.unsafe(nil), Array) - -# Base class for special match node emitters -# -# source://unparser//lib/unparser/emitter/match.rb#7 -class Unparser::Emitter::Match < ::Unparser::Emitter; end - -# Emitter for match current line -# -# source://unparser//lib/unparser/emitter/match.rb#25 -class Unparser::Emitter::Match::CurrentLine < ::Unparser::Emitter::Match - private - - # source://unparser//lib/unparser/emitter/match.rb#32 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def regexp; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for match with local variable assignment -# -# source://unparser//lib/unparser/emitter/match.rb#9 -class Unparser::Emitter::Match::Lvasgn < ::Unparser::Emitter::Match - private - - # source://unparser//lib/unparser/emitter/match.rb#16 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def lvasgn; end - - # source://unparser//lib/unparser/dsl.rb#18 - def regexp; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for in pattern nodes -# -# source://unparser//lib/unparser/emitter/match_alt.rb#6 -class Unparser::Emitter::MatchAlt < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/match_alt.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def left; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def right; end -end - -# Emitter for in pattern nodes -# -# source://unparser//lib/unparser/emitter/match_as.rb#6 -class Unparser::Emitter::MatchAs < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/match_as.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def left; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def right; end -end - -# Emitter for in pattern nodes -# -# source://unparser//lib/unparser/emitter/match_pattern.rb#6 -class Unparser::Emitter::MatchPattern < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/match_pattern.rb#23 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def pattern; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# Modern ast format emits `match_pattern` -# node on single line pre 3.0, but 3.0+ uses `match_pattern_p` -# -# source://unparser//lib/unparser/emitter/match_pattern.rb#14 -Unparser::Emitter::MatchPattern::SYMBOL = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/emitter/match_pattern_p.rb#5 -class Unparser::Emitter::MatchPatternP < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/match_pattern_p.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def pattern; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# Emiter for match rest nodes -# -# source://unparser//lib/unparser/emitter/match_rest.rb#6 -class Unparser::Emitter::MatchRest < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/match_rest.rb#11 - def dispatch; end - - # source://unparser//lib/unparser/emitter/match_rest.rb#16 - def emit_array_pattern; end - - # source://unparser//lib/unparser/emitter/match_rest.rb#21 - def emit_hash_pattern; end - - private - - # source://unparser//lib/unparser/emitter/match_rest.rb#28 - def emit_match_var; end - - # source://unparser//lib/unparser/dsl.rb#18 - def match_var; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for in pattern nodes -# -# source://unparser//lib/unparser/emitter/match_var.rb#6 -class Unparser::Emitter::MatchVar < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/match_var.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for module nodes -# -# source://unparser//lib/unparser/emitter/module.rb#6 -class Unparser::Emitter::Module < ::Unparser::Emitter - include ::Unparser::Emitter::LocalVariableRoot - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def local_variable_scope(&block); end - - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/module.rb#15 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter.rb#18 -Unparser::Emitter::NO_INDENT = T.let(T.unsafe(nil), Array) - -# Emitter for nth_ref nodes (regexp captures) -# -# source://unparser//lib/unparser/emitter/variable.rb#42 -class Unparser::Emitter::NthRef < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/variable.rb#50 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/variable.rb#43 -Unparser::Emitter::NthRef::PREFIX = T.let(T.unsafe(nil), String) - -# Emitter for op assign -# -# source://unparser//lib/unparser/emitter/op_assign.rb#33 -class Unparser::Emitter::OpAssign < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/op_assign.rb#40 - def dispatch; end - - # source://unparser//lib/unparser/emitter/op_assign.rb#46 - def emit_operator; end - - # source://unparser//lib/unparser/dsl.rb#18 - def operator; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end - - # source://unparser//lib/unparser/dsl.rb#18 - def value; end -end - -# Optional argument emitter -# -# source://unparser//lib/unparser/emitter/argument.rb#27 -class Unparser::Emitter::Optarg < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#34 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def value; end -end - -# Emitter for key value pairs in hash literals or kwargs -# -# source://unparser//lib/unparser/emitter/pair.rb#6 -class Unparser::Emitter::Pair < ::Unparser::Emitter - private - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/pair.rb#28 - def colon?(key); end - - # source://unparser//lib/unparser/emitter/pair.rb#17 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def key; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def value; end -end - -# source://unparser//lib/unparser/emitter/pair.rb#7 -Unparser::Emitter::Pair::BAREWORD = T.let(T.unsafe(nil), Regexp) - -# Emitter for pin nodes -# -# source://unparser//lib/unparser/emitter/pin.rb#6 -class Unparser::Emitter::Pin < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/pin.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# Emitter for postconditions -# -# source://unparser//lib/unparser/emitter/repetition.rb#7 -class Unparser::Emitter::Post < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/dsl.rb#18 - def condition; end - - # source://unparser//lib/unparser/emitter/repetition.rb#19 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/repetition.rb#10 -Unparser::Emitter::Post::MAP = T.let(T.unsafe(nil), Hash) - -# Base class for primitive emitters -# -# source://unparser//lib/unparser/emitter/primitive.rb#6 -class Unparser::Emitter::Primitive < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def value; end -end - -# Emitter for complex literals -# -# source://unparser//lib/unparser/emitter/primitive.rb#24 -class Unparser::Emitter::Primitive::Complex < ::Unparser::Emitter::Primitive - private - - # source://unparser//lib/unparser/emitter/primitive.rb#39 - def dispatch; end - - # source://unparser//lib/unparser/emitter/primitive.rb#44 - def emit_imaginary; end - - # source://unparser//lib/unparser/emitter/primitive.rb#48 - def imaginary_node; end -end - -# source://unparser//lib/unparser/emitter/primitive.rb#30 -Unparser::Emitter::Primitive::Complex::MAP = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/emitter/primitive.rb#28 -Unparser::Emitter::Primitive::Complex::RATIONAL_FORMAT = T.let(T.unsafe(nil), String) - -# Emitter for primitives based on Object#inspect -# -# source://unparser//lib/unparser/emitter/primitive.rb#11 -class Unparser::Emitter::Primitive::Inspect < ::Unparser::Emitter::Primitive - private - - # source://unparser//lib/unparser/emitter/primitive.rb#17 - def dispatch; end -end - -# Emiter for numeric literals -# -# source://unparser//lib/unparser/emitter/primitive.rb#80 -class Unparser::Emitter::Primitive::Numeric < ::Unparser::Emitter::Primitive - private - - # source://unparser//lib/unparser/emitter/primitive.rb#86 - def dispatch; end -end - -# Emitter for rational literals -# -# source://unparser//lib/unparser/emitter/primitive.rb#56 -class Unparser::Emitter::Primitive::Rational < ::Unparser::Emitter::Primitive - private - - # source://unparser//lib/unparser/emitter/primitive.rb#65 - def dispatch; end - - # source://unparser//lib/unparser/emitter/primitive.rb#73 - def write_rational(value); end -end - -# source://unparser//lib/unparser/emitter/primitive.rb#60 -Unparser::Emitter::Primitive::Rational::RATIONAL_FORMAT = T.let(T.unsafe(nil), String) - -# Progarg emitter -# -# source://unparser//lib/unparser/emitter/argument.rb#98 -class Unparser::Emitter::Procarg < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#105 - def dispatch; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/argument.rb#115 - def needs_parens?; end -end - -# source://unparser//lib/unparser/emitter/argument.rb#101 -Unparser::Emitter::Procarg::PARENS = T.let(T.unsafe(nil), Array) - -# Registry for node emitters -# -# source://unparser//lib/unparser/emitter.rb#16 -Unparser::Emitter::REGISTRY = T.let(T.unsafe(nil), Hash) - -# Range emitters -# -# source://unparser//lib/unparser/emitter/range.rb#6 -class Unparser::Emitter::Range < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/range.rb#17 - def symbol_name; end - - private - - # source://unparser//lib/unparser/dsl.rb#18 - def begin_node; end - - # source://unparser//lib/unparser/emitter/range.rb#27 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def end_node; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/range.rb#12 -Unparser::Emitter::Range::SYMBOLS = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/emitter/range.rb#7 -Unparser::Emitter::Range::TOKENS = T.let(T.unsafe(nil), Hash) - -# Emitter for regexp literals -# -# source://unparser//lib/unparser/emitter/regexp.rb#6 -class Unparser::Emitter::Regexp < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def body(&block); end - - # source://unparser//lib/unparser/emitter/regexp.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/emitter/regexp.rb#24 - def emit_body(node); end - - # source://unparser//lib/unparser/emitter/regexp.rb#20 - def emit_options; end -end - -# Emitter for while and until nodes -# -# source://unparser//lib/unparser/emitter/repetition.rb#27 -class Unparser::Emitter::Repetition < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/dsl.rb#18 - def condition; end - - # source://unparser//lib/unparser/emitter/repetition.rb#39 - def dispatch; end - - # source://unparser//lib/unparser/emitter/repetition.rb#51 - def emit_keyword; end - - # source://unparser//lib/unparser/emitter/repetition.rb#55 - def emit_normal; end - - # source://unparser//lib/unparser/emitter/repetition.rb#66 - def emit_postcontrol; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/repetition.rb#47 - def postcontrol?; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/repetition.rb#28 -Unparser::Emitter::Repetition::MAP = T.let(T.unsafe(nil), Hash) - -# Emitter for rescue nodes -# -# source://unparser//lib/unparser/emitter/rescue.rb#6 -class Unparser::Emitter::Rescue < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/rescue.rb#11 - def dispatch; end -end - -# Rest argument emitter -# -# source://unparser//lib/unparser/emitter/argument.rb#70 -class Unparser::Emitter::Restarg < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#77 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Root emitter a special case -# -# source://unparser//lib/unparser/emitter/root.rb#6 -class Unparser::Emitter::Root < ::Unparser::Emitter - include ::Unparser::Emitter::LocalVariableRoot - - # source://unparser//lib/unparser/concord.rb#60 - def buffer; end - - # source://unparser//lib/unparser/concord.rb#60 - def comments; end - - # source://unparser//lib/unparser/emitter/root.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def local_variable_scope(&block); end - - # source://unparser//lib/unparser/concord.rb#60 - def node; end -end - -# source://unparser//lib/unparser/emitter/root.rb#10 -Unparser::Emitter::Root::END_NL = T.let(T.unsafe(nil), Array) - -# Emitter for sclass nodes -# -# source://unparser//lib/unparser/emitter/class.rb#33 -class Unparser::Emitter::SClass < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/class.rb#40 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def object; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for send -# -# source://unparser//lib/unparser/emitter/send.rb#6 -class Unparser::Emitter::Send < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/send.rb#13 - def emit_heredoc_reminders; end - - # source://unparser//lib/unparser/emitter/send.rb#9 - def emit_mlhs; end - - private - - # source://unparser//lib/unparser/emitter/send.rb#19 - def dispatch; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def writer(&block); end -end - -# Emitter for simple nodes that generate a single token -# -# source://unparser//lib/unparser/emitter/simple.rb#6 -class Unparser::Emitter::Simple < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/simple.rb#28 - def dispatch; end -end - -# source://unparser//lib/unparser/emitter/simple.rb#7 -Unparser::Emitter::Simple::MAP = T.let(T.unsafe(nil), Hash) - -# Emitter for splats -# -# source://unparser//lib/unparser/emitter/splat.rb#20 -class Unparser::Emitter::Splat < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/splat.rb#25 - def emit_mlhs; end - - private - - # source://unparser//lib/unparser/emitter/splat.rb#32 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def subject; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def subject_emitter(&block); end -end - -# Emitter for super nodes -# -# source://unparser//lib/unparser/emitter/super.rb#7 -class Unparser::Emitter::Super < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/super.rb#12 - def dispatch; end -end - -# Emitter for undef nodes -# -# source://unparser//lib/unparser/emitter/undef.rb#6 -class Unparser::Emitter::Undef < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/undef.rb#11 - def dispatch; end -end - -# Emitter for various variable accesses -# -# source://unparser//lib/unparser/emitter/variable.rb#7 -class Unparser::Emitter::Variable < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/variable.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for when nodes -# -# source://unparser//lib/unparser/emitter/case.rb#44 -class Unparser::Emitter::When < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def captures(&block); end - - # source://unparser//lib/unparser/emitter/case.rb#51 - def dispatch; end - - # source://unparser//lib/unparser/emitter/case.rb#57 - def emit_captures; end -end - -# Dynamic execute string literal emitter -# -# source://unparser//lib/unparser/emitter/xstr.rb#6 -class Unparser::Emitter::XStr < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/xstr.rb#12 - def dispatch; end - - # source://unparser//lib/unparser/emitter/xstr.rb#65 - def emit_begin(component); end - - # source://unparser//lib/unparser/emitter/xstr.rb#24 - def emit_heredoc; end - - # source://unparser//lib/unparser/emitter/xstr.rb#51 - def emit_string(value); end - - # source://unparser//lib/unparser/emitter/xstr.rb#39 - def emit_xstr; end - - # source://unparser//lib/unparser/emitter/xstr.rb#55 - def escape_xstr(input); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/xstr.rb#20 - def heredoc?; end -end - -# Emitter for yield node -# -# source://unparser//lib/unparser/emitter/yield.rb#7 -class Unparser::Emitter::Yield < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/yield.rb#12 - def dispatch; end -end - -# Define equality, equivalence and inspection methods -# -# Original code before vendoring and reduction from: https://github.com/dkubb/equalizer. -# -# source://unparser//lib/unparser/equalizer.rb#7 -class Unparser::Equalizer < ::Module - # Initialize an Equalizer with the given keys - # - # Will use the keys with which it is initialized to define #cmp?, - # #hash, and #inspect - # - # - # @api private - # @param keys [Array] - # @return [undefined] - # - # source://unparser//lib/unparser/equalizer.rb#20 - def initialize(*keys); end - - private - - # source://unparser//lib/unparser/equalizer.rb#39 - def define_cmp_method; end - - # source://unparser//lib/unparser/equalizer.rb#49 - def define_hash_method; end - - # source://unparser//lib/unparser/equalizer.rb#56 - def define_inspect_method; end - - # source://unparser//lib/unparser/equalizer.rb#33 - def define_methods; end - - # source://unparser//lib/unparser/equalizer.rb#29 - def included(descendant); end -end - -# The comparison methods -# -# source://unparser//lib/unparser/equalizer.rb#66 -module Unparser::Equalizer::Methods - # Compare the object with other object for equivalency - # - # @api public - # @example - # object == other # => true or false - # @param other [Object] the other object to compare with - # @return [Boolean] - # - # source://unparser//lib/unparser/equalizer.rb#93 - def ==(other); end - - # Compare the object with other object for equality - # - # @api public - # @example - # object.eql?(other) # => true or false - # @param other [Object] the other object to compare with - # @return [Boolean] - # - # source://unparser//lib/unparser/equalizer.rb#78 - def eql?(other); end -end - -# source://unparser//lib/unparser/generation.rb#5 -module Unparser::Generation - # source://unparser//lib/unparser/generation.rb#10 - def emit_heredoc_reminders; end - - # source://unparser//lib/unparser/generation.rb#12 - def symbol_name; end - - # source://unparser//lib/unparser/generation.rb#14 - def write_to_buffer; end - - private - - # source://unparser//lib/unparser/generation.rb#247 - def children; end - - # source://unparser//lib/unparser/generation.rb#239 - def conditional_parentheses(flag, &block); end - - # source://unparser//lib/unparser/generation.rb#21 - def delimited(nodes, delimiter = T.unsafe(nil), &block); end - - # source://unparser//lib/unparser/generation.rb#123 - def emit_body(node, indent: T.unsafe(nil)); end - - # source://unparser//lib/unparser/generation.rb#196 - def emit_body_ensure_rescue(node); end - - # source://unparser//lib/unparser/generation.rb#145 - def emit_body_inner(node); end - - # source://unparser//lib/unparser/generation.rb#158 - def emit_body_member(node); end - - # source://unparser//lib/unparser/generation.rb#180 - def emit_body_rescue(node); end - - # source://unparser//lib/unparser/generation.rb#77 - def emit_comments(comments); end - - # source://unparser//lib/unparser/generation.rb#69 - def emit_comments_before(source_part = T.unsafe(nil)); end - - # source://unparser//lib/unparser/generation.rb#166 - def emit_ensure(node); end - - # source://unparser//lib/unparser/generation.rb#60 - def emit_eof_comments; end - - # source://unparser//lib/unparser/generation.rb#54 - def emit_eol_comments; end - - # source://unparser//lib/unparser/generation.rb#27 - def emit_join(nodes, emit_node, emit_delimiter); end - - # source://unparser//lib/unparser/generation.rb#115 - def emit_optional_body(node, indent: T.unsafe(nil)); end - - # source://unparser//lib/unparser/generation.rb#188 - def emit_optional_body_ensure_rescue(node); end - - # source://unparser//lib/unparser/generation.rb#206 - def emit_rescue_postcontrol(node); end - - # source://unparser//lib/unparser/generation.rb#212 - def emit_rescue_regular(node); end - - # source://unparser//lib/unparser/generation.rb#220 - def emitter(node); end - - # source://unparser//lib/unparser/generation.rb#235 - def first_child; end - - # source://unparser//lib/unparser/generation.rb#106 - def indented; end - - # source://unparser//lib/unparser/generation.rb#93 - def k_end; end - - # source://unparser//lib/unparser/generation.rb#39 - def nl; end - - # source://unparser//lib/unparser/generation.rb#100 - def parentheses(open = T.unsafe(nil), close = T.unsafe(nil)); end - - # source://unparser//lib/unparser/generation.rb#224 - def visit(node); end - - # source://unparser//lib/unparser/generation.rb#228 - def visit_deep(node); end - - # source://unparser//lib/unparser/generation.rb#44 - def with_comments; end - - # source://unparser//lib/unparser/generation.rb#89 - def write(*strings); end - - # source://unparser//lib/unparser/generation.rb#216 - def writer_with(klass, node); end - - # source://unparser//lib/unparser/generation.rb#50 - def ws; end -end - -# source://unparser//lib/unparser/generation.rb#6 -Unparser::Generation::EXTRA_NL = T.let(T.unsafe(nil), Array) - -# Error raised when unparser encounters an invalid AST -# -# source://unparser//lib/unparser.rb#39 -class Unparser::InvalidNodeError < ::RuntimeError - # @return [InvalidNodeError] a new instance of InvalidNodeError - # - # source://unparser//lib/unparser.rb#42 - def initialize(message, node); end - - # Returns the value of attribute node. - # - # source://unparser//lib/unparser.rb#40 - def node; end -end - -# source://unparser//lib/unparser/node_details.rb#4 -module Unparser::NodeDetails - include ::Unparser::NodeHelpers - include ::Unparser::Constants - - private - - # source://unparser//lib/unparser/node_details.rb#17 - def children; end - - class << self - # @private - # - # source://unparser//lib/unparser/node_details.rb#7 - def included(descendant); end - end -end - -# source://unparser//lib/unparser/node_details/send.rb#5 -class Unparser::NodeDetails::Send - include ::Unparser::NodeHelpers - include ::Unparser::Constants - include ::Unparser::NodeDetails - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - extend ::Unparser::DSL - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def arguments(&block); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/node_details/send.rb#37 - def arguments?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def assignment?(&block); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/node_details/send.rb#33 - def assignment_operator?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/node_details/send.rb#21 - def binary_syntax_allowed?; end - - # source://unparser//lib/unparser/node_details/send.rb#41 - def non_assignment_selector; end - - # source://unparser//lib/unparser/dsl.rb#18 - def receiver; end - - # source://unparser//lib/unparser/dsl.rb#18 - def selector; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/node_details/send.rb#17 - def selector_binary_operator?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/node_details/send.rb#29 - def selector_unary_operator?; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def string_selector(&block); end - - private - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/node_details/send.rb#8 -Unparser::NodeDetails::Send::ASSIGN_SUFFIX = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/node_details/send.rb#9 -Unparser::NodeDetails::Send::NON_ASSIGN_RANGE = T.let(T.unsafe(nil), Range) - -# source://unparser//lib/unparser/node_helpers.rb#4 -module Unparser::NodeHelpers - # Helper for building nodes - # - # @api private - # @param type [Symbol] - # @param children [Array] - # @return [Parser::AST::Node] - # - # source://unparser//lib/unparser/node_helpers.rb#26 - def n(type, children = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/node_helpers.rb#30 - def n?(type, node); end - - # Helper for building nodes - # - # @api private - # @param type [Symbol] - # @param children [Parser::AST::Node] - # @return [Parser::AST::Node] - # - # source://unparser//lib/unparser/node_helpers.rb#14 - def s(type, *children); end - - # source://unparser//lib/unparser/node_helpers.rb#71 - def unwrap_single_begin(node); end - - private - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_arg?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_args?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_array?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_array_pattern?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_begin?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_block?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_cbase?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_const?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_dstr?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_empty_else?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_ensure?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_hash?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_hash_pattern?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_if?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_in_pattern?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_int?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_kwarg?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_kwargs?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_kwsplat?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_lambda?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_match_rest?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_pair?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_rescue?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_send?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_shadowarg?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_splat?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_str?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_sym?(node); end -end - -# source://unparser//lib/unparser/either.rb#4 -module Unparser::RequireBlock - private - - # Raise error unless block is provided - # - # @raise [MissingBlockError] if no block is given - # @return [self] - # - # source://unparser//lib/unparser/either.rb#14 - def require_block; end -end - -# source://unparser//lib/unparser/emitter.rb#4 -class Unparser::UnknownNodeError < ::ArgumentError; end - -# Validation of unparser results -# -# source://unparser//lib/unparser/validation.rb#5 -class Unparser::Validation - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # source://unparser//lib/unparser/anima.rb#146 - def generated_node; end - - # source://unparser//lib/unparser/anima.rb#146 - def generated_source; end - - # source://unparser//lib/unparser/anima.rb#146 - def identification; end - - # source://unparser//lib/unparser/anima.rb#146 - def original_node; end - - # source://unparser//lib/unparser/anima.rb#146 - def original_source; end - - # Return error report - # - # @api private - # @return [String] - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def report(&block); end - - # Test if source could be unparsed successfully - # - # - # @api private - # @return [Boolean] - # - # source://unparser//lib/unparser/validation.rb#21 - def success?; end - - private - - # source://unparser//lib/unparser/validation.rb#108 - def make_report(label, attribute_name); end - - # source://unparser//lib/unparser/validation.rb#120 - def node_diff_report; end - - # source://unparser//lib/unparser/validation.rb#112 - def report_exception(exception); end - - class << self - # source://unparser//lib/unparser/anima.rb#140 - def anima; end - - # Create validator from node - # - # @param original_node [Parser::AST::Node] - # @return [Validator] - # - # source://unparser//lib/unparser/validation.rb#81 - def from_node(original_node); end - - # Create validator from file - # - # @param path [Pathname] - # @return [Validator] - # - # source://unparser//lib/unparser/validation.rb#102 - def from_path(path); end - - # Create validator from string - # - # @param original_source [String] - # @return [Validator] - # - # source://unparser//lib/unparser/validation.rb#55 - def from_string(original_source); end - - private - - # source://unparser//lib/unparser/validation.rb#135 - def const_unit(_value); end - end -end - -# source://unparser//lib/unparser/validation.rb#138 -class Unparser::Validation::Literal < ::Unparser::Validation - # source://unparser//lib/unparser/validation.rb#143 - def report; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/validation.rb#139 - def success?; end - - private - - # source://unparser//lib/unparser/validation.rb#158 - def source_diff_report; end -end - -# source://unparser//lib/unparser/writer.rb#4 -module Unparser::Writer - include ::Unparser::NodeHelpers - include ::Unparser::Generation - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - - mixes_in_class_methods ::Unparser::DSL - - class << self - # @private - # - # source://unparser//lib/unparser/writer.rb#7 - def included(descendant); end - end -end - -# source://unparser//lib/unparser/writer/binary.rb#5 -class Unparser::Writer::Binary - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - include ::Unparser::NodeHelpers - include ::Unparser::Generation - include ::Unparser::Writer - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - extend ::Unparser::DSL - - # source://unparser//lib/unparser/anima.rb#146 - def buffer; end - - # source://unparser//lib/unparser/anima.rb#146 - def comments; end - - # source://unparser//lib/unparser/writer/binary.rb#54 - def dispatch; end - - # source://unparser//lib/unparser/writer/binary.rb#46 - def emit_operator; end - - # source://unparser//lib/unparser/anima.rb#146 - def local_variable_scope; end - - # source://unparser//lib/unparser/anima.rb#146 - def node; end - - # source://unparser//lib/unparser/writer/binary.rb#50 - def symbol_name; end - - private - - # source://unparser//lib/unparser/writer/binary.rb#62 - def effective_symbol; end - - # source://unparser//lib/unparser/writer/binary.rb#74 - def emit_with(map); end - - # source://unparser//lib/unparser/writer/binary.rb#80 - def keyword_symbol; end - - # source://unparser//lib/unparser/dsl.rb#18 - def left; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def left_emitter(&block); end - - # source://unparser//lib/unparser/writer/binary.rb#84 - def operator_symbol; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def right; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def right_emitter(&block); end - - class << self - # source://unparser//lib/unparser/anima.rb#140 - def anima; end - end -end - -# source://unparser//lib/unparser/writer/binary.rb#22 -Unparser::Writer::Binary::KEYWORD_SYMBOLS = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/writer/binary.rb#16 -Unparser::Writer::Binary::KEYWORD_TOKENS = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/writer/binary.rb#34 -Unparser::Writer::Binary::MAP = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/writer/binary.rb#42 -Unparser::Writer::Binary::NEED_KEYWORD = T.let(T.unsafe(nil), Array) - -# source://unparser//lib/unparser/writer/binary.rb#28 -Unparser::Writer::Binary::OPERATOR_SYMBOLS = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/writer/binary.rb#10 -Unparser::Writer::Binary::OPERATOR_TOKENS = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/writer/dynamic_string.rb#5 -class Unparser::Writer::DynamicString - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - include ::Unparser::NodeHelpers - include ::Unparser::Generation - include ::Unparser::Writer - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - extend ::Unparser::DSL - - # source://unparser//lib/unparser/anima.rb#146 - def buffer; end - - # source://unparser//lib/unparser/anima.rb#146 - def comments; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#32 - def dispatch; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#25 - def emit_heredoc_reminder; end - - # source://unparser//lib/unparser/anima.rb#146 - def local_variable_scope; end - - # source://unparser//lib/unparser/anima.rb#146 - def node; end - - private - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#159 - def breakpoint?(child, current); end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#63 - def classify(node); end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#71 - def classify_str(node); end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#193 - def emit_body(children); end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#149 - def emit_dstr; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#132 - def emit_dynamic(child); end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#145 - def emit_dynamic_component(node); end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#54 - def emit_heredoc_body; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#59 - def emit_heredoc_footer; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#50 - def emit_heredoc_header; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#116 - def emit_normal_heredoc_body; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#185 - def emit_segment(children, index); end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#128 - def escape_dynamic(string); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#46 - def heredoc?; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#42 - def heredoc_header; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#95 - def heredoc_pattern?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#105 - def heredoc_pattern_2?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#99 - def heredoc_pattern_3?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#111 - def nl_last_child?; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#169 - def segments; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#87 - def str_empty?(node); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#83 - def str_nl?(node); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#91 - def str_ws?(node); end - - class << self - # source://unparser//lib/unparser/anima.rb#140 - def anima; end - end -end - -# source://unparser//lib/unparser/writer/dynamic_string.rb#21 -Unparser::Writer::DynamicString::FLAT_INTERPOLATION = T.let(T.unsafe(nil), Set) - -# source://unparser//lib/unparser/writer/dynamic_string.rb#8 -Unparser::Writer::DynamicString::PATTERNS_2 = T.let(T.unsafe(nil), Array) - -# source://unparser//lib/unparser/writer/dynamic_string.rb#14 -Unparser::Writer::DynamicString::PATTERNS_3 = T.let(T.unsafe(nil), Array) - -# Writer for rescue bodies -# -# source://unparser//lib/unparser/writer/resbody.rb#6 -class Unparser::Writer::Resbody - include ::Unparser::NodeHelpers - include ::Unparser::Generation - include ::Unparser::Writer - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - extend ::Unparser::DSL - - # source://unparser//lib/unparser/anima.rb#146 - def buffer; end - - # source://unparser//lib/unparser/anima.rb#146 - def comments; end - - # source://unparser//lib/unparser/writer/resbody.rb#11 - def emit_postcontrol; end - - # source://unparser//lib/unparser/writer/resbody.rb#16 - def emit_regular; end - - # source://unparser//lib/unparser/anima.rb#146 - def local_variable_scope; end - - # source://unparser//lib/unparser/anima.rb#146 - def node; end - - private - - # source://unparser//lib/unparser/dsl.rb#18 - def assignment; end - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/writer/resbody.rb#32 - def emit_assignment; end - - # source://unparser//lib/unparser/writer/resbody.rb#25 - def emit_exception; end - - # source://unparser//lib/unparser/dsl.rb#18 - def exception; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - class << self - # source://unparser//lib/unparser/anima.rb#140 - def anima; end - end -end - -# source://unparser//lib/unparser/writer/rescue.rb#5 -class Unparser::Writer::Rescue - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - include ::Unparser::NodeHelpers - include ::Unparser::Generation - include ::Unparser::Writer - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - extend ::Unparser::DSL - - # source://unparser//lib/unparser/anima.rb#146 - def buffer; end - - # source://unparser//lib/unparser/anima.rb#146 - def comments; end - - # source://unparser//lib/unparser/writer/rescue.rb#23 - def emit_heredoc_reminders; end - - # source://unparser//lib/unparser/writer/rescue.rb#27 - def emit_postcontrol; end - - # source://unparser//lib/unparser/writer/rescue.rb#12 - def emit_regular; end - - # source://unparser//lib/unparser/anima.rb#146 - def local_variable_scope; end - - # source://unparser//lib/unparser/anima.rb#146 - def node; end - - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/writer/rescue.rb#34 - def else_node; end - - # source://unparser//lib/unparser/writer/rescue.rb#38 - def emit_rescue_body(node); end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def rescue_bodies(&block); end - - # source://unparser//lib/unparser/dsl.rb#18 - def rescue_body; end - - class << self - # source://unparser//lib/unparser/anima.rb#140 - def anima; end - end -end - -# Writer for send -# -# source://unparser//lib/unparser/writer/send.rb#6 -class Unparser::Writer::Send - include ::Unparser::NodeHelpers - include ::Unparser::Generation - include ::Unparser::Constants - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - include ::Unparser::Writer - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - extend ::Unparser::DSL - - # source://unparser//lib/unparser/anima.rb#146 - def buffer; end - - # source://unparser//lib/unparser/anima.rb#146 - def comments; end - - # source://unparser//lib/unparser/writer/send.rb#21 - def dispatch; end - - # source://unparser//lib/unparser/writer/send.rb#33 - def emit_heredoc_reminders; end - - # source://unparser//lib/unparser/writer/send.rb#25 - def emit_mlhs; end - - # source://unparser//lib/unparser/writer/send.rb#29 - def emit_selector; end - - # source://unparser//lib/unparser/anima.rb#146 - def local_variable_scope; end - - # source://unparser//lib/unparser/anima.rb#146 - def node; end - - private - - # source://unparser//lib/unparser/writer/send.rb#73 - def arguments; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/send.rb#85 - def avoid_clash?; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def details(&block); end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def effective_writer(&block); end - - # source://unparser//lib/unparser/writer/send.rb#45 - def effective_writer_class; end - - # source://unparser//lib/unparser/writer/send.rb#65 - def emit_arguments; end - - # source://unparser//lib/unparser/writer/send.rb#81 - def emit_heredoc_reminder(argument); end - - # source://unparser//lib/unparser/writer/send.rb#77 - def emit_normal_arguments; end - - # source://unparser//lib/unparser/writer/send.rb#61 - def emit_operator; end - - # source://unparser//lib/unparser/writer/send.rb#106 - def emit_send_regular(node); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/send.rb#89 - def local_variable_clash?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/send.rb#93 - def parses_as_constant?; end - - # source://unparser//lib/unparser/dsl.rb#18 - def receiver; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def selector; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/send.rb#57 - def write_as_attribute_assignment?; end - - class << self - # source://unparser//lib/unparser/anima.rb#140 - def anima; end - end -end - -# Writer for send as attribute assignment -# -# source://unparser//lib/unparser/writer/send/attribute_assignment.rb#7 -class Unparser::Writer::Send::AttributeAssignment < ::Unparser::Writer::Send - # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#10 - def dispatch; end - - # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#22 - def emit_send_mlhs; end - - private - - # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#34 - def emit_attribute; end - - # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#29 - def emit_receiver; end - - # source://unparser//lib/unparser/dsl.rb#18 - def first_argument; end - - # source://unparser//lib/unparser/dsl.rb#18 - def receiver; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def selector; end -end - -# Writer for binary sends -# -# source://unparser//lib/unparser/writer/send/binary.rb#7 -class Unparser::Writer::Send::Binary < ::Unparser::Writer::Send - # source://unparser//lib/unparser/writer/send/binary.rb#8 - def dispatch; end - - private - - # source://unparser//lib/unparser/writer/send/binary.rb#16 - def emit_operator; end - - # source://unparser//lib/unparser/writer/send/binary.rb#20 - def emit_right; end -end - -# source://unparser//lib/unparser/writer/send.rb#9 -Unparser::Writer::Send::INDEX_ASSIGN = T.let(T.unsafe(nil), Symbol) - -# source://unparser//lib/unparser/writer/send.rb#10 -Unparser::Writer::Send::INDEX_REFERENCE = T.let(T.unsafe(nil), Symbol) - -# source://unparser//lib/unparser/writer/send.rb#12 -Unparser::Writer::Send::OPERATORS = T.let(T.unsafe(nil), Hash) - -# Writer for "regular" receiver.selector(arguments...) case -# -# source://unparser//lib/unparser/writer/send/regular.rb#7 -class Unparser::Writer::Send::Regular < ::Unparser::Writer::Send - # source://unparser//lib/unparser/writer/send/regular.rb#8 - def dispatch; end - - # source://unparser//lib/unparser/writer/send/regular.rb#18 - def emit_arguments_without_heredoc_body; end - - # source://unparser//lib/unparser/writer/send/regular.rb#22 - def emit_receiver; end - - # source://unparser//lib/unparser/writer/send/regular.rb#14 - def emit_send_mlhs; end -end - -# Writer for unary sends -# -# source://unparser//lib/unparser/writer/send/unary.rb#7 -class Unparser::Writer::Send::Unary < ::Unparser::Writer::Send - # source://unparser//lib/unparser/writer/send/unary.rb#15 - def dispatch; end -end - -# source://unparser//lib/unparser/writer/send/unary.rb#8 -Unparser::Writer::Send::Unary::MAP = T.let(T.unsafe(nil), Hash) diff --git a/sorbet/rbi/gems/webmock@3.19.0.rbi b/sorbet/rbi/gems/webmock@3.23.0.rbi similarity index 96% rename from sorbet/rbi/gems/webmock@3.19.0.rbi rename to sorbet/rbi/gems/webmock@3.23.0.rbi index e650e4c3f..e96b3742c 100644 --- a/sorbet/rbi/gems/webmock@3.19.0.rbi +++ b/sorbet/rbi/gems/webmock@3.23.0.rbi @@ -10,79 +10,79 @@ module Net::WebMockHTTPResponse def read_body(dest = T.unsafe(nil), &block); end end -# source://webmock//lib/webmock/http_lib_adapters/net_http.rb#208 +# source://webmock//lib/webmock/http_lib_adapters/net_http.rb#210 class StubSocket # @return [StubSocket] a new instance of StubSocket # - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#212 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#214 def initialize(*args); end - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#220 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#222 def close; end # @return [Boolean] # - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#216 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#218 def closed?; end # Returns the value of attribute continue_timeout. # - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#210 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#212 def continue_timeout; end # Sets the attribute continue_timeout # # @param value the value to set the attribute continue_timeout to. # - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#210 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#212 def continue_timeout=(_arg0); end - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#228 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#230 def io; end # Returns the value of attribute read_timeout. # - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#210 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#212 def read_timeout; end # Sets the attribute read_timeout # # @param value the value to set the attribute read_timeout to. # - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#210 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#212 def read_timeout=(_arg0); end - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#225 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#227 def readuntil(*args); end # Returns the value of attribute write_timeout. # - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#210 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#212 def write_timeout; end # Sets the attribute write_timeout # # @param value the value to set the attribute write_timeout to. # - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#210 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#212 def write_timeout=(_arg0); end end -# source://webmock//lib/webmock/http_lib_adapters/net_http.rb#232 +# source://webmock//lib/webmock/http_lib_adapters/net_http.rb#234 class StubSocket::StubIO - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#237 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#239 def cipher; end - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#234 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#236 def peer_cert; end - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#235 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#237 def peeraddr; end - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#233 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#235 def setsockopt(*args); end - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#236 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#238 def ssl_version; end end @@ -478,6 +478,13 @@ class WebMock::Config # # source://webmock//lib/webmock/config.rb#16 def show_stubbing_instructions=(_arg0); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end end # source://webmock//lib/webmock/deprecation.rb#4 @@ -585,6 +592,13 @@ class WebMock::HttpLibAdapterRegistry # source://webmock//lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb#13 def register(lib, adapter); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end end # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#10 @@ -687,19 +701,19 @@ class WebMock::NetConnectNotAllowedError < ::Exception def initialize(request_signature); end end -# source://webmock//lib/webmock/http_lib_adapters/net_http.rb#242 +# source://webmock//lib/webmock/http_lib_adapters/net_http.rb#244 module WebMock::NetHTTPUtility class << self - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#281 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#283 def check_right_http_connection; end - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#272 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#274 def get_uri(net_http, path = T.unsafe(nil)); end - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#285 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#287 def puts_warning_for_right_http_if_needed; end - # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#244 + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#246 def request_signature_from_request(net_http, request, body = T.unsafe(nil)); end end end @@ -733,10 +747,10 @@ class WebMock::RackResponse < ::WebMock::Response # source://webmock//lib/webmock/rack_response.rb#9 def evaluate(request); end - # source://webmock//lib/webmock/rack_response.rb#63 + # source://webmock//lib/webmock/rack_response.rb#65 def session; end - # source://webmock//lib/webmock/rack_response.rb#67 + # source://webmock//lib/webmock/rack_response.rb#69 def session_options; end end @@ -985,6 +999,13 @@ class WebMock::RequestRegistry # source://webmock//lib/webmock/request_registry.rb#24 def to_s; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end end # source://webmock//lib/webmock/request_signature.rb#5 @@ -1115,7 +1136,7 @@ class WebMock::RequestStub # source://webmock//lib/webmock/request_stub.rb#8 def initialize(method, uri); end - # source://webmock//lib/webmock/request_stub.rb#52 + # source://webmock//lib/webmock/request_stub.rb#65 def and_raise(*exceptions); end # source://webmock//lib/webmock/request_stub.rb#19 @@ -1126,17 +1147,17 @@ class WebMock::RequestStub # source://webmock//lib/webmock/request_stub.rb#29 def and_return_json(*response_hashes); end - # source://webmock//lib/webmock/request_stub.rb#60 + # source://webmock//lib/webmock/request_stub.rb#73 def and_timeout; end # @return [Boolean] # - # source://webmock//lib/webmock/request_stub.rb#77 + # source://webmock//lib/webmock/request_stub.rb#90 def has_responses?; end # @return [Boolean] # - # source://webmock//lib/webmock/request_stub.rb#95 + # source://webmock//lib/webmock/request_stub.rb#108 def matches?(request_signature); end # Returns the value of attribute request_pattern. @@ -1151,19 +1172,19 @@ class WebMock::RequestStub # source://webmock//lib/webmock/request_stub.rb#6 def request_pattern=(_arg0); end - # source://webmock//lib/webmock/request_stub.rb#66 + # source://webmock//lib/webmock/request_stub.rb#79 def response; end - # source://webmock//lib/webmock/request_stub.rb#81 + # source://webmock//lib/webmock/request_stub.rb#94 def then; end - # source://webmock//lib/webmock/request_stub.rb#85 + # source://webmock//lib/webmock/request_stub.rb#98 def times(number); end - # source://webmock//lib/webmock/request_stub.rb#48 + # source://webmock//lib/webmock/request_stub.rb#61 def to_rack(app, options = T.unsafe(nil)); end - # source://webmock//lib/webmock/request_stub.rb#52 + # source://webmock//lib/webmock/request_stub.rb#65 def to_raise(*exceptions); end # source://webmock//lib/webmock/request_stub.rb#19 @@ -1174,17 +1195,17 @@ class WebMock::RequestStub # source://webmock//lib/webmock/request_stub.rb#29 def to_return_json(*response_hashes); end - # source://webmock//lib/webmock/request_stub.rb#99 + # source://webmock//lib/webmock/request_stub.rb#112 def to_s; end - # source://webmock//lib/webmock/request_stub.rb#60 + # source://webmock//lib/webmock/request_stub.rb#73 def to_timeout; end # source://webmock//lib/webmock/request_stub.rb#14 def with(params = T.unsafe(nil), &block); end class << self - # source://webmock//lib/webmock/request_stub.rb#103 + # source://webmock//lib/webmock/request_stub.rb#116 def from_request_signature(signature); end end end @@ -1345,6 +1366,13 @@ class WebMock::StubRegistry # source://webmock//lib/webmock/stub_registry.rb#72 def request_stub_for(request_signature); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end end # source://webmock//lib/webmock/stub_request_snippet.rb#4 @@ -1497,36 +1525,36 @@ class WebMock::Util::HashKeysStringifier end end -# source://webmock//lib/webmock/util/headers.rb#9 +# source://webmock//lib/webmock/util/headers.rb#7 class WebMock::Util::Headers class << self - # source://webmock//lib/webmock/util/headers.rb#61 + # source://webmock//lib/webmock/util/headers.rb#59 def basic_auth_header(*credentials); end - # source://webmock//lib/webmock/util/headers.rb#57 + # source://webmock//lib/webmock/util/headers.rb#55 def decode_userinfo_from_header(header); end - # source://webmock//lib/webmock/util/headers.rb#15 + # source://webmock//lib/webmock/util/headers.rb#13 def normalize_headers(headers); end - # source://webmock//lib/webmock/util/headers.rb#65 + # source://webmock//lib/webmock/util/headers.rb#64 def normalize_name(name); end - # source://webmock//lib/webmock/util/headers.rb#42 + # source://webmock//lib/webmock/util/headers.rb#40 def pp_headers_string(headers); end - # source://webmock//lib/webmock/util/headers.rb#28 + # source://webmock//lib/webmock/util/headers.rb#26 def sorted_headers_string(headers); end end end -# source://webmock//lib/webmock/util/headers.rb#13 +# source://webmock//lib/webmock/util/headers.rb#11 WebMock::Util::Headers::JOIN = T.let(T.unsafe(nil), String) -# source://webmock//lib/webmock/util/headers.rb#12 +# source://webmock//lib/webmock/util/headers.rb#10 WebMock::Util::Headers::NONSTANDARD_HEADER_DELIMITER = T.let(T.unsafe(nil), String) -# source://webmock//lib/webmock/util/headers.rb#11 +# source://webmock//lib/webmock/util/headers.rb#9 WebMock::Util::Headers::STANDARD_HEADER_DELIMITER = T.let(T.unsafe(nil), String) # source://webmock//lib/webmock/util/json.rb#12 diff --git a/sorbet/rbi/gems/webrick@1.7.0.rbi b/sorbet/rbi/gems/webrick@1.8.1.rbi similarity index 91% rename from sorbet/rbi/gems/webrick@1.7.0.rbi rename to sorbet/rbi/gems/webrick@1.8.1.rbi index cb36fb260..3f6a1bc6f 100644 --- a/sorbet/rbi/gems/webrick@1.7.0.rbi +++ b/sorbet/rbi/gems/webrick@1.8.1.rbi @@ -1130,31 +1130,34 @@ class WEBrick::HTTPRequest private - # source://webrick//lib/webrick/httprequest.rb#562 + # source://webrick//lib/webrick/httprequest.rb#566 def _read_data(io, method, *arg); end - # source://webrick//lib/webrick/httprequest.rb#582 + # source://webrick//lib/webrick/httprequest.rb#506 + def parse_host_request_line(host); end + + # source://webrick//lib/webrick/httprequest.rb#586 def parse_query; end # source://webrick//lib/webrick/httprequest.rb#484 def parse_uri(str, scheme = T.unsafe(nil)); end - # source://webrick//lib/webrick/httprequest.rb#507 + # source://webrick//lib/webrick/httprequest.rb#511 def read_body(socket, block); end - # source://webrick//lib/webrick/httprequest.rb#531 + # source://webrick//lib/webrick/httprequest.rb#535 def read_chunk_size(socket); end - # source://webrick//lib/webrick/httprequest.rb#542 + # source://webrick//lib/webrick/httprequest.rb#546 def read_chunked(socket, block); end - # source://webrick//lib/webrick/httprequest.rb#578 + # source://webrick//lib/webrick/httprequest.rb#582 def read_data(io, size); end # source://webrick//lib/webrick/httprequest.rb#471 def read_header(socket); end - # source://webrick//lib/webrick/httprequest.rb#574 + # source://webrick//lib/webrick/httprequest.rb#578 def read_line(io, size = T.unsafe(nil)); end # @raise [HTTPStatus::EOFError] @@ -1168,7 +1171,7 @@ 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#610 + # source://webrick//lib/webrick/httprequest.rb#614 def setup_forwarded_info; end end @@ -1187,20 +1190,20 @@ class WEBrick::HTTPResponse # # @return [HTTPResponse] a new instance of HTTPResponse # - # source://webrick//lib/webrick/httpresponse.rb#112 + # source://webrick//lib/webrick/httpresponse.rb#117 def initialize(config); end # Retrieves the response header +field+ # - # source://webrick//lib/webrick/httpresponse.rb#150 + # source://webrick//lib/webrick/httpresponse.rb#155 def [](field); end # Sets the response header +field+ to +value+ # - # source://webrick//lib/webrick/httpresponse.rb#157 + # source://webrick//lib/webrick/httpresponse.rb#162 def []=(field, value); end - # source://webrick//lib/webrick/httpresponse.rb#240 + # source://webrick//lib/webrick/httpresponse.rb#255 def _rack_setup_header; end # Body may be: @@ -1243,14 +1246,14 @@ class WEBrick::HTTPResponse # Enables chunked transfer encoding. # - # source://webrick//lib/webrick/httpresponse.rb#209 + # source://webrick//lib/webrick/httpresponse.rb#214 def chunked=(val); end # Will this response body be returned using chunked transfer-encoding? # # @return [Boolean] # - # source://webrick//lib/webrick/httpresponse.rb#202 + # source://webrick//lib/webrick/httpresponse.rb#207 def chunked?; end # Configuration for this response @@ -1260,22 +1263,22 @@ class WEBrick::HTTPResponse # The content-length header # - # source://webrick//lib/webrick/httpresponse.rb#165 + # source://webrick//lib/webrick/httpresponse.rb#170 def content_length; end # Sets the content-length header to +len+ # - # source://webrick//lib/webrick/httpresponse.rb#174 + # source://webrick//lib/webrick/httpresponse.rb#179 def content_length=(len); end # The content-type header # - # source://webrick//lib/webrick/httpresponse.rb#181 + # source://webrick//lib/webrick/httpresponse.rb#186 def content_type; end # Sets the content-type header to +type+ # - # source://webrick//lib/webrick/httpresponse.rb#188 + # source://webrick//lib/webrick/httpresponse.rb#193 def content_type=(type); end # Response cookies @@ -1285,7 +1288,7 @@ class WEBrick::HTTPResponse # Iterates over each header in the response # - # source://webrick//lib/webrick/httpresponse.rb#195 + # source://webrick//lib/webrick/httpresponse.rb#200 def each; end # Filename of the static file in this response. Only used by the @@ -1324,10 +1327,10 @@ class WEBrick::HTTPResponse # # @return [Boolean] # - # source://webrick//lib/webrick/httpresponse.rb#216 + # source://webrick//lib/webrick/httpresponse.rb#221 def keep_alive?; end - # source://webrick//lib/webrick/httpresponse.rb#303 + # source://webrick//lib/webrick/httpresponse.rb#325 def make_body_tempfile; end # Response reason phrase ("OK") @@ -1340,7 +1343,7 @@ class WEBrick::HTTPResponse # source://webrick//lib/webrick/httpresponse.rb#51 def reason_phrase=(_arg0); end - # source://webrick//lib/webrick/httpresponse.rb#321 + # source://webrick//lib/webrick/httpresponse.rb#343 def remove_body_tempfile; end # Request HTTP version for this response @@ -1375,17 +1378,17 @@ class WEBrick::HTTPResponse # Sends the body on +socket+ # - # source://webrick//lib/webrick/httpresponse.rb#356 + # source://webrick//lib/webrick/httpresponse.rb#378 def send_body(socket); end # Sends the headers on +socket+ # - # source://webrick//lib/webrick/httpresponse.rb#333 + # source://webrick//lib/webrick/httpresponse.rb#355 def send_header(socket); end # Sends the response on +socket+ # - # source://webrick//lib/webrick/httpresponse.rb#223 + # source://webrick//lib/webrick/httpresponse.rb#238 def send_response(socket); end # Bytes sent in this response @@ -1395,7 +1398,7 @@ class WEBrick::HTTPResponse # Creates an error page for exception +ex+ with an optional +backtrace+ # - # source://webrick//lib/webrick/httpresponse.rb#383 + # source://webrick//lib/webrick/httpresponse.rb#405 def set_error(ex, backtrace = T.unsafe(nil)); end # Redirects to +url+ with a WEBrick::HTTPStatus::Redirect +status+. @@ -1404,7 +1407,7 @@ class WEBrick::HTTPResponse # # res.set_redirect WEBrick::HTTPStatus::TemporaryRedirect # - # source://webrick//lib/webrick/httpresponse.rb#373 + # source://webrick//lib/webrick/httpresponse.rb#395 def set_redirect(status, url); end # Response status code (200) @@ -1414,50 +1417,66 @@ class WEBrick::HTTPResponse # Sets the response's status to the +status+ code # - # source://webrick//lib/webrick/httpresponse.rb#142 + # source://webrick//lib/webrick/httpresponse.rb#147 def status=(status); end # The response's HTTP status line # - # source://webrick//lib/webrick/httpresponse.rb#135 + # source://webrick//lib/webrick/httpresponse.rb#140 def status_line; end + # Set the response body proc as an streaming/upgrade response. + # + # source://webrick//lib/webrick/httpresponse.rb#111 + def upgrade; end + + # Sets the response to be a streaming/upgrade response. + # This will disable keep-alive and chunked transfer encoding. + # + # source://webrick//lib/webrick/httpresponse.rb#229 + def upgrade!(protocol); end + + # Set the response body proc as an streaming/upgrade response. + # + # source://webrick//lib/webrick/httpresponse.rb#111 + def upgrade=(_arg0); end + private # preserved for compatibility with some 3rd-party handlers # - # source://webrick//lib/webrick/httpresponse.rb#557 + # source://webrick//lib/webrick/httpresponse.rb#581 def _write_data(socket, data); end - # source://webrick//lib/webrick/httpresponse.rb#410 + # source://webrick//lib/webrick/httpresponse.rb#432 def check_header(header_value); end # :stopdoc: # - # source://webrick//lib/webrick/httpresponse.rb#421 + # source://webrick//lib/webrick/httpresponse.rb#443 def error_body(backtrace, ex, host, port); end - # source://webrick//lib/webrick/httpresponse.rb#451 + # source://webrick//lib/webrick/httpresponse.rb#473 def send_body_io(socket); end - # source://webrick//lib/webrick/httpresponse.rb#513 + # source://webrick//lib/webrick/httpresponse.rb#535 def send_body_proc(socket); end - # source://webrick//lib/webrick/httpresponse.rb#491 + # source://webrick//lib/webrick/httpresponse.rb#513 def send_body_string(socket); end end -# source://webrick//lib/webrick/httpresponse.rb#531 +# source://webrick//lib/webrick/httpresponse.rb#555 class WEBrick::HTTPResponse::ChunkedWrapper # @return [ChunkedWrapper] a new instance of ChunkedWrapper # - # source://webrick//lib/webrick/httpresponse.rb#532 + # source://webrick//lib/webrick/httpresponse.rb#556 def initialize(socket, resp); end - # source://webrick//lib/webrick/httpresponse.rb#550 + # source://webrick//lib/webrick/httpresponse.rb#574 def <<(*buf); end - # source://webrick//lib/webrick/httpresponse.rb#537 + # source://webrick//lib/webrick/httpresponse.rb#561 def write(buf); end end @@ -1928,6 +1947,38 @@ class WEBrick::HTTPServlet::FileHandler < ::WEBrick::HTTPServlet::AbstractServle end end +# Mounts a proc at a path that accepts a request and response. +# +# Instead of mounting this servlet with WEBrick::HTTPServer#mount use +# WEBrick::HTTPServer#mount_proc: +# +# server.mount_proc '/' do |req, res| +# res.body = 'it worked!' +# res.status = 200 +# end +# +# source://webrick//lib/webrick/httpservlet/prochandler.rb#28 +class WEBrick::HTTPServlet::ProcHandler < ::WEBrick::HTTPServlet::AbstractServlet + # @return [ProcHandler] a new instance of ProcHandler + # + # source://webrick//lib/webrick/httpservlet/prochandler.rb#34 + def initialize(proc); end + + # source://webrick//lib/webrick/httpservlet/prochandler.rb#38 + def do_GET(request, response); end + + # source://webrick//lib/webrick/httpservlet/prochandler.rb#38 + def do_POST(request, response); end + + # source://webrick//lib/webrick/httpservlet/prochandler.rb#38 + def do_PUT(request, response); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httpservlet/prochandler.rb#30 + def get_instance(server, *options); end +end + # This module is used to manager HTTP status codes. # # See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more @@ -2084,54 +2135,54 @@ end module WEBrick::HTTPUtils private - # source://webrick//lib/webrick/httputils.rb#443 + # source://webrick//lib/webrick/httputils.rb#454 def _escape(str, regex); end # :stopdoc: # - # source://webrick//lib/webrick/httputils.rb#441 + # source://webrick//lib/webrick/httputils.rb#452 def _make_regex(str); end - # source://webrick//lib/webrick/httputils.rb#442 + # source://webrick//lib/webrick/httputils.rb#453 def _make_regex!(str); end - # source://webrick//lib/webrick/httputils.rb#449 + # source://webrick//lib/webrick/httputils.rb#460 def _unescape(str, regex); end # Removes quotes and escapes from +str+ # - # source://webrick//lib/webrick/httputils.rb#223 + # source://webrick//lib/webrick/httputils.rb#234 def dequote(str); end # Escapes HTTP reserved and unwise characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#467 + # source://webrick//lib/webrick/httputils.rb#478 def escape(str); end # Escapes 8 bit characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#508 + # source://webrick//lib/webrick/httputils.rb#519 def escape8bit(str); end # Escapes form reserved characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#481 + # source://webrick//lib/webrick/httputils.rb#492 def escape_form(str); end # Escapes path +str+ # - # source://webrick//lib/webrick/httputils.rb#497 + # source://webrick//lib/webrick/httputils.rb#508 def escape_path(str); end # Loads Apache-compatible mime.types in +file+. # - # source://webrick//lib/webrick/httputils.rb#112 + # source://webrick//lib/webrick/httputils.rb#123 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#134 + # source://webrick//lib/webrick/httputils.rb#145 def mime_type(filename, mime_tab); end # Normalizes a request path. Raises an exception if the path cannot be @@ -2142,99 +2193,99 @@ module WEBrick::HTTPUtils # Parses form data in +io+ with the given +boundary+ # - # source://webrick//lib/webrick/httputils.rb#395 + # source://webrick//lib/webrick/httputils.rb#406 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#145 + # source://webrick//lib/webrick/httputils.rb#156 def parse_header(raw); end # Parses the query component of a URI in +str+ # - # source://webrick//lib/webrick/httputils.rb#371 + # source://webrick//lib/webrick/httputils.rb#382 def parse_query(str); end # Parses q values in +value+ as used in Accept headers. # - # source://webrick//lib/webrick/httputils.rb#202 + # source://webrick//lib/webrick/httputils.rb#213 def parse_qvalues(value); end # Parses a Range header value +ranges_specifier+ # - # source://webrick//lib/webrick/httputils.rb#184 + # source://webrick//lib/webrick/httputils.rb#195 def parse_range_header(ranges_specifier); end # Quotes and escapes quotes in +str+ # - # source://webrick//lib/webrick/httputils.rb#233 + # source://webrick//lib/webrick/httputils.rb#244 def quote(str); end # Splits a header value +str+ according to HTTP specification. # - # source://webrick//lib/webrick/httputils.rb#175 + # source://webrick//lib/webrick/httputils.rb#186 def split_header_value(str); end # Unescapes HTTP reserved and unwise characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#474 + # source://webrick//lib/webrick/httputils.rb#485 def unescape(str); end # Unescapes form reserved characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#490 + # source://webrick//lib/webrick/httputils.rb#501 def unescape_form(str); end class << self - # source://webrick//lib/webrick/httputils.rb#443 + # source://webrick//lib/webrick/httputils.rb#454 def _escape(str, regex); end # :stopdoc: # - # source://webrick//lib/webrick/httputils.rb#441 + # source://webrick//lib/webrick/httputils.rb#452 def _make_regex(str); end - # source://webrick//lib/webrick/httputils.rb#442 + # source://webrick//lib/webrick/httputils.rb#453 def _make_regex!(str); end - # source://webrick//lib/webrick/httputils.rb#449 + # source://webrick//lib/webrick/httputils.rb#460 def _unescape(str, regex); end # Removes quotes and escapes from +str+ # - # source://webrick//lib/webrick/httputils.rb#223 + # source://webrick//lib/webrick/httputils.rb#234 def dequote(str); end # Escapes HTTP reserved and unwise characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#467 + # source://webrick//lib/webrick/httputils.rb#478 def escape(str); end # Escapes 8 bit characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#508 + # source://webrick//lib/webrick/httputils.rb#519 def escape8bit(str); end # Escapes form reserved characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#481 + # source://webrick//lib/webrick/httputils.rb#492 def escape_form(str); end # Escapes path +str+ # - # source://webrick//lib/webrick/httputils.rb#497 + # source://webrick//lib/webrick/httputils.rb#508 def escape_path(str); end # Loads Apache-compatible mime.types in +file+. # - # source://webrick//lib/webrick/httputils.rb#112 + # source://webrick//lib/webrick/httputils.rb#123 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#134 + # source://webrick//lib/webrick/httputils.rb#145 def mime_type(filename, mime_tab); end # Normalizes a request path. Raises an exception if the path cannot be @@ -2245,48 +2296,48 @@ module WEBrick::HTTPUtils # Parses form data in +io+ with the given +boundary+ # - # source://webrick//lib/webrick/httputils.rb#395 + # source://webrick//lib/webrick/httputils.rb#406 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#145 + # source://webrick//lib/webrick/httputils.rb#156 def parse_header(raw); end # Parses the query component of a URI in +str+ # - # source://webrick//lib/webrick/httputils.rb#371 + # source://webrick//lib/webrick/httputils.rb#382 def parse_query(str); end # Parses q values in +value+ as used in Accept headers. # - # source://webrick//lib/webrick/httputils.rb#202 + # source://webrick//lib/webrick/httputils.rb#213 def parse_qvalues(value); end # Parses a Range header value +ranges_specifier+ # - # source://webrick//lib/webrick/httputils.rb#184 + # source://webrick//lib/webrick/httputils.rb#195 def parse_range_header(ranges_specifier); end # Quotes and escapes quotes in +str+ # - # source://webrick//lib/webrick/httputils.rb#233 + # source://webrick//lib/webrick/httputils.rb#244 def quote(str); end # Splits a header value +str+ according to HTTP specification. # - # source://webrick//lib/webrick/httputils.rb#175 + # source://webrick//lib/webrick/httputils.rb#186 def split_header_value(str); end # Unescapes HTTP reserved and unwise characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#474 + # source://webrick//lib/webrick/httputils.rb#485 def unescape(str); end # Unescapes form reserved characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#490 + # source://webrick//lib/webrick/httputils.rb#501 def unescape_form(str); end end end @@ -2294,7 +2345,7 @@ end # Stores multipart form data. FormData objects are created when # WEBrick::HTTPUtils.parse_form_data is called. # -# source://webrick//lib/webrick/httputils.rb#242 +# source://webrick//lib/webrick/httputils.rb#253 class WEBrick::HTTPUtils::FormData < ::String # Creates a new FormData object. # @@ -2305,7 +2356,7 @@ class WEBrick::HTTPUtils::FormData < ::String # # @return [FormData] a new instance of FormData # - # source://webrick//lib/webrick/httputils.rb#267 + # source://webrick//lib/webrick/httputils.rb#278 def initialize(*args); end # Adds +str+ to this FormData which may be the body, a header or a @@ -2313,69 +2364,69 @@ class WEBrick::HTTPUtils::FormData < ::String # # This is called by WEBrick::HTTPUtils.parse_form_data for you # - # source://webrick//lib/webrick/httputils.rb#300 + # source://webrick//lib/webrick/httputils.rb#311 def <<(str); end # Retrieves the header at the first entry in +key+ # - # source://webrick//lib/webrick/httputils.rb#286 + # source://webrick//lib/webrick/httputils.rb#297 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#320 + # source://webrick//lib/webrick/httputils.rb#331 def append_data(data); end # Yields each entry in this FormData # - # source://webrick//lib/webrick/httputils.rb#335 + # source://webrick//lib/webrick/httputils.rb#346 def each_data; end # The filename of the form data part # - # source://webrick//lib/webrick/httputils.rb#254 + # source://webrick//lib/webrick/httputils.rb#265 def filename; end # The filename of the form data part # - # source://webrick//lib/webrick/httputils.rb#254 + # source://webrick//lib/webrick/httputils.rb#265 def filename=(_arg0); end # Returns all the FormData as an Array # - # source://webrick//lib/webrick/httputils.rb#347 + # source://webrick//lib/webrick/httputils.rb#358 def list; end # The name of the form data part # - # source://webrick//lib/webrick/httputils.rb#249 + # source://webrick//lib/webrick/httputils.rb#260 def name; end # The name of the form data part # - # source://webrick//lib/webrick/httputils.rb#249 + # source://webrick//lib/webrick/httputils.rb#260 def name=(_arg0); end - # source://webrick//lib/webrick/httputils.rb#256 + # source://webrick//lib/webrick/httputils.rb#267 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#347 + # source://webrick//lib/webrick/httputils.rb#358 def to_ary; end # This FormData's body # - # source://webrick//lib/webrick/httputils.rb#363 + # source://webrick//lib/webrick/httputils.rb#374 def to_s; end protected - # source://webrick//lib/webrick/httputils.rb#256 + # source://webrick//lib/webrick/httputils.rb#267 def next_data; end end diff --git a/sorbet/rbi/gems/websocket-driver@0.7.5.rbi b/sorbet/rbi/gems/websocket-driver@0.7.6.rbi similarity index 86% rename from sorbet/rbi/gems/websocket-driver@0.7.5.rbi rename to sorbet/rbi/gems/websocket-driver@0.7.6.rbi index edb3a4a84..e4312c076 100644 --- a/sorbet/rbi/gems/websocket-driver@0.7.5.rbi +++ b/sorbet/rbi/gems/websocket-driver@0.7.6.rbi @@ -13,79 +13,82 @@ class WebSocket::Driver # @return [Driver] a new instance of Driver # - # source://websocket-driver//lib/websocket/driver.rb#71 + # source://websocket-driver//lib/websocket/driver.rb#72 def initialize(socket, options = T.unsafe(nil)); end - # source://websocket-driver//lib/websocket/driver.rb#89 + # source://websocket-driver//lib/websocket/driver.rb#90 def add_extension(extension); end - # source://websocket-driver//lib/websocket/driver.rb#122 + # source://websocket-driver//lib/websocket/driver.rb#123 def binary(message); end - # source://websocket-driver//lib/websocket/driver.rb#134 + # source://websocket-driver//lib/websocket/driver.rb#135 def close(reason = T.unsafe(nil), code = T.unsafe(nil)); end - # source://websocket-driver//lib/websocket/driver.rb#126 + # source://websocket-driver//lib/websocket/driver.rb#127 def ping(*args); end - # source://websocket-driver//lib/websocket/driver.rb#130 + # source://websocket-driver//lib/websocket/driver.rb#131 def pong(*args); end # Returns the value of attribute protocol. # - # source://websocket-driver//lib/websocket/driver.rb#69 + # source://websocket-driver//lib/websocket/driver.rb#70 def protocol; end # Returns the value of attribute ready_state. # - # source://websocket-driver//lib/websocket/driver.rb#69 + # source://websocket-driver//lib/websocket/driver.rb#70 def ready_state; end - # source://websocket-driver//lib/websocket/driver.rb#93 + # source://websocket-driver//lib/websocket/driver.rb#94 def set_header(name, value); end - # source://websocket-driver//lib/websocket/driver.rb#99 + # source://websocket-driver//lib/websocket/driver.rb#100 def start; end - # source://websocket-driver//lib/websocket/driver.rb#84 + # source://websocket-driver//lib/websocket/driver.rb#85 def state; end - # source://websocket-driver//lib/websocket/driver.rb#117 + # source://websocket-driver//lib/websocket/driver.rb#118 def text(message); end private - # source://websocket-driver//lib/websocket/driver.rb#155 + # source://websocket-driver//lib/websocket/driver.rb#156 def fail(type, message); end - # source://websocket-driver//lib/websocket/driver.rb#143 + # source://websocket-driver//lib/websocket/driver.rb#144 def fail_handshake(error); end - # source://websocket-driver//lib/websocket/driver.rb#161 + # source://websocket-driver//lib/websocket/driver.rb#162 def open; end - # source://websocket-driver//lib/websocket/driver.rb#168 + # source://websocket-driver//lib/websocket/driver.rb#169 def queue(message); end class << self - # source://websocket-driver//lib/websocket/driver.rb#173 + # source://websocket-driver//lib/websocket/driver.rb#174 def client(socket, options = T.unsafe(nil)); end - # source://websocket-driver//lib/websocket/driver.rb#197 + # source://websocket-driver//lib/websocket/driver.rb#198 def encode(data, encoding = T.unsafe(nil)); end - # source://websocket-driver//lib/websocket/driver.rb#181 + # source://websocket-driver//lib/websocket/driver.rb#213 + def host_header(uri); end + + # source://websocket-driver//lib/websocket/driver.rb#182 def rack(socket, options = T.unsafe(nil)); end - # source://websocket-driver//lib/websocket/driver.rb#177 + # source://websocket-driver//lib/websocket/driver.rb#178 def server(socket, options = T.unsafe(nil)); end - # source://websocket-driver//lib/websocket/driver.rb#212 + # source://websocket-driver//lib/websocket/driver.rb#221 def validate_options(options, valid_keys); end # @return [Boolean] # - # source://websocket-driver//lib/websocket/driver.rb#220 + # source://websocket-driver//lib/websocket/driver.rb#229 def websocket?(env); end end end @@ -102,13 +105,13 @@ class WebSocket::Driver::Client < ::WebSocket::Driver::Hybi # source://websocket-driver//lib/websocket/driver/client.rb#11 def headers; end - # source://websocket-driver//lib/websocket/driver/client.rb#61 + # source://websocket-driver//lib/websocket/driver/client.rb#60 def parse(chunk); end - # source://websocket-driver//lib/websocket/driver/client.rb#50 + # source://websocket-driver//lib/websocket/driver/client.rb#49 def proxy(origin, options = T.unsafe(nil)); end - # source://websocket-driver//lib/websocket/driver/client.rb#54 + # source://websocket-driver//lib/websocket/driver/client.rb#53 def start; end # Returns the value of attribute status. @@ -116,18 +119,18 @@ class WebSocket::Driver::Client < ::WebSocket::Driver::Hybi # source://websocket-driver//lib/websocket/driver/client.rb#11 def status; end - # source://websocket-driver//lib/websocket/driver/client.rb#46 + # source://websocket-driver//lib/websocket/driver/client.rb#45 def version; end private - # source://websocket-driver//lib/websocket/driver/client.rb#87 + # source://websocket-driver//lib/websocket/driver/client.rb#86 def fail_handshake(message); end - # source://websocket-driver//lib/websocket/driver/client.rb#78 + # source://websocket-driver//lib/websocket/driver/client.rb#77 def handshake_request; end - # source://websocket-driver//lib/websocket/driver/client.rb#94 + # source://websocket-driver//lib/websocket/driver/client.rb#93 def validate_handshake; end class << self @@ -139,7 +142,7 @@ end # source://websocket-driver//lib/websocket/driver/client.rb#5 WebSocket::Driver::Client::VALID_SCHEMES = T.let(T.unsafe(nil), Array) -# source://websocket-driver//lib/websocket/driver.rb#52 +# source://websocket-driver//lib/websocket/driver.rb#53 class WebSocket::Driver::CloseEvent < ::Struct # Returns the value of attribute code # @@ -172,10 +175,10 @@ class WebSocket::Driver::CloseEvent < ::Struct end end -# source://websocket-driver//lib/websocket/driver.rb#56 +# source://websocket-driver//lib/websocket/driver.rb#57 class WebSocket::Driver::ConfigurationError < ::ArgumentError; end -# source://websocket-driver//lib/websocket/driver.rb#47 +# source://websocket-driver//lib/websocket/driver.rb#48 class WebSocket::Driver::ConnectEvent < ::Struct class << self def [](*_arg0); end @@ -312,88 +315,88 @@ end # source://websocket-driver//lib/websocket/driver/headers.rb#5 WebSocket::Driver::Headers::ALLOWED_DUPLICATES = T.let(T.unsafe(nil), Array) -# source://websocket-driver//lib/websocket/driver/hybi.rb#4 +# source://websocket-driver//lib/websocket/driver/hybi.rb#6 class WebSocket::Driver::Hybi < ::WebSocket::Driver # @return [Hybi] a new instance of Hybi # - # source://websocket-driver//lib/websocket/driver/hybi.rb#57 + # source://websocket-driver//lib/websocket/driver/hybi.rb#59 def initialize(socket, options = T.unsafe(nil)); end - # source://websocket-driver//lib/websocket/driver/hybi.rb#84 + # source://websocket-driver//lib/websocket/driver/hybi.rb#86 def add_extension(extension); end - # source://websocket-driver//lib/websocket/driver/hybi.rb#127 + # source://websocket-driver//lib/websocket/driver/hybi.rb#129 def binary(message); end - # source://websocket-driver//lib/websocket/driver/hybi.rb#140 + # source://websocket-driver//lib/websocket/driver/hybi.rb#142 def close(reason = T.unsafe(nil), code = T.unsafe(nil)); end - # source://websocket-driver//lib/websocket/driver/hybi.rb#157 + # source://websocket-driver//lib/websocket/driver/hybi.rb#159 def frame(buffer, type = T.unsafe(nil), code = T.unsafe(nil)); end - # source://websocket-driver//lib/websocket/driver/hybi.rb#89 + # source://websocket-driver//lib/websocket/driver/hybi.rb#91 def parse(chunk); end - # source://websocket-driver//lib/websocket/driver/hybi.rb#131 + # source://websocket-driver//lib/websocket/driver/hybi.rb#133 def ping(message = T.unsafe(nil), &callback); end - # source://websocket-driver//lib/websocket/driver/hybi.rb#136 + # source://websocket-driver//lib/websocket/driver/hybi.rb#138 def pong(message = T.unsafe(nil)); end - # source://websocket-driver//lib/websocket/driver/hybi.rb#80 + # source://websocket-driver//lib/websocket/driver/hybi.rb#82 def version; end private - # source://websocket-driver//lib/websocket/driver/hybi.rb#334 + # source://websocket-driver//lib/websocket/driver/hybi.rb#336 def check_frame_length; end - # source://websocket-driver//lib/websocket/driver/hybi.rb#345 + # source://websocket-driver//lib/websocket/driver/hybi.rb#347 def emit_frame(buffer); end - # source://websocket-driver//lib/websocket/driver/hybi.rb#393 + # source://websocket-driver//lib/websocket/driver/hybi.rb#395 def emit_message; end - # source://websocket-driver//lib/websocket/driver/hybi.rb#268 + # source://websocket-driver//lib/websocket/driver/hybi.rb#270 def fail(type, message); end - # source://websocket-driver//lib/websocket/driver/hybi.rb#230 + # source://websocket-driver//lib/websocket/driver/hybi.rb#232 def handshake_response; end - # source://websocket-driver//lib/websocket/driver/hybi.rb#323 + # source://websocket-driver//lib/websocket/driver/hybi.rb#325 def parse_extended_length(buffer); end - # source://websocket-driver//lib/websocket/driver/hybi.rb#306 + # source://websocket-driver//lib/websocket/driver/hybi.rb#308 def parse_length(octet); end - # source://websocket-driver//lib/websocket/driver/hybi.rb#273 + # source://websocket-driver//lib/websocket/driver/hybi.rb#275 def parse_opcode(octet); end - # source://websocket-driver//lib/websocket/driver/hybi.rb#194 + # source://websocket-driver//lib/websocket/driver/hybi.rb#196 def send_frame(frame); end - # source://websocket-driver//lib/websocket/driver/hybi.rb#256 + # source://websocket-driver//lib/websocket/driver/hybi.rb#258 def shutdown(code, reason, error = T.unsafe(nil)); end class << self - # source://websocket-driver//lib/websocket/driver/hybi.rb#10 + # source://websocket-driver//lib/websocket/driver/hybi.rb#12 def generate_accept(key); end end end -# source://websocket-driver//lib/websocket/driver/hybi.rb#17 +# source://websocket-driver//lib/websocket/driver/hybi.rb#19 WebSocket::Driver::Hybi::BYTE = T.let(T.unsafe(nil), Integer) -# source://websocket-driver//lib/websocket/driver/hybi.rb#51 +# source://websocket-driver//lib/websocket/driver/hybi.rb#53 WebSocket::Driver::Hybi::DEFAULT_ERROR_CODE = T.let(T.unsafe(nil), Integer) -# source://websocket-driver//lib/websocket/driver/hybi.rb#38 +# source://websocket-driver//lib/websocket/driver/hybi.rb#40 WebSocket::Driver::Hybi::ERRORS = T.let(T.unsafe(nil), Hash) -# source://websocket-driver//lib/websocket/driver/hybi.rb#50 +# source://websocket-driver//lib/websocket/driver/hybi.rb#52 WebSocket::Driver::Hybi::ERROR_CODES = T.let(T.unsafe(nil), Array) -# source://websocket-driver//lib/websocket/driver/hybi.rb#18 +# source://websocket-driver//lib/websocket/driver/hybi.rb#20 WebSocket::Driver::Hybi::FIN = T.let(T.unsafe(nil), Integer) # source://websocket-driver//lib/websocket/driver/hybi/frame.rb#5 @@ -519,22 +522,22 @@ class WebSocket::Driver::Hybi::Frame def rsv3=(_arg0); end end -# source://websocket-driver//lib/websocket/driver/hybi.rb#15 +# source://websocket-driver//lib/websocket/driver/hybi.rb#17 WebSocket::Driver::Hybi::GUID = T.let(T.unsafe(nil), String) -# source://websocket-driver//lib/websocket/driver/hybi.rb#23 +# source://websocket-driver//lib/websocket/driver/hybi.rb#25 WebSocket::Driver::Hybi::LENGTH = T.let(T.unsafe(nil), Integer) -# source://websocket-driver//lib/websocket/driver/hybi.rb#18 +# source://websocket-driver//lib/websocket/driver/hybi.rb#20 WebSocket::Driver::Hybi::MASK = T.let(T.unsafe(nil), Integer) -# source://websocket-driver//lib/websocket/driver/hybi.rb#53 +# source://websocket-driver//lib/websocket/driver/hybi.rb#55 WebSocket::Driver::Hybi::MAX_RESERVED_ERROR = T.let(T.unsafe(nil), Integer) -# source://websocket-driver//lib/websocket/driver/hybi.rb#35 +# source://websocket-driver//lib/websocket/driver/hybi.rb#37 WebSocket::Driver::Hybi::MESSAGE_OPCODES = T.let(T.unsafe(nil), Array) -# source://websocket-driver//lib/websocket/driver/hybi.rb#52 +# source://websocket-driver//lib/websocket/driver/hybi.rb#54 WebSocket::Driver::Hybi::MIN_RESERVED_ERROR = T.let(T.unsafe(nil), Integer) # source://websocket-driver//lib/websocket/driver/hybi/message.rb#5 @@ -608,37 +611,37 @@ class WebSocket::Driver::Hybi::Message def rsv3=(_arg0); end end -# source://websocket-driver//lib/websocket/driver/hybi.rb#22 +# source://websocket-driver//lib/websocket/driver/hybi.rb#24 WebSocket::Driver::Hybi::OPCODE = T.let(T.unsafe(nil), Integer) -# source://websocket-driver//lib/websocket/driver/hybi.rb#25 +# source://websocket-driver//lib/websocket/driver/hybi.rb#27 WebSocket::Driver::Hybi::OPCODES = T.let(T.unsafe(nil), Hash) -# source://websocket-driver//lib/websocket/driver/hybi.rb#34 +# source://websocket-driver//lib/websocket/driver/hybi.rb#36 WebSocket::Driver::Hybi::OPCODE_CODES = T.let(T.unsafe(nil), Array) -# source://websocket-driver//lib/websocket/driver/hybi.rb#36 +# source://websocket-driver//lib/websocket/driver/hybi.rb#38 WebSocket::Driver::Hybi::OPENING_OPCODES = T.let(T.unsafe(nil), Array) -# source://websocket-driver//lib/websocket/driver/hybi.rb#55 +# source://websocket-driver//lib/websocket/driver/hybi.rb#57 WebSocket::Driver::Hybi::PACK_FORMATS = T.let(T.unsafe(nil), Hash) -# source://websocket-driver//lib/websocket/driver/hybi.rb#19 +# source://websocket-driver//lib/websocket/driver/hybi.rb#21 WebSocket::Driver::Hybi::RSV1 = T.let(T.unsafe(nil), Integer) -# source://websocket-driver//lib/websocket/driver/hybi.rb#20 +# source://websocket-driver//lib/websocket/driver/hybi.rb#22 WebSocket::Driver::Hybi::RSV2 = T.let(T.unsafe(nil), Integer) -# source://websocket-driver//lib/websocket/driver/hybi.rb#21 +# source://websocket-driver//lib/websocket/driver/hybi.rb#23 WebSocket::Driver::Hybi::RSV3 = T.let(T.unsafe(nil), Integer) -# source://websocket-driver//lib/websocket/driver/hybi.rb#14 +# source://websocket-driver//lib/websocket/driver/hybi.rb#16 WebSocket::Driver::Hybi::VERSION = T.let(T.unsafe(nil), String) # source://websocket-driver//lib/websocket/driver.rb#44 WebSocket::Driver::MAX_LENGTH = T.let(T.unsafe(nil), Integer) -# source://websocket-driver//lib/websocket/driver.rb#49 +# source://websocket-driver//lib/websocket/driver.rb#50 class WebSocket::Driver::MessageEvent < ::Struct # Returns the value of attribute data # @@ -660,7 +663,7 @@ class WebSocket::Driver::MessageEvent < ::Struct end end -# source://websocket-driver//lib/websocket/driver.rb#48 +# source://websocket-driver//lib/websocket/driver.rb#49 class WebSocket::Driver::OpenEvent < ::Struct class << self def [](*_arg0); end @@ -671,7 +674,10 @@ class WebSocket::Driver::OpenEvent < ::Struct end end -# source://websocket-driver//lib/websocket/driver.rb#50 +# source://websocket-driver//lib/websocket/driver.rb#45 +WebSocket::Driver::PORTS = T.let(T.unsafe(nil), Hash) + +# source://websocket-driver//lib/websocket/driver.rb#51 class WebSocket::Driver::PingEvent < ::Struct # Returns the value of attribute data # @@ -693,7 +699,7 @@ class WebSocket::Driver::PingEvent < ::Struct end end -# source://websocket-driver//lib/websocket/driver.rb#51 +# source://websocket-driver//lib/websocket/driver.rb#52 class WebSocket::Driver::PongEvent < ::Struct # Returns the value of attribute data # @@ -715,7 +721,7 @@ class WebSocket::Driver::PongEvent < ::Struct end end -# source://websocket-driver//lib/websocket/driver.rb#54 +# source://websocket-driver//lib/websocket/driver.rb#55 class WebSocket::Driver::ProtocolError < ::StandardError; end # source://websocket-driver//lib/websocket/driver/proxy.rb#4 @@ -724,33 +730,30 @@ class WebSocket::Driver::Proxy # @return [Proxy] a new instance of Proxy # - # source://websocket-driver//lib/websocket/driver/proxy.rb#11 + # source://websocket-driver//lib/websocket/driver/proxy.rb#9 def initialize(client, origin, options); end # Returns the value of attribute headers. # - # source://websocket-driver//lib/websocket/driver/proxy.rb#9 + # source://websocket-driver//lib/websocket/driver/proxy.rb#7 def headers; end - # source://websocket-driver//lib/websocket/driver/proxy.rb#51 + # source://websocket-driver//lib/websocket/driver/proxy.rb#49 def parse(chunk); end - # source://websocket-driver//lib/websocket/driver/proxy.rb#33 + # source://websocket-driver//lib/websocket/driver/proxy.rb#31 def set_header(name, value); end - # source://websocket-driver//lib/websocket/driver/proxy.rb#39 + # source://websocket-driver//lib/websocket/driver/proxy.rb#37 def start; end # Returns the value of attribute status. # - # source://websocket-driver//lib/websocket/driver/proxy.rb#9 + # source://websocket-driver//lib/websocket/driver/proxy.rb#7 def status; end end -# source://websocket-driver//lib/websocket/driver/proxy.rb#7 -WebSocket::Driver::Proxy::PORTS = T.let(T.unsafe(nil), Hash) - -# source://websocket-driver//lib/websocket/driver.rb#45 +# source://websocket-driver//lib/websocket/driver.rb#46 WebSocket::Driver::STATES = T.let(T.unsafe(nil), Array) # source://websocket-driver//lib/websocket/driver/server.rb#4 @@ -843,7 +846,7 @@ end # source://websocket-driver//lib/websocket/driver/stream_reader.rb#6 WebSocket::Driver::StreamReader::MINIMUM_AUTOMATIC_PRUNE_OFFSET = T.let(T.unsafe(nil), Integer) -# source://websocket-driver//lib/websocket/driver.rb#55 +# source://websocket-driver//lib/websocket/driver.rb#56 class WebSocket::Driver::URIError < ::ArgumentError; end # source://websocket-driver//lib/websocket/http.rb#2 diff --git a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi index cfdc2bf04..c68d72ba4 100644 --- a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +++ b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi @@ -381,7 +381,7 @@ class YARDSorbet::TStructProp < ::T::Struct const :types, T::Array[::String] class << self - # source://sorbet-runtime/0.5.10736/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end diff --git a/sorbet/rbi/gems/yard@0.9.28.rbi b/sorbet/rbi/gems/yard@0.9.36.rbi similarity index 95% rename from sorbet/rbi/gems/yard@0.9.28.rbi rename to sorbet/rbi/gems/yard@0.9.36.rbi index fb75291de..c685c5d1a 100644 --- a/sorbet/rbi/gems/yard@0.9.28.rbi +++ b/sorbet/rbi/gems/yard@0.9.36.rbi @@ -488,46 +488,58 @@ RUBY19 = T.let(T.unsafe(nil), TrueClass) # @private # -# source://yard//lib/yard/server/rack_adapter.rb#85 +# source://yard//lib/yard/server/rack_adapter.rb#93 class Rack::Request - # source://rack/2.2.6.4/lib/rack/request.rb#26 + # source://rack/3.0.9.1/lib/rack/request.rb#62 def initialize(env); end - # source://rack/2.2.6.4/lib/rack/request.rb#40 + # source://rack/3.0.9.1/lib/rack/request.rb#76 def delete_param(k); end - # source://rack/2.2.6.4/lib/rack/request.rb#31 + # source://rack/3.0.9.1/lib/rack/request.rb#67 def params; end - # source://rack/2.2.6.4/lib/rack/request.rb#31 + # source://rack/3.0.9.1/lib/rack/request.rb#67 def query; end - # source://rack/2.2.6.4/lib/rack/request.rb#35 + # source://rack/3.0.9.1/lib/rack/request.rb#71 def update_param(k, v); end # Returns the value of attribute version_supplied. # - # source://yard//lib/yard/server/rack_adapter.rb#86 + # source://yard//lib/yard/server/rack_adapter.rb#94 def version_supplied; end # Sets the attribute version_supplied # # @param value the value to set the attribute version_supplied to. # - # source://yard//lib/yard/server/rack_adapter.rb#86 + # source://yard//lib/yard/server/rack_adapter.rb#94 def version_supplied=(_arg0); end # @return [Boolean] # - # source://yard//lib/yard/server/rack_adapter.rb#88 + # source://yard//lib/yard/server/rack_adapter.rb#96 def xhr?; end class << self - # source://rack/2.2.6.4/lib/rack/request.rb#16 + # source://rack/3.0.9.1/lib/rack/request.rb#31 + def forwarded_priority; end + + # source://rack/3.0.9.1/lib/rack/request.rb#31 + def forwarded_priority=(_arg0); end + + # source://rack/3.0.9.1/lib/rack/request.rb#18 def ip_filter; end - # source://rack/2.2.6.4/lib/rack/request.rb#16 + # source://rack/3.0.9.1/lib/rack/request.rb#18 def ip_filter=(_arg0); end + + # source://rack/3.0.9.1/lib/rack/request.rb#40 + def x_forwarded_proto_priority; end + + # source://rack/3.0.9.1/lib/rack/request.rb#40 + def x_forwarded_proto_priority=(_arg0); end end end @@ -2166,7 +2178,7 @@ class YARD::CLI::Yardoc < ::YARD::CLI::YardoptsCommand # Generates output for objects # - # @param checksums [Hash, nil] if supplied, a list of checkums for files. + # @param checksums [Hash, nil] if supplied, a list of checksums for files. # @return [void] # @since 0.5.1 # @@ -2547,7 +2559,7 @@ class YARD::CodeObjects::Base # the paths are equal # @return [Boolean] whether or not the objects are considered the same # - # source://yard//lib/yard/code_objects/base.rb#322 + # source://yard//lib/yard/code_objects/base.rb#323 def ==(other); end # Accesses a custom attribute on the object @@ -2556,7 +2568,7 @@ class YARD::CodeObjects::Base # @return [Object, nil] the custom attribute or nil if not found. # @see #[]= # - # source://yard//lib/yard/code_objects/base.rb#342 + # source://yard//lib/yard/code_objects/base.rb#343 def [](key); end # Sets a custom attribute on the object @@ -2566,7 +2578,7 @@ class YARD::CodeObjects::Base # @return [void] # @see #[] # - # source://yard//lib/yard/code_objects/base.rb#355 + # source://yard//lib/yard/code_objects/base.rb#356 def []=(key, value); end # Associates a file with a code object, optionally adding the line where it was defined. @@ -2587,7 +2599,7 @@ class YARD::CodeObjects::Base # @see Docstring#add_tag # @since 0.8.4 # - # source://yard//lib/yard/code_objects/base.rb#557 + # source://yard//lib/yard/code_objects/base.rb#561 def add_tag(*tags); end # The non-localized documentation string associated with the object @@ -2614,7 +2626,7 @@ class YARD::CodeObjects::Base # the locale of the documentation string. # @return [Docstring] the documentation string # - # source://yard//lib/yard/code_objects/base.rb#404 + # source://yard//lib/yard/code_objects/base.rb#405 def docstring(locale = T.unsafe(nil)); end # Attaches a docstring to a code object by parsing the comments attached to the statement @@ -2623,7 +2635,7 @@ class YARD::CodeObjects::Base # @param comments [String, Array, Docstring] the comments attached to the code object to be parsed # into a docstring and meta tags. # - # source://yard//lib/yard/code_objects/base.rb#426 + # source://yard//lib/yard/code_objects/base.rb#427 def docstring=(comments); end # Marks whether or not the method is conditionally defined at runtime @@ -2654,7 +2666,7 @@ class YARD::CodeObjects::Base # the paths are equal # @return [Boolean] whether or not the objects are considered the same # - # source://yard//lib/yard/code_objects/base.rb#322 + # source://yard//lib/yard/code_objects/base.rb#323 def eql?(other); end # Tests if another object is equal to this, including a proxy @@ -2663,15 +2675,16 @@ class YARD::CodeObjects::Base # the paths are equal # @return [Boolean] whether or not the objects are considered the same # - # source://yard//lib/yard/code_objects/base.rb#322 + # source://yard//lib/yard/code_objects/base.rb#323 def equal?(other); end # Returns the filename the object was first parsed at, taking # definitions with docstrings first. # # @return [String] a filename + # @return [nil] if there is no file associated with the object # - # source://yard//lib/yard/code_objects/base.rb#306 + # source://yard//lib/yard/code_objects/base.rb#307 def file; end # The files the object was defined in. To add a file, use {#add_file}. @@ -2696,7 +2709,7 @@ class YARD::CodeObjects::Base # @return [String] the rendered template # @see Templates::Engine#render # - # source://yard//lib/yard/code_objects/base.rb#501 + # source://yard//lib/yard/code_objects/base.rb#505 def format(options = T.unsafe(nil)); end # @return [String] the group this object is associated with @@ -2716,19 +2729,19 @@ class YARD::CodeObjects::Base # @return [Boolean] # @see Docstring#has_tag? # - # source://yard//lib/yard/code_objects/base.rb#552 + # source://yard//lib/yard/code_objects/base.rb#556 def has_tag?(name); end # @return [Integer] the object's hash value (for equality checking) # - # source://yard//lib/yard/code_objects/base.rb#333 + # source://yard//lib/yard/code_objects/base.rb#334 def hash; end # Inspects the object, returning the type and path # # @return [String] a string describing the object # - # source://yard//lib/yard/code_objects/base.rb#509 + # source://yard//lib/yard/code_objects/base.rb#513 def inspect; end # Returns the line the object was first parsed at (or nil) @@ -2736,13 +2749,13 @@ class YARD::CodeObjects::Base # @return [Fixnum] the line where the object was first defined. # @return [nil] if there is no line associated with the object # - # source://yard//lib/yard/code_objects/base.rb#314 + # source://yard//lib/yard/code_objects/base.rb#315 def line; end # @overload dynamic_attr_name # @overload dynamic_attr_name= # - # source://yard//lib/yard/code_objects/base.rb#372 + # source://yard//lib/yard/code_objects/base.rb#373 def method_missing(meth, *args, &block); end # The name of the object @@ -2770,7 +2783,7 @@ class YARD::CodeObjects::Base # for {Registry.root}). If obj is nil, the object is unregistered # from the Registry. # - # source://yard//lib/yard/code_objects/base.rb#518 + # source://yard//lib/yard/code_objects/base.rb#522 def namespace=(obj); end # The namespace the object is defined in. If the object is in the @@ -2787,7 +2800,7 @@ class YARD::CodeObjects::Base # for {Registry.root}). If obj is nil, the object is unregistered # from the Registry. # - # source://yard//lib/yard/code_objects/base.rb#518 + # source://yard//lib/yard/code_objects/base.rb#522 def parent=(obj); end # Represents the unique path of the object. The default implementation @@ -2800,19 +2813,19 @@ class YARD::CodeObjects::Base # @return [String] the unique path of the object # @see #sep # - # source://yard//lib/yard/code_objects/base.rb#449 + # source://yard//lib/yard/code_objects/base.rb#453 def path; end # @param other [Base, String] another code object (or object path) # @return [String] the shortest relative path from this object to +other+ # @since 0.5.3 # - # source://yard//lib/yard/code_objects/base.rb#471 + # source://yard//lib/yard/code_objects/base.rb#475 def relative_path(other); end # @return [Boolean] whether or not this object is a RootObject # - # source://yard//lib/yard/code_objects/base.rb#563 + # source://yard//lib/yard/code_objects/base.rb#567 def root?; end # Override this method with a custom component separator. For instance, @@ -2823,7 +2836,7 @@ class YARD::CodeObjects::Base # @return [String] the component that separates the namespace path # and the name (default is {NSEP}) # - # source://yard//lib/yard/code_objects/base.rb#572 + # source://yard//lib/yard/code_objects/base.rb#576 def sep; end # The one line signature representing an object. For a method, this will @@ -2856,7 +2869,7 @@ class YARD::CodeObjects::Base # @param statement [#source, String] the +Parser::Statement+ holding the source code or the raw source # as a +String+ for the definition of the code object only (not the block) # - # source://yard//lib/yard/code_objects/base.rb#387 + # source://yard//lib/yard/code_objects/base.rb#388 def source=(statement); end # Language of the source code associated with the object. Defaults to @@ -2879,14 +2892,14 @@ class YARD::CodeObjects::Base # # @see Docstring#tag # - # source://yard//lib/yard/code_objects/base.rb#544 + # source://yard//lib/yard/code_objects/base.rb#548 def tag(name); end # Gets a list of tags from the {#docstring} # # @see Docstring#tags # - # source://yard//lib/yard/code_objects/base.rb#548 + # source://yard//lib/yard/code_objects/base.rb#552 def tags(name = T.unsafe(nil)); end # @note Override this method if your object has a special title that does @@ -2895,12 +2908,12 @@ class YARD::CodeObjects::Base # @return [String] the display title for an object # @see 0.8.4 # - # source://yard//lib/yard/code_objects/base.rb#464 + # source://yard//lib/yard/code_objects/base.rb#468 def title; end # @return [nil] this object does not turn into an array # - # source://yard//lib/yard/code_objects/base.rb#336 + # source://yard//lib/yard/code_objects/base.rb#337 def to_ary; end # Represents the unique path of the object. The default implementation @@ -2913,7 +2926,7 @@ class YARD::CodeObjects::Base # @return [String] the unique path of the object # @see #sep # - # source://yard//lib/yard/code_objects/base.rb#449 + # source://yard//lib/yard/code_objects/base.rb#453 def to_s; end # Default type is the lowercase class name without the "Object" suffix. @@ -2921,7 +2934,7 @@ class YARD::CodeObjects::Base # # @return [Symbol] the type of code object this represents # - # source://yard//lib/yard/code_objects/base.rb#436 + # source://yard//lib/yard/code_objects/base.rb#437 def type; end # @return [Symbol] the visibility of an object (:public, :private, :protected) @@ -2944,7 +2957,7 @@ class YARD::CodeObjects::Base # @see #copy_to # @since 0.8.0 # - # source://yard//lib/yard/code_objects/base.rb#583 + # source://yard//lib/yard/code_objects/base.rb#587 def copyable_attributes; end private @@ -2954,10 +2967,10 @@ class YARD::CodeObjects::Base # @param source [String] the source code to format # @return [String] formatted source # - # source://yard//lib/yard/code_objects/base.rb#595 + # source://yard//lib/yard/code_objects/base.rb#599 def format_source(source); end - # source://yard//lib/yard/code_objects/base.rb#602 + # source://yard//lib/yard/code_objects/base.rb#606 def translate_docstring(locale); end class << self @@ -4808,7 +4821,7 @@ YARD::Docstring::META_MATCH = T.let(T.unsafe(nil), Regexp) # # == Subclassing Notes # -# The DocstringParser can be subclassed and subtituted during parsing by +# The DocstringParser can be subclassed and substituted during parsing by # setting the {Docstring.default_parser} attribute with the name of the # subclass. This allows developers to change the way docstrings are # parsed, allowing for completely different docstring syntaxes. @@ -6888,7 +6901,7 @@ class YARD::Handlers::Ruby::MixinHandler < ::YARD::Handlers::Ruby::Base # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#25 def process_mixin(mixin); end - # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#43 + # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#50 def recipient(mixin); end end @@ -7113,7 +7126,7 @@ class YARD::I18n::Locale def name; end # @param message [String] the translation target message. - # @return [String] translated message. If tarnslation isn't + # @return [String] translated message. If translation isn't # registered, the +message+ is returned. # @since 0.8.2 # @@ -7142,7 +7155,7 @@ end # # source://yard//lib/yard/i18n/message.rb#10 class YARD::I18n::Message - # Creates a trasnlate target message for message ID +id+. + # Creates a translate target message for message ID +id+. # # @param id [String] the message ID of the translate target message. # @return [Message] a new instance of Message @@ -7183,7 +7196,7 @@ class YARD::I18n::Message # source://yard//lib/yard/i18n/message.rb#19 def comments; end - # @return [String] the message ID of the trnslation target message. + # @return [String] the message ID of the translation target message. # @since 0.8.1 # # source://yard//lib/yard/i18n/message.rb#12 @@ -7241,7 +7254,7 @@ class YARD::I18n::Messages # source://yard//lib/yard/i18n/messages.rb#20 def each(&block); end - # Registers a {Message}, the mssage ID of which is +id+. If + # Registers a {Message}, the message ID of which is +id+. If # corresponding +Message+ is already registered, the previously # registered object is returned. # @@ -7343,7 +7356,7 @@ class YARD::I18n::PotGenerator # # Locations of the +Message+ are used to generate the reference # line that is started with "#: ". +relative_base_path+ passed - # when the generater is created is prepended to each path in location. + # when the generator is created is prepended to each path in location. # # Comments of the +Message+ are used to generate the # translator-comment line that is started with "# ". @@ -7702,7 +7715,7 @@ class YARD::Logger < ::Logger # source://yard//lib/yard/logging.rb#201 def format_log(sev, _time, _prog, msg); end - # source://logger/1.5.3/logger.rb#682 + # source://logger/1.6.0/logger.rb#684 def print_no_newline(msg); end class << self @@ -7812,7 +7825,7 @@ class YARD::Options # # @example Setting an option with Hash syntax # options[:format] = :html # equivalent to: options.format = :html - # @param key [Symbol, String] the optin to set + # @param key [Symbol, String] the option to set # @param value [Object] the value to set for the option # @return [Object] the value being set # @@ -10039,7 +10052,7 @@ end # source://yard//lib/yard/parser/ruby/ast_node.rb#479 class YARD::Parser::Ruby::MethodDefinitionNode < ::YARD::Parser::Ruby::AstNode - def block(*_arg0); end + def block(n = T.unsafe(nil)); end # @return [Boolean] # @@ -10171,490 +10184,490 @@ class YARD::Parser::Ruby::RipperParser < ::Ripper # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29 def frozen_string_line; end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_BEGIN(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_CHAR(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_END(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on___end__(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_alias(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_alias_error(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_arg_ambiguous(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_arg_paren(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_args_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_args_add_block(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_args_add_star(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_args_forward(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#149 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 def on_args_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_aryptn(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_assign(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_assign_error(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_assoc_splat(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_backref(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_backtick(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_begin(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_binary(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_block_var(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_blockarg(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_brace_block(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_break(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_call(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_case(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_class(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_class_name_error(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_comma(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_command(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_command_call(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_const(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_const_path_field(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_const_ref(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_cvar(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_def(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_defined(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_defs(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_do_block(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_dot2(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_dot3(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_else(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_elsif(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_embexpr_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_embexpr_end(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_embvar(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_ensure(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_excessed_comma(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_fcall(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_field(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_float(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_fndptn(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_for(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_gvar(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_heredoc_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_heredoc_dedent(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_heredoc_end(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_hshptn(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_ident(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_if(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#443 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 def on_if_mod(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_ifop(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#216 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#222 def on_ignored_nl(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_ignored_sp(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_imaginary(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_in(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_int(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_ivar(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#203 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#209 def on_kw(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_kwrest_param(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_label_end(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_lbrace(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_lparen(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_magic_comment(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_massign(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_method_add_arg(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_method_add_block(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_mlhs_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_mlhs_add_post(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_mlhs_add_star(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#149 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 def on_mlhs_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_mlhs_paren(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_module(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_mrhs_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_mrhs_add_star(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#149 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 def on_mrhs_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_mrhs_new_from_args(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_next(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#216 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#222 def on_nl(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_nokw_param(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#203 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#209 def on_op(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_opassign(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_operator_ambiguous(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_param_error(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_paren(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_period(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#468 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 def on_qsymbols_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_qsymbols_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#456 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 def on_qsymbols_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#468 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 def on_qwords_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_qwords_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#456 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 def on_qwords_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_rational(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_rbrace(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_redo(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_regexp_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_regexp_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_regexp_end(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_regexp_literal(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#149 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 def on_regexp_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_rescue_mod(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_rest_param(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_retry(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_return(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_return0(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_rparen(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_sclass(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_semicolon(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_stmts_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#149 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 def on_stmts_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_string_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_string_concat(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_string_dvar(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_string_embexpr(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_super(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_symbeg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_symbol(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_symbol_literal(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#468 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 def on_symbols_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_symbols_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#456 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 def on_symbols_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_tlambda(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_tlambeg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_top_const_field(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_tstring_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_tstring_content(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_tstring_end(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_undef(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_unless(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#443 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 def on_unless_mod(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_until(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#443 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 def on_until_mod(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_var_alias(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_var_field(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_var_ref(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_vcall(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_when(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_while(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#443 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 def on_while_mod(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_word_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#149 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 def on_word_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#468 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 def on_words_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_words_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#456 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 def on_words_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_words_sep(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_xstring_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_xstring_literal(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#149 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 def on_xstring_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_yield(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_yield0(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_zsuper(*args); end # @since 0.5.6 @@ -10681,195 +10694,195 @@ class YARD::Parser::Ruby::RipperParser < ::Ripper # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#661 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#667 def add_comment(line, node = T.unsafe(nil), before_node = T.unsafe(nil), into = T.unsafe(nil)); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#265 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#271 def add_token(token, data); end # @return [Boolean] # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#605 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#611 def comment_starts_line?(charno); end # @raise [ParserSyntaxError] # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#600 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#606 def compile_error(msg); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#687 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#693 def freeze_tree(node = T.unsafe(nil)); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#614 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#620 def insert_comments; end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#371 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#377 def on_aref(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#379 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#385 def on_aref_field(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#385 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#391 def on_array(other); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#346 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#352 def on_assoc_new(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#358 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#364 def on_assoclist_from_args(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#354 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#360 def on_bare_assoc_hash(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#341 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#347 def on_body_stmt(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#341 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#347 def on_bodystmt(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#536 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#542 def on_comment(comment); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#435 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#441 def on_const_path_ref(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#413 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#419 def on_dyna_symbol(sym); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#586 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#592 def on_embdoc(text); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#580 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#586 def on_embdoc_beg(text); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#591 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#597 def on_embdoc_end(text); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#350 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#356 def on_hash(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#528 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#534 def on_label(data); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#491 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#497 def on_lambda(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#403 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#409 def on_lbracket(tok); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#509 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#515 def on_params(*args); end # @raise [ParserSyntaxError] # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#600 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#606 def on_parse_error(msg); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#337 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#343 def on_program(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#408 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#414 def on_rbracket(tok); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#500 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#506 def on_rescue(exc, *args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#226 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#232 def on_sp(tok); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#495 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#501 def on_string_content(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#478 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#484 def on_string_literal(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#423 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#429 def on_top_const_ref(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#362 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#368 def on_unary(op, val); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#505 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#511 def on_void_stmt; end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#231 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#237 def visit_event(node); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#245 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#251 def visit_event_arr(node); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#253 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#259 def visit_ns_token(token, data, ast_token = T.unsafe(nil)); end end @@ -10878,6 +10891,11 @@ end # source://yard//lib/yard/parser/ruby/ruby_parser.rb#133 YARD::Parser::Ruby::RipperParser::AST_TOKENS = T.let(T.unsafe(nil), Array) +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#136 +YARD::Parser::Ruby::RipperParser::COMMENT_SKIP_NODE_TYPES = T.let(T.unsafe(nil), Array) + # @since 0.5.6 # # source://yard//lib/yard/parser/ruby/ruby_parser.rb#78 @@ -11095,10 +11113,10 @@ class YARD::Parser::SourceParser # @since 0.5.6 # - # source://yard//lib/yard/parser/source_parser.rb#516 + # source://yard//lib/yard/parser/source_parser.rb#515 def parser_class; end - # source://yard//lib/yard/parser/source_parser.rb#501 + # source://yard//lib/yard/parser/source_parser.rb#500 def parser_type=(value); end # Guesses the parser type to use depending on the file extension. @@ -11106,14 +11124,14 @@ class YARD::Parser::SourceParser # @param filename [String] the filename to use to guess the parser type # @return [Symbol] a parser type that matches the filename # - # source://yard//lib/yard/parser/source_parser.rb#509 + # source://yard//lib/yard/parser/source_parser.rb#508 def parser_type_for_filename(filename); end # Runs a {Handlers::Processor} object to post process the parsed statements. # # @return [void] # - # source://yard//lib/yard/parser/source_parser.rb#491 + # source://yard//lib/yard/parser/source_parser.rb#490 def post_process; end class << self @@ -11983,7 +12001,7 @@ class YARD::RegistryResolver # # @since 0.9.1 # - # source://yard//lib/yard/registry_resolver.rb#180 + # source://yard//lib/yard/registry_resolver.rb#181 def collect_namespaces(object); end # Performs a lexical lookup from a namespace for a path and a type hint. @@ -12004,20 +12022,20 @@ class YARD::RegistryResolver # occurrences of separator tokens # @since 0.9.1 # - # source://yard//lib/yard/registry_resolver.rb#205 + # source://yard//lib/yard/registry_resolver.rb#206 def split_on_separators_match; end # @return [Regexp] the regexp match of the default separator # @since 0.9.1 # - # source://yard//lib/yard/registry_resolver.rb#193 + # source://yard//lib/yard/registry_resolver.rb#194 def starts_with_default_separator_match; end # @return [Regexp] the regexp that matches strings starting with # a separator # @since 0.9.1 # - # source://yard//lib/yard/registry_resolver.rb#199 + # source://yard//lib/yard/registry_resolver.rb#200 def starts_with_separator_match; end # return [Boolean] if the obj's type matches the provided type. @@ -12724,6 +12742,16 @@ class YARD::Server::Adapter end end +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#16 +YARD::Server::CR = T.let(T.unsafe(nil), String) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#18 +YARD::Server::CRLF = T.let(T.unsafe(nil), String) + # Commands implement specific kinds of server responses which are routed # to by the {Router} class. To implement a custom command, subclass {Commands::Base}. # @@ -12885,7 +12913,7 @@ class YARD::Server::Commands::Base # def run # self.body = 'ERROR! The System is down!' # self.status = 500 - # self.headers['Conten-Type'] = 'text/plain' + # self.headers['Content-Type'] = 'text/plain' # end # end # @raise [NotImplementedError] @@ -13331,7 +13359,7 @@ end # # source://yard//lib/yard/server/commands/root_request_command.rb#6 class YARD::Server::Commands::RootRequestCommand < ::YARD::Server::Commands::Base - include ::WEBrick::HTTPUtils + include ::YARD::Server::HTTPUtils include ::YARD::Server::Commands::StaticFileHelpers # @since 0.6.0 @@ -13410,7 +13438,7 @@ end # # source://yard//lib/yard/server/commands/static_file_command.rb#6 class YARD::Server::Commands::StaticFileCommand < ::YARD::Server::Commands::LibraryCommand - include ::WEBrick::HTTPUtils + include ::YARD::Server::HTTPUtils include ::YARD::Server::Commands::StaticFileHelpers # @since 0.6.0 @@ -13434,9 +13462,9 @@ YARD::Server::Commands::StaticFileCommand::STATIC_PATHS = T.let(T.unsafe(nil), A # # @since 0.6.0 # -# source://yard//lib/yard/server/commands/static_file_helpers.rb#9 +# source://yard//lib/yard/server/commands/static_file_helpers.rb#8 module YARD::Server::Commands::StaticFileHelpers - include ::WEBrick::HTTPUtils + include ::YARD::Server::HTTPUtils # Serves an empty favicon. # @@ -13445,7 +13473,7 @@ module YARD::Server::Commands::StaticFileHelpers # @return [Boolean] # @since 0.6.0 # - # source://yard//lib/yard/server/commands/static_file_helpers.rb#15 + # source://yard//lib/yard/server/commands/static_file_helpers.rb#14 def favicon?; end # Attempts to route a path to a static template file. @@ -13454,20 +13482,20 @@ module YARD::Server::Commands::StaticFileHelpers # @return [void] # @since 0.6.0 # - # source://yard//lib/yard/server/commands/static_file_helpers.rb#27 + # source://yard//lib/yard/server/commands/static_file_helpers.rb#26 def static_template_file?; end private # @since 0.6.0 # - # source://yard//lib/yard/server/commands/static_file_helpers.rb#43 + # source://yard//lib/yard/server/commands/static_file_helpers.rb#42 def find_file(adapter, url); end class << self # @since 0.6.0 # - # source://yard//lib/yard/server/commands/static_file_helpers.rb#43 + # source://yard//lib/yard/server/commands/static_file_helpers.rb#42 def find_file(adapter, url); end end end @@ -13607,6 +13635,470 @@ end # source://yard//lib/yard/server/adapter.rb#6 class YARD::Server::FinishRequest < ::RuntimeError; end +# HTTPUtils provides utility methods for working with the HTTP protocol. +# +# This module is generally used internally by WEBrick +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#25 +module YARD::Server::HTTPUtils + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#443 + def _escape(str, regex); end + + # :stopdoc: + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#441 + def _make_regex(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#442 + def _make_regex!(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#449 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#223 + def dequote(str); end + + # Escapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#467 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#508 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#481 + def escape_form(str); end + + # Escapes path +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#497 + def escape_path(str); end + + # Loads Apache-compatible mime.types in +file+. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#112 + 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. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#134 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#395 + def parse_form_data(io, boundary); end + + # Parses an HTTP header +raw+ into a hash of header fields with an Array + # of values. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#145 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#371 + def parse_query(str); end + + # Parses q values in +value+ as used in Accept headers. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#202 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#184 + def parse_range_header(ranges_specifier); end + + # Quotes and escapes quotes in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#233 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#175 + def split_header_value(str); end + + # Unescapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#474 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#490 + def unescape_form(str); end + + class << self + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#443 + def _escape(str, regex); end + + # :stopdoc: + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#441 + def _make_regex(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#442 + def _make_regex!(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#449 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#223 + def dequote(str); end + + # Escapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#467 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#508 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#481 + def escape_form(str); end + + # Escapes path +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#497 + def escape_path(str); end + + # Loads Apache-compatible mime.types in +file+. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#112 + 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. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#134 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#395 + def parse_form_data(io, boundary); end + + # Parses an HTTP header +raw+ into a hash of header fields with an Array + # of values. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#145 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#371 + def parse_query(str); end + + # Parses q values in +value+ as used in Accept headers. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#202 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#184 + def parse_range_header(ranges_specifier); end + + # Quotes and escapes quotes in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#233 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#175 + def split_header_value(str); end + + # Unescapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#474 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#490 + def unescape_form(str); end + end +end + +# Default mime types +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#47 +YARD::Server::HTTPUtils::DefaultMimeTypes = T.let(T.unsafe(nil), Hash) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#459 +YARD::Server::HTTPUtils::ESCAPED = T.let(T.unsafe(nil), Regexp) + +# Stores multipart form data. FormData objects are created when +# WEBrick::HTTPUtils.parse_form_data is called. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#242 +class YARD::Server::HTTPUtils::FormData < ::String + # Creates a new FormData object. + # + # +args+ is an Array of form data entries. One FormData will be created + # for each entry. + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you + # + # @return [FormData] a new instance of FormData + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#267 + def initialize(*args); end + + # Adds +str+ to this FormData which may be the body, a header or a + # header entry. + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#300 + def <<(str); end + + # Retrieves the header at the first entry in +key+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#286 + def [](*key); end + + # Adds +data+ at the end of the chain of entries + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#320 + def append_data(data); end + + # Yields each entry in this FormData + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#335 + def each_data; end + + # The filename of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#254 + def filename; end + + # The filename of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#254 + def filename=(_arg0); end + + # Returns all the FormData as an Array + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#347 + def list; end + + # The name of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#249 + def name; end + + # The name of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#249 + def name=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#256 + def next_data=(_arg0); end + + # Returns all the FormData as an Array + # A FormData will behave like an Array + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#347 + def to_ary; end + + # This FormData's body + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#363 + def to_s; end + + protected + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#256 + def next_data; end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#244 +YARD::Server::HTTPUtils::FormData::EmptyHeader = T.let(T.unsafe(nil), Hash) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#243 +YARD::Server::HTTPUtils::FormData::EmptyRawHeader = T.let(T.unsafe(nil), Array) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#458 +YARD::Server::HTTPUtils::NONASCII = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#456 +YARD::Server::HTTPUtils::UNESCAPED = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#457 +YARD::Server::HTTPUtils::UNESCAPED_FORM = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#460 +YARD::Server::HTTPUtils::UNESCAPED_PCHAR = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#17 +YARD::Server::LF = T.let(T.unsafe(nil), String) + # This exception is raised when {LibraryVersion#prepare!} fails, or discovers # that the library is not "prepared" to be served by # @@ -13927,32 +14419,32 @@ class YARD::Server::NotFoundError < ::RuntimeError; end # # @since 0.6.0 # -# source://yard//lib/yard/server/rack_adapter.rb#44 +# source://yard//lib/yard/server/rack_adapter.rb#52 class YARD::Server::RackAdapter < ::YARD::Server::Adapter - include ::WEBrick::HTTPUtils + include ::YARD::Server::HTTPUtils # Responds to Rack requests and builds a response with the {Router}. # # @return [Array(Numeric,Hash,Array)] the Rack-style response # @since 0.6.0 # - # source://yard//lib/yard/server/rack_adapter.rb#49 + # source://yard//lib/yard/server/rack_adapter.rb#57 def call(env); end - # Starts the +Rack::Server+. This method will pass control to the server and + # Starts the Rack server. This method will pass control to the server and # block. # # @return [void] # @since 0.6.0 # - # source://yard//lib/yard/server/rack_adapter.rb#62 + # source://yard//lib/yard/server/rack_adapter.rb#70 def start; end private # @since 0.6.0 # - # source://yard//lib/yard/server/rack_adapter.rb#71 + # source://yard//lib/yard/server/rack_adapter.rb#79 def print_start_message(server); end end @@ -13967,7 +14459,7 @@ end # at the example below. # @since 0.6.0 # -# source://yard//lib/yard/server/rack_adapter.rb#17 +# source://yard//lib/yard/server/rack_adapter.rb#25 class YARD::Server::RackMiddleware # Creates a new Rack-based middleware for serving YARD documentation. # @@ -13979,15 +14471,18 @@ class YARD::Server::RackMiddleware # @return [RackMiddleware] a new instance of RackMiddleware # @since 0.6.0 # - # source://yard//lib/yard/server/rack_adapter.rb#27 + # source://yard//lib/yard/server/rack_adapter.rb#35 def initialize(app, opts = T.unsafe(nil)); end # @since 0.6.0 # - # source://yard//lib/yard/server/rack_adapter.rb#33 + # source://yard//lib/yard/server/rack_adapter.rb#41 def call(env); end end +# source://yard//lib/yard/server/rack_adapter.rb#8 +YARD::Server::RackServer = Rackup::Server + # A router class implements the logic used to recognize a request for a specific # URL and run specific {Commands::Base commands}. # @@ -14288,7 +14783,7 @@ YARD::TEMPLATE_ROOT = T.let(T.unsafe(nil), String) # Namespace for Tag components # -# source://yard//lib/yard/autoload.rb#247 +# source://yard//lib/yard/autoload.rb#248 module YARD::Tags; end # Defines an attribute with a given name, using indented block data as the @@ -15765,10 +16260,10 @@ class YARD::Tags::Tag 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 - # if no types are provided or parseable. + # if no types are provided or parsable. # # @return [String] a plain English description of the associated types - # @return [nil] if no types are provided or not parseable + # @return [nil] if no types are provided or not parsable # # source://yard//lib/yard/tags/tag.rb#65 def explain_types; end @@ -15844,22 +16339,22 @@ class YARD::Tags::TagFormatError < ::RuntimeError; end class YARD::Tags::TypesExplainer class << self # Provides a plain English summary of the type specification, or nil - # if no types are provided or parseable. + # if no types are provided or parsable. # # @param types [Array] a list of types to parse and summarize # @return [String] a plain English description of the associated types - # @return [nil] if no types are provided or not parseable + # @return [nil] if no types are provided or not parsable # # source://yard//lib/yard/tags/types_explainer.rb#9 def explain(*types); end # Provides a plain English summary of the type specification, or nil - # if no types are provided or parseable. + # if no types are provided or parsable. # # @param types [Array] a list of types to parse and summarize - # @raise [SyntaxError] if the types are not parseable + # @raise [SyntaxError] if the types are not parsable # @return [String] a plain English description of the associated types - # @return [nil] if no types are provided or not parseable + # @return [nil] if no types are provided or not parsable # # source://yard//lib/yard/tags/types_explainer.rb#17 def explain!(*types); end @@ -16022,7 +16517,7 @@ end # Namespace for templating system # -# source://yard//lib/yard/autoload.rb#270 +# source://yard//lib/yard/autoload.rb#271 module YARD::Templates; end # This module manages all creation, handling and rendering of {Template} @@ -16175,7 +16670,7 @@ end # Namespace for template helpers # -# source://yard//lib/yard/autoload.rb#271 +# source://yard//lib/yard/autoload.rb#272 module YARD::Templates::Helpers; end # The base helper module included in all templates. @@ -16810,7 +17305,7 @@ end # Namespace for markup providers # -# source://yard//lib/yard/autoload.rb#272 +# source://yard//lib/yard/autoload.rb#273 module YARD::Templates::Helpers::Markup; end # source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#13 diff --git a/sorbet/rbi/gems/zeitwerk@2.6.8.rbi b/sorbet/rbi/gems/zeitwerk@2.6.13.rbi similarity index 88% rename from sorbet/rbi/gems/zeitwerk@2.6.8.rbi rename to sorbet/rbi/gems/zeitwerk@2.6.13.rbi index ffa7e49bc..e5fc153ba 100644 --- a/sorbet/rbi/gems/zeitwerk@2.6.8.rbi +++ b/sorbet/rbi/gems/zeitwerk@2.6.13.rbi @@ -8,11 +8,11 @@ module Kernel private - # source://zeitwerk//lib/zeitwerk/kernel.rb#27 + # source://zeitwerk//lib/zeitwerk/kernel.rb#23 def require(path); end class << self - # source://zeitwerk//lib/zeitwerk/kernel.rb#27 + # source://zeitwerk//lib/zeitwerk/kernel.rb#23 def require(path); end end end @@ -22,7 +22,7 @@ module Zeitwerk class << self # This is a dangerous method. # - # source://zeitwerk//lib/zeitwerk.rb#20 + # source://zeitwerk//lib/zeitwerk.rb#21 def with_loader; end end end @@ -87,7 +87,7 @@ module Zeitwerk::ExplicitNamespace end end -# source://zeitwerk//lib/zeitwerk/gem_inflector.rb#5 +# source://zeitwerk//lib/zeitwerk/gem_inflector.rb#4 class Zeitwerk::GemInflector < ::Zeitwerk::Inflector # @return [GemInflector] a new instance of GemInflector # @@ -120,6 +120,10 @@ class Zeitwerk::GemLoader < ::Zeitwerk::Loader # # source://zeitwerk//lib/zeitwerk/gem_loader.rb#14 def __new(root_file, namespace:, warn_on_extra_files:); end + + private + + def new(*_arg0); end end end @@ -169,7 +173,7 @@ module Zeitwerk::Internal def internal(method_name); end end -# source://zeitwerk//lib/zeitwerk/loader.rb#6 +# source://zeitwerk//lib/zeitwerk/loader.rb#7 class Zeitwerk::Loader include ::Zeitwerk::RealModName include ::Zeitwerk::Loader::Callbacks @@ -181,27 +185,32 @@ class Zeitwerk::Loader # @return [Loader] a new instance of Loader # - # source://zeitwerk//lib/zeitwerk/loader.rb#98 + # source://zeitwerk//lib/zeitwerk/loader.rb#99 def initialize; end - # source://zeitwerk//lib/zeitwerk/loader.rb#42 + # source://zeitwerk//lib/zeitwerk/loader.rb#43 def __autoloaded_dirs; end - # source://zeitwerk//lib/zeitwerk/loader.rb#32 + # source://zeitwerk//lib/zeitwerk/loader.rb#33 def __autoloads; end - # source://zeitwerk//lib/zeitwerk/loader.rb#76 + # source://zeitwerk//lib/zeitwerk/loader.rb#77 def __namespace_dirs; end - # source://zeitwerk//lib/zeitwerk/loader.rb#260 + # source://zeitwerk//lib/zeitwerk/loader.rb#310 def __shadowed_file?(file); end - # source://zeitwerk//lib/zeitwerk/loader.rb#87 + # source://zeitwerk//lib/zeitwerk/loader.rb#88 def __shadowed_files; end - # source://zeitwerk//lib/zeitwerk/loader.rb#58 + # source://zeitwerk//lib/zeitwerk/loader.rb#59 def __to_unload; end + # @raise [Zeitwerk::Error] + # + # source://zeitwerk//lib/zeitwerk/loader.rb#234 + def cpath_expected_at(path); end + # Unloads all loaded code, and calls setup again so that the loader is able # to pick any changes in the file system. # @@ -210,12 +219,12 @@ class Zeitwerk::Loader # # @raise [Zeitwerk::Error] # - # source://zeitwerk//lib/zeitwerk/loader.rb#221 + # source://zeitwerk//lib/zeitwerk/loader.rb#223 def reload; end # Sets autoloads in the root namespaces. # - # source://zeitwerk//lib/zeitwerk/loader.rb#117 + # source://zeitwerk//lib/zeitwerk/loader.rb#119 def setup; end # Removes loaded constants and configured autoloads. @@ -229,7 +238,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#143 + # source://zeitwerk//lib/zeitwerk/loader.rb#145 def unload; end # Says if the given constant path would be unloaded on reload. This @@ -237,31 +246,31 @@ class Zeitwerk::Loader # # @return [Boolean] # - # source://zeitwerk//lib/zeitwerk/loader.rb#235 + # source://zeitwerk//lib/zeitwerk/loader.rb#285 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#243 + # source://zeitwerk//lib/zeitwerk/loader.rb#293 def unloadable_cpaths; end # This is a dangerous method. # - # source://zeitwerk//lib/zeitwerk/loader.rb#251 + # source://zeitwerk//lib/zeitwerk/loader.rb#301 def unregister; end private - # source://zeitwerk//lib/zeitwerk/loader.rb#425 + # source://zeitwerk//lib/zeitwerk/loader.rb#456 def autoload_file(parent, cname, file); end # @return [Boolean] # - # source://zeitwerk//lib/zeitwerk/loader.rb#483 + # source://zeitwerk//lib/zeitwerk/loader.rb#514 def autoload_path_set_by_me_for?(parent, cname); end - # source://zeitwerk//lib/zeitwerk/loader.rb#395 + # source://zeitwerk//lib/zeitwerk/loader.rb#426 def autoload_subdir(parent, cname, subdir); end # We keep track of autoloaded directories to remove them from the registry @@ -270,7 +279,7 @@ 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#42 + # source://zeitwerk//lib/zeitwerk/loader.rb#43 def autoloaded_dirs; end # Maps absolute paths for which an autoload has been set ---and not @@ -281,18 +290,24 @@ class Zeitwerk::Loader # "/Users/fxn/blog/app/models/hotel/pricing.rb" => [Hotel, :Pricing] # ... # - # source://zeitwerk//lib/zeitwerk/loader.rb#32 + # source://zeitwerk//lib/zeitwerk/loader.rb#33 def autoloads; end - # Returns the value of attribute mutex. + # source://zeitwerk//lib/zeitwerk/loader.rb#493 + def define_autoload(parent, cname, abspath); end + + # source://zeitwerk//lib/zeitwerk/loader.rb#410 + def define_autoloads_for_dir(dir, parent); end + + # Returns the value of attribute dirs_autoload_monitor. # - # source://zeitwerk//lib/zeitwerk/loader.rb#91 - def mutex; end + # source://zeitwerk//lib/zeitwerk/loader.rb#96 + def dirs_autoload_monitor; end - # Returns the value of attribute mutex2. + # Returns the value of attribute mutex. # - # source://zeitwerk//lib/zeitwerk/loader.rb#95 - def mutex2; end + # source://zeitwerk//lib/zeitwerk/loader.rb#92 + def mutex; end # Maps namespace constant paths to their respective directories. # @@ -308,31 +323,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#76 + # source://zeitwerk//lib/zeitwerk/loader.rb#77 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#451 + # 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#497 + # source://zeitwerk//lib/zeitwerk/loader.rb#528 def raise_if_conflicting_directory(dir); end - # source://zeitwerk//lib/zeitwerk/loader.rb#492 + # source://zeitwerk//lib/zeitwerk/loader.rb#523 def register_explicit_namespace(cpath); end - # source://zeitwerk//lib/zeitwerk/loader.rb#522 + # source://zeitwerk//lib/zeitwerk/loader.rb#552 def run_on_unload_callbacks(cpath, value, abspath); end - # source://zeitwerk//lib/zeitwerk/loader.rb#462 - def set_autoload(parent, cname, abspath); end - - # source://zeitwerk//lib/zeitwerk/loader.rb#360 - def set_autoloads_in_dir(dir, parent); end - - # source://zeitwerk//lib/zeitwerk/loader.rb#260 + # source://zeitwerk//lib/zeitwerk/loader.rb#310 def shadowed_file?(file); end # A shadowed file is a file managed by this loader that is ignored when @@ -342,7 +351,7 @@ 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#87 + # source://zeitwerk//lib/zeitwerk/loader.rb#88 def shadowed_files; end # Stores metadata needed for unloading. Its entries look like this: @@ -357,44 +366,44 @@ class Zeitwerk::Loader # 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#58 + # source://zeitwerk//lib/zeitwerk/loader.rb#59 def to_unload; end - # source://zeitwerk//lib/zeitwerk/loader.rb#529 + # source://zeitwerk//lib/zeitwerk/loader.rb#559 def unload_autoload(parent, cname); end - # source://zeitwerk//lib/zeitwerk/loader.rb#535 + # source://zeitwerk//lib/zeitwerk/loader.rb#565 def unload_cref(parent, cname); 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#354 + # source://zeitwerk//lib/zeitwerk/loader.rb#404 def all_dirs; end # Returns the value of attribute default_logger. # - # source://zeitwerk//lib/zeitwerk/loader.rb#270 + # source://zeitwerk//lib/zeitwerk/loader.rb#320 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#270 + # source://zeitwerk//lib/zeitwerk/loader.rb#320 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#326 + # source://zeitwerk//lib/zeitwerk/loader.rb#376 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#340 + # source://zeitwerk//lib/zeitwerk/loader.rb#390 def eager_load_namespace(mod); end # This is a shortcut for @@ -412,7 +421,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#288 + # source://zeitwerk//lib/zeitwerk/loader.rb#338 def for_gem(warn_on_extra_files: T.unsafe(nil)); end # This is a shortcut for @@ -430,7 +439,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#309 + # source://zeitwerk//lib/zeitwerk/loader.rb#359 def for_gem_extension(namespace); end end end @@ -438,21 +447,13 @@ end # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#3 module Zeitwerk::Loader::Callbacks include ::Zeitwerk::RealModName + extend ::Zeitwerk::Internal - # Invoked from our decorated Kernel#require when a managed directory is - # autoloaded. - # - # @private - # - # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#34 - def on_dir_autoloaded(dir); end + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#41 + def __on_dir_autoloaded(dir); end - # Invoked from our decorated Kernel#require when a managed file is autoloaded. - # - # @private - # # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#10 - def on_file_autoloaded(file); end + def __on_file_autoloaded(file); end # Invoked when a class or module is created or reopened, either from the # tracer or from module autovivification. If the namespace has matching @@ -460,12 +461,18 @@ module Zeitwerk::Loader::Callbacks # # @private # - # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#73 + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#81 def on_namespace_loaded(namespace); end private - # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#84 + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#41 + 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 def run_on_load_callbacks(cpath, value, abspath); end end @@ -738,7 +745,7 @@ module Zeitwerk::Loader::EagerLoad # @raise [Zeitwerk::SetupRequired] # - # source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#72 + # source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#74 def eager_load_namespace(mod); end # Loads the given Ruby file. @@ -750,7 +757,7 @@ module Zeitwerk::Loader::EagerLoad # # @raise [Zeitwerk::Error] # - # source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#114 + # source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#116 def load_file(path); end private @@ -758,13 +765,13 @@ module Zeitwerk::Loader::EagerLoad # The caller is responsible for making sure `namespace` is the namespace that # corresponds to `dir`. # - # source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#154 + # source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#160 def actual_eager_load_dir(dir, namespace, force: T.unsafe(nil)); end # 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#189 + # source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#195 def eager_load_child_namespace(child, child_name, root_dir, root_namespace); end end @@ -782,6 +789,11 @@ module Zeitwerk::Loader::Helpers # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#134 def cget(parent, cname); end + # @raise [Zeitwerk::NameError] + # + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#149 + 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. # @@ -826,12 +838,21 @@ module Zeitwerk::Loader::Helpers def walk_up(abspath); end end -# source://zeitwerk//lib/zeitwerk/loader.rb#20 +# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#144 +module Zeitwerk::Loader::Helpers::CNAME_VALIDATOR; end + +# source://zeitwerk//lib/zeitwerk/loader.rb#21 Zeitwerk::Loader::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) # source://zeitwerk//lib/zeitwerk/error.rb#13 class Zeitwerk::NameError < ::NameError; end +# source://zeitwerk//lib/zeitwerk/null_inflector.rb#1 +class Zeitwerk::NullInflector + # source://zeitwerk//lib/zeitwerk/null_inflector.rb#2 + def camelize(basename, _abspath); end +end + # source://zeitwerk//lib/zeitwerk/real_mod_name.rb#3 module Zeitwerk::RealModName # source://zeitwerk//lib/zeitwerk/real_mod_name.rb#14 diff --git a/sorbet/rbi/shims/activemodel.rbi b/sorbet/rbi/shims/activemodel.rbi index 7a2e761a6..fccddc5c6 100644 --- a/sorbet/rbi/shims/activemodel.rbi +++ b/sorbet/rbi/shims/activemodel.rbi @@ -6,6 +6,6 @@ module ActiveModel::Attributes::ClassMethods sig { returns(T::Hash[String, ActiveModel::Type::Value]) } def attribute_types; end - sig { returns(T::Array[ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher]) } - def attribute_method_matchers; end + sig { returns(T::Array[ActiveModel::AttributeMethods::ClassMethods::AttributeMethodPattern]) } + def attribute_method_patterns; end end diff --git a/sorbet/rbi/shims/activerecord_postgresql.rbi b/sorbet/rbi/shims/activerecord_postgresql.rbi index cf32e2fa0..aeff80110 100644 --- a/sorbet/rbi/shims/activerecord_postgresql.rbi +++ b/sorbet/rbi/shims/activerecord_postgresql.rbi @@ -1,5 +1,6 @@ # typed: strict # These constants are dynamically loaded only when connecting to postgresql +module ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Uuid; end module ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Array; end module ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Hstore; end diff --git a/sorbet/rbi/shims/activerecord_test_fxitures.rbi b/sorbet/rbi/shims/activerecord_test_fixtures.rbi similarity index 100% rename from sorbet/rbi/shims/activerecord_test_fxitures.rbi rename to sorbet/rbi/shims/activerecord_test_fixtures.rbi diff --git a/sorbet/rbi/shims/shellescape.rbi b/sorbet/rbi/shims/shellescape.rbi deleted file mode 100644 index b193c4062..000000000 --- a/sorbet/rbi/shims/shellescape.rbi +++ /dev/null @@ -1,6 +0,0 @@ -# typed: true - -class String - def shellescape(); end - def shellsplit(); end -end diff --git a/spec/helpers/mock_dir.rb b/spec/helpers/mock_dir.rb deleted file mode 100644 index f3d620198..000000000 --- a/spec/helpers/mock_dir.rb +++ /dev/null @@ -1,78 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -require "fileutils" - -module Tapioca - # A directory used to represent either a mock project or a mock gem - class MockDir - extend T::Sig - - # The absolute path to this directory - sig { returns(String) } - attr_reader :path - - # Create a new directory at `path` - # - # Warning: if `path` already exists, it will be deleted. - sig { params(path: String).void } - def initialize(path) - @path = path - FileUtils.rm_rf(@path) - FileUtils.mkdir_p(@path) - end - - # Create an absolute path from `self.path` and `rel_path` - sig { params(rel_path: String).returns(String) } - def absolute_path(rel_path) - (Pathname.new(path) / rel_path).to_s - end - - # Write `contents` in the file at `rel_path` - # - # All parent directories up to `rel_path` will be created. - # If `append` is `true`, the the `contents` will be appended to the file. - sig { params(rel_path: String, contents: String, append: T::Boolean).void } - def write(rel_path, contents = "", append: false) - path = absolute_path(rel_path) - FileUtils.mkdir_p(File.dirname(path)) - File.write(path, contents, mode: append ? "a" : "w") - end - - # Read contents from the file at `rel_path` - sig { params(rel_path: String).returns(String) } - def read(rel_path) - File.read(absolute_path(rel_path)) - end - - # Does `rel_path` point to an existing file? - sig { params(rel_path: String).returns(T::Boolean) } - def file?(rel_path) - File.file?(absolute_path(rel_path)) - end - - # List all files (recursively) in this directory - sig { returns(T::Array[String]) } - def files - Dir.glob("#{@path}/**/*").sort - end - - # Remove the file or directory at `rel_path` - sig { params(rel_path: String).void } - def remove(rel_path) - FileUtils.rm_rf(absolute_path(rel_path)) - end - - # Move the file or directory from `from_rel_path` to `to_rel_path` - sig { params(from_rel_path: String, to_rel_path: String).void } - def move(from_rel_path, to_rel_path) - FileUtils.mv(absolute_path(from_rel_path), absolute_path(to_rel_path)) - end - - # Delete this directory and all its contents - sig { void } - def destroy - FileUtils.rm_rf(path) - end - end -end diff --git a/spec/helpers/mock_gem.rb b/spec/helpers/mock_gem.rb index 0e92cfffa..1aa278fdd 100644 --- a/spec/helpers/mock_gem.rb +++ b/spec/helpers/mock_gem.rb @@ -1,11 +1,9 @@ # typed: strict # frozen_string_literal: true -require "helpers/mock_dir" - module Tapioca # A mock gem used for testing purposes - class MockGem < MockDir + class MockGem < Spoom::Context extend T::Sig # The gem's name @@ -32,13 +30,13 @@ def initialize(path, name, version, dependencies = []) # Write `contents` to the gem's gemspec sig { params(contents: String).void } def gemspec(contents) - write("#{name}.gemspec", contents) + write!("#{name}.gemspec", contents) end # The line to add to a project gemfile to require this gem sig { returns(String) } def gemfile_line - "gem '#{name}', path: '#{path}'" + "gem '#{name}', path: '#{absolute_path}'" end # The default gemspec contents string diff --git a/spec/helpers/mock_project.rb b/spec/helpers/mock_project.rb index b1c3b9cce..a6d62a965 100644 --- a/spec/helpers/mock_project.rb +++ b/spec/helpers/mock_project.rb @@ -6,25 +6,19 @@ module Tapioca # A mock project used for testing purposes - class MockProject < MockDir + class MockProject < Spoom::Context extend T::Sig # Path to Tapioca's source files TAPIOCA_PATH = T.let((Pathname.new(__FILE__) / ".." / ".." / "..").to_s, String) - # Write `contents` to the gemfile in this project - sig { params(contents: String, append: T::Boolean).void } - def gemfile(contents, append: false) - write("Gemfile", contents, append: append) - end - # Add a gem requirement to this project's gemfile from a `MockGem` sig { params(gem: MockGem, require: T.nilable(T.any(FalseClass, String))).void } def require_mock_gem(gem, require: nil) line = gem.gemfile_line.dup line << ", require: #{require.inspect}" unless require.nil? line << "\n" - gemfile(line, append: true) + write_gemfile!(line, append: true) end # Add a gem requirement to this project's gemfile from a real gem @@ -34,7 +28,7 @@ def require_real_gem(name, version = nil, require: nil) line << ", \"#{version}\"" if version line << ", require: #{require.inspect}" unless require.nil? line << "\n" - gemfile(line, append: true) + write_gemfile!(line, append: true) end # Default Gemfile contents requiring only Tapioca @@ -47,12 +41,6 @@ def tapioca_gemfile GEMFILE end - # Write `contents` to the `sorbet/config` file of this project - sig { params(contents: String, append: T::Boolean).void } - def sorbet_config(contents, append: false) - write("sorbet/config", contents, append: append) - end - sig { returns(String) } def bundler_version @bundler_version || Bundler::VERSION @@ -62,35 +50,20 @@ def bundler_version def reset_bundler_version return unless @bundler_version - bundle_install - end - - class ExecResult < T::Struct - extend T::Sig - - const :out, String - const :err, String - const :status, T::Boolean - - sig { returns(String) } - def to_s - <<~STR - ########## STDOUT ########## - #{out.empty? ? "" : out} - ########## STDERR ########## - #{err.empty? ? "" : err} - ########## STATUS: #{status} ########## - STR - end + bundle_install! end # Run `bundle install` in this project context (unbundled env) - sig { params(version: T.nilable(String)).returns(ExecResult) } - def bundle_install(version: nil) + sig do + override(allow_incompatible: true) # rubocop:disable Sorbet/AllowIncompatibleOverride + .params(version: T.nilable(String)) + .returns(Spoom::ExecResult) + end + def bundle_install!(version: nil) @bundler_version = T.let(version, T.nilable(String)) opts = {} - opts[:chdir] = path + opts[:chdir] = absolute_path Bundler.with_unbundled_env do cmd = # prerelease versions are not always available on rubygems.org @@ -104,18 +77,22 @@ def bundle_install(version: nil) end out, err, status = Open3.capture3(cmd, opts) - ExecResult.new(out: out, err: err, status: T.must(status.success?)) + Spoom::ExecResult.new(out: out, err: err, status: T.must(status.success?), exit_code: T.must(status.exitstatus)) end end # Run a `command` with `bundle exec` in this project context (unbundled env) - sig { params(command: String, env: T::Hash[String, String]).returns(ExecResult) } + sig do + override(allow_incompatible: true) # rubocop:disable Sorbet/AllowIncompatibleOverride + .params(command: String, env: T::Hash[String, String]) + .returns(Spoom::ExecResult) + end def bundle_exec(command, env = {}) opts = {} - opts[:chdir] = path + opts[:chdir] = absolute_path Bundler.with_unbundled_env do out, err, status = Open3.capture3(env, ["bundle", "_#{bundler_version}_", "exec", command].join(" "), opts) - ExecResult.new(out: out, err: err, status: T.must(status.success?)) + Spoom::ExecResult.new(out: out, err: err, status: T.must(status.success?), exit_code: T.must(status.exitstatus)) end end @@ -125,16 +102,16 @@ def bundle_exec(command, env = {}) command: String, enforce_typechecking: T::Boolean, exclude: T::Array[String], - ).returns(ExecResult) + ).returns(Spoom::ExecResult) end def tapioca(command, enforce_typechecking: true, exclude: tapioca_dependencies) exec_command = ["tapioca", command] - if command.start_with?(/gem/) + if command.start_with?("gem") exec_command << "--workers=1" unless command.match?("--workers") exec_command << "--no-doc" unless command.match?("--doc") exec_command << "--no-loc" unless command.match?("--loc") exec_command << "--exclude #{exclude.join(" ")}" unless command.match?("--exclude") || exclude.empty? - elsif command.start_with?(/dsl/) + elsif command.start_with?("dsl") exec_command << "--workers=1" unless command.match?("--workers") end diff --git a/spec/rails_spec_helper.rb b/spec/rails_spec_helper.rb new file mode 100644 index 000000000..82bdb0fa4 --- /dev/null +++ b/spec/rails_spec_helper.rb @@ -0,0 +1,37 @@ +# typed: true +# frozen_string_literal: true + +module Tapioca + module RailsSpecHelper + extend Tapioca::Helpers::Test::Content + + class << self + def load_active_storage + add_ruby_file("application.rb", <<~RUBY) + ENV["DATABASE_URL"] = "sqlite3::memory:" + + require "active_storage/engine" + + class Dummy < Rails::Application + config.eager_load = true + config.active_storage.service = :local + if ActiveRecord::Base.respond_to?(:legacy_connection_handling=) + config.active_record.legacy_connection_handling = false + end + config.active_storage.service_configurations = { + local: { + service: "Disk", + root: Rails.root.join("storage") + } + } + config.logger = Logger.new('/dev/null') + end + # The defaults are loaded with the first two version numbers (e.g. "7.1") + defaults_version = Rails.gem_version.segments.take(2).join(".") + Rails.configuration.load_defaults(defaults_version) + Rails.application.initialize! + RUBY + end + end + end +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 730ce614b..d781ce4c0 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -14,6 +14,7 @@ require "spec_reporter" require "dsl_spec_helper" require "spec_with_project" +require "rails_spec_helper" backtrace_filter = Minitest::ExtensibleBacktraceFilter.default_filter backtrace_filter.add_filter(%r{gems/sorbet-runtime}) diff --git a/spec/spec_with_project.rb b/spec/spec_with_project.rb index e695f66fc..e8f1e272d 100644 --- a/spec/spec_with_project.rb +++ b/spec/spec_with_project.rb @@ -23,7 +23,7 @@ def initialize(*args) attr_reader :project after(:all) do - project.destroy + project.destroy! end # Spec helpers @@ -46,7 +46,7 @@ def initialize(*args) end def mock_project(sorbet_dependency: true, &block) project = MockProject.new("#{TEST_TMP_PATH}/#{spec_name}/project") - project.gemfile(project.tapioca_gemfile) + project.write_gemfile!(project.tapioca_gemfile) # Pin Sorbet static and runtime version to the current one in this project project.require_real_gem( "sorbet-static-and-runtime", @@ -78,6 +78,7 @@ def mock_project(sorbet_dependency: true, &block) end def mock_gem(name, version, dependencies: [], path: default_gem_path(name), &block) gem = MockGem.new(path, name, version, dependencies) + gem.mkdir! gem.gemspec(gem.default_gemspec_contents) gem.instance_exec(gem, &block) if block gem @@ -105,35 +106,45 @@ def refute_project_file_exist(path) sig { params(strictness: String, file: String).void } def assert_file_strictness(strictness, file) - assert_equal(strictness, Spoom::Sorbet::Sigils.file_strictness(@project.absolute_path(file))) + assert_equal(strictness, Spoom::Sorbet::Sigils.file_strictness(@project.absolute_path_to(file))) end - sig { params(result: MockProject::ExecResult).void } + sig { params(result: Spoom::ExecResult).void } def assert_empty_stdout(result) - assert_empty(result.out) + assert_empty(result.out, result.to_s) end - sig { params(result: MockProject::ExecResult).void } + sig { params(result: Spoom::ExecResult).void } def assert_empty_stderr(result) - assert_empty(result.err) + assert_empty(result.err, result.to_s) end - sig { params(result: MockProject::ExecResult).void } + sig { params(result: Spoom::ExecResult).void } def assert_success_status(result) - assert(result.status) + assert(result.status, result.to_s) end - sig { params(result: MockProject::ExecResult).void } + sig { params(result: Spoom::ExecResult).void } def refute_success_status(result) - refute(result.status) + refute(result.status, result.to_s) end - sig { params(result: MockProject::ExecResult, snippet: String).void } + sig { params(text: String, result: Spoom::ExecResult).void } + def assert_stdout_equals(text, result) + assert_equal(text, result.out, result.to_s) + end + + sig { params(result: Spoom::ExecResult, snippet: String).void } def assert_stdout_includes(result, snippet) assert_includes(result.out, snippet, result.to_s) end - sig { params(result: MockProject::ExecResult, snippet: String).void } + sig { params(text: String, result: Spoom::ExecResult).void } + def assert_stderr_equals(text, result) + assert_equal(text, result.err, result.to_s) + end + + sig { params(result: Spoom::ExecResult, snippet: String).void } def assert_stderr_includes(result, snippet) assert_includes(result.err, snippet, result.to_s) end diff --git a/spec/tapioca/cli/annotations_spec.rb b/spec/tapioca/cli/annotations_spec.rb index cf729941e..4a6b64d8f 100644 --- a/spec/tapioca/cli/annotations_spec.rb +++ b/spec/tapioca/cli/annotations_spec.rb @@ -7,19 +7,19 @@ module Tapioca class AnnotationsTest < SpecWithProject describe "cli::annotations" do before(:all) do - @project.bundle_install + @project.bundle_install! end after do - @project.remove("sorbet/rbi/annotations") + @project.remove!("sorbet/rbi/annotations") end it "does nothing if the repo is empty" do repo = create_repo({}) - result = @project.tapioca("annotations --sources #{repo.path}") + result = @project.tapioca("annotations --sources #{repo.absolute_path}") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Retrieving index from central repository... Done Listing gems from Gemfile.lock... Done Removing annotations for gems that have been removed... Nothing to do @@ -27,18 +27,19 @@ class AnnotationsTest < SpecWithProject OUT assert_success_status(result) + refute(File.directory?(@project.absolute_path_to("sorbet/rbi/annotations"))) - repo.destroy + repo.destroy! end it "removes local annotations if they do not appear in the Gemfile.lock" do repo = create_repo({}) - @project.write("sorbet/rbi/annotations/rbi.rbi", "# typed: true") - @project.write("sorbet/rbi/annotations/bar.rbi", "# typed: true") - @project.write("sorbet/rbi/annotations/foo.rbi", "# typed: true") + @project.write!("sorbet/rbi/annotations/rbi.rbi", "# typed: true") + @project.write!("sorbet/rbi/annotations/bar.rbi", "# typed: true") + @project.write!("sorbet/rbi/annotations/foo.rbi", "# typed: true") - result = @project.tapioca("annotations --sources #{repo.path}") + result = @project.tapioca("annotations --sources #{repo.absolute_path}") assert_stdout_includes(result, "remove sorbet/rbi/annotations/bar.rbi") assert_stdout_includes(result, "remove sorbet/rbi/annotations/foo.rbi") @@ -46,7 +47,7 @@ class AnnotationsTest < SpecWithProject assert_success_status(result) - repo.destroy + repo.destroy! end it "gets annotations from the central repo" do @@ -68,7 +69,7 @@ class AnnotationForFoo; end RBI }) - result = @project.tapioca("annotations --sources #{repo.path}") + result = @project.tapioca("annotations --sources #{repo.absolute_path}") assert_stdout_includes(result, "create sorbet/rbi/annotations/rbi.rbi") assert_stdout_includes(result, "create sorbet/rbi/annotations/spoom.rbi") @@ -94,10 +95,13 @@ class AnnotationForRBI; end class AnnotationForSpoom; end RBI + assert_project_file_equal("sorbet/rbi/annotations/.gitattributes", <<~CONTENT) + **/*.rbi linguist-vendored=true + CONTENT refute_project_file_exist("sorbet/rbi/annotations/foo.rbi") assert_success_status(result) - repo.destroy + repo.destroy! end it "gets index from the central repo using the default source" do @@ -140,17 +144,17 @@ class AnnotationForSpoom RBI }) - result = @project.tapioca("annotations --sources #{repo.path}") + result = @project.tapioca("annotations --sources #{repo.absolute_path}") assert_stderr_includes(result, <<~ERR) Can't import RBI file for `spoom` as it contains errors: - Error: unexpected token $end (-:4:0-4:0) + Error: unexpected end of file, assuming it is closing the parent top level context. expected an `end` to close the `class` statement. (-:4:0) ERR refute_includes(result.out, "create sorbet/rbi/annotations/spoom.rbi") refute_project_file_exist("sorbet/rbi/annotations/spoom.rbi") - repo.destroy + repo.destroy! end it "gets annotations from multiple repos" do @@ -176,7 +180,7 @@ class AnnotationForSpoom; end repo_name: "repo2", ) - result = @project.tapioca("annotations --sources #{repo1.path} #{repo2.path}") + result = @project.tapioca("annotations --sources #{repo1.absolute_path} #{repo2.absolute_path}") assert_stdout_includes(result, "create sorbet/rbi/annotations/rbi.rbi") assert_stdout_includes(result, "create sorbet/rbi/annotations/spoom.rbi") @@ -203,8 +207,8 @@ class AnnotationForSpoom; end assert_success_status(result) - repo1.destroy - repo2.destroy + repo1.destroy! + repo2.destroy! end it "merges annotations from multiple repos" do @@ -236,7 +240,7 @@ def baz; end repo_name: "repo2", ) - result = @project.tapioca("annotations --sources #{repo1.path} #{repo2.path}") + result = @project.tapioca("annotations --sources #{repo1.absolute_path} #{repo2.absolute_path}") assert_stdout_includes(result, "create sorbet/rbi/annotations/rbi.rbi") @@ -256,8 +260,8 @@ def baz; end assert_success_status(result) - repo1.destroy - repo2.destroy + repo1.destroy! + repo2.destroy! end it "handles conflicts with annotations from multiple repos" do @@ -291,7 +295,7 @@ def baz; end repo_name: "repo2", ) - result = @project.tapioca("annotations --sources #{repo1.path} #{repo2.path}") + result = @project.tapioca("annotations --sources #{repo1.absolute_path} #{repo2.absolute_path}") assert_stderr_includes(result, <<~ERR) Can't import RBI file for `spoom` as it contains conflicts: @@ -302,8 +306,8 @@ def baz; end refute_includes(result.out, "create sorbet/rbi/annotations/spoom.rbi") refute_project_file_exist("sorbet/rbi/annotations/spoom.rbi") - repo1.destroy - repo2.destroy + repo1.destroy! + repo2.destroy! end it "errors if passing both --no-netrc and --netrc-file" do @@ -328,7 +332,7 @@ class AnnotationForSpoom; end RBI }) - result = @project.tapioca("annotations --sources #{repo.path} --typed-overrides rbi:ignore spoom:true") + result = @project.tapioca("annotations --sources #{repo.absolute_path} --typed-overrides rbi:ignore spoom:true") assert_project_annotation_equal("sorbet/rbi/annotations/rbi.rbi", <<~RBI) # typed: ignore @@ -352,23 +356,24 @@ class AnnotationForSpoom; end assert_success_status(result) - repo.destroy + repo.destroy! end end private - sig { params(annotations: T::Hash[String, String], repo_name: String).returns(MockDir) } + sig { params(annotations: T::Hash[String, String], repo_name: String).returns(Spoom::Context) } def create_repo(annotations, repo_name: "repo") - repo = MockDir.new("#{@project.path}/#{repo_name}") + repo = Spoom::Context.new("#{@project.absolute_path}/#{repo_name}") + repo.mkdir! index = {} annotations.each do |gem_name, rbi_content| index[gem_name] = {} - repo.write("rbi/annotations/#{gem_name}.rbi", rbi_content) + repo.write!("rbi/annotations/#{gem_name}.rbi", rbi_content) end - repo.write("index.json", index.to_json) + repo.write!("index.json", index.to_json) repo end diff --git a/spec/tapioca/cli/backwards_compatibility_spec.rb b/spec/tapioca/cli/backwards_compatibility_spec.rb index 0e87769c7..45d3b5e8c 100644 --- a/spec/tapioca/cli/backwards_compatibility_spec.rb +++ b/spec/tapioca/cli/backwards_compatibility_spec.rb @@ -6,187 +6,14 @@ module Tapioca class BackwardsCompatibilitySpec < SpecWithProject - GENERIC_TYPE_RB = <<~RB - class GenericType - extend T::Sig - extend T::Generic - - Elem = type_member - - sig { params(foo: Elem).void } - def foo(foo) - end - end - RB - before do @project = mock_project(sorbet_dependency: false) end after do - @project.destroy + @project.destroy! end - describe "ObjectSpace WeakMap generation" do - before do - foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", <<~RB) - Foo = ObjectSpace::WeakMap.new - RB - end - @project.require_mock_gem(foo) - end - - it "is a generic type with Sorbet < 0.5.10587" do - @project.require_real_gem("sorbet-static", "0.5.10585") - @project.bundle_install - - @project.tapioca("gem foo") - - assert_project_file_equal("sorbet/rbi/gems/foo@0.0.1.rbi", <<~RBI) - # typed: true - - # DO NOT EDIT MANUALLY - # This is an autogenerated file for types exported from the `foo` gem. - # Please instead update this file by running `bin/tapioca gem foo`. - - Foo = T.let(T.unsafe(nil), ObjectSpace::WeakMap[T.untyped]) - RBI - end - - it "is a non-generic type with Sorbet >= 0.5.10587" do - @project.require_real_gem("sorbet-static", "0.5.10588") - @project.bundle_install - - @project.tapioca("gem foo") - - assert_project_file_equal("sorbet/rbi/gems/foo@0.0.1.rbi", <<~RBI) - # typed: true - - # DO NOT EDIT MANUALLY - # This is an autogenerated file for types exported from the `foo` gem. - # Please instead update this file by running `bin/tapioca gem foo`. - - Foo = T.let(T.unsafe(nil), ObjectSpace::WeakMap) - RBI - end - end - - describe "serialization of T::Class and T.anything" do - before do - foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", <<~RB) - Foo = T.type_alias { T.any(T.anything, T::Class[String]) } - RB - end - @project.require_mock_gem(foo) - end - - it "serializes both as untyped with Sorbet < 0.5.10782" do - @project.require_real_gem("sorbet-static", "0.5.10780") - @project.bundle_install - - @project.tapioca("gem foo") - - assert_project_file_equal("sorbet/rbi/gems/foo@0.0.1.rbi", <<~RBI) - # typed: true - - # DO NOT EDIT MANUALLY - # This is an autogenerated file for types exported from the `foo` gem. - # Please instead update this file by running `bin/tapioca gem foo`. - - Foo = T.type_alias { T.untyped } - RBI - end - - it "serializes T::Class as untyped with Sorbet >= 0.5.10782 and < 0.5.10820" do - @project.require_real_gem("sorbet-static", "0.5.10800") - @project.bundle_install - - @project.tapioca("gem foo") - - assert_project_file_equal("sorbet/rbi/gems/foo@0.0.1.rbi", <<~RBI) - # typed: true - - # DO NOT EDIT MANUALLY - # This is an autogenerated file for types exported from the `foo` gem. - # Please instead update this file by running `bin/tapioca gem foo`. - - Foo = T.type_alias { T.any(T.anything, T.untyped) } - RBI - end - - it "serializes them correctly with Sorbet >= 0.5.10820" do - @project.require_real_gem("sorbet-static", "0.5.10860") - @project.bundle_install - - @project.tapioca("gem foo") - - assert_project_file_equal("sorbet/rbi/gems/foo@0.0.1.rbi", <<~RBI) - # typed: true - - # DO NOT EDIT MANUALLY - # This is an autogenerated file for types exported from the `foo` gem. - # Please instead update this file by running `bin/tapioca gem foo`. - - Foo = T.type_alias { T.any(T.anything, T::Class[::String]) } - RBI - end - end - - describe "compilation of constants of generic types" do - before do - @expected_out = <<~OUT - Compiled generic_type - create sorbet/rbi/gems/generic_type@0.0.1.rbi - OUT - - @expected_rbi = <<~RBI - # typed: true - - # DO NOT EDIT MANUALLY - # This is an autogenerated file for types exported from the `generic_type` gem. - # Please instead update this file by running `bin/tapioca gem generic_type`. - - class GenericType - extend T::Generic - - Elem = type_member - - sig { params(foo: Elem).void } - def foo(foo); end - end - RBI - - generic_type = mock_gem("generic_type", "0.0.1") do - write("lib/generic_type.rb", GENERIC_TYPE_RB) - end - @project.require_mock_gem(generic_type) - end - - it "must succeed on sorbet-runtime < 0.5.10554" do - @project.require_real_gem("sorbet-static-and-runtime", "=0.5.10539") - @project.bundle_install - - result = @project.tapioca("gem generic_type", enforce_typechecking: false) - - assert_stdout_includes(result, @expected_out) - assert_project_file_equal("sorbet/rbi/gems/generic_type@0.0.1.rbi", @expected_rbi) - assert_empty_stderr(result) - assert_success_status(result) - end - - it "must succeed on sorbet-runtime >= 0.5.10554" do - @project.require_real_gem("sorbet-static-and-runtime", ">=0.5.10554") - @project.bundle_install - - result = @project.tapioca("gem generic_type", enforce_typechecking: false) - - assert_stdout_includes(result, @expected_out) - assert_project_file_equal("sorbet/rbi/gems/generic_type@0.0.1.rbi", @expected_rbi) - assert_empty_stderr(result) - assert_success_status(result) - end - end + # Add backcompat tests here end end diff --git a/spec/tapioca/cli/check_shims_spec.rb b/spec/tapioca/cli/check_shims_spec.rb index ae057b451..beb1a58c3 100644 --- a/spec/tapioca/cli/check_shims_spec.rb +++ b/spec/tapioca/cli/check_shims_spec.rb @@ -7,666 +7,663 @@ module Tapioca class CheckShimsTest < SpecWithProject describe "cli::check-shims" do after do - @project.remove("sorbet/rbi") + @project.remove!("sorbet/rbi") end - describe "when Sorbet version is >= 0.5.9818" do - before(:all) do - @project.bundle_install - end - - it "does nothing when there is no shims to check" do - @project.write("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) - class Foo - attr_reader :foo - end - RBI - - @project.write("sorbet/rbi/dsl/foo.rbi", <<~RBI) - class Foo - attr_reader :bar - end - RBI - - result = @project.tapioca("check-shims --no-payload") - - assert_equal(<<~OUT, result.out) - No shim RBIs to check - OUT - - assert_success_status(result) - end - - it "does nothing when there is no duplicates" do - @project.write("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) - class Foo - attr_reader :foo - - class Baz; end - end - RBI - - @project.write("sorbet/rbi/shims/foo.rbi", <<~RBI) - class Foo - attr_reader :bar - - class Baz - def baz; end - end - end - RBI - - result = @project.tapioca("check-shims --no-payload") + before(:all) do + @project.bundle_install! + end - assert_equal(<<~OUT, strip_timer(result.out)) - Loading shim RBIs from sorbet/rbi/shims... Done - Loading gem RBIs from sorbet/rbi/gems... Done - Looking for duplicates... Done + it "does nothing when there is no shims to check" do + @project.write!("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) + class Foo + attr_reader :foo + end + RBI - No duplicates found in shim RBIs - OUT + @project.write!("sorbet/rbi/dsl/foo.rbi", <<~RBI) + class Foo + attr_reader :bar + end + RBI - assert_success_status(result) - end + result = @project.tapioca("check-shims --no-payload") - it "detects duplicated definitions between shim and generated RBIs" do - @project.write("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) - class Foo - attr_reader :foo - end - RBI + assert_stdout_equals(<<~OUT, result) + No shim RBIs to check + OUT - @project.write("sorbet/rbi/dsl/bar.rbi", <<~RBI) - module Bar - def bar; end - end - RBI + assert_success_status(result) + end - @project.write("sorbet/rbi/dsl/baz.rbi", <<~RBI) - module Baz; end - RBI + it "does nothing when there is no duplicates" do + @project.write!("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) + class Foo + attr_reader :foo - @project.write("sorbet/rbi/shims/foo.rbi", <<~RBI) - class Foo - attr_reader :foo - end - RBI + class Baz; end + end + RBI - @project.write("sorbet/rbi/shims/bar.rbi", <<~RBI) - module Bar - def bar; end - end - RBI + @project.write!("sorbet/rbi/shims/foo.rbi", <<~RBI) + class Foo + attr_reader :bar - @project.write("sorbet/rbi/shims/baz.rbi", <<~RBI) - module Baz + class Baz def baz; end end - RBI - - result = @project.tapioca("check-shims --no-payload") - - assert_equal(<<~ERR, result.err) - - Duplicated RBI for ::Bar#bar: - * sorbet/rbi/shims/bar.rbi:2:2-2:14 - * sorbet/rbi/dsl/bar.rbi:2:2-2:14 - - Duplicated RBI for ::Foo#foo: - * sorbet/rbi/shims/foo.rbi:2:2-2:18 - * sorbet/rbi/gems/foo@1.0.0.rbi:2:2-2:18 - - Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi - ERR - - refute_success_status(result) - end - - it "ignores duplicates that have a signature" do - @project.write("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) - class Foo - def foo; end - end - RBI - - @project.write("sorbet/rbi/shims/foo.rbi", <<~RBI) - class Foo - sig { void } - def foo; end - end - RBI - - result = @project.tapioca("check-shims --no-payload") - assert_success_status(result) - end - - it "ignores duplicates that have a different signature" do - @project.write("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) - class Foo - sig { void } - def foo; end - end - RBI - - @project.write("sorbet/rbi/shims/foo.rbi", <<~RBI) - class Foo - sig { returns(Integer) } - def foo; end - end - RBI - - result = @project.tapioca("check-shims --no-payload") - assert_success_status(result) - end - - it "detects duplicates that have the same signature" do - @project.write("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) - class Foo - sig { params(x: Integer, y: String).returns(String) } - def foo(x, y); end - - sig { params(x: Integer, y: Integer).returns(String) } - def bar(x, y); end - - sig { params(x: Integer, y: Integer).returns(Integer) } - def baz(x, y); end - end - RBI - - @project.write("sorbet/rbi/shims/foo.rbi", <<~RBI) - class Foo - sig { params(x: Integer, y: String).returns(String) } - def foo(x, y); end - - sig { params(x: String, y: Integer).returns(String) } - def bar(x, y); end - - sig { params(x: Integer, y: Integer).returns(String) } - def baz(x, y); end - end - RBI - - result = @project.tapioca("check-shims --no-payload") - - assert_equal(<<~ERR, result.err) - - Duplicated RBI for ::Foo#foo: - * sorbet/rbi/shims/foo.rbi:3:2-3:20 - * sorbet/rbi/gems/foo@1.0.0.rbi:3:2-3:20 - - Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi - ERR - - refute_includes(result.err, "Duplicated RBI for ::Foo#bar") - refute_includes(result.err, "Duplicated RBI for ::Foo#baz") - - refute_success_status(result) - end - - it "detects duplicates from nodes with multiple definitions" do - @project.write("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) - class Foo - attr_reader :foo - end - RBI - - @project.write("sorbet/rbi/shims/foo.rbi", <<~RBI) - class Foo - attr_reader :foo, :bar - end - RBI + end + RBI - result = @project.tapioca("check-shims --no-payload") + result = @project.tapioca("check-shims --no-payload") - assert_equal(<<~ERR, result.err) + assert_equal(<<~OUT, strip_timer(result.out)) + Loading shim RBIs from sorbet/rbi/shims... Done + Loading gem RBIs from sorbet/rbi/gems... Done + Looking for duplicates... Done - Duplicated RBI for ::Foo#foo: - * sorbet/rbi/shims/foo.rbi:2:2-2:24 - * sorbet/rbi/gems/foo@1.0.0.rbi:2:2-2:18 + No duplicates found in shim RBIs + OUT - Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi - ERR - - refute_success_status(result) - end + assert_success_status(result) + end - it "detects duplicated includes and extends" do - @project.write("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) - module Bar; end + it "detects duplicated definitions between shim and generated RBIs" do + @project.write!("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) + class Foo + attr_reader :foo + end + RBI + + @project.write!("sorbet/rbi/dsl/bar.rbi", <<~RBI) + module Bar + def bar; end + end + RBI + + @project.write!("sorbet/rbi/dsl/baz.rbi", <<~RBI) + module Baz; end + RBI + + @project.write!("sorbet/rbi/shims/foo.rbi", <<~RBI) + class Foo + attr_reader :foo + end + RBI + + @project.write!("sorbet/rbi/shims/bar.rbi", <<~RBI) + module Bar + def bar; end + end + RBI + + @project.write!("sorbet/rbi/shims/baz.rbi", <<~RBI) + module Baz + def baz; end + end + RBI + + result = @project.tapioca("check-shims --no-payload") + + assert_stderr_equals(<<~ERR, result) + + Duplicated RBI for ::Bar#bar: + * sorbet/rbi/shims/bar.rbi:2:2-2:14 + * sorbet/rbi/dsl/bar.rbi:2:2-2:14 + + Duplicated RBI for ::Foo#foo: + * sorbet/rbi/shims/foo.rbi:2:2-2:18 + * sorbet/rbi/gems/foo@1.0.0.rbi:2:2-2:18 + + Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi + ERR + + refute_success_status(result) + end - class Foo - include Bar - extend Bar - mixes_in_class_methods Bar - requires_ancestor { Bar } - end + it "ignores duplicates that have a signature" do + @project.write!("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) + class Foo + def foo; end + end + RBI + + @project.write!("sorbet/rbi/shims/foo.rbi", <<~RBI) + class Foo + sig { void } + def foo; end + end + RBI + + result = @project.tapioca("check-shims --no-payload") + assert_success_status(result) + end - module Baz; end + it "ignores duplicates that have a different signature" do + @project.write!("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) + class Foo + sig { void } + def foo; end + end + RBI + + @project.write!("sorbet/rbi/shims/foo.rbi", <<~RBI) + class Foo + sig { returns(Integer) } + def foo; end + end + RBI + + result = @project.tapioca("check-shims --no-payload") + assert_success_status(result) + end - class Qux - # RBI does not attempt to resolve constants used in the mixins, so if the constant duplicated in the shim - # does not use the same namespace, Tapioca won't catch it. The following lines won't raise duplication - # errors. - include Baz - extend Baz - mixes_in_class_methods Baz - requires_ancestor { Baz } - end - RBI - - @project.write("sorbet/rbi/shims/foo.rbi", <<~RBI) - class Foo - include Bar - extend Bar - mixes_in_class_methods Bar - requires_ancestor { Bar } - end + it "detects duplicates that have the same signature" do + @project.write!("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) + class Foo + sig { params(x: Integer, y: String).returns(String) } + def foo(x, y); end - class Qux - include ::Baz - extend ::Baz - mixes_in_class_methods ::Baz - requires_ancestor { ::Baz } - end - RBI + sig { params(x: Integer, y: Integer).returns(String) } + def bar(x, y); end - result = @project.tapioca("check-shims --no-payload") + sig { params(x: Integer, y: Integer).returns(Integer) } + def baz(x, y); end + end + RBI - assert_equal(<<~ERR, result.err) + @project.write!("sorbet/rbi/shims/foo.rbi", <<~RBI) + class Foo + sig { params(x: Integer, y: String).returns(String) } + def foo(x, y); end - Duplicated RBI for ::Foo.include(Bar): - * sorbet/rbi/shims/foo.rbi:2:2-2:13 - * sorbet/rbi/gems/foo@1.0.0.rbi:4:2-4:13 + sig { params(x: String, y: Integer).returns(String) } + def bar(x, y); end - Duplicated RBI for ::Foo.extend(Bar): - * sorbet/rbi/shims/foo.rbi:3:2-3:12 - * sorbet/rbi/gems/foo@1.0.0.rbi:5:2-5:12 + sig { params(x: Integer, y: Integer).returns(String) } + def baz(x, y); end + end + RBI - Duplicated RBI for ::Foo.mixes_in_class_method(Bar): - * sorbet/rbi/shims/foo.rbi:4:2-4:28 - * sorbet/rbi/gems/foo@1.0.0.rbi:6:2-6:28 + result = @project.tapioca("check-shims --no-payload") - Duplicated RBI for ::Foo.requires_ancestor(Bar): - * sorbet/rbi/shims/foo.rbi:5:2-5:27 - * sorbet/rbi/gems/foo@1.0.0.rbi:7:2-7:27 + assert_stderr_equals(<<~ERR, result) - Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi - ERR + Duplicated RBI for ::Foo#foo: + * sorbet/rbi/shims/foo.rbi:3:2-3:20 + * sorbet/rbi/gems/foo@1.0.0.rbi:3:2-3:20 - refute_success_status(result) - end + Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi + ERR - it "detects duplicates from same shim file" do - @project.write("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) - class Foo - attr_reader :foo + refute_includes(result.err, "Duplicated RBI for ::Foo#bar") + refute_includes(result.err, "Duplicated RBI for ::Foo#baz") - class Baz; end - end - - class Bar; end - RBI + refute_success_status(result) + end - @project.write("sorbet/rbi/shims/foo.rbi", <<~RBI) - class Foo - attr_reader :foo, :bar - def foo; end + it "detects duplicates from nodes with multiple definitions" do + @project.write!("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) + class Foo + attr_reader :foo + end + RBI - class Baz; end - end + @project.write!("sorbet/rbi/shims/foo.rbi", <<~RBI) + class Foo + attr_reader :foo, :bar + end + RBI - class Bar; end - class Bar; end - RBI + result = @project.tapioca("check-shims --no-payload") - result = @project.tapioca("check-shims --no-payload") + assert_stderr_equals(<<~ERR, result) - assert_equal(<<~ERR, result.err) + Duplicated RBI for ::Foo#foo: + * sorbet/rbi/shims/foo.rbi:2:2-2:24 + * sorbet/rbi/gems/foo@1.0.0.rbi:2:2-2:18 - Duplicated RBI for ::Foo#foo: - * sorbet/rbi/shims/foo.rbi:2:2-2:24 - * sorbet/rbi/shims/foo.rbi:3:2-3:14 - * sorbet/rbi/gems/foo@1.0.0.rbi:2:2-2:18 + Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi + ERR - Duplicated RBI for ::Foo::Baz: - * sorbet/rbi/shims/foo.rbi:5:2-5:16 - * sorbet/rbi/gems/foo@1.0.0.rbi:4:2-4:16 + refute_success_status(result) + end - Duplicated RBI for ::Bar: - * sorbet/rbi/shims/foo.rbi:8:0-8:14 - * sorbet/rbi/shims/foo.rbi:9:0-9:14 - * sorbet/rbi/gems/foo@1.0.0.rbi:7:0-7:14 + it "detects duplicated includes and extends" do + @project.write!("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) + module Bar; end + + class Foo + include Bar + extend Bar + mixes_in_class_methods Bar + requires_ancestor { Bar } + end + + module Baz; end + + class Qux + # RBI does not attempt to resolve constants used in the mixins, so if the constant duplicated in the shim + # does not use the same namespace, Tapioca won't catch it. The following lines won't raise duplication + # errors. + include Baz + extend Baz + mixes_in_class_methods Baz + requires_ancestor { Baz } + end + RBI + + @project.write!("sorbet/rbi/shims/foo.rbi", <<~RBI) + class Foo + include Bar + extend Bar + mixes_in_class_methods Bar + requires_ancestor { Bar } + end + + class Qux + include ::Baz + extend ::Baz + mixes_in_class_methods ::Baz + requires_ancestor { ::Baz } + end + RBI + + result = @project.tapioca("check-shims --no-payload") + + assert_stderr_equals(<<~ERR, result) + + Duplicated RBI for ::Foo.include(Bar): + * sorbet/rbi/shims/foo.rbi:2:2-2:13 + * sorbet/rbi/gems/foo@1.0.0.rbi:4:2-4:13 + + Duplicated RBI for ::Foo.extend(Bar): + * sorbet/rbi/shims/foo.rbi:3:2-3:12 + * sorbet/rbi/gems/foo@1.0.0.rbi:5:2-5:12 + + Duplicated RBI for ::Foo.mixes_in_class_method(Bar): + * sorbet/rbi/shims/foo.rbi:4:2-4:28 + * sorbet/rbi/gems/foo@1.0.0.rbi:6:2-6:28 + + Duplicated RBI for ::Foo.requires_ancestor(Bar): + * sorbet/rbi/shims/foo.rbi:5:2-5:27 + * sorbet/rbi/gems/foo@1.0.0.rbi:7:2-7:27 + + Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi + ERR + + refute_success_status(result) + end - Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi - ERR + it "detects duplicates from same shim file" do + @project.write!("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) + class Foo + attr_reader :foo - refute_success_status(result) - end + class Baz; end + end - it "detects duplicates from Sorbet's payload" do - @project.write("sorbet/rbi/shims/core/object.rbi", <<~RBI) - class Object; end - RBI + class Bar; end + RBI - @project.write("sorbet/rbi/shims/core/string.rbi", <<~RBI) - class String - sig { returns(String) } - def capitalize(); end + @project.write!("sorbet/rbi/shims/foo.rbi", <<~RBI) + class Foo + attr_reader :foo, :bar + def foo; end - def some_method_that_is_not_defined_in_the_payload; end - end - RBI + class Baz; end + end - @project.write("sorbet/rbi/shims/stdlib/base64.rbi", <<~RBI) - module Base64 - sig { params(str: String).returns(String) } - def self.decode64(str); end + class Bar; end + class Bar; end + RBI - def self.some_method_that_is_not_defined_in_the_payload; end - end - RBI + result = @project.tapioca("check-shims --no-payload") - result = @project.tapioca("check-shims") + assert_stderr_equals(<<~ERR, result) - assert_equal(<<~OUT, strip_timer(result.out)) - Loading Sorbet payload... Done - Loading shim RBIs from sorbet/rbi/shims... Done - Looking for duplicates... Done - OUT + Duplicated RBI for ::Foo#foo: + * sorbet/rbi/shims/foo.rbi:2:2-2:24 + * sorbet/rbi/shims/foo.rbi:3:2-3:14 + * sorbet/rbi/gems/foo@1.0.0.rbi:2:2-2:18 - assert_equal(<<~ERR, result.err) + Duplicated RBI for ::Foo::Baz: + * sorbet/rbi/shims/foo.rbi:5:2-5:16 + * sorbet/rbi/gems/foo@1.0.0.rbi:4:2-4:16 - Duplicated RBI for ::Object: - * https://github.com/sorbet/sorbet/tree/master/rbi/core/object.rbi#L27 - * sorbet/rbi/shims/core/object.rbi:1:0-1:17 + Duplicated RBI for ::Bar: + * sorbet/rbi/shims/foo.rbi:8:0-8:14 + * sorbet/rbi/shims/foo.rbi:9:0-9:14 + * sorbet/rbi/gems/foo@1.0.0.rbi:7:0-7:14 - Duplicated RBI for ::String#capitalize: - * https://github.com/sorbet/sorbet/tree/master/rbi/core/string.rbi#L572 - * sorbet/rbi/shims/core/string.rbi:3:2-3:23 + Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi + ERR - Duplicated RBI for ::Base64::decode64: - * https://github.com/sorbet/sorbet/tree/master/rbi/stdlib/base64.rbi#L37 - * sorbet/rbi/shims/stdlib/base64.rbi:3:2-3:29 + refute_success_status(result) + end - Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi - ERR + it "detects duplicates from Sorbet's payload" do + @project.write!("sorbet/rbi/shims/core/object.rbi", <<~RBI) + class Object; end + RBI - refute_success_status(result) - end + @project.write!("sorbet/rbi/shims/core/string.rbi", <<~RBI) + class String + sig { returns(String) } + def capitalize(); end - it "checks shims with custom rbi dirs" do - @project.write("rbi/gem/foo@1.0.0.rbi", <<~RBI) - class Foo - def foo; end - end - RBI + def some_method_that_is_not_defined_in_the_payload; end + end + RBI - @project.write("rbi/dsl/foo.rbi", <<~RBI) - class Foo - def bar; end - end - RBI + @project.write!("sorbet/rbi/shims/stdlib/base64.rbi", <<~RBI) + module Base64 + sig { params(str: String).returns(String) } + def self.decode64(str); end - @project.write("rbi/shim/foo.rbi", <<~RBI) - class Foo - def foo; end - def bar; end - end + def self.some_method_that_is_not_defined_in_the_payload; end + end + RBI - module Baz - def baz; end - end - RBI + result = @project.tapioca("check-shims") - @project.write("rbi/todo.rbi", <<~RBI) - module Baz - def baz; end - end - RBI + assert_equal(<<~OUT, strip_timer(result.out)) + Loading Sorbet payload... Done + Loading shim RBIs from sorbet/rbi/shims... Done + Looking for duplicates... Done + OUT - result = @project.tapioca( - "check-shims --gem-rbi-dir=rbi/gem --dsl-rbi-dir=rbi/dsl --shim-rbi-dir=rbi/shim " \ - "--todo-rbi-file=rbi/todo.rbi --no-payload", - ) + assert_stderr_equals(<<~ERR, result) - assert_equal(<<~ERR, result.err) + Duplicated RBI for ::Object: + * https://github.com/sorbet/sorbet/tree/master/rbi/core/object.rbi#L27 + * https://github.com/sorbet/sorbet/tree/master/rbi/stdlib/json.rbi#L1060 + * sorbet/rbi/shims/core/object.rbi:1:0-1:17 - Duplicated RBI for ::Baz#baz: - * rbi/todo.rbi:2:2-2:14 - * rbi/shim/foo.rbi:7:2-7:14 + Duplicated RBI for ::String#capitalize: + * https://github.com/sorbet/sorbet/tree/master/rbi/core/string.rbi#L572 + * sorbet/rbi/shims/core/string.rbi:3:2-3:23 - Duplicated RBI for ::Foo#foo: - * rbi/shim/foo.rbi:2:2-2:14 - * rbi/gem/foo@1.0.0.rbi:2:2-2:14 + Duplicated RBI for ::Base64::decode64: + * https://github.com/sorbet/sorbet/tree/master/rbi/stdlib/base64.rbi#L37 + * sorbet/rbi/shims/stdlib/base64.rbi:3:2-3:29 - Duplicated RBI for ::Foo#bar: - * rbi/shim/foo.rbi:3:2-3:14 - * rbi/dsl/foo.rbi:2:2-2:14 + Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi + ERR - Please remove the duplicated definitions from rbi/shim and rbi/todo.rbi - ERR + refute_success_status(result) + end - refute_success_status(result) - end + it "checks shims with custom rbi dirs" do + @project.write!("rbi/gem/foo@1.0.0.rbi", <<~RBI) + class Foo + def foo; end + end + RBI + + @project.write!("rbi/dsl/foo.rbi", <<~RBI) + class Foo + def bar; end + end + RBI + + @project.write!("rbi/shim/foo.rbi", <<~RBI) + class Foo + def foo; end + def bar; end + end + + module Baz + def baz; end + end + RBI + + @project.write!("rbi/todo.rbi", <<~RBI) + module Baz + def baz; end + end + RBI + + result = @project.tapioca( + "check-shims --gem-rbi-dir=rbi/gem --dsl-rbi-dir=rbi/dsl --shim-rbi-dir=rbi/shim " \ + "--todo-rbi-file=rbi/todo.rbi --no-payload", + ) + + assert_stderr_equals(<<~ERR, result) + + Duplicated RBI for ::Baz#baz: + * rbi/todo.rbi:2:2-2:14 + * rbi/shim/foo.rbi:7:2-7:14 + + Duplicated RBI for ::Foo#foo: + * rbi/shim/foo.rbi:2:2-2:14 + * rbi/gem/foo@1.0.0.rbi:2:2-2:14 + + Duplicated RBI for ::Foo#bar: + * rbi/shim/foo.rbi:3:2-3:14 + * rbi/dsl/foo.rbi:2:2-2:14 + + Please remove the duplicated definitions from rbi/shim and rbi/todo.rbi + ERR + + refute_success_status(result) + end - it "skips files with parse errors" do - @project.write("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) - class Foo - attr_reader :foo - end - RBI + it "skips files with parse errors" do + @project.write!("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) + class Foo + attr_reader :foo + end + RBI - @project.write("sorbet/rbi/shims/foo.rbi", <<~RBI) - class Foo - foo { bar } - end - RBI + @project.write!("sorbet/rbi/shims/foo.rbi", <<~RBI) + class Foo + RBI - @project.write("sorbet/rbi/shims/bar.rbi", <<~RBI) - module Foo - def foo; end - end - RBI + @project.write!("sorbet/rbi/shims/bar.rbi", <<~RBI) + module Foo + def foo; end + end + RBI - result = @project.tapioca("check-shims --no-payload") + result = @project.tapioca("check-shims --no-payload") - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) - Warning: Unsupported block node type `foo` (sorbet/rbi/shims/foo.rbi:2:2-2:13) + Warning: unexpected end of file, assuming it is closing the parent top level context. expected an `end` to close the `class` statement. (sorbet/rbi/shims/foo.rbi:2:0) - Duplicated RBI for ::Foo#foo: - * sorbet/rbi/shims/bar.rbi:2:2-2:14 - * sorbet/rbi/gems/foo@1.0.0.rbi:2:2-2:18 + Duplicated RBI for ::Foo#foo: + * sorbet/rbi/shims/bar.rbi:2:2-2:14 + * sorbet/rbi/gems/foo@1.0.0.rbi:2:2-2:18 - Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi - ERR + Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi + ERR - refute_success_status(result) - end + refute_success_status(result) + end - it "detects duplicated definitions between shim and annotations" do - @project.write("sorbet/rbi/annotations/foo.rbi", <<~RBI) - class Foo - attr_reader :foo - end - RBI + it "detects duplicated definitions between shim and annotations" do + @project.write!("sorbet/rbi/annotations/foo.rbi", <<~RBI) + class Foo + attr_reader :foo + end + RBI - @project.write("sorbet/rbi/annotations/bar.rbi", <<~RBI) - module Bar - def bar; end - end - RBI + @project.write!("sorbet/rbi/annotations/bar.rbi", <<~RBI) + module Bar + def bar; end + end + RBI - @project.write("sorbet/rbi/annotations/baz.rbi", <<~RBI) - module Baz; end - RBI + @project.write!("sorbet/rbi/annotations/baz.rbi", <<~RBI) + module Baz; end + RBI - @project.write("sorbet/rbi/shims/foo.rbi", <<~RBI) - class Foo - attr_reader :foo - end - RBI + @project.write!("sorbet/rbi/shims/foo.rbi", <<~RBI) + class Foo + attr_reader :foo + end + RBI - @project.write("sorbet/rbi/shims/bar.rbi", <<~RBI) - module Bar - def bar; end - end - RBI + @project.write!("sorbet/rbi/shims/bar.rbi", <<~RBI) + module Bar + def bar; end + end + RBI - @project.write("sorbet/rbi/shims/baz.rbi", <<~RBI) - module Baz; end - RBI + @project.write!("sorbet/rbi/shims/baz.rbi", <<~RBI) + module Baz; end + RBI - result = @project.tapioca("check-shims --no-payload") + result = @project.tapioca("check-shims --no-payload") - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) - Duplicated RBI for ::Bar#bar: - * sorbet/rbi/shims/bar.rbi:2:2-2:14 - * sorbet/rbi/annotations/bar.rbi:2:2-2:14 + Duplicated RBI for ::Bar#bar: + * sorbet/rbi/shims/bar.rbi:2:2-2:14 + * sorbet/rbi/annotations/bar.rbi:2:2-2:14 - Duplicated RBI for ::Baz: - * sorbet/rbi/shims/baz.rbi:1:0-1:15 - * sorbet/rbi/annotations/baz.rbi:1:0-1:15 + Duplicated RBI for ::Baz: + * sorbet/rbi/shims/baz.rbi:1:0-1:15 + * sorbet/rbi/annotations/baz.rbi:1:0-1:15 - Duplicated RBI for ::Foo#foo: - * sorbet/rbi/shims/foo.rbi:2:2-2:18 - * sorbet/rbi/annotations/foo.rbi:2:2-2:18 + Duplicated RBI for ::Foo#foo: + * sorbet/rbi/shims/foo.rbi:2:2-2:18 + * sorbet/rbi/annotations/foo.rbi:2:2-2:18 - Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi - ERR + Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi + ERR - refute_success_status(result) - end + refute_success_status(result) + end - it "detects duplicated definitions between the TODO file and generated RBIs" do - @project.write("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) - class Foo - attr_reader :foo + it "detects duplicated definitions between the TODO file and generated RBIs" do + @project.write!("sorbet/rbi/gems/foo@1.0.0.rbi", <<~RBI) + class Foo + attr_reader :foo - class Baz; end - end - RBI + class Baz; end + end + RBI - @project.write("sorbet/rbi/dsl/bar.rbi", <<~RBI) - module Bar - def bar; end - end - RBI + @project.write!("sorbet/rbi/dsl/bar.rbi", <<~RBI) + module Bar + def bar; end + end + RBI - @project.write("sorbet/rbi/todo.rbi", <<~RBI) - class Foo - attr_reader :foo + @project.write!("sorbet/rbi/todo.rbi", <<~RBI) + class Foo + attr_reader :foo - class Baz; end - end + class Baz; end + end - module Bar - def bar; end - end - RBI + module Bar + def bar; end + end + RBI - result = @project.tapioca("check-shims --no-payload") + result = @project.tapioca("check-shims --no-payload") - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) - Duplicated RBI for ::Foo#foo: - * sorbet/rbi/todo.rbi:2:2-2:18 - * sorbet/rbi/gems/foo@1.0.0.rbi:2:2-2:18 + Duplicated RBI for ::Foo#foo: + * sorbet/rbi/todo.rbi:2:2-2:18 + * sorbet/rbi/gems/foo@1.0.0.rbi:2:2-2:18 - Duplicated RBI for ::Foo::Baz: - * sorbet/rbi/todo.rbi:4:2-4:16 - * sorbet/rbi/gems/foo@1.0.0.rbi:4:2-4:16 + Duplicated RBI for ::Foo::Baz: + * sorbet/rbi/todo.rbi:4:2-4:16 + * sorbet/rbi/gems/foo@1.0.0.rbi:4:2-4:16 - Duplicated RBI for ::Bar#bar: - * sorbet/rbi/todo.rbi:8:2-8:14 - * sorbet/rbi/dsl/bar.rbi:2:2-2:14 + Duplicated RBI for ::Bar#bar: + * sorbet/rbi/todo.rbi:8:2-8:14 + * sorbet/rbi/dsl/bar.rbi:2:2-2:14 - Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi - ERR + Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi + ERR - refute_success_status(result) - end + refute_success_status(result) + end - it "detects duplicated definitions between the TODO file and shims" do - @project.write("sorbet/rbi/shims/foo.rbi", <<~RBI) - class Foo - attr_reader :foo - end - RBI + it "detects duplicated definitions between the TODO file and shims" do + @project.write!("sorbet/rbi/shims/foo.rbi", <<~RBI) + class Foo + attr_reader :foo + end + RBI - @project.write("sorbet/rbi/shims/bar.rbi", <<~RBI) - module Bar - def bar; end - end - RBI + @project.write!("sorbet/rbi/shims/bar.rbi", <<~RBI) + module Bar + def bar; end + end + RBI - @project.write("sorbet/rbi/shims/baz.rbi", <<~RBI) - module Baz; end - RBI + @project.write!("sorbet/rbi/shims/baz.rbi", <<~RBI) + module Baz; end + RBI - @project.write("sorbet/rbi/todo.rbi", <<~RBI) - class Foo - attr_reader :foo - end + @project.write!("sorbet/rbi/todo.rbi", <<~RBI) + class Foo + attr_reader :foo + end - module Bar - def bar; end - end + module Bar + def bar; end + end - module Baz; end - RBI + module Baz; end + RBI - result = @project.tapioca("check-shims --no-payload") + result = @project.tapioca("check-shims --no-payload") - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) - Duplicated RBI for ::Foo#foo: - * sorbet/rbi/todo.rbi:2:2-2:18 - * sorbet/rbi/shims/foo.rbi:2:2-2:18 + Duplicated RBI for ::Foo#foo: + * sorbet/rbi/todo.rbi:2:2-2:18 + * sorbet/rbi/shims/foo.rbi:2:2-2:18 - Duplicated RBI for ::Bar#bar: - * sorbet/rbi/todo.rbi:6:2-6:14 - * sorbet/rbi/shims/bar.rbi:2:2-2:14 + Duplicated RBI for ::Bar#bar: + * sorbet/rbi/todo.rbi:6:2-6:14 + * sorbet/rbi/shims/bar.rbi:2:2-2:14 - Duplicated RBI for ::Baz: - * sorbet/rbi/todo.rbi:9:0-9:15 - * sorbet/rbi/shims/baz.rbi:1:0-1:15 + Duplicated RBI for ::Baz: + * sorbet/rbi/todo.rbi:9:0-9:15 + * sorbet/rbi/shims/baz.rbi:1:0-1:15 - Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi - ERR + Please remove the duplicated definitions from sorbet/rbi/shims and sorbet/rbi/todo.rbi + ERR - refute_success_status(result) - end + refute_success_status(result) + end - it "ignores files typed: ignore" do - @project.write("sorbet/rbi/annotations/foo.rbi", <<~RBI) - # typed: ignore + it "ignores files typed: ignore" do + @project.write!("sorbet/rbi/annotations/foo.rbi", <<~RBI) + # typed: ignore - class Foo; end - RBI + class Foo; end + RBI - @project.write("sorbet/rbi/gems/foo.rbi", <<~RBI) - # typed: ignore + @project.write!("sorbet/rbi/gems/foo.rbi", <<~RBI) + # typed: ignore - class Foo; end - RBI + class Foo; end + RBI - @project.write("sorbet/rbi/shims/foo.rbi", <<~RBI) - # typed: ignore + @project.write!("sorbet/rbi/shims/foo.rbi", <<~RBI) + # typed: ignore - class Foo; end - RBI + class Foo; end + RBI - @project.write("sorbet/rbi/todo.rbi", <<~RBI) - # typed: ignore + @project.write!("sorbet/rbi/todo.rbi", <<~RBI) + # typed: ignore - class Foo; end - RBI + class Foo; end + RBI - result = @project.tapioca("check-shims --no-payload") - assert_success_status(result) - end + result = @project.tapioca("check-shims --no-payload") + assert_success_status(result) end sig { params(string: String).returns(String) } diff --git a/spec/tapioca/cli/config_spec.rb b/spec/tapioca/cli/config_spec.rb index a77e76e67..46b350d1c 100644 --- a/spec/tapioca/cli/config_spec.rb +++ b/spec/tapioca/cli/config_spec.rb @@ -7,15 +7,15 @@ module Tapioca class ConfigTest < SpecWithProject describe "cli::configuration" do before(:all) do - @project.bundle_install + @project.bundle_install! end after do - @project.remove("sorbet/rbi") + @project.remove!("sorbet/rbi") end it "validates unknown configuration keys" do - @project.write("sorbet/tapioca/config.yml", <<~YAML) + @project.write!("sorbet/tapioca/config.yml", <<~YAML) foo: true bar: - 1 @@ -29,7 +29,7 @@ class ConfigTest < SpecWithProject result = @project.tapioca("gem") - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) Configuration file sorbet/tapioca/config.yml has the following errors: @@ -43,7 +43,7 @@ class ConfigTest < SpecWithProject end it "validates unknown configuration key options" do - @project.write("sorbet/tapioca/config.yml", <<~YAML) + @project.write!("sorbet/tapioca/config.yml", <<~YAML) gem: doc: true foo: 1 @@ -53,7 +53,7 @@ class ConfigTest < SpecWithProject result = @project.tapioca("gem") - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) Configuration file sorbet/tapioca/config.yml has the following errors: @@ -66,7 +66,7 @@ class ConfigTest < SpecWithProject end it "validates invalid configuration option values" do - @project.write("sorbet/tapioca/config.yml", <<~YAML) + @project.write!("sorbet/tapioca/config.yml", <<~YAML) gem: doc: "true" typed_overrides: @@ -79,7 +79,7 @@ class ConfigTest < SpecWithProject result = @project.tapioca("gem") - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) Configuration file sorbet/tapioca/config.yml has the following errors: @@ -94,7 +94,7 @@ class ConfigTest < SpecWithProject end it "validates invalid configuration option values inside arrays and hashes" do - @project.write("sorbet/tapioca/config.yml", <<~YAML) + @project.write!("sorbet/tapioca/config.yml", <<~YAML) dsl: only: [1, false] exclude: [1, false] @@ -106,7 +106,7 @@ class ConfigTest < SpecWithProject result = @project.tapioca("gem") - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) Configuration file sorbet/tapioca/config.yml has the following errors: @@ -121,7 +121,7 @@ class ConfigTest < SpecWithProject end it "validates unknown configuration keys, options, and invalid values" do - @project.write("sorbet/tapioca/config.yml", <<~YAML) + @project.write!("sorbet/tapioca/config.yml", <<~YAML) gem: doc: true foo: 1 @@ -134,7 +134,7 @@ class ConfigTest < SpecWithProject result = @project.tapioca("gem") - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) Configuration file sorbet/tapioca/config.yml has the following errors: @@ -150,13 +150,13 @@ class ConfigTest < SpecWithProject end it "loads the configuration file from a custom location" do - @project.write("tapioca_custom_config.yml", <<~YAML) + @project.write!("tapioca_custom_config.yml", <<~YAML) foo: true YAML result = @project.tapioca("gem --config tapioca_custom_config.yml") - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) Configuration file tapioca_custom_config.yml has the following errors: @@ -166,7 +166,7 @@ class ConfigTest < SpecWithProject assert_empty_stdout(result) refute_success_status(result) - @project.remove("tapioca_custom_config.yml") + @project.remove!("tapioca_custom_config.yml") end end end diff --git a/spec/tapioca/cli/configure_spec.rb b/spec/tapioca/cli/configure_spec.rb index c018c528c..8c651609a 100644 --- a/spec/tapioca/cli/configure_spec.rb +++ b/spec/tapioca/cli/configure_spec.rb @@ -8,13 +8,13 @@ module Tapioca class ConfigureSpec < SpecWithProject describe "cli::configure" do before(:all) do - project.bundle_install + project.bundle_install! end after do - @project.remove("sorbet/config") - @project.remove("sorbet/tapioca") - @project.remove("bin/tapioca") + @project.remove!("sorbet/config") + @project.remove!("sorbet/tapioca") + @project.remove!("bin/tapioca") end it "must create proper files" do @@ -51,10 +51,10 @@ class ConfigureSpec < SpecWithProject end it "must not overwrite files" do - @project.write("bin/tapioca") - @project.write("sorbet/config") - @project.write("sorbet/tapioca/require.rb") - @project.write("sorbet/tapioca/config.yml") + @project.write!("bin/tapioca") + @project.write!("sorbet/config") + @project.write!("sorbet/tapioca/require.rb") + @project.write!("sorbet/tapioca/config.yml") result = @project.tapioca("configure") diff --git a/spec/tapioca/cli/dsl_spec.rb b/spec/tapioca/cli/dsl_spec.rb index 1a354a5f7..477482922 100644 --- a/spec/tapioca/cli/dsl_spec.rb +++ b/spec/tapioca/cli/dsl_spec.rb @@ -7,7 +7,7 @@ module Tapioca class DslSpec < SpecWithProject describe "cli::dsl" do before(:all) do - @project.write("config/application.rb", <<~RB) + @project.write!("config/application.rb", <<~RB) require "bundler/setup" Bundler.require @@ -34,18 +34,18 @@ def self.application end RB - @project.write("config/environment.rb", <<~RB) + @project.write!("config/environment.rb", <<~RB) require_relative "application.rb" RB end it "shows an error message for unknown options" do - @project.bundle_install + @project.bundle_install! result = @project.tapioca("dsl --unknown-option") assert_empty_stdout(result) - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) Unknown switches "--unknown-option" ERR @@ -56,25 +56,59 @@ def self.application before(:all) do @project.require_real_gem("smart_properties", "1.15.0") @project.require_real_gem("sidekiq", "6.2.1") - @project.bundle_install + @project.bundle_install! @gemfile = @project.read("Gemfile") @gemfile_lock = @project.read("Gemfile.lock") end before do - @project.write("Gemfile", @gemfile) - @project.write("Gemfile.lock", @gemfile_lock) + @project.write!("Gemfile", @gemfile) + @project.write!("Gemfile.lock", @gemfile_lock) end after do - @project.remove("db") - @project.remove("lib") - @project.remove("sorbet/rbi/dsl") + @project.remove!("db") + @project.remove!("lib") + @project.remove!("sorbet/rbi/dsl") + end + + it "must generate a .gitattributes file in the output folder" do + @project.write!("lib/post.rb", <<~RB) + require "smart_properties" + + class Post + include SmartProperties + property :title, accepts: String + end + RB + + result = @project.tapioca("dsl Post --outdir output") + + assert_empty_stderr(result) + assert_success_status(result) + + assert_project_file_equal("output/.gitattributes", <<~CONTENT) + **/*.rbi linguist-generated=true + CONTENT + ensure + @project.remove!("output") + end + + it "must not generate a .gitattributes file if the output folder is not created" do + result = @project.tapioca("dsl --outdir output") + + assert_stderr_equals(<<~ERR, result) + No classes/modules can be matched for RBI generation. + Please check that the requested classes/modules include processable DSL methods. + ERR + refute_project_file_exist("output/.gitattributes") + ensure + @project.remove!("output") end it "respects the Gemfile and Gemfile.lock" do gem = mock_gem("foo", "1.0.0") do - write("lib/foo.rb", <<~RB) + write!("lib/foo.rb", <<~RB) raise "This gem should not have been loaded" module Foo @@ -86,7 +120,7 @@ module Foo result = @project.tapioca("dsl") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -94,7 +128,7 @@ module Foo OUT - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) No classes/modules can be matched for RBI generation. Please check that the requested classes/modules include processable DSL methods. ERR @@ -103,13 +137,13 @@ module Foo end it "does not generate anything if there are no matching constants" do - @project.write("lib/user.rb", <<~RB) + @project.write!("lib/user.rb", <<~RB) class User; end RB result = @project.tapioca("dsl User") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -117,7 +151,7 @@ class User; end OUT - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) No classes/modules can be matched for RBI generation. Please check that the requested classes/modules include processable DSL methods. ERR @@ -128,7 +162,7 @@ class User; end end it "generates RBI files for only required constants" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -139,7 +173,7 @@ class Post result = @project.tapioca("dsl Post") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -184,7 +218,7 @@ def title=(title); end it "errors for unprocessable required constants" do result = @project.tapioca("dsl NonExistent::Foo NonExistent::Bar NonExistent::Baz") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -195,7 +229,7 @@ def title=(title); end Error: Cannot find constant 'NonExistent::Baz' OUT - assert_equal("\n", result.err) + assert_stderr_equals("\n", result) refute_project_file_exist("sorbet/rbi/dsl/non_existent/foo.rbi") refute_project_file_exist("sorbet/rbi/dsl/non_existent/bar.rbi") @@ -205,12 +239,12 @@ def title=(title); end end it "removes RBI files for unprocessable required constants" do - @project.write("sorbet/rbi/dsl/non_existent/foo.rbi") - @project.write("sorbet/rbi/dsl/non_existent/baz.rbi") + @project.write!("sorbet/rbi/dsl/non_existent/foo.rbi") + @project.write!("sorbet/rbi/dsl/non_existent/baz.rbi") result = @project.tapioca("dsl NonExistent::Foo NonExistent::Bar NonExistent::Baz") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -223,7 +257,7 @@ def title=(title); end remove sorbet/rbi/dsl/non_existent/baz.rbi OUT - assert_equal("\n", result.err) + assert_stderr_equals("\n", result) refute_project_file_exist("sorbet/rbi/dsl/non_existent/foo.rbi") refute_project_file_exist("sorbet/rbi/dsl/non_existent/baz.rbi") @@ -232,7 +266,7 @@ def title=(title); end end it "generates RBI files for all processable constants" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -241,7 +275,7 @@ class Post end RB - @project.write("lib/comment.rb", <<~RB) + @project.write!("lib/comment.rb", <<~RB) require "smart_properties" module Namespace @@ -254,7 +288,7 @@ class Comment result = @project.tapioca("dsl") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -319,7 +353,7 @@ def body=(body); end it "generates RBI files for processable constants coming from gems" do gem = mock_gem("foo", "1.0.0") do - write("lib/foo/role.rb", <<~RB) + write!("lib/foo/role.rb", <<~RB) require "smart_properties" module Foo @@ -331,16 +365,16 @@ class Role RB end - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "foo/role" RB @project.require_mock_gem(gem) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("dsl") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -383,7 +417,7 @@ def title=(title); end end it "generates RBI files for engine when provided with an `app_root` flag" do - @project.write("test/dummy/lib/post.rb", <<~RB) + @project.write!("test/dummy/lib/post.rb", <<~RB) require "smart_properties" class Post @@ -392,7 +426,7 @@ class Post end RB - @project.write("test/dummy/lib/comment.rb", <<~RB) + @project.write!("test/dummy/lib/comment.rb", <<~RB) require "smart_properties" module Namespace @@ -403,11 +437,11 @@ class Comment end RB - engine_path = @project.path + "/test/dummy" + engine_path = @project.absolute_path + "/test/dummy" begin FileUtils.mkdir_p(engine_path) - FileUtils.mv(@project.path + "/config", engine_path) + FileUtils.mv(@project.absolute_path + "/config", engine_path) result = @project.tapioca("dsl --app_root=test/dummy") @@ -435,13 +469,51 @@ def title=(title); end # Restore directory structure so to not impact other tests ensure - FileUtils.mv(engine_path + "/config", @project.path) + FileUtils.mv(engine_path + "/config", @project.absolute_path) FileUtils.rm_rf(engine_path) end end + it "generates RBI file for constants that might have overriden the hash method" do + @project.write!("lib/post.rb", <<~RB) + require "smart_properties" + + class Post + include SmartProperties + property :title, accepts: String + + def self.hash + raise "Cannot call `hash` on `Post`" + end + end + RB + + result = @project.tapioca("dsl") + + assert_stdout_equals(<<~OUT, result) + Loading DSL extension classes... Done + Loading Rails application... Done + Loading DSL compiler classes... Done + Compiling DSL RBI files... + + create sorbet/rbi/dsl/post.rbi + + Done + + Checking generated RBI files... Done + No errors found + + All operations performed in working directory. + Please review changes and commit them. + OUT + + assert_empty_stderr(result) + assert_project_file_exist("sorbet/rbi/dsl/post.rbi") + assert_success_status(result) + end + it "generates RBI files in the correct output directory" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -450,7 +522,7 @@ class Post end RB - @project.write("lib/comment.rb", <<~RB) + @project.write!("lib/comment.rb", <<~RB) require "smart_properties" module Namespace @@ -463,7 +535,7 @@ class Comment result = @project.tapioca("dsl --verbose --outdir rbis/") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -490,11 +562,11 @@ class Comment assert_success_status(result) - @project.remove("rbis/") + @project.remove!("rbis/") end it "generates RBI files with verbose output" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -503,7 +575,7 @@ class Post end RB - @project.write("lib/comment.rb", <<~RB) + @project.write!("lib/comment.rb", <<~RB) require "smart_properties" module Namespace @@ -516,7 +588,7 @@ class Comment result = @project.tapioca("dsl --verbose") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -545,7 +617,7 @@ class Comment end it "can generates RBI files quietly" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -556,7 +628,7 @@ class Post result = @project.tapioca("dsl --quiet") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -580,7 +652,7 @@ class Post end it "generates RBI files without header" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -609,11 +681,11 @@ def title=(title); end end it "removes stale RBI files" do - @project.write("sorbet/rbi/dsl/to_be_deleted/foo.rbi") - @project.write("sorbet/rbi/dsl/to_be_deleted/baz.rbi") - @project.write("sorbet/rbi/dsl/does_not_exist.rbi") + @project.write!("sorbet/rbi/dsl/to_be_deleted/foo.rbi") + @project.write!("sorbet/rbi/dsl/to_be_deleted/baz.rbi") + @project.write!("sorbet/rbi/dsl/does_not_exist.rbi") - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -624,7 +696,7 @@ class Post result = @project.tapioca("dsl") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -657,7 +729,7 @@ class Post end it "does not crash with anonymous constants" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -666,7 +738,7 @@ class Post end RB - @project.write("lib/job.rb", <<~RB) + @project.write!("lib/job.rb", <<~RB) require "sidekiq" Class.new do @@ -684,15 +756,15 @@ class Post it "removes stale RBIs properly when running in parallel" do # Files that shouldn't be deleted - @project.write("sorbet/rbi/dsl/job.rbi") - @project.write("sorbet/rbi/dsl/post.rbi") + @project.write!("sorbet/rbi/dsl/job.rbi") + @project.write!("sorbet/rbi/dsl/post.rbi") # Files that should be deleted - @project.write("sorbet/rbi/dsl/to_be_deleted/foo.rbi") - @project.write("sorbet/rbi/dsl/to_be_deleted/baz.rbi") - @project.write("sorbet/rbi/dsl/does_not_exist.rbi") + @project.write!("sorbet/rbi/dsl/to_be_deleted/foo.rbi") + @project.write!("sorbet/rbi/dsl/to_be_deleted/baz.rbi") + @project.write!("sorbet/rbi/dsl/does_not_exist.rbi") - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -701,7 +773,7 @@ class Post end RB - @project.write("lib/job.rb", <<~RB) + @project.write!("lib/job.rb", <<~RB) require "sidekiq" class Job @@ -725,9 +797,9 @@ def perform(foo, bar) end it "removes stale RBI files of requested constants" do - @project.write("sorbet/rbi/dsl/user.rbi") + @project.write!("sorbet/rbi/dsl/user.rbi") - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -736,13 +808,13 @@ class Post end RB - @project.write("lib/user.rb", <<~RB) + @project.write!("lib/user.rb", <<~RB) class User; end RB result = @project.tapioca("dsl Post User") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -771,7 +843,7 @@ class User; end end it "can be called by path" do - @project.write("lib/models/post.rb", <<~RB) + @project.write!("lib/models/post.rb", <<~RB) require "smart_properties" class Post @@ -780,7 +852,7 @@ class Post end RB - @project.write("lib/models/nested/user.rb", <<~RB) + @project.write!("lib/models/nested/user.rb", <<~RB) require "smart_properties" module Nested @@ -791,7 +863,7 @@ class User end RB - @project.write("lib/job.rb", <<~RB) + @project.write!("lib/job.rb", <<~RB) require "smart_properties" class User @@ -802,7 +874,7 @@ class User result = @project.tapioca("dsl lib/models") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -830,7 +902,7 @@ class User end it "does not generate anything and errors for non-existent paths" do - @project.write("lib/models/post.rb", <<~RB) + @project.write!("lib/models/post.rb", <<~RB) require "smart_properties" class Post @@ -841,7 +913,7 @@ class Post result = @project.tapioca("dsl path/to/nowhere.rb") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -849,7 +921,7 @@ class Post OUT - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) No classes/modules can be matched for RBI generation. Please check that the requested classes/modules include processable DSL methods. ERR @@ -860,7 +932,7 @@ class Post end it "does not generate anything but succeeds for real paths with no processable DSL" do - @project.write("lib/models/post.rb", <<~RB) + @project.write!("lib/models/post.rb", <<~RB) class Foo class << self BAR = nil @@ -870,7 +942,7 @@ class << self result = @project.tapioca("dsl lib/models") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -894,7 +966,7 @@ class << self end it "must run custom compilers" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -903,7 +975,7 @@ class Post end RB - @project.write("lib/compilers/compiler_that_includes_bar_module.rb", <<~RB) + @project.write!("lib/compilers/compiler_that_includes_bar_module.rb", <<~RB) require "post" class CompilerThatIncludesBarModuleInPost < Tapioca::Dsl::Compiler @@ -926,7 +998,7 @@ def self.gather_constants end RB - @project.write("lib/compilers/compiler_that_includes_foo_module.rb", <<~RB) + @project.write!("lib/compilers/compiler_that_includes_foo_module.rb", <<~RB) require "post" class CompilerThatIncludesFooModuleInPost < Tapioca::Dsl::Compiler @@ -951,7 +1023,7 @@ def self.gather_constants result = @project.tapioca("dsl") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -999,7 +1071,7 @@ def title=(title); end end it "must respect `only` option" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -1008,7 +1080,7 @@ class Post end RB - @project.write("lib/job.rb", <<~RB) + @project.write!("lib/job.rb", <<~RB) require "sidekiq" class Job @@ -1018,7 +1090,7 @@ def perform(foo, bar) end RB - @project.write("lib/compilers/foo/compiler.rb", <<~RB) + @project.write!("lib/compilers/foo/compiler.rb", <<~RB) require "job" module Foo @@ -1044,7 +1116,7 @@ def self.gather_constants result = @project.tapioca("dsl --only SidekiqWorker Foo::Compiler") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -1091,26 +1163,43 @@ module FooModule; end assert_success_status(result) end - it "errors if there are no matching compilers" do - result = @project.tapioca("dsl --only NonexistentCompiler") + it "warns if there are no matching compilers but continues processing" do + @project.write!("lib/post.rb", <<~RB) + require "smart_properties" - assert_equal(<<~OUT, result.out) + class Post + include SmartProperties + property :title, accepts: String + end + RB + + result = @project.tapioca("dsl --only SmartProperties NonexistentCompiler") + + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done Compiling DSL RBI files... - OUT + Warning: Cannot find compiler 'NonexistentCompiler' - assert_equal(<<~ERROR, result.err) - Error: Cannot find compiler 'NonexistentCompiler' - ERROR + create sorbet/rbi/dsl/post.rbi - refute_success_status(result) + Done + + Checking generated RBI files... Done + No errors found + + All operations performed in working directory. + Please review changes and commit them. + OUT + + assert_empty_stderr(result) + assert_success_status(result) end it "must respect `exclude` option" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -1119,7 +1208,7 @@ class Post end RB - @project.write("lib/job.rb", <<~RB) + @project.write!("lib/job.rb", <<~RB) require "sidekiq" class Job @@ -1129,7 +1218,7 @@ def perform(foo, bar) end RB - @project.write("lib/compilers/foo/compiler.rb", <<~RB) + @project.write!("lib/compilers/foo/compiler.rb", <<~RB) require "job" module Foo @@ -1155,7 +1244,7 @@ def self.gather_constants result = @project.tapioca("dsl --exclude SidekiqWorker Foo::Compiler") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -1180,26 +1269,43 @@ def self.gather_constants assert_success_status(result) end - it "errors if there are no matching `exclude` compilers" do + it "warns if there are no matching `exclude` compilers but continues processing" do + @project.write!("lib/post.rb", <<~RB) + require "smart_properties" + + class Post + include SmartProperties + property :title, accepts: String + end + RB + result = @project.tapioca("dsl --exclude NonexistentCompiler") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done Compiling DSL RBI files... - OUT + Warning: Cannot find compiler 'NonexistentCompiler' - assert_equal(<<~ERROR, result.err) - Error: Cannot find compiler 'NonexistentCompiler' - ERROR + create sorbet/rbi/dsl/post.rbi - refute_success_status(result) + Done + + Checking generated RBI files... Done + No errors found + + All operations performed in working directory. + Please review changes and commit them. + OUT + + assert_empty_stderr(result) + assert_success_status(result) end it "must warn about reloaded constants and process only the newest one" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -1220,7 +1326,7 @@ class Post result = @project.tapioca("dsl") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -1237,7 +1343,7 @@ class Post Please review changes and commit them. OUT - assert_equal(<<~OUT, result.err) + assert_stderr_equals(<<~OUT, result) WARNING: Multiple constants with the same name: `Post` Make sure some object is not holding onto these constants during an app reload. OUT @@ -1267,7 +1373,7 @@ def body=(body); end describe "pending migrations" do before do - @project.write("db/migrate/202001010000_create_articles.rb", <<~RB) + @project.write!("db/migrate/202001010000_create_articles.rb", <<~RB) class CreateArticles < ActiveRecord::Migration[6.1] def change create_table(:articles) do |t| @@ -1277,7 +1383,7 @@ def change end RB - @project.write("lib/database.rb", <<~RB) + @project.write!("lib/database.rb", <<~RB) require "rake" namespace :db do @@ -1299,12 +1405,12 @@ def change RB @project.require_real_gem("rake", "13.0.6") - @project.require_real_gem("activerecord") - @project.bundle_install + @project.require_real_gem("activerecord", require: "active_record") + @project.bundle_install! end it "aborts if there are pending migrations" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) class Post < ActiveRecord::Base end RB @@ -1312,7 +1418,7 @@ class Post < ActiveRecord::Base result = @project.tapioca("dsl Post") # FIXME: print the error to the correct stream - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -1322,7 +1428,7 @@ class Post < ActiveRecord::Base 202001010000_create_articles.rb OUT - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) Run `bin/rails db:migrate` to update your database then try again. ERR @@ -1330,7 +1436,7 @@ class Post < ActiveRecord::Base end it "aborts if there are pending migrations and no arg was passed" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) class Post < ActiveRecord::Base end RB @@ -1338,7 +1444,7 @@ class Post < ActiveRecord::Base result = @project.tapioca("dsl") # FIXME: print the error to the correct stream - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -1348,7 +1454,7 @@ class Post < ActiveRecord::Base 202001010000_create_articles.rb OUT - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) Run `bin/rails db:migrate` to update your database then try again. ERR @@ -1356,7 +1462,7 @@ class Post < ActiveRecord::Base end it "does not abort if there are pending migrations but no active record models" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -1367,7 +1473,7 @@ class Post result = @project.tapioca("dsl Post") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -1393,9 +1499,9 @@ class Post end it "overwrites existing RBIs without user input" do - @project.write("sorbet/rbi/dsl/image.rbi") + @project.write!("sorbet/rbi/dsl/image.rbi") - @project.write("lib/image.rb", <<~RB) + @project.write!("lib/image.rb", <<~RB) require "smart_properties" class Image @@ -1408,7 +1514,7 @@ class Image result = @project.tapioca("dsl") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -1433,7 +1539,7 @@ class Image end it "generates the correct RBIs when running in parallel" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -1442,7 +1548,7 @@ class Post end RB - @project.write("lib/job.rb", <<~RB) + @project.write!("lib/job.rb", <<~RB) require "sidekiq" class Job @@ -1452,7 +1558,7 @@ def perform(foo, bar) end RB - @project.write("lib/image.rb", <<~RB) + @project.write!("lib/image.rb", <<~RB) require "smart_properties" class Image @@ -1474,12 +1580,12 @@ class Image end it "shows a helpful error message when unexpected errors occur" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) class Post end RB - @project.write("lib/compilers/post_compiler_that_raises.rb", <<~RB) + @project.write!("lib/compilers/post_compiler_that_raises.rb", <<~RB) require "post" class PostCompilerThatRaises < Tapioca::Dsl::Compiler @@ -1495,7 +1601,7 @@ def self.gather_constants result = @project.tapioca("dsl") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -1513,8 +1619,8 @@ def self.gather_constants it "generates RBIs for lower versions of activerecord-typedstore" do @project.require_real_gem("activerecord-typedstore", "1.4.0") @project.require_real_gem("sqlite3") - @project.bundle_install - @project.write("lib/post.rb", <<~RB) + @project.bundle_install! + @project.write!("lib/post.rb", <<~RB) require "active_record" require "active_record/typed_store" @@ -1529,7 +1635,7 @@ class Post < ActiveRecord::Base result = @project.tapioca("dsl Post --only=ActiveRecordTypedStore") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -1597,9 +1703,9 @@ def saved_change_to_reviewer?; end before(:all) do @project.require_real_gem("smart_properties", "1.15.0") @project.require_real_gem("sidekiq", "6.2.1") - @project.bundle_install + @project.bundle_install! - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -1608,7 +1714,7 @@ class Post end RB - @project.write("lib/job.rb", <<~RB) + @project.write!("lib/job.rb", <<~RB) require "sidekiq" class Job @@ -1620,7 +1726,7 @@ def perform(foo, bar) end after do - @project.remove("sorbet/rbi/dsl") + @project.remove!("sorbet/rbi/dsl") end it "does nothing and returns exit status 0 with no changes" do @@ -1639,7 +1745,7 @@ def perform(foo, bar) @project.tapioca("dsl") result = @project.tapioca("dsl --verify --exclude SmartProperties") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -1648,7 +1754,7 @@ def perform(foo, bar) OUT - assert_equal(<<~ERROR, result.err) + assert_stderr_equals(<<~ERROR, result) RBI files are out-of-date. In your development environment, please run: `bin/tapioca dsl` Once it is complete, be sure to commit and push any changes @@ -1666,7 +1772,7 @@ def perform(foo, bar) it "advises of new file(s) and returns exit status 1 with new files" do @project.tapioca("dsl") - @project.write("lib/image.rb", <<~RB) + @project.write!("lib/image.rb", <<~RB) require "smart_properties" class Image @@ -1678,7 +1784,7 @@ class Image result = @project.tapioca("dsl --verify") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -1687,7 +1793,7 @@ class Image OUT - assert_equal(<<~ERROR, result.err) + assert_stderr_equals(<<~ERROR, result) RBI files are out-of-date. In your development environment, please run: `bin/tapioca dsl` Once it is complete, be sure to commit and push any changes @@ -1701,11 +1807,11 @@ class Image refute_success_status(result) - @project.remove("lib/image.rb") + @project.remove!("lib/image.rb") end it "advises of modified file(s) and returns exit status 1 with modified file" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -1716,7 +1822,7 @@ class Post @project.tapioca("dsl") - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -1728,7 +1834,7 @@ class Post result = @project.tapioca("dsl --verify") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -1737,7 +1843,7 @@ class Post OUT - assert_equal(<<~ERROR, result.err) + assert_stderr_equals(<<~ERROR, result) RBI files are out-of-date. In your development environment, please run: `bin/tapioca dsl` Once it is complete, be sure to commit and push any changes @@ -1756,9 +1862,9 @@ class Post describe "strictness" do it "must turn the strictness of gem RBI files with errors to false" do @project.require_real_gem("smart_properties", "1.15.0") - @project.bundle_install + @project.bundle_install! - @project.write("sorbet/rbi/gems/foo@0.0.1.rbi", <<~RBI) + @project.write!("sorbet/rbi/gems/foo@0.0.1.rbi", <<~RBI) # typed: true module Post::SmartPropertiesGeneratedMethods @@ -1766,7 +1872,7 @@ def foo; end end RBI - @project.write("sorbet/rbi/gems/bar@1.0.0.rbi", <<~RBI) + @project.write!("sorbet/rbi/gems/bar@1.0.0.rbi", <<~RBI) # typed: true module Post::SmartPropertiesGeneratedMethods @@ -1775,7 +1881,7 @@ def title=(title, subtitle); end end RBI - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -1799,20 +1905,20 @@ class Post assert_empty_stderr(result) assert_success_status(result) - @project.remove("sorbet/rbi/gems") - @project.remove("sorbet/rbi/dsl") + @project.remove!("sorbet/rbi/gems") + @project.remove!("sorbet/rbi/dsl") end end describe "custom compilers" do it "must load custom compilers from gems" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) class Post end RB foo = mock_gem("foo", "0.0.1") do - write("lib/tapioca/dsl/compilers/post_compiler.rb", <<~RB) + write!("lib/tapioca/dsl/compilers/post_compiler.rb", <<~RB) require "post" require "tapioca/dsl" @@ -1838,11 +1944,11 @@ def self.gather_constants end @project.require_mock_gem(foo) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("dsl Post") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -1878,14 +1984,14 @@ module GeneratedBar; end end it "must be able to load custom compilers without a full require" do - @project.bundle_install + @project.bundle_install! - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) class Post end RB - @project.write("lib/compilers/post_compiler.rb", <<~RB) + @project.write!("lib/compilers/post_compiler.rb", <<~RB) require "post" require "tapioca/dsl" @@ -1909,7 +2015,7 @@ def self.gather_constants end RB - @project.write("bin/generate", <<~RB) + @project.write!("bin/generate", <<~RB) require_relative "../config/environment" file = RBI::File.new(strictness: "strong") @@ -1920,7 +2026,7 @@ def self.gather_constants result = @project.bundle_exec("ruby bin/generate") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) # typed: strong class Post @@ -1937,13 +2043,13 @@ module GeneratedBar; end describe "custom extensions" do after do - project.remove("sorbet/rbi/gems") - project.remove("sorbet/rbi/dsl") - project.remove("sorbet/tapioca") + project.remove!("sorbet/rbi/gems") + project.remove!("sorbet/rbi/dsl") + project.remove!("sorbet/tapioca") end it "must load custom extensions from gems" do - @project.write("lib/credit_card.rb", <<~RB) + @project.write!("lib/credit_card.rb", <<~RB) require "encryptable" class CreditCard @@ -1954,7 +2060,7 @@ class CreditCard RB encryptable = mock_gem("encryptable", "0.0.1") do - write("lib/encryptable.rb", <<~RB) + write!("lib/encryptable.rb", <<~RB) module Encryptable def self.included(base) base.extend(ClassMethods) @@ -1989,7 +2095,7 @@ def decrypt(value) end RB - write("lib/tapioca/dsl/extensions/encryptable.rb", <<~RB) + write!("lib/tapioca/dsl/extensions/encryptable.rb", <<~RB) require "encryptable" module Tapioca @@ -2010,7 +2116,7 @@ def attr_encrypted(attr_name) end RB - write("lib/tapioca/dsl/compilers/encryptable.rb", <<~RB) + write!("lib/tapioca/dsl/compilers/encryptable.rb", <<~RB) require "encryptable" module Tapioca @@ -2047,11 +2153,11 @@ def decorate end @project.require_mock_gem(encryptable) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("dsl CreditCard") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -2095,7 +2201,7 @@ def number_encrypted=(value); end end it "must load custom extensions from the Sorbet directory" do - @project.write("lib/credit_card.rb", <<~RB) + @project.write!("lib/credit_card.rb", <<~RB) require "encryptable" class CreditCard @@ -2106,7 +2212,7 @@ class CreditCard RB encryptable = mock_gem("encryptable", "0.0.1") do - write("lib/encryptable.rb", <<~RB) + write!("lib/encryptable.rb", <<~RB) module Encryptable def self.included(base) base.extend(ClassMethods) @@ -2142,7 +2248,7 @@ def decrypt(value) RB end - @project.write("sorbet/tapioca/extensions/encryptable.rb", <<~RB) + @project.write!("sorbet/tapioca/extensions/encryptable.rb", <<~RB) require "encryptable" module Tapioca @@ -2163,7 +2269,7 @@ def attr_encrypted(attr_name) end RB - @project.write("sorbet/tapioca/compilers/encryptable.rb", <<~RB) + @project.write!("sorbet/tapioca/compilers/encryptable.rb", <<~RB) require "encryptable" module Tapioca @@ -2199,11 +2305,11 @@ def decorate RB @project.require_mock_gem(encryptable) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("dsl CreditCard") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done @@ -2247,19 +2353,19 @@ def number_encrypted=(value); end end it "halts upon load errors when extension cannot be loaded" do - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) class Post end RB - @project.write("sorbet/tapioca/extensions/test.rb", <<~RB) + @project.write!("sorbet/tapioca/extensions/test.rb", <<~RB) puts "Hi from test extension" raise "Raising from test extension" RB result = @project.tapioca("dsl Post") - assert_equal(<<~OUT, result.out) + assert_equal(<<~OUT, result.out, "#{result} was different") Loading DSL extension classes... Hi from test extension OUT @@ -2274,10 +2380,10 @@ class Post describe "sanity" do before(:all) do @project.require_real_gem("smart_properties", "1.15.0") - @project.bundle_install + @project.bundle_install! @project.tapioca("configure") - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" class Post @@ -2288,12 +2394,12 @@ class Post end after do - project.remove("sorbet/rbi/gems") - project.remove("sorbet/rbi/dsl") + project.remove!("sorbet/rbi/gems") + project.remove!("sorbet/rbi/dsl") end it "must display an error message when a generated gem RBI file contains a parse error" do - @project.write("sorbet/rbi/dsl/bar.rbi", <<~RBI) + @project.write!("sorbet/rbi/dsl/bar.rbi", <<~RBI) # typed: true module Bar @@ -2305,7 +2411,7 @@ def bar(&block); end result = @project.tapioca("dsl Post") - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) ##### INTERNAL ERROR ##### There are parse errors in the generated RBI files. @@ -2336,7 +2442,7 @@ def bar(&block); end before(:all) do @project.tapioca("configure") - @project.write("lib/post.rb", <<~RB) + @project.write!("lib/post.rb", <<~RB) require "smart_properties" $stderr.puts "RAILS ENVIRONMENT: \#{ENV["RAILS_ENV"]}" @@ -2359,13 +2465,13 @@ class Post::Rack < Post RB @project.require_real_gem("smart_properties", "1.15.0") - @project.bundle_install + @project.bundle_install! end it "must default to `development` as environment" do result = @project.tapioca("dsl") - assert_equal(<<~OUT, result.err) + assert_stderr_equals(<<~OUT, result) RAILS ENVIRONMENT: development RACK ENVIRONMENT: development OUT @@ -2421,7 +2527,7 @@ def title=(title); end refute_project_file_exist("sorbet/rbi/dsl/post/rack.rbi") refute_project_file_exist("sorbet/rbi/dsl/post/rails.rbi") - assert_equal(<<~OUT, result.err) + assert_stderr_equals(<<~OUT, result) RAILS ENVIRONMENT: staging RACK ENVIRONMENT: staging OUT @@ -2433,10 +2539,10 @@ def title=(title); end @project.tapioca("configure") @project.require_real_gem("smart_properties") @project.require_real_gem("sidekiq") - @project.require_real_gem("activerecord") - @project.bundle_install + @project.require_real_gem("activerecord", require: "active_record") + @project.bundle_install! - @project.write("lib/compilers/post_compiler.rb", <<~RB) + @project.write!("lib/compilers/post_compiler.rb", <<~RB) require "tapioca/dsl" class PostCompiler < Tapioca::Dsl::Compiler @@ -2447,28 +2553,32 @@ class PostCompiler < Tapioca::Dsl::Compiler it "lists all Tapioca bundled compilers" do result = @project.tapioca("dsl --list-compilers") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done Loaded DSL compiler classes: - PostCompiler enabled - Tapioca::Dsl::Compilers::ActiveModelAttributes enabled - Tapioca::Dsl::Compilers::ActiveModelSecurePassword enabled - Tapioca::Dsl::Compilers::ActiveRecordAssociations enabled - Tapioca::Dsl::Compilers::ActiveRecordColumns enabled - Tapioca::Dsl::Compilers::ActiveRecordDelegatedTypes enabled - Tapioca::Dsl::Compilers::ActiveRecordEnum enabled - Tapioca::Dsl::Compilers::ActiveRecordRelations enabled - Tapioca::Dsl::Compilers::ActiveRecordScope enabled - Tapioca::Dsl::Compilers::ActiveRecordSecureToken enabled - Tapioca::Dsl::Compilers::ActiveSupportConcern enabled - Tapioca::Dsl::Compilers::ActiveSupportCurrentAttributes enabled - Tapioca::Dsl::Compilers::MixedInClassAttributes enabled - Tapioca::Dsl::Compilers::SidekiqWorker enabled - Tapioca::Dsl::Compilers::SmartProperties enabled + PostCompiler enabled + Tapioca::Dsl::Compilers::ActionText enabled + Tapioca::Dsl::Compilers::ActiveModelAttributes enabled + Tapioca::Dsl::Compilers::ActiveModelSecurePassword enabled + Tapioca::Dsl::Compilers::ActiveModelValidationsConfirmation enabled + Tapioca::Dsl::Compilers::ActiveRecordAssociations enabled + Tapioca::Dsl::Compilers::ActiveRecordColumns enabled + Tapioca::Dsl::Compilers::ActiveRecordDelegatedTypes enabled + Tapioca::Dsl::Compilers::ActiveRecordEnum enabled + Tapioca::Dsl::Compilers::ActiveRecordFixtures enabled + Tapioca::Dsl::Compilers::ActiveRecordRelations enabled + Tapioca::Dsl::Compilers::ActiveRecordScope enabled + Tapioca::Dsl::Compilers::ActiveRecordSecureToken enabled + Tapioca::Dsl::Compilers::ActiveRecordStore enabled + Tapioca::Dsl::Compilers::ActiveSupportConcern enabled + Tapioca::Dsl::Compilers::ActiveSupportCurrentAttributes enabled + Tapioca::Dsl::Compilers::MixedInClassAttributes enabled + Tapioca::Dsl::Compilers::SidekiqWorker enabled + Tapioca::Dsl::Compilers::SmartProperties enabled OUT assert_empty_stderr(result) @@ -2478,28 +2588,32 @@ class PostCompiler < Tapioca::Dsl::Compiler it "lists excluded compilers" do result = @project.tapioca("dsl --list-compilers --exclude SmartProperties ActiveRecordEnum") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done Loaded DSL compiler classes: - PostCompiler enabled - Tapioca::Dsl::Compilers::ActiveModelAttributes enabled - Tapioca::Dsl::Compilers::ActiveModelSecurePassword enabled - Tapioca::Dsl::Compilers::ActiveRecordAssociations enabled - Tapioca::Dsl::Compilers::ActiveRecordColumns enabled - Tapioca::Dsl::Compilers::ActiveRecordDelegatedTypes enabled - Tapioca::Dsl::Compilers::ActiveRecordEnum disabled - Tapioca::Dsl::Compilers::ActiveRecordRelations enabled - Tapioca::Dsl::Compilers::ActiveRecordScope enabled - Tapioca::Dsl::Compilers::ActiveRecordSecureToken enabled - Tapioca::Dsl::Compilers::ActiveSupportConcern enabled - Tapioca::Dsl::Compilers::ActiveSupportCurrentAttributes enabled - Tapioca::Dsl::Compilers::MixedInClassAttributes enabled - Tapioca::Dsl::Compilers::SidekiqWorker enabled - Tapioca::Dsl::Compilers::SmartProperties disabled + PostCompiler enabled + Tapioca::Dsl::Compilers::ActionText enabled + Tapioca::Dsl::Compilers::ActiveModelAttributes enabled + Tapioca::Dsl::Compilers::ActiveModelSecurePassword enabled + Tapioca::Dsl::Compilers::ActiveModelValidationsConfirmation enabled + Tapioca::Dsl::Compilers::ActiveRecordAssociations enabled + Tapioca::Dsl::Compilers::ActiveRecordColumns enabled + Tapioca::Dsl::Compilers::ActiveRecordDelegatedTypes enabled + Tapioca::Dsl::Compilers::ActiveRecordEnum disabled + Tapioca::Dsl::Compilers::ActiveRecordFixtures enabled + Tapioca::Dsl::Compilers::ActiveRecordRelations enabled + Tapioca::Dsl::Compilers::ActiveRecordScope enabled + Tapioca::Dsl::Compilers::ActiveRecordSecureToken enabled + Tapioca::Dsl::Compilers::ActiveRecordStore enabled + Tapioca::Dsl::Compilers::ActiveSupportConcern enabled + Tapioca::Dsl::Compilers::ActiveSupportCurrentAttributes enabled + Tapioca::Dsl::Compilers::MixedInClassAttributes enabled + Tapioca::Dsl::Compilers::SidekiqWorker enabled + Tapioca::Dsl::Compilers::SmartProperties disabled OUT assert_empty_stderr(result) @@ -2509,28 +2623,32 @@ class PostCompiler < Tapioca::Dsl::Compiler it "lists enabled compilers" do result = @project.tapioca("dsl --list-compilers --only SmartProperties ActiveRecordEnum") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Loading DSL extension classes... Done Loading Rails application... Done Loading DSL compiler classes... Done Loaded DSL compiler classes: - PostCompiler disabled - Tapioca::Dsl::Compilers::ActiveModelAttributes disabled - Tapioca::Dsl::Compilers::ActiveModelSecurePassword disabled - Tapioca::Dsl::Compilers::ActiveRecordAssociations disabled - Tapioca::Dsl::Compilers::ActiveRecordColumns disabled - Tapioca::Dsl::Compilers::ActiveRecordDelegatedTypes disabled - Tapioca::Dsl::Compilers::ActiveRecordEnum enabled - Tapioca::Dsl::Compilers::ActiveRecordRelations disabled - Tapioca::Dsl::Compilers::ActiveRecordScope disabled - Tapioca::Dsl::Compilers::ActiveRecordSecureToken disabled - Tapioca::Dsl::Compilers::ActiveSupportConcern disabled - Tapioca::Dsl::Compilers::ActiveSupportCurrentAttributes disabled - Tapioca::Dsl::Compilers::MixedInClassAttributes disabled - Tapioca::Dsl::Compilers::SidekiqWorker disabled - Tapioca::Dsl::Compilers::SmartProperties enabled + PostCompiler disabled + Tapioca::Dsl::Compilers::ActionText disabled + Tapioca::Dsl::Compilers::ActiveModelAttributes disabled + Tapioca::Dsl::Compilers::ActiveModelSecurePassword disabled + Tapioca::Dsl::Compilers::ActiveModelValidationsConfirmation disabled + Tapioca::Dsl::Compilers::ActiveRecordAssociations disabled + Tapioca::Dsl::Compilers::ActiveRecordColumns disabled + Tapioca::Dsl::Compilers::ActiveRecordDelegatedTypes disabled + Tapioca::Dsl::Compilers::ActiveRecordEnum enabled + Tapioca::Dsl::Compilers::ActiveRecordFixtures disabled + Tapioca::Dsl::Compilers::ActiveRecordRelations disabled + Tapioca::Dsl::Compilers::ActiveRecordScope disabled + Tapioca::Dsl::Compilers::ActiveRecordSecureToken disabled + Tapioca::Dsl::Compilers::ActiveRecordStore disabled + Tapioca::Dsl::Compilers::ActiveSupportConcern disabled + Tapioca::Dsl::Compilers::ActiveSupportCurrentAttributes disabled + Tapioca::Dsl::Compilers::MixedInClassAttributes disabled + Tapioca::Dsl::Compilers::SidekiqWorker disabled + Tapioca::Dsl::Compilers::SmartProperties enabled OUT assert_empty_stderr(result) @@ -2540,11 +2658,11 @@ class PostCompiler < Tapioca::Dsl::Compiler describe "halt-upon-load-error" do before(:all) do - @project.write("config/environment.rb", <<~RB) + @project.write!("config/environment.rb", <<~RB) require_relative "application.rb" RB - @project.write("config/application.rb", <<~RB) + @project.write!("config/application.rb", <<~RB) require "rails" module Test @@ -2555,11 +2673,11 @@ class Application < Rails::Application RB @project.require_real_gem("rails") - @project.bundle_install + @project.bundle_install! end after(:all) do - @project.remove("config/application.rb") + @project.remove!("config/application.rb") end it "halts upon load errors when rails application cannot be loaded" do diff --git a/spec/tapioca/cli/gem_spec.rb b/spec/tapioca/cli/gem_spec.rb index f279d1e30..2a7ddcd05 100644 --- a/spec/tapioca/cli/gem_spec.rb +++ b/spec/tapioca/cli/gem_spec.rb @@ -100,44 +100,9 @@ def fizz; end end RBI - TYPE_VARIABLE_RB = <<~RB - # typed: true - - class ComplexGenericType - extend T::Generic - - A = type_template(:in) - B = type_template(:out) - C = type_template - # The constants below are using the old type variable syntax specifically, - # so that we can be certain that we handle the old syntax properly. - D = type_member(fixed: Integer) - E = type_member(fixed: Integer, upper: Numeric) - F = type_member(fixed: Integer, lower: Complex, upper: Numeric) - G = type_member(:in, fixed: Integer) - H = type_member(:in, fixed: Integer, upper: Numeric) - I = type_member(:in, fixed: Integer, lower: Complex, upper: Numeric) - - class << self - extend T::Generic - - A = type_template(:in) - B = type_template(:out) - C = type_template - - D = type_member { { fixed: Integer } } - E = type_member { { fixed: Integer, upper: Numeric } } - F = type_member { { fixed: Integer, lower: Complex, upper: Numeric } } - G = type_member(:in) { { fixed: Integer } } - H = type_member(:in) { { fixed: Integer, upper: Numeric } } - I = type_member(:in) { { fixed: Integer, lower: Complex, upper: Numeric } } - end - end - RB - describe "cli::gem" do before(:all) do - @project.bundle_install + @project.bundle_install! end before do @@ -146,11 +111,11 @@ class << self it "must support 'gems' as an alias to the command" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) + write!("lib/foo.rb", FOO_RB) end @project.require_mock_gem(foo) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gems foo") @@ -169,7 +134,7 @@ class << self it "must show an error if --all is supplied with arguments" do result = @project.tapioca("gem --all foo") - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) Option '--all' must be provided without any other arguments ERR @@ -180,7 +145,7 @@ class << self it "must show an error if --verify is supplied with arguments" do result = @project.tapioca("gem --verify foo") - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) Option '--verify' must be provided without any other arguments ERR @@ -191,7 +156,7 @@ class << self it "must show an error if both --all and --verify are supplied" do result = @project.tapioca("gem --all --verify") - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) Options '--all' and '--verify' are mutually exclusive ERR @@ -202,7 +167,7 @@ class << self it "must show an error if --include-dependencies is supplied without gem" do result = @project.tapioca("gem --include-dependencies") - assert_equal(<<~ERR, result.err) + assert_stderr_equals(<<~ERR, result) Option '--include-dependencies' must be provided with gems ERR @@ -217,25 +182,71 @@ class << self end after do - project.gemfile(project.tapioca_gemfile) - project.remove("sorbet/rbi") - project.remove("../gems") - project.remove("sorbet/tapioca/require.rb") - project.remove("config/application.rb") + project.write_gemfile!(project.tapioca_gemfile) + project.remove!("sorbet/rbi") + project.remove!("../gems") + project.remove!("sorbet/tapioca/require.rb") + project.remove!("config/application.rb") + end + + it "must generate a .gitattributes file in the output folder" do + foo = mock_gem("foo", "0.0.1") do + write!("lib/foo.rb", FOO_RB) + end + + @project.require_mock_gem(foo) + @project.bundle_install! + result = @project.tapioca("gem foo --outdir output") + + assert_stdout_includes(result, <<~OUT) + Compiled foo + OUT + + assert_empty_stderr(result) + assert_success_status(result) + + assert_project_file_equal("output/.gitattributes", <<~CONTENT) + **/*.rbi linguist-generated=true + CONTENT + ensure + @project.remove!("output") + end + + it "must not generate a .gitattributes file if the output folder is not created" do + foo = mock_gem("foo", "0.0.1") do + write!("lib/foo.rb", FOO_RB) + end + + @project.require_mock_gem(foo) + @project.bundle_install! + + # Generate for `foo` but exclude it as well, so that we don't create the output folder + result = @project.tapioca("gem foo --outdir output --exclude foo") + + assert_stdout_includes(result, <<~OUT) + Nothing to do. + OUT + + assert_empty_stderr(result) + assert_success_status(result) + + refute_project_file_exist("output/.gitattributes") + ensure + @project.remove!("output") end it "must generate a single gem RBI" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) + write!("lib/foo.rb", FOO_RB) end bar = mock_gem("bar", "0.3.0") do - write("lib/bar.rb", BAR_RB) + write!("lib/bar.rb", BAR_RB) end @project.require_mock_gem(foo) @project.require_mock_gem(bar) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem foo") @@ -263,7 +274,7 @@ class << self gem_version = gem_spec.version.to_s @project.require_real_gem(gem_name, gem_version) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem #{gem_name}") @@ -281,11 +292,11 @@ class << self it "must generate gem RBI in correct output directory" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) + write!("lib/foo.rb", FOO_RB) end @project.require_mock_gem(foo) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem foo --outdir rbis/") @@ -298,27 +309,27 @@ class << self assert_empty_stderr(result) assert_success_status(result) - @project.remove("rbis/") + @project.remove!("rbis/") end it "must generate a gem RBI with the ones exported from the gem by default" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) + write!("lib/foo.rb", FOO_RB) - write("rbi/foo.rbi", <<~RBI) + write!("rbi/foo.rbi", <<~RBI) module Foo sig { params(a: String, b: Integer, opts: T.untyped).void } def self.foo(a = T.unsafe(nil), b: T.unsafe(nil), **opts); end end RBI - write("rbi/foo/bar.rbi", <<~RBI) + write!("rbi/foo/bar.rbi", <<~RBI) module Foo def foo; end end RBI - write("rbi/foo/bar/baz.rbi", <<~RBI) + write!("rbi/foo/bar/baz.rbi", <<~RBI) module Foo::Bar def bar; end end @@ -326,7 +337,7 @@ def bar; end end @project.require_mock_gem(foo) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem foo") @@ -363,22 +374,22 @@ module Reopened; end it "must generate a gem RBI without the ones exported from the gem when called with `--no-exported-gem-rbis`" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) + write!("lib/foo.rb", FOO_RB) - write("rbi/foo.rbi", <<~RBI) + write!("rbi/foo.rbi", <<~RBI) module RBI::Foo sig { void } def foo; end end RBI - write("rbi/foo/bar.rbi", <<~RBI) + write!("rbi/foo/bar.rbi", <<~RBI) module RBI::Bar def bar; end end RBI - write("rbi/foo/bar/baz.rbi", <<~RBI) + write!("rbi/foo/bar/baz.rbi", <<~RBI) module RBI::Bar::Baz def baz; end end @@ -386,7 +397,7 @@ def baz; end end @project.require_mock_gem(foo) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem foo --no-exported-gem-rbis") @@ -398,23 +409,27 @@ def baz; end it "must generate a gem RBI and skip exported gem RBIs if they contain errors" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) + write!("lib/foo.rb", FOO_RB) - write("rbi/foo.rbi", <<~RBI) + write!("rbi/foo.rbi", <<~RBI) module Foo # Syntax error RBI end @project.require_mock_gem(foo) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem foo") assert_stdout_includes(result, "create sorbet/rbi/gems/foo@0.0.1.rbi") assert_stderr_includes(result, "RBIs exported by `foo` contain errors and can't be used:") - assert_stderr_includes(result, "Cause: unexpected token $end") - assert_stderr_includes(result, "foo/rbi/foo.rbi:2:0-2:0") + assert_stderr_includes( + result, + "unexpected end of file, assuming it is closing the parent top level context. expected an `end` to close " \ + "the `module` statement.", + ) + assert_stderr_includes(result, "foo/rbi/foo.rbi:2:0") assert_project_file_equal("sorbet/rbi/gems/foo@0.0.1.rbi", FOO_RBI) @@ -423,15 +438,15 @@ module Foo # Syntax error it "must generate a gem RBI and skip exported gem RBIs if they contain conflicts" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) + write!("lib/foo.rb", FOO_RB) - write("rbi/foo.rbi", <<~RBI) + write!("rbi/foo.rbi", <<~RBI) module RBI::Foo def foo(x); end end RBI - write("rbi/bar.rbi", <<~RBI) + write!("rbi/bar.rbi", <<~RBI) module RBI::Foo def foo(a, b, c); end end @@ -439,7 +454,7 @@ def foo(a, b, c); end end @project.require_mock_gem(foo) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem foo") @@ -458,9 +473,9 @@ def foo(a, b, c); end it "must generate a gem RBI and resolves conflicts with exported gem RBIs by keeping the generated RBI" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) + write!("lib/foo.rb", FOO_RB) - write("rbi/foo.rbi", <<~RBI) + write!("rbi/foo.rbi", <<~RBI) module Foo class << self def foo; end @@ -470,7 +485,7 @@ def foo; end end @project.require_mock_gem(foo) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem foo") @@ -484,12 +499,12 @@ def foo; end @project.require_mock_gem(mock_gem("foo", "0.0.1")) @project.require_mock_gem(mock_gem("bar", "0.3.0")) @project.require_mock_gem(mock_gem("baz", "0.0.2")) - @project.bundle_install + @project.bundle_install! - @project.write("sorbet/rbi/gems/foo@0.0.1.rbi") - @project.write("sorbet/rbi/gems/bar@0.3.0.rbi") - @project.write("sorbet/rbi/gems/baz@0.0.2.rbi") - @project.write("sorbet/rbi/gems/outdated@5.0.0.rbi") + @project.write!("sorbet/rbi/gems/foo@0.0.1.rbi") + @project.write!("sorbet/rbi/gems/bar@0.3.0.rbi") + @project.write!("sorbet/rbi/gems/baz@0.0.2.rbi") + @project.write!("sorbet/rbi/gems/outdated@5.0.0.rbi") result = @project.tapioca("gem --all") @@ -510,14 +525,14 @@ def foo; end it "must perform postrequire properly" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) - write("lib/foo/secret.rb", "class Secret; end") + write!("lib/foo.rb", FOO_RB) + write!("lib/foo/secret.rb", "class Secret; end") end @project.require_mock_gem(foo) - @project.bundle_install + @project.bundle_install! - @project.write("sorbet/tapioca/require.rb", <<~RB) + @project.write!("sorbet/tapioca/require.rb", <<~RB) require "foo/secret" RB @@ -538,12 +553,12 @@ class Secret; end it "loads gems that are marked `require: false`" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) - write("lib/foo/secret.rb", "class Secret; end") + write!("lib/foo.rb", FOO_RB) + write!("lib/foo/secret.rb", "class Secret; end") end bar = mock_gem("bar", "1.0.0") do - write("lib/bar.rb", <<~RUBY) + write!("lib/bar.rb", <<~RUBY) module Foo MY_CONSTANT = 42 end @@ -552,9 +567,9 @@ module Foo @project.require_mock_gem(foo, require: false) @project.require_mock_gem(bar, require: false) - @project.bundle_install + @project.bundle_install! - @project.write("sorbet/tapioca/require.rb", <<~RB) + @project.write!("sorbet/tapioca/require.rb", <<~RB) require "foo/secret" RB @@ -577,18 +592,18 @@ class Secret; end assert_empty_stderr(result) assert_success_status(result) - @project.remove("sorbet/tapioca/require.rb") + @project.remove!("sorbet/tapioca/require.rb") end it "explains what went wrong when it can't load the postrequire properly" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) + write!("lib/foo.rb", FOO_RB) end @project.require_mock_gem(foo) - @project.bundle_install + @project.bundle_install! - @project.write("sorbet/tapioca/require.rb", <<~RB) + @project.write!("sorbet/tapioca/require.rb", <<~RB) require "foo/will_fail" RB @@ -604,18 +619,18 @@ class Secret; end refute_success_status(result) - @project.remove("sorbet/tapioca/require.rb") + @project.remove!("sorbet/tapioca/require.rb") end it "must not include `rbi` definitions into `tapioca` RBI" do - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem tapioca", exclude: []) assert_stdout_includes(result, <<~OUT) Compiled tapioca OUT - tapioca_rbi_file = T.must(Dir.glob("#{@project.path}/sorbet/rbi/gems/tapioca@*.rbi").first) + tapioca_rbi_file = T.must(Dir.glob("#{@project.absolute_path}/sorbet/rbi/gems/tapioca@*.rbi").first) refute_includes(File.read(tapioca_rbi_file), "class RBI::Module") assert_empty_stderr(result) @@ -624,21 +639,21 @@ class Secret; end it "must generate multiple gem RBIs" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) + write!("lib/foo.rb", FOO_RB) end bar = mock_gem("bar", "0.3.0") do - write("lib/bar.rb", BAR_RB) + write!("lib/bar.rb", BAR_RB) end baz = mock_gem("baz", "0.0.2") do - write("lib/baz.rb", BAZ_RB) + write!("lib/baz.rb", BAZ_RB) end @project.require_mock_gem(foo) @project.require_mock_gem(bar) @project.require_mock_gem(baz) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem foo bar") @@ -654,21 +669,21 @@ class Secret; end it "must generate RBIs for all gems in the Gemfile" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) + write!("lib/foo.rb", FOO_RB) end bar = mock_gem("bar", "0.3.0") do - write("lib/bar.rb", BAR_RB) + write!("lib/bar.rb", BAR_RB) end baz = mock_gem("baz", "0.0.2") do - write("lib/baz.rb", BAZ_RB) + write!("lib/baz.rb", BAZ_RB) end @project.require_mock_gem(foo) @project.require_mock_gem(bar) @project.require_mock_gem(baz) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem --all") @@ -685,13 +700,13 @@ class Secret; end end it "must not generate RBIs for missing gem specs" do - @project.gemfile(<<~GEMFILE, append: true) + @project.write_gemfile!(<<~GEMFILE, append: true) platform :rbx do gem "ruby2_keywords", "0.0.5" end GEMFILE - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem --all") @@ -703,11 +718,11 @@ class Secret; end end it "must generate git gem RBIs with source revision numbers" do - @project.gemfile(<<~GEMFILE, append: true) + @project.write_gemfile!(<<~GEMFILE, append: true) gem("faraday", git: "https://github.com/lostisland/faraday", ref: "23e249563613971ced8f851230c46b9eeeefe931") GEMFILE - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem faraday") @@ -723,7 +738,7 @@ class Secret; end it "must generate RBIs for gems whose folder location starts with the same prefix as project folder" do # Set the gem path so that the project folder is a prefix of the gem folder - gem_path = @project.path + "-gem/foo" + gem_path = @project.absolute_path + "-gem/foo" gem = mock_gem("foo", "0.0.1", path: gem_path) @project.require_mock_gem(gem) @@ -739,7 +754,7 @@ class Secret; end @project.require_mock_gem(mock_gem("foo", "0.0.1")) @project.require_mock_gem(mock_gem("bar", "0.3.0")) @project.require_mock_gem(mock_gem("baz", "0.0.2")) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem --all --exclude foo bar") @@ -760,7 +775,7 @@ class Secret; end @project.require_mock_gem(mock_gem("foo", "0.0.1")) @project.require_mock_gem(mock_gem("bar", "0.3.0", dependencies: ["bundler", "actionpack"])) @project.require_mock_gem(mock_gem("baz", "0.0.2")) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem foo bar --include-dependencies") @@ -774,7 +789,7 @@ class Secret; end assert_project_file_exist("sorbet/rbi/gems/foo@0.0.1.rbi") assert_project_file_exist("sorbet/rbi/gems/bar@0.3.0.rbi") assert_project_file_exist("sorbet/rbi/gems/actionpack@7.0.6.rbi") - assert_project_file_exist("sorbet/rbi/gems/rack@2.2.8.rbi") + assert_project_file_exist("sorbet/rbi/gems/rack@2.2.8.1.rbi") refute_project_file_exist("sorbet/rbi/gems/baz@0.0.2.rbi") assert_empty_stderr(result) @@ -783,14 +798,14 @@ class Secret; end it "does not crash when the extras gem is loaded" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) + write!("lib/foo.rb", FOO_RB) end @project.require_real_gem("extras") @project.require_mock_gem(foo) - @project.bundle_install + @project.bundle_install! - @project.write("sorbet/tapioca/require.rb", <<~RB) + @project.write!("sorbet/tapioca/require.rb", <<~RB) require "extras/shell" RB @@ -806,7 +821,7 @@ class Secret; end it "generate an empty RBI file" do @project.require_mock_gem(mock_gem("foo", "0.0.1")) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem foo") @@ -830,7 +845,7 @@ class Secret; end it "generate an empty RBI file without header" do @project.require_mock_gem(mock_gem("foo", "0.0.1")) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem foo --no-file-header") @@ -849,7 +864,7 @@ class Secret; end @project.require_mock_gem(mock_gem("foo", "0.0.1")) @project.require_mock_gem(mock_gem("bar", "0.3.0")) @project.require_mock_gem(mock_gem("baz", "0.0.2")) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem --all --workers 3") @@ -876,7 +891,7 @@ class Secret; end # get `Rake::TaskLib` in the output. fake_yard = mock_gem("fake_yard", "0.0.1") do # Top-level autoloads `FakeYard::Rake` module. - write("lib/fake_yard.rb", <<~RB) + write!("lib/fake_yard.rb", <<~RB) module FakeYard autoload :Rake, __dir__ + "/fake_yard/rake.rb" end @@ -886,7 +901,7 @@ module FakeYard # # This file is mostly here to make sure that we handle autoloads # inside autoloaded files properly. - write("lib/fake_yard/rake.rb", <<~RB) + write!("lib/fake_yard/rake.rb", <<~RB) module FakeYard module Rake autoload :YardocTask, __dir__ + "/yardoc_task.rb" @@ -896,7 +911,7 @@ module Rake # Finally `FakeYard::Rake::YardocTask` requires a non-default path from # `fake_rake` gem, `fake_rake/tasklib`, and subclasses from `FakeRake::TaskLib` - write("lib/fake_yard/yardoc_task.rb", <<~RB) + write!("lib/fake_yard/yardoc_task.rb", <<~RB) require 'fake_rake' require 'fake_rake/tasklib' @@ -911,13 +926,13 @@ class YardocTask < ::FakeRake::TaskLib fake_rake = mock_gem("fake_rake", "0.0.1") do # The default require does nothing but define the gem namespace. - write("lib/fake_rake.rb", <<~RB) + write!("lib/fake_rake.rb", <<~RB) module FakeRake end RB # The non-default require defines `FakeRake::TaskLib` - write("lib/fake_rake/tasklib.rb", <<~RB) + write!("lib/fake_rake/tasklib.rb", <<~RB) module FakeRake class TaskLib end @@ -927,7 +942,7 @@ class TaskLib @project.require_mock_gem(fake_yard) @project.require_mock_gem(fake_rake) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem fake_rake") assert_empty_stderr(result) @@ -951,7 +966,7 @@ class FakeRake::TaskLib; end it "uses the correct autoload, even when a gem redefines it via alias-method-chain" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", <<~RB) + write!("lib/foo.rb", <<~RB) class Module alias_method :autoload_without_foo, :autoload @@ -963,7 +978,7 @@ def autoload(const, path) end @project.require_mock_gem(foo) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem foo") assert_empty_stderr(result) @@ -972,14 +987,14 @@ def autoload(const, path) it "uses ignores `abort` and `exit` calls inside autoloaded files" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", <<~RB) + write!("lib/foo.rb", <<~RB) module Foo autoload :Bar, __dir__ + "/foo/bar.rb" autoload :Baz, __dir__ + "/foo/baz.rb" end RB - write("lib/foo/bar.rb", <<~RB) + write!("lib/foo/bar.rb", <<~RB) begin abort("Cannot continue") rescue @@ -988,7 +1003,7 @@ module Foo end RB - write("lib/foo/baz.rb", <<~RB) + write!("lib/foo/baz.rb", <<~RB) begin exit 2 rescue @@ -1003,7 +1018,7 @@ module Foo @project.require_real_gem("rdoc") # Just so that we have something else we can generate for. @project.require_real_gem("json") - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem json") assert_empty_stderr(result) @@ -1012,7 +1027,7 @@ module Foo it "must wrap long signatures to 120 chars by default" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", <<~RBI) + write!("lib/foo.rb", <<~RBI) module Foo extend T::Sig @@ -1026,7 +1041,7 @@ def foo(a, b, c, d, e, f, g, h); end end @project.require_mock_gem(foo) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem foo") @@ -1063,7 +1078,7 @@ def foo(a, b, c, d, e, f, g, h); end it "must wrap long signatures to specified chars" do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", <<~RBI) + write!("lib/foo.rb", <<~RBI) module Foo extend T::Sig @@ -1077,7 +1092,7 @@ def foo(a, b, c, d, e, f, g, h); end end @project.require_mock_gem(foo) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem foo --rbi-max-line-length 80") @@ -1122,262 +1137,8 @@ def foo(a, b, c, d, e, f, g, h); end assert_success_status(result) end - it "must do mixin attribution properly" do - # This is pattern is taken from the private `typed_parameters` gem. - typed_parameters = mock_gem("typed_parameters", "0.3.0") do - write("lib/typed_parameters.rb", <<~RUBY) - require "action_controller" - module TypedParameters - end - # This dynamic mixin should be generated in the gem RBI - ActionController::Parameters.include(TypedParameters) - RUBY - end - - @project.require_real_gem("actionpack", "6.1.4.4") - @project.require_mock_gem(typed_parameters) - - @project.bundle_install - - response = @project.tapioca("gem actionpack typed_parameters") - - assert_includes(response.out, "Compiled actionpack") - assert_includes(response.out, "Compiled typed_parameters") - - actionpack_rbi = @project.read("sorbet/rbi/gems/actionpack@6.1.4.4.rbi") - # actionpack RBI should have nothing in it about `TypedParameters` - refute_includes(actionpack_rbi, "TypedParameters") - - assert_project_file_equal("sorbet/rbi/gems/typed_parameters@0.3.0.rbi", <<~RBI) - # typed: true - - # DO NOT EDIT MANUALLY - # This is an autogenerated file for types exported from the `typed_parameters` gem. - # Please instead update this file by running `bin/tapioca gem typed_parameters`. - - class ActionController::Parameters - include ::TypedParameters - end - - module TypedParameters; end - RBI - end - - it "must do mixin attribution properly when include occurs in other gem" do - some_engine = mock_gem("some_engine", "0.0.2") do - write("lib/some_engine.rb", <<~RUBY) - require "action_controller" - - module SomeEngine - class SomeController < ActionController::Base - # This method triggers a dynamic mixin which should be attributed to this gem - # and not actionpack, even though the real `include` happens inside actionpack - helper_method :foo - end - end - RUBY - end - - @project.require_real_gem("actionpack", "6.1.4.4") - @project.require_mock_gem(some_engine) - @project.bundle_install - - response = @project.tapioca("gem actionpack some_engine") - - assert_includes(response.out, "Compiled actionpack") - assert_includes(response.out, "Compiled some_engine") - - actionpack_rbi = @project.read("sorbet/rbi/gems/actionpack@6.1.4.4.rbi") - # actionpack RBI should have nothing in it about `SomeEngine` - refute_includes(actionpack_rbi, "SomeEngine") - - expected = template(<<~RBI) - # typed: true - - # DO NOT EDIT MANUALLY - # This is an autogenerated file for types exported from the `some_engine` gem. - # Please instead update this file by running `bin/tapioca gem some_engine`. - - module SomeEngine; end - - class SomeEngine::SomeController < ::ActionController::Base - private - - def _layout(lookup_context, formats); end - - class << self - def _helper_methods; end - def middleware_stack; end - end - end - - module SomeEngine::SomeController::HelperMethods - include ::ActionController::Base::HelperMethods - - <% if ruby_version(">= 3.1") %> - def foo(*args, **_arg1, &block); end - <% else %> - def foo(*args, &block); end - <% end %> - end - RBI - - assert_project_file_equal("sorbet/rbi/gems/some_engine@0.0.2.rbi", expected) - end - - it "must generate RBIs for constants defined in a different gem but with mixins in this gem" do - foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", <<~RBI) - class Foo - def baz; end - def buzz; end - end - RBI - end - - bar = mock_gem("bar", "0.0.2") do - write("lib/bar.rb", <<~RBI) - module Bar; end - - Foo.prepend(Bar) - RBI - end - - @project.require_mock_gem(foo) - @project.require_mock_gem(bar) - @project.bundle_install - - @project.tapioca("gem bar") - - assert_project_file_equal("sorbet/rbi/gems/bar@0.0.2.rbi", <<~RBI) - # typed: true - - # DO NOT EDIT MANUALLY - # This is an autogenerated file for types exported from the `bar` gem. - # Please instead update this file by running `bin/tapioca gem bar`. - - module Bar; end - - class Foo - include ::Bar - end - RBI - end - - it "must not generate RBIs for constants that have dynamic mixins performed in other gems" do - bar = mock_gem("bar", "0.0.2") do - write("lib/bar.rb", <<~RBI) - module Bar; end - RBI - end - - foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", <<~RBI) - class Foo; end - String.prepend(Bar) - RBI - end - - @project.require_mock_gem(bar) - @project.require_mock_gem(foo) - @project.bundle_install - - @project.tapioca("gem bar") - - assert_project_file_equal("sorbet/rbi/gems/bar@0.0.2.rbi", <<~RBI) - # typed: true - - # DO NOT EDIT MANUALLY - # This is an autogenerated file for types exported from the `bar` gem. - # Please instead update this file by running `bin/tapioca gem bar`. - - module Bar; end - RBI - end - - it "must generate RBIs for constants that have dynamic mixins performed in the gem" do - bar = mock_gem("bar", "0.0.2") do - write("lib/bar.rb", <<~RBI) - class Bar - def bar; end - end - RBI - end - - foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", <<~RBI) - module Foo; end - class Baz < Bar; end - - Bar.prepend(Foo) - RBI - end - - @project.require_mock_gem(bar) - @project.require_mock_gem(foo) - @project.bundle_install - - @project.tapioca("gem bar foo") - - assert_project_file_equal("sorbet/rbi/gems/foo@0.0.1.rbi", <<~RBI) - # typed: true - - # DO NOT EDIT MANUALLY - # This is an autogenerated file for types exported from the `foo` gem. - # Please instead update this file by running `bin/tapioca gem foo`. - - class Bar - include ::Foo - end - - class Baz < ::Bar; end - module Foo; end - RBI - end - - it "must generate RBIs for foreign constants whose singleton class overrides #inspect" do - bar = mock_gem("bar", "0.0.2") do - write("lib/bar.rb", <<~RBI) - class Bar - def self.inspect - "Override!" - end - end - RBI - end - - foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", <<~RBI) - module Foo; end - - Bar.singleton_class.include(Foo) - RBI - end - - @project.require_mock_gem(bar) - @project.require_mock_gem(foo) - @project.bundle_install - - result = @project.tapioca("gem foo") - assert_empty_stderr(result) - - assert_project_file_equal("sorbet/rbi/gems/foo@0.0.1.rbi", <<~RBI) - # typed: true - - # DO NOT EDIT MANUALLY - # This is an autogenerated file for types exported from the `foo` gem. - # Please instead update this file by running `bin/tapioca gem foo`. - - class Bar - extend ::Foo - end - - module Foo; end - RBI - end - it "must not load engines in the application" do - @project.write("config/application.rb", <<~RB) + @project.write!("config/application.rb", <<~RB) require "rails" module ModuleTest @@ -1386,7 +1147,7 @@ class Application < Rails::Application def initialize super - root = Pathname.new("#{@project.path}") + root = Pathname.new("#{@project.absolute_path}") @config = Rails::Application::Configuration.new(root) end end @@ -1407,15 +1168,15 @@ def self.application end RB - @project.write("config/environment.rb", <<~RB) + @project.write!("config/environment.rb", <<~RB) require_relative "application.rb" RB - @project.write("foo/app/models/foo.rb", <<~RB) + @project.write!("foo/app/models/foo.rb", <<~RB) raise NotImplementedError, "This file should not be loaded" RB - @project.write("foo/lib/foo.rb", <<~RB) + @project.write!("foo/lib/foo.rb", <<~RB) module Foo class Engine < ::Rails::Engine isolate_namespace Foo @@ -1423,7 +1184,7 @@ class Engine < ::Rails::Engine end RB - @project.write("foo/foo.gemspec", <<~GEMSPEC) + @project.write!("foo/foo.gemspec", <<~GEMSPEC) Gem::Specification.new do |spec| spec.name = "foo" spec.version = "0.0.1" @@ -1439,11 +1200,11 @@ class Engine < ::Rails::Engine GEMSPEC @project.require_real_gem("rails") - @project.gemfile(<<~GEMFILE, append: true) + @project.write_gemfile!(<<~GEMFILE, append: true) gem 'foo', path: 'foo' GEMFILE - @project.bundle_install + @project.bundle_install! res = @project.tapioca("gem activesupport") refute_includes(res.err, "This file should not be loaded") @@ -1452,7 +1213,7 @@ class Engine < ::Rails::Engine it "must generate top-level and namespaced constants from engines" do foo = mock_gem("foo", "0.0.2") do - write("lib/foo.rb", <<~RB) + write!("lib/foo.rb", <<~RB) require "rails" module Foo @@ -1462,12 +1223,12 @@ class Engine < ::Rails::Engine end RB - write("app/models/user.rb", <<~RB) + write!("app/models/user.rb", <<~RB) class User end RB - write("app/models/post.rb", <<~RB) + write!("app/models/post.rb", <<~RB) module Foo class Post end @@ -1477,7 +1238,7 @@ class Post @project.require_real_gem("rails") @project.require_mock_gem(foo) - @project.bundle_install + @project.bundle_install! res = @project.tapioca("gem foo") @@ -1505,7 +1266,7 @@ class User; end it "does not crash while tracking `rbtrace` constants" do @project.require_real_gem("rbtrace", "0.4.14") - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem rbtrace") assert_empty_stderr(result) assert_success_status(result) @@ -1514,9 +1275,9 @@ class User; end it "generates correct RBIs for a Rails engine in Zeitwerk mode" do @project.require_real_gem("rails", "6.1.7.2") @project.require_real_gem("turbo-rails", "1.3.2") - @project.bundle_install + @project.bundle_install! - @project.write("config/application.rb", <<~RB) + @project.write!("config/application.rb", <<~RB) require "rails" module Foo @@ -1545,9 +1306,9 @@ class Application < Rails::Application it "generates correct RBIs for a Rails engine in Classic mode" do @project.require_real_gem("rails", "6.1.7.2") @project.require_real_gem("turbo-rails", "1.3.2") - @project.bundle_install + @project.bundle_install! - @project.write("config/application.rb", <<~RB) + @project.write!("config/application.rb", <<~RB) require "rails" module Foo @@ -1572,51 +1333,6 @@ class Application < Rails::Application assert_includes(turbo_streams_rbi, "module Turbo::Streams; end") assert_includes(turbo_streams_rbi, "module Turbo::Streams::ActionHelper") end - - it "generates documentation only for the gem that defines it" do - foo = mock_gem("foo", "0.0.2") do - write("lib/foo.rb", <<~RB) - # Most objects are cloneable - class Object - def foo; end - end - RB - end - bar = mock_gem("bar", "0.0.2") do - write("lib/bar.rb", <<~RB) - class Object - def bar; end - end - RB - end - baz = mock_gem("baz", "0.0.2") do - write("lib/baz.rb", <<~RB) - def baz; end - RB - end - - @project.require_mock_gem(foo) - @project.require_mock_gem(bar) - @project.require_mock_gem(baz) - @project.bundle_install - - result = @project.tapioca("gem bar foo baz --doc") - - foo_rbi = @project.read("sorbet/rbi/gems/foo@0.0.2.rbi") - bar_rbi = @project.read("sorbet/rbi/gems/bar@0.0.2.rbi") - baz_rbi = @project.read("sorbet/rbi/gems/baz@0.0.2.rbi") - - documentation = <<~RBI - # Most objects are cloneable - RBI - - assert_includes(foo_rbi, documentation) - refute_includes(bar_rbi, documentation) - refute_includes(baz_rbi, documentation) - - assert_empty_stderr(result) - assert_success_status(result) - end end describe "sync" do @@ -1624,21 +1340,35 @@ def baz; end @project.require_mock_gem(mock_gem("foo", "0.0.1")) @project.require_mock_gem(mock_gem("bar", "0.3.0")) @project.require_mock_gem(mock_gem("baz", "0.0.2")) - @project.bundle_install + @project.bundle_install! end after do - @project.remove("sorbet/rbi/gems") + @project.remove!("sorbet/rbi/gems") end after(:all) do - @project.remove("../gems") + @project.remove!("../gems") + end + + it "must generate a .gitattributes file in the output folder" do + result = @project.tapioca("gem --outdir output") + + assert_stdout_includes(result, "create output/foo@0.0.1.rbi") + assert_empty_stderr(result) + assert_success_status(result) + + assert_project_file_equal("output/.gitattributes", <<~CONTENT) + **/*.rbi linguist-generated=true + CONTENT + ensure + @project.remove!("output") end it "must perform no operations if everything is up-to-date" do - @project.write("sorbet/rbi/gems/foo@0.0.1.rbi") - @project.write("sorbet/rbi/gems/bar@0.3.0.rbi") - @project.write("sorbet/rbi/gems/baz@0.0.2.rbi") + @project.write!("sorbet/rbi/gems/foo@0.0.1.rbi") + @project.write!("sorbet/rbi/gems/bar@0.3.0.rbi") + @project.write!("sorbet/rbi/gems/baz@0.0.2.rbi") result = @project.tapioca("gem") @@ -1657,9 +1387,9 @@ def baz; end end it "must respect exclude option" do - @project.write("sorbet/rbi/gems/foo@0.0.1.rbi") - @project.write("sorbet/rbi/gems/bar@0.3.0.rbi") - @project.write("sorbet/rbi/gems/baz@0.0.2.rbi") + @project.write!("sorbet/rbi/gems/foo@0.0.1.rbi") + @project.write!("sorbet/rbi/gems/bar@0.3.0.rbi") + @project.write!("sorbet/rbi/gems/baz@0.0.2.rbi") result = @project.tapioca("gem --exclude foo bar") @@ -1680,10 +1410,10 @@ def baz; end end it "must remove outdated RBIs" do - @project.write("sorbet/rbi/gems/foo@0.0.1.rbi") - @project.write("sorbet/rbi/gems/bar@0.3.0.rbi") - @project.write("sorbet/rbi/gems/baz@0.0.2.rbi") - @project.write("sorbet/rbi/gems/outdated@5.0.0.rbi") + @project.write!("sorbet/rbi/gems/foo@0.0.1.rbi") + @project.write!("sorbet/rbi/gems/bar@0.3.0.rbi") + @project.write!("sorbet/rbi/gems/baz@0.0.2.rbi") + @project.write!("sorbet/rbi/gems/outdated@5.0.0.rbi") result = @project.tapioca("gem") @@ -1703,7 +1433,7 @@ def baz; end end it "must add missing RBIs" do - @project.write("sorbet/rbi/gems/foo@0.0.1.rbi") + @project.write!("sorbet/rbi/gems/foo@0.0.1.rbi") result = @project.tapioca("gem") @@ -1727,9 +1457,9 @@ def baz; end end it "must move outdated RBIs" do - @project.write("sorbet/rbi/gems/foo@0.0.1.rbi") - @project.write("sorbet/rbi/gems/bar@0.0.1.rbi") - @project.write("sorbet/rbi/gems/baz@0.0.1.rbi") + @project.write!("sorbet/rbi/gems/foo@0.0.1.rbi") + @project.write!("sorbet/rbi/gems/bar@0.0.1.rbi") + @project.write!("sorbet/rbi/gems/baz@0.0.1.rbi") result = @project.tapioca("gem") @@ -1772,11 +1502,11 @@ def baz; end before(:all) do @project.require_mock_gem(mock_gem("foo", "0.0.1")) @project.require_mock_gem(mock_gem("bar", "0.3.0")) - @project.bundle_install + @project.bundle_install! end after(:all) do - @project.remove("../gems") + @project.remove!("../gems") end it "does nothing and returns exit_status 0 when nothing changes" do @@ -1784,7 +1514,7 @@ def baz; end result = @project.tapioca("gem --verify") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Checking for out-of-date RBIs... Nothing to do, all RBIs are up-to-date. @@ -1799,7 +1529,7 @@ def baz; end result = @project.tapioca("gem --verify --exclude foo bar") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Checking for out-of-date RBIs... Nothing to do, all RBIs are up-to-date. @@ -1816,13 +1546,13 @@ def baz; end it "advises of added/removed/changed file(s) and returns exit_status 1" do @project.tapioca("gem") - @project.remove("sorbet/rbi/gems/foo@0.0.1.rbi") - @project.write("sorbet/rbi/gems/outdated@5.0.0.rbi") - @project.move("sorbet/rbi/gems/bar@0.3.0.rbi", "sorbet/rbi/gems/bar@0.2.0.rbi") + @project.remove!("sorbet/rbi/gems/foo@0.0.1.rbi") + @project.write!("sorbet/rbi/gems/outdated@5.0.0.rbi") + @project.move!("sorbet/rbi/gems/bar@0.3.0.rbi", "sorbet/rbi/gems/bar@0.2.0.rbi") result = @project.tapioca("gem --verify") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Checking for out-of-date RBIs... OUT @@ -1832,7 +1562,7 @@ def baz; end assert_project_file_exist("sorbet/rbi/gems/outdated@5.0.0.rbi") assert_project_file_exist("sorbet/rbi/gems/bar@0.2.0.rbi") - assert_equal(<<~ERROR, result.err) + assert_stderr_equals(<<~ERROR, result) RBI files are out-of-date. In your development environment, please run: `bin/tapioca gem` Once it is complete, be sure to commit and push any changes @@ -1855,7 +1585,7 @@ def baz; end @project.tapioca("configure") foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", <<~RB) + write!("lib/foo.rb", <<~RB) module Foo def foo(a, b, c); end end @@ -1863,7 +1593,7 @@ def foo(a, b, c); end end bar = mock_gem("bar", "0.3.0") do - write("lib/bar.rb", <<~RB) + write!("lib/bar.rb", <<~RB) module Bar def bar(a, b, c); end end @@ -1871,7 +1601,7 @@ def bar(a, b, c); end end baz = mock_gem("baz", "1.0.0") do - write("lib/baz.rb", <<~RB) + write!("lib/baz.rb", <<~RB) module Baz def baz(a, b, c); end end @@ -1881,9 +1611,9 @@ def baz(a, b, c); end @project.require_mock_gem(foo) @project.require_mock_gem(bar) @project.require_mock_gem(baz) - @project.bundle_install + @project.bundle_install! - @project.write("sorbet/rbi/dsl/foo.rbi", <<~RBI) + @project.write!("sorbet/rbi/dsl/foo.rbi", <<~RBI) # typed: true module Foo @@ -1906,7 +1636,7 @@ def quux(x); end end after do - project.remove("sorbet/rbi/gems") + project.remove!("sorbet/rbi/gems") end it "must turn the strictness of files with errors to false" do @@ -1930,7 +1660,7 @@ def quux(x); end end it "must turn the strictness of files with error to false with a custom dir" do - @project.write("sorbet/rbi/shims/foo.rbi", <<~RBI) + @project.write!("sorbet/rbi/shims/foo.rbi", <<~RBI) # typed: true module Foo @@ -1955,33 +1685,33 @@ def foo; end assert_empty_stderr(result) assert_success_status(result) - @project.remove("sorbet/rbi/shims/foo.rbi") + @project.remove!("sorbet/rbi/shims/foo.rbi") end end describe "sanity" do before(:all) do foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) + write!("lib/foo.rb", FOO_RB) end bar = mock_gem("bar", "1.0.0") do - write("lib/bar.rb", BAR_RB) + write!("lib/bar.rb", BAR_RB) end @project.require_mock_gem(foo) @project.require_mock_gem(bar) - @project.bundle_install + @project.bundle_install! @project.tapioca("configure") end after do - project.remove("sorbet/rbi/gems") - project.remove("sorbet/rbi/dsl") + project.remove!("sorbet/rbi/gems") + project.remove!("sorbet/rbi/dsl") end it "must display an error message when a generated gem RBI file contains a parse error" do - @project.write("sorbet/rbi/gems/bar@1.0.0.rbi", <<~RBI) + @project.write!("sorbet/rbi/gems/bar@1.0.0.rbi", <<~RBI) # typed: true module Bar @@ -2025,11 +1755,42 @@ def bar(&block); end it "generates the correct type variable syntax" do type_variable = mock_gem("type_variable", "0.0.1") do - write("lib/type_variable.rb", TYPE_VARIABLE_RB) + write!("lib/type_variable.rb", <<~RB) + # typed: true + + class ComplexGenericType + extend T::Generic + + A = type_template(:in) + B = type_template(:out) + C = type_template + D = type_member { { fixed: Integer } } + E = type_member { { fixed: Integer, upper: Numeric } } + F = type_member { { fixed: Integer, lower: Complex, upper: Numeric } } + G = type_member(:in) { { fixed: Integer } } + H = type_member(:in) { { fixed: Integer, upper: Numeric } } + I = type_member(:in) { { fixed: Integer, lower: Complex, upper: Numeric } } + + class << self + extend T::Generic + + A = type_template(:in) + B = type_template(:out) + C = type_template + + D = type_member { { fixed: Integer } } + E = type_member { { fixed: Integer, upper: Numeric } } + F = type_member { { fixed: Integer, lower: Complex, upper: Numeric } } + G = type_member(:in) { { fixed: Integer } } + H = type_member(:in) { { fixed: Integer, upper: Numeric } } + I = type_member(:in) { { fixed: Integer, lower: Complex, upper: Numeric } } + end + end + RB end @project.require_mock_gem(type_variable) - @project.bundle_install + @project.bundle_install! result = @project.tapioca("gem type_variable") @@ -2083,14 +1844,14 @@ class << self @project.tapioca("configure") foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", <<~RB) + write!("lib/foo.rb", <<~RB) $stderr.puts "RAILS ENVIRONMENT: \#{ENV["RAILS_ENV"]}" $stderr.puts "RACK ENVIRONMENT: \#{ENV["RACK_ENV"]}" RB end @project.require_mock_gem(foo, require: false) - @project.bundle_install + @project.bundle_install! end it "must default to `development` as environment" do @@ -2098,7 +1859,7 @@ class << self assert_success_status(result) - assert_equal(<<~OUT, result.err) + assert_stderr_equals(<<~OUT, result) RAILS ENVIRONMENT: development RACK ENVIRONMENT: development OUT @@ -2109,7 +1870,7 @@ class << self assert_success_status(result) - assert_equal(<<~OUT, result.err) + assert_stderr_equals(<<~OUT, result) RAILS ENVIRONMENT: staging RACK ENVIRONMENT: staging OUT @@ -2118,11 +1879,11 @@ class << self describe "halt-upon-load-error" do before(:all) do - @project.write("config/environment.rb", <<~RB) + @project.write!("config/environment.rb", <<~RB) require_relative "application.rb" RB - @project.write("config/application.rb", <<~RB) + @project.write!("config/application.rb", <<~RB) require "rails" module Test @@ -2133,16 +1894,16 @@ class Application < Rails::Application RB foo = mock_gem("foo", "0.0.1") do - write("lib/foo.rb", FOO_RB) + write!("lib/foo.rb", FOO_RB) end @project.require_mock_gem(foo) @project.require_real_gem("rails") - @project.bundle_install + @project.bundle_install! end after(:all) do - @project.remove("config/application.rb") + @project.remove!("config/application.rb") end it "halts upon load errors when rails application cannot be loaded" do diff --git a/spec/tapioca/cli/help_spec.rb b/spec/tapioca/cli/help_spec.rb index ad71504d5..f0534e309 100644 --- a/spec/tapioca/cli/help_spec.rb +++ b/spec/tapioca/cli/help_spec.rb @@ -7,7 +7,7 @@ module Tapioca class HelpSpec < SpecWithProject describe("cli::help") do before(:all) do - project.bundle_install + project.bundle_install! end it "must display the help when passing --help" do diff --git a/spec/tapioca/cli/require_spec.rb b/spec/tapioca/cli/require_spec.rb index 2897ce567..b6b43af7f 100644 --- a/spec/tapioca/cli/require_spec.rb +++ b/spec/tapioca/cli/require_spec.rb @@ -7,20 +7,20 @@ module Tapioca class RequireSpec < SpecWithProject describe "cli::require" do before(:all) do - project.bundle_install + project.bundle_install! project.tapioca("configure") end after do - @project.remove("lib/") - @project.remove("test/") - @project.remove("sorbet/tapioca/require.rb") + @project.remove!("lib/") + @project.remove!("test/") + @project.remove!("sorbet/tapioca/require.rb") end it "does nothing if there is nothing to require" do result = @project.tapioca("require") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Compiling sorbet/tapioca/require.rb, this may take a few seconds... Nothing to do OUT @@ -29,19 +29,19 @@ class RequireSpec < SpecWithProject end it "creates a list of all requires from all Ruby files passed to Sorbet" do - @project.write("lib/foo.rb", <<~RB) + @project.write!("lib/foo.rb", <<~RB) require "found2" require "bar" RB - @project.write("lib/bar.rb", <<~RB) + @project.write!("lib/bar.rb", <<~RB) require "found1" require "foo" RB result = @project.tapioca("require") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Compiling sorbet/tapioca/require.rb, this may take a few seconds... Done All requires from this application have been written to sorbet/tapioca/require.rb. Please review changes and commit them, then run `bin/tapioca gem`. @@ -60,26 +60,26 @@ class RequireSpec < SpecWithProject end it "takes into account sorbet ignored paths" do - @project.write("lib/foo.rb", <<~RB) + @project.write!("lib/foo.rb", <<~RB) require "found2" RB - @project.write("lib/bar.rb", <<~RB) + @project.write!("lib/bar.rb", <<~RB) require "found1" RB - @project.write("test/foo_test.rb", <<~RB) + @project.write!("test/foo_test.rb", <<~RB) require "not_found" RB - @project.sorbet_config(<<~CONFIG) + @project.write_sorbet_config!(<<~CONFIG) . --ignore=test/ CONFIG result = @project.tapioca("require") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) Compiling sorbet/tapioca/require.rb, this may take a few seconds... Done All requires from this application have been written to sorbet/tapioca/require.rb. Please review changes and commit them, then run `bin/tapioca gem`. diff --git a/spec/tapioca/cli/todo_spec.rb b/spec/tapioca/cli/todo_spec.rb index 05cd840d3..34e8fd75f 100644 --- a/spec/tapioca/cli/todo_spec.rb +++ b/spec/tapioca/cli/todo_spec.rb @@ -7,19 +7,19 @@ module Tapioca class TodoSpec < SpecWithProject describe "cli::todo" do before(:all) do - project.bundle_install + project.bundle_install! project.tapioca("configure") end after do - @project.remove("lib/") - @project.remove("sorbet/rbi") + @project.remove!("lib/") + @project.remove!("sorbet/rbi") end it "does nothing if all constant are already resolved" do result = @project.tapioca("todo") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) #{Commands::Todo::DEPRECATION_MESSAGE} Finding all unresolved constants, this may take a few seconds... Nothing to do OUT @@ -31,7 +31,7 @@ class TodoSpec < SpecWithProject end it "creates a list of all unresolved constants" do - @project.write("lib/file.rb", <<~RB) + @project.write!("lib/file.rb", <<~RB) class Foo < ::Undef1 def foo Undef2.new @@ -62,7 +62,7 @@ def bar2 result = @project.tapioca("todo") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) #{Commands::Todo::DEPRECATION_MESSAGE} Finding all unresolved constants, this may take a few seconds... Done @@ -91,13 +91,13 @@ module Foo::Undef5; end end it "creates a TODO file without header" do - @project.write("lib/file.rb", <<~RUBY) + @project.write!("lib/file.rb", <<~RUBY) class Foo < ::Undef1; end RUBY result = @project.tapioca("todo --no-file-header") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) #{Commands::Todo::DEPRECATION_MESSAGE} Finding all unresolved constants, this may take a few seconds... Done @@ -116,7 +116,7 @@ module ::Undef1; end end it "deletes the todo.rbi file when everything is resolved" do - @project.write("sorbet/rbi/todo.rbi", <<~RB) + @project.write!("sorbet/rbi/todo.rbi", <<~RB) # typed: false module SomeTodo; end @@ -124,7 +124,7 @@ module SomeTodo; end result = @project.tapioca("todo") - assert_equal(<<~OUT, result.out) + assert_stdout_equals(<<~OUT, result) #{Commands::Todo::DEPRECATION_MESSAGE} Finding all unresolved constants, this may take a few seconds... Nothing to do OUT diff --git a/spec/tapioca/cli/version_spec.rb b/spec/tapioca/cli/version_spec.rb index 9b7438dc5..c226ae9b9 100644 --- a/spec/tapioca/cli/version_spec.rb +++ b/spec/tapioca/cli/version_spec.rb @@ -7,7 +7,7 @@ module Tapioca class VersionSpec < SpecWithProject describe("cli::version") do before(:all) do - project.bundle_install + project.bundle_install! end it "must display the version when passing --version" do diff --git a/spec/tapioca/commands/annotations_spec.rb b/spec/tapioca/commands/annotations_spec.rb index 7f9f55894..24546c31e 100644 --- a/spec/tapioca/commands/annotations_spec.rb +++ b/spec/tapioca/commands/annotations_spec.rb @@ -70,7 +70,7 @@ class AnnotationsSpec < SpecWithProject before(:all) do T.bind(self, AnnotationsSpec) - project.write(".netrc", <<~NETRC) + project.write!(".netrc", <<~NETRC) machine my-private-repo-1 login user1 password TOKEN1 machine my-private-repo-2 login user1 password TOKEN2 NETRC @@ -78,7 +78,7 @@ class AnnotationsSpec < SpecWithProject end after(:all) do - project.destroy + project.destroy! end it "adds the proper headers when fetching indexes" do @@ -92,7 +92,7 @@ class AnnotationsSpec < SpecWithProject command = Annotations.new( central_repo_root_uris: [DUMMY_REPO_URI_1, DUMMY_REPO_URI_2], - netrc_file: @project.absolute_path(".netrc"), + netrc_file: @project.absolute_path_to(".netrc"), ) indexes = T.unsafe(command).stub(:say, ->(*_args) {}) do @@ -112,7 +112,7 @@ class AnnotationsSpec < SpecWithProject command = Annotations.new( central_repo_root_uris: [DUMMY_REPO_URI_1, DUMMY_REPO_URI_2], - netrc_file: @project.absolute_path(".netrc_not_found"), + netrc_file: @project.absolute_path_to(".netrc_not_found"), ) indexes = T.unsafe(command).stub(:say, ->(*_args) {}) do @@ -135,7 +135,7 @@ class AnnotationsSpec < SpecWithProject command = Annotations.new( central_repo_root_uris: [DUMMY_REPO_URI_1, DUMMY_REPO_URI_2], auth: "AUTH", - netrc_file: @project.absolute_path(".netrc"), + netrc_file: @project.absolute_path_to(".netrc"), ) indexes = T.unsafe(command).stub(:say, ->(*_args) {}) do diff --git a/spec/tapioca/dsl/compilers/aasm_spec.rb b/spec/tapioca/dsl/compilers/aasm_spec.rb index ad76d3a2d..3afa37489 100644 --- a/spec/tapioca/dsl/compilers/aasm_spec.rb +++ b/spec/tapioca/dsl/compilers/aasm_spec.rb @@ -8,6 +8,12 @@ module Dsl module Compilers class AASMSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::AASM" do + sig { void } + def before_setup + require "active_record" + require "aasm" + end + describe "initialize" do it "gathers no constants if there are no classes that include AASM" do assert_empty(gathered_constants) diff --git a/spec/tapioca/dsl/compilers/action_controller_helpers_spec.rb b/spec/tapioca/dsl/compilers/action_controller_helpers_spec.rb index a6bea7b93..982f78803 100644 --- a/spec/tapioca/dsl/compilers/action_controller_helpers_spec.rb +++ b/spec/tapioca/dsl/compilers/action_controller_helpers_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class ActionControllerHelpersSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::ActionControllerHelpers" do + sig { void } + def before_setup + require "action_controller" + end + describe "initialize" do it "gathers no constants if there are no classes" do assert_empty(gathered_constants) diff --git a/spec/tapioca/dsl/compilers/action_mailer_spec.rb b/spec/tapioca/dsl/compilers/action_mailer_spec.rb index 803e4ee83..ae857a0dc 100644 --- a/spec/tapioca/dsl/compilers/action_mailer_spec.rb +++ b/spec/tapioca/dsl/compilers/action_mailer_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class ActionMailerSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::ActionMailer" do + sig { void } + def before_setup + require "action_mailer" + end + describe "initialize" do it "gathers no constants if there are no ActionMailer subclasses" do assert_empty(gathered_constants) diff --git a/spec/tapioca/dsl/compilers/action_text_spec.rb b/spec/tapioca/dsl/compilers/action_text_spec.rb new file mode 100644 index 000000000..f622e46ee --- /dev/null +++ b/spec/tapioca/dsl/compilers/action_text_spec.rb @@ -0,0 +1,115 @@ +# typed: strict +# frozen_string_literal: true + +require "spec_helper" + +module Tapioca + module Dsl + module Compilers + class ActionTextSpec < ::DslSpec + describe "Tapioca::Dsl::Compilers::ActionText" do + sig { void } + def before_setup + require "active_record" + require "action_text" + end + + before do + add_ruby_file("require.rb", <<~RUBY) + ::ActiveRecord::Base.include(::ActionText::Attribute) + ::ActiveRecord::Base.prepend(::ActionText::Encryption) if defined?(::ActionText::Encryption) + RUBY + end + + describe "initialize" do + it "gathers no constants if there are no ActiveRecord classes" do + assert_empty(gathered_constants) + end + + it "gathers only ActiveRecord constants with rich text" do + add_ruby_file("conversation.rb", <<~RUBY) + class Post < ActiveRecord::Base + has_rich_text :body + end + + class Product < ActiveRecord::Base + self.abstract_class = true + has_rich_text :title + end + + class User + end + RUBY + + assert_equal(["Post"], gathered_constants) + end + end + + describe "decorate" do + it "generates RBI file for ActiveRecord classes with a rich text" do + add_ruby_file("post.rb", <<~RUBY) + class Post < ActiveRecord::Base + has_rich_text :body + has_rich_text :title + end + RUBY + + expected = <<~RBI + # typed: strong + + class Post + sig { returns(ActionText::RichText) } + def body; end + + sig { params(value: T.nilable(T.any(ActionText::RichText, String))).returns(T.untyped) } + def body=(value); end + + sig { returns(T::Boolean) } + def body?; end + + sig { returns(ActionText::RichText) } + def title; end + + sig { params(value: T.nilable(T.any(ActionText::RichText, String))).returns(T.untyped) } + def title=(value); end + + sig { returns(T::Boolean) } + def title?; end + end + RBI + + assert_equal(expected, rbi_for(:Post)) + end + + it "generates RBI file for ActiveRecord classes with encrypted rich text" do + skip unless defined?(::ActionText::Encryption) + + add_ruby_file("post.rb", <<~RUBY) + class Post < ActiveRecord::Base + has_rich_text :body, encrypted: true + end + RUBY + + expected = <<~RBI + # typed: strong + + class Post + sig { returns(ActionText::EncryptedRichText) } + def body; end + + sig { params(value: T.nilable(T.any(ActionText::EncryptedRichText, String))).returns(T.untyped) } + def body=(value); end + + sig { returns(T::Boolean) } + def body?; end + end + RBI + + assert_equal(expected, rbi_for(:Post)) + end + end + end + end + end + end +end diff --git a/spec/tapioca/dsl/compilers/active_job_spec.rb b/spec/tapioca/dsl/compilers/active_job_spec.rb index b6d909508..e7e1a23d4 100644 --- a/spec/tapioca/dsl/compilers/active_job_spec.rb +++ b/spec/tapioca/dsl/compilers/active_job_spec.rb @@ -7,7 +7,14 @@ module Tapioca module Dsl module Compilers class ActiveJobSpec < ::DslSpec + extend Tapioca::Helpers::Test::Template + describe "Tapioca::Dsl::Compilers::ActiveJob" do + sig { void } + def before_setup + require "active_job" + end + describe "initialize" do it "gathers no constants if there are no ActiveJob subclasses" do assert_empty(gathered_constants) @@ -61,20 +68,24 @@ def perform(user_id) end RUBY - expected = <<~RBI + expected = template(<<~RBI) # typed: strong class NotifyJob class << self + <% if rails_version(">= 7.0") %> + sig { params(user_id: T.untyped, block: T.nilable(T.proc.params(job: NotifyJob).void)).returns(T.any(NotifyJob, FalseClass)) } + def perform_later(user_id, &block); end + <% else %> sig { params(user_id: T.untyped).returns(T.any(NotifyJob, FalseClass)) } def perform_later(user_id); end + <% end %> sig { params(user_id: T.untyped).returns(T.untyped) } def perform_now(user_id); end end end RBI - assert_equal(expected, rbi_for(:NotifyJob)) end @@ -89,20 +100,54 @@ def perform(user_id) end RUBY - expected = <<~RBI + expected = template(<<~RBI) # typed: strong class NotifyJob class << self + <% if rails_version(">= 7.0") %> + sig { params(user_id: ::Integer, block: T.nilable(T.proc.params(job: NotifyJob).void)).returns(T.any(NotifyJob, FalseClass)) } + def perform_later(user_id, &block); end + <% else %> sig { params(user_id: ::Integer).returns(T.any(NotifyJob, FalseClass)) } def perform_later(user_id); end + <% end %> sig { params(user_id: ::Integer).void } def perform_now(user_id); end end end RBI + assert_equal(expected, rbi_for(:NotifyJob)) + end + it "generates correct RBI file for subclass with block argument" do + add_ruby_file("job.rb", <<~RUBY) + class NotifyJob < ActiveJob::Base + def perform(user_id, &blk) + # ... + end + end + RUBY + + expected = template(<<~RBI) + # typed: strong + + class NotifyJob + class << self + <% if rails_version(">= 7.0") %> + sig { params(user_id: T.untyped, block: T.nilable(T.proc.params(job: NotifyJob).void)).returns(T.any(NotifyJob, FalseClass)) } + def perform_later(user_id, &block); end + <% else %> + sig { params(user_id: T.untyped).returns(T.any(NotifyJob, FalseClass)) } + def perform_later(user_id); end + <% end %> + + sig { params(user_id: T.untyped).returns(T.untyped) } + def perform_now(user_id); end + end + end + RBI assert_equal(expected, rbi_for(:NotifyJob)) end end diff --git a/spec/tapioca/dsl/compilers/active_model_attributes_spec.rb b/spec/tapioca/dsl/compilers/active_model_attributes_spec.rb index 345020f07..505ab50b5 100644 --- a/spec/tapioca/dsl/compilers/active_model_attributes_spec.rb +++ b/spec/tapioca/dsl/compilers/active_model_attributes_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class ActiveModelAttributesSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::ActiveModelAttributes" do + sig { void } + def before_setup + require "active_model" + end + describe "initialize" do it "gathers no constants if there are no classes using ActiveModel::Attributes" do assert_empty(gathered_constants) @@ -152,6 +157,38 @@ def test_shop=(value); end assert_equal(expected, rbi_for(:Shop)) end + + it "generates method sigs for attribute with custom type" do + add_ruby_file("shop.rb", <<~RUBY) + class CustomWithCastSig < ActiveModel::Type::Value + extend T::Sig + + sig { params(value: T.untyped).returns(String) } + def cast(value) + end + end + + class Shop + include ActiveModel::Attributes + + attribute :custom_with_cast_sig_attr, CustomWithCastSig.new + end + RUBY + + expected = <<~RBI + # typed: strong + + class Shop + sig { returns(T.nilable(::String)) } + def custom_with_cast_sig_attr; end + + sig { params(value: T.nilable(::String)).returns(T.nilable(::String)) } + def custom_with_cast_sig_attr=(value); end + end + RBI + + assert_equal(expected, rbi_for(:Shop)) + end end end end diff --git a/spec/tapioca/dsl/compilers/active_model_secure_password_spec.rb b/spec/tapioca/dsl/compilers/active_model_secure_password_spec.rb index 28b831bed..59560fa1c 100644 --- a/spec/tapioca/dsl/compilers/active_model_secure_password_spec.rb +++ b/spec/tapioca/dsl/compilers/active_model_secure_password_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class ActiveModelSecurePasswordSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::ActiveModelSecurePasswordSpec" do + sig { void } + def before_setup + require "active_model" + end + describe "initialize" do it "gathers no constants if there are no classes using ActiveModel::SecurePassword" do assert_empty(gathered_constants) @@ -61,10 +66,10 @@ class User # typed: strong class User - sig { params(unencrypted_password: T.untyped).returns(T.untyped) } + sig { params(unencrypted_password: T.untyped).returns(T.any(User, FalseClass)) } def authenticate(unencrypted_password); end - sig { params(unencrypted_password: T.untyped).returns(T.untyped) } + sig { params(unencrypted_password: T.untyped).returns(T.any(User, FalseClass)) } def authenticate_password(unencrypted_password); end sig { returns(T.untyped) } @@ -73,7 +78,7 @@ def password; end sig { params(unencrypted_password: T.untyped).returns(T.untyped) } def password=(unencrypted_password); end - <% if rails_version(">= 7.1.alpha") %> + <% if rails_version(">= 7.1") %> sig { returns(T.untyped) } def password_challenge; end @@ -111,7 +116,7 @@ class User # typed: strong class User - sig { params(unencrypted_password: T.untyped).returns(T.untyped) } + sig { params(unencrypted_password: T.untyped).returns(T.any(User, FalseClass)) } def authenticate_token(unencrypted_password); end sig { returns(T.untyped) } @@ -120,7 +125,7 @@ def token; end sig { params(unencrypted_password: T.untyped).returns(T.untyped) } def token=(unencrypted_password); end - <% if rails_version(">= 7.1.alpha") %> + <% if rails_version(">= 7.1") %> sig { returns(T.untyped) } def token_challenge; end @@ -159,13 +164,13 @@ class User # typed: strong class User - sig { params(unencrypted_password: T.untyped).returns(T.untyped) } + sig { params(unencrypted_password: T.untyped).returns(T.any(User, FalseClass)) } def authenticate(unencrypted_password); end - sig { params(unencrypted_password: T.untyped).returns(T.untyped) } + sig { params(unencrypted_password: T.untyped).returns(T.any(User, FalseClass)) } def authenticate_password(unencrypted_password); end - sig { params(unencrypted_password: T.untyped).returns(T.untyped) } + sig { params(unencrypted_password: T.untyped).returns(T.any(User, FalseClass)) } def authenticate_token(unencrypted_password); end sig { returns(T.untyped) } @@ -174,7 +179,7 @@ def password; end sig { params(unencrypted_password: T.untyped).returns(T.untyped) } def password=(unencrypted_password); end - <% if rails_version(">= 7.1.alpha") %> + <% if rails_version(">= 7.1") %> sig { returns(T.untyped) } def password_challenge; end @@ -200,7 +205,7 @@ def token; end sig { params(unencrypted_password: T.untyped).returns(T.untyped) } def token=(unencrypted_password); end - <% if rails_version(">= 7.1.alpha") %> + <% if rails_version(">= 7.1") %> sig { returns(T.untyped) } def token_challenge; end diff --git a/spec/tapioca/dsl/compilers/active_model_validations_confirmation_spec.rb b/spec/tapioca/dsl/compilers/active_model_validations_confirmation_spec.rb new file mode 100644 index 000000000..4aea25e24 --- /dev/null +++ b/spec/tapioca/dsl/compilers/active_model_validations_confirmation_spec.rb @@ -0,0 +1,92 @@ +# typed: strict +# frozen_string_literal: true + +require "spec_helper" + +module Tapioca + module Dsl + module Compilers + class ActiveModelValidationsConfirmationSpec < ::DslSpec + describe "Tapioca::Dsl::Compilers::ActiveModelValidationsConfirmationSpec" do + sig { void } + def before_setup + require "active_model" + end + + describe "initialize" do + it "gathers no constants if there are no classes using ActiveModel::Validations" do + assert_empty(gathered_constants) + end + + it "gathers only classes including ActiveModel::Attributes" do + add_ruby_file("shop.rb", <<~RUBY) + require "active_record" + + class Shop + end + + class ShopWithValidations + include ActiveModel::Validations + end + + class ShopWithActiveRecord < ActiveRecord::Base + end + RUBY + assert_equal(["ActiveRecord::Base", "ShopWithActiveRecord", "ShopWithValidations"], gathered_constants) + end + end + + describe "decorate" do + it "does not generate a file when there's no confirm validations" do + add_ruby_file("shop.rb", <<~RUBY) + class Shop + include ActiveModel::Validations + + validates :name, presence: true + end + RUBY + + expected = <<~RBI + # typed: strong + RBI + + assert_equal(expected, rbi_for(:Shop)) + end + + it "generates a method for each confirm validation" do + add_ruby_file("shop.rb", <<~RUBY) + class Shop + include ActiveModel::Validations + + validates :name, confirmation: true + + validates_confirmation_of :password + end + RUBY + + expected = <<~RBI + # typed: strong + + class Shop + sig { returns(T.untyped) } + def name_confirmation; end + + sig { params(name_confirmation: T.untyped).returns(T.untyped) } + def name_confirmation=(name_confirmation); end + + sig { returns(T.untyped) } + def password_confirmation; end + + sig { params(password_confirmation: T.untyped).returns(T.untyped) } + def password_confirmation=(password_confirmation); end + end + RBI + + assert_equal(expected, rbi_for(:Shop)) + end + end + end + end + end + end +end diff --git a/spec/tapioca/dsl/compilers/active_record_associations_spec.rb b/spec/tapioca/dsl/compilers/active_record_associations_spec.rb index 274c5ce26..8c6bddb5a 100644 --- a/spec/tapioca/dsl/compilers/active_record_associations_spec.rb +++ b/spec/tapioca/dsl/compilers/active_record_associations_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class ActiveRecordAssociationsSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::ActiveRecordAssociationsSpec" do + sig { void } + def before_setup + require "active_record" + end + describe "initialize" do it "gathers no constants if there are no ActiveRecord subclasses" do assert_empty(gathered_constants) @@ -1467,27 +1472,7 @@ def shop=(value); end require "tapioca/dsl/compilers/active_record_relations" activate_other_dsl_compilers(ActiveRecordRelations) - add_ruby_file("application.rb", <<~RUBY) - ENV["DATABASE_URL"] = "sqlite3::memory:" - - require "active_storage/engine" - - class Dummy < Rails::Application - config.eager_load = true - config.active_storage.service = :local - if ActiveRecord::Base.respond_to?(:legacy_connection_handling=) - config.active_record.legacy_connection_handling = false - end - config.active_storage.service_configurations = { - local: { - service: "Disk", - root: Rails.root.join("storage") - } - } - config.logger = Logger.new('/dev/null') - end - Rails.application.initialize! - RUBY + Tapioca::RailsSpecHelper.load_active_storage end it "generates RBI file for has_one_attached ActiveStorage association" do diff --git a/spec/tapioca/dsl/compilers/active_record_columns_spec.rb b/spec/tapioca/dsl/compilers/active_record_columns_spec.rb index f6acaa7cc..5adbdb65c 100644 --- a/spec/tapioca/dsl/compilers/active_record_columns_spec.rb +++ b/spec/tapioca/dsl/compilers/active_record_columns_spec.rb @@ -7,7 +7,14 @@ module Tapioca module Dsl module Compilers class ActiveRecordColumnsSpec < ::DslSpec + extend Tapioca::Helpers::Test::Template + describe "Tapioca::Dsl::Compilers::ActiveRecordColumns" do + sig { void } + def before_setup + require "active_record" + end + describe "initialize" do it "gathers no constants if there are no ActiveRecord subclasses" do assert_empty(gathered_constants) @@ -65,7 +72,7 @@ class Post < ActiveRecord::Base end RUBY - expected = <<~RBI + expected = template(<<~RBI, trim_mode: "-") # typed: strong class Post @@ -111,6 +118,53 @@ def id_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end sig { returns(T.nilable(::Integer)) } def id_previously_was; end + <%- if rails_version(">= 7.1") -%> + sig { returns(T.nilable(::Integer)) } + def id_value; end + + sig { params(value: ::Integer).returns(::Integer) } + def id_value=(value); end + + sig { returns(T::Boolean) } + def id_value?; end + + sig { returns(T.nilable(::Integer)) } + def id_value_before_last_save; end + + sig { returns(T.untyped) } + def id_value_before_type_cast; end + + sig { returns(T::Boolean) } + def id_value_came_from_user?; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def id_value_change; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def id_value_change_to_be_saved; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_value_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_value_in_database; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def id_value_previous_change; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_value_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_value_previously_was; end + + sig { returns(T.nilable(::Integer)) } + def id_value_was; end + + sig { void } + def id_value_will_change!; end + + <%- end -%> sig { returns(T.nilable(::Integer)) } def id_was; end @@ -120,14 +174,33 @@ def id_will_change!; end sig { void } def restore_id!; end + <%- if rails_version(">= 7.1") -%> + sig { void } + def restore_id_value!; end + + <%- end -%> sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } def saved_change_to_id; end sig { returns(T::Boolean) } def saved_change_to_id?; end + <%- if rails_version(">= 7.1") -%> + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def saved_change_to_id_value; end + + sig { returns(T::Boolean) } + def saved_change_to_id_value?; end + sig { returns(T::Boolean) } def will_save_change_to_id?; end + + sig { returns(T::Boolean) } + def will_save_change_to_id_value?; end + <%- else -%> + sig { returns(T::Boolean) } + def will_save_change_to_id?; end + <%- end -%> end end RBI @@ -359,8 +432,8 @@ def string_enum_column=(value); end it "generates correct types for serialized columns" do add_ruby_file("schema.rb", <<~RUBY) class CustomCoder - def dump(value); nil end - def load; nil end + def self.dump(value); nil end + def self.load; nil end end ActiveRecord::Migration.suppress_messages do @@ -375,14 +448,25 @@ def load; nil end end RUBY - add_ruby_file("post.rb", <<~RUBY) - class Post < ActiveRecord::Base - serialize :serialized_column_array, Array - serialize :serialized_column_custom, CustomCoder - serialize :serialized_column_hash, Hash - serialize :serialized_column_json, JSON - end - RUBY + if rails_version(">= 7.1") + add_ruby_file("post.rb", <<~RUBY) + class Post < ActiveRecord::Base + serialize :serialized_column_array, type: Array + serialize :serialized_column_hash, type: Hash + serialize :serialized_column_json, coder: JSON + serialize :serialized_column_custom, coder: CustomCoder + end + RUBY + else + add_ruby_file("post.rb", <<~RUBY) + class Post < ActiveRecord::Base + serialize :serialized_column_array, Array + serialize :serialized_column_hash, Hash + serialize :serialized_column_json, JSON + serialize :serialized_column_custom, CustomCoder + end + RUBY + end output = rbi_for(:Post) @@ -775,80 +859,16 @@ def will_save_change_to_publication_date?; end assert_includes(output, expected) end - it "discovers custom type from signature on deserialize method" do - add_ruby_file("schema.rb", <<~RUBY) - ActiveRecord::Migration.suppress_messages do - ActiveRecord::Schema.define do - create_table :posts do |t| - t.decimal :cost - end - end - end - RUBY - - add_ruby_file("custom_type.rb", <<~RUBY) - class CustomType - attr_accessor :value - - def initialize(number = 0.0) - @value = number - end - - class Type < ActiveRecord::Type::Value - extend(T::Sig) - - sig { params(value: Numeric).returns(::CustomType)} - def deserialize(value) - CustomType.new(value) - end - end - end - RUBY - - add_ruby_file("post.rb", <<~RUBY) - class Post < ActiveRecord::Base - attribute :cost, CustomType::Type.new - end - RUBY - - expected = indented(<<~RBI, 4) - sig { returns(T.nilable(::CustomType)) } - def cost; end - - sig { params(value: T.nilable(::CustomType)).returns(T.nilable(::CustomType)) } - def cost=(value); end - RBI - - assert_includes(rbi_for(:Post), expected) - end + it "discovers cast type for normalized attributes" do + # Support for normalization was added in Rails 7.1 so this test is only relevant + # for that version and above. + return unless rails_version(">= 7.1") - it "discovers custom type from signature on cast method" do add_ruby_file("schema.rb", <<~RUBY) ActiveRecord::Migration.suppress_messages do ActiveRecord::Schema.define do create_table :posts do |t| - t.decimal :cost - end - end - end - RUBY - - add_ruby_file("custom_type.rb", <<~RUBY) - class CustomType - attr_accessor :value - - def initialize(number = 0.0) - @value = number - end - - class Type < ActiveRecord::Type::Value - extend(T::Sig) - - sig { params(value: ::Numeric).returns(T.any(::CustomType, Numeric)) } - def cast(value) - decimal = super - return CustomType.new(decimal) if decimal - decimal + t.string :title end end end @@ -856,22 +876,25 @@ def cast(value) add_ruby_file("post.rb", <<~RUBY) class Post < ActiveRecord::Base - attribute :cost, CustomType::Type.new + normalizes :title, with: ->(title) { title.titleize } end RUBY expected = indented(<<~RBI, 4) - sig { returns(T.nilable(T.any(::CustomType, ::Numeric))) } - def cost; end + sig { returns(T.nilable(::String)) } + def title; end - sig { params(value: T.nilable(T.any(::CustomType, ::Numeric))).returns(T.nilable(T.any(::CustomType, ::Numeric))) } - def cost=(value); end + sig { params(value: T.nilable(::String)).returns(T.nilable(::String)) } + def title=(value); end + + sig { returns(T::Boolean) } + def title?; end RBI assert_includes(rbi_for(:Post), expected) end - it "discovers custom type from signature on serialize method" do + it "discovers custom type from signature on deserialize method" do add_ruby_file("schema.rb", <<~RUBY) ActiveRecord::Migration.suppress_messages do ActiveRecord::Schema.define do @@ -893,10 +916,9 @@ def initialize(number = 0.0) class Type < ActiveRecord::Type::Value extend(T::Sig) - sig { params(value: ::CustomType).returns(Numeric) } - def serialize(value) - value = super unless value.is_a?(::CustomType) - value.value unless value.nil? + sig { params(value: Numeric).returns(::CustomType)} + def deserialize(value) + CustomType.new(value) end end end @@ -919,117 +941,11 @@ def cost=(value); end assert_includes(rbi_for(:Post), expected) end - it "discovers custom type even if it is generic" do - add_ruby_file("schema.rb", <<~RUBY) - ActiveRecord::Migration.suppress_messages do - ActiveRecord::Schema.define do - create_table :posts do |t| - t.decimal :cost - end - end - end - RUBY - - add_ruby_file("column_type.rb", <<~RUBY) - class ValueType - extend T::Generic - - Elem = type_member - end - - class ColumnType < ActiveRecord::Type::Value - extend(T::Sig) - - sig { params(value: ::ValueType[Integer]).returns(Numeric) } - def serialize(value) - super - end - end - RUBY - - add_ruby_file("post.rb", <<~RUBY) - class Post < ActiveRecord::Base - attribute :cost, ColumnType.new - end - RUBY - - expected = indented(<<~RUBY, 4) - sig { returns(T.nilable(ValueType[::Integer])) } - def cost; end - - sig { params(value: T.nilable(ValueType[::Integer])).returns(T.nilable(ValueType[::Integer])) } - def cost=(value); end - RUBY - - assert_includes(rbi_for(:Post), expected) - end - - it "generates a weak type when the custom column type is a type variable" do - add_ruby_file("schema.rb", <<~RUBY) - ActiveRecord::Migration.suppress_messages do - ActiveRecord::Schema.define do - create_table :posts do |t| - t.decimal :cost - end - end - end - RUBY - - add_ruby_file("column_type.rb", <<~RUBY) - class ColumnType < ActiveRecord::Type::Value - extend(T::Sig) - extend T::Generic - - Elem = type_member - - sig { params(value: Elem).returns(Numeric) } - def serialize(value) - super - end - end - RUBY - - add_ruby_file("post.rb", <<~RUBY) - class Post < ActiveRecord::Base - attribute :cost, ColumnType[Integer].new - end - RUBY - - expected = indented(<<~RUBY, 4) - sig { returns(T.untyped) } - def cost; end - - sig { params(value: T.untyped).returns(T.untyped) } - def cost=(value); end - RUBY - - assert_includes(rbi_for(:Post), expected) - end - - it "generates a weak type if custom type cannot be discovered from signatures" do + it "generates id accessors when primary key isn't id" do add_ruby_file("schema.rb", <<~RUBY) ActiveRecord::Migration.suppress_messages do ActiveRecord::Schema.define do - create_table :posts do |t| - t.decimal :cost - end - end - end - RUBY - - add_ruby_file("custom_type.rb", <<~RUBY) - class CustomType - attr_accessor :value - - def initialize(number = 0.0) - @value = number - end - - class Type < ActiveRecord::Type::Value - extend(T::Sig) - - def deserialize(value) - CustomType.new(value) + create_table :posts, primary_key: :number do |t| end end end @@ -1037,16 +953,13 @@ def deserialize(value) add_ruby_file("post.rb", <<~RUBY) class Post < ActiveRecord::Base - attribute :cost, CustomType::Type.new + self.primary_key = :number end RUBY expected = indented(<<~RBI, 4) - sig { returns(T.untyped) } - def cost; end - - sig { params(value: T.untyped).returns(T.untyped) } - def cost=(value); end + sig { returns(T.nilable(::Integer)) } + def id; end RBI assert_includes(rbi_for(:Post), expected) @@ -1077,7 +990,7 @@ class Post < ActiveRecord::Base end RUBY - expected = <<~RBI + expected = template(<<~RBI, trim_mode: "-") # typed: strong class Post @@ -1123,6 +1036,53 @@ def id_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end sig { returns(T.nilable(::Integer)) } def id_previously_was; end + <%- if rails_version(">= 7.1") -%> + sig { returns(T.nilable(::Integer)) } + def id_value; end + + sig { params(value: ::Integer).returns(::Integer) } + def id_value=(value); end + + sig { returns(T::Boolean) } + def id_value?; end + + sig { returns(T.nilable(::Integer)) } + def id_value_before_last_save; end + + sig { returns(T.untyped) } + def id_value_before_type_cast; end + + sig { returns(T::Boolean) } + def id_value_came_from_user?; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def id_value_change; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def id_value_change_to_be_saved; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_value_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_value_in_database; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def id_value_previous_change; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_value_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_value_previously_was; end + + sig { returns(T.nilable(::Integer)) } + def id_value_was; end + + sig { void } + def id_value_will_change!; end + + <%- end -%> sig { returns(T.nilable(::Integer)) } def id_was; end @@ -1132,14 +1092,33 @@ def id_will_change!; end sig { void } def restore_id!; end + <%- if rails_version(">= 7.1") -%> + sig { void } + def restore_id_value!; end + + <%- end -%> sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } def saved_change_to_id; end sig { returns(T::Boolean) } def saved_change_to_id?; end + <%- if rails_version(">= 7.1") -%> + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def saved_change_to_id_value; end + + sig { returns(T::Boolean) } + def saved_change_to_id_value?; end + sig { returns(T::Boolean) } def will_save_change_to_id?; end + + sig { returns(T::Boolean) } + def will_save_change_to_id_value?; end + <%- else -%> + sig { returns(T::Boolean) } + def will_save_change_to_id?; end + <%- end -%> end end RBI @@ -1163,7 +1142,7 @@ class Post < ActiveRecord::Base end RUBY - expected = <<~RBI + expected = template(<<~RBI, trim_mode: "-") # typed: strong class Post @@ -1209,6 +1188,53 @@ def id_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end sig { returns(T.untyped) } def id_previously_was; end + <%- if rails_version(">= 7.1") -%> + sig { returns(T.untyped) } + def id_value; end + + sig { params(value: T.untyped).returns(T.untyped) } + def id_value=(value); end + + sig { returns(T::Boolean) } + def id_value?; end + + sig { returns(T.untyped) } + def id_value_before_last_save; end + + sig { returns(T.untyped) } + def id_value_before_type_cast; end + + sig { returns(T::Boolean) } + def id_value_came_from_user?; end + + sig { returns(T.nilable([T.untyped, T.untyped])) } + def id_value_change; end + + sig { returns(T.nilable([T.untyped, T.untyped])) } + def id_value_change_to_be_saved; end + + sig { params(from: T.untyped, to: T.untyped).returns(T::Boolean) } + def id_value_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.untyped) } + def id_value_in_database; end + + sig { returns(T.nilable([T.untyped, T.untyped])) } + def id_value_previous_change; end + + sig { params(from: T.untyped, to: T.untyped).returns(T::Boolean) } + def id_value_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.untyped) } + def id_value_previously_was; end + + sig { returns(T.untyped) } + def id_value_was; end + + sig { void } + def id_value_will_change!; end + + <%- end -%> sig { returns(T.untyped) } def id_was; end @@ -1218,14 +1244,33 @@ def id_will_change!; end sig { void } def restore_id!; end + <%- if rails_version(">= 7.1") -%> + sig { void } + def restore_id_value!; end + + <%- end -%> sig { returns(T.nilable([T.untyped, T.untyped])) } def saved_change_to_id; end sig { returns(T::Boolean) } def saved_change_to_id?; end + <%- if rails_version(">= 7.1") -%> + sig { returns(T.nilable([T.untyped, T.untyped])) } + def saved_change_to_id_value; end + + sig { returns(T::Boolean) } + def saved_change_to_id_value?; end + sig { returns(T::Boolean) } def will_save_change_to_id?; end + + sig { returns(T::Boolean) } + def will_save_change_to_id_value?; end + <%- else -%> + sig { returns(T::Boolean) } + def will_save_change_to_id?; end + <%- end -%> end end RBI @@ -1265,6 +1310,211 @@ def body?; end assert_includes(rbi_for(:Post), expected) end + if rails_version(">= 7.1") + it "generates composite id type if models has composite primary keys" do + T.bind(self, ActiveRecordColumnsSpec) + add_ruby_file("schema.rb", <<~RUBY) + ActiveRecord::Migration.suppress_messages do + ActiveRecord::Schema.define do + create_table(:posts, primary_key: [:id, :blog_id]) do |t| + t.integer :id + t.integer :blog_id + end + end + end + RUBY + + add_ruby_file("post.rb", <<~RUBY) + class Post < ActiveRecord::Base + extend StrongTypeGeneration + end + RUBY + + expected = <<~RBI + # typed: strong + + class Post + include GeneratedAttributeMethods + + module GeneratedAttributeMethods + sig { returns(T.nilable(::Integer)) } + def blog_id; end + + sig { params(value: T.nilable(::Integer)).returns(T.nilable(::Integer)) } + def blog_id=(value); end + + sig { returns(T::Boolean) } + def blog_id?; end + + sig { returns(T.nilable(::Integer)) } + def blog_id_before_last_save; end + + sig { returns(T.untyped) } + def blog_id_before_type_cast; end + + sig { returns(T::Boolean) } + def blog_id_came_from_user?; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def blog_id_change; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def blog_id_change_to_be_saved; end + + sig { params(from: T.nilable(::Integer), to: T.nilable(::Integer)).returns(T::Boolean) } + def blog_id_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def blog_id_in_database; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def blog_id_previous_change; end + + sig { params(from: T.nilable(::Integer), to: T.nilable(::Integer)).returns(T::Boolean) } + def blog_id_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def blog_id_previously_was; end + + sig { returns(T.nilable(::Integer)) } + def blog_id_was; end + + sig { void } + def blog_id_will_change!; end + + sig { returns([T.nilable(::Integer), T.nilable(::Integer)]) } + def id; end + + sig { params(value: [T.nilable(::Integer), T.nilable(::Integer)]).returns([T.nilable(::Integer), T.nilable(::Integer)]) } + def id=(value); end + + sig { returns(T::Boolean) } + def id?; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def id_before_last_save; end + + sig { returns(T.untyped) } + def id_before_type_cast; end + + sig { returns(T::Boolean) } + def id_came_from_user?; end + + sig { returns(T.nilable([[T.nilable(::Integer), T.nilable(::Integer)], [T.nilable(::Integer), T.nilable(::Integer)]])) } + def id_change; end + + sig { returns(T.nilable([[T.nilable(::Integer), T.nilable(::Integer)], [T.nilable(::Integer), T.nilable(::Integer)]])) } + def id_change_to_be_saved; end + + sig { params(from: [T.nilable(::Integer), T.nilable(::Integer)], to: [T.nilable(::Integer), T.nilable(::Integer)]).returns(T::Boolean) } + def id_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def id_in_database; end + + sig { returns(T.nilable([[T.nilable(::Integer), T.nilable(::Integer)], [T.nilable(::Integer), T.nilable(::Integer)]])) } + def id_previous_change; end + + sig { params(from: [T.nilable(::Integer), T.nilable(::Integer)], to: [T.nilable(::Integer), T.nilable(::Integer)]).returns(T::Boolean) } + def id_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def id_previously_was; end + + sig { returns(T.nilable(::Integer)) } + def id_value; end + + sig { params(value: T.nilable(::Integer)).returns(T.nilable(::Integer)) } + def id_value=(value); end + + sig { returns(T::Boolean) } + def id_value?; end + + sig { returns(T.nilable(::Integer)) } + def id_value_before_last_save; end + + sig { returns(T.untyped) } + def id_value_before_type_cast; end + + sig { returns(T::Boolean) } + def id_value_came_from_user?; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def id_value_change; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def id_value_change_to_be_saved; end + + sig { params(from: T.nilable(::Integer), to: T.nilable(::Integer)).returns(T::Boolean) } + def id_value_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_value_in_database; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def id_value_previous_change; end + + sig { params(from: T.nilable(::Integer), to: T.nilable(::Integer)).returns(T::Boolean) } + def id_value_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_value_previously_was; end + + sig { returns(T.nilable(::Integer)) } + def id_value_was; end + + sig { void } + def id_value_will_change!; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def id_was; end + + sig { void } + def id_will_change!; end + + sig { void } + def restore_blog_id!; end + + sig { void } + def restore_id!; end + + sig { void } + def restore_id_value!; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def saved_change_to_blog_id; end + + sig { returns(T::Boolean) } + def saved_change_to_blog_id?; end + + sig { returns(T.nilable([[T.nilable(::Integer), T.nilable(::Integer)], [T.nilable(::Integer), T.nilable(::Integer)]])) } + def saved_change_to_id; end + + sig { returns(T::Boolean) } + def saved_change_to_id?; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def saved_change_to_id_value; end + + sig { returns(T::Boolean) } + def saved_change_to_id_value?; end + + sig { returns(T::Boolean) } + def will_save_change_to_blog_id?; end + + sig { returns(T::Boolean) } + def will_save_change_to_id?; end + + sig { returns(T::Boolean) } + def will_save_change_to_id_value?; end + end + end + RBI + + assert_equal(rbi_for(:Post), expected) + end + end + it "generates attributes with weak types if model does not extend StrongTypeGeneration" do add_ruby_file("schema.rb", <<~RUBY) ActiveRecord::Migration.suppress_messages do diff --git a/spec/tapioca/dsl/compilers/active_record_delegated_types_spec.rb b/spec/tapioca/dsl/compilers/active_record_delegated_types_spec.rb index 41bcbf379..5f2559b5f 100644 --- a/spec/tapioca/dsl/compilers/active_record_delegated_types_spec.rb +++ b/spec/tapioca/dsl/compilers/active_record_delegated_types_spec.rb @@ -11,6 +11,7 @@ class ActiveRecordDelegatedTypesSpec < ::DslSpec sig { void } def before_setup require "tapioca/dsl/extensions/active_record" + require "active_record" end describe "initialize" do @@ -49,8 +50,6 @@ class Current < ActiveRecord::Base describe "decorate" do before do - require "active_record" - ::ActiveRecord::Base.establish_connection( adapter: "sqlite3", database: ":memory:", diff --git a/spec/tapioca/dsl/compilers/active_record_enum_spec.rb b/spec/tapioca/dsl/compilers/active_record_enum_spec.rb index 7fd29361a..ba9778a00 100644 --- a/spec/tapioca/dsl/compilers/active_record_enum_spec.rb +++ b/spec/tapioca/dsl/compilers/active_record_enum_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class ActiveRecordEnumSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::ActiveRecordEnum" do + sig { void } + def before_setup + require "active_record" + end + describe "initialize" do it "gathers no constants if there are no ActiveRecord classes" do assert_empty(gathered_constants) diff --git a/spec/tapioca/dsl/compilers/active_record_fixtures_spec.rb b/spec/tapioca/dsl/compilers/active_record_fixtures_spec.rb index 67839c719..0cad9c11e 100644 --- a/spec/tapioca/dsl/compilers/active_record_fixtures_spec.rb +++ b/spec/tapioca/dsl/compilers/active_record_fixtures_spec.rb @@ -8,6 +8,12 @@ module Dsl module Compilers class ActiveRecordFixturesSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::ActiveRecordFixtures" do + sig { void } + def before_setup + require "active_record" + require "active_record/fixtures" + end + describe "without a Rails app" do it "gathers nothing if not in a Rails application" do add_ruby_file("post_test.rb", <<~RUBY) @@ -24,18 +30,12 @@ class User describe "with a Rails app" do before do - require "active_record" require "rails" define_fake_rails_app end it "gathers only the ActiveSupport::TestCase base class" do - require "active_record" - require "rails" - - define_fake_rails_app - add_ruby_file("post_test.rb", <<~RUBY) class PostTest < ActiveSupport::TestCase end diff --git a/spec/tapioca/dsl/compilers/active_record_relations_spec.rb b/spec/tapioca/dsl/compilers/active_record_relations_spec.rb index dab0c02da..969d10715 100644 --- a/spec/tapioca/dsl/compilers/active_record_relations_spec.rb +++ b/spec/tapioca/dsl/compilers/active_record_relations_spec.rb @@ -10,6 +10,11 @@ class ActiveRecordRelationsSpec < ::DslSpec include Tapioca::SorbetHelper describe "Tapioca::Dsl::Compilers::ActiveRecordRelations" do + sig { void } + def before_setup + require "active_record" + end + describe "initialize" do it "gathers no constants if there are no ActiveRecord classes" do assert_empty(gathered_constants) @@ -33,6 +38,15 @@ class User end describe "decorate" do + before do + require "active_record" + + ::ActiveRecord::Base.establish_connection( + adapter: "sqlite3", + database: ":memory:", + ) + end + it "generates proper relation classes and modules" do add_ruby_file("post.rb", <<~RUBY) class Post < ActiveRecord::Base @@ -55,16 +69,16 @@ module CommonRelationMethods sig { params(block: T.nilable(T.proc.params(record: ::Post).returns(T.untyped))).returns(T::Boolean) } def any?(&block); end - sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + sig { params(column_name: T.any(String, Symbol)).returns(Numeric) } def average(column_name); end sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ::Post).void)).returns(::Post) } def build(attributes = nil, &block); end - sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.untyped) } + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(Numeric) } def calculate(operation, column_name); end - sig { params(column_name: T.untyped).returns(T.untyped) } + sig { params(column_name: T.untyped).returns(Integer) } def count(column_name = nil); end sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ::Post).void)).returns(::Post) } @@ -91,8 +105,9 @@ def fifth; end sig { returns(::Post) } def fifth!; end - sig { params(args: T.untyped).returns(T.untyped) } - def find(*args); end + sig { params(args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])).returns(::Post) } + sig { params(args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])]).returns(T::Enumerable[::Post]) } + def find(args); end sig { params(args: T.untyped).returns(T.nilable(::Post)) } def find_by(*args); end @@ -100,10 +115,12 @@ def find_by(*args); end sig { params(args: T.untyped).returns(::Post) } def find_by!(*args); end - sig { params(start: T.untyped, finish: T.untyped, batch_size: Integer, error_on_ignore: T.untyped, order: Symbol, block: T.nilable(T.proc.params(object: ::Post).void)).returns(T.nilable(T::Enumerator[::Post])) } + sig { params(start: T.untyped, finish: T.untyped, batch_size: Integer, error_on_ignore: T.untyped, order: Symbol, block: T.proc.params(object: ::Post).void).void } + sig { params(start: T.untyped, finish: T.untyped, batch_size: Integer, error_on_ignore: T.untyped, order: Symbol).returns(T::Enumerator[::Post]) } def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end - sig { params(start: T.untyped, finish: T.untyped, batch_size: Integer, error_on_ignore: T.untyped, order: Symbol, block: T.nilable(T.proc.params(object: T::Array[::Post]).void)).returns(T.nilable(T::Enumerator[T::Enumerator[::Post]])) } + sig { params(start: T.untyped, finish: T.untyped, batch_size: Integer, error_on_ignore: T.untyped, order: Symbol, block: T.proc.params(object: T::Array[::Post]).void).void } + sig { params(start: T.untyped, finish: T.untyped, batch_size: Integer, error_on_ignore: T.untyped, order: Symbol).returns(T::Enumerator[T::Enumerator[::Post]]) } def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ::Post).void)).returns(::Post) } @@ -126,7 +143,8 @@ def find_signed!(signed_id, purpose: nil); end def find_sole_by(arg, *args); end <% end %> - sig { params(limit: T.untyped).returns(T.untyped) } + sig { params(limit: NilClass).returns(T.nilable(::Post)) } + sig { params(limit: Integer).returns(T::Array[::Post]) } def first(limit = nil); end sig { returns(::Post) } @@ -147,18 +165,21 @@ def fourth!; end sig { returns(Array) } def ids; end - <% if rails_version(">= 7.1.alpha") %> - sig { params(of: Integer, start: T.untyped, finish: T.untyped, load: T.untyped, error_on_ignore: T.untyped, order: Symbol, use_ranges: T.untyped, block: T.nilable(T.proc.params(object: PrivateRelation).void)).returns(T.nilable(::ActiveRecord::Batches::BatchEnumerator)) } + <% if rails_version(">= 7.1") %> + sig { params(of: Integer, start: T.untyped, finish: T.untyped, load: T.untyped, error_on_ignore: T.untyped, order: Symbol, use_ranges: T.untyped, block: T.proc.params(object: PrivateRelation).void).void } + sig { params(of: Integer, start: T.untyped, finish: T.untyped, load: T.untyped, error_on_ignore: T.untyped, order: Symbol, use_ranges: T.untyped).returns(::ActiveRecord::Batches::BatchEnumerator) } def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end <% else %> - sig { params(of: Integer, start: T.untyped, finish: T.untyped, load: T.untyped, error_on_ignore: T.untyped, order: Symbol, block: T.nilable(T.proc.params(object: PrivateRelation).void)).returns(T.nilable(::ActiveRecord::Batches::BatchEnumerator)) } + sig { params(of: Integer, start: T.untyped, finish: T.untyped, load: T.untyped, error_on_ignore: T.untyped, order: Symbol, block: T.proc.params(object: PrivateRelation).void).void } + sig { params(of: Integer, start: T.untyped, finish: T.untyped, load: T.untyped, error_on_ignore: T.untyped, order: Symbol).returns(::ActiveRecord::Batches::BatchEnumerator) } def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, &block); end <% end %> sig { params(record: T.untyped).returns(T::Boolean) } def include?(record); end - sig { params(limit: T.untyped).returns(T.untyped) } + sig { params(limit: NilClass).returns(T.nilable(::Post)) } + sig { params(limit: Integer).returns(T::Array[::Post]) } def last(limit = nil); end sig { returns(::Post) } @@ -208,10 +229,11 @@ def second_to_last!; end def sole; end <% end %> - sig { params(column_name: T.nilable(T.any(String, Symbol)), block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped))).returns(T.untyped) } + sig { params(column_name: T.nilable(T.any(String, Symbol)), block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped))).returns(Numeric) } def sum(column_name = nil, &block); end - sig { params(limit: T.untyped).returns(T.untyped) } + sig { params(limit: NilClass).returns(T.nilable(::Post)) } + sig { params(limit: Integer).returns(T::Array[::Post]) } def take(limit = nil); end sig { returns(::Post) } @@ -266,7 +288,7 @@ def extract_associated(*args, &blk); end sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } def from(*args, &blk); end - sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } def group(*args, &blk); end sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } @@ -317,7 +339,7 @@ def merge(*args, &blk); end sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } def none(*args, &blk); end - <% if rails_version(">= 7.1.alpha") %> + <% if rails_version(">= 7.1") %> sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } def null_relation?(*args, &blk); end @@ -346,7 +368,7 @@ def readonly(*args, &blk); end sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } def references(*args, &blk); end - <% if rails_version(">= 7.1.alpha") %> + <% if rails_version(">= 7.1") %> sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } def regroup(*args, &blk); end @@ -389,7 +411,7 @@ def upsert_all(attributes, returning: nil, unique_by: nil); end sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } def where(*args, &blk); end - <% if rails_version(">= 7.1.alpha") %> + <% if rails_version(">= 7.1") %> sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } def with(*args, &blk); end @@ -437,7 +459,7 @@ def extract_associated(*args, &blk); end sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } def from(*args, &blk); end - sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } def group(*args, &blk); end sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } @@ -476,7 +498,7 @@ def merge(*args, &blk); end sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } def none(*args, &blk); end - <% if rails_version(">= 7.1.alpha") %> + <% if rails_version(">= 7.1") %> sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } def null_relation?(*args, &blk); end @@ -505,7 +527,7 @@ def readonly(*args, &blk); end sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } def references(*args, &blk); end - <% if rails_version(">= 7.1.alpha") %> + <% if rails_version(">= 7.1") %> sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } def regroup(*args, &blk); end @@ -542,7 +564,7 @@ def unscope(*args, &blk); end sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } def where(*args, &blk); end - <% if rails_version(">= 7.1.alpha") %> + <% if rails_version(">= 7.1") %> sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } def with(*args, &blk); end @@ -560,10 +582,38 @@ class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation Elem = type_member { { fixed: ::Post } } + sig { returns(T::Array[::Post]) } + def to_a; end + sig { returns(T::Array[::Post]) } def to_ary; end end + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::Post } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, Numeric]) } + def average(column_name); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, Numeric]) } + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol)), block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped))).returns(T::Hash[T.untyped, Numeric]) } + def sum(column_name = nil, &block); end + end + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation Elem = type_member { { fixed: ::Post } } @@ -621,6 +671,9 @@ def scope; end sig { returns(T::Array[::Post]) } def target; end + sig { returns(T::Array[::Post]) } + def to_a; end + sig { returns(T::Array[::Post]) } def to_ary; end end @@ -631,10 +684,38 @@ class PrivateRelation < ::ActiveRecord::Relation Elem = type_member { { fixed: ::Post } } + sig { returns(T::Array[::Post]) } + def to_a; end + sig { returns(T::Array[::Post]) } def to_ary; end end + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::Post } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, Numeric]) } + def average(column_name); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, Numeric]) } + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol)), block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped))).returns(T::Hash[T.untyped, Numeric]) } + def sum(column_name = nil, &block); end + end + class PrivateRelationWhereChain < PrivateRelation Elem = type_member { { fixed: ::Post } } diff --git a/spec/tapioca/dsl/compilers/active_record_scope_spec.rb b/spec/tapioca/dsl/compilers/active_record_scope_spec.rb index 7aed9d3fe..d7bca750d 100644 --- a/spec/tapioca/dsl/compilers/active_record_scope_spec.rb +++ b/spec/tapioca/dsl/compilers/active_record_scope_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class ActiveRecordScopeSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::ActiveRecordScope" do + sig { void } + def before_setup + require "active_record" + end + describe "initialize" do it "gathers no constants if there are no ActiveRecord classes" do assert_empty(gathered_constants) @@ -416,12 +421,7 @@ def post_scope(*args, &blk); end require "tapioca/dsl/compilers/active_record_relations" activate_other_dsl_compilers(ActiveRecordRelations) - require "active_record" - require "active_storage/attached" - require "active_storage/reflection" - ::ActiveRecord::Base.include(::ActiveStorage::Attached::Model) - ::ActiveRecord::Base.include(::ActiveStorage::Reflection::ActiveRecordExtensions) - ::ActiveRecord::Reflection.singleton_class.prepend(::ActiveStorage::Reflection::ReflectionExtension) + Tapioca::RailsSpecHelper.load_active_storage end it "generates RBI file for ActiveRecord classes with has_one_attached scope fields" do diff --git a/spec/tapioca/dsl/compilers/active_record_secure_token_spec.rb b/spec/tapioca/dsl/compilers/active_record_secure_token_spec.rb index 711d836a8..87181d13c 100644 --- a/spec/tapioca/dsl/compilers/active_record_secure_token_spec.rb +++ b/spec/tapioca/dsl/compilers/active_record_secure_token_spec.rb @@ -11,6 +11,7 @@ class ActiveRecordSecureTokenSpec < ::DslSpec sig { void } def before_setup require "tapioca/dsl/extensions/active_record" + require "active_record" end describe "initialize" do diff --git a/spec/tapioca/dsl/compilers/active_record_store_spec.rb b/spec/tapioca/dsl/compilers/active_record_store_spec.rb new file mode 100644 index 000000000..ea2d9dd4e --- /dev/null +++ b/spec/tapioca/dsl/compilers/active_record_store_spec.rb @@ -0,0 +1,222 @@ +# typed: strict +# frozen_string_literal: true + +require "spec_helper" + +module Tapioca + module Dsl + module Compilers + class ActiveRecordStoreSpec < ::DslSpec + describe "Tapioca::Dsl::Compilers::ActiveRecordStoreSpec" do + sig { void } + def before_setup + require "tapioca/dsl/extensions/active_record" + require "active_record" + end + + describe "initialize" do + it "gathers no constants if there are no ActiveRecord subclasses" do + assert_empty(gathered_constants) + end + + it "gathers only ActiveRecord subclasses" do + add_ruby_file("user.rb", <<~RUBY) + class User + end + + class UserRecord < ActiveRecord::Base + end + RUBY + + assert_equal(["UserRecord"], gathered_constants) + end + end + + describe "decorate" do + it "generates empty RBI file if there are no stored attributes" do + add_ruby_file("user.rb", <<~RUBY) + class User < ActiveRecord::Base + end + RUBY + + expected = <<~RBI + # typed: strong + RBI + + assert_equal(expected, rbi_for(:User)) + end + + it "generates methods for stored attribute declared with store" do + add_ruby_file("user.rb", <<~RUBY) + class User < ActiveRecord::Base + store :settings, accessors: :theme + end + RUBY + + expected = template(<<~RBI) + # typed: strong + + class User + include GeneratedStoredAttributesMethods + + module GeneratedStoredAttributesMethods + sig { returns(T.untyped) } + def saved_change_to_theme; end + + sig { returns(T::Boolean) } + def saved_change_to_theme?; end + + sig { returns(T.untyped) } + def theme; end + + sig { params(value: T.untyped).returns(T.untyped) } + def theme=(value); end + + sig { returns(T.untyped) } + def theme_before_last_save; end + + sig { returns(T.untyped) } + def theme_change; end + + sig { returns(T::Boolean) } + def theme_changed?; end + + sig { returns(T.untyped) } + def theme_was; end + end + end + RBI + + assert_equal(expected, rbi_for(:User)) + end + + it "generates methods for stored attribute declared with store_accessor" do + add_ruby_file("user.rb", <<~RUBY) + class User < ActiveRecord::Base + store_accessor :settings, :theme + end + RUBY + + expected = template(<<~RBI) + # typed: strong + + class User + include GeneratedStoredAttributesMethods + + module GeneratedStoredAttributesMethods + sig { returns(T.untyped) } + def saved_change_to_theme; end + + sig { returns(T::Boolean) } + def saved_change_to_theme?; end + + sig { returns(T.untyped) } + def theme; end + + sig { params(value: T.untyped).returns(T.untyped) } + def theme=(value); end + + sig { returns(T.untyped) } + def theme_before_last_save; end + + sig { returns(T.untyped) } + def theme_change; end + + sig { returns(T::Boolean) } + def theme_changed?; end + + sig { returns(T.untyped) } + def theme_was; end + end + end + RBI + + assert_equal(expected, rbi_for(:User)) + end + + it "generates methods for multiple stored attributes" do + add_ruby_file("user.rb", <<~RUBY) + class User < ActiveRecord::Base + store :settings, accessors: [:theme, :language] + store_accessor :settings, :power_source, :expiry + end + RUBY + + output = rbi_for(:User) + + expected = indented(<<~RBI, 4) + sig { params(value: T.untyped).returns(T.untyped) } + def theme=(value); end + RBI + assert_includes(output, expected) + + expected = indented(<<~RBI, 4) + sig { params(value: T.untyped).returns(T.untyped) } + def language=(value); end + RBI + assert_includes(output, expected) + + expected = indented(<<~RBI, 4) + sig { params(value: T.untyped).returns(T.untyped) } + def power_source=(value); end + RBI + assert_includes(output, expected) + + expected = indented(<<~RBI, 4) + sig { params(value: T.untyped).returns(T.untyped) } + def expiry=(value); end + RBI + assert_includes(output, expected) + end + + it "generates methods for stored attributes with prefix" do + add_ruby_file("user.rb", <<~RUBY) + class User < ActiveRecord::Base + store :settings, accessors: :theme, prefix: true + store_accessor :settings, :power_source, prefix: :prefs + end + RUBY + + output = rbi_for(:User) + + expected = indented(<<~RBI, 4) + sig { params(value: T.untyped).returns(T.untyped) } + def settings_theme=(value); end + RBI + assert_includes(output, expected) + + expected = indented(<<~RBI, 4) + sig { params(value: T.untyped).returns(T.untyped) } + def prefs_power_source=(value); end + RBI + assert_includes(output, expected) + end + + it "generates methods for stored attributes with suffix" do + add_ruby_file("user.rb", <<~RUBY) + class User < ActiveRecord::Base + store :settings, accessors: :theme, suffix: true + store_accessor :settings, :power_source, suffix: :prefs + end + RUBY + + output = rbi_for(:User) + + expected = indented(<<~RBI, 4) + sig { params(value: T.untyped).returns(T.untyped) } + def theme_settings=(value); end + RBI + assert_includes(output, expected) + + expected = indented(<<~RBI, 4) + sig { params(value: T.untyped).returns(T.untyped) } + def power_source_prefs=(value); end + RBI + assert_includes(output, expected) + end + end + end + end + end + end +end diff --git a/spec/tapioca/dsl/compilers/active_record_typed_store_spec.rb b/spec/tapioca/dsl/compilers/active_record_typed_store_spec.rb index 3d50bfae8..b32444d84 100644 --- a/spec/tapioca/dsl/compilers/active_record_typed_store_spec.rb +++ b/spec/tapioca/dsl/compilers/active_record_typed_store_spec.rb @@ -11,6 +11,7 @@ class ActiveRecordTypedStoreSpec < ::DslSpec sig { void } def before_setup require "active_record" + require "activerecord-typedstore" end describe "initialize" do diff --git a/spec/tapioca/dsl/compilers/active_resource_spec.rb b/spec/tapioca/dsl/compilers/active_resource_spec.rb index 50cd5d1c8..1979845a4 100644 --- a/spec/tapioca/dsl/compilers/active_resource_spec.rb +++ b/spec/tapioca/dsl/compilers/active_resource_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class ActiveResourceSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::ActiveResource" do + sig { void } + def before_setup + require "active_resource" + end + describe "initialize" do it "gathers no constants if there are no ActiveResource classes" do assert_empty(gathered_constants) diff --git a/spec/tapioca/dsl/compilers/active_storage_spec.rb b/spec/tapioca/dsl/compilers/active_storage_spec.rb index 70f83114d..3d8a1481a 100644 --- a/spec/tapioca/dsl/compilers/active_storage_spec.rb +++ b/spec/tapioca/dsl/compilers/active_storage_spec.rb @@ -8,20 +8,22 @@ module Dsl module Compilers class ActiveStorageSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::ActiveStorage" do + sig { void } + def before_setup + require "active_storage" + require "active_storage/reflection" + end + before do - add_ruby_file("require.rb", <<~RUBY) - require "active_record" - require "active_storage/attached" - require "active_storage/reflection" - ActiveRecord::Base.include(ActiveStorage::Attached::Model) - ActiveRecord::Base.include(ActiveStorage::Reflection::ActiveRecordExtensions) - ActiveRecord::Reflection.singleton_class.prepend(ActiveStorage::Reflection::ReflectionExtension) - RUBY + Tapioca::RailsSpecHelper.load_active_storage end describe "initialize" do it "gathers no constants if there are no ActiveRecord classes" do - assert_empty(gathered_constants) + assert_equal( + ["ActiveStorage::Attachment", "ActiveStorage::Blob", "ActiveStorage::VariantRecord"], + gathered_constants, + ) end it "gathers only ActiveRecord constants with no abstract classes" do @@ -37,7 +39,15 @@ class User end RUBY - assert_equal(["Post"], gathered_constants) + assert_equal( + [ + "ActiveStorage::Attachment", + "ActiveStorage::Blob", + "ActiveStorage::VariantRecord", + "Post", + ], + gathered_constants, + ) end end diff --git a/spec/tapioca/dsl/compilers/active_support_concern_spec.rb b/spec/tapioca/dsl/compilers/active_support_concern_spec.rb index 3f7da0d7d..09f678f39 100644 --- a/spec/tapioca/dsl/compilers/active_support_concern_spec.rb +++ b/spec/tapioca/dsl/compilers/active_support_concern_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class ActiveSupportConcernSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::ActiveSupportConcern" do + sig { void } + def before_setup + require "active_support" + end + describe "gather_constants" do it "does not gather anonymous constants" do add_ruby_file("test_case.rb", <<~RUBY) @@ -314,7 +319,7 @@ def arguments_to_micm_in_effective_order(rbi) rbi.scan(/mixes_in_class_methods (.*)$/) .flatten .reverse - .map { |i| i.sub(/::/, "") } + .map { |i| i.sub("::", "") } end end end diff --git a/spec/tapioca/dsl/compilers/active_support_current_attributes_spec.rb b/spec/tapioca/dsl/compilers/active_support_current_attributes_spec.rb index 4c3f5fd5b..6dc7e8c73 100644 --- a/spec/tapioca/dsl/compilers/active_support_current_attributes_spec.rb +++ b/spec/tapioca/dsl/compilers/active_support_current_attributes_spec.rb @@ -2,12 +2,18 @@ # frozen_string_literal: true require "spec_helper" +require "active_support" module Tapioca module Dsl module Compilers class ActiveSupportCurrentAttributesSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::ActiveSupportCurrentAttributes" do + sig { void } + def before_setup + require "active_support" + end + describe "initialize" do it "gathers no constants if there are no ActiveSupport::CurrentAttributes subclasses" do assert_empty(gathered_constants) @@ -51,19 +57,23 @@ class Current < ActiveSupport::CurrentAttributes # typed: strong class Current - sig { returns(T.untyped) } - def account; end + include GeneratedAttributeMethods - sig { params(value: T.untyped).returns(T.untyped) } - def account=(value); end + class << self + sig { returns(T.untyped) } + def account; end - sig { returns(T.untyped) } - def user; end + sig { params(value: T.untyped).returns(T.untyped) } + def account=(value); end - sig { params(value: T.untyped).returns(T.untyped) } - def user=(value); end + sig { returns(T.untyped) } + def user; end - class << self + sig { params(value: T.untyped).returns(T.untyped) } + def user=(value); end + end + + module GeneratedAttributeMethods sig { returns(T.untyped) } def account; end @@ -104,11 +114,7 @@ def authenticate(user_id, &block) # typed: strong class Current - sig { returns(T.untyped) } - def account; end - - sig { params(value: T.untyped).returns(T.untyped) } - def account=(value); end + include GeneratedAttributeMethods class << self sig { returns(T.untyped) } @@ -123,6 +129,14 @@ def authenticate(user_id, &block); end sig { returns(T.untyped) } def helper; end end + + module GeneratedAttributeMethods + sig { returns(T.untyped) } + def account; end + + sig { params(value: T.untyped).returns(T.untyped) } + def account=(value); end + end end RBI diff --git a/spec/tapioca/dsl/compilers/config_spec.rb b/spec/tapioca/dsl/compilers/config_spec.rb index bb49adcfa..7f7ea6867 100644 --- a/spec/tapioca/dsl/compilers/config_spec.rb +++ b/spec/tapioca/dsl/compilers/config_spec.rb @@ -10,6 +10,7 @@ class ConfigSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::Config" do sig { void } def before_setup + require "config" Object.send(:remove_const, :Rails) end diff --git a/spec/tapioca/dsl/compilers/frozen_record_spec.rb b/spec/tapioca/dsl/compilers/frozen_record_spec.rb index d71a329f2..eca956f29 100644 --- a/spec/tapioca/dsl/compilers/frozen_record_spec.rb +++ b/spec/tapioca/dsl/compilers/frozen_record_spec.rb @@ -12,6 +12,8 @@ class FrozenRecordSpec < ::DslSpec def before_setup require "rails/railtie" require "tapioca/dsl/extensions/frozen_record" + require "frozen_record" + ActiveSupport.run_load_hooks(:before_configuration) end describe "initialize" do diff --git a/spec/tapioca/dsl/compilers/graphql_input_object_spec.rb b/spec/tapioca/dsl/compilers/graphql_input_object_spec.rb index 37f54a2ff..6ea9b22b1 100644 --- a/spec/tapioca/dsl/compilers/graphql_input_object_spec.rb +++ b/spec/tapioca/dsl/compilers/graphql_input_object_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class GraphqlInputObjectSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::GraphqlInputObject" do + sig { void } + def before_setup + require "graphql" + end + describe "initialize" do it "gathers no constants if there are no GraphQL::Schema::InputObject subclasses" do assert_empty(gathered_constants) diff --git a/spec/tapioca/dsl/compilers/graphql_mutation_spec.rb b/spec/tapioca/dsl/compilers/graphql_mutation_spec.rb index e603048fa..5ecef5a2c 100644 --- a/spec/tapioca/dsl/compilers/graphql_mutation_spec.rb +++ b/spec/tapioca/dsl/compilers/graphql_mutation_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class GraphqlMutationSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::GraphqlMutation" do + sig { void } + def before_setup + require "graphql" + end + describe "initialize" do it "gathers no constants if there are no GraphQL::Schema::Mutation subclasses" do assert_empty(gathered_constants) @@ -144,6 +149,7 @@ class CreateComment < GraphQL::Schema::Mutation argument :float, Float, required: true argument :id, ID, required: true argument :int, Int, required: true + argument :big_int, GraphQL::Types::BigInt, required: true argument :date, GraphQL::Types::ISO8601Date, required: true argument :datetime, GraphQL::Types::ISO8601DateTime, required: true argument :json, GraphQL::Types::JSON, required: true @@ -153,7 +159,160 @@ class CreateComment < GraphQL::Schema::Mutation argument :input_object, CreateCommentInput, required: true argument :custom_scalar, CustomScalar, required: true - def resolve(boolean:, float:, id:, int:, date:, datetime:, json:, string:, enum_a:, enum_b:, input_object:, custom_scalar:) + def resolve(boolean:, float:, id:, int:, big_int:, date:, datetime:, json:, string:, enum_a:, enum_b:, input_object:, custom_scalar:) + # ... + end + end + RUBY + + expected = <<~RBI + # typed: strong + + class CreateComment + sig { params(boolean: T::Boolean, float: ::Float, id: ::String, int: ::Integer, big_int: ::Integer, date: ::Date, datetime: ::Time, json: T::Hash[::String, T.untyped], string: ::String, enum_a: ::String, enum_b: T.any(::String, ::Symbol), input_object: ::CreateCommentInput, custom_scalar: T.untyped).returns(T.untyped) } + def resolve(boolean:, float:, id:, int:, big_int:, date:, datetime:, json:, string:, enum_a:, enum_b:, input_object:, custom_scalar:); end + end + RBI + + assert_equal(expected, rbi_for(:CreateComment)) + end + + it "generates correct RBI arguments with a prepare method" do + # Prepare Methods that return void are technically invalid, + # but we don't raise anything and default to the input type + add_ruby_file("create_comment.rb", <<~RUBY) + class CreateComment < GraphQL::Schema::Mutation + extend T::Sig + + class << self + extend T::Sig + sig { params(min: Date).returns(T::Range[Date]) } + def prepare_dates(min) + min..(min + 1.day) + end + + sig { params(min: Date, _context: T::Hash).void } + def prepare_dates_void(max, _context) + (max - 1.day)..max + end + + def prepare_dates_untyped(other, _context) + other + end + end + + argument :min, GraphQL::Types::ISO8601Date, "Minimum value of the range", prepare: :prepare_dates + argument :max, GraphQL::Types::ISO8601Date, "Maximum value of the range", prepare: :prepare_dates_void + argument :other, GraphQL::Types::ISO8601Date, "Some value of the range ", prepare: :prepare_dates_untyped + argument :proc, GraphQL::Types::ISO8601Date, "Some value of the range ", prepare: ->(value, _ctx) { value } + + def resolve(min:, max:, other:, proc:) + # ... + end + end + RUBY + + expected = <<~RBI + # typed: strong + + class CreateComment + sig { params(min: T::Range[::Date], max: ::Date, other: ::Date, proc: ::Date).returns(T.untyped) } + def resolve(min:, max:, other:, proc:); end + end + RBI + + assert_equal(expected, rbi_for(:CreateComment)) + end + + it "generates correct RBI arguments with a prepare method on the argument class" do + add_ruby_file("create_comment.rb", <<~RUBY) + class CommentInput < GraphQL::Schema::InputObject + extend T::Sig + + class << self + extend T::Sig + sig { params(min: Date).returns(T::Range[Date]) } + def prepare_dates(min) + min..(min + 1.day) + end + + sig { params(min: Date, _context: T::Hash).void } + def prepare_dates_void(max, _context) + (max - 1.day)..max + end + + def prepare_dates_untyped(other, _context) + other + end + end + + argument :min, GraphQL::Types::ISO8601Date, "Minimum value of the range", prepare: :prepare_dates + argument :max, GraphQL::Types::ISO8601Date, "Maximum value of the range", prepare: :prepare_dates_void + argument :other, GraphQL::Types::ISO8601Date, "Some value of the range ", prepare: :prepare_dates_untyped + end + + class CreateComment < GraphQL::Schema::Mutation + argument :input, CommentInput, "A comment input" + + def resolve(comment_input:) + # ... + end + end + RUBY + + expected = <<~RBI + # typed: strong + + class CreateComment + sig { params(comment_input: T.untyped).returns(T.untyped) } + def resolve(comment_input:); end + end + RBI + + assert_equal(expected, rbi_for(:CreateComment)) + end + + it "generates correct RBI for Inputs with a prepare method" do + add_ruby_file("create_comment.rb", <<~RUBY) + class DateRangeInput < GraphQL::Schema::InputObject + extend T::Sig + + description "Range of dates" + argument :min, GraphQL::Types::ISO8601Date, "Minimum value of the range" + argument :max, GraphQL::Types::ISO8601Date, "Maximum value of the range" + + sig { returns(T::Range[Date]) } + def prepare + min..max + end + end + + class VoidInput < GraphQL::Schema::InputObject + extend T::Sig + + argument :void, String, "Not a real input" + + sig { void } + def prepare; end + end + + class UntypedInput < GraphQL::Schema::InputObject + argument :string, String, "Not a real input" + + def prepare + string.to_i + end + end + + class CreateComment < GraphQL::Schema::Mutation + extend T::Sig + + + argument :date_range, DateRangeInput, required: true + argument :void_input, VoidInput, required: true + argument :untyped_input, UntypedInput, required: true + + def resolve(date_range:, void_input:, untyped_input:) # ... end end @@ -163,8 +322,8 @@ def resolve(boolean:, float:, id:, int:, date:, datetime:, json:, string:, enum_ # typed: strong class CreateComment - sig { params(boolean: T::Boolean, float: ::Float, id: ::String, int: ::Integer, date: ::Date, datetime: ::Time, json: T::Hash[::String, T.untyped], string: ::String, enum_a: ::String, enum_b: T.any(::String, ::Symbol), input_object: ::CreateCommentInput, custom_scalar: ::CustomScalar).returns(T.untyped) } - def resolve(boolean:, float:, id:, int:, date:, datetime:, json:, string:, enum_a:, enum_b:, input_object:, custom_scalar:); end + sig { params(date_range: T::Range[::Date], void_input: ::VoidInput, untyped_input: ::UntypedInput).returns(T.untyped) } + def resolve(date_range:, void_input:, untyped_input:); end end RBI @@ -201,6 +360,63 @@ def resolve(loaded_argument:, loaded_arguments:, custom_name:, optional_loaded_a assert_equal(expected, rbi_for(:CreateComment)) end + + it "generates correct RBI for custom scalars with return types" do + add_ruby_file("create_comment.rb", <<~RUBY) + class CustomScalar; end + + class CustomScalarType < GraphQL::Schema::Scalar + class << self + extend T::Sig + + sig { params(value: T.untyped, context: GraphQL::Query::Context).returns(CustomScalar) } + def coerce_input(value, context) + CustomScalar.new + end + end + end + + class BrokenScalarType < GraphQL::Schema::Scalar + class << self + extend T::Sig + + sig { params(value: T.untyped, context: GraphQL::Query::Context).void } + def coerce_input(value, context) + end + end + end + + class NoSigScalarType < GraphQL::Schema::Scalar + class << self + def coerce_input(value, context) + end + end + end + + class CreateComment < GraphQL::Schema::Mutation + argument :custom_scalar, CustomScalarType, required: true + argument :custom_scalar_array, [CustomScalarType], required: true + argument :broken_scalar, BrokenScalarType, required: true + argument :no_sig_scalar, NoSigScalarType, required: true + argument :optional_custom_scalar, CustomScalarType, required: false + + def resolve(custom_scalar:, custom_scalar_array:, broken_scalar:, no_sig_scalar:, optional_custom_scalar: nil) + # ... + end + end + RUBY + + expected = <<~RBI + # typed: strong + + class CreateComment + sig { params(custom_scalar: ::CustomScalar, custom_scalar_array: T::Array[::CustomScalar], broken_scalar: T.untyped, no_sig_scalar: T.untyped, optional_custom_scalar: T.nilable(::CustomScalar)).returns(T.untyped) } + def resolve(custom_scalar:, custom_scalar_array:, broken_scalar:, no_sig_scalar:, optional_custom_scalar: T.unsafe(nil)); end + end + RBI + + assert_equal(expected, rbi_for(:CreateComment)) + end end end end diff --git a/spec/tapioca/dsl/compilers/identity_cache_spec.rb b/spec/tapioca/dsl/compilers/identity_cache_spec.rb index 42333bb3b..570c4d11b 100644 --- a/spec/tapioca/dsl/compilers/identity_cache_spec.rb +++ b/spec/tapioca/dsl/compilers/identity_cache_spec.rb @@ -11,6 +11,7 @@ class IdentityCacheSpec < ::DslSpec sig { void } def before_setup require "rails/railtie" + require "identity_cache" end describe "initialize" do @@ -171,6 +172,48 @@ def fetch_multi_id_by_title(keys); end assert_equal(expected, rbi_for(:Post)) end + it "generates multiple methods for cache_index with multiple fields" do + add_ruby_file("schema.rb", <<~RUBY) + ActiveRecord::Migration.suppress_messages do + ActiveRecord::Schema.define do + create_table :posts do |t| + t.integer :blog_id + t.string :title + end + end + end + RUBY + + add_ruby_file("post.rb", <<~RUBY) + class Post < ActiveRecord::Base + include IdentityCache + cache_index :blog_id, :title + end + RUBY + + expected = <<~RBI + # typed: strong + + class Post + class << self + sig { params(blog_id: T.untyped, title: T.untyped, includes: T.untyped).returns(T::Array[::Post]) } + def fetch_by_blog_id_and_title(blog_id, title, includes: nil); end + + sig { params(blog_id: T.untyped, title: T.untyped).returns(T.nilable(::Integer)) } + def fetch_id_by_blog_id_and_title(blog_id, title); end + + sig { params(index_values: T::Enumerable[T.untyped], includes: T.untyped).returns(T::Array[::Post]) } + def fetch_multi_by_blog_id_and_title(index_values, includes: nil); end + + sig { params(keys: T::Enumerable[T.untyped]).returns(T::Array[::Integer]) } + def fetch_multi_id_by_blog_id_and_title(keys); end + end + end + RBI + + assert_equal(expected, rbi_for(:Post)) + end + it "generates methods for combined cache_indexes" do add_ruby_file("schema.rb", <<~RUBY) ActiveRecord::Migration.suppress_messages do @@ -219,6 +262,9 @@ def fetch_multi_by_title_and_review_date(index_values, includes: nil); end sig { params(keys: T::Enumerable[T.untyped]).returns(T::Array[::Integer]) } def fetch_multi_id_by_title(keys); end + + sig { params(keys: T::Enumerable[T.untyped]).returns(T::Array[::Integer]) } + def fetch_multi_id_by_title_and_review_date(keys); end end end RBI @@ -365,6 +411,7 @@ class Post < ActiveRecord::Base include IdentityCache cache_attribute :author, by: :id + cache_attribute :author, by: [:id, :author] end RUBY @@ -376,8 +423,14 @@ class << self sig { params(id: T.untyped).returns(T.nilable(::String)) } def fetch_author_by_id(id); end + sig { params(id: T.untyped, author: T.untyped).returns(T.nilable(::String)) } + def fetch_author_by_id_and_author(id, author); end + sig { params(keys: T::Enumerable[T.untyped]).returns(T::Array[::String]) } def fetch_multi_author_by_id(keys); end + + sig { params(keys: T::Enumerable[T.untyped]).returns(T::Array[::String]) } + def fetch_multi_author_by_id_and_author(keys); end end end RBI diff --git a/spec/tapioca/dsl/compilers/json_api_client_resource_spec.rb b/spec/tapioca/dsl/compilers/json_api_client_resource_spec.rb index 090d0e0fd..8dfe12868 100644 --- a/spec/tapioca/dsl/compilers/json_api_client_resource_spec.rb +++ b/spec/tapioca/dsl/compilers/json_api_client_resource_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class JsonApiClientResourceSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::JsonApiClientResource" do + sig { void } + def before_setup + require "json_api_client" + end + describe "#initialize" do it "gathers no constants if there are no Resource classes" do assert_empty(gathered_constants) diff --git a/spec/tapioca/dsl/compilers/kredis_spec.rb b/spec/tapioca/dsl/compilers/kredis_spec.rb index 5145c77ee..12e87855f 100644 --- a/spec/tapioca/dsl/compilers/kredis_spec.rb +++ b/spec/tapioca/dsl/compilers/kredis_spec.rb @@ -8,8 +8,11 @@ module Dsl module Compilers class KredisSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::Kredis" do - before do + sig { void } + def before_setup require "tapioca/dsl/extensions/kredis" + require "kredis" + ActiveSupport.run_load_hooks(:before_configuration) end describe "initialize" do diff --git a/spec/tapioca/dsl/compilers/mixed_in_class_attributes_spec.rb b/spec/tapioca/dsl/compilers/mixed_in_class_attributes_spec.rb index 5705f76f4..c1e476233 100644 --- a/spec/tapioca/dsl/compilers/mixed_in_class_attributes_spec.rb +++ b/spec/tapioca/dsl/compilers/mixed_in_class_attributes_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class MixedInClassAttributesSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::MixedInClassAttributes" do + sig { void } + def before_setup + require "active_support/core_ext/class/attribute" + end + before do require "active_support/core_ext/class/attribute" require "active_support/concern" diff --git a/spec/tapioca/dsl/compilers/protobuf_spec.rb b/spec/tapioca/dsl/compilers/protobuf_spec.rb index 9f12ed272..84d921d7c 100644 --- a/spec/tapioca/dsl/compilers/protobuf_spec.rb +++ b/spec/tapioca/dsl/compilers/protobuf_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class ProtobufSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::Protobuf" do + sig { void } + def before_setup + require "google/protobuf" + end + describe "gather_constants" do it "gathers no constants if there are no Google::Protobuf classes" do add_ruby_file("content.rb", <<~RUBY) diff --git a/spec/tapioca/dsl/compilers/rails_generators_spec.rb b/spec/tapioca/dsl/compilers/rails_generators_spec.rb index 27610ca66..00fc8d9d0 100644 --- a/spec/tapioca/dsl/compilers/rails_generators_spec.rb +++ b/spec/tapioca/dsl/compilers/rails_generators_spec.rb @@ -8,6 +8,12 @@ module Dsl module Compilers class RailsGeneratorsSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::RailsGenerators" do + sig { void } + def before_setup + require "rails/generators" + require "rails/generators/app_base" + end + describe "initialize" do it "gathers no constants if there are no Rails generator classes" do assert_empty(gathered_constants) diff --git a/spec/tapioca/dsl/compilers/sidekiq_worker_spec.rb b/spec/tapioca/dsl/compilers/sidekiq_worker_spec.rb index 526e8d048..336fc768d 100644 --- a/spec/tapioca/dsl/compilers/sidekiq_worker_spec.rb +++ b/spec/tapioca/dsl/compilers/sidekiq_worker_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class SidekiqWorkerSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::SidekiqWorker" do + sig { void } + def before_setup + require "sidekiq" + end + describe "initialize" do it "gathers no constants if there are no classes with Sidekiq::Worker as ancestor" do assert_empty(gathered_constants) diff --git a/spec/tapioca/dsl/compilers/smart_properties_spec.rb b/spec/tapioca/dsl/compilers/smart_properties_spec.rb index f8acf7837..7c48d310a 100644 --- a/spec/tapioca/dsl/compilers/smart_properties_spec.rb +++ b/spec/tapioca/dsl/compilers/smart_properties_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class SmartPropertiesSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::SmartProperties" do + sig { void } + def before_setup + require "smart_properties" + end + describe "initialize" do it "gathers no constants if there are no SmartProperty classes" do assert_empty(gathered_constants) diff --git a/spec/tapioca/dsl/compilers/state_machines_spec.rb b/spec/tapioca/dsl/compilers/state_machines_spec.rb index c61d84b7f..4463ea61e 100644 --- a/spec/tapioca/dsl/compilers/state_machines_spec.rb +++ b/spec/tapioca/dsl/compilers/state_machines_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class StateMachinesSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::StateMachine" do + sig { void } + def before_setup + require "state_machines" + end + describe "initialize" do it "gathers no constants if there are no StateMachines classes" do assert_empty(gathered_constants) diff --git a/spec/tapioca/dsl/compilers/url_helpers_spec.rb b/spec/tapioca/dsl/compilers/url_helpers_spec.rb index 3159e8c43..7da820b21 100644 --- a/spec/tapioca/dsl/compilers/url_helpers_spec.rb +++ b/spec/tapioca/dsl/compilers/url_helpers_spec.rb @@ -8,6 +8,11 @@ module Dsl module Compilers class UrlHelpersSpec < ::DslSpec describe "Tapioca::Dsl::Compilers::UrlHelper" do + sig { void } + def before_setup + require "rails" + end + describe "initialize" do it "does not gather constants when url_helpers is not included" do add_ruby_file("content.rb", <<~RUBY) @@ -20,8 +25,6 @@ class MyClass assert_equal( [ - "ActionDispatch::IntegrationTest", - "ActionView::Helpers", "GeneratedPathHelpersModule", "GeneratedUrlHelpersModule", ], @@ -41,8 +44,6 @@ class MyClass assert_equal( [ - "ActionDispatch::IntegrationTest", - "ActionView::Helpers", "GeneratedPathHelpersModule", "GeneratedUrlHelpersModule", "MyClass", @@ -63,8 +64,6 @@ class MyClass assert_equal( [ - "ActionDispatch::IntegrationTest", - "ActionView::Helpers", "GeneratedPathHelpersModule", "GeneratedUrlHelpersModule", "MyClass", @@ -87,8 +86,6 @@ class << self assert_equal( [ - "ActionDispatch::IntegrationTest", - "ActionView::Helpers", "GeneratedPathHelpersModule", "GeneratedUrlHelpersModule", "MyClass", @@ -112,8 +109,6 @@ class MyClass < SuperClass assert_equal( [ - "ActionDispatch::IntegrationTest", - "ActionView::Helpers", "GeneratedPathHelpersModule", "GeneratedUrlHelpersModule", "SuperClass", @@ -137,8 +132,6 @@ class MyClass < SuperClass assert_equal( [ - "ActionDispatch::IntegrationTest", - "ActionView::Helpers", "GeneratedPathHelpersModule", "GeneratedUrlHelpersModule", "SuperClass", @@ -163,8 +156,6 @@ class MyClass < SuperClass assert_equal( [ - "ActionDispatch::IntegrationTest", - "ActionView::Helpers", "GeneratedPathHelpersModule", "GeneratedUrlHelpersModule", "SuperClass", @@ -183,8 +174,6 @@ class Application < Rails::Application assert_equal( [ - "ActionDispatch::IntegrationTest", - "ActionView::Helpers", "GeneratedPathHelpersModule", "GeneratedUrlHelpersModule", ], @@ -215,8 +204,6 @@ class Foo < Bar assert_equal( [ - "ActionDispatch::IntegrationTest", - "ActionView::Helpers", "GeneratedPathHelpersModule", "GeneratedUrlHelpersModule", ], @@ -304,40 +291,58 @@ def new_index_url(*args); end assert_equal(expected, rbi_for(:GeneratedUrlHelpersModule)) end - it "generates RBI for ActionDispatch::IntegrationTest" do - add_ruby_file("routes.rb", <<~RUBY) - class Application < Rails::Application - end - RUBY + describe "when Action Controller is loaded" do + sig { void } + def before_setup + require "rails" + require "action_controller" + end - expected = <<~RBI - # typed: strong + it "generates RBI for ActionDispatch::IntegrationTest" do + add_ruby_file("routes.rb", <<~RUBY) + class Application < Rails::Application + end + RUBY - class ActionDispatch::IntegrationTest - include GeneratedUrlHelpersModule - include GeneratedPathHelpersModule - end - RBI + expected = <<~RBI + # typed: strong + + class ActionDispatch::IntegrationTest + include GeneratedUrlHelpersModule + include GeneratedPathHelpersModule + end + RBI - assert_equal(expected, rbi_for("ActionDispatch::IntegrationTest")) + assert_equal(expected, rbi_for("ActionDispatch::IntegrationTest")) + end end - it "generates RBI for ActionView::Helpers" do - add_ruby_file("routes.rb", <<~RUBY) - class Application < Rails::Application - end - RUBY + describe "when Action View is loaded" do + sig { void } + def before_setup + require "rails" + require "action_view" + end - expected = <<~RBI - # typed: strong + it "generates RBI for ActionView::Helpers" do + add_ruby_file("routes.rb", <<~RUBY) + require "action_view" - module ActionView::Helpers - include GeneratedUrlHelpersModule - include GeneratedPathHelpersModule - end - RBI + class Application < Rails::Application + end + RUBY + + expected = <<~RBI + # typed: strong + + module ActionView::Helpers + include GeneratedUrlHelpersModule + include GeneratedPathHelpersModule + end + RBI - assert_equal(expected, rbi_for("ActionView::Helpers")) + assert_equal(expected, rbi_for("ActionView::Helpers")) + end end it "generates RBI for constant that includes url_helpers" do diff --git a/spec/tapioca/dsl/helpers/active_model_type_helper_spec.rb b/spec/tapioca/dsl/helpers/active_model_type_helper_spec.rb new file mode 100644 index 000000000..b74d286a9 --- /dev/null +++ b/spec/tapioca/dsl/helpers/active_model_type_helper_spec.rb @@ -0,0 +1,264 @@ +# typed: strict +# frozen_string_literal: true + +require "spec_helper" +require "active_model" +require "tapioca/dsl/helpers/active_model_type_helper" + +module Tapioca + module Dsl + module Helpers + class ActiveModelTypeHelperSpec < Minitest::Spec + class ValueType + extend T::Generic + + Elem = type_member + end + + class CustomWithTypeVariable < ActiveModel::Type::Value + extend T::Sig + extend T::Generic + + Elem = type_member + + sig { params(value: T.untyped).returns(Elem) } + def cast(value) + super + end + end + + describe "type_for" do + it "discovers custom type from signature on deserialize method" do + klass = Class.new(ActiveModel::Type::Value) do + extend T::Sig + + sig { params(value: T.untyped).returns(String) } + def cast(value) + super + end + + sig { params(value: T.untyped).returns(Float) } + def deserialize(value) + super + end + + sig { params(value: Symbol).returns(T.untyped) } + def serialize(value) + super + end + + sig { params(value: T.untyped).returns(Integer) } + def cast_value(value) + super + end + end + + assert_equal( + "::Float", + Tapioca::Dsl::Helpers::ActiveModelTypeHelper.type_for(klass.new), + "The return type of `deserialize` has the highest priority.", + ) + end + + it "discovers custom type from signature on cast method" do + klass = Class.new(ActiveModel::Type::Value) do + extend T::Sig + + sig { params(value: T.untyped).returns(String) } + def cast(value) + super + end + + sig { params(value: T.untyped).returns(T.untyped) } + def deserialize(value) + super + end + + sig { params(value: Symbol).returns(T.untyped) } + def serialize(value) + super + end + + sig { params(value: T.untyped).returns(Integer) } + def cast_value(value) + super + end + end + + assert_equal( + "::String", + Tapioca::Dsl::Helpers::ActiveModelTypeHelper.type_for(klass.new), + "The return type of `cast` has second priority.", + ) + end + + it "discovers custom type from signature on cast_value method" do + klass = Class.new(ActiveModel::Type::Value) do + extend T::Sig + + sig { params(value: T.untyped).returns(T.untyped) } + def cast(value) + super + end + + sig { params(value: T.untyped).returns(T.untyped) } + def deserialize(value) + super + end + + sig { params(value: Symbol).returns(T.untyped) } + def serialize(value) + super + end + + sig { params(value: T.untyped).returns(Integer) } + def cast_value(value) + super + end + end + + assert_equal( + "::Integer", + Tapioca::Dsl::Helpers::ActiveModelTypeHelper.type_for(klass.new), + "The return type of `cast_value` has third priority.", + ) + end + + it "discovers custom type from signature on serialize method" do + klass = Class.new(ActiveModel::Type::Value) do + extend T::Sig + + sig { params(value: T.untyped).returns(T.untyped) } + def cast(value) + super + end + + sig { params(value: T.untyped).returns(T.untyped) } + def deserialize(value) + super + end + + sig { params(value: Symbol).returns(T.untyped) } + def serialize(value) + super + end + + sig { params(value: T.untyped).returns(T.untyped) } + def cast_value(value) + super + end + end + + assert_equal( + "::Symbol", + Tapioca::Dsl::Helpers::ActiveModelTypeHelper.type_for(klass.new), + "The argument type of `serialize` has fourth priority.", + ) + end + + it "discovers custom type even if it is not ActiveModel::Type::Value" do + klass = Class.new do + extend T::Sig + + sig { params(value: T.untyped).returns(Integer) } + def cast(value) + end + end + + assert_equal( + "::Integer", + Tapioca::Dsl::Helpers::ActiveModelTypeHelper.type_for(klass.new), + ) + end + + it "discovers custom type even if it is generic" do + klass = Class.new(ActiveModel::Type::Value) do + extend T::Sig + + sig { params(value: T.untyped).returns(ValueType[Integer]) } + def cast(value) + end + end + + assert_equal( + "Tapioca::Dsl::Helpers::ActiveModelTypeHelperSpec::ValueType[::Integer]", + Tapioca::Dsl::Helpers::ActiveModelTypeHelper.type_for(klass.new), + ) + end + + it "returns a weak type when the custom column type is a type variable" do + assert_equal( + "T.untyped", + Tapioca::Dsl::Helpers::ActiveModelTypeHelper.type_for(CustomWithTypeVariable[Integer].new), + ) + end + + it "returns a weak type if custom type cannot be discovered from signatures" do + klass = Class.new(ActiveModel::Type::Value) do + extend T::Sig + + sig { params(value: T.untyped).returns(T.untyped) } + def cast(value) + super + end + + sig { params(value: T.untyped).returns(T.noreturn) } + def deserialize(value) + super + end + + sig { params(value: T.untyped).returns(T.untyped) } + def serialize(value) + super + end + + sig { params(value: T.untyped).returns(T.untyped) } + def cast_value(value) + super + end + end + + assert_equal( + "T.untyped", + Tapioca::Dsl::Helpers::ActiveModelTypeHelper.type_for(klass.new), + ) + end + + it "returns a weak type if custom type does not have any signatures" do + klass = Class.new(ActiveModel::Type::Value) do + def cast(value) + super + end + + def deserialize(value) + super + end + + def serialize(value) + super + end + + def cast_value(value) + super + end + end + + assert_equal( + "T.untyped", + Tapioca::Dsl::Helpers::ActiveModelTypeHelper.type_for(klass.new), + ) + end + + it "returns a weak type if custom type does not have any methods" do + klass = Class.new(ActiveModel::Type::Value) + + assert_equal( + "T.untyped", + Tapioca::Dsl::Helpers::ActiveModelTypeHelper.type_for(klass.new), + ) + end + end + end + end + end +end diff --git a/spec/tapioca/dsl/helpers/graphql_type_helper_spec.rb b/spec/tapioca/dsl/helpers/graphql_type_helper_spec.rb new file mode 100644 index 000000000..c3a86a492 --- /dev/null +++ b/spec/tapioca/dsl/helpers/graphql_type_helper_spec.rb @@ -0,0 +1,196 @@ +# typed: strict +# frozen_string_literal: true + +require "spec_helper" +require "graphql" +require "tapioca/dsl/helpers/graphql_type_helper" + +module Tapioca + module Dsl + module Helpers + class GraphqlTypeHelperSpec < Minitest::Spec + extend T::Sig + + it "generates the expected sorbet type expression when using type GraphQL::Types::Boolean" do + type = GraphQL::Types::Boolean + assert_equal( + "T.nilable(T::Boolean)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(type), + ) + assert_equal( + "T.nilable(T::Boolean)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::Wrapper.new(type)), + ) + assert_equal( + "T.nilable(T::Array[T::Boolean])", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::List.new(type)), + ) + assert_equal( + "T::Boolean", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::NonNull.new(type)), + ) + end + + it "generates the expected sorbet type expression when using type GraphQL::Types::String" do + type = GraphQL::Types::String + assert_equal( + "T.nilable(::String)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(type), + ) + assert_equal( + "T.nilable(::String)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::Wrapper.new(type)), + ) + assert_equal( + "T.nilable(T::Array[::String])", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::List.new(type)), + ) + assert_equal( + "::String", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::NonNull.new(type)), + ) + end + + it "generates the expected sorbet type expression when using type GraphQL::Types::Float" do + type = GraphQL::Types::Float + assert_equal( + "T.nilable(::Float)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(type), + ) + assert_equal( + "T.nilable(::Float)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::Wrapper.new(type)), + ) + assert_equal( + "T.nilable(T::Array[::Float])", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::List.new(type)), + ) + assert_equal( + "::Float", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::NonNull.new(type)), + ) + end + + it "generates the expected sorbet type expression when using type GraphQL::Types::ID" do + type = GraphQL::Types::ID + assert_equal( + "T.nilable(::String)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(type), + ) + assert_equal( + "T.nilable(::String)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::Wrapper.new(type)), + ) + assert_equal( + "T.nilable(T::Array[::String])", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::List.new(type)), + ) + assert_equal( + "::String", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::NonNull.new(type)), + ) + end + + it "generates the expected sorbet type expression when using type GraphQL::Types::Int" do + type = GraphQL::Types::Int + assert_equal( + "T.nilable(::Integer)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(type), + ) + assert_equal( + "T.nilable(::Integer)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::Wrapper.new(type)), + ) + assert_equal( + "T.nilable(T::Array[::Integer])", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::List.new(type)), + ) + assert_equal( + "::Integer", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::NonNull.new(type)), + ) + end + + it "generates the expected sorbet type expression when using type GraphQL::Types::BigInt" do + type = GraphQL::Types::BigInt + assert_equal( + "T.nilable(::Integer)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(type), + ) + assert_equal( + "T.nilable(::Integer)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::Wrapper.new(type)), + ) + assert_equal( + "T.nilable(T::Array[::Integer])", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::List.new(type)), + ) + assert_equal( + "::Integer", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::NonNull.new(type)), + ) + end + + it "generates the expected sorbet type expression when using type GraphQL::Types::ISO8601Date" do + type = GraphQL::Types::ISO8601Date + assert_equal( + "T.nilable(::Date)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(type), + ) + assert_equal( + "T.nilable(::Date)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::Wrapper.new(type)), + ) + assert_equal( + "T.nilable(T::Array[::Date])", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::List.new(type)), + ) + assert_equal( + "::Date", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::NonNull.new(type)), + ) + end + + it "generates the expected sorbet type expression when using type GraphQL::Types::ISO8601DateTime" do + type = GraphQL::Types::ISO8601DateTime + assert_equal( + "T.nilable(::Time)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(type), + ) + assert_equal( + "T.nilable(::Time)", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::Wrapper.new(type)), + ) + assert_equal( + "T.nilable(T::Array[::Time])", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::List.new(type)), + ) + assert_equal( + "::Time", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::NonNull.new(type)), + ) + end + + it "generates the expected sorbet type expression when using type GraphQL::Types::JSON" do + type = GraphQL::Types::JSON + assert_equal( + "T.nilable(T::Hash[::String, T.untyped])", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(type), + ) + assert_equal( + "T.nilable(T::Hash[::String, T.untyped])", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::Wrapper.new(type)), + ) + assert_equal( + "T.nilable(T::Array[T::Hash[::String, T.untyped]])", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::List.new(type)), + ) + assert_equal( + "T::Hash[::String, T.untyped]", + Tapioca::Dsl::Helpers::GraphqlTypeHelper.type_for(GraphQL::Schema::NonNull.new(type)), + ) + end + end + end + end +end diff --git a/spec/tapioca/gem/pipeline_spec.rb b/spec/tapioca/gem/pipeline_spec.rb index 8feb45cde..21cc34810 100644 --- a/spec/tapioca/gem/pipeline_spec.rb +++ b/spec/tapioca/gem/pipeline_spec.rb @@ -12,34 +12,60 @@ class Tapioca::Gem::PipelineSpec < Minitest::HooksSpec include Tapioca::Helpers::Test::Isolation include Tapioca::SorbetHelper - describe Tapioca::Gem::Pipeline do - sig { params(include_doc: T::Boolean, include_loc: T::Boolean).returns(String) } - def compile(include_doc: false, include_loc: false) - # create a fake gemspec - spec = ::Gem::Specification.new("the-dep", "1.1.2") do |spec| + DEFAULT_GEM_NAME = T.let("the-default-gem", String) + + private + + sig { params(gem_name: String, include_doc: T::Boolean, include_loc: T::Boolean).returns(String) } + def compile(gem_name = DEFAULT_GEM_NAME, include_doc: false, include_loc: false) + mock_gem_path = mock_gems[gem_name] + + # If we are compiling for a mock gem, we need to create a fake gemspec + if mock_gem_path + spec = ::Gem::Specification.new(gem_name, "1.0.0") do |spec| spec.platform = nil - spec.full_gem_path = tmp_path + spec.full_gem_path = mock_gem_path spec.require_paths = ["lib"] end - # add it to the list of gem specification stubs - Gem::Specification.stubs[spec.name] = spec + # add spec to the list of gem specification stubs + Gem::Specification.stubs[gem_name] = spec + end - # wrap it in our gemspec wrapper - gem = Tapioca::Gemfile::GemSpec.new(spec) + # wrap it in our gemspec wrapper + gem = Tapioca::Gemfile::GemSpec.new(Gem::Specification.stubs[gem_name].first) - # push it through the pipeline - tree = Tapioca::Gem::Pipeline.new(gem, include_doc: include_doc, include_loc: include_loc).compile + # push it through the pipeline + tree = Tapioca::Gem::Pipeline.new(gem, include_doc: include_doc, include_loc: include_loc).compile - # NOTE: This is not returning a `RBI::File`. - # The following test suite is based on the string output of the `RBI::Tree` rather - # than the, now used, `RBI::File`. The file output includes the sigils, comments, etc. - # We should eventually update these tests to be based on the `RBI::File`. - Tapioca::DEFAULT_RBI_FORMATTER.format_tree(tree) + # NOTE: This is not returning a `RBI::File`. + # The following test suite is based on the string output of the `RBI::Tree` rather + # than the, now used, `RBI::File`. The file output includes the sigils, comments, etc. + # We should eventually update these tests to be based on the `RBI::File`. + Tapioca::DEFAULT_RBI_FORMATTER.format_tree(tree) - tree.string - end + tree.string + end + + sig { params(gem_name: String, block: T.proc.void).void } + def mock_gem(gem_name, &block) + current_tmp_path = tmp_path + + @tmp_path = mock_gems.fetch(gem_name) { mock_gems[gem_name] = Dir.mktmpdir } + + block.call + ensure + @tmp_path = current_tmp_path + end + sig { returns(T::Hash[String, String]) } + def mock_gems + @gems ||= T.let({}, T.nilable(T::Hash[String, String])) + @gems[DEFAULT_GEM_NAME] = tmp_path if @gems.empty? + @gems + end + + describe Tapioca::Gem::Pipeline do before do # We need to undefine and unload `ActiveSupport` so that the test object # space is as clean as possible. @@ -410,6 +436,245 @@ class Object < ::BasicObject assert_includes(compiled, output) end + it "must do mixin attribution properly when include occurs in other gem" do + mock_gem("some_engine") do + add_ruby_file("lib/some_engine.rb", <<~RUBY) + require "action_controller" + + module SomeEngine + class SomeController < ActionController::Base + # This method triggers a dynamic mixin which should be attributed to this gem + # and not actionpack, even though the real `include` happens inside actionpack + helper_method :foo + end + end + RUBY + end + + output = template(<<~RBI) + module SomeEngine; end + + class SomeEngine::SomeController < ::ActionController::Base + private + + def _layout(lookup_context, formats); end + + class << self + def _helper_methods; end + def middleware_stack; end + end + end + + module SomeEngine::SomeController::HelperMethods + include ::ActionController::Base::HelperMethods + + <% if ruby_version(">= 3.1") %> + def foo(*args, **_arg1, &block); end + <% else %> + def foo(*args, &block); end + <% end %> + end + RBI + + assert_equal(output, compile("some_engine")) + end + + it "must generate RBIs for constants defined in a different gem but with mixins in this gem" do + mock_gem("foo") do + add_ruby_file("lib/foo.rb", <<~RBI) + class Foo + def baz; end + def buzz; end + end + RBI + end + + mock_gem("bar") do + add_ruby_file("lib/bar.rb", <<~RBI) + module Bar; end + + Foo.prepend(Bar) + RBI + end + + output = <<~RBI + module Bar; end + + class Foo + include ::Bar + end + RBI + + assert_equal(output, compile("bar")) + end + + it "must not generate RBIs for constants that have dynamic mixins performed in other gems" do + mock_gem("bar") do + add_ruby_file("lib/bar.rb", <<~RBI) + module Bar; end + RBI + end + + mock_gem("foo") do + add_ruby_file("lib/foo.rb", <<~RBI) + class Foo; end + String.prepend(Bar) + RBI + end + + output = <<~RBI + module Bar; end + RBI + + assert_equal(output, compile("bar")) + end + + it "must generate RBIs for constants that have dynamic mixins performed in the gem" do + mock_gem("bar") do + add_ruby_file("lib/bar.rb", <<~RBI) + class Bar + def bar; end + end + RBI + end + + mock_gem("foo") do + add_ruby_file("lib/foo.rb", <<~RBI) + module Foo; end + class Baz < Bar; end + + Bar.prepend(Foo) + RBI + end + + output = <<~RBI + class Bar + include ::Foo + end + + class Baz < ::Bar; end + module Foo; end + RBI + + assert_equal(output, compile("foo")) + end + + it "must generate RBIs for foreign constants whose singleton class overrides #inspect" do + mock_gem("bar") do + add_ruby_file("lib/bar.rb", <<~RBI) + class Bar + def self.inspect + "Override!" + end + end + RBI + end + + mock_gem("foo") do + add_ruby_file("lib/foo.rb", <<~RBI) + module Foo; end + + Bar.singleton_class.include(Foo) + RBI + end + + output = <<~RBI + class Bar + extend ::Foo + end + + module Foo; end + RBI + + assert_equal(output, compile("foo")) + end + + it "generates documentation only for the gem that defines it" do + mock_gem("foo") do + add_ruby_file("lib/foo.rb", <<~RB) + # Most objects are cloneable + class Object + def foo; end + end + RB + end + mock_gem("bar") do + add_ruby_file("lib/bar.rb", <<~RB) + class Object + def bar; end + end + RB + end + mock_gem("baz") do + add_ruby_file("lib/baz.rb", <<~RB) + def baz; end + RB + end + + documentation = <<~RBI + # Most objects are cloneable + RBI + + assert_includes(compile("foo", include_doc: true), documentation) + refute_includes(compile("bar", include_doc: true), documentation) + refute_includes(compile("baz", include_doc: true), documentation) + end + + it "does not generate RBI if namespace contains alias from different gem" do + mock_gem("foo") do + add_ruby_file("lib/foo.rb", <<~RB) + module Foo; end + F = Foo + RB + end + + mock_gem("bar") do + add_ruby_file("lib/bar.rb", <<~RB) + module Foo + module Bar; end + end + F::B = Foo::Bar + RB + end + + assert_equal(<<~RBI, compile("foo")) + F = Foo + module Foo; end + RBI + + assert_equal(<<~RBI, compile("bar")) + module Foo; end + Foo::B = Foo::Bar + module Foo::Bar; end + RBI + end + + it "must do mixin attribution properly" do + # This is pattern is taken from the private `typed_parameters` gem. + add_ruby_file("lib/typed_parameters.rb", <<~RUBY) + require "action_controller" + + module TypedParameters + end + + # This dynamic mixin should be generated in the gem RBI + ActionController::Parameters.include(TypedParameters) + RUBY + + # actionpack RBI should have nothing in it about `TypedParameters` + refute_includes(compile("actionpack"), "TypedParameters") + + output = <<~RBI + class ActionController::Parameters + include ::TypedParameters + end + + module TypedParameters; end + RBI + + assert_equal(output, compile) + end + it "compiles mixins in the correct order" do add_ruby_file("bar.rb", <<~RUBY) module ModuleA @@ -497,7 +762,6 @@ module Bar; end RUBY add_ruby_file("ext.rb", <<~RUBY) - class String include Foo::Bar @@ -520,7 +784,7 @@ class Array def foo_int; end end - class Module + class Symbol def bar; end end RUBY @@ -547,16 +811,18 @@ class Hash def to_bar; end end - class Module - def bar; end - end - class String include ::Comparable include ::Foo::Bar def to_foo(base = T.unsafe(nil)); end end + + class Symbol + include ::Comparable + + def bar; end + end RBI compiled = compile @@ -2043,11 +2309,7 @@ module Toto; end RUBY output = template(<<~RBI) - <% if sorbet_supports?(:non_generic_weak_map) %> Foo = T.let(T.unsafe(nil), ObjectSpace::WeakMap) - <% else %> - Foo = T.let(T.unsafe(nil), ObjectSpace::WeakMap[T.untyped]) - <% end %> RBI assert_equal(output, compile) @@ -2800,6 +3062,8 @@ class Bar < T::Struct const :baz, T::Hash[String, T.untyped] prop :quux, T.untyped, default: [1, 2, 3] const :quuz, Integer, factory: -> { 1 } + prop :fuzz, T.proc.returns(String), default: -> { "" } + prop :buzz, T.proc.void, factory: -> { 42 } end RUBY @@ -2894,18 +3158,16 @@ class ComplexGenericType B = type_template(:out) C = type_template - # The constants below are using the old type variable syntax specifically, - # so that we can be certain that we handle the old syntax properly. - D = type_member(fixed: Integer) - E = type_member(fixed: Integer, upper: T::Array[Numeric]) - F = type_member( + D = type_member { { fixed: Integer } } + E = type_member { { fixed: Integer, upper: T::Array[Numeric] } } + F = type_member { { fixed: Integer, lower: T.any(Complex, T::Hash[Symbol, T::Array[Integer]]), - upper: T.nilable(Numeric) - ) - G = type_member(:in, fixed: Integer) - H = type_member(:in, fixed: Integer, upper: Numeric) - I = type_member(:in, fixed: Integer, lower: Complex, upper: Numeric) + upper: T.nilable(Numeric), + } } + G = type_member(:in) { { fixed: Integer } } + H = type_member(:in) { { fixed: Integer, upper: Numeric } } + I = type_member(:in) { { fixed: Integer, lower: Complex, upper: Numeric } } class << self extend(T::Generic) @@ -2976,6 +3238,8 @@ class Bar < ::T::Struct const :baz, T::Hash[::String, T.untyped] prop :quux, T.untyped, default: T.unsafe(nil) const :quuz, ::Integer, default: T.unsafe(nil) + prop :fuzz, T.proc.returns(::String), default: T.unsafe(nil) + prop :buzz, T.proc.void, default: T.unsafe(nil) class << self def inherited(s); end @@ -4112,12 +4376,6 @@ def baz(&block); end end it "compile RBIs with location from gem source" do - add_ruby_file("option.rb", <<~RB) - class Option - include Mutex_m - end - RB - add_ruby_file("bar.rb", <<~RB) module Bar extend T::Sig @@ -4170,94 +4428,72 @@ def foo; end NewClass = Class.new RB - mutex = Class.new { |k| k.include(::Mutex_m) } - sorbet_runtime_version = ::Gem::Specification.find_by_name("sorbet-runtime").version.to_s - mutex_version = ::Gem::Specification.default_stubs.find { |s| s.name == "mutex_m" }.version.to_s + sorbet_runtime_spec = ::Gem::Specification.find_by_name("sorbet-runtime") output = template(<<~RBI) - # source://the-dep//lib/bar.rb#1 + # source://#{DEFAULT_GEM_NAME}//lib/bar.rb#1 module Bar # Some documentation # - # source://the-dep//lib/bar.rb#6 + # source://#{DEFAULT_GEM_NAME}//lib/bar.rb#6 sig { void } def bar; end def foo1; end - # source://the-dep//lib/bar.rb#15 + # source://#{DEFAULT_GEM_NAME}//lib/bar.rb#15 def foo2; end class << self # Some documentation # - # source://the-dep//lib/bar.rb#9 + # source://#{DEFAULT_GEM_NAME}//lib/bar.rb#9 def bar; end end end - # source://the-dep//lib/bar.rb#11 + # source://#{DEFAULT_GEM_NAME}//lib/bar.rb#11 Bar::BAR = T.let(T.unsafe(nil), Integer) - # source://the-dep//lib/foo.rb#23 + # source://#{DEFAULT_GEM_NAME}//lib/foo.rb#23 class BasicFoo < ::BasicObject - # source://the-dep//lib/foo.rb#27 + # source://#{DEFAULT_GEM_NAME}//lib/foo.rb#27 sig { void } def foo; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # - # source://the-dep//lib/foo.rb#11 + # source://#{DEFAULT_GEM_NAME}//lib/foo.rb#11 class Baz abstract! end - # source://the-dep//lib/foo.rb#1 + # source://#{DEFAULT_GEM_NAME}//lib/foo.rb#1 class Foo; end - # source://the-dep//lib/foo.rb#6 + # source://#{DEFAULT_GEM_NAME}//lib/foo.rb#6 module Foo::Helper - # source://the-dep//lib/foo.rb#7 + # source://#{DEFAULT_GEM_NAME}//lib/foo.rb#7 def helper_method; end end - # source://the-dep//lib/foo.rb#30 + # source://#{DEFAULT_GEM_NAME}//lib/foo.rb#30 class NewClass; end - # source://the-dep//lib/option.rb#1 - class Option - include ::Mutex_m - - # source://mutex_m/#{mutex_version}/mutex_m.rb##{mutex.instance_method(:lock).source_location&.last} - def lock; end - - # source://mutex_m/#{mutex_version}/mutex_m.rb##{mutex.instance_method(:locked?).source_location&.last} - def locked?; end - - # source://mutex_m/#{mutex_version}/mutex_m.rb##{mutex.instance_method(:synchronize).source_location&.last} - def synchronize(&block); end - - # source://mutex_m/#{mutex_version}/mutex_m.rb##{mutex.instance_method(:try_lock).source_location&.last} - def try_lock; end - - # source://mutex_m/#{mutex_version}/mutex_m.rb##{mutex.instance_method(:unlock).source_location&.last} - def unlock; end - end - - # source://the-dep//lib/foo.rb#16 + # source://#{DEFAULT_GEM_NAME}//lib/foo.rb#16 class Quux < ::T::Struct class << self - # source://sorbet-runtime/#{sorbet_runtime_version}/lib/types/struct.rb#13 + # source://sorbet-runtime/#{sorbet_runtime_spec.version}/lib/types/struct.rb#13 def inherited(s); end end end - # source://the-dep//lib/foo.rb#19 + # source://#{DEFAULT_GEM_NAME}//lib/foo.rb#19 class String include ::Comparable - # source://the-dep//lib/foo.rb#20 + # source://#{DEFAULT_GEM_NAME}//lib/foo.rb#20 def foo; end end RBI diff --git a/spec/tapioca/gemfile_spec.rb b/spec/tapioca/gemfile_spec.rb index f011c0a62..d0351d09c 100644 --- a/spec/tapioca/gemfile_spec.rb +++ b/spec/tapioca/gemfile_spec.rb @@ -16,7 +16,7 @@ class GemfileSpec < SpecWithProject it "export_rbi_files? returns true if the gem exports at least one RBI file" do bar_gem = mock_gem("bar", "1.0.0") - bar_gem.write("rbi/foo.rbi") + bar_gem.write!("rbi/foo.rbi") bar_spec = make_spec(bar_gem) assert(bar_spec.export_rbi_files?) end @@ -29,8 +29,8 @@ class GemfileSpec < SpecWithProject it "exported_rbi_files returns the list of RBI files exported by the gem" do bar_gem = mock_gem("bar", "1.0.0") - bar_gem.write("rbi/foo.rbi") - bar_gem.write("rbi/bar.rbi") + bar_gem.write!("rbi/foo.rbi") + bar_gem.write!("rbi/bar.rbi") bar_spec = make_spec(bar_gem) bar_rbis = bar_spec.exported_rbi_files.map { |path| File.basename(path) } assert_equal(["bar.rbi", "foo.rbi"], bar_rbis) @@ -47,7 +47,7 @@ class GemfileSpec < SpecWithProject it "creates a tree by merging all the RBI files exported by te gem" do foo_gem = mock_gem("foo", "0.0.1") - foo_gem.write("rbi/foo.rbi", <<~RBI) + foo_gem.write!("rbi/foo.rbi", <<~RBI) # typed: true module Foo @@ -58,7 +58,7 @@ def foo(a = T.unsafe(nil), b = T.unsafe(nil)); end end RBI - foo_gem.write("rbi/bar.rbi", <<~RBI) + foo_gem.write!("rbi/bar.rbi", <<~RBI) # typed: true module Foo @@ -88,7 +88,7 @@ def foo(a = T.unsafe(nil), b = T.unsafe(nil)); end it "creates a tree with conflicts if the gem export RBI files with conflicting definitions" do foo_gem = mock_gem("foo", "0.0.1") - foo_gem.write("rbi/foo.rbi", <<~RBI) + foo_gem.write!("rbi/foo.rbi", <<~RBI) # typed: true module Foo @@ -97,7 +97,7 @@ def foo(a = T.unsafe(nil), b = T.unsafe(nil)); end end RBI - foo_gem.write("rbi/bar.rbi", <<~RBI) + foo_gem.write!("rbi/bar.rbi", <<~RBI) # typed: true module Foo @@ -128,13 +128,13 @@ def foo(a = T.unsafe(nil), b = T.unsafe(nil)); end it "ignore? returns false for gems within Ruby even when Ruby is installed inside the project" do # Imitate Ruby being installed inside the project original_rubylibprefix = RbConfig::CONFIG["rubylibprefix"] - mock_rubylibprefix = "#{File.realpath(@project.path)}/vendor/ruby/lib" + mock_rubylibprefix = "#{File.realpath(@project.absolute_path)}/vendor/ruby/lib" RbConfig::CONFIG["rubylibprefix"] = mock_rubylibprefix foo_gem = mock_gem("foo", "0.0.1", path: "#{mock_rubylibprefix}/ruby/gems") foo_spec = make_spec(foo_gem) - refute(foo_spec.ignore?(@project.path)) + refute(foo_spec.ignore?(@project.absolute_path)) ensure RbConfig::CONFIG["rubylibprefix"] = original_rubylibprefix end @@ -143,7 +143,7 @@ def foo(a = T.unsafe(nil), b = T.unsafe(nil)); end sig { params(gem: MockGem).returns(Gemfile::GemSpec) } def make_spec(gem) - mock = MockGemSpecification.new(gem.path) + mock = MockGemSpecification.new(gem.absolute_path) Gemfile::GemSpec.new(mock) end end diff --git a/spec/tapioca/runtime/generic_type_registry_spec.rb b/spec/tapioca/runtime/generic_type_registry_spec.rb new file mode 100644 index 000000000..4d5f0c21f --- /dev/null +++ b/spec/tapioca/runtime/generic_type_registry_spec.rb @@ -0,0 +1,97 @@ +# typed: true +# frozen_string_literal: true + +require "spec_helper" + +module Tapioca + module Runtime + class GenericTypeRegistrySpec < Minitest::Spec + describe Tapioca::Runtime::GenericTypeRegistry do + describe ".generic_type_instance?" do + it "returns false for instances of non-generic classes" do + refute(GenericTypeRegistry.generic_type_instance?(Object.new)) + end + + it "returns true for instances of generic classes" do + assert(GenericTypeRegistry.generic_type_instance?(SampleGenericClass[Object].new)) + end + end + + describe ".lookup_type_variables" do + it "returns nil for non-generic types" do + assert_nil(GenericTypeRegistry.lookup_type_variables(Object)) + end + + it "returns the type variables for generic types" do + assert_equal([SampleGenericClass::Element], GenericTypeRegistry.lookup_type_variables(SampleGenericClass)) + end + end + + describe ".register_type_variable" do + it " registers a type variable that can be looked up later" do + not_actually_generic = Class.new + + fake_type_member1 = Tapioca::TypeVariableModule.new( + not_actually_generic, + Tapioca::TypeVariableModule::Type::Member, + :invariant, + nil, + ) + + fake_type_member2 = Tapioca::TypeVariableModule.new( + not_actually_generic, + Tapioca::TypeVariableModule::Type::Member, + :invariant, + nil, + ) + + GenericTypeRegistry.register_type_variable(not_actually_generic, fake_type_member1) + GenericTypeRegistry.register_type_variable(not_actually_generic, fake_type_member2) + + type_variables = T.must(GenericTypeRegistry.lookup_type_variables(not_actually_generic)) + + assert_equal([fake_type_member1, fake_type_member2], type_variables) + # Let's double-check that they're not just equal, but identical: + assert_same(fake_type_member1, type_variables[0]) + assert_same(fake_type_member2, type_variables[1]) + end + end + + describe "the patch for .inherited on generic classes" do + # This is more of an internal detail and cross-cutting concern of all the public APIs, + # but it's easier to test here on its own. + + it "rescues exceptions that would prevent subclassing" do + assert_raises(RuntimeError) do # Precondition + # If not caught by the patch, the error raised from `.inherited` would have blocked our subclassing. + Class.new(RaisesInInheritedCallback) + end + + result = RaisesInInheritedCallback[Object] # Should be a distinct subclass + refute_same(result, RaisesInInheritedCallback) + assert_operator(result, :<, RaisesInInheritedCallback) + end + end + end + + class SampleGenericClass + extend T::Generic + + Element = type_member + end + + class RaisesInInheritedCallback + extend T::Generic + + Element = type_member + + class << self + def inherited(subclass) + super + raise "Boom" + end + end + end + end + end +end diff --git a/spec/tapioca/static/requires_compiler_spec.rb b/spec/tapioca/static/requires_compiler_spec.rb index 07a07026e..9e3e3b274 100644 --- a/spec/tapioca/static/requires_compiler_spec.rb +++ b/spec/tapioca/static/requires_compiler_spec.rb @@ -9,26 +9,26 @@ module Static class RequiresCompilerSpec < Tapioca::SpecWithProject describe RequiresCompiler do after do - @project.remove("lib/") - @project.remove("test/") - @project.remove("sorbet/") + @project.remove!("lib/") + @project.remove!("test/") + @project.remove!("sorbet/") end it "does nothing on an empty project" do - @project.sorbet_config(<<~CONFIG) + @project.write_sorbet_config!(<<~CONFIG) . CONFIG - compiler = Static::RequiresCompiler.new(@project.absolute_path("sorbet/config")) + compiler = Static::RequiresCompiler.new(@project.absolute_path_to("sorbet/config")) assert_empty(compiler.compile) end it "extracts the requires from a simple project" do - @project.sorbet_config(<<~CONFIG) + @project.write_sorbet_config!(<<~CONFIG) lib/ CONFIG - @project.write("lib/simple.rb", <<~RB) + @project.write!("lib/simple.rb", <<~RB) require "a" require "b" require ("c") @@ -47,7 +47,7 @@ class RequiresCompilerSpec < Tapioca::SpecWithProject end RB - compiler = Static::RequiresCompiler.new(@project.absolute_path("sorbet/config")) + compiler = Static::RequiresCompiler.new(@project.absolute_path_to("sorbet/config")) assert_equal(<<~REQ, compiler.compile) require "a" require "b" @@ -63,33 +63,33 @@ class RequiresCompilerSpec < Tapioca::SpecWithProject end it "extracts the requires from all the files listed in the sorbet config" do - @project.sorbet_config(<<~CONFIG) + @project.write_sorbet_config!(<<~CONFIG) lib/ test/file1.rb test/file2.rb CONFIG - @project.write("lib/file1.rb", <<~RB) + @project.write!("lib/file1.rb", <<~RB) require "a" RB - @project.write("lib/file2.rb", <<~RB) + @project.write!("lib/file2.rb", <<~RB) require "b" RB - @project.write("test/file1.rb", <<~RB) + @project.write!("test/file1.rb", <<~RB) require "c" RB - @project.write("test/file2.rb", <<~RB) + @project.write!("test/file2.rb", <<~RB) require "d" RB - @project.write("test/file3.rb", <<~RB) + @project.write!("test/file3.rb", <<~RB) require "e" RB - compiler = Static::RequiresCompiler.new(@project.absolute_path("sorbet/config")) + compiler = Static::RequiresCompiler.new(@project.absolute_path_to("sorbet/config")) assert_equal(<<~REQ, compiler.compile) require "a" require "b" @@ -99,22 +99,22 @@ class RequiresCompilerSpec < Tapioca::SpecWithProject end it "ignores requires with interpolation" do - @project.sorbet_config(<<~CONFIG) + @project.write_sorbet_config!(<<~CONFIG) . CONFIG - @project.write("lib/file1.rb", <<~'RB') + @project.write!("lib/file1.rb", <<~'RB') require "a" require "#{ENV["SOMETHING"]}" RB - @project.write("lib/file2.rb", <<~'RB') + @project.write!("lib/file2.rb", <<~'RB') require "b" require "a" require "lib-#{1 + 2}" RB - compiler = Static::RequiresCompiler.new(@project.absolute_path("sorbet/config")) + compiler = Static::RequiresCompiler.new(@project.absolute_path_to("sorbet/config")) assert_equal(<<~REQ, compiler.compile) require "a" require "b" @@ -122,33 +122,33 @@ class RequiresCompilerSpec < Tapioca::SpecWithProject end it "ignores files ignored in the sorbet config" do - @project.sorbet_config(<<~CONFIG) + @project.write_sorbet_config!(<<~CONFIG) . --ignore=lib/ --ignore=test/file3.rb CONFIG - @project.write("lib/file1.rb", <<~RB) + @project.write!("lib/file1.rb", <<~RB) require "a" RB - @project.write("lib/file2.rb", <<~RB) + @project.write!("lib/file2.rb", <<~RB) require "b" RB - @project.write("test/file1.rb", <<~RB) + @project.write!("test/file1.rb", <<~RB) require "c" RB - @project.write("test/file2.rb", <<~RB) + @project.write!("test/file2.rb", <<~RB) require "d" RB - @project.write("test/file3.rb", <<~RB) + @project.write!("test/file3.rb", <<~RB) require "e" RB - compiler = Static::RequiresCompiler.new(@project.absolute_path("sorbet/config")) + compiler = Static::RequiresCompiler.new(@project.absolute_path_to("sorbet/config")) assert_equal(<<~REQ, compiler.compile) require "c" require "d" @@ -156,29 +156,29 @@ class RequiresCompilerSpec < Tapioca::SpecWithProject end it "ignores files located in the project" do - @project.sorbet_config(<<~CONFIG) + @project.write_sorbet_config!(<<~CONFIG) . CONFIG - @project.write("lib/a.rb", <<~RB) + @project.write!("lib/a.rb", <<~RB) require "liba" RB - @project.write("lib/b.rb", <<~RB) + @project.write!("lib/b.rb", <<~RB) require "libb" RB - @project.write("test/file1.rb", <<~RB) + @project.write!("test/file1.rb", <<~RB) require "a" require "libc" RB - @project.write("test/file2.rb", <<~RB) + @project.write!("test/file2.rb", <<~RB) require "b" require "libd" RB - compiler = Static::RequiresCompiler.new(@project.absolute_path("sorbet/config")) + compiler = Static::RequiresCompiler.new(@project.absolute_path_to("sorbet/config")) assert_equal(<<~REQ, compiler.compile) require "liba" require "libb" @@ -188,26 +188,26 @@ class RequiresCompilerSpec < Tapioca::SpecWithProject end it "handles ruby source files with encodings other than UTF-8" do - @project.sorbet_config(<<~CONFIG) + @project.write_sorbet_config!(<<~CONFIG) . CONFIG - @project.write("lib/utf8-ascii-only.rb", <<~RB) + @project.write!("lib/utf8-ascii-only.rb", <<~RB) require "a" RB - @project.write("lib/utf8.rb", <<~RB) + @project.write!("lib/utf8.rb", <<~RB) require "b" # やあ RB - @project.write("lib/win-31j.rb", <<~RB.encode("Windows-31J")) + @project.write!("lib/win-31j.rb", <<~RB.encode("Windows-31J")) # encoding:Windows-31J require "b" require "c" # やあ RB - compiler = Static::RequiresCompiler.new(@project.absolute_path("sorbet/config")) + compiler = Static::RequiresCompiler.new(@project.absolute_path_to("sorbet/config")) assert_equal(<<~REQ, compiler.compile) require "a" require "b" diff --git a/tapioca.gemspec b/tapioca.gemspec index 67346df5b..b992a4548 100644 --- a/tapioca.gemspec +++ b/tapioca.gemspec @@ -26,9 +26,9 @@ Gem::Specification.new do |spec| spec.add_dependency("bundler", ">= 2.2.25") spec.add_dependency("netrc", ">= 0.11.0") spec.add_dependency("parallel", ">= 1.21.0") - spec.add_dependency("rbi", "~> 0.0.0", ">= 0.0.16") - spec.add_dependency("sorbet-static-and-runtime", ">= 0.5.10187") - spec.add_dependency("spoom", "~> 1.2.0", ">= 1.2.0") + spec.add_dependency("rbi", ">= 0.1.4", "< 0.2") + spec.add_dependency("sorbet-static-and-runtime", ">= 0.5.11087") + spec.add_dependency("spoom", ">= 1.2.0") spec.add_dependency("thor", ">= 1.2.0") spec.add_dependency("yard-sorbet") diff --git a/tasks/generator_documentation.rake b/tasks/generator_documentation.rake index 2700852f1..0fa13dafa 100644 --- a/tasks/generator_documentation.rake +++ b/tasks/generator_documentation.rake @@ -70,21 +70,14 @@ task generate_dsl_documentation: :yard_for_generate_documentation do end def load_registry - Dir.glob([ - "lib/tapioca/dsl/compilers/*.rb", - ]).each do |compiler| - require File.expand_path(compiler) - end + YARD::Registry.all(:class).filter_map do |code_object| + next unless code_object.superclass.to_s == "Tapioca::Dsl::Compiler" - Tapioca::Runtime::Reflection.descendants_of(Tapioca::Dsl::Compiler) - .map do |compiler| - code_object = YARD::Registry.at(compiler.name) - RegistryEntry.new(code_object.name.to_s, compiler, code_object) - end - .sort_by(&:name) + RegistryEntry.new(code_object.name.to_s, code_object) + end.sort_by(&:name) end - RegistryEntry = Struct.new(:name, :compiler, :code_object) do + RegistryEntry = Struct.new(:name, :code_object) do def filename "#{Dir.pwd}/manual/compiler_#{name.downcase}.md" end @@ -107,7 +100,7 @@ task generate_dsl_documentation: :yard_for_generate_documentation do end def main - YARD::Registry.load! + Dir.glob("lib/tapioca/dsl/{compiler.rb,compilers/**/*.rb}") { |file| YARD.parse(file) } registry = load_registry print_table_of_contents(registry)